Tutorial by Examples

In the solver file, we can set a global regularization loss using the weight_decay and regularization_type options. In many cases we want different weight decay rates for different layers. This can be done by setting the decay_mult option for each layer in the network definition file, where decay_...
From emacs 24.4 package.el is avalable, and one way to install helm is to do it via MELPA. First, add the MELPA repository as package archive by putting following code somewhere in your ~/.emacs (or, ~/.emacs.d/init.el). (require 'package) ;; add the repository before the package-initialize. (...
To undo something you just did: C-_ or C-x u or C-/
Capitalize word: M-c Convert word to upper case: M-u Convert word to lower case: M-l
To start drawing a shape you need to define a pen object The Pen accepts two parameters: Pen Color or Brush Pen Width The Pen Object is used to create an outline of the object you want to draw After Defining the Pen you can set specific Pen Properties Dim pens As New Pen(Color.Purple) ...
Graphics.FillShapes draws a shape and fills it in with the color given. Fill Shapes can use Brush Tool - to fill shape with a solid color Dim rect As New Rectangle(50, 50, 50, 50) e.Graphics.FillRectangle(Brushes.Green, rect) 'draws a rectangle that is filled with green e.Graphics.FillPie(...
To draw text onto the form use the DrawString Method When you draw a string you can use any of the 4 brushes listed above Dim lBrush As New LinearGradientBrush(point1, point2, Color.MediumVioletRed, Color.PaleGreen) e.Graphics.DrawString("HELLO", New Font("Impact", 60, FontSty...
template <class ForwardIterator> ForwardIterator min_element (ForwardIterator first, ForwardIterator last); template <class ForwardIterator, class Compare> ForwardIterator min_element (ForwardIterator first, ForwardIterator last,Compare comp); Effects Finds the minimum element i...
C++17 The [[nodiscard]] attribute can be used to indicate that the return value of a function shouldn't be ignored when you do a function call. If the return value is ignored, the compiler should give a warning on this. The attribute can be added to: A function definition A type Adding the a...
Use parentheses and commas to create tuples. Use one comma to create a pair. (1, 2) Use more commas to create tuples with more components. (1, 2, 3) (1, 2, 3, 4) Note that it is also possible to declare tuples using in their unsugared form. (,) 1 2 -- equivalent to (1,2) (,,) 1 2 3 ...
Use parentheses and commas to write tuple types. Use one comma to write a pair type. (Int, Int) Use more commas to write tuple types with more components. (Int, Int, Int) (Int, Int, Int, Int) Tuples can contain values of different types. (String, Int, Char) Tuples can contain complex ...
Pattern matching on tuples uses the tuple constructors. To match a pair for example, we'd use the (,) constructor: myFunction1 (a, b) = ... We use more commas to match tuples with more components: myFunction2 (a, b, c) = ... myFunction3 (a, b, c, d) = ... Tuple patterns can contain comple...
Use the fst and snd functions (from Prelude or Data.Tuple) to extract the first and second component of pairs. fst (1, 2) -- evaluates to 1 snd (1, 2) -- evaluates to 2 Or use pattern matching. case (1, 2) of (result, _) => result -- evaluates to 1 case (1, 2) of (_, result) => resu...
Use the uncurry function (from Prelude or Data.Tuple) to convert a binary function to a function on tuples. uncurry (+) (1, 2) -- computes 3 uncurry map (negate, [1, 2, 3]) -- computes [-1, -2, -3] uncurry uncurry ((+), (1, 2)) -- computes 3 map (uncurry (+)) [(1, 2), (3, 4), (5, 6)] -- co...
Use the curry function (from Prelude or Data.Tuple) to convert a function that takes tuples to a function that takes two arguments. curry fst 1 2 -- computes 1 curry snd 1 2 -- computes 2 curry (uncurry f) -- computes the same as f import Data.Tuple (swap) curry swap 1 2 -- computes (2, 1...
Use swap (from Data.Tuple) to swap the components of a pair. import Data.Tuple (swap) swap (1, 2) -- evaluates to (2, 1) Or use pattern matching. case (1, 2) of (x, y) => (y, x) -- evaluates to (2, 1)
Android Activity package com.example.myapp; import android.os.Bundle; import android.app.Activity; import android.webkit.WebView; public class WebViewActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceSta...
Basic Example package com.example.myapp; import android.os.Bundle; import android.app.Activity; import android.webkit.WebView; public class WebViewActivity extends Activity { private Webview webView; @Override protected void onCreate(Bundle savedInstanceState) { ...
A. The syntax is presented above. The following selector matches all <input> elements in an HTML document that are not disabled and don't have the class .example: HTML: <form> Phone: <input type="tel" class="example"> E-mail: <input type="em...
The :only-child CSS pseudo-class represents any element which is the only child of its parent. HTML: <div> <p>This paragraph is the only child of the div, it will have the color blue</p> </div> <div> <p>This paragraph is one of the two children of the ...

Page 743 of 1336