Tutorial by Examples: and

Most kivy apps start with this structure: from kivy.app import App class TutorialApp(App): def build(self): return TutorialApp().run() There is several way to go from here : All the codes below (except example 1 and 3) have the same widget and similar features, but show diffe...
TreeMap and TreeSet are not thread-safe collections, so care must be taken to ensure when used in multi-threaded programs. Both TreeMap and TreeSet are safe when read, even concurrently, by multiple threads. So if they have been created and populated by a single thread (say, at the start of the pro...
<button id="googleFormButton" class="mdl-button mdl-js-button mdl-button--raised"> Load Form </button> <dialog id="googleFormsDialog" class="mdl-dialog"> <!-- <h4 class="mdl-dialog__title">Google Form</h4> -...
Add a new function called showGoogleForm and adapt the follow code to suit. Note for simplicity this example does not contain any error checking which should be added in a production environment. The url should look something like this: https://docs.google.com/forms/.../?usp=pp_url&entry.17391...
This example shows how you might handle users interacting with modals on a 1-1 basis. //client side function modals(socket) { this.sendModalOpen = (modalIdentifier) => { socket.emit('openedModal', { modal: modalIdentifier }); }; this.closeModa...
WarehosueEntity findWarehouseById(@Param("id") Long id); List<WarehouseEntity> findWarehouseByIdIn(@Param("idList") List<Long> warehouseIdList);
Sending The Request Header $uri = 'http://localhost/http.php'; $ch = curl_init($uri); curl_setopt_array($ch, array( CURLOPT_HTTPHEADER => array('X-User: admin', 'X-Authorization: 123456'), CURLOPT_RETURNTRANSFER =>true, CURLOPT_VERBOSE => 1 )); $out = curl_exec($ch...
class Person { constructor(firstname, lastname) { this._firstname = firstname; this._lastname = lastname; } get firstname() { return this._firstname; } set firstname(name) { this._firstname = name; } get lastname() { return this._lastname; } ...
Gradle Setup : build.gradle(Module: app) compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } jackOptions { enabled true } What is the Stream API ? Stream is a new abstract layer introdu...
program ForLoopWithContinueAndBreaks; {$APPTYPE CONSOLE} var var i : integer; begin for i := 1 to 10 do begin if i = 2 then continue; (* Skip this turn *) if i = 8 then break; (* Break the loop *) WriteLn( i ); end; WriteLn('Finish.'); end. Outpu...
The first major distinction is between the dynamically generated directories which will be used for hosting and source directories. The source directories will have a config file or folder depending on the amount of configuration you may have . This includes the environment configuration and busi...
The first standalone R script Standalone R scripts are not executed by the program R (R.exe under Windows), but by a program called Rscript (Rscript.exe), which is included in your R installation by default. To hint at this fact, standalone R scripts start with a special line called Shebang line, ...
As mentioned in another example a subset of the elements of an array, called an array section, may be referenced. From that example we may have real x(10) x(:) = 0. x(2:6) = 1. x(3:4) = [3., 5.] Array sections may be more general than this, though. They may take the form of subscript trip...
ByteStrings and Buffers Okio is built around two types that pack a lot of capability into a straightforward API: ByteString is an immutable sequence of bytes. For character data, String is fundamental. ByteString is String's long-lost brother, making it easy to treat binary data as a value. This c...
Starting with Android 3.1 all applications, upon installation, are placed in a stopped state. While in stopped state, the application will not run for any reason, except by a manual launch of an activity, or an explicit intent that addresses an activity ,service or broadcast. When writing system ap...
Override Pagination Style: Every available pagination style can be overridden by creating a new class that inherits from one of the available styles and then alters its parameters: class MyPagination(PageNumberPagination): page_size = 20 page_size_query_param = 'page_size' max_page...
By using a module loader like Webpack we can benefit the built-in module system available in ES6 (as well as in TypeScript). We can then use the import and export features that allow us to specify what pieces of code can we are going to share between different parts of the application. When we then...
Most of the web applications use the session object to store some important information. This examples show how you can test such application using Flask-Testing. Full working example is also available on github. So first install Flask-Testing in your virtualenv pip install flask_testing To be ...
An example of implementation which give a possibility to detect if user single or double tap on UITableViewCell. override func viewDidLoad() { viewDidLoad() let doubleTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleDoubleTap(sender:))) double...
An example of implementation UITableView which allows to detect if cell has been tapped single or double time. override func viewDidLoad() { viewDidLoad() let doubleTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleDoubleTap(sender:))) doubleTa...

Page 142 of 153