Tutorial by Examples: app

Configuration First, create a file called Package.swift. This is the file that tells swift compiler where the libraries are located. In this hello world example, we are using GitHub repos. We need Kitura and HeliumLogger. Put the following code inside Package.swift. It specified the name of the pro...
Use Nuget to find the Web Api Package. You can do that either by using the Manage Nuget Packages and searching for the Web Api package or use Nuget Package Manager and type PM> Install-Package Microsoft.AspNet.WebApi Add WebApiConfig.cs to the App_Start/ folder The config file should contain...
To create an kivy application sub class the app class Implement the build method, which will return the widget. Instantiate the class an invoke the run. from kivy.app import App from kivy.uix.label import Label class Test(App): def build(self): return Label(text='Hello worl...
import sys import json # load input arguments from the text file filename = sys.argv[ 1 ] with open( filename ) as data_file: input_args = json.loads( data_file.read() ) # cast strings to floats x, y = [ float(input_args.get( key )) for key in [ 'x', 'y' ] ] print json.dumps( { ...
If you're familiar with languages like Java, C# or C++ and the concept of generics/templates then this comparison might be useful for you. Say we have a generic function in C# public static T DoNothing<T>(T in) { return in; } To call this function with a float we can do DoNothing(5.0f) or...
This sample demonstrates the use of AD B2C for securing an AngularJS based web and mobile app. Refer https://github.com/NewtonJoshua/Azure-ADB2C-Angularjs-sample Azure AD B2C Azure AD B2C is a cloud identity management solution for your web and mobile applications. It is a highly available global...
In this document we'll see how to create a Google Cloud SQL Instance and connect them in your Google App Engine application and MySQL Workbench admin tool. Google Cloud SQL: Google Cloud SQL is a fully-managed database service that makes it easy to set-up, maintain, manage and administer your rela...
The documentation of apply says the following: calls the specified function block with this value as its receiver and returns this value. While the kdoc is not so helpful apply is indeed an useful function. In layman's terms apply establishes a scope in which this is bound to the object you ca...
HTML <p>This is a nice </p> <p>I like </p> <ul> <li>List item 1</li> <li>List item 2</li> <li>List item 3</li> </ul> <button id="btn-1">Append text</button> <button id="btn-2&quot...
First in case you are consulting mobile.angular.io the flag --mobile doesn't work anymore. So to start , we can create a normal project with angular cli. ng new serviceWorking-example cd serviceWorking-example Now the important thing, to said to angular cli that we want to use service worker w...
(let [xf (comp (map inc) (filter even?))] (transduce xf + [1 2 3 4 5 6 7 8 9 10])) ;; => 30 This example creates a transducer assigned to the local xf and uses transduce to apply it to some data. The transducer add's one to each of it's inputs and only returns the ...
(def xf (filter keyword?)) Apply to a collection, returning a sequence: (sequence xf [:a 1 2 :b :c]) ;; => (:a :b :c) Apply to a collection, reducing the resulting collection with another function: (transduce xf str [:a 1 2 :b :c]) ;; => ":a:b:c" Apply to a collection, and...
These locators should be used as a priority when possible, because they are more persistent to changes in an application then locators based on css or xpath, which can easily break. Binding locator Syntax by.binding('bind value') Example View <span>{{user.password}}</span> <s...
You can also easily wrap all angular modules, which you are going to use, into one module: import { NgModule } from '@angular/core'; import { MdButtonModule, MdSnackBarModule, MdSidenavModule } from '@angular/material'; @NgModule({ imports: [ BrowserAnimationsModule, MdB...
When offering IAP within an an app, you must first add an entry for each individual purchase within iTunes Connect. If you’ve ever listed an app for sale in the store, it’s a similar process and includes things like choosing a pricing tier for the purchase. When the user makes a purchase, the App ...
To associate an Application with something in the Database there are three main parts: Application Privilege: An Application Privilege describes Privileges like SELECT, INSERT, UPDATE, DELETE, ... Application Privileges can be summarized as an Aggregate Privilege. XS$PRIVILEGE( name=>'pri...
Extend your activity from this activity public abstract class BaseCompatLifecycleActivity extends AppCompatActivity implements LifecycleRegistryOwner { // We need this class, because LifecycleActivity extends FragmentActivity not AppCompatActivity @NonNull private final LifecycleRe...
def append_to_csv(input_string): with open("fileName.csv", "a") as csv_file: csv_file.write(input_row + "\n")
You're not limited to single line Applescript code. Here we take the previous two examples and combine them into a single function. #!/bin/bash pageinfo() { osascript -e \ 'tell app "safari" tell the current tab of window 1 return {url & "\n" & ...
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.

Page 32 of 33