上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 109 下一页

2015年7月19日

1049. Counting Ones (30)

摘要: 题目如下: The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers fro... 阅读全文

posted @ 2015-07-19 12:22 张大大123 阅读(140) 评论(0) 推荐(0) 编辑

2015年7月18日

1048. Find Coins (25)

摘要: 题目如下: Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mal... 阅读全文

posted @ 2015-07-18 10:33 张大大123 阅读(128) 评论(0) 推荐(0) 编辑

1047. Student List for Course (25)

摘要: 题目如下: Zhejiang University has 40000 students and provides 2500 courses. Now given the registered course list of each student, you are supposed to... 阅读全文

posted @ 2015-07-18 10:26 张大大123 阅读(188) 评论(0) 推荐(0) 编辑

2015年7月17日

1046. Shortest Distance (20)

摘要: 题目如下: The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between an... 阅读全文

posted @ 2015-07-17 11:10 张大大123 阅读(127) 评论(0) 推荐(0) 编辑

2015年7月16日

(七十四)iOS8之前使socket可以后台运行的方法

摘要: 对于使用socket通信的应用程序,常常希望App位于后台时仍然可以进行网络通信,这在iOS8和以后的版本是被默认允许的,socket可以直接在后台运行,而对于iOS8之前的版本就不行,需要进行两步设置使得socket后台运行。 这里以XMPP的socket为例,为了实现后台接收到消息后发送推送... 阅读全文

posted @ 2015-07-16 22:07 张大大123 阅读(154) 评论(0) 推荐(0) 编辑

(七十三)iOS本地推送通知的实现

摘要: iOS的推送通知分为本地推送和网络推送两种,如果App处于挂起状态,是可以发送本地通知的,如果已经被杀掉,则只有定时通知可以被执行,而类似于QQ的那种网络消息推送就无法实现了,因为App的网络模块在被杀掉后是无法执行的,这时候就要借助远程通知,通过苹果的服务器转发通知到手机,本文只介绍本地通知的... 阅读全文

posted @ 2015-07-16 21:57 张大大123 阅读(155) 评论(0) 推荐(0) 编辑

(七十二)自定义通知NSNotification实现消息传递

摘要: 众所周知,iOS中一般在类之间传递消息使用较多的是delegate和block,还有一种是基于通知进行的消息传递,我们常常是使用系统的通知,来实现一些功能,例如利用键盘尺寸改变的通知,我们可以根据键盘的位置改变输入框的位置,从而避免输入框被键盘遮挡。 除了利用系统的通... 阅读全文

posted @ 2015-07-16 21:54 张大大123 阅读(199) 评论(0) 推荐(0) 编辑

1045. Favorite Color Stripe (30) -LCS允许元素重复

摘要: 题目如下: Eva is trying to make her own color stripe out of a given one. She would like to keep only her favorite colors in her favorite order by cut... 阅读全文

posted @ 2015-07-16 13:10 张大大123 阅读(172) 评论(0) 推荐(0) 编辑

2015年7月15日

1044. Shopping in Mars (25)

摘要: 题目如下: Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M$). W... 阅读全文

posted @ 2015-07-15 10:47 张大大123 阅读(140) 评论(0) 推荐(0) 编辑

2015年7月14日

使用C#+socket实现用移动设备控制的虚拟手柄

摘要: 近期在和同学玩死神vs火影,以怀念小时候,突然觉得用键盘玩的不够畅快,因此萌生了写一个虚拟手柄的念头。 我的思路是在移动设备(iOS、Android)上实现手柄,在电脑上监听,利用socket建立持久连接,通过移动设备向电脑上的监听软件发送操作码,通过操作码来处理事件。 有关socket的服务端... 阅读全文

posted @ 2015-07-14 12:58 张大大123 阅读(461) 评论(0) 推荐(0) 编辑

上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 109 下一页

导航