Tutorial by Examples: l

This example shows multiple producers and consumers sharing the same buffer. Protected entries in Ada implement a queue to handle waiting tasks. The default queuing policy is First In First Out. ------------------------------------------------------------------ -- Multiple producers and consumers ...
To simply open a URL, use the webbrowser.open() method: import webbrowser webbrowser.open("http://stackoverflow.com") If a browser window is currently open, the method will open a new tab at the specified URL. If no window is open, the method will open the operating system's default b...
The webbrowser module also supports different browsers using the register() and get() methods. The get method is used to create a browser controller using a specific executable's path and the register method is used to attach these executables to preset browser types for future use, commonly when mu...
Detailed instructions on getting activemq set up or installed.
The :{ instruction begins multi-line mode and :} ends it. In multi-line mode GHCi will interpret newlines as semicolons, not as the end of an instruction. ghci> :{ ghci| myFoldr f z [] = z ghci| myFoldr f z (y:ys) = f y (myFoldr f z ys) ghci| :} ghci> :t myFoldr myFoldr :: (a -> b -&g...
With Flask, URL routing is traditionally done using decorators. These decorators can be used for static routing, as well as routing URLs with parameters. For the following example, imagine this Flask script is running the website www.example.com. @app.route("/") def index(): return ...
Instead of typing our HTML markup into the return statements, we can use the render_template() function: from flask import Flask from flask import render_template app = Flask(__name__) @app.route("/about") def about(): return render_template("about-us.html") if __n...
Similar to Meteor.js, Flask integrates well with front end templating services. Flask uses by default Jinja Templating. Templates allow small snippets of code to be used in the HTML file such as conditionals or loops. When we render a template, any parameters beyond the template file name are pass...
The traditional GLSL compilation model involves compiling code for a shader stage into a shader object, then linking multiple shader objects (covering all of the stages you want to use) into a single program object. Since 4.2, program objects can be created that have only one shader stage. This met...
Using the official installer Download the installer from the official website. It will automatically add atom and apm (Atom Package Manager) to your %PATH% variable. Building from source Requirements: Node.js 4.4.x or later Python 2.7.x 7zip Visual Studio (One of the versions below) Visu...
Installing from a zip Download the atom-mac.zip zip file from the Atom GitHub repository here Unzip the file by double clicking on it in Finder Drag the Atom application into your "Applications" folder Run the Atom application. Building from Source Requirements: macOS 10.8 or ...
Installing from a package Debian, Ubuntu, etc. $ sudo dpkg -i atom-amd64.deb $ sudo apt-get -f install RedHat Enterprise, CentOS, Oracle Linux, Scientific Linux, etc. $ sudo yum install -y atom.x86_64.rpm Fedora (DNF package manager) $ sudo dnf install -y atom.x86_64.rpm SUSE (Zypp pac...
To view your installed packages or themes, open settings with Ctrl+, and select either the "Packages" or "Themes" tab in the left-hand navigation bar. Note, the packages or themes you installed from other publishers will show up under the "Community Themes" section and ...
map() is a built-in function, which means that it is available everywhere without the need to use an 'import' statement. It is available everywhere just like print() If you look at Example 5 you will see that I had to use an import statement before I could use pretty print (import pprint). Thus ppr...
If Errorlevel 1 ( Echo Errorlevel is 1 or higher REM The phrase "1 or higher" is used because If Errorlevel 1 statement means: REM If %Errorlevel% GEQ 1 REM Not If %Errorlevel% EQU 1 ) ...
If exist "C:\Foo\Bar.baz" ( Echo File exist ) This checks if the file C:\Foo\Bar.baz's existence. If this exist, it echos File exist The Not operator can also be added.
If Defined Foo ( Echo Foo is defined ) This would check if a variable is defined or not. Again, the Not operator can be used.
You can get your working folder by calling the method getFilesDir() on your Activity (Activity is the central class in your application that inherits from Context. See here). Reading is not different. Only your application will have access to this folder. Your activity could contain the following c...
The old good Java object serialization is available for you in Android. you can define Serializable classes like: class Cirle implements Serializable { final int radius; final String name; Circle(int radius, int name) { this.radius = radius; this.name = name; }...
You can also read and write from/to memory card (SD card) that is present in many Android devices. Files in this location can be accessed by other programs, also directly by the user after connecting device to PC via USB cable and enabling MTP protocol. Finding the SD card location is somewhat more...

Page 695 of 861