上一页 1 2 3 4 5 6 ··· 12 下一页
摘要: var json = JsonConvert.SerializeObject(obj); StringContent theContent = new StringContent(json, Encoding.UTF8, "application/json"); var r = client.PostAsync(url, theContent).Result.Content.ReadAsStrin... 阅读全文
posted @ 2015-11-25 12:57 czcz1024 阅读(1416) 评论(0) 推荐(0) 编辑
摘要: 3个 clientPort分别设置为2181,2182,2083 server.1=127.0.0.1:2888:3888 server.2=127.0.0.2:2889:3889 server.3=127.0.0.2:2890:3890 后面两个端口依次增长 dataDir=../zookeeperData/A 最后依次为a,b,c 然后建立对应的目录 分别在a,b,... 阅读全文
posted @ 2015-11-18 17:22 czcz1024 阅读(285) 评论(0) 推荐(0) 编辑
摘要: Assembly下有LoadFile,LoadFrom等方法可以加载程序集。 LoadFile只加载你给定路径的那个dll,LoadFrom会自动加载依赖的dll。 如:A依赖B,LoadFile(“A”)只会加载A,不会加载B,之后运行A的方法可能会导致报错。 LoadFrom(“A”)则会自动加载A和A的依赖,之后调用就不会报错了 但是如果想要加载进来的程序集还能够卸载掉,就不能用这样... 阅读全文
posted @ 2015-09-14 17:26 czcz1024 阅读(765) 评论(0) 推荐(0) 编辑
摘要: private void Btn_Click(object sender, EventArgs e) { var u = FindViewById(Resource.Id.editText1).Text; var p = FindViewById(Resource.Id.editText2).Text; var progressDialog = ProgressDialog... 阅读全文
posted @ 2015-06-11 17:49 czcz1024 阅读(419) 评论(0) 推荐(0) 编辑
摘要: public override bool OnKeyDown([GeneratedEnum]Keycode keyCode, KeyEvent e) { if (keyCode == Keycode.Back) { Finish(); System.Environment.Exit(0); } return base.OnKeyDow... 阅读全文
posted @ 2015-06-11 16:52 czcz1024 阅读(1040) 评论(0) 推荐(0) 编辑
摘要: 跳转无需intent,直接给要跳转的activity的type就可以了 StartActivity(typeof(Login)); 阅读全文
posted @ 2015-06-11 16:33 czcz1024 阅读(488) 评论(0) 推荐(0) 编辑
摘要: 读 PreferenceManager.GetDefaultSharedPreferences(this).GetInt("uid", 0); 写 var editor = PreferenceManager.GetDefaultSharedPreferences(this).Edit(); editor.PutInt("uid", id); editor.Apply(); 阅读全文
posted @ 2015-06-11 16:31 czcz1024 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 在网上搜了signalr的oc客户端,基本上都指向同一个东西https://github.com/DyKnow/SignalR-ObjC 但是这个也有日子没更新了,用cocoapods安装下来是编译不过的。 在issue里有人说,需要吧pods的引用改为 platform :ios, '7.0' pod 'AFNetworking', '1.3.3' pod 'SignalR-Ob... 阅读全文
posted @ 2015-05-29 11:14 czcz1024 阅读(1709) 评论(3) 推荐(0) 编辑
摘要: 无需其他类库 1: - (IBAction)callapi:(id)sender { 2: NSURL *url=[NSURL URLWithString:@"http://..."]; 3: NSURLRequest *request=[NSURLRequest requestWithURL:url]; ... 阅读全文
posted @ 2015-05-29 10:34 czcz1024 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 如果我们在先前的步骤中读取过数据,如 var list = db.Model.ToList(); 之后再,附加 var o = new Model { Id = 1 }; db.Model.Attach(o); 就会报,类似这样的错误 Attaching an entity of type 'efAutoDetach.Model' failed because another enti... 阅读全文
posted @ 2015-05-08 10:42 czcz1024 阅读(868) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 12 下一页