2009年3月29日

App Store

自從我知道了 iPhone 的 App Store 平台服務後,才發現 Google 與 Microsoft 也有類似的服務。 Apple - App Store Google - Android Market Microsoft - Windows Mobile Marketplace BlackBerry - BlackBerry App World

2009年3月12日

SEO

有幾個正正當當的 SEO 規則:
  1. 讓 Google 與 Yahoo 知道這個網站或網頁的存在:Google 可以透過網站管理工具,Yahoo 則透過 siteexplorer。
  2. 找出與網站相關的熱門關鍵字:既然想透過 Google 或 Yahoo 的關鍵字搜尋,當然不要選擇冷門的關鍵字。列出想到的關鍵字,到 Google 打一下,便可以看到數字的大小;至於 Yahoo,則可以透過關鍵字建議工具測試看看。
  3. 提供 Search Engine 明確的訊息:根據適當的關鍵字,設定好對應的 Title, Description 以及 Keyword;注意字串不要太長,否則搜尋機器人,會認為你想騙它。
  4. 讓更多的人連結你的網頁:趕快鼓勵你的親朋好友,連結你的網頁吧;當搜尋引擎到他的網頁而發現你的網址時,也會順便幫你加分。

meta tag sample:

<head>
  <title>JQuery Dialog Practice</title>
  <meta name="description" content="Try jQuery Popup Dialog" />
  <meta name="keywords" content="jQuery,Dialog" />
  <meta name="author" content="Dyson Liu" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>

2009年3月8日

Objective-C Primer

第一次探究 Objective-C,所以做了一些簡單的筆記,原本我已為跟 C 差不多,沒想到看得 "霧煞煞"。

Extension Name
.h - header files, .m - source files of C, .mm - source files of C++

與 C 不同的 keyword
==============================
NULL => nil
#include => #inport
super =>base
self => this
------------------------------------

Classes
==============================
@interface MyClass : NSObject
{
NSString * Name;
int Age;
}
- (id)initWithString: (NSString*)aName;
+ (MyClass)Create: (NSString*)aName;
@end
------------------------------------
class 的宣告必須放在 @interface 與 @end 之間,繼承的宣告方式與 C++ 相同。
method 的宣告比較特別,最前面的 "+" 代表 static method,"-" 則是一般 instance object method;method 冒號後面是參數。
------------------------------------
@implementation MyClass
- (id) initWithString : (NSString*) aName
{
if (self = [super init])
{ Name = [aName copy];
Age = 0;
return self;
}
}
@end
------------------------------------
Class 的實體,寫在 @implementation 與 @end 之間

呼叫 mathod 的方式
==============================
MyClass *obj = [[MyClass alloc] init]; // memory allocation, init is constructor
[obj initWithString: "Peter"]; // similar to obj->initWithString("Peter");
[obj release]; // release obj
------------------------------------

String
==============================
NSLog (@"Hello World!");
NSLog (@"I like Objective-C.\\n");
NSLog (@"The value is %d", nValue);
------------------------------------
Objective-C 的字串,前面固定要多加一個@,含意與 C# 不同,所以要讓字串換行,還是要再 n 之前寫兩個反斜線。

[refernece]
Objective-C Beginner's Guide: http://www.otierney.net/objective-c.html

2009年3月3日

Silverlight Download Image

我在設計網路相簿時,必須由 server 下載照片,花了不少時間找相關資料,發現下列三種方式可以使用。 1. 利用 Web Service 將 image 以 byte[] 下傳。 2. 利用 BitmapImage.UriSource 方式下載。 3. 利用 WebClient 方式下載。(ps.僅能讀取同一站台內的資料) 範例分別如下: --- Web Service --- private void LoadAllPhoto() { PhotoServiceReference.PhotoServiceClient proxy = new PhotoManager.PhotoServiceReference.PhotoServiceClient(); proxy.GetPhotoCompleted += new EventHandler<PhotoManager.PhotoServiceReference.GetPhotoCompletedEventArgs>(proxy_GetPhotoCompleted); proxy.GetPhotoAsync(); } private Image imageShow; void proxy_GetPhotoCompleted(object sender, PhotoManager.PhotoServiceReference.GetPhotoCompletedEventArgs e) { MemoryStream stream = new MemoryStream(); stream.Write(e.Result, 0, e.Result.Length); stream.Position = 0; BitmapImage image = new BitmapImage(); image.SetSource(stream); Image imageShow = new Image(); imageShow.Source = image; this.LayoutRoot.Children.Add(imageShow); } --- BitmapImage --- BitmapImage image = new BitmapImage(); image.UriSource = new Uri("...", UriKind.Absolute); image.DownloadProgress += new EventHandler<DownloadProgressEventArgs>(image_DownloadProgress); Image image.SetSource(stream); imageShow = new Image(); imageShow.Source = image; this.LayoutRoot.Children.Add(imageShow); --- WebClient --- WebClient imageLoader = new WebClient(); imageLoader.OpenReadCompleted += new OpenReadCompletedEventHandler(imageLoader_OpenReadCompleted); imageLoader.OpenReadAsync(new Uri("...", UriKind.Absolute)); void imageLoader_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e) { BitmapImage image = new BitmapImage(); image.SetSource(e.Result); Image imageShow = new Image(); imageShow.Source = image; this.LayoutRoot.Children.Add(imageShow); }

Deploying Vue & .NET with Google OAuth on GCP Cloud Run

Deploying Vue & .NET with Google OAuth on GCP Cloud Run Deploying Vue & .NET with Google OAuth on GCP Cloud Run...