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
'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
<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
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
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
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 |
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
#!/bin/bash | |
# Perform installation as root | |
# Install prereqs | |
yum -y install libcurl libcurl-devel rrdtool rrdtool-devel rrdtool-prel libgcrypt-devel gcc make gcc-c++ | |
# Get Collectd, untar it, make it and install | |
wget http://collectd.org/files/collectd-5.4.0.tar.gz | |
tar zxvf collectd-5.4.0.tar.gz |
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
object Application { | |
def main(args: Array[String]) : Unit = SpringApplication.run(classOf[ApplicationConfig], args :_ *) | |
} |
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
package samples | |
import org.junit.runner.RunWith | |
import org.scalatest.junit.JUnitRunner | |
import org.scalatest._ | |
import org.springframework.beans.factory.annotation.Autowired | |
import org.springframework.context.annotation._ | |
import org.springframework.stereotype.Service | |
import org.springframework.test.context.support.AnnotationConfigContextLoader | |
import org.springframework.test.context.{ActiveProfiles, ContextConfiguration, TestContextManager} |
OlderNewer