介紹協助提昇 F2E Code Style 的兩個工具。
josephj@faria
-- http://stackoverflow.com/questions/1124603/grouped-limit-in-postgresql-show-the-first-n-rows-for-each-group | |
-- http://www.postgresql.jp/document/9.2/html/tutorial-window.html | |
CREATE TABLE empsalary ( | |
depname varchar(10) not null | |
, empno integer not null | |
, salary integer not null | |
); | |
INSERT INTO empsalary (depname, empno, salary) VALUES ('develop', 11, 5200); |
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
minify: { | |
nofiles: {}, | |
manual: { | |
files: [ | |
// Why specify all src-dest mappings manually... | |
{src: 'lib/grunt.js', dest: 'build/grunt.min.js'}, |
<script src="/scripts/require.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
requirejs.config({ | |
paths: { | |
'jquery': 'jquery-1.9.1.min', | |
'jquery.mobile': 'jquery.mobile-1.3.0.min' | |
}, | |
shim: { | |
'jquery.mobile': ['jquery', 'jquery.mobile-config'] | |
} |
-- phpMyAdmin SQL Dump | |
-- version 2.10.3 | |
-- http://www.phpmyadmin.net | |
-- | |
-- 主機: localhost | |
-- 建立日期: Mar 12, 2013, 03:16 PM | |
-- 伺服器版本: 5.0.51 | |
-- PHP 版本: 5.2.6 | |
import email | |
def get_decoded_email_body(message_body): | |
""" Decode email body. | |
Detect character set if the header is not set. | |
We try to get text/plain, but if there is not one then fallback to text/html. | |
:param message_body: Raw 7-bit message body input e.g. from imaplib. Double encoded in quoted-printable and latin-1 |
# | |
# A CORS (Cross-Origin Resouce Sharing) config for nginx | |
# | |
# == Purpose | |
# | |
# This nginx configuration enables CORS requests in the following way: | |
# - enables CORS just for origins on a whitelist specified by a regular expression | |
# - CORS preflight request (OPTIONS) are responded immediately | |
# - Access-Control-Allow-Credentials=true for GET and POST requests |
$ = jQuery | |
TRANSFORM_TYPES = ['PUT', 'POST', 'DELETE'] | |
$.activeTransforms = 0 | |
$(document).ajaxSend (e, xhr, settings) -> | |
return unless settings.type in TRANSFORM_TYPES | |
$.activeTransforms += 1 |
介紹協助提昇 F2E Code Style 的兩個工具。
josephj@faria
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"log" | |
"mime/multipart" | |
"net/http" | |
"os" |