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 voluptuous | |
import yaml | |
schema = voluptuous.Schema({ | |
voluptuous.Required("name"): str, | |
"sex": voluptuous.Any("Male", "Female", "N/A"), | |
"class": str, | |
"title": str, | |
"hp": [int], |
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
ConVarRef dota_workshoptools_limited_ui doesn't point to an existing ConVar | |
Did not detect any valid joysticks. | |
Using AudioQueue Interface | |
Wave sound initialized | |
Trying cache : '/Users/joehakimrahme/Library/Application Support/Steam/SteamApps/common/dota 2 beta/dota/sound/sound.cache' | |
m_mapGameModeDetails contains 0 items | |
Loaded default backpack filters. | |
Restarting sound playback | |
[SteamDatagramClient] Got network config from CDN. Loaded revision 9 OK | |
In logon queue; waiting for GC to confirm connection. |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
int main(int argc, char** argv){ | |
fork(); | |
/* The function getpid() returns the PID of the current process */ | |
fprintf(stdout, "I'm a process, my PID is: %d", getpid()); | |
return EXIT_SUCCESS; |
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 <stdio.h> | |
#include <stdlib.h> | |
int main (int argc, char** argv){ | |
fork(); | |
fprintf(stdout, "Hello World"); | |
return EXIT_SUCCESS; | |
} |
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
function eat(food) | |
print ("I eat " .. food) | |
end | |
function drink(food) | |
print ("I drink " .. food) | |
end | |
function swallow (food) | |
func = {[true] = eat, |
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
--[[ | |
print("hello world") | |
--]] | |
-- By adding a single hypen at the beginning of the top line, you effectively uncomment the whole block: | |
---[[ | |
print("hello world") | |
--]] |
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
t1 = { a=1, b="hello" } | |
print (t1["a"]) -- outputs "1" | |
t2 = { [1<4] = "foo", [1<10] = "bar" } | |
print (t2[true]) -- outputs "bar" |
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
t3 = {1, 4, 5, 2, 31} | |
print (t3[3]) -- will output "5" | |
t4 = {a = "foo", b = 3} | |
print (t4.a) -- will output "foo" | |
print (t4.b) -- will output "3" |
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
abs = function(x) | |
test = { | |
[true]=-x, | |
[x>0]=x, | |
[x==0]=0} | |
return test[true] | |
end | |
print (abs(-3)) -- outputs "3" |
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 <stdio.h> | |
#define TABSTP 4 | |
/* TODO: read this string from argv, | |
to test different scenarios */ | |
char* input_str = "Something to test it"; | |
int nexttbstp (int position); | |
int printblank(int start, int end); |
OlderNewer