给一个数组,找出其中一对和为sum的数字。由于已经做过排好序的数组,找和为sum的题目。所以完全没有过多考虑就排了序,左右指针相互收缩着寻找。跟答案上的方法也是一样的。/*start time = 16:57end time = 17:15*/#include #include using name...
分类:
其他好文 时间:
2014-10-29 14:39:18
阅读次数:
221
// ToLocalTime() UTC时间转换为本地时间
public static DateTime UtcToDateTime(long number)
{ return new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(number).ToLoc...
分类:
其他好文 时间:
2014-10-29 14:38:33
阅读次数:
150
1 Sub 批量调整图片大小() 2 ' 3 ' 批量修改图片 Macro 4 ' 宏由 zxz 录制,时间: 2014/10/29 5 '批量调整图片大小,避免图片太大显示不完全 6 7 '循环图片集合 8 For Each iShape In ActiveDocument.InlineSha.....
分类:
其他好文 时间:
2014-10-29 14:38:43
阅读次数:
189
Implement strStr().Returns a pointer to the first occurrence of needle in haystack, ornullif needle is not part of haystack.思路:时间复杂度O(m*n),也就是BF(Brute...
分类:
其他好文 时间:
2014-10-29 14:37:50
阅读次数:
141
首先,Linux的官方文档FHS对该目录的说明:http://www.linuxbase.org/betaspecs/fhs/fhs/ch04s09.htmlThe/usr/localhierarchy is for use by the system administrator when inst...
分类:
其他好文 时间:
2014-10-29 14:37:40
阅读次数:
131
Problem Discription: Suppose the array A has n items in which all of the numbers apear 3 times except one. Find the single number. int singleNumber2(....
分类:
其他好文 时间:
2014-10-29 14:37:46
阅读次数:
170
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol...
分类:
其他好文 时间:
2014-10-29 14:36:46
阅读次数:
217
Solaris下怎样改动文件创建时间及查询实验演示:1、核对时间[root@S1011:/]# dateTue Jul 15 21:37:01 CDT 2014--若时间不对请先按例如以下格式改动[root@S1011:/]# date 0715221114 --2014年7月15日22:...
分类:
其他好文 时间:
2014-10-29 14:39:04
阅读次数:
240
cd/etc/pki/tls[root@ip-172-31-21-147 tls]# cat openssl.cnf## OpenSSL example configuration file.# This is mostly being used for generation of certific...
分类:
其他好文 时间:
2014-10-29 14:36:14
阅读次数:
916
Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi...
分类:
其他好文 时间:
2014-10-29 14:35:36
阅读次数:
158
在日常办公或生活中,有时需要将电子文档以稿纸格式进行呈现,例如打印论文等。在Word 2013中,只需简单地单击几下鼠标,稿纸格式便可以呈现在您的文档中,可按如下步骤进行操作。(1)使用Word 2013编写完成文档内容后,只需在“页面布局”选项卡的“稿纸”选项组中单击【稿纸设置】按钮打开“稿纸设置...
分类:
其他好文 时间:
2014-10-29 14:36:54
阅读次数:
172
1)public(公共的):被public修饰的属性和方法可以被所有类访问。2)private(私有的):被private修饰的属性和方法只能在改类的内部使用。3)protected(受保护的):被protected修饰的属性和方法可以在类的内部、相同包、以及该类的子类所访问。4)默认的(不添加任何...
分类:
其他好文 时间:
2014-10-29 14:36:00
阅读次数:
132
研究员们展示了一系列炫酷的智能创新作品,如能制作乐器的3D打印机、会发微信的杯子、越说越美丽的衣服、帮你改头换面的美颜神器,甚至还有帮你看护老人、小孩甚至小狗的机器人……
分类:
其他好文 时间:
2014-10-29 14:34:50
阅读次数:
203
利用一个简单的事实:x ^ y ^ z 得到 a那么 a ^ z ^ y 就可以得到 x,或者 a ^ y ^ z 也可以得到 x加密:提供一个key.txt和input.txt,key.txt装你的密钥,比如:abc123,input.txt装原文(可以包含中文)解密:key.txt内容仍然是密钥...
分类:
其他好文 时间:
2014-10-29 14:36:07
阅读次数:
160
最近调试MPC5125的板子,第一步LTIB都装不过去,挫败感十足。LTIB的安装镜像来自于freescale的ltib-mpc5121ads-200906,是用于Ubuntu 10版本之前的,现在就算装10.04也无法联网更新了,所以只能把服务器装为Ubuntu 12.04版本的,遂厚脸皮去问fr...
分类:
其他好文 时间:
2014-10-29 14:35:46
阅读次数:
382
电源管理芯片可以为多设备供电,且这些设备电压电流有所不同。为这些设备提供的稳压器代码模型即为regulator。说白了regulator就是稳压器,它提供电源供给.简单的可以gpio操作,高电平开电,低电平关电.一般的还包括电流值,电压值等.一般regulator有两种不同的电源,即:ldo和sd....
分类:
其他好文 时间:
2014-10-29 14:33:18
阅读次数:
309
在日常的开发中我们经常需要为页面添加注释和版权等信息,这样我们就需要每次去拷贝粘贴同样的文字,为了减少这种重复性的工作,我们可以把这些信息保存在Visual Studio 2012类库模版文件里1.找到你的VS图标 右键-属性--打开文件所在目录 然后找到如下列表--CSarp文件夹 快速...
分类:
其他好文 时间:
2014-10-29 14:35:25
阅读次数:
169