Tutorial by Examples: is

Using a list object you can create a fully functional generic Stack with helper methods such as peeking and checking if the stack is Empty. Check out the official python docs for using list as Stack here. #define a stack class class Stack: def __init__(self): self.items = [] ...
A stream wrapper provides a handler for one or more specific schemes. The example below shows a simple stream wrapper that sends PATCH HTTP requests when the stream is closed. // register the FooWrapper class as a wrapper for foo:// URLs. stream_wrapper_register("foo", FooWrapper::class...
See also Common Lisp Learning Resources. Online Books Practical Common Lisp, Peter Seibel. Good for experienced programmers. Common Lisp: A Gentle Introduction to Symbolic Computation Good for people new to programming. Common Lisp, the Language On Lisp, Paul Graham The Common Lisp Cookbook ...
import org.bukkit.event.Listener; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.player.PlayerLoginEvent; import org.bukkit.event.player.PlayerQuitEvent; public class MyEventListener implements Listener { /** * Constructor ...
Suppose you have a long list of elements and you are only interested in every other element of the list. Perhaps you only want to examine the first or last elements, or a specific range of entries in your list. Python has strong indexing built-in capabilities. Here are some examples of how to achie...
import java.awt.EventQueue; import java.awt.GridLayout; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; import java.util.ArrayList; import java.util.List; import javax.swing.JFrame; import javax.swing.JTextArea; import javax.sw...
CREATE CLUSTERED COLUMNSTORE INDEX enables you to organize a table in column format: DROP TABLE IF EXISTS Product GO CREATE TABLE Product ( Name nvarchar(50) NOT NULL, Color nvarchar(15), Size nvarchar(5) NULL, Price money NOT NULL, Quantity int ) GO CREATE CLUSTERED C...
To prevent memory leaks, one should not forget to close an input stream or an output stream whose job is done. This is usually done with a try-catch-finally statement without the catch part: void writeNullBytesToAFile(int count, String filename) throws IOException { FileOutputStream out = null...
You can bind event listeners to the EventSource object to listen to different events channels using the .addEventListener method. EventSource.addEventListener(name: String, callback: Function, [options]) name: The name related to the name of the channel the server is emitting events to. callb...
make a publisher account add an asset in the publisher account download the asset store tools (from the asset store) go to "Asset Store Tools" > "Package Upload" select the correct package and project folder in the asset store tools window click upload submit your asse...
TokenName                           Description=Equal toReturns True if the left-hand and right-hand operands are equal. Note that this is an overload of the assignment operator.<>Not equal toReturns True if the left-hand and right-hand operands are not equal.>Greater thanReturns True if th...
All of the logical operators in VBA can be thought of as "overrides" of the bitwise operators of the same name. Technically, they are always treated as bitwise operators. All of the comparison operators in VBA return a Boolean, which will always have none of its bits set (False) or all of...
After finding an official Julia package, it is straightforward to download and install the package. Firstly, it's recommended to refresh the local copy of METADATA: julia> Pkg.update() This will ensure that you get the latest versions of all packages. Suppose that the package we want to inst...
Some experimental packages are not included in the METADATA package repository. These packages can be installed by directly cloning their Git repositories. Note that there may be dependencies of unregistered packages that are themselves unregistered; those dependencies cannot be resolved by the pack...
Depending on the service, you will either need to use Basic Authentication with a username and password or pass an apikey as a parameter in each request. Some services also support token authentication. GET using Tone Analyzer: curl -X GET \ -u "username":"password" \ -d &qu...
The following command backs up the 'Users' database to 'D:\DB_Backup' file. Its better to not give an extension. BACKUP DATABASE Users TO DISK = 'D:\DB_Backup'
The following command restores the 'Users' database from 'D:\DB_Backup' file. RESTORE DATABASE Users FROM DISK = 'D:\DB_Backup'
First of all you need to have IIS (Internet Information Services) installed and running on your machine; IIS isn't available by default, you have to add the characteristic from Control Panel -> Programs -> Windows Characteristics. Download the PHP version you like from http://windows.php.ne...
Keys Unlike a Scripting.Dictionary, a Collection does not have a method for determining if a given key exists or a way to retrieve keys that are present in the Collection. The only method to determine if a key is present is to use the error handler: Public Function KeyExistsInCollection(ByVal key...
Nested list comprehensions, unlike list comprehensions with nested loops, are List comprehensions within a list comprehension. The initial expression can be any arbitrary expression, including another list comprehension. #List Comprehension with nested loop [x + y for x in [1, 2, 3] for y in [3, 4...

Page 65 of 109