#如何成为黑客 How To Become A Hacker
Eric Steven Raymond, Thyrsus Enterprises, < [email protected] >
翻译:柯非, < [email protected] >
这篇译文基于2014.05.20更新的原文修订版1.47。
<project> | |
<taskdef resource="simiantask.properties" classpath="simian.jar"/> | |
<target name="simian_obj_c"> | |
<simian> | |
<fileset dir="./" includes="**/*.m"/> | |
<fileset dir="./" includes="**/*.h"/> | |
<formatter type="xml" toFile="simian.xml"/> | |
</simian> | |
</target> | |
</project> |
typedef struct { | |
int x, | |
int y, | |
int width, | |
int height | |
} rect; | |
static int count = 1; | |
void spiltAndMerge(rect rec){ | |
if(count >= 272) return ; |
private class Rect{ | |
public int x,y,width,height; | |
public Rect(int _x,int _y,int _width,int _height){ | |
x=_x;y=_y;width=_width;height=_height; | |
} | |
} | |
private LinkedList<Rect> queue; | |
private boolean isMoving; | |
private boolean isInc; | |
public void setup(){ |
namespace :image_compression do | |
desc 'Optimize images with optipng and jpegoptim' | |
task :process do | |
# Check for optipng | |
if (!`which optipng`.empty? rescue false) # rescue on environments without `which` (windows) | |
# Crush all .png files inplace | |
run "find #{shared_path}/assets/ -type f -name '*.png' -print0 | xargs -0 optipng -quiet -o7 " | |
else |
#如何成为黑客 How To Become A Hacker
Eric Steven Raymond, Thyrsus Enterprises, < [email protected] >
翻译:柯非, < [email protected] >
这篇译文基于2014.05.20更新的原文修订版1.47。
# Git pre-commit hook to check all staged Ruby (*.rb/haml/coffee) files | |
# for Pry binding references | |
# | |
# Installation | |
# | |
# ln -s /path/to/pre-commit.sh /path/to/project/.git/hooks/pre-commit | |
# | |
# Based on | |
# | |
# http://codeinthehole.com/writing/tips-for-using-a-git-pre-commit-hook/ |
//: Playground - noun: a place where people can play | |
import UIKit | |
class Foo { | |
class ArrayWrapper{ | |
var array:[Bool] = [false] | |
subscript(index: Int) ->Bool { | |
get{ | |
return array[index] |
Building the standard library for: swift-stdlib-macosx-x86_64 | |
cmark: using standard linker | |
++ cmake_config_opt cmark | |
++ product=cmark | |
++ [[ Ninja == \X\c\o\d\e ]] | |
+ /usr/local/bin/cmake --build /Users/johnlinvc/Projs/swift-core-2/build/Ninja-DebugAssert/cmark-macosx-x86_64 -- -j8 all | |
ninja: no work to do. | |
llvm: using standard linker | |
++ cmake_config_opt llvm |
require 'rack' | |
app = Proc.new do |env| | |
['200', {'Content-Type' => 'text/html'}, | |
["hello #{env['rack.input'].read}"]] | |
end | |
Rack::Handler::WEBrick.run app |
/* | |
Web Server | |
A simple web server that shows the value of the analog input pins. | |
using an Arduino Wiznet Ethernet shield. | |
Circuit: | |
* Ethernet shield attached to pins 10, 11, 12, 13 | |
* Analog inputs attached to pins A0 through A5 (optional) |