自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

卓越无关环境,保持空杯心态——靡不有初,鲜克有终

永远热爱,永远热泪盈眶,永远在路上。

  • 博客(22)
  • 资源 (5)
  • 收藏
  • 关注

原创 将数组转换成集合Arrays.asList,不可进行add和remove操作的原因

直接上代码:import java.util.Arrays;import java.util.List;public class Test { public static void main(String[] args) { Integer a[] = {1,2,5,6,9}; List<Integer> list = Array...

2018-05-30 17:44:05 15852 5

原创 android的apk在oppo手机无法安装(安装包没有签名文件)

在华为手机可以安装,却在oppo手机无法安装,这是怎么回事呢?原来在打包问题上之前仅仅只勾选了第二个,现在把两个都勾上,然后打包安装到oppo手机,完美解决!========================================Talk is cheap, show me the code=======================================...

2018-05-26 11:24:30 31714 3

原创 如何获得开发版SHA1和发布版SHA1

win+r打开“运行”,输入cmd打开命令提示符在命令提示符中输入“cd  .android”(中间有个空格)让后将这一命令 keytool -list -v -keystore debug.keystore 右击粘贴复制到你的命令提示符中,至于命令提示符中的粘贴复制可以参考以下经验,然后回车接下来跳出一行中文要我们输入密钥库口令,其实没有口令,直接回车即可获得发布版的SHA1,需要你先打包签名生...

2018-05-25 19:27:32 6821

原创 java方法传值还是传递引用(系统的分析一下)

在网上看了其他一些博主写的,觉得写的不太明了,或者有些情况没有涉及到甚至有一些小错误,我来给完善补充一下。public static void main(String[] args) { int num1 = 10; int num2 = 20; swap(num1, num2); System.out.println("num1 = " + num1); ...

2018-05-24 21:50:24 6637

原创 144. Binary Tree Preorder Traversal(二叉树的前序遍历)

题目地址:https://leetcode.com/problems/binary-tree-preorder-traversal/description/Given a binary tree, return the preorder traversal of its nodes' values.Example:Input: [1,null,2,3] 1 \ ...

2018-05-24 20:58:12 6114

原创 关于按位取反~和负数的二进制输出问题

public class test { public static void main(String[] args) { short a = (short) 0; System.out.println(~a); }}结果输出 -1分析:a=0x0000, ~a=0xffff,二进制为1111 1111 1111 1111,当你要输出的时候,编译器发...

2018-05-23 11:20:48 7697 2

原创 290. Word Pattern(单词模式)(Integer的坑)

题目地址:https://leetcode.com/problems/word-pattern/description/Given a pattern and a string str, find if str follows the same pattern.Here follow means a full match, such that there is a bijection be...

2018-05-22 23:06:04 6758

原创 268. Missing Number(缺失数字)

题目地址:https://leetcode.com/problems/missing-number/description/Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.Example 1:Inpu...

2018-05-22 16:22:46 6500

转载 Java中Synchronized的用法

原文:http://blog.csdn.net/luoweifu/article/details/46613015 作者:luoweifu 《编程思想之多线程与多进程(1)——以操作系统的角度述说线程与进程》一文详细讲述了线程、进程的关系及在操作系统中的表现,这是多线程学习必须了解的基础。本文将接着讲一下Java线程同步中的一个重要的概念synchronized.synchronized是Java...

2018-05-17 20:43:02 6776

原创 构造器里面的super()有什么用?到底写不写?

平时写的单独一个类如果没有直接继承父类就是直接继承的Object,有父类就是间接继承的Object,因为父类会继承Object,java的所有类都是Object的子类,哪怕不写super(),也会默认调用的父类的空构造器。接下来举个例子class A{ public A() { System.out.println("A的无参数构造器"); } p...

2018-05-15 17:03:21 14319 15

转载 android studio快速导入其他人的项目,避免下载gradle长时间卡住

原文地址:https://blog.csdn.net/csdn_0012306/article/details/54706696拷贝下来,方便自己查阅简单开始吧,先给大家介绍一下导入别人项目慢的原因吧。主要是因为gradle版本不匹配所致。当gradle的版本不一致时,android studio会自动去下载匹配的gradle版本,而这个下载地址是国外的,特别慢,需要翻墙,不然肯定特别...

2018-05-13 20:15:32 7500

转载 Android Studio打包生成apk安装到真机

直接把debug版本安装到真机会出现问题,和模拟器显示上的不一致。。亲身试验接下来综合总结一下我看到其他博主们的经验为什么要打包:apk文件就是一个包,打包就是要生成apk文件,有了apk别人才能安装使用。打包分debug版和release包,通常所说的打包指生成release版的apk,release版的apk会比debug版的小,release版的还会进行混淆和用自己的keystore签名,以...

2018-05-12 23:35:53 42405

原创 Android Studio的代码没错,运行时logcat会出现红色语句解决方法

不断的运行调试某一个项目,点击之后logcat会出现想不到的红色语句,或者切换项目打开出现R文件报红。解决方法:点击Build----Clean Project再次调试发现没有红色语句,Error没有语句了,解决!  ====================Talk is cheap, show me the code======================== ...

2018-05-11 18:59:42 8718

原创 541. Reverse String II(反转字符串 II)

题目地址:https://leetcode.com/problems/reverse-string-ii/description/Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the st...

2018-05-10 21:54:09 6961

原创 Android Studio快速自动生成findViewById

首先,Ctrl + Alt +S,打开settings找到plugins,点击Browse repositories...在搜索框中输入findViewByMe,找到它并安装重启Android studio在写好的xml文件 中,右击找到findViewByMe(记住是在xml文件中进行该步操作),然后就可以快速获得findViewById,这里要手动复制到class文件中这时候控件的名字你可能不...

2018-05-10 18:30:08 24325 1

原创 你真的了解android的layout_weight属性吗?

如下代码所示,会出现什么现象? <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal"> <TextView ...

2018-05-10 12:12:19 7732

原创 572. Subtree of Another Tree(另一个树的子树)

题目地址:https://leetcode.com/problems/subtree-of-another-tree/description/Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of...

2018-05-07 17:06:39 7199

原创 441. Arranging Coins(排列硬币)(可用二分搜索)

题目地址:https://leetcode.com/problems/arranging-coins/description/You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins.Given n, find ...

2018-05-06 09:54:01 7299

原创 67. Add Binary(二进制求和)

题目地址:https://leetcode.com/problems/add-binary/description/Given two binary strings, return their sum (also a binary string).The input strings are both non-empty and contains only characters 1 or 0...

2018-05-05 21:29:55 6838

原创 58. Length of Last Word(最后一个单词的长度)

题目地址:https://leetcode.com/problems/length-of-last-word/description/Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the strin...

2018-05-05 20:34:55 6846

原创 724. Find Pivot Index(寻找数组的中心索引)

题目地址:https://leetcode.com/problems/find-pivot-index/description/Given an array of integers nums, write a method that returns the "pivot" index of this array.We define the pivot index as the index ...

2018-05-05 20:21:33 6950

原创 字符串表达式展开(比如abc3[a]就为abcaaa,aa3[bc2[d]]e就为aabcddbcddbcdde)

        给出一个表达式s,此表达式包括数字,字母以及方括号,在方括号前面的数字表示方括号里面的内容重复的次数(括号内的内容可以是字符串或另一个表达式),请编写程序将这个表达式展开成一个字符串。输入样例:(每一行输入一个表达式)abc3[a]3[abc]4[ac]dy输出样例:(每一行输出表达式s展开成的字符串)abcaaaabcabcabcacacacacdy提示:样例没有给出嵌套的情况,...

2018-05-05 17:27:44 8247

图文并茂让你必须弄懂viewport配套示例代码.rar

https://blog.csdn.net/qq_34115899/article/details/105717845配套代码

2020-05-01

chrome插件

安装在新版chrome会失败,用这个直接导入,可以在chrome://version插件extensions,去里面找到位置放就行

2020-04-19

Vue.js视频教程代码2--11讲.rar

vue推广视频代码,仅供学习,不喜欢请勿下载。vue推广视频代码,仅供学习,不喜欢请勿下载。vue推广视频代码,仅供学习,不喜欢请勿下载

2019-12-29

900多个安卓开发小图标精美小图标很漂亮

基本图标,可供使用,分值不高,可供下载。图标去帮助我们设计更好看的UI。。。可供学习

2018-04-20

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除