分类
- .net (22)
- adf (11)
- android (3)
- article (236)
- astronomy (1)
- block chain (8)
- C# Code (9)
- c/c++ (2)
- cache (8)
- cloud (2)
- consensus (3)
- css (2)
- cve (1)
- db (55)
- digest (1)
- english (1)
- finance (2)
- go (3)
- gps (2)
- hardware (1)
- html (2)
- http (2)
- info (19)
- iot (1)
- it (3)
- java (30)
- javascript (6)
- jsp (2)
- linux (76)
- mail (14)
- math (1)
- message (8)
- mood (4)
- mq (2)
- network (22)
- php (9)
- protocol (4)
- push/pull (2)
- python (5)
- rpc (2)
- search (4)
- servlet (1)
- space (24)
- storage (15)
- technologys (103)
- templete (1)
- virtual machine (7)
- web server (37)
- windows (12)
-
近期文章
其他操作
链接
年归档:2012年
Automatic JavaScript and CSS Packer
Notes
- JavaScript packing only works with PHP5. If you're using PHP4 the scripts will still be merged into one file, but not packed.
- A sample .htaccess file is included in the zip. Rename it and drop it in js/packed and css/packed for improved performance.
Download
A zip of the code and .htaccess can ... 继续阅读
发表在 article
Automatic JavaScript and CSS Packer已关闭评论
eclipse software update
示例:
juno: http://mirror.bit.edu.cn/eclipse/releases/juno/
eclipse国内镜像站可以在下载eclipse的时候得到.
根据eclipse源,把 http://download.eclipse.org/ 替换为 http://mirrors.ustc.edu.cn/eclipse/ 就行了,其他的也可以据此修改,然后把默认的禁用,启用自己添加的。
示例:
北京理工大学 http://mirror.bit.edu.cn/eclipse/
中国科学技术大学 http://mirrors.ust...
PHP & APC
1.下载APC扩展文件
apc-igbinary-fastlz-snap20110301-5.3-ts-vc9-x86.zip
(下载地址:http://downloads.php.net/pierre/)
将解压后的文件php_apc.dll放到 php/ext下
2.编辑PHP.INI
(1)添加 extension=php_apc.dll
(2)将下列内容添加到php.ini文件中
apc.enabled = 1
apc.shm_segments = 1
apc.shm_size = 64
apc.max_file_size = 10M
apc.sta... 继续阅读
php错误和异常
任何程序员在开发时都可能遇到过一些失误,或其他原因造成错误的发生。当然,用户如果不愿意或不遵循应用程序的约束,也会在使用时引起一些错误发生。PHP程序的错误发生一般归属于下列三个领域。
Ø 语法错误
语法错误最常见,并且最容易修复。例如,遗漏了一个分号,就会显示错误信息。这类错误会阻止脚本执行。通常发生在程序开发时,可以通过错误报告进行修复,再重新运行。
Ø 运行时错误
这种错误一般不会阻止PHP脚本的运行,但是会阻止脚本做希望它所做的任何事情。例如,在调用header()函数前如果有字符输出,PHP通常会显示一条错误消息,虽然PHP脚本继续运行,但header()函数并没有执...
base62
新浪微博的mid地址转换成短格式编码的方法,例如:
221110410216147026
转换后:
zF4mOFpN7A
比如新浪微博地址可以组装成这样:http://weibo.com/1642634100/5en0UftjV8H,其中数字是用户的id,后面的字符串是base62加密后的mid,因此通过组装这两个,可以得到信息的主体。
本文的代码,是由http://forum.open.weibo.com/read.php?tid=3236&uid=89934的博主的js代码改成php而来
贴下代码,运行和博主的一样,这里只是将mid转成短格式,其实逆向也很好改了:
<?php
$str62k...
发表在 article
base62已关闭评论
htaccess
gpg
A simple example
gpg --passphrase 111111 -c gpgtest.local
gpg --output gpgtest.local --passphrase 111111 --decrypt gpgtest.local.gpg // The following is a brief command:
gpg -o gpgtest.local --passphrase 111111 -d gpgtest.local.gpg
Note: The order seems v...
pgp,GnuPG 使用记录
工具网址:
参考一:
gpg --export [--armor] # outfile 取出的公开钥匙至 outfile中。
gpg --import [keyfile] 将公开钥匙[keyfile]加入钥匙环中。
gpg -k 列印出公开钥匙。
gpg -e -r file 加密file至binary档file.gpg中。
gpg -e -r --armor file 加密file至ASCII档file.asc中。
gpg -s file 加签file至binary档file.gpg中。
gpg -s --armor ...
创建公钥和私钥
使用 PuttyGen 创建 openSSH 格式的公钥和私钥,步骤如下:
- 启动 PuttyGen。
- 当 Putty Key Generator 屏幕出现时,单击Generate开始生成新的公钥/私钥对:
用C#.NET调用Java开发的WebService传递int,double问题
用C#.NET调用Java开发的WebService时,先在客户端封装的带有int属性的对象,当将该对象传到服务器端时,服务器端可以得到string类型的属性值,却不能得到int类型、double和DateTime类型的值(在服务端得到的均为null) 解决办法: VS2005封装WebService引用
用C#.NET调用Java开发的WebService时,先在客户端封装的带有int属性的对象,当将该对象传到服务器端时,服务器端可以得到string类型的属性值,却不能得到int类型、double和DateTime类型的值(在服务端得到的均为null)
解决办法:
VS2005封装WebS...
在dotnet中资源文件的概念和使用
什么是资源文件
在 .NET 中准备 World-Ready 程序时需要三步,Globalization,Localizability 和 Localization。在这第三步的 Localization 中就是使用资源文件最常见的地方。(本文不讨论 World-Ready 程序,或许以后在另一篇文章中)因为程序的逻辑界面需要与资源界面隔离,而资源界面就是我们所说的资源文件。顾名思义,一个资源文件中当然全是资源,不过,什么是资源?这里所谓的资源就是程序中可利用的数据,譬如:字符串、图片和任何二进制数据,包括任何类型的文件。注意一个资源文件可以有多种语言版本,举例,一个 Strings.res... 继续阅读
发表在 article
在dotnet中资源文件的概念和使用已关闭评论
简单修改使base64适用url
mysql中int、bigint、smallint 和 tinyint的区别与长度的含义
最近使用mysql数据库的时候遇到了多种数字的类型,主要有int,bigint,smallint和tinyint。其中比较迷惑的是int和smallint的差别。今天就在网上仔细找了找,找到如下内容,留档做个总结:
使用整数数据的精确数字数据类型。
bigint
从 -2^63 (-9223372036854775808) 到 2^63-1 (9223372036854775807) 的整型数据(所有数字)。存储大小为 8 个字节。
P.S. bigint已经有长度了,在mysql建表中的length,只是用于显示的位数
int
从 -2^31 (-2,147,483,648) 到 2^31 – 1 (2...
Mysql Explain 详解
Mysql Explain 详解
一.语法
explain < table_name >
例如: explain select * from t3 where id=3952602;
二.explain输出解释
+----+-------------+-------+-------+-------------------+---------+---------+-------+------+-------+
| id | select_type | table | type | possible_keys &nb...
2的64次幂
0 1 0x1
1 2 0x2
2 4 0x4
3 8 0x8
4 16 0x10
5 32 0x20
6 64 0x40
7 128 0x80
8 256 0x100
9 512 0x200
10 1024 0x400
11 2048 0x800
12 4096 0x1000
13 8192 0x2000
14 16384 0x4000
15 32768 0x8000
16 65536 0x10000
17 131072 0x20000
18 262144 0x40000
19 524288 0x80000
20 1048576 0x100000
21 2097152 0x200000
22 4194304 0x400000
23 8388608 0x800000
24 16777216 0x1000000
25 33554432 0x2000000
26 67108864 0x4000000
27 134217728 0x8000000
28 268435456 0x10000000
29 536870912 0x20000000
30 1073741824 0x40000000
31 2147483648 0x80000000
32 4294967296 0x100000000
33 8589934592 0x200000000
34 17179869184 0x400000000
35 34359738368 0x800000000
36 68719476736 0x1000000000
37 137438953472 0x2000000000
38 274877906944 0x4000000000
39 549755813888 0x8000000000
40 1099511627776 0x10000000000
41 2199023255552 0x20000000000
42 4398046511104 0x40000000000
43 8796093022208 0x80000000000
44 17592186044416 0x100000000000
45 35184372088832 0x200000000000
46 70368744177664 0x400000000000
47 140737488355328 0x800000000000
48 281474976710656 0x1000000000000
49 562949953421312 0x2000000000000
50 1125899906842624 0x4000000000000
51 2251799813685248 0x8000000000000
52 4503599627370496 0x10000000000000
53 9007199254740992 0x20000000000000
54 18014398509481984 0x40000000000000
55 36028797018963968 0x80000000000000
56 72057594037927936 0x100000000000000
57 144115188075855872 0x200000000000000
58 288230376151711744 0x400000000000000
59 576460752303423488 0x800000000000000
60 1152921504606846976 0x1000000000000000
61 2305843009213693952 0x2000000000000000
62 4611686018427387904 0x4000000000000000
63 9223372036854775808 0x8000000000000000 继续阅读
发表在 technologys
2的64次幂已关闭评论