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 hello(ctx *web.Context) { | |
err := templates.ExecuteTemplate(ctx.ResponseWriter, "index.html", "no needed data") | |
if err != nil { | |
panic(err.Error()) | |
} | |
} | |
func main() { | |
web.Get("/", hello) | |
web.Run("0.0.0.0:9990") |
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 ( | |
// native packages | |
"net/http" | |
// third packages | |
"github.com/gorilla/mux" // for router | |
) |
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
鼠须管配置信息 |
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
# 適用於【鼠鬚管】0.9.13+ | |
# 位置:~/Library/Rime/squirrel.custom.yaml | |
# 用法:想要哪項生效,就刪去該行行首的#字符,但注意保留用於縮進的空格 | |
patch: | |
# us_keyboard_layout: true # 鍵盤選項:應用美式鍵盤佈局 | |
# show_notifications_when: growl_is_running # 狀態通知,默認裝有Growl時顯示,也可設爲全開(always)全關(never) | |
# style/horizontal: true # 候選窗横向顯示 | |
# style/font_face: "儷黑 Pro" # 我喜歡的字體名稱 | |
# style/font_point: 21 # 字號 |
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
<script src="lib/jquery/jquery.js"></script> | |
<script src="lib/bootstrap/bootstrap.js"></script> | |
<!-- Button --> | |
<button class="btn btn-default" data-toggle="modal" data-target="#AddSection">添加部门</button> | |
<!-- Modal --> | |
<div class="modal fade" id="AddSection" role="dialog" aria-labelledby="AddSection" aria-hidden="true"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> |
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, Check all the Checkbox! |
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
/** | |
* batchLog service allows for messages to be queued in memory and flushed | |
* to the console.log every 50 seconds. | |
* | |
* @param {*} message Message to be logged. | |
*/ | |
function batchLogModule([$provide](http://docs.angularjs.org/api/AUTO.$provide)){ | |
$provide.factory('batchLog', ['$timeout', '$log', function($timeout, $log) { | |
var messageQueue = []; |
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
function myModuleCfgFn($provide) { | |
var myServiceFactory = function(dep1, dep2) {}; | |
myServiceFactory.$inject = ['dep1', 'dep2']; | |
$provide.factory('myService', myServiceFactory); | |
} |
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
Angular Service Dependence |
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
AngularJS Service Register |
OlderNewer