Monday, December 13, 2010

"Pull down to refresh" Table view

http://stackoverflow.com/questions/3535827/is-there-a-interface-builder-esque-way-to-get-that-slick-pull-down-to-refresh-m

http://blog.jcmultimedia.com.au/2010/07/pull-down-refresh.html

https://github.com/enormego/EGOTableViewPullRefresh

http://www.waterworld.com.hk/zh-hant/blog/pull-down-refresh-table-view

http://www.cocoanetics.com/2009/12/how-to-make-a-pull-to-reload-tableview-just-like-tweetie-2/

iphone game tutorial

http://www.71squared.com/2009/03/iphone-game-programming-tutorial-1/

Friday, December 10, 2010

Dec 9, 2010 Objective-C Memory Management For Lazy People

http://interfacelab.com/objective-c-memory-management-for-lazy-people/

Thursday, December 9, 2010

Android vs iOS: A Developer’s Perspective

http://whereoscope.wordpress.com/2010/12/07/android-vs-ios-a-developers-perspective/

Tuesday, December 7, 2010

Nike Targets Women With New Workout App

http://mashable.com/2010/12/06/nike-training-club-iphone/

http://mashable.com/2010/12/06/mobile-app-development-pitfalls/

Monday, December 6, 2010

Sina Weibo api

http://open.t.sina.com.cn/wiki/index.php/API%E6%96%87%E6%A1%A3

http://open.t.sina.com.cn/wiki/index.php/FAQ

http://open.t.sina.com.cn/wiki/index.php/OAuth

http://jssdk.sinaapp.com/_html/api/

Forum:
http://forum.open.t.sina.com.cn/

Thursday, December 2, 2010

Wednesday, December 1, 2010

Social media Campaign 注意事項

1. 如果要send email,Check IP 來到limit 佢send email request 既數目
2. 如果係Facebook campaign,要check 埋(User not visible) 呢個exception,同收野既人既setting 有關。

Monday, November 15, 2010

cocos2d tutorial

http://www.raywenderlich.com/352/how-to-make-a-simple-iphone-game-with-cocos2d-tutorial

http://www.coconutcollege.net/c201.html

http://maniacdev.com/search/cocos2d+iphone+tutorial

http://www.learn-cocos2d.com/2010/05/issues-images-pdf-downloads/

http://dev.iphonetw.net/thread-2578-1-2.html

http://blog.sina.com.cn/s/blog_537cabb80100ha75.html

Book
Learn iPhone and iPad cocos2d game development

Thursday, November 4, 2010

jQuery Gallery Plugin

Please find the following gallery slideshow:

http://devkick.com/lab/galleria/demo_01.htm
http://galleria.aino.se/media/galleria/src/themes/fullscreen/fullscreen-demo.html
http://galleria.aino.se/
http://sandbox.leigeber.com/slideshow/

http://tobia.github.com/CrossSlide/

Thursday, October 21, 2010

slv post

http://msdn.microsoft.com/en-us/magazine/dd943052.aspx

Wednesday, October 6, 2010

ADC hardware purchase program

http://developer.apple.com/programs/adcbenefits/hardware/hongkong.html

What is the ADC Hardware Purchase Program and who is eligible for hardware discounts through the ADC Hardware Purchase Program?


The ADC Hardware Purchase Program is only available to existing paid ADC Members and it allows them to purchase, at a discount, a limited number of hardware systems to use for development and testing. ADC Premier members receive ten (10) ADC Hardware Discounts each membership year and ADC Select members receive one (1) ADC Hardware Discount each membership year. Prices, product offerings, and program terms are subject to change at Apple’s discretion. Prices for particular product purchases are those in effect at the time of shipment. All products are accompanied by Apple’s standard limited hardware warranty for those products. Purchases made outside of the ADC Hardware Purchase Program will not be re-booked or credited at developer pricing. There are no refunds on items purchased through the ADC Hardware Purchase Program. There are no hardware discounts associated with the new Mac Developer Program.

Friday, September 17, 2010

http://softwareas.com/cross-domain-communication-with-iframes

http://softwareas.com/cross-domain-communication-with-iframes

Wednesday, September 15, 2010

HTML5 Examples

http://www.smashingmagazine.com/2009/07/16/html5-and-the-future-of-the-web/

http://www.phpguru.org/html5-examples

http://www.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/

http://visionwidget.com/showcase/graphics/521-examples-of-fresh-html5-websites.html

http://visionwidget.com/showcase/graphics/521-examples-of-fresh-html5-websites.html

Monday, September 6, 2010

Attract 3,000 Fans In 30 Days

http://www.allfacebook.com/facebook-pages-guide/

Monday, August 30, 2010

Tuesday, August 17, 2010

Article list

How much can you really make developing mobile apps?
http://www.loiclemeur.com/english/2010/08/how-much-can-you-really-make-developing-mobile-apps.html



http://techcrunch.com/2010/08/17/social-recommendations-startup-getglue-launches-android-app-mobile-website/

http://techcrunch.com/2010/08/17/ipad-browsing-share/

Google map v3 Image map type

http://blog.ericsk.org/archives/1414

Phonegap project

http://www.phonegap.com/tools

Monday, August 16, 2010

Tracking Email with Google Analytics

http://cutroni.com/blog/2008/11/04/email-tracking-with-google-analytics/

Sunday, August 15, 2010

Article list 2

Today's yahoo news:
facebook宣傳 一「Like」10元
http://hk.news.yahoo.com/article/100815/4/jpjm.html

5萬成本 打造市值千萬企業
http://hk.news.yahoo.com/article/100815/4/jpjn.html

Friday, August 13, 2010

article

http://grayliao.blogspot.com/2010/08/facebooktabfbjsuid.html

http://wiki.developers.facebook.com/index.php/FBJS/Examples/Dialogs/Ajax

Monday, August 9, 2010

ASP.net Mobile Device Browser File

For detection of mobile device, use the following browser definition file:

The Mobile Browser Definition File contains definitions for individual mobile devices and browsers. At run time, ASP.NET uses the information in the request header to determine what type of device/browser has made the request.

http://mdbf.codeplex.com/releases/view/49626

Thursday, August 5, 2010

Weekly Articles List

http://wiki.asp.net/page.aspx/388/aspnet-open-source-projects/

Pokein
ASP.NET Comet Ajax Library
http://pokein.codeplex.com/

Should Developers have Access to Production?
http://blog.serverfault.com/post/893001713/should-developers-have-access-to-production

Six open source projects you should be using
http://infoworld.com/t/enterprise-architecture/six-open-source-projects-you-should-be-using-208
MediaWiki is a free software wiki package written in PHP, originally for use on Wikipedia. It is now used by several other projects of the non-profit Wikimedia Foundation and by many other wikis, including this website, the home of MediaWiki.

Graph api c# get access token

http://ingig.net/weblog/2010/04/21/using-graph-api-to-post-status-update-with-c/

some facebook c# toolkit

http://opengraph.codeplex.com/documentation

http://blog.prabir.me/post/The-Ultimate-Facebook-SDK-for-NET.aspx

http://github.com/prabirshrestha/FacebookSharp

Wednesday, August 4, 2010

Safari Facebook Cookie Problem

Solution?
http://anantgarg.com/2010/02/18/cross-domain-cookies-in-safari/

http://stackoverflow.com/questions/408582/setting-cross-domain-cookies-in-safari

http://wcrawford.org/2007/08/29/revisited-facebook-safari-and-external-iframes-that-need-cookies/

http://forum.developers.facebook.com/viewtopic.php?pid=254029

http://forum.developers.facebook.com/viewtopic.php?pid=251664

http://forum.developers.facebook.com/viewtopic.php?pid=241391

Tuesday, August 3, 2010

Friday, July 30, 2010

How to have a javascript callback executed after an update panel postback?

http://stackoverflow.com/questions/1152946/how-to-have-a-javascript-callback-executed-after-an-update-panel-postback

Monday, July 26, 2010

Get number of likes of page

Call this to get those counts for the above link:

https://api.facebook.com/method/fql.query?query=select total_count,like_count,comment_count,share_count,click_count from link_stat where url=&format=json

Ref:

http://developers.facebook.com/docs/reference/fql/link_stat

http://forum.developers.facebook.com/viewtopic.php?id=57636

http://forum.developers.facebook.com/viewtopic.php?id=64105

http://www.halgatewood.com/get-number-of-facebook-likes-for-a-url/

Tuesday, July 20, 2010

sql 2000 problem

Warning: The table 'xxx' has been created but its maximum row size (8707) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes.

Monday, July 19, 2010

Facebook get permission link

http://tech.karolzielinski.com/publish-post-of-facebook-page-wall-as-a-page-not-a-user-python-facebook-rest-api

http://wiki.developers.facebook.com/index.php/Authorization_and_Authentication_for_Desktop_Applications

http://forum.developers.facebook.com/viewtopic.php?pid=247712

http://www.facebook.com/connect/uiserver.php?app_id=&next=http%3A%2F%2Fapps.facebook.com%2test%2Fpageadmin.php&display=page&cancel_url=http%3A%2F%2Fapps.facebook.com%2Ftest%2F&locale=en_US&perms=manage_pages,offline_access&return_session=1&session_version=3&fbconnect=0&canvas=1&legacy_return=1&method=permissions.request

FB.api("/me/accounts")

Tuesday, July 6, 2010

Facebook Development FAQ

1. Can I send messages to users through Graph API?
No. (2010-07-06)

2. Can I send messages to fan page fans?
Yes, through the fan page admin panel.(2010-07-06)

3. Can I open the post to wall popup in fan page tab?
Yes, through the old Facebook.streamPublish function. New Fb.ui cannot. (2010-07-06)

4. Width of multi-friend-selector cannot be changed?
Use width="700" instead of style="width:700px"

5. Encounter Error:
" Fatal error: Uncaught CurlException: 60: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed thrown in /Users/wesbos/Dropbox/OrangeRhinoMedia/reporting/src/facebook.php on line 512"

Solution:
http://forum.developers.facebook.com/viewtopic.php?pid=225380

6. Get Insights from a Page, not an App
http://forum.developers.facebook.net/viewtopic.php?id=58146

7. FQL Like statement
WHERE strpos(message,'the') >= 0
http://forum.developers.facebook.net/viewtopic.php?id=30775

List of posts:
IE8 XSS
http://wiki.developers.facebook.com/index.php/Talk:Fb:request-form#IE8_Final_.28iframe.29
http://forum.developers.facebook.com/viewtopic.php?id=32954

I can't get the new Javascript SDK to work with IE8
http://forum.developers.facebook.com/viewtopic.php?id=61389

Graph API - Post Photo to fan page
http://forum.developers.facebook.com/viewtopic.php?id=59063

Uploading photos to fan page album
http://forum.developers.facebook.com/viewtopic.php?pid=246096

Get Filename from Url

string strPageName = System.IO.Path.GetFileName(Request.Path);

Ref:
http://bytes.com/topic/asp-net/answers/317977-extract-filename-url

Monday, May 17, 2010

Balsamiq Mockups - useful tools for UI

Balsamiq Mockups is a good UI design tool for draft version of the site.

http://www.balsamiq.com/products/mockups

Monday, May 3, 2010

Twitter Widgets

http://twitter.com/goodies/widgets

jQuery Twitter plugin:

http://coda.co.za/content/projects/jquery.twitter/1.0/

http://tweet.seaofclouds.com/

http://www.jquery.wisdomplug.com/jquery-plugins/jquery-user-interface-plugins-jquery-plugins/9-jquery-twitter-plugins/

Monday, April 19, 2010

Convert java.util.Date to java.sql.Date

java.sql.Date sqlDate = new java.sql.Date(new java.util.Date().getTime());

Friday, March 26, 2010

Date Extract function of Oracle

select extract(day from date1) from table
select extract(month from date1) from table
select extract(year from date1) from table

Thursday, March 25, 2010

JSP request.setCharacterEncoding

Today I just find that what I have inserted into database (Chinese characters) is scrambled code.

Finally, the solution is
request.setCharacterEncoding("utf8");

JavaServer Page Implicit Objects

http://www.gulland.com/courses/JavaServerPages/jsp_objects.jsp

Oracle Special Table - Dual

Oracle:

Dual is a special table with a garbage cell which is used for our queries.

For example,
select seq.nextval from dual

Friday, March 19, 2010

Useful .net 4.0 features

http://msdn.microsoft.com/en-us/library/ms171868%28VS.100%29.aspx

The following list describes additional new capabilities, improvements, and conveniences. Several of these are based on customer suggestions.

To support culture-sensitive formatting, the System.TimeSpan structure includes new overloads of the ToString, Parse, and TryParse methods, as well as new ParseExact and TryParseExact methods.

The new String.IsNullOrWhiteSpace method indicates whether a string is null, empty, or consists only of white-space characters. New overloads have been added to the String.Concat and String.Join methods that concatenate members of System.Collections.Generic.IEnumerable<(Of <(T>)>) collections.


The String.Concat method lets you concatenate each element in an enumerable collection without first converting the elements to strings.

The System.Guid structure now contains the TryParse and TryParseExact methods.

Secure Sockets Layer (SSL) support for the System.Net.Mail.SmtpClient and related classes.

Credentials for password-based authentication schemes such as basic, digest, NTLM, and Kerberos authentication in the System.Net..::.NetworkCredential class. To improved security, passwords may now be treated as System.Security.SecureString instances rather than System.String instances.

Ability to specify how a URI with percent-encoded values is converted and normalized in the System..::.Uri and System.Net.HttpListener classes. For more information, see the System.Net.Configuration.HttpListenerElement, System.Configuration.SchemeSettingElement, System.Configuration.SchemeSettingElementCollection, and System.Configuration.UriSection classes.

Sunday, March 7, 2010

Internet Explorer shows error when downloading excel file in SSL site

My post at stackoverflow today:

Internet Explorer shows error when downloading excel file in SSL site
http://stackoverflow.com/questions/2399203/internet-explorer-shows-error-when-downloading-excel-file-in-ssl-site

It's aboutthe Reponse Header's cache control.

Tuesday, January 26, 2010

Firefox plugin Tamper Data

https://addons.mozilla.org/en-US/firefox/addon/966

Secure HTTP cookie

If you are using SSL with your site, which you must in order to use an SSL cookie, then add the following line in your web.config, inside the <system.web> tag:

<httpCookies httpOnlyCookies="false" requireSSL="true" />

http://forums.asp.net/p/1242647/2275159.aspx#2275159

Single Sign-On Enterprise Security for Web Applications

Single Sign-On Enterprise Security for Web Applications

http://msdn.microsoft.com/en-us/library/ms972971.aspx

Thursday, January 21, 2010

Block cipher modes of operation

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation

OpenSta Tutorial

1. Declare variables first
CHARACTER*512 fileuser, FILE = "user", SCRIPT
CHARACTER*512 filepassword, FILE = "password", SCRIPT
CHARACTER*512 fileaccountno, FILE = "accountno", SCRIPT
CHARACTER*100 currentUsername, LOCAL
CHARACTER*100 currentPassword, LOCAL
CHARACTER*100 currentAccountNo, LOCAL
2. Tell when it should use the new variables
ACQUIRE MUTEX "Login"
NEXT fileuser
NEXT filepassword
NEXT fileaccountno

SET currentusername = fileuser
SET currentpassword = filepassword
SET currentaccountno = fileaccountno


RELEASE MUTEX "Login"

3. Replace the previously recorded info with the new variables.
4. Create new files (.fvr, e.g. user.fvr, password.fvr, accountno.fvr in this case)
Each line in the file represent one record (line break to separate it).
and place them in C:\Program Files\OpenSTA\Repository\Data

5. Create a new Test and drag the script in the task view.
6. Set the VU (Total number of virtual users for this task group)

Error: The located assembly's manifest definition does not match the assembly reference.

Today's error:

The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Wednesday, January 20, 2010

Thursday, January 14, 2010

Javascript email Regex

var email = "^([0-9a-zA-Z]([-\.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$";

Tuesday, January 12, 2010

301 redirect using IIS

To 301 redirect in IIS from http:// to https://,

1. Setup another site and set TCP port to 80 (original site uses other value).
2. Under "Home Directory",
Select "A redirection to a URL",
In Redirect to, type "https://www.example.com$S$Q

3. Check "The exact URL entered above" and "A Permanent redirection for this resource".

Web Design From Scratch

http://webdesignfromscratch.com/

http://office.microsoft.com/en-us/frontpage/HA011671221033.aspx

Generate a CSV from a generic list of objects using reflection and extension methods

http://www.joe-stevens.com/2009/08/03/generate-a-csv-from-a-generic-list-of-objects-using-reflection-and-extension-methods/

using System.Text;
using System.Reflection;

public static class Extensions
{
public static string GetCSV(this List list)
{
StringBuilder sb = new StringBuilder();

//Get the properties for type T for the headers
PropertyInfo[] propInfos = typeof(T).GetProperties();
for (int i = 0; i <= propInfos.Length - 1; i++)
{
sb.Append(propInfos[i].Name);

if (i < propInfos.Length - 1)
{
sb.Append(",");
}
}

sb.AppendLine();

//Loop through the collection, then the properties and add the values
for (int i = 0; i <= list.Count - 1; i++)
{
T item = list[i];
for (int j = 0; j <= propInfos.Length - 1; j++)
{
object o = item.GetType().GetProperty(propInfos[j].Name).GetValue(item, null);
if (o != null)
{
string value = o.ToString();

//Check if the value contans a comma and place it in quotes if so
if (value.Contains(","))
{
value = string.Concat("\"", value, "\"");
}

//Replace any \r or \n special characters from a new line with a space
if (value.Contains("\r"))
{
value = value.Replace("\r", " ");
}
if (value.Contains("\n"))
{
value = value.Replace("\n", " ");
}

sb.Append(value);
}

if (j < propInfos.Length - 1)
{
sb.Append(",");
}
}

sb.AppendLine();
}

return sb.ToString();
}
}

Monday, January 11, 2010

Avoid concurrent login (logout former login session) in ASP.net membership

In login.aspx:
protected void Login1_LoggedIn(object sender, EventArgs e)
{

string sKey = Login1.UserName;
string sValue = Session.SessionID;
Session[sKey] = sValue;
TimeSpan SessTimeOut = new TimeSpan(0, 0, HttpContext.Current.Session.Timeout, 0, 0);
HttpContext.Current.Cache.Insert(sKey, sValue, null, DateTime.MaxValue, SessTimeOut,
System.Web.Caching.CacheItemPriority.NotRemovable, null);

}

In Master Page of admin:
protected void Page_Load(object sender, EventArgs e)
{
string sValue = Cache[HttpContext.Current.User.Identity.Name].ToString();
if (Session.SessionID != sValue)
{
FormsAuthentication.SignOut();
Response.Redirect("login.aspx");
}
}

http://stackoverflow.com/questions/2025908/avoid-concurrent-login-logout-former-login-session-in-asp-net-membership