Tutorial by Examples: e

An SSH key has two pieces, the public key and the private key. The private key: Is usually in a file named id_rsa, but it can be given any name. CANNOT BE REGENERATED IF LOST!!!! Do not lose this file! If you lose it, you will not be able to get back into your instance. (StackOverflow is li...
A Semantic Model offers a deeper level of interpretation and insight of code compare to a syntax tree. Where syntax trees can tell the names of variables, semantic models also give the type and all references. Syntax trees notice method calls, but semantic models give references to the precise locat...
Create a file named '.jshintrc' in the root of your app, where package.json is. *Note on windows: create a file named "jshintrc.txt". Then rename it to ".jshintrc." (notice the dot at the end). This is a configuration file. It can for example tell jshint to ignore certain varia...
Create a file named: "Makefile" (with no extension) in the root of your app Open it in a text editor and add this: android: gulp lint gulp sass ionic run android --device ios: gulp lint gulp sass ionic build ios This will lint your app and ...
RxSwift offers many ways to create an Observable, let's take a look: import RxSwift let intObservale = Observable.just(123) // Observable<Int> let stringObservale = Observable.just("RxSwift") // Observable<String> let doubleObservale = Observable.just(3.14) // Observable&...
You can restart ubuntu from command line. Below is example of restarting ubuntu immediately. sudo reboot You need to have sudo privilege in order to use this command. Another commands with same results are sudo shutdown -r now and sudo init 6.
In some places in Common Lisp, a series of forms are evaluated in order. For instance, in the body of a defun or lambda, or the body of a dotimes. In those cases, writing multiple forms in order works as expected. In a few places, however, such as the then and else parts of an if expressions, onl...
When writing macros that expand into forms that might involve grouping, it is worthwhile spending some time considering what grouping construction to expand into. For definition style forms, for instance, a define-widget macro that will usually appear as a top-level form, and that several defuns, d...
You can use npm install -g to install a package "globally." This is typically done to install an executable that you can add to your path to run. For example: npm install -g gulp-cli If you update your path, you can call gulp directly. On many OSes, npm install -g will attempt to writ...
Node Version Manager (nvm) greatly simplifies the management of Node.js versions, their installation, and removes the need for sudo when dealing with packages (e.g. npm install ...). Fish Shell (fish) "is a smart and user-friendly command line shell for OS X, Linux, and the rest of the family&...
Square Root Use Math.sqrt() to find the square root of a number Math.sqrt(16) #=> 4 Cube Root To find the cube root of a number, use the Math.cbrt() function 6 Math.cbrt(27) #=> 3 Finding nth-roots To find the nth-root, use the Math.pow() function and pass in a fractional expo...
This is a custom JAX-RS @Provider to use Gson as the JSON parser. The example also shows how to use custom Java 8 date/time converters. @Provider @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public class JerseyServerGson implements MessageBodyWriter<O...
2005 The following iterates over the characters of the string s. It works similarly for looping over the elements of an array or a set, so long as the type of the loop-control variable (c, in this example) matches the element type of the value being iterated. program ForLoopOnString; {$APPTYPE ...
OpenCL is short for Open Computing Language. OpenCL is a Framework for parallel programming across heterogeneous platforms, called compute devices, ranging from CPUs over GPUs to more special platforms like FPGAs. OpenCL provides a standard interface for parallel computing on these compute devices b...
If you have a modern CPU or graphics card (GPU) inside your machine, chances are you have everything ready for first steps in OpenCL. Finding out if your processor is OpenCL capable can be usually done via the manufacturer's homepage, a good first start is the official documentation at https://www...
Every Windows Phone project contains App.cs class: public sealed partial class App : Application This class is your global application context. General Application class usage: App entry point, particularly for various activation contracts. Application lifecycle management. Application g...
When I first started managing the keyboard I would use separate Notifications in each ViewController. Notification Method (Using NSNotification): class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() NSNotificationCenter.defaultCenter().a...
// Get the reference to your ListView ListView listResults = (ListView) findViewById(R.id.listResults); // Set its adapter listResults.setAdapter(adapter); // Enable filtering in ListView listResults.setTextFilterEnabled(true); // Prepare your adapter for filtering adapter.setFilter...
Many tasks require elevated privileges. You can elevate user privileges to Administrator level for your batch runtime using a shortcut: Press alt+ and the batch file to a selected folder to create a shortcut. Right click and select "Properties". Select the "Shortcut&quo...
The following batch file will popup a UAC Prompt allowing you to accept elevated Administrator privileges for the batch session. Add your tasks code to :usercode section of the batch, so they run with elevated privileges. @echo off setlocal EnableDelayedExpansion :: test and acquire admin rights ...

Page 592 of 1191