| 😄 | 😆 | 😊 | 😃 |
😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷
😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨
#coding:utf-8 | |
''' | |
python图片处理 | |
@author:fc_lamp | |
@blog:http://fc-lamp.blog.163.com/ | |
''' | |
import Image as image | |
#等比例压缩图片 | |
def resizeImg(**args): |
.DS_Store |
| 😄 | 😆 | 😊 | 😃 |
😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷
😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨
if (typeof (AC) === "undefined") { | |
AC = {} | |
} | |
AC.ImageReplacer = Class.create({ | |
_defaultOptions: { | |
listenToSwapView: true, | |
filenameRegex: /(.*)(\.[a-z]{3}($|#.*|\?.*))/i, | |
filenameInsert: "_☃x", | |
ignoreCheck: /(^http:\/\/movies\.apple\.com\/|\/105\/|\/global\/elements\/quicktime\/|_(([2-9]|[1-9][0-9]+)x|nohires)(\.[a-z]{3})($|#.*|\?.*))/i, | |
attribute: "data-hires", |
These benchmarks were done on Windows 7 64 bit, AMD Phenom II X3 720 Process 2.80 GHz, 4 GB RAM
10,000 Objects Created
NodeJs 0.6.13 Finished in: 30ms
PHP 5.4 Finished in: 37ms
Python 3.2.2 Finished in: 70ms
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
.datepicker { | |
background-color: $white; | |
border-color: #999; | |
border-color: rgba(0, 0, 0, 0.2); | |
border-style: solid; | |
border-width: 1px; | |
@include border-radius(4px); | |
@include box-shadow(0 2px 4px rgba(0,0,0,.2)); | |
@include background-clip(padding-box); |
/* =========================================================== | |
* bootstrap-datepicker.js v1.3.0 | |
* http://twitter.github.com/bootstrap/javascript.html#datepicker | |
* =========================================================== | |
* Copyright 2011 Twitter, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* |
(function() { | |
/* | |
* This patch fixes an issue with Y.Get in 3.2.0 & 3.3.0 | |
* where it fails to know when a CSS file is loaded in FF 9+. | |
* Since it fails to know when the load of the CSS file | |
* has completed, it creates a race condition that | |
* forces the scripts to be attached again. | |
*/ |