Có 80+ tài liệu thuộc chủ đề "giáo trình php"
tailieu.vn Xem trực tuyến Tải xuống
v.addElement(nFields[3].getText. v.addElement(vFields[3].getText());. v.addElement(oFields[1].getText. v.addElement(nFields[4].getText());. v.addElement(nFields[5].getText. v.addElement(nFields[6].getText());. v.addElement(vFields[7].getText. v.addElement(nFields[7].getText());. v.addElement(vFields[3].getText. v.addElement(oFields[1].getText());. v.addElement(vFields[0].getText. v.addElement(vFields[0].getText());. v.addElement(oFields[0].getText());. v.addElement(vFields[1].getText. v.addElement(oFields[2].getText());. v.addElement(nFields[0].getText. v.addElement(oFields[0].getText. v.addElement(vFields[2].getText());. v.addElement(oFields[5].getText. v.addElement(vFields[4].getText());. v.addElement(vFields[4].getText. v.addElement(oFields[6].getText());. When you are writing an applet, it is best to refrain from using the newest Java features, because browser support for the newest releases always comes later than the release dates of the Java API. This section describes...
tailieu.vn Xem trực tuyến Tải xuống
and then fill a rectangle of the same size over it in a different color, you would still see the right and bottom edges of the drawn rectangle because it is one pixel wider and taller. This same idea holds true for all draw and fill methods of the Graphics class. FIGURE 9.3 Drawing rectangles. is the coolest.. Here is...
tailieu.vn Xem trực tuyến Tải xuống
Demonstrates the Color class. Color(int r, int g, int b, int a) Constructs a Color object with the given red, green, blue, and alpha values, which range from 0-255.. controlPanel.add(bright);. controlPanel.add(dark);. Calling darker() on a Color object and reassigning its value a certain number of times and then subsequently calling brighter() the same number of times will not necessarily result...
tailieu.vn Xem trực tuyến Tải xuống
Here is a listing of the source code:. public void run(). //start the thread t.start();. You can see the output of the RunnableTest application in Figure 10.3.. What’s the difference between extending Thread and implementing Runnable ? Why would you choose one over the other? Generally, it is better to implement the Runnable interface. FIGURE 10.3. The output of the...
tailieu.vn Xem trực tuyến Tải xuống
The Project: The Block Game. The Block Game is similar in concept to the well-known Tetris game, owned by the Tetris Company, and originally developed by Alexey Pajitnov. The Block Game project in this book is for learning purposes only and can’t truly compare to the actual Tetris game.. Building the Block Class. The blocks that fall into the play...
tailieu.vn Xem trực tuyến Tải xuống
The registering of PlayAreaListener s takes place in the PlayArea class. The PlayArea class also provides two methods for updating this Vector object, addPlayAreaListener(PlayAreaListener) and removePlayAreaListener(Pla- yAreaListener. You fire PlayAreaEvent s from the PlayArea class by creating an instance of the PlayAreaEvent class and then calling the registered PlayAreaListener s’ block- Landed(BlockEvent) methods. The PlayArea class has a private method...
tailieu.vn Xem trực tuyến Tải xuống
If the end of the file (EOF) is reached, this method returns –1. Although each character read in is not –1, write that character to the writer buffer anyway. Invoking the writer.close() causes the buffer to be cleared, written to the file, and closed. Figure 11.6 shows one run of the FileCopy application.. If you don’t you won’t get any...
tailieu.vn Xem trực tuyến Tải xuống
The width of the edges.. The color to be used as the control color. <code>java.awt.SystemColor.control</code>.. Gets the appearance of this <code>JPRComponent3D</code>.. @return The appearance of this <code>JPRComponent3D</code>.. Sets the magnitude for this <code>JPRComponent3D</code>.. public void setMagnitude(int thick. Gets the magnitude of this <code>JPRComponent3D</code>.. @return The magnitude of this <code>JPRComponent3D</code>.. Overrides <code>java.awt.Component.getMinimumSize</code>. ensure room for at least one pixel in the...
tailieu.vn Xem trực tuyến Tải xuống
public void processMouseEvent(MouseEvent e). Here is the full source code listing for MineCell.java. Defines one cell of the MinePatrol Game.. public void actionPerformed(ActionEvent e). mce = new MineCellEvent(MineCell.this,. MineCellEvent.REVEALED);. MineCellEvent.DETONATED);. public void mousePressed(MouseEvent e). MineCellEvent.UNFLAGGED);. MineCellEvent.FLAGGED);. public void run. case MineCellEvent.FLAGGED:. case MineCellEvent.DETONATED:. public void setContents(int contains). public void resetContents(int contains. public void setHidden(boolean h. public void paint(Graphics g. public...
tailieu.vn Xem trực tuyến Tải xuống
You can also find the Java Documentation installation here. You can either install the documentation on your system or browse it online on Sun’s Web site by using the URL http://java.sun.com/j2se/1.3/docs/.. Source Code. All of the source code of the examples in this book can be found on the CD-ROM.. Click on the Source Code button to get to the...
tailieu.vn Xem trực tuyến Tải xuống
MadLib game, 172–173. Math class, 57 methods, list of, 63. counting backwards, 101–103 floating point math, list of, 37 integer math, list of, 37 modulus operators, 35–36 operator precedence, 37 percentages, 34–35 Math.random() method, 58 Menu component (AWT), 203–207 method access modifiers, 144–145 methods. 173–174 boolean isFocusTraversable. 173–174 boolean isLightWeigth. 173–174 brighter. buttons, list of, 184–187 CodeBase. 173–174 getBounds. 173–174...
tailieu.vn Xem trực tuyến Tải xuống
AddType application/x-httpd-php .php. echo "$var, $Var". bien dong $quang co gia tri la 'np' echo("$a<br>". echo("$quang<br>". include "b.inc";. echo "String: $bool";. echo "<hr>\n";. var_dump($a). using heredoc syntax.<br>. This is a lecture of $name.<br>. echo "$beer's taste is great";. is an invalid character for varnames echo "He drank some $beers";. won't work, 's' is a valid character for varnames echo "He...
tailieu.vn Xem trực tuyến Tải xuống
In the first part of this book, you’ll be getting familiar with the history and basic capabilities of jQuery. You'll also learn the basics of jQuery, including how to make the library available for use in your applications and how the core of jQuery—its powerful selector engine—works.. These libraries aimed to simplify the use of JavaScript to make it more...
tailieu.vn Xem trực tuyến Tải xuống
The basic selectors allow developers to select elements by tag type, class name, ID, or any combination thereof. While viewing http://localhost/testing/, launch the Firebug dialog, and click the Console tab (see Figure 1-4). If the Console panel is disabled, click the Console tab, and select Enabled. Selecting Elements by Tag Type. To select an element by tag type, simply use...
tailieu.vn Xem trực tuyến Tải xuống
21 which returns the following in the console:. span.foo. span, span.foo. Because your HTML example does not have any form elements in it, you’ll need to append the file with some new markup for the following examples.. In index.html, add the following HTML between the last paragraph tag and the first script tag:. <label for="name">Name</label><br />. <input name="name". id="name". /><br...
tailieu.vn Xem trực tuyến Tải xuống
$("p.foo").next();. This generates the following output:. $("p.foo").next("#bar");. To select all paragraphs after the paragraph with the class foo, use the following code:. $(".foo").nextAll("p");. This returns the following result:. The third method available for selecting next sibling elements is the .nextUntil() method. It’s important to note that the element matched by the selector will not be included in the result set.....
tailieu.vn Xem trực tuyến Tải xuống
41 INSPECTING HTML USING THE ELEMENT INSPECTOR IN FIREBUG. You can also see this by using the element inspection tool provided by Firebug. Click it to activate the element inspector.. The button to activate the element inspector. After the inspector is active, you can hover over different elements in the browser, and they'll highlight with a blue outline. This brings...
tailieu.vn Xem trực tuyến Tải xuống
To italicize all text in the paragraphs on the test page, use the following code:. .remove() and .detach(). To remove an element from the DOM entirely, the .remove() and .detach() methods are used. Both methods remove selected elements from the DOM, but the .detach() method keeps jQuery data for the element intact, which makes it ideal for situations in which...
tailieu.vn Xem trực tuyến Tải xuống
.height() and .width(). To obtain the height or width of an element, the .height() and .width() methods are handy. Both return a value without units, meaning the value returned is an integer (if the element is 68 pixels high,. Get the height of the form by running the following code:. console.log("Form height form").height()+"px");. This outputs the following in the console:....
tailieu.vn Xem trực tuyến Tải xuống
The .error() method allows developers to bind a handler (i.e., a function to be fired if the event occurs) to the event.. Create an image tag that tries to display an image that doesn’t exist, and attach an error handler to the error event that outputs a message to the console:. console.log("The image cannot be loaded!");. Upon execution of this...