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 main | |
import ( | |
"fmt" | |
"log" | |
"gopkg.in/yaml.v2" | |
) | |
type Config struct { |
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
$ easygen test/commandlineFlag | |
package easygenapi | |
import ( | |
"flag" | |
"fmt" | |
"os" | |
) | |
//////////////////////////////////////////////////////////////////////////// |
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
// !!! !!! | |
// WARNING: Code automatically generated. Editing discouraged. | |
// !!! !!! | |
package main | |
import ( | |
"flag" | |
"fmt" | |
"os" |
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
$ ffcvt | |
Usage: | |
ffcvt [flags] | |
Flags: | |
-aes audio encoding method set (FFCVT_AES) | |
-ves video encoding method set (FFCVT_VES) | |
-aea audio encoding method append (FFCVT_AEA) |
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
<html> | |
<head> | |
<title></title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> | |
<script type="text/javascript" defer="defer"> | |
function cascadeSelect(parent, child){ | |
var childOptions = child.find('option:not(.static)'); | |
child.data('options',childOptions); | |
parent.change(function(){ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// strings.go | |
// Credit: http://www.cnblogs.com/golove/p/3236300.html | |
------------------------------------------------------------ | |
// Count 计算字符串 sep 在 s 中的非重叠个数 | |
// 如果 sep 为空字符串,则返回 s 中的字符(非字节)个数 + 1 | |
// 使用 Rabin-Karp 算法实现 | |
func Count(s, sep string) int |
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
func getReqAddons(r Request) string { | |
ret := "" | |
if len(r.RequestPlugins.RequestPlugin) != 0 { | |
for _, v := range r.RequestPlugins.RequestPlugin { | |
ret += fmt.Sprintf(" R: (%s) %s\n", v.Name, minify(v.RuleParameters.Xml)) | |
} | |
} | |
if len(r.ExtractionRules.ExtractionRule) != 0 { | |
for _, v := range r.ExtractionRules.ExtractionRule { | |
ret += fmt.Sprintf(" E: (%s: %s) %s\n", v.Name, v.VariableName, minify(v.RuleParameters.Xml)) |
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
func getReqAddons(r Request) string { | |
var buf bytes.Buffer | |
if len(r.RequestPlugins.RequestPlugin) != 0 { | |
for _, v := range r.RequestPlugins.RequestPlugin { | |
fmt.Fprintf(&buf, " R: (%s) %s\n", v.Name, | |
minify(v.RuleParameters.Xml)) | |
} | |
} | |
if len(r.ExtractionRules.ExtractionRule) != 0 { | |
for _, v := range r.ExtractionRules.ExtractionRule { |
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
//////////////////////////////////////////////////////////////////////////// | |
// Porgram: OdbcDemo | |
// Purpose: Go MSSQL odbc demo, using the code.google.com/p/odbc driver | |
// Authors: Tong Sun (c) 2013, All rights reserved | |
//////////////////////////////////////////////////////////////////////////// | |
// Style: gofmt -tabs=false -tabwidth=2 -w | |
package main |