码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
从头开始学JavaScript 笔记(三)——数据类型
一、分类基本数据类型:undefined、null、string、Boolean、number复杂数据类型:objectobject的属性以无序的名称和值对的形式 (name : value) 来定义二、详解1、undefined:undefined类型只有一个值:undefined,在使用var对...
分类:编程语言   时间:2015-01-08 20:08:04    阅读次数:316
取北京时间,纽约时间,班加罗尔时间
/** * 取北京时间 * @return */ public static String getBeijingTime(){ return getFormatedDateString(8); } /** * 取班加罗尔...
分类:其他好文   时间:2015-01-08 20:01:09    阅读次数:194
java中的switch用String作为条件
在开发java程序的过程中,我们遇到了条件推断首选就是switch,可是java中的switch功能不支持字符串作为条件。这时我们该怎么办呢? ——使用枚举。一、枚举简单了解 1、enum是一种数据类型。特殊:是指在枚举中将变量的值一一列出来,变量的值仅仅限于列举出来的值的范围内。特殊到一般化:en...
分类:编程语言   时间:2015-01-08 19:48:18    阅读次数:215
Selenium WebDriver 自动化测试 第一章
1.打开浏览器,并最大化窗口 public static void main(String args[]) {// System.setProperty("webdriver.firefox.bin", "C:\\Program Files (x86)\\Mozilla Firefox\...
分类:Web程序   时间:2015-01-08 19:28:41    阅读次数:187
break continue label 学习笔记
classTestBreakContinue{ publicstaticvoidmain(String[]args){ for(inti=1;i<=10;i++){ if(i%4==0){ //break; continue; } System.out.println(i); } label:for(inti=1;i<5;i++){ for(intj=1;j<=10;j++){ if(j%4==0){ //breakl..
分类:其他好文   时间:2015-01-08 18:17:24    阅读次数:119
输出100000以内的质数 (优化2)
class TestPrinmeNumber{ publicstaticvoidmain(String[]args){ //booleanflag=false; longstart=System.currentTimeMillis(); l:for(inti=2;i<=100000;i++){//实现100以内的循环 for(intj=2;j<Math.sqrt(i);j++){//优化3 if(i%j==0){ //flag=tru..
分类:其他好文   时间:2015-01-08 18:17:21    阅读次数:132
[LeetCode]139 Word Break
https://oj.leetcode.com/problems/word-break/http://blog.csdn.net/linhuanmars/article/details/22358863publicclassSolution{ publicbooleanwordBreak(Strings,Set<String>dict) { s="#"+s;//Addadummychar intlen=s.length(); boolean[]poss=newboolean[len]; poss..
分类:其他好文   时间:2015-01-08 18:15:49    阅读次数:104
完数 学习笔记
classTestWanShu{ publicstaticvoidmain(String[]args){ intfactor=0; for(inti=1;i<=1000;i++){ for(intj=1;j<i;j++){ if(i%j==0){ factor+=j; } } if(i==factor){ System.out.println(i); } factor=0; } } }
分类:其他好文   时间:2015-01-08 18:15:21    阅读次数:129
org.hibernate.TransactionException: nested transactions not supported
public PlUser findByUsernameAndPassword(String username, String password) { Session sx = this.getHibernateTemplate().getSessionFactory().openSession(); Transaction tx =...
分类:Web程序   时间:2015-01-08 18:12:16    阅读次数:489
LeetCode--Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space. class Solution { public: bool isPalindrome(int x) { if(x < 0) return false; int org = ...
分类:其他好文   时间:2015-01-08 18:12:09    阅读次数:124
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!