2016年5月10日

C#中LINQ的使用demo

摘要: 1 public void showTolist(int type) 2 { 3 listbox.Items.Clear(); 4 listbox.Items.Add("姓名 年龄 手机号码"); 5 if (type == 1) 6 { 7 ... 阅读全文

posted @ 2016-05-10 23:23 一梦千寻 阅读(795) 评论(0) 推荐(0) 编辑

2016年4月27日

C#中随机数和定时器的使用

摘要: C#中的定时器使用: 阅读全文

posted @ 2016-04-27 13:06 一梦千寻 阅读(760) 评论(0) 推荐(0) 编辑

2016年3月17日

Android高手进阶:Adapter深入理解与优化

摘要: 一般是针对包含多个元素的View,如ListView,GridView,ExpandableListview,的时候我们是给其设置一个Adapter。Adapter是与View之间提供数据的桥梁,也是提供每个Item的视图桥梁。 AD:51CTO技术沙龙 | 赋予APP不同凡响的交互和体验>> 一般 阅读全文

posted @ 2016-03-17 21:08 一梦千寻 阅读(232) 评论(0) 推荐(0) 编辑

android:使用http协议将图片上传到自己的服务器

摘要: 由于http只支持上传的数据转化为字符串,对于想直接上传图片较不容易,故可以先将其转化为字节流,再将字节流转化为字符串。在此过程中经常出现错误,故可以考虑先将其用base64进行加密编码,在服务器端或客户端在将其通过base64解码成字节流,进而再转为相应的图片文件。 如图: 客户端主要代码: 将图 阅读全文

posted @ 2016-03-17 19:18 一梦千寻 阅读(5079) 评论(0) 推荐(0) 编辑

2015年4月3日

素数的筛选和bool类型的妙用

摘要: 1 #include 2 using namespace std; 3 #define max 10000 4 bool num[10002]; 5 int pan1,pan2; 6 void foundprime(){ 7 for(int i=2;i<=100;i++) 8 {... 阅读全文

posted @ 2015-04-03 22:34 一梦千寻 阅读(194) 评论(0) 推荐(0) 编辑

2015年3月23日

求字符串中的汉字个数

摘要: #include#include#includechar str[1100];int Chinisenumber(char str[]){ int i,sum=0; for(i=0;str[i];i++)if(str[i]&0x80) {sum++;i++;}//这里i++是由于汉字占两个字节, ... 阅读全文

posted @ 2015-03-23 00:36 一梦千寻 阅读(318) 评论(0) 推荐(0) 编辑

求不定数目的n个数的最小公倍数

摘要: #include #include #include using namespace std; long int pp=1; void found(long int t) { long int max,min; if(t>n) { while(n--) {cin>>t; found(t); ... 阅读全文

posted @ 2015-03-23 00:03 一梦千寻 阅读(104) 评论(0) 推荐(0) 编辑

2015年3月19日

实验

摘要: #includeusing namespace std;class change{public:float intput1(float c);float intput2(float &c);void output();private:float c;};float change::intput1(f... 阅读全文

posted @ 2015-03-19 17:50 一梦千寻 阅读(83) 评论(0) 推荐(0) 编辑

2015年3月18日

杭电2018母牛递归问题

摘要: #includeusing namespace std; int niu(int n) { int t=0; if(n>n,n!=0) cout<<niu(n)<<endl; return 0; } 阅读全文

posted @ 2015-03-18 21:17 一梦千寻 阅读(106) 评论(0) 推荐(0) 编辑

错题

摘要: #include#include#includeusing namespace std;int main(){ int i,a,b,sum=0,j=1; while(scanf("%d%d",&a,&b)!=EOF){ for(i=1;i<=a;i++){ sum+=i*2; j++; if(i%b... 阅读全文

posted @ 2015-03-18 17:53 一梦千寻 阅读(123) 评论(0) 推荐(0) 编辑

导航