Tutorial by Examples: st

The DOM (Document Object Model) is the programming interface for HTML and XML documents, it defines the logical structure of documents and the way a document is accessed and manipulated. The main implementers of the DOM API are web browsers. Specifications are standardized by the W3C and the WHATW...
Useful if your program is outputting web pages along the way. from http.server import HTTPServer, CGIHTTPRequestHandler import webbrowser import threading def start_server(path, port=8000): '''Start a simple webserver serving path on port''' os.chdir(path) httpd = HTTPServer((''...
Often times you will see an exception Anti forgery token is meant for user "" but the current user is "username" This is because the Anti-Forgery token is also linked to the current logged-in user. This error appears when a user logs in but their token is still linked to bein...
String to a primitive numeric type or a numeric wrapper type: Each numeric wrapper class provides a parseXxx method that converts a String to the corresponding primitive type. The following code converts a String to an int using the Integer.parseInt method: String string = "59"; int p...
Haxe is available on Windows, Linux, and OS X. It is distributed in two forms: as an installer, providing an optional Neko VM dependency and configuring haxe and haxelib environment variables; as binaries, providing only the Haxe compiler and package manager. Windows Installer and binaries a...
<div tabindex="2">Second</div> <div tabindex="1">First</div> Positive values will insert the element at the tabbing order position of its respective value. Elements without preference (i.e. tabindex="0" or native elements such as button and a...
Build constraints are commonly used to separate normal unit tests from integration tests that require external resources, like a database or network access. To do this, add a custom build constraint to the top of the test file: // +build integration package main import ( "testing&...
Get the Source Package from http://typo3.org/download/ and upload this package to your web server. Put it one level above the document root. For this manual, we will use the .tar.gz file. Use the shell to execute the according commands: /var/www/site/htdocs/$ cd .. /var/www/site/$ wget get.typo3....
go() method The go() method loads a specific URL from the history list. The parameter can either be a number which goes to the URL within the specific position (-1 goes back one page, 1 goes forward one page), or a string. The string must be a partial or full URL, and the function will go to the f...
The hashlib module allows creating message digest generators via the new method. These generators will turn an arbitrary string into a fixed-length digest: import hashlib h = hashlib.new('sha256') h.update(b'Nobody expects the Spanish Inquisition.') h.digest() # ==> b'.\xdf\xda\xdaVR[\x12\...
Detailed instructions on getting asp.net-mvc-4 set up or installed.
The following code broadcasts the contents in buffer among all the processes belonging to the MPI_COMM_WORLD communicator (i.e. all the processes running in parallel) using the MPI_Bcast operation. int rank; int res; res = MPI_Comm_rank (MPI_COMM_WORLD, &rank); if (res != MPI_SUCCESS) { ...
PREPARE prepares a statement for execution EXECUTE executes a prepared statement DEALLOCATE PREPARE releases a prepared statement SET @s = 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse'; PREPARE stmt2 FROM @s; SET @a = 6; SET @b = 8; EXECUTE stmt2 USING @a, @b; Result: +------------+ |...
WebGL is a browser technology so there isn't much to set up other than to have a browser. You can get started with WebGL on JSFiddle or Codepen or JSBIn or any number of other sites that let you edit HTML, CSS, and JavaScript online though there will be a few limitations (see below). You can also ho...
To install v6.x update the packages curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - Using the apt package manager sudo apt-get install -y nodejs
Download driver via nuget. Using this command in the package manager console Install-Package mongocsharpdriver
Detailed instructions on getting pymongo set up or installed. Installing with Pip To install pymongo for the first time: pip install pymongo Installing a specific version of pymongo: Where X.X.X is the version to be installed pip install pymongo==X.X.X Upgrading existing pymon...
Stanford CoreNLP is a popular Natural Language Processing toolkit supporting many core NLP tasks. To download and install the program, either download a release package and include the necessary *.jar files in your classpath, or add the dependency off of Maven central. See the download page for mor...
Before using your own object as key you must override hashCode() and equals() method of your object. In simple case you would have something like: class MyKey { private String name; MyKey(String name) { this.name = name; } @Override public boolean equals(Object ...
Use Kernel.inspect to convert anything to string. iex> Kernel.inspect(1) "1" iex> Kernel.inspect(4.2) "4.2" iex> Kernel.inspect %{pi: 3.14, name: "Yos"} "%{pi: 3.14, name: \"Yos\"}"

Page 88 of 369