这是携程(深圳).net开发笔试的一道题目,要求实现字符串按首字母分组并ToDictionary输出,当时没有做出来,后面研究了一下,现在将这道题的几种实现方式记录下来。首先初始化数据源,是一个List对象。如下代码。//数据源
List list = new List ...
分类:
其他好文 时间:
2014-05-22 04:32:32
阅读次数:
236
一、准备工作1.sudo apt-get install python-numpy2.sudo
apt-get install python2.6-dev3.sudo apt-get install libpng12-dev4.sudo apt-get
install libfreetype6-de...
分类:
编程语言 时间:
2014-05-22 04:13:09
阅读次数:
314
--yum install$sudo yum install email--easy
install$sudo easy_install requests boto--python install$ easy_install
requests--apt-get installsudo apt-get...
分类:
系统相关 时间:
2014-05-22 03:54:14
阅读次数:
405
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-05-22 03:53:29
阅读次数:
313
1、定义 public class EntBase:where T: new() { public
List GetListDemo() { var lst = new List(); for (int i = 1; i...
分类:
其他好文 时间:
2014-05-22 03:35:38
阅读次数:
166
Find the inverse Kth node of a linked list.
分类:
其他好文 时间:
2014-05-22 03:29:46
阅读次数:
247
当你调用这个对象的方法MyObject.method(arg1,
arg2)的时候,这会由Python自动转为MyClass.method(MyObject, arg1,
arg2)——这就是self的原理了。2.__init____init__ 方法名别写错了!__init__ 用来定义变量的se...
分类:
编程语言 时间:
2014-05-22 03:12:56
阅读次数:
266
转自:http://bbs.csdn.net/topics/390451617下载python进行安装,默认自带此工具开始->程序->Python
2.*/3.*-> IDLE (Python GUI)如此就打开了Python Shell->File->New
window(Ctrl+N)就出现了p...
分类:
编程语言 时间:
2014-05-22 03:05:37
阅读次数:
291
mysql 的守护进程是mysqld [root@localhost ~]# service
mysqld start启动 MySQL: 你可以看看你的服务是否已经添加到linux上[root@localhost ~]# chkconfig --list
mysqldmysql...
分类:
数据库 时间:
2014-05-22 02:28:19
阅读次数:
304