出现乱码需要检查的项目:数据库编码、文件本身的字符集、html解析的字符集,如若上述项目编码一致仍然出现乱码,查看一下浏览器的编码,如果和设置的不一样说明上述设置有部分未成功,可以尝试使用header()函数再转化一下。FYI:1.
header("Content-type: text/html; ...
分类:
Web程序 时间:
2014-05-08 21:28:22
阅读次数:
331
当使用EF中context.SaveChanges()的时候会报一串让查看详细信息的错误,这个错误不是真正的报错原因,如果想看真正的原因,要关掉EF的验证,如下:context.Configuration.ValidateOnSaveEnabled
= false;后在调用SaveChanges()...
分类:
其他好文 时间:
2014-05-08 21:27:51
阅读次数:
256
下载SQLite3我们下载sqlite源码包,只需要其中的sqlite3.c、sqlite.h即可。最简单的一个创建表操作#include#include"sqlite3.h"intmain(intargc,char*argv[]){constchar*sql_create_table="creat...
分类:
数据库 时间:
2014-05-08 20:50:24
阅读次数:
543
-switch语句能作用在byte上,能否作用在long上,能否作用在String上?-在switch(expr1)中,expr1只能是一个整数表达式或者枚举常量,整数表达式可以是int基本类型或Integer包装类型,由于byte,short,char都可以隐式转换为int,所以这些类型以及这些类...
分类:
编程语言 时间:
2014-05-08 20:32:56
阅读次数:
371
using System;using System.Collections.Generic;using
System.Linq;using System.Text;using System.Threading.Tasks;using
System.IO;namespace DirectoryCopy...
分类:
其他好文 时间:
2014-05-08 20:30:59
阅读次数:
381
using System;using System.Collections.Generic;using
System.Linq;using System.Text;using System.Threading.Tasks;using System.IO;using
System.Net;using ...
分类:
其他好文 时间:
2014-05-08 20:30:34
阅读次数:
389
IE10下的Input Text和谷歌下面的 input search
一旦输入内容,会在最右端出现一个叉号,点击后,内容就会自动清空,看似方便,其实有些场景并不需要,需要写代码清除掉。代码如下:input::-webkit-search-cancel-button{display:
none;} ...
分类:
其他好文 时间:
2014-05-08 20:15:33
阅读次数:
644
C标准库了提供了 atoi, atof, atol, atoll(C++11标准)
函数将字符串转换成int,double, long, long long 型。 char str[] = "15.455"; double db; int i;
db = atof(str); /...
分类:
其他好文 时间:
2014-05-08 19:45:22
阅读次数:
246
题意:求最长子序列#include#includeusing namespace std;int
max(int x,int y){ if(x>y) return x; return y;}int map[1001][1001];char
s1[1001],s2[1001];int main(){ ...
分类:
其他好文 时间:
2014-05-07 20:07:29
阅读次数:
202
using System;using System.Collections;using
System.Collections.Generic;using System.IO;using System.Linq;using
System.Text;using System.Threading.Task...
分类:
其他好文 时间:
2014-05-07 19:10:55
阅读次数:
387