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
!!! 5 | |
%html{ :lang => "en"} | |
%head | |
%title= "Your Website" | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
%meta{ :content => "", :name => "description" } | |
%meta{ :content => "", :name => "author" } | |
%meta{ :content => "3 days", :name => "revisit-after" } | |
%link{ :href => "http://creativecommons.org/licenses/by/3.0/", :rel => "license", :title => "Creative Commons Attribution 3.0 Unported License" } | |
%link{ :href => "/feed", :rel => "alternate", :title => "Atom", :type => "application/atom+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
zh-CN: | |
errors: | |
messages: | |
expired: "您已过期,请重新申请" | |
not_found: "没有找到" | |
already_confirmed: "已经确认" | |
not_locked: "未锁定" | |
not_saved: | |
one: "因为1个错误导致此%{resource}保存失败:" | |
other: "因为%{count}个错误导致此%{resource}保存失败:" |
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
#-*- coding:utf-8 -*- | |
import Queue | |
from contextlib import contextmanager | |
class ObjectPool(object): | |
"""A simple object pool with thread safe""" | |
def __init__(self,objectFn,*args,**kwargs): | |
super(ObjectPool, self).__init__() | |
self.objectFn = objectFn | |
self.objectCls = None |
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
def out = new org.codehaus.groovy.grails.web.pages.FastStringWriter() | |
def test1Instance = new Test1(prop2: "This is gsp test") | |
long startTime = System.currentTimeMillis() | |
def t=groovyPagesTemplateEngine.createTemplate(gspTemplateCode, 'gspTemplate') | |
for (int i = 0; i < TIMES; i++) { | |
t.make([test1Instance: test1Instance]).writeTo(out) | |
out.flush() | |
println "Executing... $i" | |
} | |
response.setContentType("text/json;charset=UTF-8") |
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 App = Em.Application.create(); | |
App.ApplicationController = Em.Controller.extend(); | |
App.ApplicationView = Em.View.extend({ templateName: 'application' }); | |
App.HomeController = Em.Controller.extend(); | |
App.HomeView = Em.View.extend({ templateName: 'home' }); | |
App.AuthController = Em.Controller.extend({ |
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
import ttk | |
import Tkinter as tk | |
def insert_message(columns, (user,message,time), messageid): | |
for col, var in zip(columns, (user,message,time) ): | |
col.insert("", "end", "", values=(var,), tags=(messageid)) |
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
. | |
├── deploy.py | |
├── project | |
│ ├── application.py | |
│ ├── apps | |
│ │ ├── articles | |
│ │ │ ├── forms.py | |
│ │ │ ├── __init__.py | |
│ │ │ ├── models.py | |
│ │ │ └── views.py |