bitmap = bitmap.createBitmap(bitmap,0,70,bitmap.getWidth(),bitmap.getHeight()/3);Matrix matrix = new Matrix();
matrix.postScale(2.0f, 0.5f);
bitmap = bitmap.createBitmap(bitmap,0,0,bitmap.getWidth()/2...
分类:
移动开发 时间:
2015-08-06 18:29:57
阅读次数:
141
import android.content.Context;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet...
分类:
移动开发 时间:
2015-08-06 17:02:18
阅读次数:
143
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.
For example, given the following matrix:
1 0 1 0 0
1 0 1 1 1
1 1 1 1 1
1 0 0 1 0
...
分类:
其他好文 时间:
2015-08-06 00:34:07
阅读次数:
100
通道题意:边权树,有m个点是危险的,现在想将树分成m块使得每块中恰好只有一个危险的点,问最小的花费是多少思路:dp[i][0|1以i节点为根节点的子树中,i所在的连通块中没有(有)危险节点的最小花费;如果i是叶子节点:如果i为危险点dp[i][0] = inf,dp[i][1]= 0;否则dp[i]...
分类:
其他好文 时间:
2015-08-05 22:08:39
阅读次数:
123
三角函数:
诱导公式记忆口诀:“奇变偶不变,符号看象限”。
“奇、偶”指的是π/2的倍数的奇偶,“变与不变”指的是三角函数的名称的变化:“变”是指正弦变余弦,正切变余切。(反之亦然成立)“符号看象限”的含义是:把角α看做锐角,不考虑α角所在象限,看n·(π/2)±α是第几象限角,从而得到等式右边是正号还是负号。
符号判断口诀:
全,S,T,C,正。这五个字口诀的意思就是说:第一象限内任何一个...
分类:
其他好文 时间:
2015-08-05 15:00:31
阅读次数:
136
加了大部分注释,看注释应该可以明白基本的思路。欢迎大神留言拍砖,此文适合小白观看。 package?com.example.imagedeal;
import?android.content.Context;
import?android.graphics.Matrix;
import?android...
分类:
移动开发 时间:
2015-08-04 23:26:34
阅读次数:
426
学过矩阵理论或者线性代数的肯定知道正交矩阵(orthogonal matrix)是一个非常好的矩阵,为什么这么说?原因有一下几点:正交矩阵每一列都是单位矩阵,并且两两相交。最简单的正交矩阵就是单位阵。正交矩阵的逆(inverse)等于正交矩阵的转置(transpose)。同时可以推论出正交矩阵的.....
分类:
其他好文 时间:
2015-08-04 22:37:53
阅读次数:
569
Problem Definition:You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-pl...
分类:
其他好文 时间:
2015-08-04 22:25:33
阅读次数:
119
Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted in asc...
分类:
其他好文 时间:
2015-08-04 19:00:16
阅读次数:
84
Maximal Square
Total Accepted: 8699
Total Submissions: 44034
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.
For example,...
分类:
其他好文 时间:
2015-08-03 17:00:01
阅读次数:
115