[C++] About pointer to base class

2019-4-29 写技术

#include <stdio.h> #include <stdlib.h> class base{ public: int a; int b; int c; }; class hello:public base{ public: int c; int d; }; int main(){ base b; b.a = 1; b.b = 2; b.c = 5; hello *c; c =(hello *)&b; c->d = 3; printf(" %d %d...

阅读全文>>

标签: C++

评论(0) 浏览(1106)

[Data Structures] Swap sort

2019-4-28 写技术

#include <stdio.h> #include <stdlib.h> void bubbleSort(int seq[], int n) { int i; int j; int tmp; int exchange; for (i=0; i<n; i++) { exchange = 0; for (j=n; j>i; j--) { if (seq[j] < seq[j-1]) { /* swap j and j-1 */ tmp = seq[j]; seq[j] = ...

阅读全文>>

标签: data_structures

评论(0) 浏览(970)

[Data Structures] Insertion sort

2019-4-25 写技术

#include <stdio.h> #include <stdlib.h> /* Straight insertion sort */ void straightInsertionSort(int seq[], int n) { int i; int j; int tmp; for (i=1; i<n; i++) {//From 1 tmp = seq[i];//Store yourself for (j=i-1; j>=0 && seq[j]>seq[i]; j--) {//Compare b...

阅读全文>>

标签: Data Structures

评论(0) 浏览(1003)

[C++]An example of hash_map

2019-4-23 写技术

#include <hash_map> #include <string> #include <iostream> using namespace std; using namespace stdext; int main(){ hash_map<string, string> mymap; mymap["aa"] = "Hello!"; mymap["bb"] = "You are who?"; mymap["cc"] = "See you!"; cout<<mymap["bb"]<<...

阅读全文>>

标签: C++

评论(0) 浏览(1039)

[PHP]How to enable mod_expires&mod_headers in order to achive static cache

2019-4-10 写技术

First: Open this line. LoadModule expires_module modules/mod_expires.so Second: Add this segment. <IfModule mod_expires.c>     ExpiresActive On     ExpiresByType text/html "now plus 5 minutes"     ExpiresByType text/css "now p...

阅读全文>>

标签: php

评论(0) 浏览(1073)

How to download ckplayer video

2019-4-1 写技术

There is a simple program by which you can download the ckplayer video. After create the list of download URL, copy it to download tools. After download aff of the files. Use the command to compare into a big file in windows: copy/b E:\temps\*.ts E:\temps\new.ts There is the...

阅读全文>>

标签: JS html

评论(0) 浏览(2669)

通过禁止Flash干掉“FF新鲜事”广告弹窗

2019-3-23 写技术

最近Addobe 的Flash被国厂化之后,每天弹名为“FF新鲜事”的广告窗口,霸占大半个屏幕,无齿之极。用各种杀毒软件删除、禁用Flash软件都没有,下次打开电脑又死灰复燃,一次我在别人电脑上发现金山杀毒都把Flash的广告进程作为自己的保护进程在跑,看来这棵毒瘤来头不小。 后来我手动删除整个Macromed目录,并且在同位置建了一个同名的文件,且改为只读,且不知有没有效。 直到有一天,我要用Dreamweaver了,一打开Dreamweaver,显示搜索信息中,没过多久显示无法创建目录 C:\Windows\SysWOW64\Macromed\Flash...

阅读全文>>

评论(0) 浏览(2248)

[JS]Load pictures lasily

2019-3-23 写技术

/* Load pictures lasily. */ $("img.data_lazy").each(function(){ var id = $(this); var data = $(this).attr("data_lazy"); var img = new Image(); img.src = data; img.onload = function(){ img.onload = null; id.attr("src", data); } });

阅读全文>>

标签: JS

评论(0) 浏览(1092)

VS2005添加X64编译平台

2019-3-21 写技术

VS2005添加X64编译平台,方法如下: 1)打开控制面板->程序/卸载程序->更改->下一步->添加或移除功能; 控制面板里,右击“VS2005 ”->更改->点击“添加或移除功能” 2)在语言工具里,点开”+Visual C++”–>选择“X64编辑器和工具”,以及“Visual C++运行库”–>OK–>安装即可。

阅读全文>>

标签: C++

评论(0) 浏览(1376)

[php]Onethink used 8421 code in checkbox

2019-3-16 写技术

Onethink used 8421 code in checkbox, and if it is extra values must add processing function in logic model. Like that: Application\Admin\Logic\ProductLogic.class.php   protected $_auto = array( array('duoxuan', 'getDuoxuan', self::MODEL_BOTH, 'callback'), );  ...

阅读全文>>

标签: php

评论(0) 浏览(1099)

Powered by anycle 湘ICP备15001973号-1