java 取整 (-)Math类 1.Math.floor : 返回double值,小于目标值的最大整数。 例 : String v = "13.5"; Math.floor(Double.parseDouble(v)); 结果 :13.0。 Str...
分类:
编程语言 时间:
2014-11-11 14:06:22
阅读次数:
250
PHP网站,我们经常会遇到按照汉字的首拼排序,如城市,如分类等,那么我们就需要把首字首拼转换为英文字母,下面的函数就可以帮我们实现:function getFristchar($str) { if(empty($str)){return '';} $fchar=ord($str{0});...
分类:
其他好文 时间:
2014-11-11 12:20:08
阅读次数:
152
dict()函数可通过其它映射或者(键,值)这样的序列建立字典 // dict 并不属于函数,它是像list tuple str一样的类型items = [('name', 'gumy'), ('age', 20)]d = dict(items)或者 d = dict(name = 'gumy', ...
分类:
编程语言 时间:
2014-11-11 10:42:51
阅读次数:
206
xml字符串转xml dom经常遇到在js里面需要解析xml的问题,然而有时候,后台返回的不是dom 而是string 字符串,需要将字符串转换成dom对象,然后才可以进行节点值解析和读取function createXml(str){ if(document.all) { var xml...
分类:
Web程序 时间:
2014-11-11 10:35:04
阅读次数:
238
xml1Susake2游戏核心代码CCDictionary *strings = CCDictionary::createWithContentsOfFile("feature.xml");std::string str = ((CCString*)strings->objectForKey("1"...
分类:
其他好文 时间:
2014-11-11 02:02:30
阅读次数:
216
在customer.php的文件中,代码如下:
function showCustomer(str)
{
var xmlhttp;
if (str=="")
{
document.getElementById("txtHint").innerHTML="";
return;
}
if (window.XMLHttpRequ...
分类:
Web程序 时间:
2014-11-10 23:27:35
阅读次数:
257
for(String ss:str)//是将容器str内的数据以String类型的数据一个一个的遍历出来package 正则表达式;public class Rudolph {public static void main(String[] args) {// TODO Auto-generated method stubString[] str = new String[]{"Rudolph",...
分类:
编程语言 时间:
2014-11-10 23:26:49
阅读次数:
253
1 #include "../../st.h" 2 3 int main() 4 try{ 5 string s1="a.txt"; 6 string s2="z.txt"; 7 ifstream ifs(s1.c_str()); 8 if(!ifs) 9 ...
分类:
编程语言 时间:
2014-11-10 23:13:57
阅读次数:
311
Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings. 1 public class Solution { 2 public Str...
分类:
其他好文 时间:
2014-11-10 19:53:49
阅读次数:
228
讲解了PHP中解析URL的方法parse_url和parse_str,列出了这两个方法在php-resque源码中的使用~
分类:
Web程序 时间:
2014-11-10 19:46:01
阅读次数:
321