上传本地文件到服务器
scp /path/filename username@servername:/path/
例如scp /var/www/test.php root@192.168.0.101:/var/www/ 把本机/var/www/目录下的test.php文件上传到192.168.0.101这台服务器上的/var/www/目录中
scp /path/filename username@servername:/path/
例如scp /var/www/test.php root@192.168.0.101:/var/www/ 把本机/var/www/目录下的test.php文件上传到192.168.0.101这台服务器上的/var/www/目录中
简单说,SSH是一种网络协议,用于计算机之间的加密登录。
如果一个用户从本地计算机,使用SSH协议登录另一台远程计算机,我们就可以认为,这种登录是安全的,即使被中途截获,密码也不会泄露。
输入以下命令:
sudo service sshd status
如下提示的话,说明没有安装ssh服务,需要安装ssh服务:
Loaded: error (Reason: No such file or directory)
如下提示的话,说明已经安装了ssh服务,但是没有开启,需要开启ssh服务:
前几天在阿里云一次买了三年的云服务器,选择了win2008R2操作系统。
结果发现,IE不管开什么网站都显示不信任网站,并且IE的安全级别一直为最高,不能调下来。不断地弹出对话框:
早上的时候,发现阿里爸爸大发慈悲,给了我等穷人一次福利。
阿里云 1核 2G 1M 新用户拼团仅需99元一年,三年279元。
于是赶紧买了三年……
本次学习drawLooper.cpp中有关SkDrawLooper类的用法,并且分析了canvas draw api中的二层循环的作用。
SkDrawLooper有两个子类:SkLayerDrawLooper和SkBlurDrawLooper。
文字绘制主要包括编码转换(主要是中文)、字形解析(点线或image)和实际渲染三个步骤。在这个过程中,字形解析和实际渲染均是耗时步骤。Skia对文字解析的结果做了一套缓存机制。在中文字较多,使用多种字体,绘制的样式(粗/斜体)有变化时,这个缓存会变得很大,因此Skia文字缓存做了内存上的限制。
去除成员函数之后,我们看到SkPath包括这几个成员,注释中补充了说明
class SK_API SkPath {
//SkPath中的主要内容,SkAutoTUnref是自解引用,之所以这么设计,是为了复制SkPath时,省去份量较多的点复制(只复制引用)。
//由一系列线段组成
SkAutoTUnref<SkPathRef> fPathRef;
int fLastMoveToIndex;
uint8_t fFillType;//如下四种类型之一
/*enum FillType {
kWinding_FillType,//绘制所有线段包围成的区域
kEvenOdd_FillType,//绘制被所有线段包围奇数次的区域)
kInverseWinding_FillType,//kWinding_FillType取反,即绘制不在该区域的点
kInverseEvenOdd_FillType//第二种type取反
}*/
mutable uint8_t fConvexity;//凹凸性,临时计算
mutable uint8_t fDirection;//方向,顺时针/逆时针,临时计算
#ifdef SK_BUILD_FOR_ANDROID
const SkPath* fSourcePath;//Hwui中使用,暂不关注
#endif
};
关于 fFillType中 kWinding_FillType和 kEvenOdd_FillType的区别,可看SkPath::contains。这是判断点是否在不规则几何体内的经典代码(),很有参考意义。
从渲染流程上分,Skia可分为如下三个层级:

DashPathEffect是PathEffect类的一个子类,可以使paint画出类似虚线的样子,并且可以任意指定虚实的排列方式.
/** intervals: array containing an even number of entries (>=2), with
the even indices specifying the length of "on" intervals, and the odd
indices specifying the length of "off" intervals.
count: number of elements in the intervals array
phase: offset into the intervals array (mod the sum of all of the
intervals).
For example: if intervals[] = {10, 20}, count = 2, and phase = 25,
this will set up a dashed path like so:
5 pixels off
10 pixels on
20 pixels off
10 pixels on
20 pixels off
...
A phase of -5, 25, 55, 85, etc. would all result in the same path,
because the sum of all the intervals is 30.
Note: only affects stroked paths.
*/
static SkPathEffect* Create(const SkScalar intervals[], int count, SkScalar phase)
以上是官方的代码注释。