android模擬用戶輸入

目錄(?)[-]

  1. geteventsendevent
  2. input keyevent


本文講的是通過使用代碼,可以控制手機的屏幕和物理按鍵,也就是說不只是在某一個APP里去操作,而是整個手機系統。



getevent/sendevent

getevent&sendevent 是Android系統下的一個工具,可以模擬多種按鍵和觸屏操作,產生的是raw event,raw event經過event hub處理產生最終的gesture事件。getevent用于獲取當前系統input設備的一些參數和實時事件的數據;sendevent用于發送input事件,這倆命令的作用就是相當于解放了手,可以通過命令直接調用Linux底層來控制手機,工具的源碼位于Android SDK的system/core/toolbox下(sendevent.c getevent.c)。


getevent

用法說明:

[plain]?view plaincopy
  1. #?getevent?-h??
  2. Usage:?getevent?[-t]?[-n]?[-s?switchmask]?[-S]?[-v?[mask]]?[-p]?[-q]?[-c?count]?[-r]?[device]??
  3. ????-t:?show?time?stamps??
  4. ????-n:?don't?print?newlines??
  5. ????-s:?print?switch?states?for?given?bits??
  6. ????-S:?print?all?switch?states??
  7. ????-v:?verbosity?mask?(errs=1,?dev=2,?name=4,?info=8,?vers=16,?pos.?events=32)??
  8. ????-p:?show?possible?events?(errs,?dev,?name,?pos.?events)??
  9. ????-q:?quiet?(clear?verbosity?mask)??
  10. ????-c:?print?given?number?of?events?then?exit??
  11. ????-r:?print?rate?events?are?received??
其中?[-t]?參數顯示事件的時間戳,[-n]?取消事件顯示時的換行符,[-s switchmask]?得到指定位的開關狀態,[-S]?得到所有開關的狀態,[-v [mask]]?根據mask的值顯示相關信息,后面詳細介紹mask的使用方法,[-p]?顯示每個設備支持的事件類型和編碼,[-q]?只顯示事件數據,[-c count]?只顯示count次事件的數據,[-r]?顯示事件接收頻率。

[java]?view plaincopy
  1. shell@android:/?$?getevent?-p??
[java]?view plaincopy
  1. getevent?-p??
  2. add?device?1:?/dev/input/event7??
  3. ??name:?????"gpio-keys"??
  4. ??events:??
  5. ????KEY?(0001):?0066??
  6. ??input?props:??
  7. ????<none>??
  8. add?device?2:?/dev/input/event2??
  9. ??name:?????"alps"??
  10. ??events:??
  11. ????ABS?(0003):?0000??:?value?12,?min?-4096,?max?4096,?fuzz?0,?flat?0,?resolution?0??
  12. ????????????????0001??:?value?-4,?min?-4096,?max?4096,?fuzz?0,?flat?0,?resolution?0??
  13. ????????????????0002??:?value?-252,?min?-4096,?max?4096,?fuzz?0,?flat?0,?resolution?0??
  14. ????????????????000a??:?value?0,?min?-4096,?max?4096,?fuzz?0,?flat?0,?resolution?0??
  15. ????????????????0010??:?value?0,?min?-4096,?max?4096,?fuzz?0,?flat?0,?resolution?0??
  16. ????????????????0011??:?value?0,?min?-4096,?max?4096,?fuzz?0,?flat?0,?resolution?0??
  17. ??input?props:??
  18. ????<none>??
  19. add?device?3:?/dev/input/event6??
  20. ??name:?????"7k_handset"??
  21. ??events:??
  22. ????KEY?(0001):?006b??0072??0073??0074??00e2??
  23. ??input?props:??
  24. ????<none>??
  25. add?device?4:?/dev/input/event5??
  26. ??name:?????"proximity_sensor"??
  27. ??events:??
  28. ????ABS?(0003):?0019??:?value?1,?min?0,?max?1,?fuzz?0,?flat?0,?resolution?0??
  29. ??input?props:??
  30. ????<none>??
  31. add?device?5:?/dev/input/event4??
  32. ??name:?????"accelerometer_sensor"??
  33. ??events:??
  34. ??input?props:??
  35. ????<none>??
  36. add?device?6:?/dev/input/event3??
  37. ??name:?????"magnetic_sensor"??
  38. ??events:??
  39. ??input?props:??
  40. ????<none>??
  41. add?device?7:?/dev/input/event1??
  42. ??name:?????"7x27a_kp"??
  43. ??events:??
  44. ????KEY?(0001):?0072??0073??
  45. ??input?props:??
  46. ????<none>??
  47. add?device?8:?/dev/input/event0??
  48. ??name:?????"sec_touchscreen"??
  49. ??events:??
  50. ????KEY?(0001):?0066??008b??009e??00d9??
  51. ????ABS?(0003):?002f??:?value?0,?min?0,?max?4,?fuzz?0,?flat?0,?resolution?0??
  52. ????????????????0030??:?value?0,?min?0,?max?255,?fuzz?0,?flat?0,?resolution?0??
  53. ????????????????0032??:?value?0,?min?0,?max?100,?fuzz?0,?flat?0,?resolution?0??
  54. ????????????????0035??:?value?0,?min?0,?max?480,?fuzz?0,?flat?0,?resolution?0??
  55. ????????????????0036??:?value?0,?min?0,?max?800,?fuzz?0,?flat?0,?resolution?0??
  56. ????????????????0039??:?value?0,?min?0,?max?4,?fuzz?0,?flat?0,?resolution?0??
  57. ????LED?(0011):?0008??
  58. ??input?props:??
  59. ????INPUT_PROP_DIRECT??
可以看到 [-p] 參數顯示出來當前系統存在的所有input設備,并且把每個設備支持的事件類型以及編碼都列舉了出來。

每一個device相當于手機所支持的input設備,每個device里面的events下:KEY(0001) 、ABS(0003)、SYN(0000)等表示該設備所支持的事件類型:EV_SYN?[0000] (同步事件),EV_KEY?[0001] (按鍵事件),EV_ABS?[0003] (絕對值事件)

舉例event0中的KEY類型:

[java]?view plaincopy
  1. KEY?(0001):?0066??008b??009e??00d9????

表示sec_touchscreen支持的按鍵編碼有:KEY_HOME?[0066] (HOME鍵),KEY_MENU?[008b] (MENU鍵)

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??KEY_BACK?[009e] (BACK鍵),KEY_SEARCH?[00d9] (SEARCH鍵)

舉例event0中的ABS類型:

[java]?view plaincopy
  1. ABS?(0003):?002f??:?value?0,?min?0,?max?4,?fuzz?0,?flat?0,?resolution?0??
  2. ????????????0030??:?value?0,?min?0,?max?255,?fuzz?0,?flat?0,?resolution?0??
  3. ????????????0035??:?value?0,?min?0,?max?480,?fuzz?0,?flat?0,?resolution?0??
  4. ????????????0036??:?value?0,?min?0,?max?800,?fuzz?0,?flat?0,?resolution?0??

表示sec_touchscreen支持的絕對值編碼有:ABS_MT_TOUCH_MAJOR?[0030] (接觸面長軸值) {有效值范圍[0, 255]}

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??? ???ABS_MT_POSITION_X?[0035] (x軸坐標) {有效值范圍[0, 480]}

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ABS_MT_POSITION_Y?[0036] (y軸坐標) {有效值范圍[0, 800]}

實例:

連接真機,windows打開cmd命令:adb shell:


命令行直接:

[java]?view plaincopy
  1. 127|shell@android:/?$?getevent??
cmd便會不斷的輸出log日志,等待輸入設備,我們觸摸屏幕或是手機物理按鍵,便會看到這里的變化,可以看到每一個事件所對應的type、code、value,同時也可知曉device所對應的event:



傳送門,通過getevent獲取點擊屏幕的位置坐標,你可以更好的理解getevent的工作流程:

http://blog.csdn.net/liu_zhen_wei/article/details/12559277


sendevent

用法說明:

[java]?view plaincopy
  1. #?sendevent???
  2. use:?sendevent?device?type?code?value??
可以看到sendevent需要4個參數即:device,type,code,value。這些值可以由input子系統定義,也可以從getevent里面獲取。type其實就是和getevent中的支持事件類型所對應的,type, code, value的定義可參看kernel/include/linux/input.h

需要注意的是在getevent中code顯示的是十六進制,而sendevent時需要用十進制

我就copy一個EV_ABS類型所對應的code:

[java]?view plaincopy
  1. /*?
  2. ?*?Absolute?axes?
  3. ?*/??
  4. ??
  5. #define?ABS_X???????????0x00??
  6. #define?ABS_Y???????????0x01??
  7. #define?ABS_Z???????????0x02??
  8. #define?ABS_RX??????????0x03??
  9. #define?ABS_RY??????????0x04??
  10. #define?ABS_RZ??????????0x05??
  11. #define?ABS_THROTTLE????????0x06??
  12. #define?ABS_RUDDER??????0x07??
  13. #define?ABS_WHEEL???????0x08??
  14. #define?ABS_GAS?????????0x09??
  15. #define?ABS_BRAKE???????0x0a??
  16. #define?ABS_HAT0X???????0x10??
  17. #define?ABS_HAT0Y???????0x11??
  18. #define?ABS_HAT1X???????0x12??
  19. #define?ABS_HAT1Y???????0x13??
  20. #define?ABS_HAT2X???????0x14??
  21. #define?ABS_HAT2Y???????0x15??
  22. #define?ABS_HAT3X???????0x16??
  23. #define?ABS_HAT3Y???????0x17??
  24. #define?ABS_PRESSURE????????0x18??
  25. #define?ABS_DISTANCE????????0x19??
  26. #define?ABS_TILT_X??????0x1a??
  27. #define?ABS_TILT_Y??????0x1b??
  28. #define?ABS_TOOL_WIDTH??????0x1c??
  29. #define?ABS_VOLUME??????0x20??
  30. #define?ABS_MISC????????0x28??
  31. ??
  32. #define?ABS_MT_TOUCH_MAJOR??0x30????/*?Major?axis?of?touching?ellipse?*/??
  33. #define?ABS_MT_TOUCH_MINOR??0x31????/*?Minor?axis?(omit?if?circular)?*/??
  34. #define?ABS_MT_WIDTH_MAJOR??0x32????/*?Major?axis?of?approaching?ellipse?*/??
  35. #define?ABS_MT_WIDTH_MINOR??0x33????/*?Minor?axis?(omit?if?circular)?*/??
  36. #define?ABS_MT_ORIENTATION??0x34????/*?Ellipse?orientation?*/??
  37. #define?ABS_MT_POSITION_X???0x35????/*?Center?X?ellipse?position?*/??
  38. #define?ABS_MT_POSITION_Y???0x36????/*?Center?Y?ellipse?position?*/??
  39. #define?ABS_MT_TOOL_TYPE????0x37????/*?Type?of?touching?device?*/??
  40. #define?ABS_MT_BLOB_ID??????0x38????/*?Group?a?set?of?packets?as?a?blob?*/??
  41. #define?ABS_MT_TRACKING_ID??0x39????/*?Unique?ID?of?initiated?contact?*/??
  42. #define?ABS_MT_PRESSURE?????0x3a????/*?Pressure?on?contact?area?*/??
  43. ??
  44. #define?ABS_MAX?????????0x3f??
  45. #define?ABS_CNT?????????(ABS_MAX+1)??

源碼中定義的0x35,0x36就對應我在上文說getevent所舉sec_touchscreen支持的絕對值編碼。

實例:

比如我們要模擬一次?BACK?事件,根據上面getevent中sec_touchscreen支持的信息可知BACK的編碼為 0x9e 轉換為十進制后即158,那我們輸入如下命令即可模擬一次BACK鍵的按下和彈起:

[java]?view plaincopy
  1. #?sendevent?/dev/input/event0?1?158?1??
  2. #?sendevent?/dev/input/event0?1?158?0??
device需要是支持該按鍵的設備這里是sec_touchscreen;type為1表示是按鍵事件;value為1表示按下,為0表示彈起,一次按鍵事件由按下和彈起兩個操作組成。



----------------------------------------------------------------------------------------------------------------

附,這是網絡文章說的在某坐標點上touch,我試驗沒效果,大家可以試試:

如在屏幕的x坐標為40,y坐標為210的點上touch一下(六組命令必須配合使用,缺一不可

adb shell sendevent /dev/input/event0 3 0 40
adb shell sendevent /dev/input/event0 3 1 210
adb shell sendevent /dev/input/event0 1 330 1 //touch
adb shell sendevent /dev/input/event0 0 0 0?????? //it must have
adb shell sendevent /dev/input/event0 1 330 0 //untouch
adb shell sendevent /dev/input/event0 0 0 0 //it must have

----------------------------------------------------------------------------------------------------------------


input keyevent

發送鍵盤事件

用法說明:

adb shell input keyevent “value”

usage: input ...
? ? ? ?input text <string>
? ? ? ?input keyevent <key code number or name>
? ? ? ?input tap <x> <y>
? ? ? ?input swipe <x1> <y1> <x2> <y2>

如上,input后可以跟很多參數, text相當于輸入內容,keyevent相當于手機物理或是屏幕按鍵,tap相當于touch事件,swipe相當于滑動~~是不是很贊?

先列舉 input keyevent 幾個比較常用的code值:

input keyevent 3??? // Home

input keyevent 4??? // Back

input keyevent 19? //Up

input keyevent 20? //Down

input keyevent 21? //Left

input keyevent 22? //Right

input keyevent 23? //Select/Ok

input keyevent 24? //Volume+

input keyevent 25? // Volume-

input keyevent 82? // Menu 菜單

我們來試驗一下:

[java]?view plaincopy
  1. shell@android:/?$?input?keyevent?3??
看一下手機是不是真的返回到了主界面?

再來個輸入:

[java]?view plaincopy
  1. shell@android:/?$?input?text?"helloworld!"??
  2. input?text?"helloworld!"??

再來個tap:

[java]?view plaincopy
  1. shell@android:/?$?input?tap?168?252??
  2. input?tap?168?252??


最后試一下 swipe:

[java]?view plaincopy
  1. shell@android:/?$?input?swipe?100?250?200?280??
  2. input?swipe?100?250?200?280??
  3. shell@android:/?$?input?swipe?100?250?220?320??
  4. input?swipe?100?250?220?320??
  5. shell@android:/?$?input?swipe?100?250?280?400??
  6. input?swipe?100?250?280?400??
  7. shell@android:/?$?input?swipe?100?250?300?480??
  8. input?swipe?100?250?300?480??
  9. shell@android:/?$?input?swipe?100?250?350?550??
  10. input?swipe?100?250?350?550??
  11. shell@android:/?$?input?swipe?100?250?400?650??
  12. input?swipe?100?250?400?650??
  13. shell@android:/?$?input?swipe?100?250?480?600??
  14. input?swipe?100?250?480?600??
效果圖:



我們在adb shell下試驗了各種命令,可是代碼里該怎么做呢?看下面

[java]?view plaincopy
  1. /**?
  2. ?*?執行shell命令?
  3. ?*??
  4. ?*?@param?cmd?
  5. ?*/??
  6. private?void?execShellCmd(String?cmd)?{??
  7. ??
  8. ????try?{??
  9. ????????//?申請獲取root權限,這一步很重要,不然會沒有作用??
  10. ????????Process?process?=?Runtime.getRuntime().exec("su");??
  11. ????????//?獲取輸出流??
  12. ????????OutputStream?outputStream?=?process.getOutputStream();??
  13. ????????DataOutputStream?dataOutputStream?=?new?DataOutputStream(??
  14. ????????????????outputStream);??
  15. ????????dataOutputStream.writeBytes(cmd);??
  16. ????????dataOutputStream.flush();??
  17. ????????dataOutputStream.close();??
  18. ????????outputStream.close();??
  19. ????}?catch?(Throwable?t)?{??
  20. ????????t.printStackTrace();??
  21. ????}??
  22. }??
在想要執行的地方:
[java]?view plaincopy
  1. execShellCmd("getevent?-p");??
  2. execShellCmd("sendevent?/dev/input/event0?1?158?1");??
  3. execShellCmd("sendevent?/dev/input/event0?1?158?0");??
  4. execShellCmd("input?keyevent?3");//home??
  5. execShellCmd("input?text??'helloworld!'?");??
  6. execShellCmd("input?tap?168?252");??
  7. execShellCmd("input?swipe?100?250?200?280");??

至此結束,是不是感覺自己也能做出按鍵精靈了~~~


附:input keyevent所對應全部key值:

KeyCode ? ? ? ? ? ? Keyevent Value

KEYCODE_MENU 1
KEYCODE_SOFT_RIGHT 2
KEYCODE_HOME 3
KEYCODE_BACK 4
KEYCODE_CALL 5
KEYCODE_ENDCALL 6
KEYCODE_0 7
KEYCODE_1 8
KEYCODE_2 9
KEYCODE_3 10
KEYCODE_4 11
KEYCODE_5 12
KEYCODE_6 13
KEYCODE_7 14
KEYCODE_8 15
KEYCODE_9 16
KEYCODE_STAR 17
KEYCODE_POUND 18
KEYCODE_DPAD_UP 19
KEYCODE_DPAD_DOWN 20
KEYCODE_DPAD_LEFT 21
KEYCODE_DPAD_RIGHT 22
KEYCODE_DPAD_CENTER 23
KEYCODE_VOLUME_UP 24
KEYCODE_VOLUME_DOWN 25
KEYCODE_POWER 26
KEYCODE_CAMERA 27
KEYCODE_CLEAR 28
KEYCODE_A 29
KEYCODE_B 30
KEYCODE_C 31
KEYCODE_D 32
KEYCODE_E 33
KEYCODE_F 34
KEYCODE_G 35
KEYCODE_H 36
KEYCODE_I 37
KEYCODE_J 38
KEYCODE_K 39
KEYCODE_L 40
KEYCODE_M 41
KEYCODE_N 42
KEYCODE_O 43
KEYCODE_P 44
KEYCODE_Q 45
KEYCODE_R 46
KEYCODE_S 47
KEYCODE_T 48
KEYCODE_U 49
KEYCODE_V 50
KEYCODE_W 51
KEYCODE_X 52
KEYCODE_Y 53
KEYCODE_Z 54
KEYCODE_COMMA 55
KEYCODE_PERIOD 56
KEYCODE_ALT_LEFT 57
KEYCODE_ALT_RIGHT 58
KEYCODE_SHIFT_LEFT 59
KEYCODE_SHIFT_RIGHT 60
KEYCODE_TAB 61
KEYCODE_SPACE 62
KEYCODE_SYM 63
KEYCODE_EXPLORER 64
KEYCODE_ENVELOPE 65
KEYCODE_ENTER 66
KEYCODE_DEL 67
KEYCODE_GRAVE 68
KEYCODE_MINUS 69
KEYCODE_EQUALS 70
KEYCODE_LEFT_BRACKET 71
KEYCODE_RIGHT_BRACKET 72
KEYCODE_BACKSLASH 73
KEYCODE_SEMICOLON 74
KEYCODE_APOSTROPHE 75
KEYCODE_SLASH 76
KEYCODE_AT 77
KEYCODE_NUM 78
KEYCODE_HEADSETHOOK 79
KEYCODE_FOCUS 80
KEYCODE_PLUS 81
KEYCODE_MENU 82
KEYCODE_NOTIFICATION 83
KEYCODE_SEARCH 84
TAG_LAST_KEYCODE 85

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/387959.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/387959.shtml
英文地址,請注明出處:http://en.pswp.cn/news/387959.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

真格量化常見報錯信息和Debug方法

1.打印日志 1.1 在代碼中添加運行到特定部分的提示&#xff1a; 如果我們在用戶日志未能看到“調用到OnQuote事件”文字&#xff0c;說明其之前的代碼就出了問題&#xff0c;導致程序無法運行到OnQuote函數里的提示部分。解決方案為仔細檢查該部分之前的代碼是否出現問題。 1.2…

向量積判斷優劣弧_判斷經驗論文優劣的10條誡命

向量積判斷優劣弧There are a host of pathologies associated with the current peer review system that has been the subject of much discussion. One of the most substantive issues is that results reported in leading journals are commonly papers with the most e…

自定義PopView

改代碼是參考一個Demo直接改的&#xff0c;代碼中有一些漏洞&#xff0c;如果發現其他的問題&#xff0c;可以下方直接留言 .h文件 #import <UIKit/UIKit.h> typedef void(^PopoverBlock)(NSInteger index); interface CustomPopView : UIView //property(nonatomic,copy…

線控耳機監聽

當耳機的媒體按鍵被單擊后&#xff0c;Android系統會發出一個廣播&#xff0c;該廣播的攜帶者一個Action名為MEDIA_BUTTON的Intent。監聽該廣播便可以獲取手機的耳機媒體按鍵的單擊事件。 在Android中有個AudioManager類&#xff0c;該類會維護MEDIA_BUTTON廣播的分發&#xf…

當編程語言掌握在企業手中,是生機還是危機?

2019年4月&#xff0c;Java的收費時代來臨了&#xff01; Java是由Sun微系統公司在1995年推出的編程語言&#xff0c;2010年Oracle收購了Sun之后&#xff0c;Java的所有者也就自然變成了Oracle。2019年&#xff0c;Oracle宣布將停止Java 8更新的免費支持&#xff0c;未來Java的…

sql如何處理null值_如何正確處理SQL中的NULL值

sql如何處理null值前言 (Preface) A friend who has recently started learning SQL asked me about NULL values and how to deal with them. If you are new to SQL, this guide should give you insights into a topic that can be confusing to beginners.最近開始學習SQL的…

名言警句分享

“當你想做一件事&#xff0c;卻無能為力的時候&#xff0c;是最痛苦的。”基拉大和轉載于:https://www.cnblogs.com/yuxijun/p/9986489.html

文字創作類App分享-簡書

今天我用Mockplus做了一套簡書App的原型&#xff0c;這是一款文字創作類的App&#xff0c;用戶通過寫文、點贊等互動行為&#xff0c;提高自己在社區的影響力&#xff0c;打造個人品牌。我運用了Mockplus基礎組件、交互組件、移動組件等多個組件庫&#xff0c;簡單拖拽&#xf…

數據可視化 信息可視化_動機可視化

數據可視化 信息可視化John Snow’s map of Cholera cases near London’s Broad Street.約翰斯諾(John Snow)在倫敦寬街附近的霍亂病例地圖。 John Snow, “the father of epidemiology,” is famous for his cholera maps. These maps represent so many of our aspirations …

android 接聽和掛斷實現方式

轉載▼標簽&#xff1a; android 接聽 掛斷 it 分類&#xff1a; android應用技巧 參考&#xff1a;android 來電接聽和掛斷 支持目前所有版本 注意&#xff1a;android2.3版本及以上不支持下面的自動接聽方法。 &#xff08;會拋異常&#xff1a;java.lang.Securi…

Eclipse External Tool Configration Notepad++

Location&#xff1a; C:\Program Files\Notepad\notepad.exe Arguments&#xff1a;  ${resource_loc} 轉載于:https://www.cnblogs.com/rgqancy/p/9987610.html

利用延遲關聯或者子查詢優化超多分頁場景

2019獨角獸企業重金招聘Python工程師標準>>> MySQL并不是跳過offset行&#xff0c;而是取offsetN行&#xff0c;然后返回放棄前offset行&#xff0c;返回N行&#xff0c;那當offset 特別大的時候&#xff0c;效率就非常的低下&#xff0c;要么控制返回的總頁數&…

客戶流失_了解客戶流失

客戶流失Big Data Analytics within a real-life example of digital music service數字音樂服務真實示例中的大數據分析 Customer churn is a key predictor of the long term success or failure of a business. It is the rate at which customers are leaving your busine…

Java 動態加載class 并反射調用方法

反射方法&#xff1a; public static void main(String[] args) throws Exception { File filenew File("D:/classtest");//類路徑(包文件上一層) URL urlfile.toURI().toURL(); ClassLoader loadernew URLClassLoader(new URL[]{url});//創…

Nginx:Nginx limit_req limit_conn限速

簡介 Nginx是一個異步框架的Web服務器&#xff0c;也可以用作反向代理&#xff0c;負載均衡器和HTTP緩存&#xff0c;最常用的便是Web服務器。nginx對于預防一些攻擊也是很有效的&#xff0c;例如CC攻擊&#xff0c;爬蟲&#xff0c;本文將介紹限制這些攻擊的方法&#xff0c;可…

快速數據庫框架_快速學習新的數據科學概念的框架

快速數據庫框架重點 (Top highlight)數據科學 (Data Science) Success in data science and software engineering depends on our ability to continuously learn new models and concepts.數據科學和軟件工程的成功取決于我們不斷學習新模型和概念的能力。 Both domains are…

Linux實戰教學筆記12:linux三劍客之sed命令精講

第十二節 linux三劍客之sed命令精講 標簽&#xff08;空格分隔&#xff09;&#xff1a; Linux實戰教學筆記-陳思齊 ---更多資料點我查看 1&#xff0c;前言 我們都知道&#xff0c;在Linux中一切皆文件&#xff0c;比如配置文件&#xff0c;日志文件&#xff0c;啟動文件等等。…

activiti 為什么需要采用樂觀鎖?

樂觀鎖 為什么需要采用樂觀鎖&#xff1f; 由于activiti一個周期的transaction時間可能比較長&#xff0c;且同一流程實例中存在任務并發執行等場景。設計者將update、insert、delete事務性的操作推遲至command結束時完成&#xff0c;這樣盡量降低鎖沖突的概率&#xff0c;由…

Python實現三級菜單(字典和列表的使用)

menu { 北京: { 海淀: { 五道口: { soho: {}, 網易: {}, google: {} }, 中關村: { 愛奇藝: {}, 汽車之家: {}, 優酷: {} …

停止使用p = 0.05

How many of you use p0.05 as an absolute cut off? p ≥ 0.05 means not significant. No evidence. Nada. And then p < 0.05 great it’s significant. This is a crude way of using p-values, and hopefully I will convince you of this.你們中有多少人使用p 0.05作…