Tutorial by Examples: bas

For a C-style function call, e.g. plus(a, b); // Parentheses surrounding only the arguments, comma separated Then the equivalent Haskell code will be (plus a b) -- Parentheses surrounding the function and the arguments, no commas In Haskell, parentheses are not explicitly required for functi...
Given the following class: public class FinalizableObject { public FinalizableObject() { Console.WriteLine("Instance initialized"); } ~FinalizableObject() { Console.WriteLine("Instance finalized"); } } A program that create...
Rule of thumb: when garbage collection occurs, "live objects" are those still in use, while "dead objects" are those no longer used (any variable or field referencing them, if any, has gone out of scope before the collection occurs). In the following example (for convenience, Fi...
The easiest way to get up and running with vue-router is to use the version provided via CDN. HTML: <script src="https://unpkg.com/vue/dist/vue.js"></script> <script src="https://unpkg.com/vue-router/dist/vue-router.js"></script> <div id="rou...
For a class-less React component: function SomeComponent(props){ const ITEMS = ['cat', 'dog', 'rat'] function getItemsList(){ return ITEMS.map(item => <li key={item}>{item}</i>); } return ( <ul> {getItemsList()} ...
Liquid code can be categorised into objects, tags and filters. Objects Objects tell Liquid where to show content on a page. Objects and variables are denoted with double curly braces. {{ and }} <!-- input --> {{ page.title }} <!-- output --> Getting started with Liquid Tags T...
Excel has many Formulas built right in. Here are a few examples of some of the basic Formulas that might be handy to know when getting started with Excel: Important Note : The name and Syntax of these Formulas vary on the language of your Excel installation! For example this Function here : in Eng...
The following Less: .paragraph{ font-size: 12px; color: blue; background: white; } .parent{ font-size: 14px; color: black; background: green; .nestedParagraph:extend(.paragraph){ } } will compile into the following css: .paragraph, .parent .nestedParagraph { ...
Once you have established a connection to Redis you can get and set values using the Jedis connection object: Get String value = jedis.get(myKey); Set jedis.put(myKey, "some value");
RDBMSGraph DatabaseTablesGraphsRowsNodesColumns and DataProperties and its valuesConstraintsRelationshipsJoinsTraversal
Writing a Hello command Writing an Event Listener
Creating a basic block Creating a basic item Writing a Hello command Writing an Event Handler Getting started with Capabilities [1.8+]
<div class="container"> <div class="row" id="features-strip"> <div class="col s12 l4"> <h1>Feature 1</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloribus, unde facere tempore vero...
<div class="container"> <div class="row"> <div class="col s6"> <div class="card"> <div class="card-image"> <!-- Card Image --> <img src="image.png" alt="Image&...
Standard usage in Activity: Context context = getApplicationContext(); Standard usage in Fragment: Context context = getActivity().getApplicationContext(); this (when in a class that extends from Context, such as the Application, Activity, Service and IntentService classes) TextView textVi...
The size of any object or member subobject is required to be at least 1 even if the type is an empty class type (that is, a class or struct that has no non-static data members), in order to be able to guarantee that the addresses of distinct objects of the same type are always distinct. However, ba...
package main import ( "fmt" "time" ) func say(s string) { for i := 0; i < 5; i++ { time.Sleep(100 * time.Millisecond) fmt.Println(s) } } func main() { go say("world") say("hello") } A goroutine ...
Signals are only available to GObject classes. They can only be public, which means that any part of the code can connect handlers and trigger them. public class Emitter : Object { // A signal is declared like a method, // but with the signal keyword. public signal void my_signal ();...
using UnityEngine; using UnityEngine.Advertisements; public class Example : MonoBehaviour { #if !UNITY_ADS // If the Ads service is not enabled public string gameId; // Set this value from the inspector public bool enableTestMode = true; // Enable this during development #en...
Steps to copy heroku database to local database: 1. Run copy process in terminal: heroku pg:pull DATABASE_URL change_to_your_data_base_name --app change_to_your_app_name 2. Change db owner using this query: GRANT ALL PRIVILEGES ON DATABASE change_to_your_data_base_name to change_to_your_user; A...

Page 60 of 65