基础类库:
http://anahkiasen.github.io/underscore-php
图片操作:
/* | |
* Copyright (c) 2010 Tobias Schneider | |
* This script is freely distributable under the terms of the MIT license. | |
*/ | |
(function(){ | |
var UPC_SET = { | |
"3211": '0', | |
"2221": '1', | |
"2122": '2', |
// Please write an sequence list implements the interface with the required | |
// time complexity described in the comments. The users can add the same | |
// element as many times as they want, but it doesn't support the null item. | |
// You can use any types in .NET BCL but cannot use any 3rd party libraries. | |
// PS: You don't need to consider the multi-threaded environment. | |
interface void IMyList<T> : IEnumerable<T> | |
{ | |
// O(1) | |
// Add an item at the beginning of the list. | |
void AddFirst(T item); |
/* Default (OS X).sublime-keymap */ | |
/* Key Bindings - User */ | |
[ | |
{ "keys": ["ctrl+shift+."], "command": "erb", "context": | |
[ | |
{ | |
"key": "selector", | |
"operator": "equal", | |
"operand": "text.html.ruby, text.haml, source.yaml, source.css, source.scss, source.js, source.coffee" | |
} |
[isayme] | |
text(bold)=eaeaea | |
magenta(bold)=ff00ff | |
text=ffffff | |
white(bold)=eaeaea | |
green=00c000 | |
red(bold)=d20000 | |
green(bold)=00ff00 | |
black(bold)=808080 | |
red=c00000 |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
</head> | |
<body> | |
<!-- normally you wouldn't show this --> | |
<div id="paste" contenteditable="true"></div> | |
<script type="text/javascript"> |
/* | |
* email: [email protected] | |
* update: 2013/3/9 | |
*/ | |
;常用快捷命令 | |
:://cmd:: ;打开命令行 | |
Run cmd | |
return |
#!/bin/bash | |
# How to install Graphite as a user on CentOS 5.5 (with neither internet access and root account) | |
# -------------------------------------------------------------------------------- | |
# Tomasz Kalkosiński - refaktor.blogspot.com | |
# | |
# Graphite is a Scalable Realtime Graphing (http://graphite.wikidot.com/) | |
# This script is based on two excellent tutorials: | |
# http://community.webfaction.com/questions/10038/how-to-install-pycairo-in-python27-thanks |
<?php | |
$a = new A(); | |
$reflection = new \ReflectionClass($a); | |
$property = $reflection->getProperty('privateProperty'); | |
$property->setAccessible(true); | |
$property->setValue($a, 'new-value'); | |
echo $a->getPrivateProperty(); | |
//outputs: |