利用JavaScriptSerializer 序列化json
时间格式,得到的DateTime值值显示为“/Date(700000+0500)/”形式的JSON字符串,显然要进行转换1.利用字符串直接替换Model m =
new Model { Id = 1, Dt = DateTime.Now ...
分类:
编程语言 时间:
2014-06-16 08:32:22
阅读次数:
217
原题地址:https://oj.leetcode.com/problems/unique-paths-ii/题意:Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many ...
分类:
编程语言 时间:
2014-06-15 23:33:26
阅读次数:
353
1.accumulate的用法:int sum = accumulate(ivec.begin(), ivec.end(), 0 );第三个参数时累加的初值,更重要的是accumulate对要累加元素的类型一无所知,所以容器内的类型要与第三个实参的类型匹配,或者可转换成第三个实参的类型。2.find...
分类:
其他好文 时间:
2014-06-15 22:42:19
阅读次数:
285
排个序,求前k个元素和即可 int minimum(int K, vector danceCost) { sort(danceCost.begin(),danceCost.end()); return accumulate(danceCost.begin()...
分类:
其他好文 时间:
2014-06-15 21:53:14
阅读次数:
201
从大到小遍历一遍,每次取M个元素,然后求得最小的floor即可 int minimum(int M, vector heights) { sort(heights.begin(),heights.end()); int minFloor = 10000; ...
分类:
其他好文 时间:
2014-06-15 21:48:45
阅读次数:
229
好久没写记录东西了,最近决定记录写ruby方面的东西,大家一起学习。ruby 基础语法1、注释单行注释 ##开始到行末是单行注释多行注释 =begin =end多行注释以=begin开始 以=end结束,=begin和=end前不能有其他字符,包括空格。一般=begin 和 =end独占一行,这样看起来比较清晰。Ruby中用;来表示一个语句结束。如果一行有多个语句,每个语句可以用;隔开,最后一个;...
分类:
其他好文 时间:
2014-06-15 19:35:59
阅读次数:
237
The main way to achive AOP is deploying a xml file。
Now a xml file is presented to be a explanation .
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/...
分类:
其他好文 时间:
2014-06-15 18:35:16
阅读次数:
233
1.知识点:可以对照下面的录屏进行阅读
PL/SQL程序结构
declare
说明部分 (变量说明,光标申明,例外说明 〕
begin
语句序列 (DML语句〕…
exception
例外处理语句
End;
/
----------------------------------------------------------------...
分类:
数据库 时间:
2014-06-14 00:30:36
阅读次数:
372
取得当前时间用 now() 就行。在数据库中格式化时间 用DATE_FORMA T(date,
format) .根据格式串format 格式化日期或日期和时间值date,返回结果串。 可用DATE_FORMAT( ) 来格式化DATE 或DATETIME
值,以便得到所希望的格式。根据forma....
分类:
数据库 时间:
2014-06-13 18:26:32
阅读次数:
338
简单字符串。 1 #include 2 3 #define MAXLEN 160 4 5 char
buf[MAXLEN]; 6 int keys[4], parts[4]; 7 8 void getpart(int x) { 9 int i;10 for
(i=3; i>=...
分类:
其他好文 时间:
2014-06-13 15:10:31
阅读次数:
242