OR (|)
and (&)
XOR (^)
Left Shift (
Right Shift (>>)
Not (~)
1|0=1
1&0=0
1^0=1
0010
1100>>2=0011
~1=0
And and &Num & 1 can get the last digit of the integer num binary
Tree array is a common computing optimization method. Its complexity is generally nlog (N) and has very powerful functions, such as prefix sum, partial sum, and reverse order, DP optimization can be solved. Some people often say that it is a
One, the binary1. Introduction to the SystemThe binary system is a rounding method. Computer language is binary, the computer can directly recognize the binary data, the other data can not be directly recognized.2. Commonly used in the system1)
Directory:1.Different character sets the same word stands for different meanings, try to use notpd++to open those garbled characters of the novel, and try to undo it. Byte conversion: binary: 01 10 11) 100 101octal: 01 2 3 4 5 6 7 1016 binary: 01 2 3
today I met a more interesting thing, if you want to calculate 0.1+0.2 equals how much you will answer? "0.3 Ah!" "You may not even consider it. I am also the same when a=0.1,b=0.2 when the if (a+b = = = 0.3) {...}. I could wait a whole afternoon.
One, calculates the number of 1 in the binary representation of a positive1 //number of digits in binary notation for solving positive numbers 2 private static int countbit (int num) {3 int count = 0;4 for (; num > 0; count++)
Engaged in the financial industry, capital operations frequently, here I met the pit .... Slightly inattentive, the user funds may lose hundreds of thousands of, even more terrible ... Go directly to the example:Javascript0.1 + 0.2 Why isn't it
Cd:
.. --Switch to upper level directory
~--Back to home directory (/home/your login name/)
js|
-a--displays all files in the specified directory, including the file name. The file that starts with
-l--Show file
All commands in alphabetical order, only the most commonly used parameters, I believe that when you read, you will have the ability to use man more detailed usageBefore own also published several articles, detailed introduction of a few commands
Remember writing test cases a long time ago and inadvertently discoveringDouble c=2.31;Double d=0.1;System.out.println (C/D);The final output is unexpectedly 23.099999999999998, rather than the simple 23.1, it is obvious that such results will be
An important new feature of SQL Server 2008. The main problem to solve is the table with hierarchical relationships. For example, we use the most organization chart in our daily life. We typically save employee data with a Employees table, and each
itoa
Function: Converts an integer to a string
Usage: char *itoa (int value, char *string, int radix);
Explanation: ITOA is the abbreviation for the English Integer to array, which converts an int integer to a string and saves the value in an array
In the operation of floating-point numbers in PHP, a hole was encountered, which did not get the expected result, as follows:
$a = 69.1;$b = $a *100;$c = $b-6910;
What do you think the value of $c is? The value $c output is -9.0949470177293E-13.
The conversion between decimal and binary
(1) Decimal conversion to binary, divided into integers and decimal parts
① integral number of parts
Method: In addition to 2, in reverse order, that is, each part of the integer divided by 2, the
An overview of algorithms
The full name of MD5 is message-digest algorithm 5 (Information-Digest algorithm), in the early 90 by MIT Laboratory for Computer and RSA Data Security Inc, Ronald L. Riv EST developed and developed by MD2, MD3 and MD4.
Find the number of 1 in binary. For a variable of one byte (8bit), the number of "1" in the second binary representation requires the algorithm to perform as efficiently as possible.
Let's take a look at some of the algorithms given in the sample
Test instructions
Give an integer n to see if it can be represented by a 01 string of K-bits, which is similar to the binary representation of an integer, except that the positive or negative of each representation is given by an input string
from:http://chenjianjx.iteye.com/blog/1681681You find that your machine has a CPU usage of 100%, and it is found to be the result of your Java application, but which code in this application eats the performance?Here's a share from a colleague:1.
Apt-get:The Debian system's package management program (the graphical front end is the new one), will automatically help you handle dependenciesMost commonly used parameters:update--with your software source (listed in/etc/apt/sources.list) to
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.