给图片加水印实现方法如下: 1 class Mark 2 { 3 public function __construct() 4 { 5 6 } 7 8 /** 9 * 加水印 10 * @param file $srcImg 要加...
分类:
Web程序 时间:
2014-07-16 23:05:44
阅读次数:
210
前几天做了一个让图片旋转任意角度的功能,今天跟大家分享一下。。1、首先把力图片加载进来。//strPagePath为图片的路径 System.Drawing.Image ImgPointer = null; if (File.Exists(strPagePath...
分类:
其他好文 时间:
2014-07-16 23:05:35
阅读次数:
151
//获取日期+时间DateTime.Now.ToString();// 2008-9-4 20:02:10DateTime.Now.ToLocalTime().ToString();// 2008-9-4 20:12:12//获取日期DateTime.Now.ToLongDateString().T...
分类:
其他好文 时间:
2014-07-16 23:03:48
阅读次数:
149
Apache commons-io提供了很多类,这里只介绍FileUtils类。 FileUtils类提供了一些操作文件对象的实用方法,包括文件的读取、写入、复制和比较等。 比如逐句读取和写入一个文件可以使用如下方法: File file = new File("E:/data/a.csv");Li...
分类:
其他好文 时间:
2014-07-16 23:01:07
阅读次数:
363
#!/bin/bash #判断命令行是否代带有两个文件名的参数 if [ "$1" = "" ] || [ "$2" = "" ] then echo "Please enter file name" exit 1 fi #判断目标文件是否存在 if [ -e $2 ] then echo "...
分类:
其他好文 时间:
2014-07-16 22:59:29
阅读次数:
153
file injection代码 file injection原理来讲是比较简单的,在nova boot命令中,有参数--file,是将文件inject到image中 nova boot --flavor 2 --image d96b0e41-8264-41de-8dbb-6b31ce9bfbfc ...
分类:
其他好文 时间:
2014-07-16 22:58:53
阅读次数:
320
使用不同版本的XCode出现的问题:fatal error: malformed or corrupted AST file: 'Unable to load module "/Users/xxx/Library/Developer/Xcode/DerivedData/ModuleCache/XYZ...
分类:
移动开发 时间:
2014-07-16 22:58:17
阅读次数:
185
解决办法:So here’s how we fix it:Remove the kernel’s networking interface rules file so that it can be regenerated# rm -f /etc/udev/rules.d/70-persistent-...
分类:
其他好文 时间:
2014-07-12 09:11:25
阅读次数:
473
主要看Roger的文档,这里作为文档的补充HFile的格式-HFile的基本结构Trailer通过指针找到Meta index、Data index、File info。Meta index保存每一个元数据在HFile中的位置、大小、元数据的key值。Data index保存每一个数据块在HFile...
分类:
其他好文 时间:
2014-07-12 08:26:39
阅读次数:
606
$()、``用来作命令替换${}用来作变量替换(以下内容来自shell十三问)(1).变量的界定$A=B
$echo$AB该命令执行时,将AB整体看作一个变量,而不是变量$A与字母B的连接。$A=B
$echo${A}B该命令执行后将输出:BB(2).特殊功能,对于字符串的处理有很大的帮助。首先,定义变量file=/d..
分类:
其他好文 时间:
2014-07-10 19:07:12
阅读次数:
180