calculate the front of a specific directory Ten a large fileIn a given directory, want to know which large files exist, take the top 10, by file size ranking(1) , using awk to achieve#!/bin/bashPath=/root/shellFind $path-type F | awk ' {Var=$0"Ls-l" var |getline var1Split (Var1,a, "")FILENAME=A[9]FILESIZE=A[5]printf ("%s%s\n", filename,filesize) | "Sort-k2-n-r|head-10"}‘The above notation can cause memory overflow when there are more files.Improve as
In the development of PHP, because of our country's language environment problems, so we often need to deal with the Chinese. In PHP, we all know that there are special MB_SUBSTR and Mb_strlen functions that can intercept and calculate the length of Chinese, but since these functions are not the core functions of PHP, they are often not open. Of course, if you are using your own server, just open it in php.ini. If the virtual host is used, and the ser
This example uses the Kimlarsson formula to calculate the day of the week based on the date:
First look at Baidu Encyclopedia of Kimlarsson formula definition:
Kimlarsson Calculation formula
W= (d+2*m+3* (m+1)/5+y+y/4-y/100+y/400) MoD 7
In the formula D represents the number of days in the date, m represents the number of months, and Y represents the number of years.
Note: There is a different formula in the formula:
Consider January and Feb
In Excel, using system time and birth date to calculate age, something age and the actual age, in the personnel management, payroll statistics frequently encountered, the following is to introduce the method of calculating the age problem (in Excel2003, for example, the other version is similar).
Steps:
Years of age calculation (method i):
Enter the formula =year (today ())-year (B2) in cell C2 (as shown in the following illustration). Then enter t
= mktime (Date ("G", $time), date ("I", $time),
Date ("S", $time), date ("n", $time),-1, date ("Y", $time));
Return Date (date ("Y-m", $last _month_time). "-D h:i:s", $time);
}
echo Last_month_today ($time);
But then there is another problem, there is no 2011-02-31 such a date, how to do? Now the requirement is for such a date to display the last day of the month. The following code:
Copy Code code as follows:
$time = Strtotime ("2011-03-31");
/**
*
The following is the use of JS code to achieve the Baidu map to calculate the distance between the two, the code is as follows:
to tell you how C # according to Baidu map, calculate the driving distance between the two places
Recently used in accordance with the latitude and longitude calculation of the Earth's surface two distance between the formula, and then use JS to achieve a bit.
There are probably two ways to calculate the distance between two points on the Earth's surface.
The first is the default Earth is a smooth spherical surface, and then calculate the distance between any two points, this distance is called the Grea
February 4, the country will welcome the first day of the 2015 Spring Festival. From 0 o'clock today, if the refund of the February 4 ticket will be added to the corresponding handling charges. Par 48 hours before the driving time by 5%, 24 hours, less than 48 hours by the fare 10%, less than 24 hours by the fare 20%.
Official introduction
12306 refund fee how to calculate
12306 refund Fee How to calculate
Ago"A minute later:Date-d "1 Minute"date-d "1 Minutes"A second ago:date-d "1 second Ago"date-d "1 seconds Ago"After one second:Date-d "1 Second"Date-d "1 Seconds"Using the sampleExample one shows and sets the date time[Root@node56 ct08]# DateSaturday, August 20, 2011 17:37:11 CST[Root@node56 ct08]# Date 08220942Monday, August 22, 2011 09:42:00 CST[Root@node56 ct08]# Clock-w[Root@node56 ct08]# DateMonday, August 22, 2011 09:42:01 CST[Root@node56 ct08]#Example two shows the specified date time[Ro
Computer room charges to do on the machine and the next part, the need to calculate from the machine to the time difference between the machine, so as to calculate the costs incurred during the machine.
At this time, you can use a function can be simple to implement--datediff (), the specific use of rules:
DateDiff (Timeinterval,date1,date2 [, FirstDayOfWeek [, FirstWeekOfYear]])
The return value of the
"CorelDRAW Difficult diseases Quick Search Manual" collection of the author Mu Ping and your graphic design colleagues to discuss the questions raised and Baidu CD bar questions, the actual operation and work encountered in the collation of the problem. Some of these questions refer to the friends in the bar and the network of fellow human answers, for some unclear or questionable questions the authors have personally used CorelDRAW 9 and CorelDRAW X3 respectively verify the operability and auth
Reference article:SQL Server Cursor Utilization: View all table size information for a database (Sizes of all Tables in a databases)Share a SQL Server script (calculate the amount of data for each table in the database and the space occupied by each row of records)Monitor the spatial variability of SQL Server database tables dailyCarefully read the above three-bit article, not the knowledge point and reference to MSDN, consolidating the knowledge poin
How to use Excel to calculate the distribution of the number of students in each grade? Many articles are recommended to use the COUNTIF function, but every statistic a fraction of a function to write a, very troublesome.
For example, to show the distribution of numbers within a c58:c62 within a c2:c56 of less than 60 points, 60 to 70, 70 to 80, 80 to 90, and 90 to 100, enter the following 5 formula:
1. Number of persons with less than 60 points in
Requirements Description:1, in the project need to calculate the duration of a link and the number of times of the link.2, the requirement duration in minutes to display, and count the number of times.How to resolve:It is determined by calculating the difference in the number of seconds between the start time and the end time of a link.Code section:Description: The database uses MySQL, and the persistence layer framework uses MyBatis.The code is as fo
asUser Id,a1.order_date asOrder Date, A1.salesperson asSales clerk,SUM(A1.pay_money) asOrder Amount # Every day of the month details fromTest_a03order asA1WHEREA1.city="City_a" andDate_format (A1.order_date, "%Y%M ")=Date_format (Date_add (current_date, INTERVAL-1 Day),"%Y%m ")GROUP bya1.username,a1.order_date) asA2GROUP byA2. User ID) asA3 Left JOINTest_a03order asA4#a3 is the user to place orders in the same month to find these users in the entire order form order situation to A3 the first
Tags: implementing SQL case when EOF margin block law COM AAAAfter excluding non-working hours and nonworking days, calculate the working time, the code is as follows: --delete function IF EXISTS calculateworkingtime;
Set @workStartTime = ' 09:30:00 ';
Set @workEndTime = ' 18:30:00 '; --Creating Functions--/Create function Calculateworkingtime (startdate datetime,enddate datetime) RETURNS decimal (32,4) BEGIN Declar
E Intnum Int (255) DEFAULT 0;
Share an SQLSERVER script (calculate the data volume of each table in the database and the space occupied by each row of Records) in many cases, we need to calculate the data volume of each table in the database and the space occupied by each record. Here we share a script CREATETABLE # tablespaceinfo (nameinfoVARCHAR (500), rowsinfoBIGINT, reserved
Share an SQLSERVER script (
We know that the multiplication of two n-digit integers, if the regularAlgorithmThe time complexity is O (n2 ). However, using the fast Fourier transformation, the time complexity can be reduced to O (n logn ).
Assume that we want to calculate the product of the following two n-digit numbers:
A = (aN-1aN-2... a1a0) 10 = aN-1x10N-1 + aN-2x10N-2 +... + a1x101 + a0x100
B = (bN-1bN-2... b1b0) 10 = bN-1x10N-1 + bN-2x10N-2 +... + b1x101 + b0x100
Step 1: Calculate the size of the entire Block Header
The size of the data block header space is calculated by the following formula:
Space after headers (hsize) = DB_BLOCK_SIZE-KCBH-UB4-KTBBH-(INITRANS-1) * KTBIT)-KDBH
Some parameters are described as follows:
DB_BLOCK_SIZE: Database block size, which can be obtained from the V $ PARAMETER view.
KCBH, UB4, KTBBH, KTBIT, and KDBH are constants. The values of these definitions can be obtained from the
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.