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
| int total = 100; | |
| int range = 10; | |
| int player = 50; | |
| void setup() { | |
| size(640, 480); | |
| frameRate(5); | |
| } | |
| void draw() { | |
| background(200); |
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 game = window.open('http://jenniferdewalt.com/window_sizer/game'); | |
| game.onload = function() { | |
| game.$('#start').click(); | |
| setInterval(function() { | |
| game.resizeTo(game.$('#target_area').width(), game.$('#target_area').height() + 50) // 50px for title bar + address bar | |
| }, 50); | |
| } |
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 gifAnimation.*; | |
| PFont font; | |
| GifMaker gifExport; | |
| PImage[] frames; | |
| PImage img; | |
| void setup() { | |
| gifExport = new GifMaker(this, "export.gif"); | |
| gifExport.setRepeat(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
| #include<stdio.h> | |
| int main(int argc, char *argv[]) { | |
| int _ = -1, b = -1; | |
| return -_-b; | |
| } |
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
| PGraphics pg; | |
| Net net; | |
| ArrayList<TrainingPair> trainingSet; | |
| void setup(){ | |
| size(512, 512); | |
| pg = createGraphics(width, height); | |
| net = new Net(2, 3, 1, 0.5, 0.9); |
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
| PGraphics pg; | |
| Net net; | |
| ArrayList<TrainingPair> trainingSet; | |
| void setup(){ | |
| size(512, 512); | |
| pg = createGraphics(width, 512); | |
| net = new Net(24, 12, 5, 0.5, 0.9); |
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 Point | |
| { | |
| int x,y; | |
| Point(int x, int y) | |
| { | |
| this.x = x; | |
| this.y = y; | |
| } | |
| }; |
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
| /**//**//**//**//**//**//* | |
| ** ================================================================================================== | |
| ** 类名:J.gbk | |
| ** 版本:1.0 | |
| ** 功能:URLEncode,URLDecode | |
| ** 示例: | |
| --------------------------------------------------------------------------------------------------- | |
| 用法:参见组件地址 | |
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
| if ( preg_match('/<!--more(.*?)?-->/', $post, $matches) ) { | |
| list($main, $extended) = explode($matches[0], $post, 2); | |
| $more_text = $matches[1]; | |
| } else { | |
| $main = $post; | |
| $extended = ''; | |
| $more_text = ''; | |
| } |
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
| int count = 10; | |
| int minVel = 3; | |
| int maxVel = 4; | |
| class Point { | |
| PVector pos, vel; | |
| Point(float x, float y) { | |
| pos = new PVector(x, y); | |
| updateVel(); | |
| } |