10 2015 档案
摘要:ErrorError1 StackOverflow because of EditText's addTextChangedLister1.1 ProblemWe should be carefull when we use addTextChangedLister. Because if we don't add restrictions on text changging, we may ha...
        阅读全文
            
摘要:Tricks of Android's GUITricks of Android's GUI1 layoutweightIn LinearLayout, the default weight for all views is 0, so if you specify any weight value greater than 0 to only one view, then that view f...
        阅读全文
            
摘要:Tricks of Android's GUITricks of Android's GUI1 layoutweightIn LinearLayout, the default weight for all views is 0, so if you specify any weight value greater than 0 to only one view, then that view f...
        阅读全文
            
摘要:Create Access Point on ArchlinuxCreate Access Point on Archlinux1 SolutionDownload createapgit clone https://github.com/oblique/create_aporyaourt -S create_apInstallcd create_apmake installCreate APch...
        阅读全文
            
摘要:The file named errorlog is too largeThe file named errorlog is too large1 ProblemOne day, when I install android-sdk, I found that one error "NO space left on the device". That's very strange. Because...
        阅读全文
            
摘要:FormsForms1 Displaying a Search Input FieldYou want to present a user with a search form field. Search Submitinput[type="search"]{ border-radius:10px;}2 Contact Information Input FieldsYou want to...
        阅读全文
            
摘要:HTML5 Fundamental SyntaxHTML5 Fundamental Syntax1 Adding Document Structure with HTML5’s New Elements1.1 headerIs used to contain the headline(s) for a page and/or section . It can also containsupplem...
        阅读全文
            
摘要:Binary Search TreeBinary Search Tree1 DefinitionA binary search tree is a binary tree, where each node has a restriction that the key in any node is larger than the key in its left-child subtree and s...
        阅读全文
            
摘要:SLIQ/SPRINTSLIQ/SPRINTBefore SLIQ, most classification alogrithms have the problem that they do not scale. Because these alogrithms have the limit that the traning data should fit in memory. That's wh...
        阅读全文
            
摘要:SortSort1 SortSelect sort is the simplest sorting alogrithms.1.1 IDEA1.find the smallest element in the rest of array2.exchange the element with with the i th entry.3.repeat step1 and step2 util all i...
        阅读全文
            
摘要:ID3/C4.5/Gini IndexID3/C4.5/Gini Index1 ID3Select the attribute with the highest information gain.1.1 Formula1.2 FormulaLet pi be the probability that an arbitrary tuple in D belongs to class Ci, esti...
        阅读全文
            
摘要:https://help.github.com/articles/set-up-git/git上传是忽略一些文件在每个git的项目中有一个.gitignore文件,将忽略的文件或文件夹输入即可。例如,用emacs编辑文件时总会出现~文件,加入下面这句即可。*~ssh1.check f...
        阅读全文
            
摘要:firefox的flash插件pacman -S flashpluginfirefox上网慢由于Chromium浏览器,打字的时候经常会跳字母,所以就换了firefox浏览器,但是FF上网的时候特别慢,而且大部分时间是花费在解析域名上。因此到网上找了许多资料,最终解决方法如下。1.安...
        阅读全文
            
摘要:第1条:考虑用静态工厂方法代替构造器该规则的优势:1.静态工厂方法有名称。构造器的参数本身没有确切描述正被返回的对象。当一个类需要多个带有相同签名的构造器时,用静态工厂方法代替。 2.不必每次调用它们都创建一个新对象。3.可以返回原返回类型的任何子类型的对象。4.在创建参数化...
        阅读全文
            
摘要:复制构造函数C++支持两种初始化形式:直接初始化和复制初始化,直接初始化直接调用与实参匹配的构造函数,复制初始化总是调用复制构造函数。复制初始化使用 =符号。class Foo{public: Foo(); Foo(const Foo&);}复制操作符复制初始化必须使用...
        阅读全文
            
摘要:初窥算法使用泛型算法必须包含algorithm头文件。泛化的算术算法包含在numeric头文件中。只读算法顾名思义,该类算法只会读取输入范围内的元素。vector vec;...int sum = accumulate(ivec.begin(),ivec.end(),40);//su...
        阅读全文
            
摘要:顺序容器标准库的三种顺序容器为:vector,list,deque。顺序容器的元素排列次序与元素值无关,而是由元素的添加顺序有关。顺序容器vector 支持快速随机访问list 支持快速插入/删除deque 双端队列相应的适配器stack ...
        阅读全文
            
摘要:在C++中调用fstream定义的ifstream,ofstream,fstream来对文件进行读写。ifstream infile(ifile.c_str()); //输入流ofstream outfile(ofile.c_str()) //...
        阅读全文
            
摘要:位操作符 操作符 功能 用法 ~ 位求反 ~expr 右移 expr1>>expr2 & 位与 expr1&expr2 ^ 位异或 expr1^expr2 位或整型操作书视为二进制位的集合。 需要注意的是,左移在右边插入0以补充空位;右移,对...
        阅读全文
            
摘要:标准库vector类型#includeusing std::vector;vector为一个类模板。vector的初始化vector v1; vector v2(v1); v2是v1的一个副本vector v3(n,i); v3包含n个值为i的元素v...
        阅读全文
            
摘要:容器的iterator类型vector::iterator iter;迭代器是一种检查容器内元素并遍历元素的数据类型。begin和end操作vector vec;vector::iterator iter = vec.begin(); //若vec不为空,则iter指向ive...
        阅读全文
            
摘要:数组数组是类似于vector的低级复合类型。现代C++程序应尽量使用vector类型,只有强调速度时才使用数组。动态数组创建T *pt = new T[size];多维数组int ia[3][4] = { {0,1,2,3}, {4,5,6,7}, {8,9,10,...
        阅读全文
            
摘要:声明与定义声音与定义的区别在于,声明没有给变量分配空间,而定义则给变量分配了空间;定义也是声明。extern int i; // 声明但未定义int i ; //声明且定义extern double PI = 3.14; //声明且定义文件用于声明而不是定义。之所以这样的原因是有时...
        阅读全文
            
摘要:标准库string类型string对象初始化string s1;string s2(s1);string s3("value");string s4(n,'c');string对象的读写string s;cin>>s; //读取并忽略开头的所有...
        阅读全文
            
 
                    
                     
                    
                 
                    
                
 
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号