ctrl + F12 查看文件结构。
From: http://askubuntu.com/a/107735/85224
First install this:
sudo apt-get install imagemagick mplayer gtk-recordmydesktop
those are the required stuff, ImageMagick, MPlayer and Desktop Recorder. Then use Desktop Recorder to capture a portion of the screen/application to use as the screencast. After the Desktop Recorder has saved the recording into an OGV video, MPlayer will be used to capture JPEG screenshots, saving them into the 'output' directory.
On a terminal:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#统计文件数目 | |
ls -l |grep "^-" | wc -l | |
#批量改名 | |
for files in `ls *` | |
do | |
mv $files `echo "xxx_$i.jpg"` | |
let "i++" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
z-index: 0; | |
filter: grayscale(100%); | |
-webkit-filter: grayscale(100%); | |
-moz-filter: grayscale(100%); | |
-ms-filter: grayscale(100%); | |
-o-filter: grayscale(100%); | |
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter ….3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); | |
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); | |
-webkit-filter: grayscale(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//get file from Mongo Grid file system. | |
GridFSDBFile file = fileService.getFile(fileId); | |
//将图片文件转换成一个BufferedImage对象 | |
BufferedImage image = ImageIO.read(file.getInputStream()); | |
//执行对应的操作 | |
BufferedImage thumbnail = Scalr.resize(image, 150); | |
//获取文件的格式 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#checkHosts.sh | |
#author rankun203@gmail.com | |
function success { | |
echo "isok $1 $2" | |
echo "$1 $2" >> ./hosts.ok | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created on 14-6-15 | |
* | |
* output: | |
* 2.787433034459691 Miles | |
* 4.485938629409498 Kilometers | |
* 2.4206068471247955 Nautical Miles | |
* | |
* Original post by dommer on StackOverflow: http://stackoverflow.com/a/3694410/1904043 | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
/** | |
* Created on 14-6-18 | |
* output: | |
50058:49942 | |
So, get0or1 works fine. | |
[12674, 12405, 12604, 12519, 12321, 12520, 12528, 12429] | |
* @author rankun203@gmail.com | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#author rankun203@gmail.com | |
#ref http://unix.stackexchange.com/a/24955 | |
cd /home/rankun203 | |
inotifywait -r -m ./www -e create -e moved_to | | |
while read path action file; do | |
echo "The file '$file' appeared in directory '$path' via '$action'" | |
rsync -avzrhu --update --progress --chmod=u+rwx,g+rwx,o+rwx "$path$file" rankun203@s.rankun.org:/home/rankun203/html/files | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <conio.h> | |
/** | |
* author: rankun203@gmail.com | |
* Usage: | |
* -With Parameter | |
* CMD: charascii.exe A | |
* OutPut: A: 65 | |
* -Without Parameter |