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" | |
#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" | |
#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
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 <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
#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
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
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
# Because urllib's doesn't like multibyte unicode. | |
def escapeurl(url): | |
safe = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-' | |
output = '' | |
for char in url: | |
if char in safe: | |
output += char | |
else: | |
code = hex(ord(char))[2:] | |
while len(code) > 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
def get_interfaces(fname): | |
interfaces = [] | |
current = [] | |
with open(fname) as f: | |
for line in f: | |
line = line.strip() | |
if line == '!': | |
if current: | |
interfaces.append(current) | |
current = [] |