Senior Software Developer with 18+ years of programming experience - 7 years in C/C++, delivering on-time, on-budget multimedia services; 5 years of experience in Java, PHP, JS, HTML5, and 6+ years in Golang, Python and Objective-C. Website: https://blog.gametechtutorial.com
Personal Project
Thursday, January 28, 2016
How to update 200K json documents in Couchbase ?
Using MYSQL to update a huge amount of data seems like a difficult task.
However, NoSQL databse Couchbase can make it as easy as possible.
Check the following sample codes in Java.
https://github.com/gcoolmaneric/couchbase
Sunday, October 13, 2013
PROTOCOLS
In Objective C, an object cannot inherit from multiple superclasses, yet it can conform to
multiple protocols. If you need a GameCenterManageDelegate to be inherited by many Views, you can define as shown below.
GameCenterManagerDelegate.h
@protocol GameCenterManagerDelegate <NSObject>
GameCenterManagerDelegate.h
@protocol GameCenterManagerDelegate <NSObject>
@optional
- (void) processGameCenterAuth: (NSError*) error;
@end
GameCenterManagerDelegate.m
@implementation GameCenterManager
// ...
@end
GameViewController.h
@interface GameViewController : ViewController <GameCenterManagerDelegate>
@end
How do CATEGORIES EXTEND CLASSES ?
Categories are an elegant way to extend any Objective C class without changing original codes. Take a peek at StoreKit framework for example, you can extend SKProduct.h in StoreKit framework as shown below.
SKProduct+ priceWithString.h
#import <Foundation/Foundation.h>
#import <StoreKit/StoreKit.h>
@interface SKProduct (priceWithString) // priceAsString : category name
@property (nonatomic, readonly) NSString *priceAsString; // Extended property
-(void) printPrice; // Extended function
@end
SKProduct+ priceWithString.m
#import "SKProduct+priceAsString.h"
@implementation SKProduct (priceAsString)
- (NSString *) priceAsString
{
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
[formatter setLocale:[self priceLocale]];
NSString *str = [formatter stringFromNumber:[self price]];
[formatter release];
return str;
}
-(void) printPrice { // Extended function
}
@end
Rules to avoid retain cycles
1. Child view cannot retain parent”s view property.
2. Child view uses weak property pointing to parents.
3. Remove subview → release or close all relationship related to parents.
Good Answer
ref:
http://www.cocoawithlove.com/2009/07/rules-to-avoid-retain-cycles.html
Why do you write "assign" in a property declaration on an Objective-C class ?
1. assign / unsafe_unretained (no memory management shall be done with this property, it is handled manually by the person assigning the value) (default if not ARC or object type).
2. Assign is used for C primitive property to replace a variable with new values.
Property :
- nonatomic (does not enforce thread safety on the property, mainly for use when only one thread shall be used throughout a program)
- atomic (enforces thread safety on the property, mainly for use when multiple threads shall be used throughout a program) (default)
- retain / strong (automatically retains / releases values on set, makes sure values do not deallocate unexpectedly) (default if ARC and object type)
- readonly (cannot set property)
- readwrite (can both set and get property) (default)
- assign / unsafe_unretained (no memory management shall be done with this property, it is handled manually by the person assigning the value) (default if not ARC or object type)
- copy (copies the object before setting it, in cases where the value set must not change due to external factors (strings, arrays, etc).
- weak (automatically zeroes the reference should the object be deallocated, and does not retain the value passed in)
Good ref:
http://rdcworld-iphone.blogspot.in/2012/12/variable-property-attributes-or.html
Friday, October 4, 2013
How to solve iOS 7 status bar overlapping problem ?
Although there are lots of solutions to this problem on the internet, this is the most easiest way to make it work.
Solution: Add the following codes in your View Controller.m
-(BOOL) prefersStatusBarHidden
{
return YES;
}
iOS 7 status bar overlaps background image as shown below.
Wednesday, September 19, 2012
Personal Project
App Name: Video Baby Monitor- Monitor your baby from anywhere
- Developed front end in Objective-C and back end in Java and C/C++.
- Technology : XMPP, WebRTC, RTP, MYSQL, REST
- Platform: iPhone
- Published date: 2015.12.21
- Feature :
- Live Two-Way Video and Audio Streaming
- Noise Alerts && Push Notifications between Multiple devices.
- Easy to use.
- No registration required
App Name: Fish Ink
- Developed a casual game with 2D physics animations by Corona SDK in Lua language.
-Technology : Lua, IOS, Android, Simple AI
- Platform: iPhone, Android
- Published date: 2012.5.7
- Blog Demo: http://fish-ink.blogspot.com
- Video Demo:
App Name: Viia Slot Machine
- Developed a slot machine with facebook features in Objective-C.
- Developed server`s API in PHP to start game competition monthly.
- Technology : Objective-C, PHP, MYSQL, REST
- Platform: iPhone
- Published date: 2014.6.15
App Name: MyZone Lite
- Feature: A social app with sending text, voice message, and image features.
- Search information and GPS function.
- O2O function to receive offline message.
- Developed a XMPP messenger in Objective-C language.
- Developed and setup XMPP servers in JAVA with Push Notification feature.
- Technology : Objective-C, Java, XMPP, PHP, MYSQL, REST
- Platform: iPhone
- Published date: 2013.05.30
Send Text, Voice and Image Messages to your friends
Search nearby restaurants with GPS.
Shake your phone to find nearby events or restaurants.
Publish event information.
App Name: iMagic Fire
- Developed fire animations with voice, touch, and shake interactions by XCode in Object-C language.
- Technology : Objective-C
- Platform: iPhone
- Published date: 2010.2.19
Network Protocol Development
Developed a simple SIP API interface (MySIPStack) in C/C++ for Web Client(.NET), so as Web client can customize and control different SIP call flows.
Feature:
1. Create a conference room2. Add Party to conference
3. Delete Party to conference
4. Third Party Call Control(3PCC)( rfc3725)
5. Send SIP INFO message
6. Send SIP Cancel message
E-Commerce Web Development
Developed Cosmetic e-commerce website in PHP and MYSQL.
Feature:
1. Product management system
2. Member management system
3. Order management system
4. Shopping Car
Research : People Counting System development for Multiple Cameras with Overlapped Field of View
The counting of pedestrian flow provides useful information for managers in stores
or shopping malls for making more potential incomes from customers. Using a
single camera pointing to the ground from the ceiling to monitor the entrance is
commonly used for people counting. But when the size of entrance is larger than the
coverage range of a single camera, multiple cameras with overlapped field of view
are required. However, when pedestrian passes through the overlapped region, both
cameras will count it, which will cause double counting problem.
Solution:
- Developed people counting system in C/C++, including detector, tracker, and counter.
- Created and Implemented people counting error rate correction algorithm to solve
double counting problem.
People Counting System Architecture:
People Detector system flow:
Experiment environment:
Image Processing Screen:
The following images show that when pedestrian passes through the overlapped region.
Conclusion:
The experimental results showed that with the proposed method, the error rate of people counting in overlapped area is significantly reduced. We also study the effect of low frame rate and the experimental results showed that at 6 frame/sec we can still have acceptable accuracy at 80%.
Game History Project
PC Browser Game
1.Homerun heroes- PC Browser Game
- Game server and API development for Mobage platform.
- Youtube Video
- PC Browser Game
- Game server and API development for Mobage platform.
- Youtube Video
Social Game
3. Baseball- Social card game development on Gree and Mobage.
- Social card game development on Gree and Mobage.
5. Volleyball
- Social card game development on Gree and Mobage.
Native Game
6. Wonderland- Native iOS Puzzle Game
- Client SDK and Game server and API development.
7. Runrun
- Native iOS / Android Puzzle Game
- Client SDK and Game server and API development.
8. Mystery Journal
- Native iOS Game
- Promotion UI and backend system development
9. MMO Game for Native iOS / Android.
- Login and Payment SDK development
- CMS and KPI development.
Subscribe to:
Posts (Atom)