自定义博客皮肤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)
  • 资源 (10)
  • 收藏
  • 关注

原创 Android中的设计模式

总结Android框架中出现的设计模式。

2015-01-31 11:26:47 1457

转载 canvas.save() canvas.restore() 作用

暂时先看此博客,待以后再研究这里canvas.save();和canvas.restore();是两个相互匹配出现的,作用是用来保存画布的状态和取出保存的状态的。这里稍微解释一下.onDraw方法会传入一个Canvas对象,它是你用来绘制控件视觉界面的画布。  在onDraw方法里,我们经常会看到调用save和restore方法,它们到底是干什么用的呢?  

2015-01-29 19:54:27 624

转载 随笔之如何实现一个线程池

转自:http://www.cnblogs.com/innost/archive/2011/11/24/2261454.html一 缘由:    最近因工作问题,需要实现一个简单的线程池,满足以下要求:    1 可伸缩,即一旦发现线程不够用,则可以动态增加线程。(至于缩减线程,这个可能难度比较大,暂时不考虑)。    2 支持超时任务。比如提交一个Task,可以设置5秒后

2015-01-29 12:22:41 709

转载 Android权限之sharedUserId和签名

最近在做个东西,巧合碰到了sharedUserId的问题,所以收集了一些资料,存存档备份。    安装在设备中的每一个apk文件,Android给每个APK进程分配一个单独的用户空间,其manifest中的userid就是对应一个Linux用户都会被分配到一个属于自己的统一的Linux用户ID,并且为它创建一个沙箱,以防止影响其他应用程序(或者其他应用程序影响它)。用户ID 在应用程序

2015-01-27 17:20:56 597

原创 LeetCode:Count and Say

The 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 a

2015-01-22 21:09:20 464

原创 LeetCode:Implement strStr()

Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Update (2014-11-02):The signature of the function had been updated

2015-01-22 11:32:14 661

原创 LeetCode:Plus One

Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.public class Solutio

2015-01-22 11:23:55 502

原创 LeetCode: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 def

2015-01-21 18:12:41 455

转载 从输入 URL 到页面加载完的过程中都发生了什么事情

Cache一个HTTP请求的过程为了简化我们先从一个HTTP请求开始,简要介绍一下一个HTTP求情的网络传输过程,也就是所谓的“从输入 URL 到页面下载完的过程中都发生了什么事情”DNS Lookup 先获得URL对应的IP地址Socket Connect 浏览器和服务器建立TCP连接Send Request 发送HTTP请求Conte

2015-01-21 16:19:08 570

原创 LeetCode:Excel Sheet Column Title

Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB Credits:S

2015-01-20 17:10:24 539

转载 LeetCode:Symmetric Tree

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \3 4 4 3But the fol

2015-01-19 15:32:27 459

转载 ZigZag Conversion

The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L

2015-01-16 17:13:18 532

转载 LeetCode:Two Sum

Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, w

2015-01-15 12:58:58 503

原创 LeetCode : Largest Number

Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330.Note: The result may be

2015-01-13 18:00:06 553

转载 LeetCode:Binary Tree Postorder Traversal

Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [3,2,1].Note: Recursive solution is t

2015-01-13 17:07:00 399

原创 LeetCode:Single Number

Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using e

2015-01-13 16:18:05 425

原创 LeetCode:(LRU) cache

import java.util.LinkedHashMap;import java.util.Map;/** * Design and implement a data structure for Least Recently Used (LRU) cache. * It should support the following operations: get and set.

2015-01-13 16:12:05 553

转载 LinkedHashMap和HashMap的比较使用

import java.util.HashMap;import java.util.Iterator;import java.util.LinkedHashMap;import java.util.Map;public class TestLinkedHashMap { public static void main(String args[]) { System.out

2015-01-13 15:44:22 470

原创 jvm网站资料整理

一、编译器jvm性能优化和编译器的概述:http://www.importnew.com/2009.html字节码的基础介绍:http://www.javaworld.com/article/2077233/core-java/bytecode-basics.html二、gcgc的概述:http://www.importnew.com/2233.html#rdc

2015-01-09 11:31:25 623

转载 Kendall's tau

Kendall's tau是数学统计中一个常用的系数,用来描述两个序列的相关系数。如果两个序列完全一致,则Kendall's tau值为1,两个毫不相关的序列的Kendall's tau值为0,而两个互逆的序列的Kendall's tau系数为-1.具 体的计算方式为: 1 - 2 * symDif / (n * (n -1)),其中n为排列的长度(两个序列的长度相同),symDif为对称距离

2015-01-07 12:32:23 11603 1

转载 索引优先队列的实现

/************************************************************************* * Compilation: javac IndexMinPQ.java * Execution: java IndexMinPQ * * Minimum-oriented indexed PQ implementation u

2015-01-07 11:31:44 1408

原创 网易游戏面试面经搜集

@笔试 10.22网易游戏笔试,三个小时的题,题量还是非常大的,设计计算机各们核心课程,操作系统原理,c/c++,基础数据结构与算法,数学推理题,网络等。题特别多,题特别杂,几乎没有童鞋做完吧。多多益善吧。经历过考研,一些基础课程还是蛮扎实,前40分的题答的不错,后面的算法题做的一般,我只会最笨重的方法。@一面 10.24晚上通知11.1下午2点面试最次给各位同学提个醒,简历一定要多带

2015-01-06 14:32:45 2952

使用于Android的libunwind静态编译库

使用ndk交叉编译,使用于android上的libunwind静态编译库

2017-02-06

堆排序算法研究_唐开山

堆排序的一种优化实现,先下沉再上浮,是比较次数减少一半。

2015-01-07

开源项目实现安卓滑动菜单

开源项目实现安卓滑动菜单,此文件为该项目的源码

2014-07-02

高仿微信开始页滑动导航界面源码

Android实现微信开始页滑动导航界面源码

2014-07-02

FBReader源码

FBReader是一个开源电子书阅读器,此文件为该项目的源代码

2014-07-02

驱动和应用层的三种通信方式

驱动程序和客户应用程序经常需要进行数据交换,但我们知道驱动程序和客户应用程序可能不在同一个地址空间,因此操作系统必须解决两者之间的数据交换。驱动层和应用层通信,主要是靠DeviceIoControl函数,资源是三种io通信情况的例子,还有应用层的测试程序。

2014-03-12

《模式分类》第二版的配套的Matlab源代码

模式分类Matlab工具箱。本工具箱与 Duda, Hart, and Stork的经典著作《模式分类(第2版)》配套。内含用户指南及与《模式分类(第2版)》相伴的书《Computer Manual in MATLAB to accompany Pattern Classification (2nd ed.)》附录。

2013-07-29

lasso经典matlab源码

Lasso变量选择方法创始人的经典代码,内含多个源代码,每个可单独运行.

2013-07-27

Adaboost matlab代码

通过研究在Schapire的大作中提到了一个Toy Game的例子,这里给出了一个类似的Matlab代码,非常适合初学者学习。在AdaBoost中,每个样本都被赋予一个权重。如果某个样本没有被正确分类,它的权重就会被提高, 反之则降低。这样, AdaBoost方法将注意力更多 地放在“难分”的样本上。那怎么合并若分类器成为一个强分类器?强分类器表示为若干弱分类器的线性加权和形式, 准确率越高的弱学习机权重越高。

2013-07-26

PCA人脸识别C++源代码

经典的PCA人脸识别算法,C++源代码都是我自己写的,第一次上传,写得不好的地方请多多指教。已经经过我的多次测试和观察数据,代码运行正常,下载之后只要配置好opencv即可。

2013-02-26

空空如也

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

TA关注的人

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