Tutorial by Examples: and

Let's assume you have a ListView wich is supposed to display every User object listed under the Users Property of the ViewModel where Properties of the User object can get updated programatically. <ListView ItemsSource="{Binding Path=Users}" > <ListView.ItemTemplate> ...
public abstract class BaseActivity extends AppCompatActivity { private Map<Integer, PermissionCallback> permissionCallbackMap = new HashMap<>(); @Override protected void onStart() { super.onStart(); ... } @Override public void setConten...
Sometimes you may want to have some login to determine where the user gets redirected to after submitting a form. Form Requests give a variety of ways. By default there are 3 variables declared in the Request $redirect, $redirectRoute and $redirectAction. On top of those 3 variables you can overr...
So, well, how on earth do you create a <md-button>, you may ask? All you have to do is to enter a <md-button>, along with your text for the button in it. index.html: <div ng-app="MdButtonApp"> <md-content ng-controller="Controller"> <h2...
Following is the example of QLabel that displays use of texts,images and hyperlinks. import sys from PyQt4.QtCore import * from PyQt4.QtGui import * def window(): app = QApplication(sys.argv) win = QWidget() l1 = QLabel() l2 = QLabel() l3 = QLabel() l4 = QLabel()...
public class CustomSurfaceView extends SurfaceView { @Override public boolean onTouchEvent(MotionEvent e) { super.onTouchEvent(e); if(e.getPointerCount() > 2){ return false; // If we want to limit the amount of pointers, we return false //...
Value types (structures and enumerations) are passed by value to functions: a copy will be given to the function, not a reference to the variable. So the following function won't do anything. void add_three (int x) { x += 3; } int a = 39; add_three (a); assert (a == 39); // a is still 39...
This example shows how to define sub-commands for a given command, and how to easily associate a command handler. This example defines a thing command with get and set subcommands. package things; import io.dropwizard.cli.Command; import io.dropwizard.setup.Bootstrap; import net.sourceforge.a...
Using Oracle SQL’s NVL2() function, you can create a display column which contains one value if a field contains data and another value if a field does not contain data. For example, in an Entity search, turn the presence of a primary e-mail address into a text display column: NVL2( {email} , 'YES...
Firebase handles notifications differently when the app is in background (killed process) and when in foreground (active). When your app is in the background, notification messages are displayed in the system tray, and onMessageReceived is not called. For notification messages with a data payload...
<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="${http.port}" doc:name="HTTP Listener Configuration"/> <db:mysql-config name="MySQL_Configuration" host="${db.host}" port="${db.port}"...
Application visits are initiated by clicking a Turbolinks-enabled link, or programmatically by calling Turbolinks.visit(location) By default, the visit function uses the 'advance' action. More understandably, the default behavior for the visit function is to advance to the page indicated by the ...
Go to the DOWNLOAD ANACONDA NOW page. Beneath the “Graphical Installer” buttons for Anaconda for macOS, there are command-line text links for Python versions 2.7 and 3.6. Download the command line installer for Anaconda with Python 2.7 or Anaconda with Python 3.6. Optional: Verify data integrity w...
$pwd Displays the present working directory. $who Displays all the users logged in. $who am i Shows the username of the current user. $date Displays the current system date $which <command> Shows the path of the specified command. For example "$which pwd" will sho...
Optionals type, which handles the absence of a value. Optionals say either "there is a value, and it equals x" or "there isn't a value at all". An Optional is a type on its own, actually one of Swift’s new super-powered enums. It has two possible values, None and Some(T), where ...
on your elements.html file, run the following commands: cd PATH/TO/IMPORTFILE/ vulcanize elements.html -o elements.vulc.html --strip-comments --inline-css --inline-js crisper --source elements.vulc.html --html build.html --js build.js Vulcanize retrieved source code of all the imports, then re...
If you try and create a recursive enum in Rust without using Box, you will get a compile time error saying that the enum can't be sized. // This gives an error! enum List { Nil, Cons(i32, List) } In order for the enum to have a defined size, the recursively contained value must be in...
func loginHandler(w http.ResponseWriter, r *http.Request) { // Steps to login } func main() { http.HandleFunc("/login", loginHandler) http.ListenAndServe(":8080", nil) }
// logger middlerware that logs time taken to process each request func Logger(h http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { startTime := time.Now() h.ServeHttp(w,r) endTime := time.Since(startTime) log...
func Recovery(h http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request){ defer func() { if err := recover(); err != nil { // respondInternalServerError } }() h.ServeHTTP(w , r) }...

Page 132 of 153