Translate

2010年12月31日 星期五

弘光 - 99-1 網路程式設計 - jQuery

jQuery


介紹:Link
下載:jQuery Regular (179kb)

使用方式:
  1. 下載jQuery   Ex: jquery-1.4.4.js
  2. 開啟網站專案 (ASP .NET, C#)
  3. 加入現有項目,加入js檔
  4. 使用:
     <script type="text/javascript" src="jquery.js">

Plug-in 練習
  1. TableSorter
  2. jQuery UI - Tab
  3. jQuery UI - Slider
  4. jQuery UI - Hide
  5. jQuery UI - Progressbar
  6. ThickBox 3.1


    2010年12月30日 星期四

    99-1朝陽資工 - 手持式裝置程式設計 - 成績表

    Dear 朝陽的各位同學

    期中與期中加分成績已經出來,
    請同學檢查有沒有問題,若有問題請在本文張回覆中敘述並寫上你的學號姓名。
    謝謝

    成績如下:

    https://spreadsheets.google.com/ccc?key=0AsoQevXXmTncdF9aME9DU3A0UzNKaUZhSDZPYzFWckE&hl=zh_TW#gid=1

    BP

    99-1朝陽資工 - 手持式裝置程式設計 - Android Service


    Android : Service

    Detail From : 

    A Service is an application component representing either an application's desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use. Each service class must have a corresponding  declaration in its package's AndroidManifest.xml. Services can be started with Context.startService() and Context.bindService().

    1. There are two reasons that a service can be run by the system. If someone calls Context.startService() then the system will retrieve the service (creating it and calling its onCreate() method if needed) and then call itsonStart(Intent, int) method with the arguments supplied by the client. The service will at this point continue running until Context.stopService() or stopSelf() is called. Note that multiple calls to Context.startService() do not nest (though they do result in multiple corresponding calls to onStart()), so no matter how many times it is started a service will be stopped once Context.stopService() or stopSelf() is called.
    2. Clients can also use Context.bindService() to obtain a persistent connection to a service. This likewise creates the service if it is not already running (calling onCreate() while doing so), but does not call onStart(). The client will receive the IBinder object that the service returns from its onBind(Intent) method, allowing the client to then make calls back to the service. The service will remain running as long as the connection is established (whether or not the client retains a reference on the service's IBinder). Usually the IBinder returned is for a complex interface that has beenwritten in aidl.
    3. A service can be both started and have connections bound to it. In such a case, the system will keep the service running as long as either it is started or there are one or more connections to it with theContext.BIND_AUTO_CREATE flag. Once neither of these situations hold, the service's onDestroy() method is called and the service is effectively terminated. All cleanup (stopping threads, unregistering receivers) should be complete upon returning from onDestroy().

    Service運作流程圖: Pic From: Link



    額外資訊連結:

    範例下載:



    2010年12月29日 星期三

    99-1朝陽資工 - 手持式裝置程式設計 - Android Thread

    Android 的UI運作方式與Java Swing不同,
    它使用的是單一Thread運作方式,意思就是UI前端只有一個Thread (ex View),
    其餘都在背景執行,而背景執行的thread若要用到前景Thread的事件或方法,

    則會產生錯誤事件:CalledFromWrongThreadException


    那Android背景事件該如何使用前景呢,
    舉例來說若我們啟動了一個Timer,它便會於背景執行,
    但若在Timer的 TimerTask中我們想要讓他啟動一個動作(如Toast)
    這時若以傳統Java Swing的方式執行是沒問題的,


    但若在Android執行,則無法顯示結果,
    那該怎麼辦呢?


    事實上Android提供了一個類別用來讓背景Thread使用前景的物件,
    這個類別便是 Handler ,詳見:Android Handler Doc


    接續上述的例子,
    我們便可以透過Handler的message 傳送,來達到操作前景Thread的效果囉。




    final Handler handler = new Handler(){
           public void handleMessage(Message msg) {  
               switch (msg.what) {      
               case 1:      
                Toast toast = Toast.makeText(getApplicationContext(), "SHOW)", Toast.LENGTH_SHORT);
    toast.show();
    break;      
               }      
               super.handleMessage(msg);  
           }  
       };  
       
    timer = new Timer();
    TimerTask timerTask = new TimerTask() {
    public void run() {
               Message message = new Message();      
               message.what = 1;      
               handler.sendMessage(message);
    }
    };

    //設定Alarm time,且Time out時會執行timerTask送出信息
    timer.schedule(timerTask, 3000, 3000);




    BP



    中台-99學年度學生國外實習獎學金申請

    BP:中台的同學注意囉!!


    99學年度學生國外實習獎學金申請作業自即日起至100/1/14止,逾期不予受理。
    詳細辦法如附件,相關申請說明如下:

    1.本年度經費有限,為有效統整,99學年度申請作業僅此一次,請欲於99學年度進行國外研習者,100/1/14前將申請案經系所務會議通過後,送至研發處國合組。

    2.中臺科技大學學生國外實習獎助要點(如附件)第三條規定:申請人應先申請教育學海系列(學海飛颺、學海惜珠或學海築夢),未獲補助或僅獲部分補助者,得就其未補助部分申請本部分補助。

    3.另依中臺科技大學學生國外實習實施辦法實習期限以一個月以上(含)為原則(未達一個月恕不補助)。


    4.學生海外實習獎助總金額亞洲地區最高以新台幣四萬元為限(不含大陸、港澳),其他非亞洲地區高以六萬元為限,,再依學生獎補助審查會核定後金額按比率分配核給(99年度核配比率約為24%)

    5.有關學生國外實習之教育部補助案(學海系列)申請時程約為每年3月底截止收件
    6.若有其他相關申請問題,請撥分機8404與雅菁洽詢,謝謝!!

    #補充說明:
    系所之實習案未列於下者,請務必於100/1/14前提出實習計畫(計畫書格式如附件doc檔)


    99-1中台資管 - 行銷資訊系統 - 報告時間

    Dear 各為同學

    期末報告時間規劃如下:

    1/3

    • 第一組:18:40~19:00
    • 第二組:19:15~19:35
    1/10
    • 第三組:18:40~19:00
    • 第四組:19:15~19:35
    • 第五組:19:50~20:10
    • 第六組:20:25~20:45

    注意事項:
    • 每組報告時間15~20分鐘,另有十分鐘問題時間
    • 書面報告請於 01/15 號前繳交
    • 報告時間若小組未到齊,則扣分並由下一組先行報告

    BP

    99-1中台國企行銷 - 資訊科技與應用 - MOS 註冊補充

    請考MOS的同學注意,
    由於 http://www.certiport.com 網站改版,
    導致部份同學沒有通過『保密協定確認』

    若你已經申請通過,


    • 請重新登入 http://www.certiport.com
    • 點選右上角『 My Profile 』
    • 進入後點選四個分頁最右邊的『程式』
    • 請確認下面兩個保密與隱私條款皆已接受
    • 若無出現上圖『已接受』訊息,
      請參考新版投影片,第六頁步驟:http://ppt.cc/MM2z

    已註冊後便完成。


    BP

    2010年12月28日 星期二

    2010年12月27日 星期一

    99-1中台國企行銷 - 資訊科技與應用 - 20101227測驗

    題目下載: Download1     or   Download2

    銷售記錄表
    1. 請將銷售記錄表內資料加上藍色框線,大標題跨欄置中,表格標題欄加上黃色背景色
    2. 填入銷售金額
    3. 將資料進行排序,依l:1.區域(主要,A-Z)   2.銷售金額(次要,大到小)

    地區銷售總覽表
    1. 使用『函式』填入各地區銷售總金額 (請以貨幣格式NT$顯示,無小數)
    2. 製作一圓餅圖顯示各地區分怖,並將北部區拉出凸顯

    產品銷售狀況表
    1. 將『銷售記錄表』複製,並命名為『產品銷售狀況表』
    2. 使用小計算出各產品的銷售金額"總額" (請以貨幣格式NT$顯示,無小數)

    銷售金額比較表
    1. 建立一『銷售金額比較表』
    2. 建立表格內容
      • 列為各個區域
      • 行為各個產品
      • 內容回銷售金額
    3. 以上述表格建立一長條圖
      • X軸為產品
      • Y軸為銷售金額
      • 值為不同區域的銷售金額
    保護工作表
    1. 將銷售記錄表中的資料內容設定保護,讓使用者需要輸入密碼123才能修改資料


    注意事項;
    • 請將檔案名稱改為:學號-姓名.xls   ,例: D123456789-李安.xls
    • 做答完畢後請直接上傳檔案

    上傳位址:
    • 行銷:[ Link ]
    • 國企:[ Link ]

    2010年12月24日 星期五

    弘光 - 99-1 網路程式設計 - RegularExpression 基礎

    弘光 - 99-1 網路程式設計 - RegularExpression 基礎


    • [0-9] : 限定只能輸入0~9
    • [a-z] : 限定只能輸入小寫a~z字母
    • [A-Z] : 限定只能輸入大寫A~Z字母
    • [a-zA-Z]  : 限定只能輸入小寫a~z字母與大寫A~Z字母
    • [a-zA-Z0-9] : 限定只能輸入小寫a~z字母與大寫A~Z字母與0~9
    • [^0-9] : 限定不能輸入0~9數字
    • {3} : 限定只能輸入3個字母
    • {3,7} : 限定只能輸入3~7個字母
    • {3,} : 限定只能輸入3~無限長個字母
    • \. : 限定一定要輸入符號 . 
    • ? : 選擇性顯示
      • Example
        • [0-9]{3}([0-9]{2})? : 郵局3+2郵遞區號
        • [A-Z]{1}[0-9{9} : 身分證長度檢測

    弘光 - 99-1 網路程式設計 - 加分考試

    弘光 - 99-1 網路程式設計 - 加分考試

    題目:MSN-Like 改版

    說明:
    請製作三個頁面,分別為:

    • 使用者登入頁面
      • 四個輸入欄,且須加上驗證(空值、E-Mail格式)
        • 使用者1 姓名
        • 使用者1 E-Mail
        • 使用者2 姓名
        • 使用者2 E-Mail
    • 發送端1頁面
      • 請使用Session紀錄歷史訊息
      • 具有以下輸入元件
        • 歷史訊息
        • 輸入訊息
        • 送出按鈕


    • 發送端2頁面
      • 請使用Session紀錄歷史訊息
      • 具有以下輸入元件
        • 歷史訊息
        • 輸入訊息
        • 送出按鈕



    完成後請上傳,上傳格式為: [學號][姓名].zip

    上傳網址: [ Link ]

    2010年12月23日 星期四

    99-1朝陽資工 - 手持式裝置程式設計 - 網頁元件

    99-1朝陽資工 - 手持式裝置程式設計 - 網頁元件


    網頁元件 WebView

    • 介紹 : Link
    • Method
      • loadUrl()
      • setWebViewClient
      • zoomIn()
      • zoomOut()
      • getTitle()
      • getUrl()
    • 建構與方法範例
      • 建立
        • WebView webView = (WebView) findViewById(R.id.WebView01)
      • 設定連結
        • webView.setWebViewClient(new WebViewClient())
      • 設定對像
    • 範例檔下載:
      • 含:Zoom in , Zoom out, AlertDialog, getTitle, getUrl
      • Download

    99-1朝陽資工 - 手持式裝置程式設計 - 鍵盤偵測

    99-1朝陽資工 - 手持式裝置程式設計 - 鍵盤偵測

    鍵盤事件偵測:

    • 所屬類別:View
    • 介面interface:View.OnKeyListener
      • public abstract boolean onKey (View v, int keyCode, KeyEvent event)
      • Parameters
        • v The view the key has been dispatched to.
        • keyCode The code for the physical key that was pressed
        • event The KeyEvent object containing full information about the event.
      • Returns
        • True if the listener has consumed the event, false otherwise.
    • 範例
      • 建立EditText的Listener
        • editText.setOnKeyListener(new OnKeyListener()
      • 偵測Key事件
        • public boolean onKey(View v, int keyCode, KeyEvent event)
      • 取出Key事件
        • if (keyCode == KeyEvent.KEYCODE_ENTER)
    • 範例下載

    2010年12月20日 星期一

    99-1中台國企行銷 - 資訊科技與應用 - Word測驗 20101213

    2010.12.13 測驗 - Word

    考試題目:
    1, 5, 6, 11, 12, 19, 20, 26


    題目清單:View
    檔案下載: Download 


    上傳位址:
    • 行銷:[ Link ]
    • 國企:[ Link ]

    上傳檔名範例:
    • F09944444-潘人豪-練習.zip
    • F09944444-潘人豪-考試.zip

    2010年12月17日 星期五

    2010年12月16日 星期四

    99-1朝陽資工 - 手持式裝置程式設計 - 數值轉換

    Android 數值轉換  (JAVA)


    • String 轉為 Int  : Integer.parseInt( STRING )
    • String 轉為 long  : Long.parseLong( STRING )
    • String 轉為 float: Float.parseFloat( STRING )
    • 數值轉String : String.valueOf( 數值 )
      • Ex :  String.valueOf( INT ) 


    BP

    99-1朝陽資工 - 手持式裝置程式設計 - 期中成績


    期中測驗成績

    請見以下網址: Link


    BP

    2010年12月15日 星期三

    99-1朝陽資工 - 手持式裝置程式設計 - Shared Preferences

    Shared Preferences


    • 資料處理 : Shared Preferences - Detail  : Link
    • 資料設定 : SharedPreferences.Editor - Detail  : Link
    • 資料設定方法: 
    • Ex::
    SharedPreferences settings = getSharedPreferences(SETTING_PREF, 0);
    settings.edit()
    .putString(SHARED_MSG1, mEditText01.getText().toString())
    .putInt(SHARED_MSG2, int2)
    .putLong(SHARED_MSG3, long3)
    .putFloat(SHARED_MSG4, float4)
    .putBoolean(SHARED_MSG5, boolean5)
    .commit();

    • 資料讀取方法
    • Ex:
    SharedPreferences settings = getSharedPreferences(SETTING_PREF, 0);
    String msg1 = settings.getString(SHARED_MSG1, "");
    int msg2_int = settings.getInt(SHARED_MSG2, defint2);
    long msg3_long = settings.getLong(SHARED_MSG3, deflong3);
    float msg4_float = settings.getFloat(SHARED_MSG4, deffloat4);
    boolean msg5_boolean = settings.getBoolean(SHARED_MSG5, defboolean5);

    範例:



    練習:
    • 製作SharedPreferences版的MSN-Like程式
    • 請加入清空歷史訊息的效果

    2010年12月13日 星期一

    99-1中台資管 - 行銷資訊系統 - 系統個案圖

    參考資料: 
    • 投影片 Link  (p29)
    • 過去案例 : Link
    系統名稱  - 1
    • 系統說明
    • 系統類別
    • 應用項目
    • 輸入資料
    • 輸出資料
    • 個案說明
      1. XXX個案
      2. OOO個案
      3. .....
    • 個案圖

    系統名稱  - 2
    • 系統說明
    • 系統類別
    • 應用項目
    • 輸入資料
    • 輸出資料
    • 個案說明
      1. XXX個案
      2. OOO個案
      3. .....
    • 個案圖

    2010年12月10日 星期五

    弘光 - 99-1 網路程式設計 - Cookie & Session操作項目

    Cookie 介紹
    • HttpCookie Class
    • Detail : Link

    • Cookie 實作
      • Cookie建立:HttpCookie
        Ex: HttpCookie myc1 = new HttpCookie("username1");
      • Cookie設定:
        Ex: myc1.Value = "    "  ;
      • Cookie存活時間設定:  .Expires
        Ex: myc1.Expires = DateTime.Now.AddHours(1);
      • Cooike儲存
        Ex: Response.Cookies.Add(myc1);
    • Cookie資料操作
      • Cookie資料取出
        Request.Cookies["txtChatdata"].Value
      • Cookie資料設定  - Response
        • Response.Cookies["txtChatdata"].Value 

    Session介紹

    • Session
      • HttpSessionState Class
      • Detail : Link
    • Session 實作
      • Session建立 : Session["變數名稱"]
        Ex: Session["username1"] = username1.Text
      • Session使用:Session["變數名稱"]
        Ex:Session["txtChatdata"] = "";