Something that is often done and often thought of.
Obscure if condition
1) for | | The processing
The code above will take more time than the following code.
Although reducing the number of lines of code is a good goal, minimizing the time required to understand the code is a better goal.
return value
The "$ret" above is an alibi for "I can't think of a name." Instead of using such empty
variable is used to hold the alias-indicating the purpose of the variable. And may help us find defects.
498) this. width = 498; 'onmousewheel = 'javascript: return big (this) 'alt = "\" src = "http://www.bkjia.com/uploadfile/2013/0904/20130904095421813.png"/>
A good name should describe the purpose of the variable or the value it carries.
498) this. width = 498; 'onmousewheel = 'javascript: return big (th
I have been working on projects for a long time, so I am relatively busy. today I finally have time to look back at my own code to see where there is a problem and where there is a bad taste.
What you often do and what you always want
Obscure if condition
1) Processing |
The above code takes more time to understand than the following code
Although reducing the number of lines of code is a good goal, it is a better goal to minimize the time requi
I have been working on projects for a long time, so I am relatively busy. today I finally have time to look back at my own code to see where there is a problem, where there is a bad taste, what I often do and what I often think.
Obscure if condition
1) Processing |
The above code takes more time to understand than the following code
Although reducing the number of lines of code is a good goal, it is a better goal to minimize the time required t
JAVA basics: Find the class name-general Linux technology-Linux programming and kernel information from the. class file. The following is a detailed description. You can determine the name of a class in multiple ways:
Assume that all classes start with com, org, or net.
Search for a class named Hack by classpath.
Search for classpath to
++ ;}}} catch (zipexception z_e) {z_e.printstacktrace () ;}catch (ioexception io_e) {io_e.printstacktrace ();}}}
The jar package for testing: D: \ workspace \ test. Jar code is as follows:Test. Java:
public class Test { public static void main(String[] args){ System.out.print("aaa"); }}
The test results are as follows:
D: \ workspace \ test. jar, COM/test. Class, line number = 3
The above code is not related to the decompilation, so c
Seek the Name, seek the FameTime limit:2000ms Memory limit:65536kTotal submissions:16035 accepted:8158DescriptionThe little cat is so famous, which many couples tramp over Hill and Dale to Byteland, and asked the little cat to give name s to their newly-born babies. They seek the name, and at the same time seek the fame. In order-to-escape from such boring job, t
As longHum a few wordsMelodyYou can also find the desired song without knowing its name.
What if you hear a touching melody without knowing where it comes from? At this time, you should find midomi and search for music by means of hum or singing. All you need is a microphone. After you click it to enter the service, it will prompt you to "hum". After you "hum",
This is often the case in development: there are a number of similar images in the Drawable folder (the similarity here is not only similar to the image name, but also similar), and now you have to select one of them according to the user's operation. For example, in a speech-like development, press and hold the "talk" button can be entered into the user said, then, need to have a picture in real time to re
Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1, A 2, B 3, C ... AA, Z Credits:Special thanks to @ifanchu for adding this problem and creating all test cases.This problem and Excel Sheet column number is the Excel table ordinal is together, but I spend more time on this topic than above, the starting principle is the same, is a request, the problem from the low to high, e
Recent projects used in the need to call the real-name authentication interface, real-name authentication interface price compared to SMS is not a bit higher than a few cents, so that the conditions of the call authentication is strict, so use to JS verify the true name and JS authentication ID number.
Get to the poin
Recently in the circle of friends "looking for the name of the house" and "Miles seek knife" this kind of small game comparison of fire, I tried to write a version of Android, Inside is a series of shape near the word, the realization principle is very simple: with a GridView and then each of the square can be made, Click on the correct item to change the number of rows and columns in the GridView.First, th
Recently in the circle of friends "looking for the name of the house" and "miles seek knife" such small games than the fire. I tried to write a version of Android, which is full of a series of shape near the word, the implementation of the principle is very easy: with a GridView and then every item into a square can be, click on the correct item to change the number of rows and columns of the GridView can b
Label:When you do a simple report rendering, the table name of the database is xx.xxx (the database is SQL Server2008, ".") is a valid character, the persistence layer framework is hibernate), and if you use @entity annotations, the SQL exception is thrown when fetching data: The object name is invalid because hibernate will "." The HQL statement is appended as the table
Tags: db2 col ack admin Open get service Find drive 1.db2com Open the console 2,DB2 get dbm CFG You can find the port number or port name by querying the database Manager configuration parameters by DB2 get dbm CFG. Example: $ DB2 get dbm CFG TCP/IP Service name (SVCENAME) =
character of the string. the first line of input is two integers n and M. Next there are n rows, each containing the first and last names of the I-Cat and two strings. The surname and the names are standard meow on the planetstring. next there are M lines, each containing a string on the Meow planet, indicating the string the teacher named. Outputfor each teacher named string output How many cats should answer. the last line then outputs how many times each meow is ordered. Sample Input2 36 8 2
Recently in a new project and the bank has an interface, the transfer needs to provide the bank name and line number, but the cooperative banks do not have the National Bank Bank name and line number data. (Say no, who believe Ah, is not willing to give, I find the province
1: In the mobile phone we upgrade Alipay 9.9, and then click "My" in the access screen, open personal information, as shown in the following figure.
2: Then find the admin option in the interface after entering, as shown in the following figure.
3: Find the "privacy" option in the upper-right corner here, and click on it to open the entry.
4: In the red box can switch customs clearanc
How to take the file name and line number in the Java source code file:
In the C + + program, the compiler provides two macros to support the acquisition of line numbers and file names in the source file, the two macros are __file__,__line__
You can print line numbers and file names in the following ways
1.#include 2.int main() 3.{ 4. fprintf(stdout,"[%s:%d] Hello World!",__FILE__,__LINE__); 5. return 0
/* (Start of Program head Note) * Copyright and version Statement of the program (c) 2011, the Computer College of Yantai University * All rights reserved. * File Name: * Author: Shangpeng * Date of Completion: September 16, 2012 * Version number: 001 * for tasks
And the description of the solution method * Input Description: * Problem Description: Design a program, input 10
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.