The 1th chapter beginner of Small procedure2nd. Basic component learning for small programsThe 3rd Chapter forms the form component and the small program front and back end communicationThe 4th Chapter introduction of product introduction and database planning5th Chapter Development User Login registration and user information6th Chapter Upload Video Business process development7th chapter Development of Video Presentation pageThe 8th chapter develops the video message boardThe 9th chapter devel
window when closed), jframe.do_nothing_on_close (the constant means: do not do any processing when closed), etc.
Class JFrameDemo3 extends JFrame {
Public JFrameDemo3 () {
Init ();
}
The method initializes the window.
private void init () {
Set the window title bar information
This.settitle ("first window");
Set window size to width: 500, Height: 400
This.setsize (500, 400);
Settings window cannot be resized
This.setresizable (FALSE);
The
/etc/profile. Again, we want sudo nautilus to find the file, and then add it at the endNote that this is for experienced students to say. In Jdk10, there is no JRE directory, so in the configuration we do not need to configure the JRE information.Save, close.Ps: can also be used in terminal via command: sudo vim/etc/profile Open Text editor, press Typing commands in the terminal,Source ProfileAlternatively, we can restart Ubuntu and let the configuration take effect.Now, let's hit the command
these numbers2) Print the second largest number of these numbers3) Delete the smallest number4) Print the remaining number andAnswer:" Heool " "". Join (s)print"-" . Join (s) Print L7.To generate a list of 1~100 inside odd numbers using a list deductionThe result is: [1, 3, 5, 7, ..... 99]Answer: for in range (1, 2)]print(L) for inch if x% 2 = 0]print(L)8.Generate a list of squares with a value of 1 ~ 9, minus all the odd squaresAnswer: for in range (2, 2)]print(L) for inch if x% 2 = = 0]pri
number and print it out.Answer:628496......defMywqs (x): s=0 L= [] forIinchRange (1, x):ifX% i = =0:l.append (i) forIinchl:s+=Iifs = =x:returnTrueElse: returnFalsei=0wqs=0 whileWqs : I+ = 1ifMywqs (i) = =True:Print(i) Wqs+ = 1cough again to the Blowing NB linklocals (), Globals ()is a query function that returns information in a dictionary form.function variables? you just think of it as a global variable binding data and it's so simple to bind a statement blockWhat is a scope? Scope
converting it to an encodingBytes's Operation:+ += * *=In/not inIndexes and slicesLen (x)Max (x)MIN (x)SUM (x)Any (x)All (x)The difference between bytes and STR:Bytes Storage bytes (typically values in range (0, 256))STR stores Unicode characters (usually values in 0~65535)Conversion of bytes and StrEncoding (encode)str------------> bytesb = S.encode (encoding= ' utf-8 ')Decoding (decode)Bytes----------> strs = B.decode (encoding= ' utf-8 ')byte array ByteArrayis a variable sequence of bytesCon
parameter list can be empty6. The statement part cannot be empty, if the empty needs to fill the passReturn to create a return value statement:Used in a function to end the execution of the current function, returning the place where the function was called, and returning the reference relationship of an objectreturn[-expression]([] representative can omit)Description1. A function call is an expression2. If there is no return statement inside the function, return the None object after the funct
Weak references (Weak reference) attempt to access objects that have been garbage collected
RuntimeError
General run-time errors
Notimplementederror
Methods that have not been implemented
SyntaxError Python
Syntax error
Taberror
Tab and Space Mix
Systemerror
General Interpreter system error
Unicodeerror
Unicode-related errors
Unicodedecodeerror
Error in Unico
to get results The virtual attribute cannot be copied s.score = # by S.score to modify the score print (S.score) # Modify Success S.score It looks like the property is an impersonation attribute the actual interior has been replacedProblem:L = [1, 2, 3]def f1 (LST):LST + = [4, 5, 6]F1 (L)Print (L) # [1, 2, 3, 4, 5, 6] WhyL = (1, 2, 3)def f1 (LST):LST + = (4, 5, 6) # LST = lst + (4, 5, 6)F1 (L)Print (L) # (1, 2, 3) whyPractice:1. Implement two custom list additionsClass MyList:.... Implement i
memory of the longest should be in their own way to the reality or some examples of comparison The more the vernacular the better remember what the gaudy terms know what is OK (remember Say it as much as possible. Just a corresponding instance relationship in your mind is like a variable in memory .... Off the topic, slipped away) What are arguments, arguments, and parameters?Arguments are parameters when a function is calledA pass is a process that passes a parameter to an argumentParam
i=0;iShell B = new Shell ();Shelllist.add (b);}
Run the Mygameframe class, as shown in result 2:650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/9D/9D/wKioL1mCyiWAqo5tAAGR0UVRs8w661.png-wh_500x0-wm_ 3-wmp_4-s_2486376127.png "title=" Figure 2.png "alt=" Wkiol1mcyiwaqo5taagr0uvrs8w661.png-wh_50 "/>We can see in Figure 2 generated a number of shells, the game window lively a lot! You can extrapolate think about it, in fact, the game window of multiple monsters, multiple cars, mu
) {
Plane.live = false; The plane dies, the screen doesn't show.
if (bao==null) {
Bao = new Explode (PLANE.X,PLANE.Y);
}
Bao.draw (g);
}
}
}
The remaining code is consistent with the previous version and is limited to space, no longer showing
}
The results of the program execution, when the aircraft and shells collide when the explosion occurred, 3:650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9D/E0/wKiom1mIDWbSDXZJAAFP_4fLtjI222.png "title=" Figure 3.png "a
again, it becomes surprisingly simple."Example 5" creates multiple aircraft
public class Mygameframe extends Frame {Image bgimg = gameutil.getimage ("images/bg.jpg");Image planeimg = gameutil.getimage ("Images/plane.png");Plane Plane = new Plane (planeimg,300,300);Plane plane2 = new Plane (planeimg,300,350);Plane plane3 = new Plane (planeimg,300,400);The Paint method works by drawing the entire window and internal content. Automatically called by the system.@Overridepublic void Pai
has disappeared according to the aircraft statuspublic void Drawmyself (Graphics g) {if (live) {Super.drawmyself (g);Calculates the aircraft's new coordinates according to the directionif (left) {X-= speed;}if (right) {x + = speed;}if (UP) {Y-= speed;}if (down) {Y + = speed;}}}In this way, when the program is run, a collision of shells and planes occurs, and the plane disappears, as shown in result 1:650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/9D/B1/wKiom1mEE3iwB7qLAAGDTKvaLm060
SetBounds () are the upper-left coordinates of the control, and the last two parameters are the width and height of the control
*/
Lbltitle.setbounds (100, 10, 100, 30);
Lblusername.setbounds (20, 60, 75, 25);
Lbluserpwd.setbounds (20, 100, 75, 25);
Txtusername.setbounds (100, 60, 120, 25);
Pwduserpwd.setbounds (100, 100, 120, 25);
Btnlogin.setbounds (50, 140, 75, 25);
Btnquit.setbounds (150, 140, 75, 25);
Press all controls on the container
Pnlmain.add (Lbltitle);
Pnlm
layers (Presentation layer) ASCII, ASN.1, JPEG, MPEG, etc.7) Application tier (application layer) Telnet, FTP, HTTP, SNMP, etc.Data encapsulationData unpackingIP: IPV4, IPV6Port:QQ, MSN, Thunder, Electric Donkey, 360 through the port, you can run multiple network applications on one host. The port is a virtual concept, not that there are really several ports on the host.Url:On WWW, each information resource has a unified and unique address, which is called the URL (Uniform Resource Locator), wh
life cycle The last stage. There are two causes of thread death. One is the normal running thread that finished it run () All work of the method; stop or Destroy method to terminate a thread. ( Stop ()/destroy () method has been JdkWhen a thread enters a dead state, it cannot go back to another state.
"Full stack Java notes" is a can help you from Z
to find his destination.
Note: udp ports and tcp
"Full stack Java notes" is a can help you from Zeto long for the full stack of Java Engineer Series of notes. The author is called Mr. G
Internship module Vue+java small full stack development (iii)--dxBackgroundFirst of all, give yourself an answer: this blog I defined as (iii), because the previous two module page, the content is the same, but was changed several times the demand, has been dragged without uploading.Today is the real meaning of the full
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.