-
Quick-sort
Quicksort sorts by employing a divide and conquer strategy to divide a list into two sub-lists.
The steps are:
Pick an element, called a pivot, from the list.
Reorder the list so that all elements with values less than the pivot come before the pivot, while all elements with values greater than the pivot come after it (equal values can go either way). After this partitioning, the pivot is in its final position. This is called the partition operation.
Recursively sort the sub-list of lesser elements and the sub-list of greater elements.
The base case of the recursion are lists of size zero or one, which never need to be sorted.
- 2011-03-17 03:41:02下载
- 积分:1
-
lcd
单片机实现温度的测量和液晶显示 ds18b20 LCD1602(MCU temperature measurements and liquid crystal display ds18b20 LCD1602)
- 2011-06-29 19:04:17下载
- 积分:1
-
Force-Feedback-with-DirectInput
This is a code stub from a game I am working on. You will need to have DirectX 7.0 installed or higher. I will give you two sample effects when using a force-feedback joystick. The first one is an Explosion force feedback effect, the other one is a Gunfire effect. You will have to enum your own Joystick object.
- 2014-07-13 14:06:31下载
- 积分:1
-
MainForm
自己用C#语言编写的一个软件主界面,供大家学习参考(A main interface of software written in C# language for your reference)
- 2019-06-01 11:29:16下载
- 积分:1
-
TSPMatlab
TSP问题(货郎担问题,旅行商问题)的模拟退火算法通用malab源程序
f目标最优值,T最优路线,d距离矩阵,t0初始温度,tf结束温度
- 2010-08-20 21:32:42下载
- 积分:1
-
通过STM32 PWM做的简易三相电流、三相电压发生器
1.整个装置的输入电源为直流24V,并通过7812和7805输出12V逆变控制电压和5V STM32电源。
2.逆变由STM32的TIM2和TIM3的PWM功能,通过查表法输出SPWM脉冲信号到IR2104控制MOS管输出功率脉冲,经过滤波后成为三相正弦波输出。输出电压高低由电压、电流电位器来调节。电位器输出电压通过AD转换后控制SPWM脉宽,实际输出范围为0-10V三相交流电压。
3.最终输出是电压源输出还是电流源输出由隔离变压器来控制,最终输出电压源0-160V和电流源0-6A。电流源0-6A是模拟电流互感器的输出,实际输出电压是0-1V,短路输出后电流是0-6A.
4. 电流和电压由于有时候会同时接入测量装置回路中,因此必须使用隔离变压器。
5. 电流和电压的相位由相位电位器来控制,来调节输出的功率因素。
6. 由于没有使用电路内部的测量回路,实际输出值需要外部测量,因此也没有做显示功能,因此没有做按键直接数控,用电位器来做调节,简化控制。
- 2021-10-02 00:31:05下载
- 积分:1
-
PA0_PWM输出
比较寄存器这里直接举例说明定时器的PWM输出工作过程:若TIMx_CNT,而TIMx_ARR被配置,即TIMx_CNT的在TIMxCLK时钟源的驱动下
- 2023-05-22 16:10:03下载
- 积分:1
-
C-Programming-Exercises-Answers
国内的经典教材,谭浩强版本的,共分为十三个章节。(Domestic classic textbook,Hemopurification version, is divided into thirteen chapters.)
- 2013-07-14 21:21:22下载
- 积分:1
-
基于stc15w408as的LCD1602和ds1307显示时钟
基于stc15w408as的LCD1602和ds1307来显示时钟,还有ds18b20的温度显示,同时增加了按键控制,LCD的en为P2^6;rs为P2^7;1307的SDA为P2^3,SCL为P2^4;可以完美实现。
- 2022-03-20 20:47:17下载
- 积分:1
-
hid
主要是针对HID USB 应用的程序。包括:查找设备、读取USB数据、写入USB数据等。简单易懂。(HID USB is mainly directed against the application of procedures. Include the following: Find equipment, read the USB data into the USB data. Easy-to-read.)
- 2009-06-24 14:09:33下载
- 积分:1