Java基础复习笔记系列之常用类1、String类介绍。 首先看类所属的包:java.lang.String类。 再看它的构造方法:2、 String s1 = “hello”; String s2 = “hello”;结论:s1 == s2. 字符串常量放在data区。3、 String...
分类:
编程语言 时间:
2015-03-16 19:18:53
阅读次数:
190
一、部分代码package com.minirisoft;import java.util.*;public class Sizeyunsuan { public static void main(String[] args){ Scanner input=new Scanner(System......
分类:
其他好文 时间:
2015-03-16 19:06:12
阅读次数:
95
一、引言遇到一个问题:使用加密库对数据进行加密,得到密文,使用string进行保存并传输,然后可以正确解密出来,但是使用string.c_str()进行参数传递则无法正确解密出明文。原因是:密文中有个字节是0,导致传参数时char数组被截断,但是使用string为什么不会截断呢,string类的实现...
分类:
编程语言 时间:
2015-03-16 19:04:54
阅读次数:
209
1.对字符中的“()”的内容剪切; 1 local num1 = string.find(str1,"(");2 local num2 = string.find(str1,")");3 4 local str2 = string.sub(str1,0,num1...
分类:
其他好文 时间:
2015-03-16 19:01:29
阅读次数:
115
1.xml配置文件
2.controller
@RequestMapping("excelAction")
public String excelAction(Map map){
// 传给ViewExcel的值
map.put("p1", "hello");
map.put("p2", "world");
return "view...
分类:
编程语言 时间:
2015-03-16 17:52:43
阅读次数:
159
1、首先是要先下载 FaceBook SDK Android 版;
2、导入FaceBookSDK 作为Library 引入到自己的项目中
3、在FaceBook 注册一个 测试应用
4、配置AndroidManifest.xml:
在String 中添加:
15484406420746645、添加 Facebook 登录按钮 :
<c...
分类:
移动开发 时间:
2015-03-16 17:51:33
阅读次数:
211
前台页面带着areaid参数请求更新此id的数据,跳转到更新数据页面时需要在更新页面先填充上原来的数据。用request.setAttribute和request.getAttribute的搭配使用来解决此问题。
@RequestMapping(value="area_updateInput.action")
public String areaUpdateInput(int areaId...
分类:
其他好文 时间:
2015-03-16 17:50:33
阅读次数:
102
import java.io.IOException;
import java.util.*;
public class Two {
public static void main(String[] args)throws IOException{
Scanner sc=new Scanner(System.in);
System.out.println("请输入一个字符串");
S...
分类:
编程语言 时间:
2015-03-16 17:49:57
阅读次数:
158
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
For example,
"A
man, a plan, a canal: Panama" is a palindrome.
"race
a car" is no...
分类:
其他好文 时间:
2015-03-16 17:48:39
阅读次数:
117
上了数据挖掘这门课,想做个小例子。基本思路是根据配置文件打开相应的网址,再根据内容的分类信息自动选择符合的文章进行保存。考虑到效率,采用多线程方式。才完成一个基本框架。包括读取配置文件、打开网址、保存文件;后续还有很多工作,解析网页,分析类别等。感觉最大的工作量是网页分析,和数据挖掘关系不大啊,不知道符不符合要求。代码如下:
public static void main(String[] a...
分类:
其他好文 时间:
2015-03-16 17:45:49
阅读次数:
87