方法一:主要在于是否开启gd库 查看办法 找到php.ini文件 搜索extension=php_gd2.dll这段代码 然后把前面的;符号去掉即可。方法二:关键一点是获取验证码的图片与全局变量SITE_URL相关,也就是网站的目录,所以只要修改cache/configs/system.php文件中...
分类:
Web程序 时间:
2014-06-28 20:57:06
阅读次数:
259
classList属性究竟是干什么的,我们先撇下classList不管。我们考虑这么一个问题,那就是我们如何将拥有多个类名的元素中的其中一个类名删除呢?梦龙较劲脑汁儿终于想到一个实现的方法。将拥有类名li、meng和long,三个类名中的类名meng删除。代码如下 HTML代码view sourc....
分类:
Web程序 时间:
2014-06-28 20:41:37
阅读次数:
317
一. 二进制转换成图片?12345MemoryStream ms = new MemoryStream(bytes);ms.Position = 0;Image img = Image.FromStream(ms);ms.Close();this.pictureBox1.Image二. C#中byt...
分类:
其他好文 时间:
2014-06-28 20:02:37
阅读次数:
211
Interlockedsimplearithmetic operations are not atomic.Interlocked类提供了一个专门的机制用于完成这些特定的操作。这个类提供了Increment、Decrement、Add静态方法用于对int或long型变量的递增、递减或相加操作Inte...
分类:
其他好文 时间:
2014-06-21 12:06:35
阅读次数:
320
求最大公约数可采用辗转相除法,其流程如图所示。最小公倍数就是两个整数的乘积除以其最大公约数。 1 #include 2 3 int main() 4 { 5 unsigned long a, b, c=0; //两个整数和临时变量 6 unsigned long lc...
分类:
其他好文 时间:
2014-06-18 09:34:46
阅读次数:
243
代码如下:
#define OTL_BIGINT long long
#define OTL_STR_TO_BIGINT(str,n) { n=atoll(str); }
#define OTL_BIGINT_TO_STR(n,str) { sprintf(str,"%lld", n); }
#include "otlv4.h"// include the...
分类:
数据库 时间:
2014-06-18 08:08:31
阅读次数:
546
水题,一个小模拟,规律也好找
f3 = f1 * 2 + f2;
#include
#include
#include
#include
#include
const int INF = 1e8;
const int N = 100;
#define ll long long
using namespace std;
int a[251][N];
int b[N] = {0};
in...
分类:
其他好文 时间:
2014-06-18 07:28:29
阅读次数:
190
一.对移位操作的基本概述:
1、什么样的数据类型可以直接移位
char、short、int、long、unsigned char、unsigned short、unsigned int、unsigned long都可以进行移位操作,而double、float、bool、long double则不可以进行移位操作。
2、有符号数据类型的移位操作
对于char、short、int、lon...
分类:
其他好文 时间:
2014-06-18 06:59:15
阅读次数:
260
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3037
推出公式为C(n + m, m) % p, 用Lucas定理求大组合数取模的值
代码:
#include
#include
#include
using namespace std;
int t;
long long n, m, p;
long long pow(long lon...
分类:
其他好文 时间:
2014-06-18 06:06:54
阅读次数:
255
实例定位 h2 元素:h2 { position:absolute; left:100px; top:150px; }亲自试一试浏览器支持IEFirefoxChromeSafariOpera所有主流浏览器都支持 position 属性。注释:任何的版本的 Internet Explorer...
分类:
Web程序 时间:
2014-06-17 23:41:59
阅读次数:
409