Tutorial by Examples

Create a new repository or clone an existing one. Create a new branch called gh-pages without any history $ git checkout --orphan gh-pages # ensure you are in the correct directory then, # remove all files from the old working tree $ git rm -rf Add an index.html file to the root of t...
1. Add a platform target iOS: $ ionic platform add ios Android: $ ionic platform add android Windows: $ ionic platform add windows 2. Build your app iOS: $ ionic build ios Android: $ ionic build android Windows: $ ionic build windows Live Reload App During Development...
If you try to submit tasks to a shutdown Executor or the queue is saturated (only possible with bounded ones) and maximum number of Threads has been reached, RejectedExecutionHandler.rejectedExecution(Runnable, ThreadPoolExecutor) will be called. The default behavior is that you'll get a Rej...
When you have a Stream you need to map but want to preserve the initial values as well, you can map the Stream to a Map.Entry<K,V> using a utility method like the following: public static <K, V> Function<K, Map.Entry<K, V>> entryMapper(Function<K, V> mapper){ retu...
Functions which return a character vector Base R has two functions for invoking a system command. Both require an additional parameter to capture the output of the system command. system("top -a -b -n 1", intern = TRUE) system2("top", "-a -b -n 1", stdout = TRUE) ...
var MY_AJAX_ACTION_URL = "path/to/controller.php"; var table = $('#user_list_table').DataTable({ "autoWidth": true, "paging": true, "searching": true, "ordering": true, "language": { ...
You can use browser.debugger() to stop the execution. You can insert it any place in your code and it will stop the execution after that line until you don't command to continue. Note: To run the tests in debugger mode you have to issue command like this: `protractor debug <configuration.fi...
$ echo {0..10..2} 0 2 4 6 8 10 A third parameter to specify an increment, i.e. {start..end..increment} Using increments is not constrained to just numbers $ for c in {a..z..5}; do echo -n $c; done afkpuz
Pentaho Data Integration comes in two varieties: Community Edition (CE) - Free version for developers Enterprise Edition (EE) - Paid version for enterprise use Installation steps: You can download Pentaho Data Integration Community Edition from Sourceforge.net. For the Enterprise Editio...
To setup WSO2 ESB do the following : Download WSO2 ESB from http://wso2.com/products/enterprise-service-bus/ and extract the archive Set the JAVA_HOME and PATH environment variables as per your OS Navigate to [ESB_HOME]/bin. If on Windows run wso2server.bat. If on Linux run wso2server.sh. Mo...
On a few occasions, I have had an interesting figure I saved but I lost an access to its data. This example shows a trick how to achieve extract information from a figure. The key functions are findobj and get. findobj returns a handler to an object given attributes or properties of the object, suc...
The advantages of using Session State are 1)Better security 2)Reduced bandwidth The disadvantages of using Session state are 1)More resource consumption of server. 2)Extra code/care if a Web farm is used(we will discuss this shortly) **Session State Modes** ...
C++14 Parameter pack unpacking traditionally requires writing a helper function for each time you want to do it. In this toy example: template<std::size_t...Is> void print_indexes( std::index_sequence<Is...> ) { using discard=int[]; (void)discard{0,((void)( std::cout <&...
The built-in functions GETDATE and GETUTCDATE each return the current date and time without a time zone offset. The return value of both functions is based on the operating system of the computer on which the instance of SQL Server is running. The return value of GETDATE represents the current tim...
NSUserDefaults are written to disk periodically by the system, but there are times when you want your changes saved immediately, such as when the app transitions into background state. This is done by calling synchronize. Swift NSUserDefaults.standardUserDefaults().synchronize() Objective-C [[...
<svg width="400px" height="200px"> <text x="1em, 2em, 3em, 4em, 5em" y="3em, 4em, 5em"> Individually Spaced Text </text> </svg> The Text element supports individual placement of letters by accepting an array of values for...
Interfaces and implementations (types that implement an interface) are "detached". So it is a rightful question how to check at compile-time if a type implements an interface. One way to ask the compiler to check that the type T implements the interface I is by attempting an assignment us...
First, download a copy of SFML from the official page. Save it anywhere in your computer where it can be easily accessed. Open Codeblocks. Go to Project->Build Options->LinkerSettings tab. Click on the Add button and go to the bin folder of SFML and select all the files present there...
A simple worker pool implementation: package main import ( "fmt" "sync" ) type job struct { // some fields for your job type } type result struct { // some fields for your result type } func worker(jobs <-chan job, results chan<- result) ...
To convert String to and from Data / NSData we need to encode this string with a specific encoding. The most famous one is UTF-8 which is an 8-bit representation of Unicode characters, suitable for transmission or storage by ASCII-based systems. Here is a list of all available String Encodings Stri...

Page 564 of 1336