自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

你若嘻哈过盛,别人就不再欣赏你的认真

——时间不要懈怠了追求

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

原创 Android NDK开发(一)入门篇

Android NDK开发(一)入门篇1、下载NDK设置2、开启新世界大门A、设置local.properties在local.properties最后面加入ndk的路径 我的是这样: ndk.dir=/Users/Weiwu/Library/Android/sdk/ndk-bundleB、设置gradle.properties在gradle.properties最后加入过时可用(应该是这个意思

2016-01-08 18:50:34 3386 1

原创 [Android Studio]For MAC快捷键及功能记录(持续更新)

(持续更新)[Android-studio使用记录]1.功能设置修改选中变量后变色设置 进入setting->Editor->Colors&Fonts->General, 设置Identifier under caret即可。#(持续更新)[Android-studio使用记录]2.快捷键Android Studio for MAC OS X 10.5+:常用快捷键: control +

2016-01-07 00:34:10 1103

原创 [Android]贝塞尔曲线应用及QQ气泡拖动原理实践

贝塞尔曲线应用及QQ气泡拖动原理实践绘线API介绍moveTo 控制Path的起点位置lineTo 从起点连接到某点位置quadTo 绘制贝塞尔曲线cubicTo 同样是绘制贝塞尔曲线,多一个起点坐标参数,比起quadTo省去了一个moveTo步骤arcTo 截取圆弧的一部分角度这部分读者可以直接参考别人的实例讲解我在这儿主要介绍贝塞尔曲线的应用,虽然有很多人已经解释过什么是

2016-01-06 19:59:48 2069 2

原创 Genymotion foc MAC安装及配置AS过程

Genymotion foc MAC安装及配置AS过程完整安装及配置过程1. 下载Genymotion,自行安装。需要先注册才能下载。-官网:https://www.genymotion.com/ 2. 下载Virtual BOX(虚拟环境),自行安装。  因为搜索时很多都是Windows用户,而官网的Genymotion for Windows版本是有个自带VirtualBOX的,所以不需要在去

2015-12-05 10:36:24 2561

原创 设计模式实例学习-模板方法

设计模式实例学习-模板方法定义概念定义 定义一个操作中的算法的框架,而将一些步骤延迟到子类中,使得子类可以不改变一个算法的结构即可重新定义该算法的某些特定步骤。 我的理解,先举个最简单例子,我们打开门的时候走的流程是这样的:解锁->开门。这里解锁和开门就是算法的框架,每个打开门的流程都是这样的,但具体如何解锁及如何开门则是子类负责的,比如解锁可能是密码解锁、钥匙解锁、指纹解锁等等,而开

2015-11-20 23:53:25 607

原创 设计模式实例学习-抽象工厂模式

设计模式实例学习-抽象工厂模式定义及解析

2015-11-19 11:28:58 720

原创 设计模式实例学习-桥接模式

设计模式实例学习-桥接模式标签(空格分隔): 设计模式定义概念定义(行为模式) 将抽象于实现解耦,使二者可以独立的变化。 我的理解:所需要实现的对象不通过直接在场景类中操作它的行为(方法),为了将它的行为状态抽象分离,因而通过抽象化角色中保存有对实现对象角色的引用,将实现对象的行为(方法)放在这抽象化角色的方法中调用。(有点绕口。。)角色职责抽象化角色具体抽象化角色内部保存对实现

2015-11-18 22:06:23 1148

原创 设计模式实例学习-装饰者模式

设计模式实例学习-装饰者模式标签(空格分隔): 设计模式定义结构型模式概念定义 动态地给一个对象添加一些额外的职责。就增加功能来说,装饰模式相比生产子类更加灵活。角色职责抽象构件:接口或抽象类具体构件:抽象构件的实现,被装饰的对象。抽象装饰者具体装饰者实例分析场景描述   你有一个天使角色,天使一开始什么都没有,你需要给她添加翅膀、添加衣服、添加武器…以后也会根据情况需要另外添

2015-11-17 19:33:04 705

原创 设计模式实例学习-单例模式(Android中的使用场景)

设计模式实例学习-单例模式标签: 设计模式定义 单例模式,故名思议,是指在一个类中通过设置静态使得其仅创造一个唯一的实例。这样设置的目的是满足开发者的希望——这个类只需要被实例化创建一次,同时因为其为静态的缘故,加载的速度也应该快于正常实例化一个类的速度(理论上)。代码分析  在Android开发中,当我们需要创建一个唯一的Fragment的时候常常会用到这样的模式,没有代码的学习是虚无的,

2015-11-17 10:37:57 1162

原创 设计模式实例学习-工厂方法

设计模式实例学习-工厂方法定义概念定义(对象创建型模式) 定义一个用于创建对象的接口,让子类决定实例化那个类。工程方法使一个类的实例化延迟到其子类。角色职责抽象产品类具体产品类抽象工厂类具体工厂类  这个模式的角色比较好理解,产品类就是产品,工厂类就是负责生产产品的。(具体参看实例分析后就能很好的明白了)实例分析场景描述   大学里面有很多不同的学院,不同的学院教育并输出(生产出

2015-11-16 23:23:16 646

原创 设计模式实例学习-责任链模式

设计模式实例学习-责任链模式定义概念定义: 使多个对象都有机会处理请求,从而避免了请求的发送者和接受者之间的耦合关系。将这些对象连接成一条链,并沿着这条链传递该请求,直到有对象处理它为止。 我自己的理解定义:多个处理器对象之间权利存在上下级关系,当提交事件给处理器进行处理时,会交给最底下等级的处理器,它会根据事件的等级决定处理器是否有权利处理,没有的话就将事件提交到上一级的处理器,直到

2015-11-15 22:36:28 768

原创 设计模式实例学习-观察者模式

设计模式实例学习-观察者模式定义概念定义: 观察者模式定义了被观察者和观察者的关系(一对多),当被观察者的状态发生改变,会通知所有观察者进行更新。 根据其特性,也常常也被称为发布-订阅模式、模型-视图模式等等。角色定义:抽象被观察者:被观察者接口或抽象类具体被观察者对象:实现抽象被观察者的具体类 定义被观察者的职责,定义添加观察者、注销观察者、告知观察者更新的方法,对观察者进行管

2015-11-15 16:46:14 687

原创 设计模式实例学习-策略模式

此前在某公司面试时,面试官问我说有没有自己写什么东西分享,我说有一些,但是很多东西发现别人都写过了,自己慢慢就不太想再写了。他跟我说让我继续坚持写,总会有好处的。后来也知道,写博客有时候也许不一定是分享,也可以是对自己学习的总结,加深印象。秋招对于我,其实在10月末就已经结束了,休息一阵,不敢颓废,现在打算开始写些东西记录自己的学习过程。

2015-11-09 22:00:21 715

原创 Git工作流使用过程学习【工具:Git+SourceTree】

工具:Git + SourceTree  流程:1、首先你需要有一个本地的SSH秘钥,有的话跳过此步。在git 命令行上输入$ssh-keygen -t rsa -C “邮箱名...”按三次回车,即密码设置为空。然后能够得到两个文件id_rsa.pub和id_rsa打开id_rsa.pub,将里面的信息添加到github的SSH上。id_rsa则是下一步要用

2015-09-01 20:18:42 3102

原创 实现JAVA上传数据至PHP服务器存储(SAE)

Java客户端实现数据上传至PHP服务器(搭载在SAE)PHP上传功能DEMO:上传文件<?phpif(isset($_POST[up])){ $s2 =new SaeStorage();//实例化 $name =$_FILES['myfile']['name'];//上传到服务器的文件名称 if($s2->upload('20141

2015-05-16 15:45:12 1193

转载 Android高效加载大图、多图解决方案,有效避免程序OOM

转载请注明出处:http://blog.csdn.net/guolin_blog/article/details/9316683本篇文章主要内容来自于Android Doc,我翻译之后又做了些加工,英文好的朋友也可以直接去读原文。http://developer.android.com/training/displaying-bitmaps/index.html高效加载大图

2015-05-07 21:49:45 471

原创 LeetCode-77 Combinations(组合)

LeetCode-77 Combinations(组合)Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.For example,If n = 4 and k = 2, a solution is:[ [2,4], [3,4], [2,3

2015-05-02 12:06:29 1134

原创 LeetCode-73 Set Matrix Zeroes(设置零矩阵)

LeetCode-73 Set Matrix Zeroes(设置零矩阵)Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up:Did you use extra space?A s

2015-05-02 11:46:56 715

原创 LeetCode-70 Climbing Stairs(斐波那契数列)

LeetCode-70 Climbing Stairs(斐波那契数列)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 t

2015-05-02 11:35:31 1036

原创 LeetCode-69 Sqrt(x)

LeetCode-69 Sqrt(x)Implement int sqrt(int x).Compute and return the square root of x.思路:二分法。比较要留意的是right  left 的处理。public class Solution { public int mySqrt(int x) { if (x == 0)

2015-05-02 11:30:18 663

原创 LeetCode-67 Add Binary(二进制数相加)

LeetCode-67 Add Binary(二进制数相加)Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100". public class Solution { public String addBin

2015-05-02 11:18:08 928

原创 LeetCode-56 Merge Intervals(合并区间)

LeetCode-56 Merge Intervals(合并区间)Given a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18]./** * Definition

2015-05-02 11:11:58 713

转载 LeetCode-50 Pow(x, n)

Implement pow(x, n).觉得这道题看似简单,但是却有很多细节上容易忽略的点。在此转了别人的考虑的地方及代码 1) x取值为0时,0的正数次幂是1,而负数次幂是没有意义的;判断x是否等于0不能直接用“==”。2) 对于n取值INT_MIN时,-n并不是INT_MAX,这时需要格外小心。3) 尽量使用移位运算来代替除法运算,加快算法执行的速度。 pu

2015-05-02 11:05:31 569

原创 LeetCode-49 Anagrams(返回字符相同的字符串)

LeetCode-49 Anagrams(返回字符相同的字符串)Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case. 一开始理解错题意。WA了好多次。。题目是指 返回字符串数组内 所有组成字符均相同的字符串

2015-04-29 18:07:40 810

原创 LeetCode-46 Permutations(全排列)

LeetCode-46 Permutations(全排列)Given a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2],

2015-04-29 18:04:40 761

原创 LeetCode-28 Implement strStr() (找出字串位置)

LeetCode-28 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 signa

2015-04-29 17:49:19 500

原创 LeetCode-27 Remove Element(水题-去掉元素)

LeetCode-27 Remove Element(去掉元素-水题)Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't matter what yo

2015-04-29 17:34:59 573

原创 LeetCode-26 Remove Duplicates from Sorted Array(水题-去相同元素)

LeetCode-26 Remove Duplicates from Sorted ArrayGiven 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 fo

2015-04-29 17:29:39 1155

原创 LeetCode-24 Swap Nodes in Pairs(链表中按要求交换节点)

LeetCode-24 Swap Nodes in Pairs(链表中按要求交换节点)Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your

2015-04-29 17:12:57 491

原创 LeetCode-22 Generate Parentheses(合法括号情况)

LeetCode-22 Generate Parentheses(合法括号情况) 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:"(((

2015-04-29 17:01:18 611

原创 LeetCode-21 Merge Two Sorted Lists(合并两个有序链表)

LeetCode-21 Merge Two Sorted Lists(合并两个有序链表) Merge 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. 代码:

2015-04-25 12:58:19 889

原创 LeetCode-20 Valid Parentheses(判断括号是否规范)

LeetCode-20 Valid ParenthesesGiven a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "

2015-04-25 11:55:04 810

原创 LeetCode-19 Remove Nth Node From End of List(移除尾部第N个节点)

LeetCode-19 Remove Nth Node From End of ListGiven a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. Af

2015-04-25 11:45:15 495

原创 LeetCode-17 Letter Combinations of a Phone Number(手机拨码-DFS)

LeetCode-17 Letter Combinations of a Phone Number(手机拨码-DFS)Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just l

2015-04-22 15:49:22 501

原创 LeetCode-15 3Sum(求3数和为零的情况总数)

Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:Elements in a triplet (a,b,c)

2015-04-22 15:37:26 489

原创 LeetCode-11 Container With Most Water(容器装水最大量)

LeetCode-11 Container With Most Water(容器装水最大量)Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two e

2015-04-22 15:17:01 632

原创 LeetCode-9 Palindrome Number(判断是否为回文int型)

LeetCode-9 Palindrome Number Determine whether an integer is a palindrome. Do this without extra space. 方法一:直接转String倒置public class Solution { public boolean isPalindrome(int x) {

2015-04-18 09:28:24 1111

原创 LeetCode-7 Reverse Integer(倒置整型数)

LeetCode-7 Reverse IntegerReverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here are some good que

2015-04-17 22:54:07 622

原创 LeetCode-6 ZigZag Conversion(字符串锯齿形输出)

LeetCode-6 ZigZag ConversionThe 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 legibil

2015-04-17 01:41:56 722

原创 LeetCode-5 Longest Palindromic Substring(求最长回文子串)

Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.JAVA:public class So

2015-04-16 23:32:56 448

Android贪吃蛇程序代码分享

先介绍一下玩法: 1、在电脑端模拟机打开的话,可以通过 w s a d 来控制上下左右。 2、在手机端通过方向感应器,手机角度的变化来控制贪吃蛇的运动。 3、试着添加了记录排名的功能,后来觉得挺简单,但是有点冗杂,所以很粗糙的弄了个得分记录。 供大家参考。 具体可参考博客文章:http://blog.csdn.net/u011035622/article/details/42060547

2015-01-24

HC05蓝牙串口模块资料

HC05蓝牙串口模块资料,玩蓝牙硬件的肯定需要的啦,我也是玩硬件的,蓝牙很好入门,这个作为参考资料~

2014-08-13

HTML帮助文档(常用的内容)

入门真的很需要常常查阅一些东西,这个就很适合直接查,里面整合了一些常用到的东西,标签。很好用。

2014-08-13

XML语法ppt(入门必看)

XML语法ppt,简单易懂,很好入门,想了解xml的从这个ppt开始真的很好!因为我也是这样~哈哈~

2014-08-13

mars-android-gps定位源码(3个)

简单易懂~亲验。如果是刚刚入门android的话,想试试看android定位的人可以下载来参考看看~(这算入门篇吧,适合入门~)

2014-08-09

空空如也

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

TA关注的人

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