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
CC = gcc | |
CFLAGS = -Wall -Werror -fconstant-string-class=NSConstantString -D_NATIVE_OBJC_EXCEPTIONS | |
INCDIR = -I `gnustep-config --variable=GNUSTEP_SYSTEM_HEADERS` | |
LIBDIR = -L `gnustep-config --variable=GNUSTEP_SYSTEM_LIBRARIES` | |
OBJS = helloworld.o | |
LIBS = -lobjc -lgnustep-base | |
.SUFFIXS: .c .cpp .m | |
helloworld: ${OBJS} | |
${CC} ${OBJS} ${LDFLAGS} ${LIBS} -o $@ |
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
{ | |
"pools" : [ | |
{ | |
"url" : "stratum+tcp://hostname:port", | |
"user" : "username", | |
"pass" : "password" | |
} | |
], | |
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
#!/bin/sh | |
export GPU_MAX_ALLOC_PERCENT=100 | |
export GPU_USE_SYNC_OBJECTS=1 | |
./cgminer -c miner.conf |
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
NSData *data = [ @"Happy New Year" dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; | |
NSString * encoded = [[NSString alloc] initWithData:[GTMBase64 encodeData:data] encoding:NSASCIIStringEncoding]; | |
NSLog( @" encoded:%@ " , encoded); | |
NSString * decoded = [[NSString alloc] initWithData:[GTMBase64 decodeString:encoded] encoding:NSASCIIStringEncoding]; | |
NSLog( @" decoded:%@ " , decoded); |
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 <UIKit/UIKit.h> | |
@interface HelloWorldViewController : UIViewController <UITextFieldDelegate> | |
@property (copy, nonatomic) NSString *userName; | |
@end |
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 <Foundation/Foundation.h> | |
int main(void) | |
{ | |
NSLog(@"Hello, World!"); | |
return 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
import time | |
def timeusage(func): | |
def call(*args, **kwargs): | |
start = time.clock() | |
print func(*args, **kwargs) | |
end = time.clock() | |
return "Time costs : %s . " % (end - start ) | |
return call |
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 fab(max): | |
n, a, b = 0, 0, 1 | |
while n < max : | |
yield b | |
a, b = b, a+b | |
n = n+1 | |
for v in fab(5): | |
print(v) |
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
<?php | |
header("Content-Type:text/html; charset=utf-8"); | |
echo "Hollo 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
<?php | |
function showName() | |
{ | |
return 'PHP'; | |
} | |
header("Content-Type:text/html; charset=utf-8"); | |
echo 'The script language is ' . showName() . '!'; | |
?> |
OlderNewer