Tutorial by Examples: er

What is PS1 PS1 denotes Prompt String 1. It is the one of the prompt available in Linux/UNIX shell. When you open your terminal, it will display the content defined in PS1 variable in your bash prompt. In order to add branch name to bash prompt we have to edit the PS1 variable(set value of PS1 in ~...
An array of values describes periods of time in which the device is vibrating and not vibrating. window.navigator.vibrate([200, 100, 200]);
If you only want to fetch logs with a certain source, a certain dyno, or both, you can use the --source (or -s) and --dyno (or -d) filtering arguments: $ heroku logs --dyno router 2012-02-07T09:43:06.123456+00:00 heroku[router]: at=info method=GET path="/stylesheets/dev-center/library.css&quo...
If the engine is able to correctly predict you're using a specific small type for your values, it will be able to optimize the executed code. In this example, we'll use this trivial function summing the elements of an array and outputting the time it took: // summing properties var sum = (functio...
Consider the following code: public async Task MethodA() { await MethodB(); // Do other work } public async Task MethodB() { await MethodC(); // Do other work } public async Task MethodC() { // Or await some other async work await Task.Delay(100); } ...
It parses the data from the %%GLOBAL_ConversionCode%% template variable, and as such this script should be inserted in order.html immediately after the %%GLOBAL_ConversionCode%% variable. This was originally intended for the Blueprint theme framework and, as such, may not work on Stencil. <scrip...
This was added to assets/js/theme/category.js in loaded(). You will also need to add {{inject "categoryProducts" category.products}} to templates/pages/category.html var mainImages = []; var rollOvers = []; this.context.categoryProducts.forEach(function(e, i) { if (e.images[0])...
By default, floating point operations on float and double do not strictly adhere to the rules of the IEEE 754 specification. An expression is allowed to use implementation-specific extensions to the range of these values; essentially allowing them to be more accurate than required. strictfp disable...
from subprocess import check_call ok = check_call(['ffmpeg','-i','input.mp3','output.wav']) if ok: with open('output.wav', 'rb') as f: wav_file = f.read() note: http://superuser.com/questions/507386/why-would-i-choose-libav-over-ffmpeg-or-is-there-even-a-difference What are ...
Flask's built-in webserver is able to serve static assets, and this works fine for development. However, for production deployments that are using something like uWSGI or Gunicorn to serve the Flask application, the task of serving static files is one that is typically offloaded to the frontend webs...
# from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer # python2 from http.server import BaseHTTPRequestHandler, HTTPServer # python3 class HandleRequests(BaseHTTPRequestHandler): def _set_headers(self): self.send_response(200) self.send_header('Content-type', 'text...
<p class="alert alert-success" *ngIf="names.length > 2">Currently there are more than 2 names!</p>
Now let's create a service provider. Let's put it under app/Providers: <?php namespace App\Providers; class HelpersServiceProvider extends ServiceProvider { public function register() { require_once __DIR__ . '/../Helpers/document.php'; } } The above service pr...
To generate schema, view, controller, migration file for the repository, default CRUD templates and test files for a model (like a scaffolding in Rails) one can use phoenix.gen.html mix task like this: mix phoenix.gen.html Book books title note:text pages:integer author_id:references:authors Wh...
Increment / Decrement A pointer can be incremented or decremented (prefix and postfix). Incrementing a pointer advances the pointer value to the element in the array one element past the currently pointed to element. Decrementing a pointer moves it to the previous element in the array. Pointer ari...
To enable SSH create a file called ssh in the /boot directory of your SD card. Identify the drive letter associated with your SD card. Open a command prompt (press Win+R on your keyboard to open the Run window. Then, type cmd) Enter the following at the command prompt (replacing Drive...
Go to File --> Settings --> click plugins in left hand pane --> Search for cucumber --> Install plugin
Formulas tab > Defined Names group > Name Manager button Named Manager allows you to: Create or change name Create or change cell reference Create or change scope Delete existing named range Named Manager provides a useful quick look for broken links.
Implementing the Behavior This behavior will cause mouse wheel events from an inner ScrollViewer to bubble up to the parent ScrollViewer when the inner one is at either its upper or lower limit. Without this behavior, the events will never make it out of the inner ScrollViewer. public class Bubbl...
Macros can trigger compiler warnings and errors through the use of their Context. Say we're a particularly overzealous when it comes to bad code, and we want to mark every instance of technical debt with a compiler info message (let's not think about how bad this idea is). We can use a macro that d...

Page 338 of 417