This file contains hidden or 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
var type = /(canvas|webgl)/.test(url.type) ? url.type : 'svg'; | |
var two = new Two({ | |
type: Two.Types[type], | |
fullscreen: true | |
}).appendTo(document.body); | |
var mass = 100; | |
var radius = two.height / 5; | |
var strength = 0.0625; | |
var drag = 0.0; |
This file contains hidden or 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
$ cp -r web web.bak | |
cp: cannot open `web1/wp-content/img.php' for reading: Permission denied | |
cp: cannot open `web1/wp-content/plugins/mos.php' for reading: Permission denied | |
cp: cannot open `web1/wp-content/plugins/csv.php' for reading: Permission denied | |
cp: cannot open `web1/wp-content/plugins/wp-multibyte-patch/languages/wp-multibyte-patch-ja.php' for reading: Permission denied | |
cp: cannot open `web1/wp-content/plugins/wp-multibyte-patch/js/jquery.Jcrop.php' for reading: Permission denied | |
cp: cannot open `web1/wp-content/ws1.php' for reading: Permission denied | |
cp: cannot open `web1/wp-content/modul.php' for reading: Permission denied | |
cp: cannot open `web1/wp-content/themes/source/wp-rss.php' for reading: Permission denied | |
cp: cannot access `web1/wp-content/themes/source/img/cache': Permission denied |
This file contains hidden or 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
function RubberBallShape(radius, world) { | |
b2CircleShape.call(this, radius); | |
this.RADIUS = radius; | |
this.DIFF_THRESHOLD_TO_ROUND = this.RADIUS * 0.02; | |
this.IMPULSE_THRESHOLD_TO_STOP_UPDATING = 20; | |
} | |
RubberBallShape.prototype = Object.create(b2CircleShape.prototype); |
This file contains hidden or 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
function RubberBallShape(radius, world) { | |
b2CircleShape.call(this, radius); | |
this.RADIUS = radius; | |
this.DIFF_THRESHOLD_TO_ROUND = this.RADIUS * 0.02; | |
this.IMPULSE_THRESHOLD_TO_STOP_UPDATING = 20; | |
} | |
RubberBallShape.prototype = Object.create(b2CircleShape.prototype); |
This file contains hidden or 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
<!-- | |
* highlight.js | |
--> | |
<link rel="stylesheet" href="https://googledrive.com/host/0B-jdnZOJbr7XUkgybU1zYUs0dG8/tomorrow.css" /> | |
<script src="http://yandex.st/highlightjs/8.0/highlight.min.js"></script> | |
<style type='text/css'> | |
/* | |
pre { |
This file contains hidden or 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
Tatsuya Suzuki | Emi Ito | Bruno Barroso | Mattew Day | Maxim Dokhlov | Mehmet Bagbekleyen | Alex Yixnitsky | Stuart Gardner | Derrick May | ||
---|---|---|---|---|---|---|---|---|---|---|
Tatsuya Suzuki | 0 | 50 | 19 | 10 | 9 | 11 | 15 | 2 | 0 | |
Emi Ito | 0 | 0 | 2 | 3 | 3 | 2 | 1 | 2 | 1 | |
Bruno Barroso | 0 | 0 | 0 | 4 | 3 | 17 | 1 | 2 | 1 | |
Mattew Day | 0 | 0 | 0 | 0 | 4 | 5 | 1 | 2 | 1 | |
Maxim Dokhlov | 0 | 0 | 0 | 0 | 0 | 4 | 1 | 2 | 1 | |
Mehmet Bagbekleyen | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 1 | |
Alex Yixnitsky | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | |
Stuart Gardner | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | |
Derrick May | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
This file contains hidden or 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 java.util.*; | |
// Size of display | |
int DISPLAY_WIDTH = 500; | |
int DISPLAY_HEIGHT = 500; | |
// Colours | |
int BLACK = 0; | |
int WHITE = 255; | |
int CENTER_X = 0; |
This file contains hidden or 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 java.util.*; | |
Fibonacci fibonacci; | |
float unitAngle; | |
float unitFibonacciAngle; | |
int NUM_POINTS = 90; | |
float NUM_DISTANCE_FROM_APEX = 1; | |
class Fibonacci { |
This file contains hidden or 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
// Size of display | |
int DISPLAY_WIDTH = 500; | |
int DISPLAY_HEIGHT = 500; | |
// Colours | |
int BLACK = 0; | |
int WHITE = 255; | |
int CENTER_X = 0; | |
int CENTER_Y = 0; | |
This file contains hidden or 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
class Website < ActiveRecord::Base | |
has_and_belongs_to_many :categories, after_add: :increment_categories_counter_cache, after_remove: :decrement_categories_counter_cache | |
private | |
def increment_categories_counter_cache(category) | |
Category.increment_counter(:websites_count, category.id ) | |
end | |
def decrement_categories_counter_cache(category) |