- 浏览: 338699 次
- 性别:
- 来自: 郑州
最新评论
-
Aceslup:
很感谢分享。清晰的思路。
linux安装php,gd支持jpeg -
u011467537:
最后那个问题解决了么?
android,view的执行过程onDraw、onSizeChanged,onFinishInflate -
kerme:
写的很好,但是查出来的unicode格式的前两个字节输出是-1 ...
字符编码原理 ASCII,Unicode和UTF-8 -
ling凌yue月:
Errorize 写道 你是不是搞错了?Java代码是这样子的 ...
数组转换为树 -
Errorize:
你是不是搞错了?Java代码是这样子的么?
数组转换为树
文章列表
“网速咋这么慢呀”
“后台不能上传图片了”
“后台挂了?。。”
公司同事纷纷抱怨。
作为公司技术人员当然不能用等等就好了来搪塞了。于是我就开始了除马经历。
首先登上登上路由器,监控公司电脑的 ...
textadept http://foicica.com/textadept/
properties.lua
buffer.tab_width = 4
buffer.use_tabs = true
buffer.wrap_mode = buffer.WRAP_WORD
-- 显示空白字符
--buffer.view_ws = buffer.WS_VISIBLEALWAYS
buffer.virtual_space_options = buffer.VS_NONE
buffer.wrap_visual_flags = buffer.WRAPVISUALFLAG_MARG ...
javascript 设置cookie
function getCookie(key){
var cookieValue = document.cookie;
var cookieValueArr = cookieValue.split(';');
var getKey = function (cookieValueArr, k){
if(!cookieValueArr || cookieValueArr.length <= 0){
return null;
}else{
var ckv = cookieValueArr.shift( ...
//将对象参数加入到url中,如果原来url中有则覆盖
function addToUrl(obj){
var aprotocol = location.protocol;
var ahost = location.host;
var apath = location.pathname;
var asearch = location.search;
var ahash = location.hash;
var result = '';
console.log(obj);
var joinObj = function(joinObj_ ...
//后缀表达式求值
function calculate($equation = ''){
if(empty($equation)){
return 0;
}
//声明各个符号的算法函数
$operations = array('+' => function($param1, $param2){
return $param1 + $param2;
}, '-' => function($param1, $param2){
return $param1 - $par ...
//根据身份证号得到信息
public static function getIDCardInfo($idCard){
if(preg_match('/^\d{17}[0-9xX]$/', $idCard) != 1){
return false;
}
$area = '';
$year = substr($idCard, 6, 4);
$month = substr($idCard, 10, 2);
$day = substr($idCard, 12, 2);
$sex = (int)((int)substr($idCard ...
/**
* 得到最大公因数
*
*/
function getGreatestCommonFactor($a, $b){
if($a < 0 || $b < 0){
return false;
}
if($b > $a){
return getGreatestCommonFactor($b, $a);
}else{
if($a % $b == 0){
return $b;
}else{
return getGreatestCommonFactor($b, $a % $b);
}
}
...
set nu
set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8
set fileencodings=ucs-bom,utf-8,cp936
set fileencoding=utf-8
"
set autoindent
set cindent
set tabstop=4
set softtabstop=4
set shiftwidth=4
set noexpandtab
set i ...
hcproject
- 博客分类:
- javascript
===============================================================
====================== ===========================
公司首页,公司简介,合作平台 产品分类,招贤纳士,联系我们
============================================================= ...
The JavaScript Event Loop: Explained
Posted on October 27, 2013 by
/*
* 随即alert出数组的值
* a表示数组
*/
function alert1(a)
{
var alength = a.length;
if (alength > 1)
{
var r = random1(0,alength);
alert(a[r]);
a[r] = -1;
var temp = Array(alength-1);
var t = false;
for(var i = 0; i<a.length; i++ ...
/**
* $sourceArr 原来的数组
* $key 主键
* $parentKey 与主键关联的父主键
* $childrenKey 生成的孩子的键名
*
*/
function arrayToTree($sourceArr, $key, $parentKey, $childrenKey)
{
$tempSrcArr = array();
foreach ($sourceArr as $v)
{
$tempSrcArr[$v[$key]] = $v;
}
$i = 0;
$ ...
UTF-8编码范围:
1个字节:00——7F
2个字节:C080——DFBF
3个字符:E08080——EFBFBF
4个字符:F0808080——F7BFBFBF
二进制:
1个字节:0XXXXXXX
2个字节:110xxxxx 10xxxxxx
3个字符:1110xxxx 10xxxxxx 10xxxxxx
4个字符:11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
js 生成随机数
function getRandomNum(len){
var a = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
var str = '';
var min = 0; //包括
var max = 61;//包括
for (var i = 0; i < len; i++)
{
var ran = Math.round(min + (Math.random() * (max - min)) ...
FAQ: Using Sequences in PostgreSQL
Many of the questions asked in #postgresql revolve around using sequences in PostgreSQL. To avoid answering the same questions again and again, I thought it would be worthwhile to summarize the basic steps involving in using sequences in PostgreSQL.
What Is A Seq ...