自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

小小程序员

记录程序员的成长

  • 博客(90)
  • 资源 (6)
  • 收藏
  • 关注

原创 解决 macOS 下 SSH 空闲一段时间后自动断开

macOS 下使用 Terminal 连接 SSH 远程主机空闲一段时间就会进入假死状态,无法操作,短暂无响应后。遇到这种事情,非常麻烦,可能接着的命令重新开 tab 连接,前面的结果都看不到了。实质是终端没有设置心跳连接,终端连接一段时间后无法检测到心跳就会断开连接。解决办法分别包括客户端和服务端客户端配置在使用 Shell 的机器上设置,我配置后,已经解决。但找到的资料还有服务端配...

2020-04-05 23:11:14 1807

转载 MySQL: 图解 inner join、left join、right join、full outer join、union、union all的区别

转载来源对于SQL的Join,在学习起来可能是比较乱的。我们知道,SQL的Join语法有很多inner的,有outer的,有left的,有时候,对于Select出来的结果集是什么样子有点不是很清楚。Coding Horror上有一篇文章,通过韦恩图(Venn diagram,可用来表示多个集合之间的逻辑关系)。解释了SQL的Join。我觉得清楚易懂,转过来。假设我们有两张表。Table A ...

2019-08-17 16:40:13 9029

原创 KMeans 算法应用于 RGB 图像压缩

KMeans 算法应用于 RGB 图像压缩KMeans算法可以应用于图像压缩,这种压缩实质上是一种有损压缩,实质上是将原本的色彩空间进行聚类,当所聚类的数据增长时,压缩后的质量也随之增加。关于聚类算法的的介绍和具体处理步聚就是在这里细讲,主要是讲解关于 KMeans 应用于图像压缩的实质和实现从下图可以看到对一张原图使用 KMeans 使用聚类算法进行压缩时,首先要将原来的图像的所有像素放...

2019-06-02 17:33:04 1687

原创 Gradle 远程连接Hadoop HDFS编程

基于 Gradle 远程连接Hadoop HDFS编程在一个现代化的时候,界面不好看的 Eclipse 和操作易用性相比而言更高的 IntelliJ Idea。而在进行 Hadoop 进行编程的时候,最基本的是需要导入相应的 Jar 包,而更为便宜的则是使用 Maven 来进行包的依赖管理,而本文则结合 Gradle 来处理引入最基本的 Hadoop 包,配置运行环境。新建一个 Gradle ...

2019-04-05 12:30:23 593

原创 Zip 命令打包移除多余隐藏文件

一般默认没有排队时会将.DS_Store文件压缩进去,而.DS_Store是苹果系统中保存当前目录基本信息的文件,包括图标的位置,显示方式等信息。每一个目录都会有,类似windows平台的destop.ini或者是Thumbs.db。如果不想将.DS_Store或者__MacOSX…或者.svn等等打包进来,可以打开Terminal,输入下面的命令:zip -r foo.zip foo -x ...

2019-01-16 17:08:54 1528

原创 Anaconda 换源

网络上很多都是讲使用清华的源,但效果并不好,主要问题是在于使用过程中,有时候出现不稳定情况,料想可以是压力过大?所以找了找,找到中科大的源。http://mirrors.ustc.edu.cn/help/index.html#找到 Anaconda 部分按操作提示。不得不说使用了 Sphinx 来构建帮助文档,这个确实做得好,再细查看使用的是 reStructuredText 来编写的...

2019-01-14 22:49:02 2136

原创 大数据学习过程

目前抽时间开始学习大数据原理与分析,尽管还跟了大概其他九门课程,包括人工智能的原理性课程和实践性课程,但我相信这些课程都非常精彩,希望能够完成这些课程!

2018-05-01 21:59:37 341

原创 Kotlin 中的inline, noinline与crossinline

其中的inline比较好理解,就是在编译时把调用这个函数进行替换,而noinline依据字面意思也比较好理解。但这个inline与noinline结合又有一个非局部返回(Non-local returns)出现。且看下图中的官方解释 crossinline 的作用是让被标记的lambda表达式不允许非局部返回。 首先,默认内联函数的lambda表达

2018-01-14 10:47:46 3298

转载 Semantic difference between object expressions and declarations

object expressions are executed (and initialized) immediately, where they are used;object declarations are initialized lazily, when accessed for the first time;a companion object is initialized wh

2018-01-11 13:42:48 292

原创 Android 模拟器加速

最近重装的系统运行模拟器特别慢,查证了下原来硬件加速没开。由于NVDIA默认是用INTEL的核心显卡来运行桌面程序,独显在没游戏的电脑上基本没使用过,通过WINDOWS 10的新的任务管理器发现Android 模拟器运行是,GPU的使用没变化,测试一个播放器就有变化,于是Google下是模拟器有硬件加速和软件加速的。依据下图来设置。 可以通过添加程序找到qemu模拟器,找到后按

2018-01-06 13:51:43 4168

原创 记录OpenLiveWriter 各Blog配置信息

CSDN: 博客地址:http://blog.csdn.net/CSDN用户名 用户名:CSDN用户名 密码:CSDN登录密码 远程发布博客地址:http://write.blog.csdn.net/xmlrpc/index 博客园: 博客地址:http://www.cnblogs.com/博客园用户名/ 用户名:博客园用户名 密码:博客园登录密码 远程发布博客地址:无(备用:h

2018-01-02 15:42:00 556

原创 Android Studio 处理Gradle更新慢的解决办法

本次更新电脑Windows 10 激活后安装所有软件并配置软件信息花不少时间,但是在安装Android  Studio 后由于C盘格式化,gradle要重新下载,即使上了代理也下载很慢,故而找解决办法。方法一 通过Android Studio中的项目配置更改所使用的gradle 版本,修改为本机已经下载的gralde版本,这样就不用下载了。方法二 通过离线下载的办法复制到Andro

2017-12-30 11:04:42 990

原创 LeetCode:94. Binary Tree Inorder Traversal

Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binary tree [1,null,2,3], 1 \ 2 / 3return [1,3,2].Note: Recursive solution i

2017-09-27 16:38:12 301

原创 LeetCode:88. Merge Sorted Array

Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold addi

2017-09-26 21:00:44 244

原创 LeetCode:83.Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, return 1->2->3. C++ Solution: /**

2017-09-26 19:53:21 267

原创 LeetCode:83.Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, return 1->2->3. C++ Solution: /**  

2017-09-26 19:28:17 266

原创 LeetCode:67. Add Binary

题目: Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". 这道题目是一个字符串处理人位上进行运算,不清楚Python封闭好了,实现起来会不会比较麻烦。Java这里如果可以像C/C++ 直接进行二进制

2017-09-15 16:09:39 279

原创 LeetCode: 66. Plus One

Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. You may assume the integer do not contain any leading zero, except the number 0 itself. The digits a

2017-09-12 10:01:39 258

原创 LeetCode:58 Length of Last Word

Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word does not exist, return 0. Note: A word is defin

2017-09-05 17:35:22 293

原创 Ascii

Source Codes1500’lerden beri kullanılmakta olan standard Lorem Ipsum metinleri ilgilenenler için yeniden üretilmiştir. Çiçero tarafından yazılan 1.10.32 ve 1.10.33 bölümleri de 1914 H. Rackham ç

2017-08-18 14:35:17 1565

原创 LeetCode:38.Count and Say

Count and SayThe count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, …1 is read off as one 1 or 11. 11 is read off as two 1s or 21. 21 is read off as on

2017-08-10 17:59:34 318

原创 LeetCode:35. Search Insert Position

Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.Here

2017-08-09 09:19:24 241

原创 Ubuntu 16.04 apt-get更换为国内阿里云源

1,备份系统默认的源(没有root权限的前面加sudo)cp /etc/apt/sources.list /etc/apt/sources.list.bak2,修改/etc/apt/sources.list>/etc/apt/sources.listcat >>/etc/apt/sources.list<<EOF# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus

2017-08-07 22:37:39 4143

原创 LeetCode:27. Remove Element

Given an array and a value, remove all instances of that value in place and return the new length.Do not allocate extra space for another array, you must do this in place with constant memory.The order

2017-08-07 09:10:02 313

原创 LeetCode: 26. Remove Duplicates from Sorted Array

Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place with cons

2017-08-04 10:23:50 334

原创 LeetCode: 21. Merge Two Sorted Lists

QuestionMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists./** * Definition for singly-linked list. * public

2017-08-03 10:38:06 455

原创 Kotlin in Action Review Points

Charpter4Interfaces in Kotlin are similar to Java’s but can contain default implementations and properties.All declarations are final and public by default.To make a declaration no-final, mark it as

2017-07-31 11:17:27 483

转载 RecyclerView Item 布局宽高无效问题探究

转载地址:http://www.jianshu.com/p/9a6db88b8ad3前言这个问题很早之前就碰到过,后来通过google找到了解决办法,也就没有去管它了,直到最近有朋友问到这个问题,感觉很熟悉却又说不出具体原因,因此,就想通过源码分析一下。顺便做个总结,避免以后出现类似的问题。 问题复现为什么发现了这个问题呢?是当时要写一个列表,列表本来很简单,一行显示一个文本,实现起来也很容易,一

2017-07-31 09:39:49 967

原创 Android 清理backstack

在一些情况下可能并不需要在Low Memory时保存backstack以免在Restore时会影响onCreate中的Fragment的创建。所以必须在onSaveInstanceState中消除栈。Method oneFragmentManager fm = getActivity().getSupportFragmentManager();for(int i = 0; i < fm.getBa

2017-07-20 14:48:32 759

原创 记录一次关于Activity与Fragment生命周期引起的异常

在Activity和Frgment生命周期中对于数据保存应该是大部分都能保存的,像按Home返回到后台,再切换回来后应该不会出大问题的,但一次内存过底把保存的Activity给Destroy后引起了错误,具体是Activity里Fragment A里有一个Fragment B, Fragment B 按理是在A的onCreate里进行网络请求后异步创建,那么Activity销毁后走OnCreate应

2017-05-23 17:30:34 1914

原创 Android NestedScrolling 解析

产生原因由于在Android上进行滑动的控件在手机性能越来越好的情况下,人们已经习惯于常用的手势进行操作,出现许多控件滑动时需要去协调同一个界面的滑动的情况。例如在同一个方向内外(上下)的嵌套,不同方向(上下与左右方向)的嵌套等。解决这类嵌套可以通过Android开发艺术书上讲的内部拦截法和外部拦截法去解决,但是,在处理多个View的协调时使用外部拦截法,特别是一些第三方库,在使用时就必须去修改源码

2017-04-25 17:34:56 7764

原创 Retrofit 2 动态URL

问题使用Retrofit2一般都是针对于一baseURL,其它接口都是拼接不同的参数如get/photo,search?name=xiaohong&&sex=female,这样的形式。但是一些请求此时又要访问不同的url只能重新生成一个Retrofit2实例,实质上还有一种形式去处理,就是使用@url注解。解决方案public interface UserService { @GET

2017-04-20 16:55:11 13720

原创 RxJava 1 到RxJava2

RxJava2 目前已经在国外一些应用使用上,国内应用也有部分用于生产环境,是时候考虑切换到RxJava2。RxJava2主要是解决了Backpressure, 设计符合Reactive-Streams规范,以及其它一些更新。RxJava 1.X升级RxJava 2.X部分变更 描述 RxJava 1.X RxJava 2.X package包名 rx.xxx io.react

2017-04-20 16:40:07 1519 4

原创 Android 内存泄露与解决方案

内存泄露Java内存泄漏指的是进程中某些对象(垃圾对象)已经没有使用价值了,但是它们却可以直接或间接地引用到gc roots导致无法被GC回收。无用的对象占据着内存空间,使得实际可使用内存变小,形象地说法就是内存泄漏了。下面分析一些可能导致内存泄漏的情景。非静态内部类的静态实例容易造成内存泄漏activity使用静态成员handler 非静态注册某个对象后未反注册资源对象没关闭造成的内存泄

2017-04-20 11:50:41 496

原创 Android ConstraintLayout

ConstraintLayout配合Android Studio 2.3版本使用ConstraintLayout即可以节省时间,同时也可以解决复杂布局马嵌套过深引起的性能问题。那么看一看Android Studio2.3工具给带来的方便性,一些常用的align,chain等方式简单通过这些工具就可以解决。

2017-04-19 14:21:20 596

转载 Android 之旅:Google 发布 Android 性能优化典范

文章转载自 开源中国社区 [http://www.oschina.net]转载地址:https://www.oschina.net/news/60157/android-performance-patterns        2015年伊始,Google发布了关于Android性能优化典范的专题, 一共16个短视频,每个3-5分钟,帮助开发者创建更快更优秀的An

2017-04-18 14:29:28 385

原创 Android L(5.0) Activity Transition 共享元素跳转无效解决

介绍Android L中引入的共享元素转场很好,但一般情况下由list到详情页中的共享元素比如是ImageView,PhotoView等需要网络加载的图片时,可能跳转到详情页面就没有效果,国内找好没有这方面文章,今天google一上午解决了。就是转场开始的Activity需要延时。描述这里用A,B代表两个Activity,Activity可以包含Fragment,都是可以实现。 解决的就是A->B

2017-04-18 14:02:55 3876

原创 Andoid Layer-list Drawable

Level List简介下面是官方Drawable下的介绍 A Drawable that manages a number of alternate Drawables, each assigned a maximum numerical value. Setting the level value of the drawable with setLevel() loads the drawa

2017-04-17 15:02:48 717

原创 RecyclerView ItemDecoration 学习

本次因为一直在用RecyclerView LinearLayoutManager对应的decoration,目前处理GridLayout时由于要处理左右侧的item的边距和蹭的Item边距不同,就回顾一下RecyclerView 对ItemDecoration的学习。由于不是ListView和GridView,RecyclerView把这个称为Item的装饰,所以分隔线的处理就交给ItemDecor

2017-04-13 17:17:01 594

原创 Android studio ADB 命令找不到解决办法

其实这个不算个问题,但总是容易忘记。主要就是把ADB 的路径加入到系统的path就能处理了。创建一个系统变量,这里就叫Android_Platform_Tools 对应的值输入你Android SDK 目录下的platform-tools目录。 然后编译系统变量下的Path,加入%Android_Platform_Tools%到变量值就可以了,注意要重启下Android Studio才能生效,CM

2017-04-10 16:11:14 26711 3

The Busy Coder’s Guide to Android Development 8.4 epub

Version 8.4 Do you want current information about how to develop Android apps? This book covers the latest Android Studio version and the latest version of Android, plus all the information you need to get your apps working on older devices. And, with updates coming every couple of months via the Warescription, you will keep up to date. What’s New in Version 8.4? For those of you who have read previous editions of this book, here are some of the highlights of what is new in the prose in Version 8.4: Updated everything for Android Studio 2.3 Added a chapter on Stetho Added material on the Espresso Test Recorder to the chapter on Espresso Updated the coverage of consuming documents with a new “diceware” sample and the use of the CWAC-Document library Updated the chapter on RecyclerView to cover the new(-ish) built-in list divider option Fixed a bug in the Sensor/Monitor sample app in the chapter on sensors Added more material on working with removable storage to the chapter on files Other miscellaneous fixes and improvements Readers of the APK edition of the book who were running into crashes from the new double-tap gesture to hide and show the action bar should have better luck now.

2017-03-30

haxm-windows_v6_0_1

Android 模拟器一直以运行速度慢著称, 本文介绍使用 Intel HAXM 技术为 Android 模拟器加速, 使模拟器运行度媲美真机, 彻底解决模拟器运行慢的问题。 Intel HAXM (Hardware Accelerated Execution Manager) 使用基于 Intel(R) Virtualization Technology (VT) 的硬件加速, 因此需要 CPU 支持 VT , 而且仅限于 Intel CPU, 与 AMD CPU 无缘, Intel HAXM 的描述如下: 使用 Intel VT 技术; 为 Android x86 虚拟设备的模拟运行提供硬件加速; 与 Android SDK 集成; 硬件需求如下: 支持 VT-x, EM64T 以及 Execute Disable Bit 的 Intel 处理器; 至少 1GB 可用内存 支持的操作系统: Windows 7 (32/64-bit) Windows Vista (32/64-bit) Windows XP (32-bit only) OS X 10.6 or 10.7 (32/64-bit) Intel Hardware Accelerated Execution Manager (Intel® HAXM) is a hardware-assisted virtualization engine (hypervisor) that uses Intel Virtualization Technology (Intel® VT) to speed up Android* app emulation on a host machine. In combination with Android x86 emulator images provided by Intel and the official Android SDK Manager, Intel HAXM allows for faster Android emulation on Intel VT enabled systems. The following platforms are supported by Intel HAXM:

2016-01-21

2015计算机专业408考研试题 完整版 无水印版

2015计算机专业408考研试题 完整版 无水印版 2015计算机专业408考研试题 资料来源与王道计算机复习真题资料!已经部分优化并删除多余页面方便全真模拟真题考试,试题答案与试题分开,打印后方便做题!

2015-11-18

2015计算机考研统考408真题及解析 完全打印无水印

2015计算机专业考研真题:2015计算机考研统考408真题及解析 可以打印,无水印

2015-09-26

FPM10A指纹模块官方提供资料

FPM10A指纹模块官方提供资料 供应商提供的电子资料 为2015年最新资料,有中文和官方英语资料,开发过程中用到的可以下载尝试! 觉得不错的请加评论,前面一个要那么多积分,我这个免费哦!希望更多人可以看到!

2015-05-16

VisualStudio 2010入门教程

Microsoft_Visual_Studio_2010入门教程

2012-09-24

空空如也

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

TA关注的人

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