转载链接:http://blog.csdn.net/tskyfree/article/details/8121951 一、概念: 换行符‘\n’和回车符‘\r’ (1)换行符就是另起一行 '\n' 10 换行(newline) (2)回车符就是回到一行的开头 '\r' 13 回车(return) 所 ...
/** * 模拟post进行url请求 * @param string $url * @param array $post_data * @return bool|mixed */function request_post($url = '', $post_data = array()){ if ( ...
分类:
Web程序 时间:
2016-09-02 13:29:23
阅读次数:
197
<?php function hex_encode($s) { $s = iconv('UTF-8', 'GBK', $s); return preg_replace('/(.)/es', "str_pad(dechex(ord('\\1')),2,'0',STR_PAD_LEFT)", $s); ...
分类:
其他好文 时间:
2016-09-02 13:17:21
阅读次数:
134
/*** * Unicode字符转换成字符串 * @param str * Unicode字符 * @return * String * * @author WXW */ public static String Unicode2String(String str){ Pattern pattern ...
分类:
其他好文 时间:
2016-09-02 13:17:00
阅读次数:
120
//去除空格 function trim(str) { return str.replace(/\s|\xA0/g,""); } /** *js数组转json * */ function arrayToJson(o) { var r = []; if (o==undefined||o==null) ...
分类:
编程语言 时间:
2016-09-02 11:37:26
阅读次数:
168
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { exit(); return false; } return super.onKeyDo ...
分类:
其他好文 时间:
2016-09-02 11:17:27
阅读次数:
154
注入属性:private synchronized void injectReferenceServices() { if(this.injectReferenceServicesInitialized) return; PropertyDescriptor[] pds = PropertyUtil ...
分类:
其他好文 时间:
2016-09-02 00:45:14
阅读次数:
130
Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example:Given a = 1 and b = 2, return 3. 个人思路:绕开+、-,利用 ...
分类:
其他好文 时间:
2016-09-02 00:37:34
阅读次数:
130
[题目] Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: Note: You may assum ...
分类:
其他好文 时间:
2016-09-02 00:22:19
阅读次数:
194
1 /** 2 * [impress description] 定义 impress 函数 3 * @param {[type]} rootId [description] 4 * @return {[type]} [description] 5 */ 6 var impress = window. ...
分类:
Web程序 时间:
2016-09-02 00:22:06
阅读次数:
286