Tutorial by Examples

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 ...
One of the main features in Material Design is the addition of a Snackbar, which in theory replaces the previous Toast. As per the Android documentation: Snackbars contain a single line of text directly related to the operation performed. They may contain a text action, but no icons. Toasts are...
Yellowdog Updater, Modified, one of the last remaining vestiges of Yellow Dog Linux, is the package manager used by Red Hat, Fedora, and CentOS systems and their derivatives. It can handle the installation and removal of software packaged as rpms for these Linux distributions. Below are some simple...
Due to the strong duality of the Fourier Transform, adjusting the output of a forward transform can produce the inverse FFT. Data in the frequency domain can be converted to the time domain by the following method: Find the complex conjugate of the frequency domain data by inverting the imaginary...
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.
Pushd "D:\Foo" Dir Popd Pushd will change the directory to the directory following (in this case D:\Foo. Popd returns back to the original directory.
Depth First Traversal (or Search) for a graph is similar to Depth First Traversal of a tree. The only catch here is, unlike trees, graphs may contain cycles, so we may come to the same node again. To avoid processing a node more than once, we use a boolean visited array. Below algorithm presents th...
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...
File myFile = new File(getFilesDir(), "myData.bin"); FileOutputStream out = new FileOutputStream(myFile); // Write four bytes one two three four: out.write(new byte [] { 1, 2, 3, 4} out.close() There is nothing Android specific with this code. If you write lots of small ...
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...
If you create files for exporting via USB cable to desktop using MTP protocol, may be a problem that newly created files are not immediately visible in the file explorer running on the connected desktop PC. To to make new files visible, you need to call MediaScannerConnection: File file = new File(...
Small files are processed in a fraction of second and you can read / write them in place of the code where you need this. However if the file is bigger or otherwise slower to process, you may need to use AsyncTask in Android to work with the file in the background: class FileOperation extends A...

Page 1091 of 1336