$django-admin.py startproject web2$cd
web2/$python manage.py startapp blog$vim web2/settings.py
注意settings.py以下两个部分,首先要配置数据库,其次要在INSTALLED_APP里添加刚才新建的...
分类:
移动开发 时间:
2014-06-08 22:18:14
阅读次数:
377
今天看博客时,看到了这样的一段js代码:var bind =
Function.prototype.call.bind(Function.prototype.bind);我想突然看到这样的一段代码,即使js能力再强的人,可能也需要花点时间去理解。像我这样的菜鸟就更不用说了。其实,原文已经对这端代码做...
分类:
移动开发 时间:
2014-06-08 22:10:19
阅读次数:
335
总算A了,心情好激动……如果会了一类斜率优化,基本上这类题就成了套模版了……只是k函数不同 1
var n,l,x,tail,head,m:int64; 2 i,j:longint; 3 dp,q,s:array[0..100000] of int64;
4 function k(x...
分类:
其他好文 时间:
2014-06-08 21:53:27
阅读次数:
247
一、功能代码函数实现 private function _weather($city) {
include("weather_cityId.php"); $c_name=$weather_cityId[$city]; if(!em...
分类:
微信 时间:
2014-06-08 21:05:51
阅读次数:
1484
原题地址:https://oj.leetcode.com/problems/sqrtx/题意:Implementint
sqrt(int x).Compute and return the square root
ofx.解题思路:实现开平方函数。这里要注意的一点是返回的时一个整数。通过这一点我们可...
分类:
编程语言 时间:
2014-06-08 21:04:38
阅读次数:
329
原题地址:https://oj.leetcode.com/problems/search-for-a-range/题意:Given
a sorted array of integers, find the starting and ending position of a given
target ...
分类:
编程语言 时间:
2014-06-08 21:03:21
阅读次数:
297
一、功能代码函数实现 /* *
功能5:根据歌名点歌功能,输入歌名即可,传入参数为输入对象$postObj */ private function _listenMusic($postObj)
{ $ret= " ...
分类:
微信 时间:
2014-06-08 20:59:11
阅读次数:
684
原题地址:https://oj.leetcode.com/problems/sort-colors/题意:Given
an array withnobjects colored red, white or blue, sort them so that objects of
the same col...
分类:
编程语言 时间:
2014-06-08 20:56:32
阅读次数:
394
一、功能代码函数实现 private function _baiduDic($keyword)
{ $tranurlaip =
"http://openapi.baidu.com/public/2.0/bmt/translate?client_id=9peNkh97N6B...
分类:
微信 时间:
2014-06-08 18:39:59
阅读次数:
560
大水题……不过通过这题我们应该养成一个好习惯:好好看清题……竟然没有看到时限 10sec…… 1
var i,j,n,m,ans:longint; 2 f,time,x,y:array[0..15000] of longint; 3 function
max(x,y:longint):lon...
分类:
其他好文 时间:
2014-06-08 18:38:49
阅读次数:
261