New life in new year

Posted by on Jan 15, 2012 in Personal | 0 comments

It has been almost two weeks arriving in Australia. Living in almost new environment with unfamiliar language is a big challenge to me and It’s got to be a big stress in some way. Sometimes, I can’t remember and understand why I’ve started this journey. Why didn’t I just stay with my old lovely days.

Whatever’s happened, it’s happened. So, I’ll keep going with this and I’ll update this whenever possible.

Read More

iPhone/iPad icon/launch image size

Posted by on Dec 7, 2011 in Technology | 0 comments

Here are some numbers for the iPhone/iPad icon and launch images.

App icon:
- iPhone up to 3gs : 57 x 57 pixels
- iPhone 4(s) : 114 x 114 pixels
- iPad : 72 x 72 pixels

Spotlight Search & Settings icon:
- iPhone up to 3gs : 29 x 29 pixels
- iPhone 4(s) : 58 x 58 pixels
- iPad (spotlight search) : 50 x 50 pixels
- iPad (settings) : 29 x 29 pixels

Default launch image:
- iPhone up to 3gs : 320 x 480 pixels
- iPhone 4(s) : 640 x 960 pixels
- iPad : 768 x 1004

Read More

How USB assign an address for a new device

Posted by on Oct 4, 2011 in Technology | 0 comments

When you plug a new usb device, it assigns a new address information even though it is the same device and there was no addition in between this unplug and plug operation.

This is because kernel assign a new address each time, it is connected as you can see in below.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 914 static void choose_address(struct usb_device *udev)
 915 {
 916         int             devnum;
 917         struct usb_bus  *bus = udev->bus;
 918 
 919         /* If khubd ever becomes multithreaded, this will need a lock */
 920 
 921         /* Try to allocate the next devnum beginning at bus->devnum_next. */
 922         devnum = find_next_zero_bit(bus->devmap.devicemap, 128,
 923                         bus->devnum_next);
 924         if (devnum >= 128)
 925                 devnum = find_next_zero_bit(bus->devmap.devicemap, 128, 1);
 926 
 927         bus->devnum_next = ( devnum >= 127 ? 1 : devnum + 1);
 928 
 929         if (devnum < 128) {
 930                 set_bit(devnum, bus->devmap.devicemap);
 931                 udev->devnum = devnum;
 932         }
 933 }
 934 
 935 static void release_address(struct usb_device *udev)
 936 {
 937         if (udev->devnum > 0) {
 938                 clear_bit(udev->devnum, udev->bus->devmap.devicemap);
 939                 udev->devnum = -1;
 940         }
 941 }
Read More

Moon Cake

Posted by on Sep 15, 2011 in Personal | 0 comments

It was a thanksgiving day in lunar calendar here. Usually we eat rice cake and having a good time with family. In this time, I also had a chance to eat chinese ‘moon cake’, also called ?? (http://en.wikipedia.org/wiki/Mooncake). I think the price of this moon cake is over tagged. It was good experience, though. :)

P9131336

Read More

It’s a rainy day. I mean, real rain!!!

Posted by on Jul 27, 2011 in Photography | 0 comments

Recently, the weather shows a very unusual pattern here. This summer is almost fully filled with rain. Since yesterday, it becomes worse. Rain is pouring, yeah… pouring literally.

L1004231 2

Street was also covered with flood. People had to walk with bare foot to avoid wetting their shoes.

Read More

Using single-tap and double-tap in the same view

Posted by on Jun 9, 2011 in Technology | 0 comments

If you are going to use two similar gestures in a view, it could cause the problem.
For example, in the following code snippet, I tried to use single tap for changing screen mode while double tap is used to toggle bookmark flag.

1
2
    [self.svContent addGestureRecognizer:toggleFavoriteTap]; 
    [self.svContent addGestureRecognizer:toggleFullScreenTap];

But, there’s one problem with this. When you double tap it, single tap also gets an effect. So, every time, I do the double tap, it also changes the screen mode.

To solve this problem, you can use ‘requireGesutreRecognizerToFail:’ method as shown in below code snippet.

1
2
3
    [self.svContent addGestureRecognizer:toggleFavoriteTap]; 
    [toggleFullScreenTap requireGestureRecognizerToFail:toggleFavoriteTap];
    [self.svContent addGestureRecognizer:toggleFullScreenTap];

It will wait double tap happens or end with single tap. toggleFullScreenTap will not happen until double tap failed and if double tap has succeed, toggleFullScreenTap won’t get any chance to get called.

Read More

Github Client for iPhone is available now.

Posted by on Jun 7, 2011 in Projects | 0 comments

I’m happy to announce that github client for iPhone is on AppStore now. You can download it from here.

With this, you can view several repositories and changes in it. Of course, you can check your own repositories as well.

Read More