4.0后,新建android工程,会自动生成drawable,drawalbe-ldpi,drawable-mdpi,drawable-hdpi,drawable-xhdpi,drawable-xxhdpi六个文件夹,除drawable外,其他5个文件夹对应四种级别的density:120dip(l...
分类:
移动开发 时间:
2015-01-22 19:39:45
阅读次数:
175
定义一个函数将dp转换为像素
public int Dp2Px(Context context, float dp) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (dp * scale + 0.5f);
}...
分类:
移动开发 时间:
2015-01-12 13:02:55
阅读次数:
172
A peak element is an element that is greater than its neighbors.
Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.
The array may contain multiple peaks, in ...
分类:
其他好文 时间:
2015-01-11 09:43:24
阅读次数:
153
PDF versionPDF & CDFThe probability density function is $$f(x; \mu, \sigma) = {1\over\sqrt{2\pi}\sigma}e^{-{1\over2}{(x-\mu)^2\over\sigma^2}}$$ The cu...
分类:
其他好文 时间:
2015-01-09 01:34:33
阅读次数:
184
1 px 像素单位 像素和设备有关 如480 * 320分辨率的手机,则横向480个像素点,纵向320个像素点. 固定长度下像素点越多,则像素更高,像素点更小,图像更清晰2. dpi :dots per inch 每英寸像素个数,常见取值 120,160,240,320。分别对应low,mediu....
分类:
其他好文 时间:
2015-01-08 19:47:57
阅读次数:
134
PDF versionPDF & CDFThe probability density function of the uniform distribution is $$f(x; \alpha, \beta) = \begin{cases}{1\over\beta-\alpha} & \mbox{...
分类:
其他好文 时间:
2015-01-08 13:14:00
阅读次数:
176
PDF versionPDF & CDFThe exponential probability density function (PDF) is $$f(x; \lambda) = \begin{cases}\lambda e^{-\lambda x} & x\geq0\\ 0 & x 10) ....
分类:
其他好文 时间:
2015-01-07 06:57:04
阅读次数:
165
1.视点处理MATLAB提供了设置视点的函数view,其调用格式为:view(az,el)az为方位角,el为仰角。均以度为单位,系统默认视点为(-37.5,30) 例:从不同视点绘制多峰函数>> subplot(2,2,1);mesh(peaks);view(-37.5,30);%指定子图1的视....
分类:
其他好文 时间:
2015-01-01 23:41:45
阅读次数:
217
A peak element is an element that is greater than its neighbors.
Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.
The array may contain multiple peaks, in...
分类:
其他好文 时间:
2015-01-01 06:42:24
阅读次数:
107
A peak element is an element that is greater than its neighbors.
Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.
The array may contain multiple peaks, in ...
分类:
其他好文 时间:
2014-12-19 15:50:51
阅读次数:
135