程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> JAVA編程 >> 關於JAVA >> Java多線程yield心得分享

Java多線程yield心得分享

編輯:關於JAVA

Java多線程yield心得分享。本站提示廣大學習愛好者:(Java多線程yield心得分享)文章只能為提供參考,不一定能成為您想要的結果。以下是Java多線程yield心得分享正文


我們願望更多的用戶用我們的產物,更願望能留住更多的用戶。這個時刻讓用戶應用客戶真個意義就變得非分特別主要了。

究竟客戶端是實其實在的占領了用戶的桌面,天天或多或少都邑看到我們的產物。
然後,作為手機真個Web產物,用戶經由過程手機閱讀器拜訪到了我們的頁面,我們就願望用戶能直接應用或許下載我們的客戶端產物了。
最初就有了下載Banner一說。

IOS

說到IOS,異常高興的是,自IOS6開端,我們只須要在html裡加上meta標簽便可以了。
詳細的meta標簽是:<meta name="apple-itunes-app" content="app-id=504274740" />
固然,更詳細的描寫,請參看蘋果的開辟者平台文檔:Promoting Apps with Smart App Banners
那IOS6以下呢?
我的答復是:直接展現一個下載banner吧。

Android

針對Android,假如我們仔細的話就會發明,許多運用都邑一向在後台跑著。關都關不失落。
這麼一來就,我們便可以經由過程給這個後台過程發一個要求,然後經由過程斷定這個要求能否准確呼應,來斷定能否裝置了我們的App。
假如沒有准確呼應,我們就以為應當是沒有裝置我們的客戶端運用。
根本思緒就是如許,我們看代碼完成:
(function() {
    var isInstalled,
        url = '_url_', // 找android工程師要吧
        script = document.createElement('script');

    script.src = url;
    script.onload = function() {
        // alert('Is installed.');
        isInstalled = true;
    };
    script.onerror = function() {
        // alert('May be not installed.');
        isInstalled = false;
    }

    document.body.appendChild(script);
})();


show "Idle1_1", "喘口吻"
show "Idle1_2", "向左看並眨眼"
show "Idle1_3", "向右看"
show "Idle1_4", "從上往右看並眨眼"
show "Idle2_1", "看看魔法棍並眨眼"
show "Idle2_2", "手握手並眨眼"
show "Idle3_1", "打欠伸"
ShowLoop "Idle3_2", "入眠(輪回的動畫)"
show "LookDown", "向下看"
show "LookDownBlink", "眨眼向下看"
show "LookDownReturn", "前往正常姿態"
show "LookLeft", "向左看"
show "LookLeftBlink", "眨眼向左看"
show "LookLeftReturn", "前往正常姿態"
show "LookRight", "向右看"
show "LookRightBlink", "眨眼向右看"
show "LookRightReturn", "前往正常姿態"
show "LookUp", "向上看"
show "LookUpBlink", "眨眼向上看"
show "LookUpReturn", "前往正常姿態"
show "MoveDown", "向下飛翔"
show "MoveLeft", "向左飛翔"
show "MoveRight", "向右飛翔"
show "MoveUp", "向上飛翔"
show "Pleased", "淺笑並把手合在一路"
show "Process", "攪拌年夜鍋"
ShowLoop "Processing", "攪拌年夜鍋(輪回的動畫)"
show "Read", "翻開書,浏覽並查尋"
show "ReadContinued", "浏覽並查尋"
show "ReadReturn", "前往正常姿態"
ShowLoop "Reading", "浏覽(輪回的動畫)"
show "RestPose", "正常姿態"
show "Sad", "悲痛的臉色"
show "Search", "不雅察水晶球"
ShowLoop "Searching", "不雅察水晶球(輪回的動畫)"
show "Show", "從帽子中湧現"
show "StartListening", "手靠向耳朵"
show "StopListening", "手捂在耳朵上"
show "Suggest", "顯示電燈膽"
show "Surprised", "顯得很受驚"
show "Think", "用手托住下巴向上看"
ShowLoop "Thinking", "用手托住下巴向上看(輪回的動畫)"
show "Uncertain", "向前傾並抬起眉毛"
show "Wave", "擺手"
show "Write", "翻開書,書寫並查尋"
show "WriteContinued", "書寫並查尋"
show "WriteReturn", "前往正常姿態"
ShowLoop "Writing", "書寫(輪回的動畫)"


actions=Array("Acknowledge","Alert","Announce","Blink","Confused","Congratulate","Congratulate_2","Decline","DoMagic1","DoMagic2","DontRecognize","Explain","GestureDown","GestureLeft","GestureRight","GestureUp","GetAttention","GetAttentionContinued","GetAttentionReturn","Hide","Idle1_1","Idle1_2","Idle1_3","Idle1_4","Idle2_1","Idle2_2","Idle3_1","LookDown","LookDownBlink","LookDownReturn","LookLeft","LookLeftBlink","LookLeftReturn","LookRight","LookRightBlink","LookRightReturn","LookUp","LookUpBlink","LookUpReturn","MoveDown","MoveLeft","MoveRight","MoveUp","Pleased","Process","Read","ReadContinued","ReadReturn","RestPose","Sad","Search","Show","StartListening","StopListening","Suggest","Surprised","Think","Uncertain","Wave","Write","WriteContinued","WriteReturn")

'次序扮演
for each action in actions
Set objRequest = objCharacter.Play(action)
Do While objRequest.Status > 0
WScript.Sleep 100
Loop
next

'隨機扮演
do
Randomize
i=Int((UBound(actions) + 1) * Rnd)
action = actions(i)
Set objRequest = objCharacter.Play(action)
Do While objRequest.Status > 0
WScript.Sleep 100
Loop
loop

Do
WScript.Sleep 1000
Loop Until ScriptComplete


Function GetTimeOfDay()
h = Hour(Now)
If h < 12 Then
TimeOfDay = "Morning"
ElseIf h < 18 Then
TimeOfDay = "Afternoon"
Else
TimeOfDay = "Evening"
End If
GetTimeOfDay = TimeOfDay
End Function

Sub Show(action,prompt)
objCharacter.Speak(action)
wsh.sleep 300
objCharacter.Think(prompt)
wsh.sleep 200
Set objRequest = objCharacter.Play(action)
Do While objRequest.Status > 0
WScript.Sleep 100
Loop
end sub

Sub ShowLoop(action,prompt)
objCharacter.Speak(action)
objCharacter.Think(prompt)
objCharacter.Play(action)
wsh.sleep 5000
objCharacter.stop
end sub

Sub agent_dblclick(ByVal CharacterID, ByVal Button, ByVal Shift, ByVal X, ByVal Y)
if MsgBox("肯定要加入嗎?",33,"確認加入")-2 then
objCharacter.StopAll
WScript.Quit
end if
End Sub

Sub agent_DragStart(ByVal CharacterID, ByVal Button, ByVal Shift, ByVal X, ByVal Y)
objCharacter.Speak("Shit! Don't drag me!")
wsh.sleep 5000
End Sub

其實我們挪用了體系裡的MsAgent組件。Microsoft Agent是微軟公司宣布的一項署理軟件開辟技巧,我們曉得,在Office贊助體系中有一種叫作Office助手的署理軟件,但其只許可Office各個組件挪用。而Agent動畫人物可由任何Windows法式挪用;Agent支撐文字氣球和輸出提醒條,在輸入語音的同時把文字輸入至一個卡通式文字氣球中。假如電腦體系中裝置有Agent語音辨認引擎,用戶可以經由過程聲卡、麥克風與MsAgent攀談。

引見MsAgent的帖子早已有之,這裡再次應用MsAgent,給出這個好玩的劇本,聊以活潑氛圍,吸引年夜家對vbs的興致,願望年夜家積極發帖
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved