php complexity.php filename
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
% brew install rbenv | |
Warning: rbenv-0.4.0 already installed | |
/Users/atsushi/prog/coursera/ex3-003/mlclass-ex3% brew install octave [master atsushi:~/prog/coursera/ex3-003/mlclass-ex3] | |
==> Installing dependencies for octave: gnu-sed, texinfo, fftw, readline, tbb, suite-sparse, glpk, libtool, jpeg, libpng, freetype, graphicsmagick, szip, hdf5, pcre, cmake, qhull, gmp, mpfr, | |
==> Installing octave dependency: gnu-sed | |
==> Downloading http://ftpmirror.gnu.org/sed/sed-4.2.2.tar.bz2 | |
######################################################################## 100.0% | |
==> ./configure --prefix=/usr/local/Cellar/gnu-sed/4.2.2 --program-prefix=g | |
==> make install | |
==> Caveats |
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
曲線フィッティング | |
オリジナル | |
http://jsfiddle.net/yBHac/1/ | |
とりあえずJSをJSペインに分割 | |
http://jsfiddle.net/SM2Kz/ |
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
<?php | |
class ClosureCompraisonTest extends PHPUnit_Framework_TestCase | |
{ | |
// passes. WTF??? | |
public function test_assertEquals() | |
{ | |
$f1 = function () { return 1; }; | |
$f2 = function () { return 2; }; | |
$this->assertEquals($f1, $f2); |
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
diff --git a/htdocs/source/js/pre-login.js b/htdocs/source/js/pre-login.js | |
index 2835a85..d532175 100644 | |
--- a/htdocs/source/js/pre-login.js | |
+++ b/htdocs/source/js/pre-login.js | |
@@ -183,6 +183,7 @@ var brick = { | |
function loop() { | |
var start_position = position, i = 0, width = 0, height, r = [], w = [], list, item, data, right_margin, target, current_width = 0, top; | |
+ var rsum = 0; | |
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 <Cocoa/Cocoa.h> | |
#include <stdio.h> | |
#include <time.h> | |
#include <dispatch/dispatch.h> | |
#include <curl/curl.h> | |
#define MAXLINE 512 | |
CFMachPortRef eventTap; |
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
/*** | |
P R O C E S S I N G . J S - 1.3.0 | |
a port of the Processing visualization language | |
Processing.js is licensed under the MIT License, see LICENSE. | |
For a list of copyright holders, please refer to AUTHORS. | |
http://processingjs.org |
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
#!/usr/bin/python | |
from PIL import Image | |
from math import sqrt | |
from numpy.fft import rfft | |
from collections import Counter | |
def computeContinuityScore(image, x1, x2): | |
width, height = image.size | |
data = image.getdata() |
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
# CoffeeScript version 1.1.2 | |
# compiles | |
if 'foo' == | |
String.fromCharCode.apply(null, | |
[102, 111, 111]) | |
alert 'foo!!' | |
# doesn't compile | |
if 'foo' == |
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
package extensions; | |
import java.io.BufferedReader; | |
import java.io.ByteArrayInputStream; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.InputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.nio.charset.Charset; |