2012年12月16日 星期日

test

#include <iostream>
#include <string>
using namespace std;

string GetName()
{
string FirstName, LastName, FN;

cout << "Employee's First Name: ";
cin >> FirstName;
cout << "Employee's Last Name: ";
cin >> LastName;

FN = FirstName + " " + LastName;

return FN;
}

int main()
{
string FullName;
double Hours;

double GetHours(string FullName);

FullName = GetName();

Hours = GetHours(FullName);

cout << "\nEmployee's Name: " << FullName;
cout << "\nWeekly Hours: " << Hours << " hours\n\n";

return 0;
}

double GetHours(string FullName)
{
double Mon, Tue, Wed, Thu, Fri, TotalHours;

cout << endl << FullName << "'s Weekly Hours\n";
cout << "Monday: ";
cin >> Mon;
cout << "Tuesday: ";
cin >> Tue;
cout << "Wednesday: ";
cin >> Wed;
cout << "Thursday: ";
cin >> Thu;
cout << "Friday: ";
cin >> Fri;

TotalHours = Mon + Tue + Wed + Thu + Fri;

return TotalHours;
}

png 最佳化

Most Effective Method to Reduce and Optimize PNG Images

PNGOutWin

http://www.cocos2d-iphone.org/forum/topic/39715

2012年12月13日 星期四

Adobe AIR Native Extension (iOS)

Requirements

 

Reference (TODO)

 

Samples

 

Step By Step(TODO)

Step By Step
01. 建立Cocoa Touch Static Library
02. 移除自動建立的.h檔
03. 將FlashRuntimeExtensions.h拷貝至.m檔相同目錄
04. 在.m檔中加入 #import "FlashRuntimeExtensions.h"
05. 根據FREFunction          函式定義, 實作FREFunction          
06. 根據FREContextInitializer函式定義, 實作FREContextInitializer (mapping FREFunction)
07. 根據FREContextFinalizer  函式定義, 實作FREContextFinalizer
08. 根據FREInitializer       函式定義, 實作FREInitializer        (mapping FREContextInitializer & FREContextFinalizer)
09. 根據FREFinalizer         函式定義, 實作FREFinalizer
10. Generating the compiled library(http://www.adobe.com/devnet/air/articles/building-ane-ios-android-pt3.html)

 

Debug(TODO)