This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.将字符串的时间转换为时间戳 | |
方法: | |
a = "2013-10-10 23:40:00" | |
将其转换为时间数组 | |
import time | |
timeArray = time.strptime(a, "%Y-%m-%d %H:%M:%S") | |
转换为时间戳: | |
timeStamp = int(time.mktime(timeArray)) | |
timeStamp == 1381419600 | |
2.字符串格式更改 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install exuberant-ctags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[base(this, '${1:method}'${2});${0}]]></content> | |
<tabTrigger>base</tabTrigger> | |
<scope>source.js</scope> | |
<description>Base method call</description> | |
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var | |
LIVERELOAD_PORT = 35729, | |
lrSnippet = require('connect-livereload')({ port: LIVERELOAD_PORT }), | |
mountFolder = function( connect, dir ) { | |
return connect.static(require('path').resolve(dir)); | |
}; | |
module.exports = function( grunt ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Login={}; | |
Login=(function(){ | |
var LOGIN_URL="/user/account/login"; | |
return{ | |
init:function(){ | |
}, | |
bindEvents:function(){ | |
$(".login-bt").click(function(){ | |
var loginName=$(".loginName").val(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Login={}; | |
Login=(function(){ | |
var LOGIN_URL="/user/account/login"; | |
return{ | |
init:function(){ | |
}, | |
bindEvents:function(){ | |
$(".login-bt").click(function(){ | |
var loginName=$(".loginName").val(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txt | |
sudo mv add-apt-repository.sh.txt /usr/sbin/add-apt-repository | |
sudo chmod o+x /usr/sbin/add-apt-repository | |
sudo chown root:root /usr/sbin/add-apt-repository | |
sudo add-apt-repository ppa:webupd8team/sublime-text-2 |
NewerOlder