for SFTP file transfer, the Chinese processing is garbled and the encoding cannot be set through the Setfilenameencoding () method.Solution:Download the jsch-0.1.51 source code, find the Sendinit () method in the Channelsftp.java file, modify the contents of the Red Sectionprivate void Sendinit () throws Exception {This.packet.reset ();Puthead ((Byte) 1, 5);this.buf.putInt (3); //modified to This.buf.putInt ( 2 );GetSession (). Write (This.packet, this, 9);}You can then compile and change the c
, search subdirectory depth, specified directory does not count, recommended not more than 5
* $interal Boolean, returns the details of the search results, or returns only the file name, type, and directory in which it was found
* $limit numeric value, limit search results, avoid excessive waste of system resources
* Returns False if error is returned.
* Array (
* Array (
* "Name", "Locate", "type"
* [, "Size", "last_access", "Last_change", "last_modify"]
* ),
* ......
* )
* ********
* ********
*********
*********
* * * * * * * * * * * Verify_file ($SRC, $DST, $interal);
* Use the MD5 algorithm to compare whether two files are the same.
* $SRC string, source file path
* $DST string, destination file path
* $interal Boolean value, can be set to FALSE for larger than 1M files to eliminate MD5 inspection steps and reduce server burden
* Returns TRUE if error returns false
*********
*******
lb reasonable realserver, and then the request of the package's MAC address modified to Realserver MAC address The following is the basic format of our communications package:
The package in this communication has six main fields :src mac, dst mac, src IP, src prot, DST IP, DST IP; now the DST Mac in this packet is
The code is as follows
Copy Code
Original image $DST = "/upload/20120914/20120914040740-0.jpg"; Note that the picture path should be correct Get the original picture information $DST _info = getimagesize ($DST); Switch ($DST _info[2]) { Case 1: $DST _im =ima
Instance 2
PHP thumbnail, such as scale lossless compression, can fill the blank area to complement the color
The code is as follows
Copy Code
Error_reporting (E_all); TestImagezoom (' 1.jpg ', ' 2.jpg ', ', ', ' #FFFFFF '); /*PHP thumbnail function:Equal scale lossless compression, can fill supplementary color author: AndyHosting Format:BMP, JPG, GIF, pngParam@srcimage: Picture to shrink@dstimage: Pictures to save@dst_width: Narrow The width@dst_height: Reduce th
Text Watermark
Text watermark is to add text on the picture, mainly using the Imagefttext method of GD library, and need font file. The effect chart is as follows:
The implementation code is as follows: Copy code code as follows:$dst _path = ' dst.jpg ';
Create an instance of a picture$DST = imagecreatefromstring (file_get_contents ($DST _path));
Make a text$font
Original from: Blog Park small Kinko
Image scaling algorithm and speed optimization--(i) Nearest neighbor interpolation
Image scaling algorithm and speed optimization--(ii) bilinear interpolation
———————————————————— below are the original ——————————————————
Introduction to the No. 0 section
Image scaling algorithm is a frequently encountered problem in digital image processing algorithm. We often convert images of some size to other size images, such as zooming in or out of images. The resi
T_SMSGATEWAY_MT where cust_id = 467 and dest_addr = 18171561555;
CUST_ID----------467467467
SQL> select cust_id from T_SMSGATEWAY_MT where cust_id = 467 and dest_addr = 18108399505;
Unselected row
SQL> select cust_id from T_SMSGATEWAY_MT where cust_id = 467 and dest_addr = 18971167925;
Unselected row
As shown in the following figure, oracle hard parses and gener
most common string replication function is strcpy:
Char * strcpy (char * dst, const char * src );
Copy the string ending with NULL indicated by src to the string referred to by dst. src and dst cannot be the same (can be declared by the restrict keyword of c99 ), dst must have enough space to store the copied string.
Copy CodeThe code is as follows:
Original image
$DST = "/upload/20120914/20120914040740-0.jpg"; Note that the picture path should be correct
Get the original picture information
$DST _info = getimagesize ($DST);
Switch ($DST _info[2])
{
Case 1:
$DST _im =imagecreatefromgif (
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.