Tutorial by Examples: a

First, you will need to install Push.js module. $ npm install push.js --save Or import it to your front-end app through CDN <script src="./push.min.js"></script> <!-- CDN link --> After you are done with that, you should be good to go. This is how it should look l...
Keep in mind that this will not work on Apple devices (I didnt test them all), but if you want to make push notifications check OneSignal plugin.
When you run mix phoenix.gen.html or mix phoenix.gen.json from command line, migrations are created in priv -> repo -> migrations in your project folder. To run migrations type mix ecto.migrate. To generate migrations for your project mix ecto.gen migrations <model_name> To generate m...
$http.post("\<domain\>/user-registration/", {username: username, password: password}) .then(function (data) { // Do success actions here });
Use Spring REST Docs to document your services. It's a powerful framework which makes sure that the Service logic is always inline with the documentation. In order to do so, you would have to write integration tests for your services. If there is any mismatch in the documentation & service beha...
Use Spring REST Docs to document your services. It's a powerful framework which makes sure that the Service logic is always inline with the documentation. In order to do so, you would have to write integration tests for your services. If there is any mismatch in the documentation & service beha...
Detailed instructions on getting symfony-forms set up or installed.
Encoded URL http%3A%2F%2Fwww.foo.com%2Findex.php%3Fid%3Dqwerty Use this command to decode the URL echo "http%3A%2F%2Fwww.foo.com%2Findex.php%3Fid%3Dqwerty" | sed -e "s/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g" | xargs -0 echo -e Decoded URL (result of command) http://www.foo...
To remove whitespace (spaces, tabs, newlines…) between HTML tags use spaceless tag: {% spaceless %} <div> <span>foo bar </span> </div> {% endspaceless %} {# produces output <div><strong>foo bar </strong></div> #} If you need ...
This is an example to explain the variations of load events. onload event <body onload="someFunction()"> <img src="image1" /> <img src="image2" /> </body> <script> function someFunction() { console.log("Hi! I am l...
In order to use bootstrap, there are 2 cases. The electron app is connected to internet The electron app is not connected to internet For electron apps that are connected to internet, we can just make use of CDN links for bootstrap and include that in our html files. The problem comes when w...
This example grabs the Node.gitignore file from GitHub's gitignore repository, downloads it to your current working directory and renames it to .gitignore - all very typical actions for someone starting a new node.js project. $ curl http://github.com/github/gitignore/raw/master/Node.gitignore -o .g...
navigate to the desired file in a repository click the 'raw' button copy the url from the address bar See the following example from GitHub's gitignore repository: http://github.com/github/gitignore/raw/master/Node.gitignore You can quickly recognize a url that will work to download an indiv...
#!bin/bash $ string='Question%20-%20%22how%20do%20I%20decode%20a%20percent%20encoded%20string%3F%22%0AAnswer%20%20%20-%20Use%20printf%20%3A)' $ printf '%b\n' "${string//%/\\x}" # the result Question - "how do I decode a percent encoded string?" Answer - Use printf ...
Detailed instructions on getting metal set up or installed.
Consider Kotlin's Null Type system and WeakReference<T>. So let's say we have to save some sort of reference and we wanted to avoid memory leaks, here is where WeakReference comes in. take for example this: class MyMemoryExpensiveClass { companion object { var reference: WeakR...
Using Intents to Load the Image from Gallery. Initially you need to have the permission <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> Use the Following Code to have the layout as designed follows. <?xml version="1.0" enco...
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Api extends CI_Controller { //default value private $login_credential; function __construct() { parent::__construct(); //for user authentication $this->load->library('session'); ...
/***************************** @return all events ****************************/ public function getallevents(){ //get data from model $events = array( array('Event 1', '2015-04-03'), array('Event 2', '2015-04-03'), array('Event 3', '2015-06-16'), array('Event 4', '2015-0...
/***************************** login user @required : username and password via post method only @return user data if login successfull otherwise error message ****************************/ public function login(){ $username=$this->input->post('username'); $password=$this->input-...

Page 1092 of 1099