Tutorial by Examples: c

Const appName As String = "The App For That"
Dim surname As String 'surname can accept strings of variable length surname = "Smith" surname = "Johnson"
'Declare and assign a 1-character fixed-width string Dim middleInitial As String * 1 'middleInitial must be 1 character in length middleInitial = "M" 'Declare and assign a 2-character fixed-width string `stateCode`, 'must be 2 characters in length Dim stateCode As String * 2 stateC...
'Declare, dimension and assign a string array with 3 elements Dim departments(2) As String departments(0) = "Engineering" departments(1) = "Finance" departments(2) = "Marketing" 'Declare an undimensioned string array and then dynamically assign with 'the results...
VBA offers a Mid function for returning substrings within a string, but it also offers the Mid Statement which can be used to assign substrings or individual characters withing a string. The Mid function will typically appear on the right-hand-side of an assignment statement or in a condition, but ...
The text-decoration property is used to set or remove decorations from text. h1 { text-decoration: none; } h2 { text-decoration: overline; } h3 { text-decoration: line-through; } h4 { text-decoration: underline; } text-decoration can be used in combination with text-decoration-style and text-...
The word-spacing property specifies the spacing behavior between tags and words. Possible values a positive or negative length (using em px vh cm etc.) or percentage (using %) the keyword normal uses the font's default word spacing the keyword inherit takes the value from the parent element ...
div { direction: ltr; /* Default, text read read from left-to-right */ } .ex { direction: rtl; /* text read from right-to-left */ } .horizontal-tb { writing-mode: horizontal-tb; /* Default, text read from left-to-right and top-to-bottom. */ } .vertical-rtl { writing-mode: v...
Function to customize snackbar public static Snackbar makeText(Context context, String message, int duration) { Activity activity = (Activity) context; View layout; Snackbar snackbar = Snackbar .make(activity.findViewById(android.R.id.content), message, d...
You can use Snackbar.Callback to listen if the snackbar was dismissed by user or timeout. Snackbar.make(getView(), "Hi snackbar!", Snackbar.LENGTH_LONG).setCallback( new Snackbar.Callback() { @Override public void onDismissed(Snackbar snackbar, int event)...
This is an example of using Android Support Library V7 RecyclerView. Support libraries are generally recommended because they provide backward-compatible versions of new features, provide useful UI elements that are not included in the framework, and provide a range of utilities that apps can draw o...
The scope of a variable in a block { ... }, begins after declaration and ends at the end of the block. If there is nested block, the inner block can hide the scope of a variable which is declared in the outer block. { int x = 100; // ^ // Scope of `x` begins here // } // ...
DECLARE @startdate CHAR(8), @numberDays TINYINT SET @startdate = '20160101' SET @numberDays = 10; WITH CTE_DatesTable AS ( SELECT CAST(@startdate as date) AS [date] UNION ALL SELECT DATEADD(dd, 1, [date]) FROM CTE_DatesTable WHERE DATEADD(dd, 1, [date]) <= DateAdd(DAY, @nu...
The calc() function is the part of a new syntax in CSS3 in which you can calculate (mathematically) what size/position your element occupies by using a variety of values like pixels, percentages, etc. Note:- Whenever you use this function, always take care of the space between two values calc(100% -...
The border-collapse property applies only to tables (and elements displayed as display: table or inline-table) and sets whether the table borders are collapsed into a single border or detached as in standard HTML. table { border-collapse: separate; /* default */ border-spacing: 2px; /* Only w...
Table showing size and values range of all primitive types: data typenumeric representationrange of valuesdefault valuebooleann/afalse and truefalsebyte8-bit signed-27 to 27 - 10-128 to +127short16-bit signed-215 to 215 - 10-32,768 to +32,767int32-bit signed-231 to 231 - 10-2,147,483,648 to +2,147,...
Currying is the technique of translating the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single argument. This is normally useful when for example: different arguments of a function are calculated at different times. (Example 1) di...
The default scope for a variable is the enclosing container. If outside a script, or other container then the scope is Global. To specify a scope, it is prefixed to the variable name $scope:varname like so: $foo = "Global Scope" function myFunc { $foo = "Function (local) scope&...
The typical workflow of training and using neural networks, regardless of the library used, goes like this: Training Data Getting the training data: the X variable is the input, and the Y variable is the output. The simplest thing to do is to learn a logic gate, where X is a vector or two number...
Giving this enumeration as Example: enum Compass { NORTH(0), EAST(90), SOUTH(180), WEST(270); private int degree; Compass(int deg){ degree = deg; } public int getDegree(){ return degree; } } In Java an enum class is like any other c...

Page 283 of 826