对于android里的接口类,直接new!!!
手机SD卡路径获取
通过代码,获取sd卡路径。
获取SDcard:mnt/sdcard
注意要补充上【反斜杠】!!!
String path=Environment.getExternalStorageDirectory().getAbsolutePath();
System.out.println(path);
获取SDca...
分类:
移动开发 时间:
2015-03-11 00:47:53
阅读次数:
275
最近在学JSP,在学习处理get方式提交数据出现乱码问题的时候,对其中的一个解决方法new String(s.getBytes("iso-8859-1"),"utf-8");产生了疑问,就是为什么要使用s.getBytes("iso-8859-1")? 当时只这样想的:客户端向服务器发送一个请...
分类:
Web程序 时间:
2015-03-11 00:42:44
阅读次数:
170
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S="ADOBECODEBA...
Android开发中如果需要用到某个资源,直接使用R.drawable.**文件即可。但是如果一开始无法知道具体加载哪个资源文件,必须在程序中动态获取ID值并加载。而加载过程是使用文件名来加载的,方式如下:
public static String RESOURCE_PATH = "android.resource://packagename/";
假设存在一个名为content_icon的资...
分类:
移动开发 时间:
2015-03-10 23:14:58
阅读次数:
209
#include#include#include#includeusing namespace std;int n;string deal(string s,int &e) //【思维】1:吸收多余0:。2:找到“.”判断与1的大小。3:去除“.”的同时统计10的指数(正负与st...
分类:
其他好文 时间:
2015-03-10 23:03:07
阅读次数:
365
C#未借助第三方组件,自己封装通用类,生成PDF文件。调用方式: //路径 string path = @"C:\yuannwu22.pdf"; //内容 string strContent = "ddd3232...
分类:
Web程序 时间:
2015-03-10 23:02:21
阅读次数:
193
import java.io.*;public class Demo1{ public static void main(String args[]) { String df="12.2"; float a=Float.parseFloat...
分类:
编程语言 时间:
2015-03-10 22:59:42
阅读次数:
246
Restore IP Addresses问题:Given a string containing only digits, restore it by returning all possible valid IP address combinations.思路: dfs + 回溯模板我的代码1:....
分类:
其他好文 时间:
2015-03-10 22:59:02
阅读次数:
228
函数void是没有返回值,括号内是参数private只能在当前类里面用,public公用的,可以在整个命名空间使用函数 函数创建与使用 示例一 身份证截取 static public string jiequ(string a) { string p = a.Substring(6, 8); C.....
分类:
其他好文 时间:
2015-03-10 22:58:42
阅读次数:
153
protected string GetVCode(int num) //生成验证码的方法 { char[] cha = new char[] {'1','2','3','a','b','c','e','f' }; ...
分类:
其他好文 时间:
2015-03-10 22:53:01
阅读次数:
197