1,C++中操作数组
#include
using namespace std;
int length(char []);
void output_frequency(char []);
int main()
{
char str[]="yan cong min";
cout<<"要处理的字符串为:"<<str<<endl;
cout<<"字符串长度为:"<<lengt...
分类:
编程语言 时间:
2014-05-05 13:29:30
阅读次数:
432
题目链接:http://poj.org/problem?id=1011
这道题用到了深搜+剪枝。
#include
#include
#include
using namespace std;
int a[65];
int vis[65];
int n;
int cmp(int x,int y)
{
return x>y;
}
int dfs(int len,int need,int ...
分类:
其他好文 时间:
2014-05-05 13:28:57
阅读次数:
290
这篇对应的是习题16,读写文件
# -*- coding: utf-8 -*-
#对文件更多操作复制A文件的内容到B文件
#from sys import argv
from os.path import exists
prompt = "> "
from_file = raw_input("please input the filename where you want to copy...
分类:
编程语言 时间:
2014-05-05 12:54:02
阅读次数:
402
如何使用html网页和本地app进行传递数据呢?经过研究,发现还是有方法的,总结了一下,大致有一下几种方式
一、通过html页面打开Android本地的app
1、首先在编写一个简单的html页面
html>
head>
meta http-equiv="Content-Type" content="text/html; ch...
分类:
移动开发 时间:
2014-05-04 00:31:46
阅读次数:
376
这是一篇分享技巧的文章:myeclipse恢复误删文件和代码
[ 恢复误删文件 ]
今天在写代码的时候,不小心把一个包给删除了,然后这个包下所有的文件都没了,相信很多人都有类似的经历,
幸好myeclipse给我们提供了一个很好用的功能:
选中项目 -> Restore from Local History.. -> 界面如下图
勾选要恢复的文件,点击Restore就可以了,就算...
分类:
系统相关 时间:
2014-05-04 00:25:53
阅读次数:
515
能够将热爱的技术应用于实际生活生产中,是做技术人员向往和乐之不疲的事。
现将前期手里面的一个项目做一个大致的总结,与大家一起分享、交流、进步。项目现在正在线上运行,项目名——基于Hadoop的数据分析综合管理平台。
项目流程整体比较清晰,爬取数据(txt文本)-->数据清洗-->文本模型训练-->文本分类-...
分类:
其他好文 时间:
2014-05-04 00:22:05
阅读次数:
476
1、从文件中读取内容
auto sharedFileUtils = FileUtils::getInstance();
std::string ret;
sharedFileUtils->purgeCachedEntries();
std::vector searchPaths = sharedFileUtils->getSearchPath...
分类:
其他好文 时间:
2014-05-04 00:09:23
阅读次数:
408
SICP 习题 1.36 要求我们修改fixed-point函数,使它能够打印出计算中产生的近似值序列,使用练习1.22展示的newline和display方法。而后通过找出变换x => log (1000)/log(x)的不动点的方式确定x^x=1000的一个根(书中还提示你使用Scheme的基本过程log,用于计算自然对数值)。然后比较一下使用平均阻尼和不用平均阻尼的计算步数。要注意的是不能使...
分类:
其他好文 时间:
2014-05-03 17:04:04
阅读次数:
288
题目:经典dp题目,求出最大相邻子序列的和。
方法:给出两种方法,一种dp,一种直接暴力(数据量小的时候可以考虑)。
代码1:
#include
#include
using namespace std;
int main()
{
int n;
int t=1;
cin>>n;
int s[100010];
while(t<=n)
{
...
分类:
其他好文 时间:
2014-05-03 17:02:34
阅读次数:
324
Python中怎么编写类
Last Edit 2013/5/2
先看一个例子:
#person.py
class person:
"""class to representaion a person"""
def __init__(self,name,age):
self.name=name
if 0<age<=150:
...
分类:
编程语言 时间:
2014-05-03 15:48:31
阅读次数:
390