Tutorial by Examples: ti

In command mode(Esc) enter :gg=G to use Vim's built-in indention engine. Command PartDescriptionggstart of file=indent (when equalprg is empty)Gend of file You can set equalprg in your .vimrc to use a more sophisticated auto-formatting tool. For example, to use clang-format for C/C++ put the foll...
Arrays in MATLAB are held as continuous blocks in memory, allocated and released automatically by MATLAB. MATLAB hides memory management operations such as resizing of an array behind easy to use syntax: a = 1:4 a = 1 2 3 4 a(5) = 10 % or alternatively a = [a, 10] a = ...
Amazon Linux is a RHEL variant, so the Red Hat instructions should work for the most part. There is, however, at least one discrepancy. There was an instance where the python27-devel package, as opposed to python-devel, was explicitly necessary. Here, we will install from source. sudo yum -y upd...
There are many fine ways to get this done, which others have already suggested. Following along the "get Excel data via SQL track", here are some pointers. Excel has the "Data Connection Wizard" which allows you to import or link from another data source or even within the very ...
php artisan make:request StoreUserRequest php artisan make:request UpdateUserRequest Note: You can also consider using names like StoreUser or UpdateUser (without Request appendix) since your FormRequests are placed in folder app/Http/Requests/.
Given this simple class, we can test that the ShaveHead method is working correctly by asserting state of the HairLength variable is set to zero after the ShaveHead method is called. public class Person { public string Name; public int HairLength; public Person(string name, in...
Sometimes it is necessary to assert when an exception is thrown. Different unit testing frameworks have different conventions for asserting that an exception was thrown, (like NUnit's Assert.Throws method). This example does not use any framework specific methods, just built in exception handling. ...
Cusom bindings should be registered by extending the current knockout bindingHandlers object.This is done by adding a new property to the object. ko.bindingHandlers.newBinding = { init: function(element, valueAccessor, allBindings, viewModel, bindingContext) { }, update: function(e...
Such Example is knowing wide spreading among PWAs (Progressive Web Applications) and in this example we're going to send a simple Backend like notification using NodeJS and ES6 Install Node-GCM Module : npm install node-gcm Install Socket.io : npm install socket.io Create a GCM Enable...
To set up Node remote debugging, simply run the node process with the --debug flag. You can add a port on which the debugger should run using --debug=<port>. When your node process starts up you should see the message Debugger listening on port <port> Which will tell you that everyt...
Make sure that the NodeJS plugin is enabled Select your run configurations (screen) Select + > Node.js Remote Debug Make sure you enter the port selected above as well as the correct host Once those are configured simply run the debug target as you normally would and it will...
Example of how ReplaceAll only applies a rule at most once, while ReplaceRepeated will do so in a loop but always restart application from the first rule. x + a /. { a_ + z :> (Print[0]; DoneA), a_ + x :> (Print[1]; y + z), a_ + y :> (Print[2]; DoneB)} (* Prints "1&quot...
In order to run Elasticsearch, a Java Runtime Environment (JRE) is required on the machine. Elasticsearch requires Java 7 or higher and recommends Oracle JDK version 1.8.0_73. So, be sure if you have Java in your system. If not, then follow the procedure: # Install wget with yum yum -y install w...
using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Interactivity; namespace MyBehaviorAssembly { public class SliderDragEndValueBehavior : Behavior<Slider> { public static readonly DependencyProperty ValueProper...
How to implement Firebase Real-Time database in Android applications. Setup/Installation: First, install the Firebase SDK (guide) Register your project using the Firebase console After successfuly completing the two steps above, add the following dependency in your application level ...
Our goal , is to Make your Images conform to widths and scale appropriately, by generating a battery of images of varied widths, and to minify them Lint your Javascript Minimize your assets - JS/CSS/HTML , thus enabling you to host a lighter than lightest code Watch the css/js/image files for ...
[Function <name>] (glob) { $.src(glob) .pipe([plugin 1]) .pipe([plugin 2]) . . . .pipe([plugin n]) .pipe( $.dest(<destination-name>) } Note pipe is a method that streams all the files matching the glob input , to our plugins( minifyhtml in this case) . It is simple ...
So, Before writing out optimiser functions , we need to install a couple of caching plugins. bash $ npm install --save-dev gulp-cached bash $ npm install --save-dev gulp-remember You might wonder why two caches eh!. gulp-cached , passes only modified or new content down the pipeline to other ...
NOTE This page illustrates use of gulp plugins like browser-sync , gulp-watch and run-sequence , and continues discussing gulp-workflow-automation from where we left off at Gulpjs-workflow-automation-1 of 2. In case you landed here , consider going through that post first. Default Task ...
Installing mvvmcross with nugget: Search for mvvmcross in the "Manage Nugget Packages" window. Installing mvvmcross with Package Manger Console: PM> Install-Package MvvmCross Make sure to install it on both your PCL (Portable Class Library) and you application project. As the...

Page 326 of 505