This article mainly introduces nodejs to traverse folders and measure the file size. The following uses nodejs to traverse folder files and read all files, and output the data in ascending to smallest order. If you need a friend, you can refer to the fact that you have been away from the company for more than two months. You have written many tools before, but on the day I left the company, I personally for
Bask
It's ready to be compiled into components, and PNG is supported.
' I have released this source code into the public domain. Use it
' With no strings attached.
' Just call getimagesize with a string containing the filename, and
' It'll return a user defined type ' imagesize ' ("below")
' Return values of 0 indicate an error of some sort. The error handling
' In this module is limited. There is *no* error handling on the test
' Form. This routine are limited to X or Y sizes of 32767 pixels
During file upload, in order to achieve the asynchronous upload effect, iframe is usually used for file upload, but we cannot process the data returned by the server like ajax, so as to determine the file size and file style, we generally think that when we upload files, in
. Of course, change the file name. HTA will block the security prompt, but it is difficult to obtain it.Not recommended, not to mention
Next, let's talk about another method. There is an IMG tag in the HTML Tag that is not "deep" for general developers. let's first talk about its attributes: SRC, DYNSRC, start, ALT, controls, loop, loopdelay, hspace, vspace .... some commonly used attributes will not be listed. Here we will talk about the "DYNSRC"
During file upload, in order to achieve the asynchronous upload effect, iframe is usually used for file upload, but we cannot process the data returned by the server like ajax, so as to determine the file size and file style, we generally think of using js to make a prelimin
We do file upload, in order to achieve the effect of asynchronous uploads, will generally choose to use the form of IFrame to upload files, but we can not like Ajax to the server-side returned data processing, so as to file size and file style judgments, So we generally think of using JS to upload the
In the past few days, the database may accidentally use the log separation method to reduce log files, causing database files to be inaccessible. Summary of database slimming.
Please follow these steps. Do not take the following steps if the previous steps are not performed to avoid damage to your database.
Generally, steps 4 and 6 are not recommended. Steps 4 are not secure and may damage the database or cause data loss. If the log reaches the upper limit in step 1, subsequent database processi
/* -- Pay special attention
Follow these steps. Do not follow these steps.Otherwise, your database may be damaged.
Generally, steps 4 and 6 are not recommended.Step 3 is not safe, and may damage the database or lose dataIf the log reaches the upper limit in step 1, the subsequent database processing will fail and the log can be restored after being cleared.--*/
-- All the following database names refer to the names of the databases you want to process
1. Clear logsDump transaction data
Please follow these steps. Do not take the following steps if the previous steps are not performed to avoid damage to your database.
Generally, steps 4 and 6 are not recommended. Steps 4 are not secure and may damage the database or cause data loss. If the log reaches the upper limit in step 1, subsequent database processing will fail and the log can be restored after being cleared.
1. Clear logs
Dump transaction database name WITH NO_LOG
2. truncate transaction logs
Backup log database name WIT
// ================================================ ====================================
// Function: of_getpicturesize ()
//--------------------------------------------------------------------
// Description: obtains the image size of an image file (supported in GIF, JPG, and BMP formats)
//--------------------------------------------------------------------
// Parameters:
// Value string as_filename name
1. Write the configuration file as follows (take the Amadeus system as an example):Write the configuration file, put under the/etc/logrotate.d/xxxx, where xxxx is the name you take, without a suffix. For example, this file in the Amadeus system is/etc/logrotate.d/amadeus/usr/local/tomcat_amadeus/logs/catalina.out { copytruncate daily dateext
After Outlook deletes or archives a message, why the data file remains the same size.
Reason Analysis:
Originally, the archive will still retain the original file structure, need to compress to release this part of the space. Compression is usually run automatically in the background when the computer is idle and Out
MySQL import large SQL file size limit problem resolution, MYSQLQL
The resolution process is as follows:
1. Since MySQL can parse the compressed file of SQL, it will compress 200M to 5 m.
2, by default: MySQL import file size is
wrote down the file. This time I used my notes. You can guess it later, I opened the saved FLA document again, cleared the library, and cleared the scenario. I just deleted the content and saved it ......
Haha, I did not make a mistake before cutting the knife, and the size increased again.
If you don't believe it, try it. Do you know what it means -...... -I don't know how to say it. It is a bad thing.
Want to know how large the file to compress will be after compression? Open the WinRAR window, select the folder or file you want to compress, and then click the Info button on the toolbar, and in the Open window, click the estimate button in the estimate compression function bar, WinRAR will give you the compression r
1. Path:/etc/nginx/nginx.conf and/ETC/NGINX/CONF.D,In fact, only/etc/nginx/nginx.conf this one configuration file, because in nginx.conf, other configuration files can be used by the include directive • introducedSome configuration files:Server {Listen the; server_name test.net; Root/var/www/test; #include none.conf; #error_page404/404. html; Location~ [^/]\.php (/|$) {include fastcg
Follow the steps to avoid damaging your database if you do not follow the previous steps.
Generally do not recommend to do 4th, 62 steps, 4th step unsafe, it is possible to damage the database or loss of data. 6th step if the log reaches the upper limit, subsequent database processing will fail, and the log will not be restored until it is cleaned.
1. Empty log
DUMP TRANSACTION Library name with NO_LOG
2. Truncate the transaction log
BACKUP LOG database name with NO_LOG
3. Shrink the database
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.