Tutorial by Examples: er

Most debugging happens in the terminal or in the Chrome or Safari develop tools, which are plenty sophisticated enough for 99% of your needs. However, if you want to debug on Firefox or need extra server debugging functionality, there are a few extra utilities you can use. Firefox - Firebug Nod...
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...
Alerts and errors are nearly the simplest of all Meteor component patterns. They're so simple, in fact, that they barely register as a pattern in of themselves. Instead of adding FlashAlert modules or patterns, all you really need to do is style a Handlebar template appropriate, add a helper, and wi...
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');
As of IntelliJ IDEA version 2016.2, and IdeaVim version 0.46, IntelliJ's native option for showing line numbers is ineffective. When clicking Show line numbers, the line numbers immediately show and disappear. This problem is caused by a bug in the IdeaVim plugin, which can be resolved by using the...
XAML controls may have dependency properties that can be bound to objects from DataContext or other controls. When the type of the object being bound is different from the type of the target DependencyProperty, a converter may be used to adapt one type to another. Converters are classes implementin...
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 */ ...
If you plan to host your Django website on Heroku, you can start your project using the Heroku Django Starter Template : django-admin.py startproject --template=https://github.com/heroku/heroku-django-template/archive/master.zip --name=Procfile YourProjectName It has Production-ready configurati...
SELECT Id, Name FROM Account This will return the Id and Name fields from the Account table. No filtering or sorting will be applied.
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...
SELECT Id, Name FROM User ORDER BY LastName SELECT Id, Name FROM Contact ORDER BY LastModifiedDate DESC SELECT Name, Title FROM User ORDER BY Title ASC NULLS FIRST SELECT Id FROM Contact ORDER BY LastName ASC NULLS LAST, FirstName ASC NULLS FIRST
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...
Another way to implement item click listener is to use interface with several methods, the number of which is equal to the number of clickable views, and use overrided click listeners as you can see below. This method is more flexible, because you can set click listeners to different views and quite...
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...
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...
You can retrieve query string data as Array. $post_data= $this->request->query; You can retrieve post data for particular key. $this->request->query['field']; Retrieve specific key value $this->request->query('key_name'); Retrieve specific key value of nested array $th...
Sometimes you need to serialize or deserialize some fields in a desired format, for example your backend may use the format "YYYY-MM-dd HH:mm" for dates and you want your POJOS to use the DateTime class in Joda Time. In order to automatically convert these strings into DateTimes object, y...
First of all you need to add the GsonConverterFactory to your build.gradle file compile 'com.squareup.retrofit2:converter-gson:2.1.0' Then, you have to add the converter factory when creating the Retrofit Service: Gson gson = new GsonBuilder().create(); new Retrofit.Builder() .baseUrl...

Page 181 of 417