一個很好的排序算法,void shaker(item ,count)
標簽: 排序算法
上傳時間: 2014-01-11
上傳用戶:hustfanenze
// // Histogram Sample // This sample shows how to use the Sample Grabber filter for video image processing. // Conceptual background: // A histogram is just a frequency count of every pixel value in the image. // There are various well-known mathematical operations that you can perform on an image // using histograms, to enhance the image, etc. // Histogram stretch (aka automatic gain control): // Stretches the image histogram to fill the entire range of values. This is a "point operation," // meaning each pixel is scaled to a new value, without examining the neighboring pixels. The // histogram stretch does not actually require you to calculate the full histogram. The scaling factor // is calculated from the minimum and maximum values in the image.
標簽: Sample Histogram Grabber sample
上傳時間: 2013-12-15
上傳用戶:ryb
simulates coin tossing. Let the program toss a coin each time the user chooses the “Toss Coin” menu option. count the number of times each side of the coin appears. Display the results. The program should call a separate method flip that takes no arguments and returns false for tails and true for heads. [ Note: If the program realistically simulates coin tossing, each side of the coin should appear approximately half the time.]
標簽: the coin simulates chooses
上傳時間: 2014-08-30
上傳用戶:pompey
K3:--- P1.6 K4:--- P1.7 BEEP:--- P3.7 K3 --- 控制按鍵 K4 --- 清零按鍵 開機顯示: SECOND-CLOCK 0 TIME 00:00:00:00 K3 --- 控制按鍵: 第一次按下時,開始計時。 顯示 BEGIN count 1 TIME 00:00:01:88 第二次按下時,暫停計時。 顯示 PAUST count 2 TIME 00:00:01:88 第三次按下時,累計計時。
標簽: SECOND-CLOCK K3 BEEP K4
上傳時間: 2016-05-10
上傳用戶:清風冷雨
Java: 在n 張撲克牌中找出順子 題目是這樣的:有n張撲克牌,每張牌的取值范圍是:2,3,4,5,6,7,8,9,10,J,Q,K,A。在這n張牌中找出順子(5張及5張以上的連續的牌),并將這些順子打印出來。 思路:我的思路其實很簡單,首先就是要去掉重復的牌,因為同樣的順子之算一個,顯然JAVA中的Set很適合這個工作。同時又需要對這些牌進行排序,毫無疑問就是TreeSet了。然后從小到大遍歷這些牌,并設置一個計數器count。若發現連續的牌,則count++;若發現不連續的,分2中情況:若count>4,則找到了一個順子,存起來;反之則什么都不做。然后count=1,從新開始找順子。下面就是代碼:
標簽: Java
上傳時間: 2013-12-22
上傳用戶:hewenzhi
操作系統課程設計_進程調度演示源程序 #include "stdio.h" #include "stdlib.h" #include "string.h" typedef struct node { char name[10] /*進程標識符*/ int prio /*進程優先數*/ int round /*進程時間輪轉時間片*/ int cputime /*進程占用CPU時間*/ int needtime /*進程到完成還要的時間*/ int count /*計數器*/ char state /*進程的狀態*/ struct node *next /*鏈指針*/ }PCB
標簽: include typedef stdlib string
上傳時間: 2016-08-09
上傳用戶:鳳臨西北
用多線程同步方法解決讀者閱覽問題 1) 每個讀者進入閱覽室后,即時顯示“Entered” 及其線程自定義標識,還同時顯示閱覽室共有幾名顧客及其所坐的位置。 2) 至少有10個讀者,每人閱覽至少3秒鐘。 3) 多個讀者須共享操作函數代碼。 2總的設計思想及系統平臺、語言、工具: 設計思想:程序設定的是10個讀者和5個座位,對讀者進行編號,依次進入閱覽室讀書,為每一座位列一表目,包括座號和讀者號等,讀者離開時要登出,即消掉登記的信息。 系統平臺:LINUX 語言:C語言 工具:vi編輯器、gcc編譯器 操作系統:linux操作系統 調試工具:edit、masm、link、debug. 3數據結構與模塊說明(功能與流程圖) 數據結構 int count=0 //記錄閱覽室讀者數量 sem_t full //定義閱覽室座位信號量 int seat[5] //用數組表示座位 pthread_t reader[10] //定義讀者線程 pthread_mutex_t mutex //定義互斥量 3.2功能說明 可以標識讀者,隨機為讀者設置在閱覽室的讀書時間 可以顯示閱覽室讀者的人數 可以顯示讀者所坐的位置,座位狀態以及列出空座位
標簽: 多線程同步
上傳時間: 2016-08-10
上傳用戶:zsjzc
The P89LPC938 is a single-chip microcontroller, available in low cost packages, based on a high performance processor architecture that executes instructions in two to four clocks, six times the rate of standard 80C51 devices. Many system-level functions have been incorporated into the P89LPC938 in order to reduce component count, board space, and system cost.
標簽: microcontroller single-chip available packages
上傳時間: 2013-12-04
上傳用戶:遠遠ssad
// -*- Mode: Verilog -*- // Filename : wb_master.v // Description : Wishbone Master Behavorial // Author : Winefred Washington // Created On : 2002 12 24 // Last Modified By: . // Last Modified On: . // Update count : 0 // Status : Unknown, Use with caution! // Description Specification // General Description: 8, 16, 32-bit WISHBONE Master // Supported cycles: MASTER, READ/WRITE // MASTER, BLOCK READ/WRITE // MASTER, RMW // Data port, size: 8, 16, 32-bit // Data port, granularity 8-bit // Data port, Max. operand size 32-bit // Data transfer ordering: little endian // Data transfer sequencing: undefined
標簽: Description Behavorial wb_master Filename
上傳時間: 2014-07-11
上傳用戶:zhanditian
at91ARM9200串口例程,希望對大家有所幫助。 使用方式: TestCom /dev/ttyS* -w count data TestCom /dev/ttyS* -r
上傳時間: 2016-11-21
上傳用戶:13160677563