Friday, March 29, 2013

Apple iOS UDID Replacement - UUID,vendor,advertising id

Apple forbid all new / updated app of iphone to use UDID from May 1st, 2013.
There are some replacements : CFUUID/NSUUID, Vendor ID or Advertising ID.


 
Scope
Lifetime end
Available
UUID
Application
Uninstall app
iOS 2
Vendor ID
Development Team
Uninstall all apps of the development team
iOS 6
Advertising ID
Device
Wipe device
iOS 6



Thursday, March 28, 2013

Titanium TableView row count


How to get the number of rows in tableview with Titanium?
TableView default has one section. "table.data" is the section array.
If you don't create section, your rows are in "section 0".
Get the row count by

table.data[0].rows.length;

or

table.data[0].rowCount;


Tuesday, January 08, 2013

Galaxy Note 2 screen specifications, size, density, aspect

Samsung Galaxy Note I/II screen specifications
--situee's blog

It's important to know the specification the device classifies itself for Android developers.

Galaxy Note 1 calculated ppi is 285; density is xhdpi.
After the ICS update, the device classification changed to "large" and "not long".

Galaxy Note 2 calculated ppi is 267; density is xhdpi.




Resolution
 Size
Density
Aspect
Galaxy Note 2.3
1280x800
Large
xhdpi
Not Long *
Galaxy Note 4.x
1280x800
Normal
xhdpi
Not long
Galaxy Note II
1280x720
Normal
xhdpi
Long


Sunday, December 09, 2012

在Mac导入goagent根证书,解决证书无效警告问题

在上文 mac上安装和使用goagent翻墙,解决找不到event.h问题
安装好goagent,可以使用chrome代理上网。
但一些网站会出现证书无效警告的问题,无法正常访问。例如twitter, github。
需要安装goagent的根证书。

本文地址 http://situee.blogspot.com/2012/12/macgoagent.html


双击 GoAgent/local 目录下的 CA.crt 证书导入到系统
在 钥匙串访问 中找到 GoAgent CA 并双击
(可以在右上角的搜索框输入goagent快速找到)
选择 信任 > 使用此证书时 > 总是信任



最后,重启浏览器。

Monday, December 03, 2012

mac上安装和使用goagent翻墙,解决找不到event.h问题




在mac上安装和使用goagent翻墙
关于申请google app engine的教程很多,我就不再写了。

在这申请https://appengine.google.com/


本文地址http://situee.blogspot.com/2012/12/macgoagenteventh.html

找不到gevent怎么办

当上传即 python uploader.zip时,可能出现
ImportError: No module named gevent;
官方说在shell命令执行如下语句(注意需要安装 gcc 或 xcode): curl -k -L http://git.io/I9B7RQ|sh

但是我试过不行,报以下权限问题,加了sudo也不行.

error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
    [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-41204.write-test'


Tuesday, September 04, 2012

iOS Objective-C performSelector static method


It's tested OK to use the following static method calls.
Tested on Xcode Version 4.4.1 (4F1003), Apple LLVM Compiler 4.0
    [[StaticMethodClass classperformSelectorInBackground:@selector(runInThreadMethod)withObject:nil];
    [StaticMethodClass performSelectorInBackground:@selector(runInThreadMethod)withObject:nil];
    [StaticMethodClass performSelectorOnMainThread:@selector(runInThreadMethod)withObject:nil waitUntilDone:NO];
    [StaticMethodClass performSelector:@selector(runInThreadMethod) withObject:nil];
Although, there is no auto-code-completion, but it runs fine.
But when use "target", it's NOT ok to use the Class itself, should use "[StaticMethodClass class]" as the target. like.
 [NSTimer scheduledTimerWithTimeInterval:1.0 target:[StaticMethodClass classselector:@selector(runInThreadMethod) userInfo:nil repeats:NO];

Monday, September 03, 2012

iOS Objective-C schedule NSTimer with static method target

Usually we schedule NSTimer like:


    [NSTimer scheduledTimerWithTimeInterval:2.0
             target:instance
             selector:@selector(targetMethod)
             userInfo:nil
             repeats:YES];

targetMethod is an instance method of the instance.

What if we want to schedule to run a static method (or class method) of a class?
Just replace the "instance" with "[ClassA class]".


    [NSTimer scheduledTimerWithTimeInterval:2.0
             target:[ClassA class]
             selector:@selector(staticMethod)
             userInfo:nil
             repeats: YES];

"staticMethod" is a static method of ClassA.
"[ClassA class]" is the target object.


Wednesday, August 22, 2012

Eclipse CDT Launch failed Binary not found

(1)Build before Run
You must build before run, otherwise there would be no binary to run.
But you can set up auto build, so that you can build and run by one click.

(2)If you are moving projects to another platform
Select the correct tool chain in C/C++ Build > Tool Chain editor
Select the correct binary parser in C/C++ Build->Settings->Binary Parsers
Set up a correct build configuration in C/C++ Build > Manage Configurations

(3)Another case is "supporting Mach-O 64 Parser"...

Friday, August 17, 2012

How to set Eclipse CDT Auto Build

How to set Eclipse CDT Auto Build?
First, Situee choose auto build at Eclipse menu, but it doesn't work.
When run, still "Launch failed. Binary not found."

Go to Project properties > C/C++ Build > Behavior > Workbench build type

Import Eclipse CDT project from Windows to Mac

I built a Eclipse CDT project on Windows. Then want to work on Mac, too.
But it's quite difficult to migrate to Mac.
Try to run, and "Launch failed.Binary not found."

1. Change the "Binary Parser"