Java类:UserInfo
public class UserInfo {
static {
System.loadLibrary("userinfo");
}
// 从JNI中直接访问字段
public String mUserName;
public int mUserAge;
public long mMoney;
public UserInfo() {
}...
分类:
编程语言 时间:
2014-05-23 02:34:37
阅读次数:
261
为什么会有线程同步的概念呢?为什么要同步?什么是线程同步?先看一段代码:package com.maso.test;
public class ThreadTest2 implements Runnable{
private TestObj testObj = new TestObj();
public static void main(String[] args) {
Thread...
分类:
移动开发 时间:
2014-05-23 01:29:34
阅读次数:
333
Employee.java
package com.study;
public class Employee {
private int id;
private String firstName;
private String lastName;
private int salary;
public Employee() {
}
public Emplo...
分类:
系统相关 时间:
2014-05-23 01:28:18
阅读次数:
370
代码如下,在多线程AsyncTask类中的doInBackground调用Jsoup
protected String doInBackground(String... params) {
// TODO Auto-generated method stub
Log.i(TAG, "doInBackground(Params... params) called");
tr...
分类:
编程语言 时间:
2014-05-23 00:54:53
阅读次数:
475
今天在项目中遇到异常android.content.res.Resources$NotFoundException: String resource ID #0x42...
分类:
移动开发 时间:
2014-05-23 00:46:27
阅读次数:
282
package com.wsy.model;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
public class ThreadScopeShareData {
static int data;
public static void main(String[] args) {
fin...
分类:
编程语言 时间:
2014-05-23 00:38:07
阅读次数:
287
【题目】
Implement wildcard pattern matching with support for '?' and '*'.
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
The matching should cover the entire input string (not partial).
The functi...
分类:
其他好文 时间:
2014-05-23 00:17:12
阅读次数:
364
² 字符函数
1. replace( 字符串1,字符串2,字符串3)
replace( char, search_string, replace_string)
功能:在“字符串1”中搜索“字符串2”,并将其替换为“字符串3”。
例如下面的命令是将所有员工名字中出现的”A”替换为”中国”。
SQL>selectreplace(ename, 'A', '中国') fro...
分类:
数据库 时间:
2014-05-22 22:35:22
阅读次数:
450
问题:给定一个字符串,字符串中包含若干单词,每个单词间由空格分隔,将单词逆置,即第一个单词成为最后一个单词,一次类推。
说明:字符串本身可能包含前导空格或后导空格,单词间可能包含多个空格,要求结果中去掉前导和后导空格,单词间空格只保留一个。
与rotate函数类似,先逆置每个单词,再将所有字符串逆置。
void reverseWords(string &s) {
if(s.si...
分类:
其他好文 时间:
2014-05-22 18:49:26
阅读次数:
249
编写Test.java,编译完后生成Test.class文件,然后对该文件执行javap -c Test命令,生成字节码指令,阅读并得出结论
一、s1和s2指向常量池的不同常量
①java代码
public class Test {
public static void main(String[] args) throws IOException {
...
分类:
编程语言 时间:
2014-05-22 17:02:59
阅读次数:
434