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 USE_BC = true // Set this to false if you don't have bc library. | |
var one = (USE_BC)? require("bc").number(1) : 1 | |
var IN = 1 | |
var OUT = 2 | |
// Insert board to state. | |
// If the board is already present just increase the board counter. | |
function insertBoard(state, board, boardCount) { | |
if (state[board] == null) { |
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
#define FILE_ATTRIBUTE_DIRECTORY 0x00000010 | |
bool GetPlatformFileInfo(PlatformFile file, PlatformFileInfo* info) { | |
... | |
info->is_directory = | |
(file_info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 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
info->is_directory = | |
file_info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY != 0; | |
info->is_directory = | |
file_info.dwFileAttributes & (0x00000010 != 0); | |
info->is_directory = | |
file_info.dwFileAttributes & (true); | |
info->is_directory = |
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
#define FILE_ATTRIBUTE_DIRECTORY 0x00000010 | |
bool GetPlatformFileInfo(PlatformFile file, PlatformFileInfo* info) { | |
... | |
info->is_directory = | |
file_info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY != 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> | |
#include <time.h> | |
int main() { | |
int i; | |
unsigned int q = 0xbabecafe; | |
// Get start time | |
clock_t tm = clock(); |
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 USE_BC = true // Set this to false if you don't have bc library. | |
var one = (USE_BC)? require("bc").number(1) : 1 | |
var IN = 1 | |
var OUT = 2 | |
// Insert board to state. | |
// If the board is already present just increase the board counter. | |
// Board data is stored as: [boardCount, boardArray] | |
function insertBoard(state, boardArray, boardCount) { |
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
For me, the purpose of life is, at least partly, to have joy. | |
Programmers often feel joy when they can concentrate on the creative | |
side of programming, So Ruby is designed to make programmers happy. | |
Ruby inherited the Perl philosophy of having more than one way | |
to do the same thing. I inherited that philosophy from Larry Wall, | |
who is my hero actually. I want to make Ruby users free. I want to | |
give them the freedom to choose. People are different. People choose | |
different criteria. But if there is a better way among many | |
alternatives, I want to encourage that way by making it comfortable. | |
So that's what I've tried to do. |
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
Fxr nb, ekb dmrdxjb xf upfb pj, ie ubije direuo, ex kizb txo. | |
Drxlrinnbrj xfeby fbbu txo akby ekbo qiy qxyqbyerieb xy ekb qrbiepzb | |
jpwb xf drxlrinnpyl, Jx Rmho pj wbjplybw ex nigb drxlrinnbrj kiddo. | |
Rmho pykbrpebw ekb Dbru dkpuxjxdko xf kizpyl nxrb ekiy xyb aio | |
ex wx ekb jinb ekpyl. P pykbrpebw ekie dkpuxjxdko frxn Uirro Aiuu, | |
akx pj no kbrx iqemiuuo. P aiye ex nigb Rmho mjbrj frbb. P aiye ex | |
lpzb ekbn ekb frbbwxn ex qkxxjb. Dbxdub irb wpffbrbye. Dbxdub qkxxjb | |
wpffbrbye qrpebrpi. Hme pf ekbrb pj i hbeebr aio inxyl niyo | |
iuebryiepzbj, P aiye ex byqxmrilb ekie aio ho nigpyl pe qxnfxreihub. | |
Jx ekie'j akie P'zb erpbw ex wx. |
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
// The text to decipher. It was created using a substitution cipher | |
var text = "Fxr nb, ekb dmrdxjb xf upfb pj, ie ubije direuo, ex kizb txo.\n" | |
+ "Drxlrinnbrj xfeby fbbu txo akby ekbo qiy qxyqbyerieb xy ekb qrbiepzb\n" | |
+ "jpwb xf drxlrinnpyl, Jx Rmho pj wbjplybw ex nigb drxlrinnbrj kiddo.\n" | |
+ "Rmho pykbrpebw ekb Dbru dkpuxjxdko xf kizpyl nxrb ekiy xyb aio\n" | |
+ "ex wx ekb jinb ekpyl. P pykbrpebw ekie dkpuxjxdko frxn Uirro Aiuu,\n" | |
+ "akx pj no kbrx iqemiuuo. P aiye ex nigb Rmho mjbrj frbb. P aiye ex\n" | |
+ "lpzb ekbn ekb frbbwxn ex qkxxjb. Dbxdub irb wpffbrbye. Dbxdub qkxxjb\n" | |
+ "wpffbrbye qrpebrpi. Hme pf ekbrb pj i hbeebr aio inxyl niyo\n" | |
+ "iuebryiepzbj, P aiye ex byqxmrilb ekie aio ho nigpyl pe qxnfxreihub.\n" |
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
-- The text to decipher. It was created using a substitution cipher | |
local text = [[ | |
Fxr nb, ekb dmrdxjb xf upfb pj, ie ubije direuo, ex kizb txo. | |
Drxlrinnbrj xfeby fbbu txo akby ekbo qiy qxyqbyerieb xy ekb qrbiepzb | |
jpwb xf drxlrinnpyl, Jx Rmho pj wbjplybw ex nigb drxlrinnbrj kiddo. | |
Rmho pykbrpebw ekb Dbru dkpuxjxdko xf kizpyl nxrb ekiy xyb aio | |
ex wx ekb jinb ekpyl. P pykbrpebw ekie dkpuxjxdko frxn Uirro Aiuu, | |
akx pj no kbrx iqemiuuo. P aiye ex nigb Rmho mjbrj frbb. P aiye ex | |
lpzb ekbn ekb frbbwxn ex qkxxjb. Dbxdub irb wpffbrbye. Dbxdub qkxxjb |