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
def largest_key(d): | |
k = None | |
largest = 0 | |
for i in d: | |
if d[i] > largest: | |
largest = d[i] | |
k = i | |
return k |
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
diff -r 4895c1fdf540 build-cmd.sh | |
--- a/build-cmd.sh Wed Nov 30 13:46:33 2011 -0500 | |
+++ b/build-cmd.sh Wed Apr 25 14:52:52 2012 -0400 | |
@@ -47,6 +47,9 @@ | |
make install | |
mkdir -p "$stage/lib/release" | |
mv "$stage/lib/"{*.a,*.dylib,*.alias} "$stage/lib/release" | |
+ pushd "$stage/lib/release" | |
+ fix_dylib_id libhunspell-1.3.0.dylib | |
+ popd |
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 "ai.h" | |
ai::ai(tictactoe &game, tictactoe::player_t player) : m_game(game), m_player(player) { } | |
void ai::move() { | |
// All of these methods return true on success, thus the pile of ifs. | |
if(try_win()) return; | |
if(try_block()) return; | |
if(try_fork()) return; | |
if(try_block_fork()) return; |
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> | |
struct foo { | |
char s[4]; | |
int i; | |
}; | |
int main() { | |
struct foo f; | |
f.i = 10; |
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
diff -r 39932e2ec204 indra/newview/exonotificationmanager.cpp | |
--- a/indra/newview/exonotificationmanager.cpp Fri Aug 03 07:52:38 2012 -0400 | |
+++ b/indra/newview/exonotificationmanager.cpp Sat Aug 04 00:00:13 2012 -0400 | |
@@ -39,6 +39,8 @@ | |
// Platform-specific includes | |
#ifdef LL_DARWIN | |
#include "exonotifiermacosx.h" | |
+#elif LL_LINUX | |
+#include "exonotifierlinux.h" | |
#endif |
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 "pebble_os.h" | |
#include "pebble_app.h" | |
#include "pebble_fonts.h" | |
#include "http.h" | |
#include "itoa.h" | |
#define COUNTER_COOKIE 1 | |
PBL_APP_INFO_SIMPLE(HTTP_UUID, "Counter Demo", "Demo Corp", 1 /* App version */); | |
Window window; |
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 "pebble_os.h" | |
#include "pebble_app.h" | |
#include "pebble_fonts.h" | |
#include "http.h" | |
PBL_APP_INFO_SIMPLE(HTTP_UUID, "HTTP Demo", "Demo Corp", 1 /* App version */); | |
Window window; | |
TextLayer textLayer; |
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 "pebble_os.h" | |
#include "pebble_app.h" | |
#include "pebble_fonts.h" | |
#define MY_UUID { 0xFC, 0xF3, 0xC3, 0xF1, 0xBC, 0xE4, 0x48, 0x3D, 0x92, 0x48, 0x79, 0x97, 0xAC, 0xC7, 0x2F, 0x7F } | |
PBL_APP_INFO_SIMPLE(MY_UUID, "Text Rendering Error", "Demo Corp", 1 /* App version */); | |
Window window; |
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 "pebble_os.h" | |
#include "pebble_app.h" | |
#include "pebble_fonts.h" | |
#define MY_UUID { 0xF7, 0x58, 0xEF, 0x93, 0x27, 0xBB, 0x4F, 0x0E, 0x93, 0x9A, 0x8F, 0x6A, 0xF1, 0x6F, 0x0A, 0x63 } | |
PBL_APP_INFO(MY_UUID, | |
"Animation Crash", "Your Company", | |
1, 0, /* App version */ | |
DEFAULT_MENU_ICON, |
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
Setting top to : /tmp/tmpj7gnmZ | |
Setting out to : /tmp/tmpj7gnmZ/build | |
Checking for program gcc,cc : arm-none-eabi-gcc | |
Checking for program ar : arm-none-eabi-ar | |
Found Pebble SDK in : /home/vagrant/sdk2/Pebble | |
'configure' finished successfully (0.030s) | |
Waf: Entering directory `/tmp/tmpj7gnmZ/build' | |
Traceback (most recent call last): | |
File "/home/vagrant/sdk2/Pebble/.waf-1.7.11-e248e7c2ab5100c227e21b0fb258ca96/waflib/Scripting.py", line 97, in waf_entry_point | |
run_commands() |