11 2011 档案

摘要:《海量数据处理常用思路和方法》大数据量,海量数据 处理方法总结最近有点忙,稍微空闲下来,发篇总结贴。大数据量的问题是很多面试笔试中经常出现的问题,比如baidu google 腾讯 这样的一些涉及到海量数据的公司经常会问到。下面的方法是我对海量数据的处理方法进行了一个一般性的总结,当然这些方法可能并不能完全覆盖所有的问题,但是这样的一些方法也基本可以处理绝大多数遇到的问题。下面的一些问题基本直接来源于公司的面试笔试题目,方法不一定最优,如果你有更好的处理方法,欢迎与我讨论。1.Bloom filter适用范围:可以用来实现数据字典,进行数据的判重,或者集合求交集基本原理及要点:对于原理来说很简 阅读全文
posted @ 2011-11-24 21:22 贰百舞 阅读(462) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 using namespace std; 3 int main() 4 {int jc(int); 5 6 int a,b,c; 7 cin>>a>>b>>c; 8 cout<<a<<"!+"<<b<<"!+"<<c<<"!="<<jc(a)+jc(b)+jc(c)<<endl; 9 10 return 0;11 }12 13 14 15 int 阅读全文
posted @ 2011-11-24 18:57 贰百舞 阅读(132) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 using namespace std; 3 int main() 4 {int hcf(int,int); 5 int lcd(int,int,int); 6 int u,v,h,l; 7 cin>>u>>v; 8 h=hcf(u,v); 9 cout<<"H.C.F="<<h<<endl;10 l=lcd(u,v,h);11 cout<<"L.C.D="<<l<<endl;12 return 0; 阅读全文
posted @ 2011-11-24 18:49 贰百舞 阅读(147) 评论(0) 推荐(0)
摘要:#include <iostream>#include<iomanip>using namespace std;int main() {double _x=1; cout<<setw(8)<<_x<<endl; return 0; }-------------#include <iostream>#include<iomanip>using namespace std;int main() {long _x=1; cout<<setw(8)<<_x<<setw(8)<& 阅读全文
posted @ 2011-11-24 18:46 贰百舞 阅读(110) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 using namespace std; 3 int main() 4 {int prime(int); /* 函数原型声明 */ 5 int n; 6 cout<<"input an integer:"; 7 cin>>n; 8 if (prime(n)) 9 cout<<n<<" is a prime."<<endl;10 else11 cout<<n<<" is not a prime." 阅读全文
posted @ 2011-11-24 18:32 贰百舞 阅读(179) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 using namespace std; 3 4 class gugu 5 { 6 public: 7 8 void tuiqian(); 9 10 private:11 12 int a;13 char b;14 15 };16 17 18 19 void gugu::tuiqian()20 {21 cout<<"***************"<<endl;22 }23 24 int main()25 { gugu tq;26 tq.tuiqian();27 28... 阅读全文
posted @ 2011-11-20 14:28 贰百舞 阅读(137) 评论(0) 推荐(0)
摘要:1 下载文件要用到操作系统的API函数,下面是一个WINDOWS系统中的实现: 2 3 //--------------------------------------------------------------------------- 4 5 #include <stdio.h> 6 #include <windows.h> 7 #include <wininet.h> 8 #define MAXBLOCKSIZE 1024 9 #pragma comment( lib, "wininet.lib" ) ;10 11 void d 阅读全文
posted @ 2011-11-20 14:26 贰百舞 阅读(6331) 评论(1) 推荐(1)
摘要:1 #include <iostream> 2 using namespace std; 3 int jc(int n) 4 { 5 int a=1; 6 if (n<0) cout<<"ERROR!"; 7 else if (n==0||n==1) a=1; 8 for(int i=1;i<=n;i++) 9 a=a*i;10 return a;11 }12 13 int main()14 { 15 cout<<jc(-100)<<endl;16 cout<<jc(0)<<endl;17 阅读全文
posted @ 2011-11-20 11:08 贰百舞 阅读(224) 评论(0) 推荐(0)
摘要:Could not find rake-0.9.2 in any of the sourcesRun `bundle install` to install missing gems.------------------------------》。bundle install可以解决.. ... 阅读全文
posted @ 2011-11-15 13:20 贰百舞 阅读(143) 评论(0) 推荐(0)
摘要:rails在windows下安装遇到的问题http://my.oschina.net/u/185728/blog/33156-------------Ruby on Rails安装http://www.hoowolf.net/2011/09/15/the-development-of-ruby-on-rails/---------------Ruby on Rails开发入门http://www.hoowolf.net/2011/09/24/ruby-on-rails-development/----------------搭建Netbeans+ruby+rails+SQLite的ROR环境h 阅读全文
posted @ 2011-11-07 09:24 贰百舞 阅读(113) 评论(0) 推荐(0)