首先简略说明绘制图片:
由于canvas.drawBitmap(bitmap, src, dst, paint);有四个参数所以大体有四五步。
1、通过getResource()方法得到drawable文件夹里BitmapDrawable类型的对象
2、将BitmapDrawable类型转化为Bitmap类型的对象
3、创建src, dst,两个长方形,src是指在原图形上截得的图片,ds...
分类:
移动开发 时间:
2015-02-05 09:38:32
阅读次数:
128
【题目】
Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.
For example,
Given n = 3,
You should return the following matrix:
[
[ 1, 2, 3 ],
[ 8,...
分类:
其他好文 时间:
2015-02-04 23:29:21
阅读次数:
236
机器学习Machine Learning - Andrew NG
courses学习笔记
矩阵和向量及其表示介绍
what are matrices矩阵
matrix is just another way for saying, is a 2D or a two dimensional array.
dimension of the matrix
is going to be ...
分类:
系统相关 时间:
2015-02-04 20:26:35
阅读次数:
197
【题目】
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:
Integers in each row are sorted from left to right.The first integ...
分类:
其他好文 时间:
2015-02-04 16:43:23
阅读次数:
124
修改的版本是cocos2dx.2.21.在neon_matrix_impl.c中修改#if defined(__ARM_NEON__)为 #if defined(_ARM_ARCH_7)2.在mat4.c中修改#if defined(__ARM_NEON__)为 #if defined(_ARM_A...
分类:
其他好文 时间:
2015-02-04 10:40:54
阅读次数:
157
Given a m x n matrix,
if an element is 0, set its entire row and column to 0. Do it in place.
解题思路:题目很简单,可就是没想到有什么高效的方法.我遍历了两遍vector,显得有点复杂.
#include
#include
using namespace std;
void setZeroes(v...
分类:
其他好文 时间:
2015-02-03 21:26:02
阅读次数:
168
Matrix的数学原理平移变换旋转变换缩放变换错切变换对称变换代码验证Matrix的数学原理在Android中,如果你用Matrix进行过图像处理,那么一定知道Matrix这个类。Android中的Matrix是一个3 x 3的矩阵,其内容如下:Matrix的对图像的处理可分为四类基本变换:Tran...
分类:
移动开发 时间:
2015-02-03 16:33:09
阅读次数:
284
标题:Spiral Matrix II通过率:31.3难度:中等Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You s...
分类:
其他好文 时间:
2015-02-01 12:05:04
阅读次数:
198
当我把旋转矩阵的原理理解过后,逐渐意识到。做着一切的意义在哪里。。郁闷了一天,感觉有了答案,还是应当沉下心来去理解才行,不能急躁.我疑惑在,陀螺仪得到的就是三个轴的角速度积分直接就可以得到角度,那旋转矩阵在这里又有什么用处了?但是又觉得我这样的角度是不具有意义的,没有参考下得到的一切都是没有价值的。...
分类:
其他好文 时间:
2015-02-01 01:48:50
阅读次数:
132
Description There is an N*M matrix with only 0s and 1s, (1 #includeusing namespace std;// N 行 M 列 。 。 。const int INF=10e8;const int MaxN=1010;const...
分类:
其他好文 时间:
2015-01-31 14:26:16
阅读次数:
188