Let you define a macro to explain how many seconds a year has:
The answer is as follows:
#define SECONDS_PER_YEAR 60*60*24*365(UL)
"The advantage is that you can write a formula without having to perform computation by the compiler, saving your mind. The point is that you have also written the source of the results, which are clear and easy to read. Also, the UL shows that you are strict with the data size ,"
"Switch ~ What do you say? Who don't k
Go from: http://blog.csdn.net/madding/article/details/26717963 generate self signed certificate# Generate a key, your private key, OpenSSL will prompt you to enter a password, you can enter, you can not lose,# Enter the words, each time you use this key to enter the password, security, or there should be a password protection > OpenSSL genrsa-des3-out selfsign.key4096# uses the key generated above to generate a certificate Signing Request (CSR) # If your key is password protected, OpenSSL will f
apply for a certificate for the website, you will need to add your domain name. > OpenSSL req-new-key selfsign.key-out selfsign.csr# generate self signed certificate SELFSIGN.CRT is the certificate we generated > OpenSSL x509-req-d Ays 365-in Selfsign.csr-signkey selfsign.key-out selfsign.crt# Another easy way is to generate key and certificate > OpenSSL req-x509-no with the following command Des-days 365-
, openssl will first ask your password and then ask you a series of questions, # among them, Common Name (CN) is the most important. It represents the target of your certificate. If you apply for a certificate for your website, you need to add your domain Name.> Openssl req-new-key selfsign. key-out selfsign. csr # generate the Self Signed certificate selfsign. crt is the certificate we generated> openssl x509-req-days 365-in selfsign. csr-signkey sel
Varray PDA(i) := sysdate + 365*(i-1) ; end loop; Return XIRR(P_DATE_ARRAY => PDA,P_AMOUNT_ARRAY => p_amount_array, P_GUESS => P_GUESS);END;
3. Related functions: xnpv and NPV
create or replace FUNCTION "XNPV" (p_date_array in p_date_array, p_amount_array in t_amount_array, p_discount_rate in number ) RETURN NUMBER IS ----- Reference:
In the algorithm introduction book see a more interesting probability algorithm, here add their own understanding to share under: The last time I just saw the friends of the circle said:" two people in the same dormitory, and the same year, the same day, this fate is really drunk ", I was drunk, looked at the algorithm after the discovery, the house has a person, then you can The probability of 50% birthday is the same. It is proved that: first of all, suppose there's a room K Individuals, res
DECODE (MODE, ' FIFO ', 1,-1) * TO_CHAR (RQ, ' Yyyymmddhh24miss ')
Floor ((date2-date1)/365) as the year
Floor ((date2-date1, 365)/30) as Month
D (MoD (date2-date1, 365), 30) as day.
20.next_day function
Copy Code code as follows:
Returns the date of the next week, day is 1-7 or Sunday-Saturday, 1 means Sunday
Next_day (sysdate,6) is
Topic Link: Click to open the link
The main topic describes a slight pit is the 1752.9.2 ago the United States date with the old algorithm, 9.14 after the new algorithm
The other 1.1.1 is what setup is for Saturday. The number of days needed to be reduced by 2
Lunar Date =year*365+m[month]+day+year/4-2
New Calendar Date =year*365+year/4-year/100+year/400+m[month]+day+1752/100-1752/400-11-2
=year*
Recently in the Writing PE analysis tool, need to convert timedatestamp field value for date time format, this is VC + + source.
Converts the number of seconds in GMT time to date time format
CTime getgmtdatetime (Long Value)
... {
GMT time starting from January 1, 1970, first as the initial value of the assignment
int year=1970, month=1, Day=1;
int hour=0, min=0, sec=0, msec=0;
Temporary variable
int iyear=0, iday=0;
int ihour=0, imin=0, isec=0;
Calculate the year the file was created
Iyear=val
Tags: drive ola C # bottle ring var sha OLE DeleteThe Bson document is directly supported by MongoDB itself, and the Bson document corresponds to the Bsondocument class in the official driver of C #: var bsondoc=new bsondocument () { []=" 123 " , [ "Name" ]= [ "age" ]=32, }; Because Bson is very similar to JSON itself, it is as easy as JSON to convert from. NET objects to each other. PublicClassPerson{PublicStringId{Get;Set; }="123";PublicStringName{Get;Set; }Publicint age{ get;set;} }
Once high cost performance G620 processor +h61 Motherboard became a classic entry-level platform, but with the advent of the G620 processor upgrade G630, it seems to be breaking the situation, G630 processors have better performance, and the price is equivalent to the increase of no increase in products, Therefore, the current installation of the author think that the introduction of cost-effective G630 platform is worth recommending, the following computer technology for everyone to recommend d
patient bank, it is willing to pay you the interest every day, We calculate the amount of money per day, the amount of money for the second day = 1+p365 1+\frac{p}{365} (Interest = Total Gold (1) x (p) x time (1365 \frac{1}{365}), and the No. 365-day amount of money is (1+p365) 364 (1+\frac {p} {365}) ^{364}, did not
public private key. SERVER.CRT: The public key of the node certificate. Server.key: The private key of the node certificate, the private key should be kept confidential. 2.4.1 Generate root certificate
Copy the public key generation script to the data directory and execute the command to generate the root certificate public key ca.key,ca.crt.
cp/mydata/fisco-bcos/genkey.sh/mydata/nodedata-1/data/
cd/mydata/nodedata-1/data/
chmod +x genkey.sh
./genkey.sh CA
computer. To do all this, you need to order the advanced version of Office 365 (home Premium). But it's very easy to use, so it's an attractive choice for someone who's used to the Office suite and who needs more powerful document editing than Google Docs or Microsoft's own office Web apps. Still, you can choose to buy only stand-alone version of Office 2013 desktop software and SkyDrive as the online storage Center for your documents. This way you w
--(9) query employee information for employees who have a seniority greater than or equal to 10 years.SELECT * from emp where (sysdate-hiredate)/365>=10;--(10) query employee information and require the names of all employees to be displayed in uppercase letters.Select Initcap (ename) from EMP;Select Upper (substr (ename,1,1)) | | Lower (substr (ename,2)) from EMP;--(11) Displays the names of all employees, the year and month of entry, sorted by the m
, this is to take the example above, test_temp the time table has been created after the adjustment.Here you can directly use T_seqid,t_name to change the volume ... If you have changes to T_seqid, t_name, you need to update the numbers in the Test_temp table4> Return key Oracle: The end of the storage process can be used directly with the return keyword MySQL: You need to define a tag first and then use the Leave keywordUse the sample: Oracle:Begin IF t_name is null and then return;
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.