Tutorial by Examples: 1

In order to obtain a Google Maps API key for your certificate, you must provide the API console with the SH1-fingerprint of your debug/release keystore. You can obtain the keystore by using the JDK's keytool program as described here in the docs. Another approach is to obtain the fingerprint progr...
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...
https://github.com/jaymedavis/stripe.net is a great starting point. Assuming you are using MVC w/Razor you need to have a few things in your View page <script type="text/javascript" src="https://js.stripe.com/v2/"></script> This script calls upon the stripe.js t...
It is possible to use IO.inspect/1 as a tool to debug an elixir program. defmodule MyModule do def myfunction(argument_1, argument_2) do IO.inspect(argument_1) IO.inspect(argument_2) end end It will print out argument_1 and argument_2 to the console. Since IO.inspect/1 returns i...
The complete sample code for this application (Android + Node server) is available in the PayPal Developer Github repository. The first stage of creating the Android portion of our application is to set up a basic layout and handle responses that come back from the server that we'll set up in Node....
In views\site\form-submission.php <?php Pjax::begin(['id'=>'id-pjax']); ?> <?= Html::beginForm(['site/form-submission'], 'post', ['data-pjax' => '', 'class' => 'form-inline']); ?> <?= Html::input('text', 'string', Yii::$app->request->post('string'), ['class' =&gt...
Checking whether the current date contains the symbol for AM or PM Objective-C NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setLocale:[NSLocale currentLocale]]; [formatter setDateStyle:NSDateFormatterNoStyle]; [formatter setTimeStyle:NSDateFormatterShortStyle]; NSStr...
Since there is no STRING_SPLIT function we need to use XML hack to split the string into rows: Example: SELECT split.a.value('.', 'VARCHAR(100)') AS Value FROM (SELECT Cast ('<M>' + Replace('A|B|C', '|', '</M><M>')+ '</M>' AS XML) AS Data) AS A CROSS apply data...
This example will call the windows calculator. It's important to notice that the exit code will vary accordingly to the program/script that is being called. package process.example; import java.io.IOException; public class App { public static void main(String[] args) { try { ...
var recordType = 'customer'; // The type of record to load. The string internal id. var recordID = 100; // The specific record instances numeric internal id. var initializeValues = null; /* The first two parameters are required but the third -- * in this case the variable initializeValues -- i...
For a 12hour time format one can use: ^(?:0?[0-9]|1[0-2])[-:][0-5][0-9]\s*[ap]m$ Where (?:0?[0-9]|1[0-2]) is the hour [-:] is the separator, which can be adjusted to fit your need [0-5][0-9] is the minute \s*[ap]m followed any number of whitespace characters, and am or pm If you need th...
The C++11 standard is a major extension to the C++ standard. Below you can find an overview of the changes as they have been grouped on the isocpp FAQ with links to more detailed documentation. Language Extensions General Features auto decltype Range-for statement Initializer lists Uniform ...
Positional parameters passed to the script from either the command line or a function: #!/bin/bash # $n is the n'th positional parameter echo "$1" echo "$2" echo "$3" The output of the above is: ~> $ ./testscript.sh firstarg secondarg thirdarg firstarg sec...
This example adds a new rectangle to the canvas every 1 second (== a 1 second interval) Annotated Code: <!doctype html> <html> <head> <style> body{ background-color:white; } #canvas{border:1px solid red; } </style> <script> window.onload=(functio...
Without timezone, with microseconds from datetime import datetime datetime.now().isoformat() # Out: '2016-07-31T23:08:20.886783' With timezone, with microseconds from datetime import datetime from dateutil.tz import tzlocal datetime.now(tzlocal()).isoformat() # Out: '2016-07-31T23:09:4...
This are the tools you need to build SFML for Android on a Windows Machine CMake Git Android SDK Android NDK Apache Ant MinGW (msys basic) Java jre Java jdk Android USB Driver (Download: http://adbdriver.com/ ) Make sure you've installed all tools (Tools -> Android SDK Tools / Platf...
Often times, it is helpful to evaluate multiple expressions and to return the result from the first or second form rather than the last. This is easy to accomplish using let and, for instance: (let ((form1-result form1)) form2 form3 ;; ... form-n-1 form-n form1-result) Because...
#include <SPI.h> #define CSPIN 1 void setup() { pinMode(CSPIN, OUTPUT); // init chip select pin as an output digitalWrite(CSPIN, 1); // most slaves interpret a high level on CS as "deasserted" SPI.begin(); SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MO...
C++14 C++14 allows to use auto in lambda argument auto print = [](const auto& arg) { std::cout << arg << std::endl; }; print(42); print("hello world"); That lambda is mostly equivalent to struct lambda { template <typename T> auto operator ()(const...
The C++14 standard is often referred to as a bugfix for C++11. It contains only a limited list of changes of which most are extensions to the new features in C++11. Below you can find an overview of the changes as they have been grouped on the isocpp FAQ with links to more detailed documentation. L...

Page 5 of 16