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
[user] | |
name = Pavan Kumar Sunkara | |
email = pavan.sss1991@gmail.com | |
[core] | |
editor = vim | |
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
excludesfile = ~/.gitignore | |
[sendemail] | |
smtpencryption = tls | |
smtpserver = smtp.gmail.com |
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
#import <Foundation/Foundation.h> | |
// clang -g -Wall -fobjc-arc -framework Foundation -o serial serial.m | |
static id makePlistObjects (void) { | |
NSMutableDictionary *top = [NSMutableDictionary dictionary]; | |
[top setObject: @"Hi I'm a string" forKey: @"string"]; | |
[top setObject: [NSNumber numberWithInt: 23] forKey: @"number"]; |
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
# Simple: | |
# a --> b | |
# --> c --> d | |
# --> d | |
graph1 = { | |
"a": ["b", "c", "d"], | |
"b": [], | |
"c": ["d"], | |
"d": [] | |
} |
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
pictures under cc0: http://skuawk.com/?fr |
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
- (void)setPeriodicTask{ | |
[NSTimer scheduledTimerWithTimeInterval:5 | |
target:self | |
selector:@selector(updateStatusToServer:) | |
userInfo:nil | |
repeats:YES]; | |
} | |
- (void)updateStatusToServer:(NSTimer *)timer{ |
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
- (void)setPeriodicTask{ | |
[NSTimer scheduledTimerWithTimeInterval:5 | |
target:self | |
selector:@selector(ontick:) | |
userInfo:nil | |
repeats:YES]; | |
} | |
- (void)ontick:(NSTimer *)timer{ |
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
- (void)setupCircleView{ | |
CGFloat circleView_width = ScreenWidth * 3/10.0; | |
CGRect circleViewRect = CGRectMake(0.0f, 0.0f, circleView_width, circleView_width); | |
self.circleView.bounds = circleViewRect; | |
self.circleView.backgroundColor = LightBlue; | |
self.circleView.layer.cornerRadius = circleView_width/2.0; | |
self.circleView.layer.position = CGPointMake(ScreenWidth/2.0, 100.0f); | |
} | |
- (void)addCircleAnimation { |
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
- (void)addAnimationsToLayers | |
{ | |
NSInteger timeOffset = 10; | |
for (CALayer *layer in self.view.layer.sublayers) { | |
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"strokeColor"]; | |
animation.duration = 10.0f; | |
// Stagger the animations so they don't begin until the | |
// desired time in each | |
animation.timeOffset = timeOffset--; |
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
import threading | |
# Based on tornado.ioloop.IOLoop.instance() approach. | |
# See https://github.com/facebook/tornado | |
class SingletonMixin(object): | |
__singleton_lock = threading.Lock() | |
__singleton_instance = None | |
@classmethod |
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
// | |
// MapViewController.h | |
// MapsCustomInfoWindow | |
// | |
// Created by Jon Friskics on 4/22/14. | |
// Copyright (c) 2014 Jon Friskics. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
NewerOlder