<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[xanxus46的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/xanxus46</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; xanxus46]]></copyright><item><title><![CDATA[博客搬家了，请大家继续关注~]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/80355800</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/80355800</guid><author>xanxus46</author><pubDate>Thu, 17 May 2018 19:42:16 +0800</pubDate><description><![CDATA[我的博客即将搬运同步至腾讯云+社区，邀请大家一同入驻：https://cloud.tencent.com/developer/support-plan?invite_code=21lcucs4283oc]]></description><category></category></item><item><title><![CDATA[Android开发之声网即时通讯与讯飞语音识别相结合]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/72630038</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/72630038</guid><author>xanxus46</author><pubDate>Mon, 22 May 2017 22:07:33 +0800</pubDate><description><![CDATA[声网是一家提供语音、视频即时通讯服务的公司，他的服务大多基于WebRTC开源项目并进行一些优化和修改。而讯飞语音识别应该不用多说了，老罗在发布会上介绍得已经够详细了。
那么下面进入今天的主题，就是让声网和讯飞识别同时使用，之前可能有朋友没遇到过这样的需求，那先说一下让两者同时使用会出现啥问题，为什么要做修改呢？其实原因很简单，即时通讯过程中毫无疑问肯定会用到麦克风和扬声器的，而语音识别呢，麦克风]]></description><category></category></item><item><title><![CDATA[Android开发之逐帧动画优化]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/69162966</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/69162966</guid><author>xanxus46</author><pubDate>Tue, 04 Apr 2017 19:46:57 +0800</pubDate><description><![CDATA[Android上如果使用逐帧动画的话，可以很方便地使用AnimationDrawable，无论是先声明xml还是直接代码里设置，都是几分钟的事，但使用AnimationDrawable有一个致命的弱点，那就是需要一次性加载所有图片到内存，万一帧数多了或者每张图片都比较大，很容易就报out of memory的异常了，所以有必要进行优化。
这里我们利用View.postDelayed方法延时替换图]]></description><category></category></item><item><title><![CDATA[WebP图片制作GUI工具]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/66477559</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/66477559</guid><author>xanxus46</author><pubDate>Mon, 27 Mar 2017 11:37:56 +0800</pubDate><description><![CDATA[WebP是Google近几年推出的新型网络图片格式，有静态和动态两种类型，其中静态webp比jpg和png的压缩率都要大，而且失真率接近于png，远胜于jpg，因为他支持8位的透明通道。而动态webp比gif好了不止一两点，gif只支持2位的透明通道，而且图片锯齿严重。OK，既然有这么牛逼的图片格式，我们当然要好好使用了，而且现在Android端有Facebook推出的Fresco框架完美支持，不]]></description><category></category></item><item><title><![CDATA[Android之本地文件夹实时检测与上传服务实现]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/65633813</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/65633813</guid><author>xanxus46</author><pubDate>Fri, 24 Mar 2017 19:32:16 +0800</pubDate><description><![CDATA[好久都没有更新博客了，这期的功能是实现本地文件夹的监测和上传文件到阿里的OSS服务器上，由于这个功能不需要界面而且需要程序退到后台时依然监测，所以初步定为用服务实现。
首先，第一个需要确定能否用IntentService实现呢，因为IntentService会自动创建新的线程，只允许startService启动，而且消息队列也帮我们管理了，省了很多功夫，但是IntentService会自动停止服]]></description><category></category></item><item><title><![CDATA[启动hadoop 2.6遇到的datanode启动不了]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/53886861</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/53886861</guid><author>xanxus46</author><pubDate>Mon, 26 Dec 2016 15:59:43 +0800</pubDate><description><![CDATA[转自：http://blog.youkuaiyun.com/zhangt85/article/details/42078347

查看日志如下:
2014-12-22 12:08:27,264 INFO org.mortbay.log: Started HttpServer2$SelectChannelConnectorWithSafeStartup@0.0.0.0:50075
2014-12-22 ]]></description><category></category></item><item><title><![CDATA[Android Studio2.2下NDK开发初试]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/53704283</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/53704283</guid><author>xanxus46</author><pubDate>Sat, 17 Dec 2016 11:04:50 +0800</pubDate><description><![CDATA[很久没更博了，这次来记录一下如何在Android Studio2.2中进行NDK开发吧，NDK开发嘛，就是将C/C++的代码编译成so类库，供java调用（当然c调用java也是可以的），还记得以前没有IDE的时候，需要在linux环境编译，非常麻烦，光是看完教程就不想弄了，但不得不说Android Studio是Android开发的神器，它将一切都弄的如此简单。废话不多说，马上进入主题吧。
开]]></description><category></category></item><item><title><![CDATA[iOS开发之UIView与CALayer的异同]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/52821949</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/52821949</guid><author>xanxus46</author><pubDate>Sat, 15 Oct 2016 11:25:39 +0800</pubDate><description><![CDATA[看了iOS6编程实践第9章后，总结一下UIView和CALayer的异同点：
UIView 负责绘制与事件处理，而CALayer只负责绘制。
UIView的绘制也是交给CALayer的。
UIView和CALayer都可以有下一层，都是树状结构。
自定义的UIView重写drawRect，自定义的CALayer重写drawInContext或重写委托者的drawLayer方法。
drawRect方法]]></description><category></category></item><item><title><![CDATA[Leetcode之Longest Valid Parentheses]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/52681594</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/52681594</guid><author>xanxus46</author><pubDate>Tue, 27 Sep 2016 16:25:48 +0800</pubDate><description><![CDATA[好久没来更新Leetcode题目了，因为之前都去刷lintcode了，结果发现还是leetcode是我的本命啊~~
第二次刷leetcode，感触良多，有些题目以前不会现在会了，但是有些以前明明会的，现在反而想很久，还有可能需要看提示，而且复杂度还比以前的高了，感觉人变笨了，肯定因为很久没来更新博客的原因。嗯，所以今天就讲一讲Longest Valid Parentheses这道题吧。
今天重]]></description><category></category></item><item><title><![CDATA[iOS开发之CFHttpMessageRef的那些坑]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/52065493</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/52065493</guid><author>xanxus46</author><pubDate>Fri, 29 Jul 2016 16:17:53 +0800</pubDate><description><![CDATA[在上一篇文章iOS开发之NSURLProtocol的那些坑中，介绍了一些NSURLProtocol使用过程中可能遇到的问题，今天我们就接着说CFHttpMessageRef。
或许你还没用过CFHttpMessageRef，应该说还没遇到需要使用这个的场景，当然，老司机就另当别论了。这是个iOS系统中非常底层的网络通讯接口，已经接近于UNIX系统的socket通信了，使用CFHttpMessag]]></description><category></category></item><item><title><![CDATA[iOS开发之NSURLProtocol的那些坑]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/51946432</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/51946432</guid><author>xanxus46</author><pubDate>Mon, 18 Jul 2016 23:32:33 +0800</pubDate><description><![CDATA[接触过iOS系统中URL Loading System都知道，NSURLProtocol是如此地强大，可以拦截应用内几乎所有的网络请求（除了WKWebView），并可以修改请求头，返回client任意自定义的数据等等，据说很多做网络缓存都是利用这个类的。
那么，首先讲解一下NSURLProtocol怎么使用吧。
1. 定义一个NSURLProtocol的子类
在继承NSURLProtocol]]></description><category></category></item><item><title><![CDATA[ARC无效时block的赋值]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/51164561</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/51164561</guid><author>xanxus46</author><pubDate>Fri, 15 Apr 2016 21:17:07 +0800</pubDate><description><![CDATA[总所周知，当ARC无效时，block默认是在栈区或全局数据区，要想复制到堆区，需要一些特殊手段，这些手段在《Objective-C高级编程》都有介绍，例如将block声明为类的属性，block调用copy方法，作为函数返回值等等。
但是《高级编程》里有个地方写错了，不过也有可能书上没写清楚是否开启ARC，不过通过我的实验验证，当ARC关闭时，在类方法中给block属性赋值，如果不加上copy，还]]></description><category></category></item><item><title><![CDATA[LeetCode之Intersection of two linked list不同方法]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/50717462</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/50717462</guid><author>xanxus46</author><pubDate>Mon, 22 Feb 2016 16:14:27 +0800</pubDate><description><![CDATA[AC完看答案发现答案超简单，而自己的方法有点过于复杂了，题目原意是找出两个链表第一个公共节点，如果没有则返回NULL。
看到题目后，我竟然想到可能存在交叉结构，结果通过反转一个链表来求出是否存在公共节点，但是却没法求出第一个公共节点，因此重新看回题目，发现根本不可能有交叉结构嘛，这是链表啊，一个节点怎么可能有多个next节点呢，两个链表如果有公共节点，其尾节点必然相同。不过，既然已经写了那么多了]]></description><category></category></item><item><title><![CDATA[LeetCode之Binary Tree Maximum Path Sum]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/50590505</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/50590505</guid><author>xanxus46</author><pubDate>Wed, 27 Jan 2016 09:28:37 +0800</pubDate><description><![CDATA[题目：

Given a binary tree, find the maximum path sum.

For this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree along the parent-child connection]]></description><category></category></item><item><title><![CDATA[LeetCode之Climbing Stairs与斐波那契数列的联想]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/50452705</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/50452705</guid><author>xanxus46</author><pubDate>Sun, 03 Jan 2016 21:56:35 +0800</pubDate><description><![CDATA[题目：

You are climbing a stair case. It takes n steps to reach to the top.

Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?

看到题目之后，毫不犹豫想出公式：f(n)=]]></description><category></category></item><item><title><![CDATA[Next Permutation之字典序法]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/50095009</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/50095009</guid><author>xanxus46</author><pubDate>Sun, 29 Nov 2015 12:24:08 +0800</pubDate><description><![CDATA[字典序法是求出当前数组在字典序下的下一个数组，也就是正好比当前数组稍大的下一数组。笔者是从《组合数学》中看到的算法，但当时并没有深入思考，而当在leetcode上看到了next permutation才知道该算法的经典。
算法的思路如下：
（1）求满足下列不等式的最大的j，记为i， 即
i=max{j | nj-1
（2）求满足下列不等式的最大的k，记为h，即
h=max{k | ni-]]></description><category></category></item><item><title><![CDATA[Leetcode之Trapping Rain Water]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/49996453</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/49996453</guid><author>xanxus46</author><pubDate>Mon, 23 Nov 2015 16:09:48 +0800</pubDate><description><![CDATA[题目原意：给定一个整数数组，每个数代表一个柱子的高度，然后求下雨后这些柱子能储多少水，例如数组[0,1,0,2,1,0,1,3,2,1,2,1]对应的示意图如下：


解题思路：四次遍历，第一次遍历获取height最大值top，然后构造一个数组incre_height，长度和height一样，除了第一个和最后一个数和height一样，其他均是top，第二次遍历incre_height，判断当]]></description><category></category></item><item><title><![CDATA[dancing links解决X问题的C++实现]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/49823527</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/49823527</guid><author>xanxus46</author><pubDate>Fri, 13 Nov 2015 22:18:06 +0800</pubDate><description><![CDATA[X问题，也称精确覆盖问题，就是给定一个01矩阵，需要从中选取一些行组成一个子矩阵，这个子矩阵的每一列有且仅有一个1。这个问题听起来就知道很难，必须使用回溯算法来解决，但是我们知道回溯算法要提高效率，就必须做好剪枝和回溯恢复的工作。这时算法大师Donald E.Knoth给出了一个巧妙的数据结构，十字链表，每个节点都有上下左右的指针。其实这个结构参考的是双链表删除和恢复的便利性，思考一下，在双链表中]]></description><category></category></item><item><title><![CDATA[LeetCode之Generate Parentheses（C++）]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/49451853</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/49451853</guid><author>xanxus46</author><pubDate>Tue, 27 Oct 2015 18:07:07 +0800</pubDate><description><![CDATA[题目：Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.

For example, given n = 3, a solution set is:

"((()))", "(()())", "(())()", "()(())", "(]]></description><category></category></item><item><title><![CDATA[Xtrafinder0.25.5在OS X10.11上的运行配置]]></title><link>https://blog.youkuaiyun.com/xanxus46/article/details/49019875</link><guid>https://blog.youkuaiyun.com/xanxus46/article/details/49019875</guid><author>xanxus46</author><pubDate>Sat, 10 Oct 2015 10:38:26 +0800</pubDate><description><![CDATA[相信大家都会很懊恼，明明作者在更新播客上说明目前最新版本的Xtrafinder 0.25.5可以在EI Captain上运行，但是无论是开机自动启动还是进launcher启动，他就是死活启动不起来，最终，参照国外友人的博客https://www.igorkromin.net/index.php/2015/10/06/xtrafinder-not-working-on-osx-1011-el-cap]]></description><category></category></item></channel></rss>