At the invitation of a netizen, I wrote a numeric conversion function. If you have any shortcomings, click it. # Include
/* * Function: int convert (INT num, char * STR, unsigned int Radix)* Function: convert a decimal integer to 2 ~ 36 (excluding 10) hexadecimal number* Parameter: num decimal integer* String buffer after STR conversion. Suppose the buffer is large enough.* Radix Base* Return value: 1 is returned for successful conversion. Otherw
Original article address:36 desserts worth a try (2011)
Author:Junzhi
Year after year, there are more and more dessert parties in the blog, and many children's shoes are getting increasingly dazzled-especially those who read my blog that are not long enough.
Although most of the hundreds of desserts in the blog are based on the family's practicality, there are also some slightly difficult ones. It may be difficult for beginners to get started when th
Convert the java decimal number (negative number supported) to the n-base (n is between [2, 36)
Public class DecimalTONBigit {/*** decimal number (which can be a negative number) to n (n is between [2, 36) hexadecimal * @ author wl */public static final int N = 36; // N indicates hexadecimal public static void main (String [] args) {int data = 71; // data indica
PHP generates unique number 36 binary non-repeating numberThe PHP implementation generates a unique number, using the 10 binary conversion 36 binary to get the unique number of 6000多万个, the number of digits is 10 bits.When a large number of data to be numbered, and the number has a number of digits limit, such as 5-bit license plate number, 10-bit ID number, order serial number, short URL, etc., we can use
The code is transferred from Java, and the variable names are not changed ...... Sort it out when you are free.
Public long todecimal (string input, long BS)
{
Try
{
Long bigtemp = 0, temp = 1;
Int Len = input. length;
For (INT I = len-1; I> = 0; I --)
{
If (I! = Len-1)
Temp * = BS;
Long num = changedec (input [I]);
Bigtemp + = temp * num;
}
Return bigtemp;}Catch{Return 0;}}
// Convert the number of characters in decimal formatStatic int changedec (char ch){Int num = 0;If (CH> = 'A' Ch Num = C
This article describes the PHP implementation of the 36 binary and 10 binary conversion function. Share to everyone for your reference, as follows:
/** * @desc im: decimal number converted to 36 mechanism * @param (int) $num decimal number * Return: 36 number of binary */function ge T_char ($num) {$num = Intval ($num); if ($num
Usage examples:
echo "Get_char:
It first looks for the specified php inclusion path and then finds the current directory. therefore, excessive paths are checked. if the script is included by another script, its basic directory is changed to the directory where another script is located. another problem is that when a scheduled task runs the script, its parent directory may not be a working directory. therefore, the best choice is to use absolute paths: 36 tips to improve PHP code qu
Sword Point 36: Reverse order in an arraytitle: in the array of two numbers, if the previous number is greater than the following number, then the two numbers constitute an inverse pair. Enter an array to find the total number of reverse pairs in this array.For example, in the array {7,5,6,4}, there are altogether 5 reverse pairs, respectively (7,6),(7,5),(7,4),(6,4) and (5,4), output 5.Submission URL: http://www.nowcoder.com/practice/96bd6684e04a44eb
"Program 36"Title: Number of primes within 1001. Program Analysis:2. Program Source code:1 /**2 * 3 * "program 36"4 * Title: Number of primes within 100. 5 * Program Analysis: The method of judging primes: to remove 2 to sqrt (this number) with a number, if divisible, indicates that the number is not a prime, and vice versa is a prime. 6 * 7 * @authorwww.cnblogs.com/java-1008 *9 */Ten One Public clas
Xiaomi phone sales plummeted 36% lei June what did you do wrong?Recently, Xiaomi Technology founder Lei June attended the opening ceremony of the 20th Harvard China Forum and delivered a speech in Cambridge, Massachusetts, USA. In the speech, Lei June said, but Xiaomi only took 2.5 of the time to become China's first, the world's third, the fourth year after the release of mobile phone turnover of more than 10 billion U.S. dollars.Lei JuneAnd for the
Label:CREATE OR REPLACE FUNCTION idfms.func_dec236 (parm in INT DEFAULT 0)RETURN VARCHAR2Is/*10 binary number to 36 binary number*/SRC VARCHAR2 (+): = ' 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ '; --Change to another string, which is any binaryLEN INT;Res VARCHAR2 (10): = ";TMP INT;Val INT;BEGINTMP: = Parm;Len: = LENGTH (SRC);while (TMP >= 36)LOOPVal: = MOD (tmp, Len);Res: = SUBSTR (src, val + 1, 1) | | ResTMP:
This article mainly introduces how to generate a unique number in PHP. in this article, convert the hexadecimal value to 36 to obtain more than 60 million unique numbers that are not repeated, with the number of digits being 10 digits, if you need a large data number, you can refer to the following, for example, the five-digit license plate number, the ten-digit license number, the order serial number, and the short website address can be calculated u
When we want to numbers a large number of data, there is a limit on the number of digits, such as a five-digit license plate number, a ten-digit license number, order serial number, and a short URL, we can use the 36-digit system to calculate non-repeated numbers that match the number of digits.
We use 0-Z (0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ) to represent the value 0-35, for example, the letter Z represents 35. In this case, I want to get a five-di
When we want to number a large amount of data, and the number has a number of digits limit, such as 5-digit license plate number, 10-bit ID number, order serial number, short URL, etc., we can use the 36 binary to calculate the number of non-duplicated digits.
We will 0-z (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) represent the value 0-35, such as the letter Z for 35. So I'm going to get a 5 digit number, the maximum amount of information is
Recommendation 36: Use a delegate declaration in the FCLThere are 3 types of delegate declarations in the FCL, namely: Action, Func, predicate. Especially after their generic versions come out, they have been able to meet most of the requirements of our actual coding process.
Action means accepting 0 or more input parameters, executing a piece of code without any return value;
Func means to accept 0 or more input parameters, execute a pie
Everyone wants to succeed and wants to be the boss. But there are limited opportunities. In most of our working groups, how to easily go to work can satisfy our desire to make money. This article tells you 36 ways to make money at home.
100 people use 1% more power than 100% power.
1. to start a business, you must prepare for losing money or renewing money.
2. Learning the thinking model of the richest man in the world can achieve double performance.
The 36-character rumor of human affairs, read a word, and take a lifetime!
1. Social Interaction tips-teach you how to make achievements
(1) word Tips for "Qian"
The word "Qian" is everywhere. If you are arrogant and arrogant, you will lose the root of your life.
1. uncertain2. Do not forget your pride3. Do not boast of your skills4. Consult with others
(2) word Tips
It seems that people do not have to be too demanding to be friends and friends, so t
Everyone wants to succeed and wants to be the boss. But there are limited opportunities. In most of our working groups, how to easily go to work can satisfy our desire to make money. This article tells you 36 ways to make money at home.
100 people use 1% more power than 100% power.
1. to start a business, you must prepare for losing money or renewing money.
2. Learning the thinking model of the richest man in the world can achieve double perfor
How does the OMGPOP produced by draw something respond to 36 million users within three weeks?
Adopted:
1) cloud computing.
2) nosql
See: How OMGPOP scaled to 36 million users in three weeks
OMGPOP can thank the cloud for its acquisition by Zynga on Wednesday. the gaming startup, whose draw something iPhone app used cloud computing and a nosql database to scale from zero (relatively speaking) to more than
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.