Copy Code code as follows:
Import Java.io.File;
Import Java.io.FileOutputStream;
Import java.io.IOException;
Import Java.io.InputStream;
Import Java.io.OutputStream;
Import java.util.Enumeration;
Import Java.util.zip.ZipEntry;
Import Java.util.zip.ZipFile;
public class Unzipper {
/*** Extract files to the current directory function equivalent to the right key to select decompression* @param zipfile* @param* @author Gabriel*/@Suppress
1. First look at the files in the compressed document, if you do not know the contents of the file, and then directly decompression, this is not possibleYou can view the contents of a compressed package by using the #tar-tf compressed package name2. Compress a fileTAR-ZXVF zabbix.tar.gz Zabbix-2.4.7/upgrades/dbpatches/2.2/readmeLook at the format is the decompression command, and then add the need to unzip the fil
Article Source: https://www.zhihu.com/question/20523036Today the message received a compressed file, extracted is garbled, from the Internet also found a few methods, the current method is still relatively reliable, as follows:7z SolutionNeed to install P7zip and CONVMV, the commands under Fedora are‘yum install p7zip convmv‘The installation command under Ubuntu issudo apt-get install p7zip convmvAfter installation, you can complete the decompression
Copy Code code as follows:
/**********************
* @file-path to zip file
* @destination-destination directory for unzipped files
*/
function Unzip_file ($file, $destination) {
Create Object
$zip = new Ziparchive ();
Open Archive
if ($zip->open ($file)!== TRUE) {
Die (' could not open archive ');
}
WinRAR can contain annotation information when making a compressed file. When you download the RAR compressed files from the Internet, when the decompression operation, or run the files contained therein, it is best to pay attention to the annotation information, may be included in the annotation information such as registration code, the use of the method and other important content.
If the compression package is more, look at the annotation
Php code used to extract an image file and display it on a browser
$ Size = getimagesize ($ filename); // Obtain mime Information
$ Fp = fopen ($ filename, "rb"); // open a file in binary mode
If ($ size $ fp ){
Header ("Content-type: {$ size ['Mime ']}");
Fpassthru ($ fp); // output to the browser
Provided by Water Cleaners: javascript is used to extract data from any XML file into hierarchical display.
Http://topic.csdn.net/u/20080921/15/655b8f3c-3fbe-42aa-a53a-630bfdb1ae9b.html
Other people's things are not perfect, but they should be added to the favorites.
Zjm1126qqcomCode:
You only need to put XML and this file in the same directory
Label:blogioarspfor File data on2014 Dbcn= "mysql-h172.16.1.194-uroot-p123456";d b=dsp_ad_center;ii=0;ct= ' $DBCN-n-E "select COUNT (1) from Information_sch Ema. TABLES as t WHERE t.table_schema = ' $db ' and t.table_type = ' BASE TABLE '; "'; mkdir-p/chenenhui/$dbwhile true;doif [$ii-lt $ct]then p= $ii; let Ii++;echo p= $p echo ii= $iitable _name= ' $DBCN-E "Select CONCAT (T.table_schema, '. ', T.table_name) from INFORMATION_SCHEMA. TABLES as t wher
Reprint: http://blog.csdn.net/dingmingxin/article/details/6948673
Users who have used Ubuntu know that compressed zip files under windows are unzipped with the archive manager under Ubuntu,
will appear in Chinese garbled. Find a solution in the Internet jar, there are several kinds of oh, I think the following is suitable for my own solution
File: Zip extract Chinese garbled solution
After downloading
Refer to How to link http://www.linuxdiyf.com/viewarticle.php?id=194348Don't talk nonsense directly on the exampleTAR-XZVF $basePath/apd.tar.gz jar/apd.jar-o > $basePath/apd.jar$basePath/apd.tar.gz files to unzipJar/apd.jar the relative file path within the apd.tar.gz file to be decompressed. How this path gets: TAR-TVF *.tar.gz.-O to decompress standard output>./lib-lib64-include/jars/apd.jar redirect outp
[1] bedtools (HTTPS://GITHUB.COM/ARQ5X/BEDTOOLS2)Here is also Bedtools (HTTPS://GITHUB.COM/ARQ5X/BEDTOOLS2) Getfasta. It uses Erik ' s code under the hood.$ cat test.fa>chr1AAAAAAAACCCCCCCCCCCCCGCTACTGGGGGGGGGGGGGGGGGG$ cat test.bedchr1 5 10$ bedtools getfasta -fi test.fa -bed test.bed -fo test.fa.out$ cat test.fa.out>chr1:5-10AAACCDocs:http://bedtools.readthedocs.org/en/latest/content/tools/getfasta.htmlAnd it is wrapped in pybedtools as well:http://pythonhosted.org/pybedtools/autodocs/pybedtoo
When we see a good app, we may be interested in some of its material, or we want to imitate a similar app, then how to get its resource files?Below I take ofo example:1. Open itunes, search ofo keyword, select Store underAfter you find it, download it, then switch back to the library and see the downloaded list2. Right-click the Finder display to view the local3, modify the suffix to zip, and then double-click Unzip, will become the followingThen, find the innermost main
Array | filename | regular
Today, Zblog upload module, need to use a process to extract the file name of the child, the beginning of the problem I want to complicate, matching all possible file names, not only regular expression wrote a large string, and below also split for half a day, Later I suddenly found z-blog upload files are upload, White wrote so many c
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.