Package com; public class test {public static void main (string [] ARGs) {system. out. println (getsteps1 (); system. out. println (">>>>>>>>>>>>>>>>>>>>>>>>>>>>"); system. out. println (test. getsteps (); system. out. println (">>>>>>>>>>>>>>>>>>>>>>>>>>>> ");} public static int getsteps () {// use the minimum public multiple to reduce the number of traversal times. Int I = 1; int step = 2; Boolean maxstep = false; while (true) {system. Out. Print ("
Init is one of the most indispensable programs in Linux system operation. Init process, which is a user-level process initiated by the kernel. The kernel will find it in several places in the past that used Init, and its correct location (for Linux systems) is/sbin/init. If the kernel cannot find Init, it will try to run/bin/sh, and if it fails, the boot of the system will fail.Linux 7 RunLevel (0: shutdown
DOCTYPE HTML>HTML> Head> MetaCharSet= "UTF-8"> title>title> Head> Body> Body>HTML>Scripttype= "Text/javascript"> for(i= -; I +; I++){ vara=parseint (i%Ten); varb=parseint ((i/)%10); varC=parseint (i/); if(A*a*a+b*b*b+C*C*C==i) {document.write (i+ "Number of daffodils"+""); } }Script>The number of daffodils within JS 1000 (three digits of each number of cubes and equals itself such as 1*
The Windows 7 Pro SP1 installation ISO contains 5 installation options, but is blocked in the package and can only be installed with a professional version, and the following retrofit allows the retrofit ISO to be installed with optional 5 windows
There are many formulas for calculating pi pai in history, in which Gregory and Leibniz found the following formula:
Pai = 4* (1-1/3+1/5-1/7 ...)
The formula is simple and graceful, but in a bad way, it converges too slowly.
I
In order to omit the space and make it visible to the operator who manually fills in the paper, the volume number on the card of the materials shelf is determined to be classified and sorted, as shown in
A-3, A-4, A-5, A-8 forming A-3 ~ 5, 8, etc.
The following code uses a few auxiliary list
/// /// Similar to 1, 2, 3, 5
With Π/4≈1-1/3 + 1/5-1/7 + ... The formula finds the approximate value of π until the absolute value of an item is found to be less than 10^6. #include "C language" with Π/4≈1-
With Π/4≈1-1/3 + 1/5-1/7 + ... The formula asks for the approximate value of π until the absolute value of an item is found to be less than 10^6.
#include
There are many formulas in the history of Pi Pai, in which Gregory and Leibniz found the following formula:Pai = 1-1/3+1/5-1/7 (...)This formula is simple and graceful, but in the ointment, it converges too slowly.If we rounded up
Install and configure Apache and PHP in Windows9x/NT (1). Read the installation and configuration of Apache and PHP in Windows9x/NT (1 ), the most frequently asked question in the PHP email list is: "How do I install PHP on my Windows machine? ", Maybe I can help answer this
===== [1. directory] ============================================== ======================================
1. Directory2. Introduction3. File3.1 NtQueryDirectoryFile3.2 NtVdmControl4. Process5. Registry5.1 NtEnumerateKey5.2 NtEnumeratevalueKey6. system services and drivers7. Hook and expand7.1 Permissions7.2 global hook7.3 New Process7.4 DLL8. Memory9. Handle9.1 name the handle and obtain the type10. Port10
Apache and PHP installation and configuration in Windows 9xnt (1) the most frequently asked question in the PHP email list may be: "How to install PHP on my Windows machine ?", Maybe I can help answer this question. After the installation is complete, you will find that developing PHP programs in Windows is still good.
Content on the machine: accumulate data using cyclic statements. Objective: To learn how to use cyclic statements. /** Copyright (c) 2012, Emy of computer science, Yantai University * All rights reserved. * Prepared by: Li Yang * completion date: January 1, November 01, 2012 * version No.: v1.0 * enter the description: none. * Problem description: the result of 1/3-3/5
We know that a function f can obtain a random number ranging from 1 to 5 with equal probability. How can we obtain a random number ranging from 1 to 7 with equal probability?
Int rand7 (){Int;While (A = rand5 () * 5 + rand5 ()> 26 );Return (A-3)/3;}
AlgorithmThe idea is:
Problem description: there are now n ordered arrays in M groups, such as {1, 2, 3, 4}, {2, 3, 6}, {1, 3, 5, 7 }, select the data smaller than K in these arrays and return this value.
Idea: Compare the minimum data selected each time by referring to the process of merging two Arrays
First, the phenomenon
1. See if a process exists
Ps-ef | Grep-v ' grep ' |grep-e ' Shell/cron/bonus/cash '
www 2624 1 0 Oct24? 00:00:35/usr/local/bin/php/data1/www/htdocs/hb.e.weibo.com/v2/www/htdocs/index.php--uri=shell/cron/bonus/cash- -get=proc_num=1proc_total=1--post=
2. View process creation time
Ps-p 2624-o Lsta
Suppose rand5 can generate 1 ~ randomly ~ Use rand5 to generate rand7 () 1 ~ 7 (Equal Probability)
1. use rand5 to obtain rand2 (). When the number generated by rand5 is greater than 2, It loops until it generates 1 or 2 and the probability of generating
/*************************************** ************************C LanguageAUTHOR: liuyongshuiDATE :************************************************ ***********************//*Question 10: Use recursive algorithms to design functions and calculate 1*3*5*7 *... * (2n-1 ).
*/
# Include
Long fac (int n); // original funct
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.