Java basics-Bubble sorting, java basics bubble
// Bubble sort, and compare public static void sort1 (int [] aa) {int size = aa from the back of the array. length; int temp; // cyclic array for (int I = 0; I
Sort idea: the first layer for loop, each value in the loop array, the second layer for loop, compare the size of aa [I] In the first for loop with other numbers starting from I + 1. If it is smaller
Java basics-New I/O technology (NIO) and basics nioBefore JDK1.4, I/O input/output processing is called the old I/O processing. Beginning with JDK1.4, java provides a series of improved new input/output features, these functions are called new I/O (new I/O) and many NEW classes are added for processing input/output.Java. nio package and sub-PackageIn addition, many classes in the original java. io package a
Java basics --- Servlet listener, basics --- servlet
Before writing this article, read the school friends write, I feel the basic knowledge of induction is very comprehensive, I am not cumbersome to write here, link address (http://www.cnblogs.com/sherryueda/p/4273169.html ),
I will write down the specific application of the listener:
The function is used to listen to various WEB operations. When an event i
Linux BASICS (1), linux BASICS (Linux Command:/root directory. current directory .. files starting with "·" in the upper-level directory are hidden files, and files starting with "d" are folder man + query content or commands: view the help (external command) query content or command -- help: a simple view of help is not as good as man's Detailed help + built-in command name: View help (built-in command) ls
Python basics 1 and python Basics
Variable: Information stored, called, modified, or operated in the future
Constant: Fixed amount, all uppercase letters
Naming rules:
Note:
#: Comment on a single line
"Or ''': multi-line comment
Get user input: Input ("")
Strong conversion:Str (integer type) # convert Integer type to string type
Int (string accepted) # convert string type to integer type
Arithmetic Operato
Python basics-functions and python Basics
A function is a function block that can be called repeatedly.
I. Definition
Def function name (parameter):... function body... return value
Requirements:
Def: function keyword
Function Name: the name of the function used for future calls.
Function body: code segment for running some operations
Returned value: whether the function is successfully run or not, or
Python basics special symbols and python basics special symbols
# \ N carriage return
# \ R line break
# \ S space
# \ T tab, do not know? Open a txt text file and press the tab key on the computer, that is, the one on caps lock. in the slot, you can see a large space (or ultra-short space). This is the tab character.
# Other functions will not be used. These functions are sufficient.
# % D Number
Pr
Python basics _ type_dict, python basics _ dict
# The dict dictionary is not as suitable as the key-value dictionary. I don't know how this name came from. It can be used for usernames and passwords, but isn't it too low to use this database?
# Expand with braces {} and separate each element with commas (,). Each element must have key and value, and key and value are separated by colons.
A = {'A': 1, 'B'
01Python basics _ 09 exception, 01Python basics _ 091. try try t
Original program:
1 import math2 3 while True:4 text = raw_input('> ')5 if text[0] == 'q':6 break7 x = float(text)8 y = math.log10(x)9 print "log10({0}) = {1}".format(x, y)View Code
This code receives the input from the command line. When the input is a number, calculate its logarithm and output it until the input
Inner class BasicsClasses are defined inside the class, either in the member's inner class or in the local inner class (inside the method)First, members of the internal class① can have access modifiers②class File Name: External class class name $ internal class class name. class③ is a complete, independent class④ can be new in any of these non-static places, but external class objects must be used in third parties. New way of generating inner classStudent s = outside.new Student ();⑤ static inne
Python basics and python Basics
Variables and assignments
Name = 'kevin ': if the value of a variable is of the str type, it must be caused ''.
Age = 21: ''is not required if it is an int''
Variables and names
Easy to understand: it is best to be knowledgeable
Nums_of_kevin_gf = 10
NumsOfKevinGf = 20: hump method
Name-of-kevin-gf = 10: the non-standard naming method triggers a
Python function basics 2: python function Basics
1. What are naming keyword parameters?
Format: All parameters after * are named keyword parameters.
Features: 1. The caller of the constrained function must pass the value in the form of Kye = value.
2. The caller of the constraint function must use the specified Key name.
def auth(*args,name,pwd): print(name,pwd)auth(pwd='213',name='egon')def register(nam
Python self-learning log-basics (1) and python Basics
From Understanding python to learning python, I experienced a long time of psychological struggle. People always have a natural fear of unknown things, but they are curious about the unknown. In the end, I opened this door and started to learn python.
Python is actually quite interesting. This article mainly introduces python in basic aspects.
1. install
Java basics --- Exception Handling, java basics Exception Handling
Recognition exception
An instruction stream that causes program interruption when an exception occurs. If the exception is not correctly handled, the program may be interrupted and cause unnecessary losses, therefore, in the program design, we must consider the occurrence of various exceptions and properly handle them so as to ensure the nor
A list of python basics and python Basics
List Function
The list function converts other types of sequences to a list, as shown in figure
>>> List ("hello world ")['H', 'E', 'l', 'l', 'O', '', 'w', 'O', 'R', 'l ', 'D']
List operations
Element assignment can change the list, as shown in figure
>>> Sen['H', 'E', 'l', 'l', 'O', '', 'w', 'O', 'R', 'l ', 'D']>>> Sen [0] = 'H'>>> Sen['H', 'E', 'l', 'l', 'O'
Java basics-annotations and java Basics
Annotation is a form of metadata that provides non-program data and has no direct impact on the annotated code.
This article mainly summarizes the usage of comments. java platform (SE) pre-defined comments. Type comments are used with the pluggable type system for stronger type checks, and how to implement repeated comments.
Annotations have many functions, including:
Java basics-generic 1 and java Basics
The use of generics can make the type name as a parameter in the class or interface definition, just like a common parameter, so that the defined type is more universal.
Advantages of generics:
Strict type check for compilation
The java compiler is more rigorous in checking the type of generic code and can detect some runtime errors in common code.
Eliminate type
Java basics-network programming, java basics Network Programming
I. IP and InetAddress
Java supports the development of network communication programs. It mainly provides two communication protocols: TCP and UDP.
Reliable connection and transmission, and third-party handshake
Unreliable connection transmission, which is not necessarily acceptable to the receiver during transmission
All network program d
() sets the Date object's month field and day number fields (World time) Date.setutcseconds () to set the Date object The seconds field and the Millisecond field (at the time of the World) Date.setyear () sets the Date object's Year field date.todatestring () to return dates as a string date.togmtstring () to convert date to world time words Character string date.tolocaledatestring () returns the date part of a Date object as a locally formatted string date.tolocalestring () Converts a da
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.