摘要:
renameTo public static void fun1() { //同一目录 重命名前的文件不存在 重命名后的文件不存在 File f1 = new File("file1.txt"); File f2 = new File("file2.txt"); boolean result = f 阅读全文
摘要:
Uri uri = Uri.parse("content://com.example.hello.HelloFileProvider/my_musics/0x0000600001/extend.json"); Log.i(TAG, uri.getAuthority()); Log.i(TAG, ur 阅读全文
摘要:
android 各个目录获取 不会创建文件,但是会创建databases目录 getApplicationContext().getDatabasePath("dataBase1.db") 查询的时候要带着.db,也就是包含数据库名字的后缀 会创建目录的的接口(一般的getDir接口都会创建目录) 阅读全文
摘要:
删除目录 private static boolean deleteDir(File file) { if (file == null || !file.exists()) { System.out.println("delete files fail, file doesn't exist."); 阅读全文
摘要:
java中URL有解码和编码两个库 https://www.eso.org/~ndelmott/url_encode.html String str = URLEncoder.encode(httpUrl, StandardCharsets.UTF_8); str = URLDecoder.deco 阅读全文
摘要:
public class Application extends ContextWrapper implements ComponentCallbacks2 public abstract class Service extends ContextWrapper implements Compone 阅读全文
摘要:
public String func(String string, String name, String country) { if (TextUtils.isEmpty(string) || TextUtils.isEmpty(name)) { return Constant.EMPTY_STR 阅读全文
摘要:
java在linux环境创建中文文件名文件,文件UTF-8编码,代码如下: private static void createCnFile() { try { String fileName = "中文名文件.txt"; String newName = new String(fileName.g 阅读全文
摘要:
几点问题: 1、怎么直接添加子节点 2、判断目录有效性 3、parseString有没有同步接口,或者通过回调来处理数据,感觉现在异步存在时序问题 4、for循环中的continue怎么表示 <?xml version="1.0" encoding="UTF-8"?> <resources xmln 阅读全文
摘要:
【一:下载·安装】1.下载node.js 下载地址:https://nodejs.org/en/2.安装 2.1选择Node.js runtime 2.2这里不用选择安装其他的插件(如果选择会消耗2.3g流量的)、 2.3安装完成 3.检查是否安装成功 3.1 node -v 查看node的版本 3 阅读全文