This file contains hidden or 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
#-*- coding: UTF-8 -*- | |
import sublime, sublime_plugin | |
import os | |
import os.path | |
#写入模板,如果是新模板按照模板名创建一个文件,如果是旧模板则覆盖写原文件 | |
class CodeTplAddCommand(sublime_plugin.TextCommand): | |
def run(self,edit): | |
#获取当前选中内容 | |
selstr = '' |
This file contains hidden or 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 utils | |
/* | |
Golang使用Oracle连接目前只能通过oci8提供的开放接口, | |
通过测试,连接在并发routines执行下会出现问题,为解决此类问题,目前通过设置池中单连接来解决 | |
*/ | |
/** | |
* conf/app.conf | |
* oracle.dsn=unamne/upwd@ename(or ip):1521/ename?autocommit=true&charset=utf8 |
This file contains hidden or 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 utils | |
import ( | |
"database/sql" | |
_ "github.com/go-sql-driver/mysql" | |
"strconv" | |
) | |
/** | |
* conf/app.conf |
This file contains hidden or 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 utils | |
import ( | |
"fmt" | |
"github.com/cihub/seelog" | |
) | |
var Logger seelog.LoggerInterface | |
func loadConfig() { |
This file contains hidden or 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 utils | |
import ( | |
"fmt" | |
"github.com/astaxie/beego" | |
"github.com/cihub/seelog" | |
) | |
var Logger seelog.LoggerInterface |
This file contains hidden or 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 models | |
import ( | |
"/*{progect-name}*//utils" | |
) | |
/** | |
* struct | |
*/ | |
type Struct struct{ |
This file contains hidden or 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
#test | |
func test(){ | |
} |
This file contains hidden or 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
#-*- coding: UTF-8 -*- | |
''' | |
Created on 2013-12-5 | |
@author: good-temper | |
''' | |
import urllib2 | |
import bs4 | |
import time |
This file contains hidden or 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 com.gj.split; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.HashSet; |
This file contains hidden or 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 com.gj.trie; | |
/** | |
* 标准trie查找树,该实现仅能进行英文单词查找 | |
* @author guojing | |
* | |
* 2013-8-1 | |
*/ | |
public class StandardTrie { |