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
(defn + | |
"Returns the sum of nums. (+) returns 0. Does not auto-promote | |
longs, will throw on overflow. See also: +'" | |
{:inline (nary-inline 'add 'unchecked_add) | |
:inline-arities >1? | |
:added "1.2"} | |
([] 0) | |
([x] (cast Number x)) | |
([x y] (. clojure.lang.Numbers (add x y))) | |
([x y & more] |
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
(ns key-test | |
(:import (java.awt.event KeyAdapter) | |
(javax.swing JFrame JPanel))) | |
(defn key-listener [] |
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
// PWM DIR BRE | |
int motors[4][3] = {{3, A0, A1}, //RF | |
{5, A2, A3}, //LF | |
{6, A4, A5}, //LR | |
{9, 4, 7}}; //RR |
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
(let [w (search-world 640 480 | |
[(vector-2d 100 100) 30] | |
[(vector-2d 200 200) 30] | |
[(vector-2d 300 200) 30] | |
[(vector-2d 400 300) 30] | |
[(vector-2d 280 350) 30] | |
[(vector-2d 250 200) 30])] | |
(defn print-a-star-test-table [] | |
(print-table |
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
#include <pthread.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
const int NUM_THREADS = 5; | |
pthread_mutex_t mutex; | |
int evil_global = 0; | |
void inc_evil_global(){ |
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
Desktop/ $ for ((n=0;n<10;n++)); do ./a.out; echo "------"; done | |
B | |
A | |
E | |
C | |
F | |
------ | |
B | |
A | |
E |
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
#include <sys/wait.h> | |
#include <assert.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <string.h> | |
int main(int argc, char *argv[]){ | |
//write end [1] read end [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
ABCDEFGH012345 |
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
./fgfs.sh --timeofday=morning --aircraft=c172p-2dpanel --shading-flat --disable-textures --geometry=640x480 --fog-disable --disable-horizon-effect --disable-clouds --generic=socket,out,40,localhost,6666,udp,output-protocol --generic=socket,in,45,127.0.0.1,6789,udp,input-protocol |
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
[{:type :sequence, :name "Root"} [{:type :sequence, :name "Get Input"} [{:function "greeter.core/get-input!", :type :action, :name "Read input"}]] [{:type :selector, :name "How to Act on Input"} [{:type :sequence, :name "Greeting"} [{:function "greeter.core/is-greeting?", :type :action, :name "Is Greeting?"}] [{:function "greeter.core/already-greeted?", :type :action, :name "Not Already Greeted?"}] [{:function "greeter.core/send-greeting", :type :action, :name "Send Greeting"}]] [{:type :selector, :name "Question"} [{:type :sequence, :name "How are we feeling?"} [{:function "greeter.core/is-feeling?", :type :action, :name "feeling question?"}] [{:function "greeter.core/send-feeling-answer", :type :action, :name "Really Happy!"}]] [{:type :sequence, :name "What can we do?"} [{:function "greeter.core/is-abilities?", :type :action, :name "abilities question?"}] [{:function "greeter.core/send-abilities-answer", :type :action, :name "Absolutely Nothing!"}]]]]] |
NewerOlder