Tutorial by Examples: c

import android.content.Context; import android.os.Bundle; import android.support.constraint.ConstraintLayout; import android.support.constraint.ConstraintSet; import android.support.transition.TransitionManager; import android.support.v7.app.AppCompatActivity; import android.view.View; publ...
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...
Link function is best way in custom directives to manipulate DOM. It takes three attributes as input (scope, element, attribute) in sequence scope: its local scope object of directive. element: html element on which directive is used. attribute: it gives access to all attributes used in element ...
CleverTapAPI cleverTap; try { cleverTap = CleverTapAPI.getInstance(getApplicationContext()); } catch (CleverTapMetaDataNotFoundException e) { // thrown if you haven't specified your CleverTap Account ID or Token in your AndroidManifest.xml } catch (CleverTapPermissionsNotSatisfied e) { /...
For this example we will use the Live Test RavenDB instance. We will build a simple console app here which demonstrates the most basic operations: Creation Retrieval by Id Querying Updating Deletion Begin by creating a new Visual Studio solution and add a Console Application project to it...
By default, all your .scss partials go in the <source>/_sass folder. /_sass/base.scss body { margin: 0; } Your main .css or .scss files go in the <source>/css folder. Note: the two first two lines of triple dashes are necessary in order for Jekyll to transpile your .scss file to...
In stable Rust you create a Box by using the Box::new function. let boxed_int: Box<i32> = Box::new(1);
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...
As a way of subdividing Ada programs, packages may have so-called children. These can be packages, too. A child package has a special privilege: it can see the declarations in the parent package's private part. One typical use of this special visibility is when forming a hierarchy of derived types ...
Let's say you have already created the custom Test Work Orders screen to manage test work orders in your Acumatica ERP application: There is already NoteID field declared in the TestWorkOrder DAC, managed on the Test Work Orders screen: [Serializable] public class TestWorkOrder : IBqlTable { ...
case thing of Cat -> meow Bike -> ride Sandwich -> eat _ -> Debug.crash "Not yet implemented" You can use Debug.crash when you want the program to fail, typically used when you're in the middle of implementing a case ex...
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 CORS(h http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { origin := r.Header.Get("Origin") w.Header().Set("Access-Control-Allow-Origin", origin) if r.Method == "OPTIONS" { ...
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) }...
16#A8# -- hex 2#100# -- binary 2#1000_1001_1111_0000 -- long number, adding (optional) _ (one or more) for readability 1234 -- decimal
Usually output of a command goes to the terminal. Using the concept of Output redirection, the output of a command can be redirected to a file. So insted of displaying the output to the terminal it can be send to a file. '>' character is used for output redirection. $ pwd > file1 $ cat file...
The commands normally take their input from the standard input device keyboard. Using Input redirection concept, we can have their input redirected from a file. To redirect standard input from a file instead of the keyboard, the '<' character is used. $ cat file1 monday tuesday wednsday th...
The example assumes you have successfully run and fully understand the tutorial of MNIST(Deep MNIST for expert). %matplotlib inline import matplotlib.pyplot as plt # con_val is a 4-d array, the first indicates the index of image, the last indicates the index of kernel def display(con_val, kern...

Page 728 of 826