Skip to content

Instantly share code, notes, and snippets.

View donly's full-sized avatar
🎯
Focusing

Tung donly

🎯
Focusing
View GitHub Profile
- (IBAction)startOneOffTimer:sender {
[NSTimer scheduledTimerWithTimeInterval:2.0
target:self
selector:@selector(targetMethod:)
userInfo:[self userInfo]
@donly
donly / gist:1367070
Created November 15, 2011 13:28 — forked from wwhhjj/gist:1366956
再次提醒注意代码书写风格!
#include <stdio.h>
int main (int argc, const char * argv[]) {
int a, b, i, t;
scanf("%d%d", &a, &b);
if (a < b) {
t = a;
@donly
donly / good.c
Created October 26, 2011 08:50 — forked from wwhhjj/gist:1315802
注意代码风格!
#include<stdio.h>
int main(void)
{
float a,r1,r2,m;
char b,c;
printf("请输入加油量,汽油类型(a,b,c)以及服务类型(f,m,e)\n");
printf("***************************************************\n");
printf("请输入:");
#include<stdio.h>
#include<windows.h>
#include<malloc.h>
int main(void)
{
int c;
int i;
int j;
nihao:
@donly
donly / gist:1294543
Created October 18, 2011 03:28
代码风格示范
// 设置标题背景图
[functionButton setBackgroundImage:(i == 0 ? firestImageNormal : othersImageNormal)
forState:UIControlStateNormal];
[functionButton setBackgroundImage:(i == 0 ? firestImageHighlighted : othersImageHighlighted)
forState:UIControlStateHighlighted];
// 未完