Tutorial by Examples

##= #= Service::State # # USAGE: # ${Service::State} "NAME" /DISABLEFSR $0 $1 # # ::State = The service's status is returned. # NAME = The Service name # /DISABLEFSR = Disables redirection if x64. Use "" to skip. # $0 = Return after call...
##= #= Service::Start # # USAGE: # ${Service::Start} "NAME" /DISABLEFSR $0 $1 # # ::Start = Start a service. # NAME = The Service name # /DISABLEFSR = Disables redirection if x64. Use "" to skip. # $0 = Return after call # $1 ...
##= #= Service::Stop # # USAGE: # ${Service::Stop} "NAME" /DISABLEFSR $0 $1 # # ::Stop = Sends a STOP control request to a service. # NAME = The Service name # /DISABLEFSR = Disables redirection if x64. Use "" to skip. # $0 = Return aft...
##= #= Service::Remove # # USAGE: # ${Service::Remove} "NAME" /DISABLEFSR $0 $1 # # ::Remove = Deletes a service entry from the registry. # NAME = The Service name # /DISABLEFSR = Disables redirection if x64. Use "" to skip. # $0 = Return...
We can put assembly instructions inside a macro and use the macro like you would call a function. #define mov(x,y) \ { \ __asm__ ("l.cmov %0,%1,%2" : "=r" (x) : "r" (y), "r" (0x0000000F)); \ } /// some definition and assignment unsigned char sbox[...
_id is a 12 bytes hexadecimal number which assures the uniqueness of every document. You can provide _id while inserting the document. If you didn't provide then MongoDB provide a unique id for every document. These 12 bytes first 4 bytes for the current timestamp, next 3 bytes for machine id, next ...
On 32-bits systems, integers larger than PHP_INT_MAX are automatically converted to float. Outputting these as integer values (i.e. non-scientific notation) can be done with printf, using the float representation, as illustrated below: foreach ([1, 2, 3, 4, 5, 6, 9, 12] as $p) { $i = pow(1024,...

Map

Map is a function which will take an array and a function and return an array after applying that function to each element in that list defmodule MyList do def map([], _func) do [] end def map([head | tail], func) do [func.(head) | map(tail, func)] end end Copy paste in ...
Reduce is a function which will take an array, function and accumulator and use accumulator as seed to start the iteration with the first element to give next accumulator and the iteration continues for all the elements in the array (refer below example) defmodule MyList do def reduce([], _func,...
You will need to install node.js - https://nodejs.org/en/ npm install -g @angular/cli - install the CLI by executing this command in the terminal ng new projectname - after executing this command in the terminal, you will create a new sub folder titled projectname in your current folder. cd pro...
If you have: val r = Random(233) infix inline operator fun Int.rem(block: () -> Unit) { if (r.nextInt(100) < this) block() } You can write the following DSL-like code: 20 % { println("The possibility you see this message is 20%") }
Detailed instructions on getting nsurlsession set up or installed.
Install properties reader: npm install properties-reader --save Create a directory env to store your properties files: mkdir env Create environments.js: process.argv.forEach(function (val, index, array) { var arg = val.split("="); if (arg.length > 0) { ...
Let's assume we have a search results page that displays a user's search query back to them. The code below is an example of how this could be done in PHP: Results for "<?php echo $_GET['query'] ?>" For this to work, you would access the page with a URL like: https://yoursite.te...
Plotly is a modern platform for plotting and data visualization. Useful for producing a variety of plots, especially for data sciences, Plotly is available as a library for Python, R, JavaScript, Julia and, MATLAB. It can also be used as a web application with these languages. Users can install plo...
This example illustrates how to create a simple sine curve using Matplotlib # Plotting tutorials in Python # Launching a simple plot import numpy as np import matplotlib.pyplot as plt # angle varying between 0 and 2*pi x = np.linspace(0, 2.0*np.pi, 101) y = np.sin(x) ...
In this example, we take a sine curve plot and add more features to it; namely the title, axis labels, title, axis ticks, grid and legend. # Plotting tutorials in Python # Enhancing a plot import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 2.0*np.pi, 101) y = np.sin(x) ...
The following are some of the common extensions used in Fortran source files and the functionalities they can work on. Lowercase f in the extension These files do not have the features of preprocessor directives similar to C-programming language. They can be directly compiled to create object file...
In this example, a sine curve and a cosine curve are plotted in the same figure by superimposing the plots on top of each other. # Plotting tutorials in Python # Adding Multiple plots by superimposition # Good for plots sharing similar x, y limits # Using single plot command and legend import...
Similar to the previous example, here, a sine and a cosine curve are plotted on the same figure using separate plot commands. This is more Pythonic and can be used to get separate handles for each plot. # Plotting tutorials in Python # Adding Multiple plots by superimposition # Good for plots sha...

Page 1278 of 1336