Tutorial by Examples: f

StarryNight contains a small utility that parses an application's .meteor/versions file, and converts it into a Release Manifest. npm install -g starrynight cd myapp starrynight generate-release-json If you don't wish to use StarryNight, simply copy the contents of your .meteor/versions file i...
meteor publish-release --from-checkout
When building a custom release track, it's common to keep packages in the /packages directory as git submodules. The following command allows you to fetch all of the latest commits for the submodules in your /packages directory at the same time. git submodule foreach git pull origin master
Document Object Model Start by creating your tabs and panes in your Object Model... <template name="samplePage"> <div id="samplePage" class="page"> <ul class="nav nav-tabs"> <li id="firstPanelTab"><a href=&...
As long as you have an internet connection, you can read images from an hyperlink I=imread('https://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-logo.png');
In this example we illustrate how to take a double real-type 3D matrix from MATLAB, and pass it to a C double* array. The main objectives of this example are showing how to obtain data from MATLAB MEX arrays and to highlight some small details in matrix storage and handling. matrixIn.cpp #include...
Generally, if we want to remove an element from an array, we need to know it's index so that we can remove it easily using remove(at:) function. But what if we don't know the index but we know the value of element to be removed! So here is the simple extension to an array which will allow us to re...
By default, some keystrokes that are useful in Vim contradict with the keystrokes of IntelliJ. For example, ^R in Vim is 'redo', but in IntelliJ it's the shortcut for Run To decide which program interprets the keystroke, go to Preferences -> Other Settings -> Vim Emulation and choose which k...
PriorityQueue is a data structure. Like SortedSet, PriorityQueue sorts also its elements based on their priorities. The elements, which have a higher priority, comes first. The type of the PriorityQueue should implement comparable or comparator interface, whose methods decides the priorities of the ...
Uniform grid will place all it's children in a grid layout, each child in it's own cell. All the cells will have the same size. It can be thought to be a shorthand to a grid where all the row and column definitions are set to * Default rows and columns By default the UniformGrid will try to crea...
The java.util.LinkedList class, while implementing java.util.List is a general-purpose implementation of java.util.Queue interface too operating on a FIFO (First In, First Out) principle. In the example below, with offer() method, the elements are inserted into the LinkedList. This insertion operat...
Specific for <li> tags within an unordered list (<ul>): list-style: disc; /* A filled circle (default) */ list-style: circle; /* A hollow circle */ list-style: square; /* A filled square */ list-style: '-'; /* any string */ ...
SELECT Name FROM User WHERE IsActive = true This will return the name of all active Users. SELECT Name, Phone FROM Contact WHERE CreatedDate >= 2016-01-01T00:00:00.000Z This will return Contacts created on or after January 1st, 2016. SELECT Id, Name FROM Account LIMIT 100 This will ret...
It is a common operation to need to perform a particular function over each element in a parameter pack. With C++11, the best we can do is: template <class... Ts> void print_all(std::ostream& os, Ts const&... args) { using expander = int[]; (void)expander{0, (void(...
Android 6 (API23) introduced Doze mode which interferes with AlarmManager. It uses certain maintenance windows to handle alarms, so even if you used setExactAndAllowWhileIdle() you cannot make sure that your alarm fires at the desired point of time. You can turn this behavior off for your app using...
HVFL is a language designed to constrain UI elements in a simple and quick fashion. Generally, VFL has an advantage over traditional UI customization in the Interface Builder because it's much more readable, accessible and compact. Here's an example of VFL, in which three UIViews are constrained f...
The Object.freeze() method is available since version 5.1. For older versions, you can use the following code (note that it also works in versions 5.1 and later): var ColorsEnum = { WHITE: 0, GRAY: 1, BLACK: 2 } // Define a variable with a value from the enum var currentColor = Co...
A lot of the value from local JVM unit tests comes from the way you design your application. You have to design it in such a way where you can decouple your business logic from your Android Components. Here is an example of such a way using the Model-View-Presenter pattern. Lets practice this out by...
Redirect to within application (another action of specific controller). return $this->redirect([ 'controller' => 'myController', 'action' => 'myAction' ]); Redirect to referrer page return $this->redirect($this->referer()); Redirect to outside of application or spec...

Page 188 of 457