Tutorial by Examples

Tensorflow works on principle of dataflow graphs. To perform some computation there are two steps: Represent the computation as a graph. Execute the graph. Representation: Like any directed graph a Tensorflow graph consists of nodes and directional edges. Node: A Node is also called an Op(s...
$ pwd /home/bob/somedir1/somedir2/somedir3 $ pushd /home/bob/otherdir1/otherdir2 /home/bob/otherdir1/otherdir2 /home/bob/somedir1/somedir2/somedir3 $ popd /home/bob/somedir1/somedir2/somedir3 $ pushd /usr /usr /home/bob/somedir1/somedir2/somedir3 $ pushd /var /var /usr /home/bob/som...
6 This can be done using the .repeat() method: "abc".repeat(3); // Returns "abcabcabc" "abc".repeat(0); // Returns "" "abc".repeat(-1); // Throws a RangeError 6 In the general case, this should be done using a correct polyfill for the ES6...
This example provides a brief overview - for a more in-depth explanation of normal forms and examples, see this question. Reduced normal form The reduced normal form (or just normal form, when the context is clear) of an expression is the result of evaluating all reducible subexpressions in the gi...
Arrow is, vaguely speaking, the class of morphisms that compose like functions, with both serial composition and “parallel composition”. While it is most interesting as a generalisation of functions, the Arrow (->) instance itself is already quite useful. For instance, the following function: sp...
A typed hole is a single underscore (_) or a valid Haskell identifier which is not in scope, in an expression context. Before the existance of typed holes, both of these things would trigger an error, so the new syntax does not interfere with any old syntax. Controlling behaviour of typed holes Th...
The value of a type hole can simply said to be undefined, although a typed hole triggers a compile-time error, so it is not strictly necessary to assign it a value. However, a typed hole (when they are enabled) produces a compile time error (or warning with deferred type errors) which states the nam...
In this question, @Viclib asked about using rewrite rules to exploit typeclass laws to eliminate some overloaded function calls: Mind the following class: class ListIsomorphic l where toList :: l a -> [a] fromList :: [a] -> l a I also demand that toList . fromList == id. H...
Writing and managing ADO.Net code for data access is a tedious and monotonous job. Microsoft has provided an O/RM framework called "Entity Framework" to automate database related activities for your application. Entity framework is an Object/Relational Mapping (O/RM) framework. It is an e...
Inverts the order of the elements in a sequence. If there is no items throws a ArgumentNullException: source is null. Example: // Create an array. int[] array = { 1, 2, 3, 4 }; //Output: // Call reverse extension method on the array. //4 var reverse = array.R...
The IEnumerable<T> interface is the base interface for all generic enumerators and is a quintessential part of understanding LINQ. At its core, it represents the sequence. This underlying interface is inherited by all of the generic collections, such as Collection<T>, Array, List<T&g...
The div is a block-level element, i.e it occupies the whole of the page width and the siblings are place one below the other irrespective of their width. <div> <p>This is DIV 1</p> </div> <div> <p>This is DIV 2</p> </div> The output of...
To create seeders, you may use the make:seeder Artisan command. All seeders generated will be placed in the database/seeds directory. $ php artisan make:seeder MoviesTableSeeder Generated seeders will contain one method: run. You may insert data into your database in this method. <?php us...
CoffeeScript's existential operator ? check if the variable is null or undefined. 1. Check for null or undefined. alert "Hello CoffeeScript!" if myVar? javascript equivalent: if (typeof myVar !== "undefined" && myVar !== null) { alert("Hello CoffeeScript!&qu...
Makes an ajax request and updates only part of the view. Bean.java @ManagedBean @ViewScoped public class Bean { public Date getCurrentDate() { return new Date(); } } sample.xhtml <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns...
Makes a request only sending part of the form. The text1 value is set, but not text2, as the listener states. Bean.java @ManagedBean @ViewScoped public class Bean { private String text1; private String text2; public String getText1() { return text1; } pu...
The date is updated whenever user types on the input field: Bean.java @ManagedBean @ViewScoped public class Bean { public Date getCurrentDate(){ return new Date(); } } sample.xhtml <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://x...
Executes the requests with the specified delay in milliseconds, meaning that if any subsequent request happens after the previous has been queued, the first one will be skiped. The feature is available starting from JSF 2.2: Bean.java @ManagedBean @ViewScoped public class Bean { publi...
1. Switch to a frame by Index. Here we are switching to index 1. Index refers to the order of frames on the page. This should be used as a last resort, as frame id or names are much more reliable. driver.SwitchTo().Frame(1); 2. Switch to a frame by Name driver.SwitchTo().Frame("Name_Of_Fr...
Some devices connected through a serial port send data to your program at a constant rate (streaming data) or send data at unpredictable intervals. You can configure the serial port to execute a function automatically to handle data whenever it arrives. This is called the "callback function&quo...

Page 673 of 1336