Tutorial by Examples

We start with creating an HTML page for the app. There we define the meta tags, a script tag to load the SAPUI5 libraries, and a placeholder for the content of the app. <!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge"...
Google AppEngine (GAE) is a Platform as a Service (PaaS) that provides the ability to deploy applications at "Google Scale". It is one of the many services on Google Cloud Platform (GCP). Developers can integrate other services such as Google Cloud Storage (GCS) and Google Cloud SQL on GC...
This progam uses VCL, the default UI components library of Delphi, to print "Hello World" into a message box. The VCL wrapps most of the commonly used WinAPI components. This way, they can be used much easier, e.g. without the need to work with Window Handles. To include a dependency (lik...
Create hello.py: from flask import Flask app = Flask(__name__) @app.route('/') def hello(): return 'Hello, World!' Then run it with: export FLASK_APP=hello.py flask run * Running on http://localhost:5000/ Adding the code below will allow running it directly with python hello...
Visual Studio can be downloaded and installed for free in Comunity edition from the Microsoft site and can be also found in different versions. Just click on the Download button and run the executable, then follow the instructions.
There is already a function sum(). As a result, if we name a variable with the same name sum = 1+3; and if we try to use the function while the variable still exists in the workspace A = rand(2); sum(A,1) we will get the cryptic error: Subscript indices must either be real positive integer...
rx-java set up Gradle compile 'io.reactivex:rxjava2:rxjava:2.1.1' Maven <dependency> <groupId>io.reactivex.rxjava2</groupId> <artifactId>rxjava</artifactId> <version>2.1.1</version> </dependency> Ivy <dependency...
Download and install Visual Studio. Visual Studio can be downloaded from VisualStudio.com. The Community edition is suggested, first because it is free, and second because it involves all the general features and can be extended further. Open Visual Studio. Welcome. Go to File → New ...
Consider following DOM Structure <ul class="parentUl"> <li> Level 1 <ul class="childUl"> <li>Level 1-1 <span> Item - 1 </span></li> <li>Level 1-1 <span> Item - 2 </span></li&gt...
for is the only loop statement in go, so a basic loop implementation could look like this: // like if, for doesn't use parens either. // variables declared in for and if are local to their scope. for x := 0; x < 3; x++ { // ++ is a statement. fmt.Println("iteration", x) } //...
Breaking out of the loop and continuing to the next iteration is also supported in Go, like in many other languages: for x := 0; x < 10; x++ { // loop through 0 to 9 if x < 3 { // skips all the numbers before 3 continue } if x > 5 { // breaks out of the loop once x...
SharedPreferences sharedPreferences = ...; sharedPreferences.registerOnSharedPreferenceChangeListener(mOnSharedPreferenceChangeListener); private final SharedPreferences.OnSharedPreferenceChangeListener mOnSharedPreferenceChangeListener = new SharedPreferences.OnSharedPreferenceChangeListener(...
To delete a branch on the origin remote repository, you can use for Git version 1.5.0 and newer git push origin :<branchName> and as of Git version 1.7.0, you can delete a remote branch using git push origin --delete <branchName> To delete a local remote-tracking branch: git bra...
A common statement is if !(some condition). Ruby offers the alternative of the unless statement. The structure is exactly the same as an if statement, except the condition is negative. Also, the unless statement does not support elsif, but it does support else: # Prints not inclusive unless 'hell...
Given a random vector v = rand(10,1); if you want the sum of its elements, do NOT use a loop s = 0; for ii = 1:10 s = s + v(ii); end but use the vectorized capability of the sum() function s = sum(v); Functions like sum(), mean(), prod() and others, have the ability to operate ...
To find a match, the regex engine will consume characters one by one. When a partial match begins, the engine will remember the start position so it can go back in case the following characters don't complete the match. If the match is complete, the is no backtracking If the match isn't complete...
Backtracking can be caused by optional quantifiers or alternation constructs, because the regex engine will try to explore every path. If you run the regex a+b against aaaaaaaaaaaaaa there is no match and the engine will find it pretty fast. But if you change the regex to (aa*)+b the number of comb...
The function in_array() returns true if an item exists in an array. $fruits = ['banana', 'apple']; $foo = in_array('banana', $fruits); // $foo value is true $bar = in_array('orange', $fruits); // $bar value is false You can also use the function array_search() to get the key of a specifi...
Govendor is a tool that is used to import 3rd party packages into your code repository in a way that is compatible with golang's vendoring. Say for example that you are using a 3rd party package bosun.org/slog: package main import "bosun.org/slog" func main() { slog.Infof(&quo...
A flags-style enum value needs to be tested with bitwise logic because it may not match any single value. [Flags] enum FlagsEnum { Option1 = 1, Option2 = 2, Option3 = 4, Option2And3 = Option2 | Option3; Default = Option1 | Option3, } The Default value is actually a ...

Page 119 of 1336