最近做一个项目,有一个时间选择控件,里面的时间需要合理化设置。
比如,最多支持 今天,明天。
上班的合理时间为 0 - 11点
下班的合理时间为12 - 23 点
根据系统所处时间 AM 或者 PM ,判断 上班的话只好约到明天,因为处于PM没有办法再约上班的了。
另外顾客下单的时间应该比系统时间多出半个小时的缓冲时间。分钟只能选 00,10,20,30,40,50 这...
分类:
其他好文 时间:
2015-01-23 16:24:16
阅读次数:
126
题意:
给两列数,a1,a2..an和b1,b2..bn,可以交换ak和bk,求让两列数和的差的绝对值最小的最少交换次数。
分析:
动态规划,dp[x]表示a1,..am进过交换达到和为x的最小交换次数。dp[x+a]
代码:
//poj 1717
//sep9
#include
using namespace std;
const int maxM=12000;
int dp[max...
分类:
其他好文 时间:
2015-01-23 16:23:13
阅读次数:
143
DescriptionThese days, I am thinking about a question, how can I get a problem as easy as A+B? It is fairly difficulty to do such a thing. Of course, ...
分类:
其他好文 时间:
2015-01-23 13:03:09
阅读次数:
128
#who 或者 #w 展示所有登录到当前系统的用户信息#who am i 展示真是用户信息#whoami 展示登陆系统的用户名例如 :登陆用户和真实用户一致#whoamiroot#who am iroot pts/3 oct 23 12:17 (:0.0)登陆用户和真实用户不一致#whoamicic...
分类:
系统相关 时间:
2015-01-22 01:41:20
阅读次数:
209
DescriptionThese days, I am thinking about a question, how can I get a problem as easy as A+B? It is fairly difficulty to do such a thing. Of course, ...
分类:
其他好文 时间:
2015-01-21 21:51:40
阅读次数:
162
During our recent blog chat, there were a number of topics that were asked about and I am going to expand on some of them. The first one is the memory...
分类:
其他好文 时间:
2015-01-21 14:43:37
阅读次数:
146
Problem DescriptionThese days, I am thinking about a question, how can I get a problem as easy as A+B? It is fairly difficulty to do such a thing. Of ...
分类:
其他好文 时间:
2015-01-20 13:24:09
阅读次数:
163
主要分三步:1. 设置闹铃时间;2. 接收闹铃事件广播;3. 重开机后重新计算并设置闹铃时间;1. 设置闹铃时间(毫秒)private void setAlarmTime(Context context,long timeInMillis) { AlarmManager am = (AlarmMa....
分类:
移动开发 时间:
2015-01-20 11:42:38
阅读次数:
147
Writer:BYSocket(泥沙砖瓦浆木匠) 微博:BYSocket 豆瓣:BYSocketReprint it anywhere u want.Written In The Font I am writing at home.Today it is windy,but I am feeling...
分类:
其他好文 时间:
2015-01-17 22:10:49
阅读次数:
274
Writer:BYSocket(泥沙砖瓦浆木匠)
微博:BYSocket
豆瓣:BYSocket
Reprint it anywhere u want.
Written In The Font
I am writing at home.Today it is windy,but I am feeling isuitable and war...
分类:
其他好文 时间:
2015-01-17 18:03:21
阅读次数:
218