03 2014 档案

【Mysql】select
摘要:create database Susake;use Susake;create table Test(a int, b int);insert into Test values(1, 2);select *from Test; 阅读全文

posted @ 2014-03-30 15:16 至死丶不渝 阅读(124) 评论(0) 推荐(0)

【Mysql】insert
摘要:The INSERT privilege enablesrows to be inserted into tables in a databasecreate database Susake;use Susake;create table Test(a int, b int);insert into Test values(1, 2); 阅读全文

posted @ 2014-03-29 19:15 至死丶不渝 阅读(116) 评论(0) 推荐(0)

【Windows API】Button Control Structures
摘要:①BUTTON_IMAGELISTContains information about an image list that is used with a button control②BUTTON_SPLITINFOContains information that defines a split button (BS_SPLITBUTTON and BS_DEFSPLITBUTTON styles)③NMBCDROPDOWNContains information about a BCN_DROPDOWN notification④NMBCHOTITEMContains informati 阅读全文

posted @ 2014-03-29 05:19 至死丶不渝 阅读(226) 评论(0) 推荐(0)

【动态规划】最大子段和
摘要:设序列n,起始值为0状态:s[i]是否加上dp[i - 1]1.若前一项为正,则dp[i] = dp[i - 1] + s[i]2.若前一项为非正,则dp[i] = s[i]3.用max记录最大的dp[i]#include #include int s[6] = { 0, 6, -1, 5, 4, -7 };int dp[100];int main(int argc, char *argv[]){ int sum = 0, max = 0; memset(dp, 0, sizeof(dp)); for (int i = 1; i 0) dp[i] = ... 阅读全文

posted @ 2014-03-29 05:12 至死丶不渝 阅读(110) 评论(0) 推荐(0)

【Mysql】delete
摘要:The DELETE privilege enablesrows to be deleted from tables in a databasecreate database Susake;use Susake;create table Test(a int, b int);insert into Test values(1, 2);insert into Test values(2, 3);delete from Test where a = 1;drop table Test;drop database Susake; 阅读全文

posted @ 2014-03-29 05:05 至死丶不渝 阅读(207) 评论(0) 推荐(0)

【Windows API】Button Control Notifications
摘要:①BCN_DROPDOWNSent when the user clicks a drop down arrow on a button. The parent window of the control receives this notification code in the form of a WM_NOTIFY message②BCN_HOTITEMCHANGENotifies the button control owner that the mouse is entering or leaving the client area of the button control. Th 阅读全文

posted @ 2014-03-29 03:05 至死丶不渝 阅读(282) 评论(0) 推荐(0)

【贪心】Huffman Code
摘要:1.构造Huffman Tree,每次取最小和次小的2个1 1 = 2 此时 2 3 62 3 = 5 此时 5 65 6 = 11 此时 11Huffman Tree如下 11 5 6 2 31 12.构造前缀编码(左0右1)#include #include int w[4] = { 6, 3, 1, 1 };typedef struct{ int weight; int LChild, RChild, parent;}HTNode;typedef struct{ HTNode *nod... 阅读全文

posted @ 2014-03-29 02:58 至死丶不渝 阅读(160) 评论(0) 推荐(0)

【Mysql】alter
摘要:The ALTER privilege enables use of ALTER TABLE to change thestructure of tables. ALTER TABLE also requires theCREATE and INSERT privileges. Renaming atable requires ALTER andDROP on the old table,ALTER,CREATE, andINSERT on the new tablecreate database Susake;use Susake;create table Qing(a int, b int 阅读全文

posted @ 2014-03-29 02:50 至死丶不渝 阅读(121) 评论(0) 推荐(0)

【Boost】Accumulators
摘要:1.CountThe count feature is asimple counter that tracks the number of samples pushed into the accumulatorset#include #include using namespace boost::accumulators;int main(int argc, char *argv[]){ accumulator_set > acc; acc(0); acc(1); acc(2); assert(count(acc) == 3); return 0;}2.Co... 阅读全文

posted @ 2014-03-29 02:23 至死丶不渝 阅读(559) 评论(0) 推荐(1)

【Windows API】Button Control Messages
摘要:①BCM_GETIDEALSIZEGets the size of the button that best fits its text and image, if an image list is present. You can send this message explicitly or use the Button_GetIdealSize macro②BCM_GETIMAGELISTGets the BUTTON_IMAGELIST structure that describes the image list assigned to a button control. You c 阅读全文

posted @ 2014-03-29 02:10 至死丶不渝 阅读(441) 评论(0) 推荐(0)

【分治】二分查找
摘要:设序列n1.分:在序列n中找到key,相当于在left, right中找到key即可2.治:每次取middle与key比较,若相同则返回middle + 1,否则返回-1#include int Divide_conquer(int n_Susake[], int key, int length){ int left = 0, right = length + 1, middle; while (left != right) { middle = (left + right) / 2; if (n_Susake[middle] == key) re... 阅读全文

posted @ 2014-03-29 01:54 至死丶不渝 阅读(147) 评论(0) 推荐(0)

【Mysql】lock tables
摘要:The LOCK TABLES privilegeenables the use of explicit LOCK TABLES statements to lock tables for which you havethe SELECT privilege. Thisincludes the use of write locks, which prevents other sessionsfrom reading the locked tablecreate database Susake;use Susake;create table Test(a int, b int);lock tab 阅读全文

posted @ 2014-03-29 01:50 至死丶不渝 阅读(228) 评论(0) 推荐(0)

【Windows API】Button Control Macros
摘要:①Button_EnableEnables or disables a button②Button_GetCheckGets the check state of a radio button or check box. You can use this macro or send the BM_GETCHECK message explicitly③Button_GetIdealSizeGets the size of the button that best fits the text and image, if an image list is present. You can use 阅读全文

posted @ 2014-03-29 01:21 至死丶不渝 阅读(459) 评论(0) 推荐(0)

【括号匹配】
摘要:1.当遇到左括号时,将其入栈2.当遇到右括号时,若栈非空,则与当前top匹配,再top出栈,若栈空,则缺左括号3.当串扫描完,若栈非空,则说明缺右括号,若栈空,则匹配成功#define _CRT_SECURE_NO_WARNINGS#include #define MAX 100char stack[MAX];int main(int argc, char *argv[]){ int N, top, flag; char ch; scanf("%d%*c", &N); while (N--) { top = 0, flag = 1; ... 阅读全文

posted @ 2014-03-28 16:47 至死丶不渝 阅读(263) 评论(0) 推荐(0)

【Mysql】drop
摘要:The DROP privilege enables youto drop (remove) existing databases, tables, and views.create database Susake;use Susake;create table Test(a int, b int);drop table Test;drop database Susake; 阅读全文

posted @ 2014-03-28 14:48 至死丶不渝 阅读(151) 评论(0) 推荐(0)

【KMP】
摘要:KMP(克鲁特-莫里斯-普拉特算法)--子串的定位 效率O(n + m)如主串S ababcabcacbab 子串P abcacnext[i]的值的确定 --- 通过求出p1...pk-1 = pj-k+1.....pj-1的最大k值则上述abcac1 02 13 3-1为ab 14 4-1为abc 15 5-1为abca 2 (首尾a)试一试abcabc1 02 13 3-1为ab 14 4-1为abc 15 5-1为abca 2 (首尾a)6 6-1为abcab 3 (首尾ab)再试试ababaaaba1 02 13 3-1为ab 14 ... 阅读全文

posted @ 2014-03-28 14:16 至死丶不渝 阅读(112) 评论(0) 推荐(0)

【Windows API】Button Control Functions
摘要:①CheckDlgButtonChanges the check state of a button control②CheckRadioButtonAdds a check mark to (checks) a specified radio button in a group and removes a check mark from (clears) all other radio buttons in the group③IsDlgButtonCheckedThe IsDlgButtonChecked function determines whether a button contr 阅读全文

posted @ 2014-03-28 14:07 至死丶不渝 阅读(287) 评论(0) 推荐(0)

【Mysql】create
摘要:The CREATE privilege enablescreation of new databases and tables.create database Susake;use Susake;create table Test(a int, b int); 阅读全文

posted @ 2014-03-28 13:12 至死丶不渝 阅读(127) 评论(0) 推荐(0)

导航