如果你使用的是 Fedora,
Red Hat, CentOS, 或者 Scientific Linux 系统,使用下面的命令安装GNU的C/C++开发包和编译器。
# yum groupinstall 'Development Tools'
如果你使用的是Debian
或者 UbuntuLinux系统,你可以使用下面的这个命令来安装C/C++编译器。
#sudo ...
分类:
编程语言 时间:
2014-06-07 01:56:20
阅读次数:
302
Wrote by mutouyun. (http://darkc.at/cxx-type-list/)
群里有个朋友要实现这么一个功能:如何在编译期把一个函数类型的参数减少一个。
简单来说,就是实现下面这个模板:
remove_func_par::type; // type = void(int, long)
根据输入的编译期整数,把函数参数表里对应的参数干掉一个。
为了实现...
分类:
编程语言 时间:
2014-06-05 06:04:09
阅读次数:
273
【题目】
Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice?
For example,
Given sorted array A = [1,1,1,2,2,3],
Your function should return length = 5, and A is now [1,1,2,2,3].
【题意】
给定一个有序数组,给数组去重,和Remove Duplicates from...
分类:
其他好文 时间:
2014-06-03 05:36:24
阅读次数:
219
jQuery - 添加元素
append() - 在被选元素的结尾插入内容
prepend() - 在被选元素的开头插入内容
after() - 在被选元素之后插入内容
before() - 在被选元素之前插入内容
这四个方法有什么区别呢。。。
jQuery - 删除元素
remove() - 删除被选元素(及其子元素)
empty() - 从被选元素中删除子元素...
分类:
编程语言 时间:
2014-06-03 04:58:37
阅读次数:
366
【题目】
Given a sorted linked list, delete all duplicates such that each element appear only once.
For example,
Given 1->1->2, return 1->2.
Given 1->1->2->3->3, return 1->2->3.
【题意】
给定一个已排序的链表,删除其中的重复元素
【思路】
维护两个指针prev和cur, cur指针负责扫描链表,prev指向cur的前一...
分类:
其他好文 时间:
2014-06-03 04:05:39
阅读次数:
231
【题目】原文:1.3 Design an algorithm and write code
to remove the duplicate characters in a string without using any additional
buffer. NOTE: One or two add...
分类:
其他好文 时间:
2014-06-02 21:32:04
阅读次数:
284
yum-yinstallsamba/etc/init.d/smbstart(servicesmbstart)chkconfig--level35smbontestparm/etc/samba/smb.conf#检测配置文件配置文件:/etc/samba/smb.confStandaloneServerOptions密码设置:smbpasswd-a用户createmodedirectorymode
分类:
系统相关 时间:
2014-06-01 16:30:35
阅读次数:
293
Remove ElementGiven an array and a value,
remove all instances of that value in place and return the new length.The order
of elements can be changed. ...
分类:
其他好文 时间:
2014-06-01 12:29:11
阅读次数:
190
【题目】
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
For example,
Given 1->2->3->3->4->4->5, return 1->2->5.
Given 1->1->1->2->3, return 2->3.
【题意】
给定一个有序链表,删出其中重复出现的值...
分类:
其他好文 时间:
2014-05-31 21:14:11
阅读次数:
333
yum命令升级的时候,报出这个错误。There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named yum
Please install a package which provides t...
分类:
编程语言 时间:
2014-05-31 17:42:52
阅读次数:
453