没得事就爬一下我喜欢的海贼王上的图片
需要在d盘下建立一个imgcache文件夹
# -*- coding: utf-8 -*-
import urllib
import urllib2
import json
from bs4 import BeautifulSoup
import threadpool
import thread
class htmlpaser:
de...
分类:
编程语言 时间:
2014-06-29 07:15:05
阅读次数:
304
LigerUi-js中ajax前台调用后台Json格式转换!(已解决)
success: function (data, status)
{
var aaa = JSON2.stringify(data);
alert(aaa );
}...
分类:
Web程序 时间:
2014-06-20 12:17:23
阅读次数:
972
Swift 是一种兼顾了编译语言的效率和脚本语言的简洁的一种语言。
让我惊讶的是居然支持汉字作为变量的名称,而且还有模板的支持。
其他总的来讲它本身不具有特别与别人不同的东西,很多东西在其他的语言上已经都有了比较成熟的体现,比如JS中的var, python的dict, list, go的多返回值,看起来像是一个大杂烩,很像当年iphone刚刚面世的时候的场景,它所具有的功能,其他的手机基本上...
分类:
移动开发 时间:
2014-06-20 09:15:07
阅读次数:
331
先上用来生成Tree的JSON数据 [ { "id": "Root", "name":
"资源目录" }, { "id": "PF", "name": "批发价格", "parent": "Root" }, { "id": "PF93",
"name": "93#", "parent": "
分类:
其他好文 时间:
2014-06-13 13:49:33
阅读次数:
442
一个是如何创建JSON:var obj = {};
obj['name'] = value;
obj['anotherName'] = anotherValue;如果要创建多级的JSON,则:ips[ipId] = {};
ips[ipId]['name'] = value;
ips[ipId]['anotherName'] = anotherValue;注意要用bracket[]而不能用点. 来...
分类:
编程语言 时间:
2014-06-07 14:00:06
阅读次数:
210
题目
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.
For example, given
s = "leetcode",
dict =...
分类:
其他好文 时间:
2014-06-07 13:53:28
阅读次数:
247
1.刚接到不久的工作任务,其中包含一个解析json数组,然后让解析后的数据显示在用zrender画出来的矩形上。效果如下所示(注:没有实际意义)2.至于zrender等空闲了一定写上使用心得,东西很强大。3.中间有一项是算计相邻的两个时间的时间差(所有这些时间都是在一个数组里),如图所示,算计相邻两...
分类:
Web程序 时间:
2014-06-07 09:35:59
阅读次数:
358
方法一:程序集:System.Web.Extensions;命名空间:System.Web.Script.Serialization;最重要的类:JavaScriptSerializer//实例化JavaScriptSerializer
js = new JavaScriptSerializer()...
分类:
Web程序 时间:
2014-06-07 08:58:46
阅读次数:
313
json.Append(String.Format("{\"total\":{0},\"row\":{1}}",
lineCount, strJSON));直接会报错字符串中包含{或者},则需要用{{ 来代替字符 {,用}} 代替
}如:json.Append(String.Format("{{\"...
分类:
Web程序 时间:
2014-06-07 08:48:42
阅读次数:
921