语言发展
计算机的硬件只能识别0和1组成的机器指令,而机器指令是最基本的计算机语言,但是我们平时进行程序设计时肯定不会用机器语言来编程,因为用它的效率低,更让人难以理解。因此聪明的人类发明了汇编语言,它使用符号来表示指令,例如用ADD表示加法,这就容易理解了。但是汇编语言和机器语言十分接近,其书写取决于机器指令,因此它还是一种面向机器的语言,所以称它为低级语言。相应的,又在此基础上,开发出...
分类:
其他好文 时间:
2014-04-30 22:24:38
阅读次数:
319
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2,3,4}, reorder it to ...
分类:
其他好文 时间:
2014-04-29 13:42:21
阅读次数:
427
有一个需要,给定一个数组,从中生成要求个数的随机数组,不重复,即getRandomArray(int[] originalArray,int number) 这样的一个函数。想了一下,可以这样做:
把数组元素放到一个List中从List中随机取一个数把取到的数从List中删除重复上述过程
代码如下:
import java.util.ArrayList;
import java.ut...
分类:
其他好文 时间:
2014-04-29 13:41:20
阅读次数:
295
JsonTools
package com.example.weather_json.tools;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import co...
分类:
Web程序 时间:
2014-04-29 13:37:21
阅读次数:
1039
exfat文件格式是唯一一个在OSX、win7和ubuntu系统下都能使用的文件格式,其能被osx和win7原生支持,并且支持4G以上的文件,但是ubuntu由于版权问题没法直接支持exfat,所以当插入该格式移动硬盘的时候会提示无法挂载,此时可以通过如下方法解决:
sudo add-apt-repository ppa:relan/exfat
加入新的PPA
s...
分类:
移动开发 时间:
2014-04-29 13:37:21
阅读次数:
425
环境:ubuntu14.04
1.打开 https://launchpad.net/~jon-severinsson/+archive/ffmpeg 这个网址。选择你的系统版本(ubuntu 14.04)
2.将源添加到/etc/apt/sources.list
3.更新源
sudo apt-get update
4.安装ffmpeg
sudo apt-...
分类:
其他好文 时间:
2014-04-29 13:35:21
阅读次数:
428
使用函数操作链表
1:计算链表中结点的个数:定义一个Length_list()函数用于计算链表中结点的个数
函数代码:
//计算链表中结点的个数
void Length_list(PNODE pHead)
{
PNODE p = pHead->pNext;
int len = 0;
while(NULL != p)
{
len++;
p = p->pNext;
...
分类:
其他好文 时间:
2014-04-29 13:28:21
阅读次数:
302
Build Tree View Structure for SharePoint List Data
将SharePoint中的数据树状显示...
分类:
其他好文 时间:
2014-04-29 13:26:20
阅读次数:
361
1、
??
Reorder List
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2...
分类:
其他好文 时间:
2014-04-29 13:16:21
阅读次数:
250
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
思路同十进制的大数相加。代码如下:
class Solution {
public:
string addBinary(string a, str...
分类:
其他好文 时间:
2014-04-29 13:12:20
阅读次数:
328