- 博客(26)
- 资源 (42)
- 问答 (1)
- 收藏
- 关注
原创 linux之使用md5sum命令比较两个文件是否一样
1、md5sum命令介绍md5sum命令用于生成和校验文件的md5值。它会逐位对文件的内容进行校验。是文件的内容,与文件名无关,也就是文件内容相同,其md5值相同2、比较文件1)、生产文件的md5md5sum file1md5sum file2会有结果显示2)、批量生成md5文件md5sum * 3)、二进制模式读
2017-04-26 21:01:17 15912 3
原创 Android之Content和activity、service、Application关系和attachBaseContext函数调用的时候
1、Content和activity、service、Application关系2、Application里面attachBaseContext和onCreate函数调用顺序Application-> attachBaseContext ();ContentProvider:onCreate()Application:onCreate()
2017-04-25 23:53:14 22905
原创 Android之用UncaughtExceptionHandler实现保存崩溃日志到sdcard目录下的文件夹
1、异常和UncaughtExceptionHandler的介绍1)、Java异常处理机制中:如果抛出的是Exception异常的话,需要有try catch进行处理,属于可以捕获exception。如果抛出的是RuntimeException异常的话,发生异常之后将由JVM进行处理,属于不可捕获exception。2)、Java 异常的分类:基类为:Throwable
2017-04-24 21:26:07 2813
原创 Android Studio之debug调试卡在waiting for debugger界面的解决办法
1、问题Android Studio debug调试项目卡在waiting for debugger界面2、解决办法一开始从启adb服务adb stop-serveradb start-server发现没什么用,然后呢,估计是很多app再运行,然后我就重启了Android studio,问题就解决了如果要是万一还不行,那就重启电脑吧
2017-04-21 10:56:36 11201 1
原创 java之MessageDigest简单使用总结
1、说明MessageDigest是Java自带的类2、简单代码比如我们需要实现md5,或者sha加密public class MD5AndSHA { public final static String MD5_SHA(String s, String method) { char hexDigits[] =
2017-04-20 21:39:11 12509 1
原创 Android之解决java.lang.NoSuchMethodError:android.os.powerManager.isInteractive问题
1、问题再三星平板(Android 4.2.2系统)我们代码powerManager调用了函数isInteractive方法,出现下面错误java.lang.NoSuchMethodError:android.os.powerManager.isInteractive2、解决办法1、一开始想用try catch来解决,肯定不行,功能没实现,而且进程还是会
2017-04-19 21:20:56 8469 1
原创 Android之如何让Android studio编译更快
1、开启gradle单独的守护进程在下面的目录下面创建gradle.properties文件/home//.gradle/ (Linux)/Users//.gradle/ (Mac)C:\Users\\.gradle (Windows)最好是从一个项目里面拷贝过来然后修改下#Project-wide Gradle settings.# IDE (e.g. Androi
2017-04-19 20:58:58 3232
原创 linux之类似Windows的资源管理器gnome-system-monitor(可用这个杀死进程)
1、使用直接运行下面命令gnome-system-monitor如果没有安装用下面命令安装sudo apt-get install gnome-system-monitor2、结果可以点击右键然后杀死相关进程,这也是杀死进程的办法。
2017-04-19 20:14:31 12425
原创 Android之什么时候调用onSaveInstance方法的时候(为什么按Home键盘会调用,按Back不调用)
1、函数介绍1)、onCreate(Bundle savedInstanceState) 方法Activity 创建时回调 : 该方法会自动传入一个 Bundle 对象, 该 Bundle 对象就是上次被系统销毁时在 onSaveInstanceState 或者 onRestoreInstanceState 中保存的数据-- 注意 : 只有是系统自动回收的时候才会保存 Bundle 对
2017-04-18 00:51:35 14111
原创 Android之用命令uninstall卸载apk和用 -i 过滤日志忽略大小写
1、卸载apkadb uninstall package adb uninstall ***.apk上面是正确的,记得是加包名,不是apk
2017-04-17 11:50:41 4205
原创 java之简单的Callback使用总结
1、什么是Callback,什么时候需要使用Callbackcallback是回调的意思,一般我们需要2个类需要相互掉用,一个类把数据动态传递给另外一个类的时候,可以用这种方式,比如Android里面的Launcher类和LauncherModel类,LauncherModel里面有接口很多没有实现的方法,Launcher实现LauncherModel的接口,实现方法,传递数据给Launche
2017-04-12 01:14:34 6138
原创 LeetCode之Sqrt(x)
1、题目Implement int sqrt(int x).Compute and return the square root of x.Subscribe to see which companies asked this question.2、代码实现public class Solution { public int my
2017-04-11 01:14:27 2587
原创 Android之机端安装apk出现INSTALL_FAILED_INSUFFICIENT_STORAGE错误的解决方法
1、错误INSTALL_FAILED_INSUFFICIENT_STORAGE2、解决办法是由于手机存储不足了,删除一些app,给手机留下足够的空间即可。
2017-04-10 20:37:07 10273
原创 LeetCode之Relative Ranks
1、题目Given scores ofNathletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and "Bronze Medal".Exampl
2017-04-10 01:44:29 2541
原创 LeetCode之Construct the Rectangle
1、题目For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now is to design a rectangular web page, whos
2017-04-09 23:46:37 2439
原创 Android之解决360奇酷手机控制台打印全等级日志(默认只打印W、E等级日志)
1、问题360奇酷手机很奇葩,默认安卓日志只打印等级W、E,现在我想打印所有等级日志2、解决办法1、在桌面点击拨号,在拨号盘输入“*20121220#”,进入工程模式;2、点击“日志输出等级”3、选择下面的选项Log print enable 选 enableJava log level 选 LOGVC and C++ log level 选 LOG
2017-04-09 14:39:42 5405 6
原创 LeetCode之Two Sum II - Input array is sorted
1、题目Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two
2017-04-09 14:16:37 2634
原创 LeetCode之Power of Two
1、题目Given an integer, write a function to determine if it is a power of two.Credits:Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases.Subscribe t
2017-04-08 23:46:30 2464
原创 LeetCode之Happy Number
1、题目Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the s
2017-04-08 22:23:16 2394
原创 LeetCode之Maximum Depth of Binary Tree
1、题目Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.Subscribe to see which compa
2017-04-07 23:02:00 2495
原创 LeetCode之Sum of Two Integers
1、题目Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.Example:Given a = 1 and b = 2, return 3.Credits:Special thanks to @fujiaozhu for addi
2017-04-07 22:05:17 2659
原创 LeetCode之Detect Capital
1、题目Given a word, you need to judge whether the usage of capitals in it is right or not.We define the usage of capitals in a word to be right when one of the following cases holds:All letter
2017-04-07 20:49:22 2409
原创 LeetCode之Number Complement
1、题目Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation.Note:The given integer is guaranteed to fit within the
2017-04-07 20:19:44 2366
原创 LeetCode之Excel Sheet Column Number
1、题目Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ..
2017-04-02 01:32:33 2450
Android之常用命令和工具.pdf
2021-04-01
math-basics.rar
2019-08-01
c_log_to_file.txt
2019-06-15
Source Insight黑色和灰色的背景配置
2019-04-23
Xshell5(Xshell5免费)
2019-03-21
linux shell脚本攻略2
2019-03-06
xshell(windows)
2018-12-05
Android打印当前app的日志工具类
2018-09-20
pidcat.py_in_ubuntu
2018-05-12
pc web access phone file
2017-12-25
MPAndroidChart让(折线图、柱形图、饼状图、散列图、雷达图)优雅的舞动
2015-11-30
手机摇一摇震动刷新(支持ListView GridView WebView)
2015-11-09
Android怎么sp怎么确保多进程
2018-05-23
TA创建的收藏夹 TA关注的收藏夹
TA关注的人