Tutorial by Examples: f

TextFX [SourceForge] is plugin for advanced character conversions (escaping characters etc.) and code formatting (HTML or C++ code).
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...
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...
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...
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...
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...
The fold method iterates over a collection, using an initial accumulator value and applying a function that uses each element to update the accumulator successfully: val nums = List(1,2,3,4,5) var initialValue:Int = 0; var sum = nums.fold(initialValue){ (accumulator,currentElementBeingIterated...
Scala has a powerful type-inference mechanism built-in to the language. This mechanism is termed as 'Local Type Inference': val i = 1 + 2 // the type of i is Int val s = "I am a String" // the type of s is String def squared(x : Int) = x*x // the return type ...
The Scala compiler can also deduce type parameters when polymorphic methods are called, or when generic classes are instantiated: case class InferedPair[A, B](a: A, b: B) val pairFirstInst = InferedPair("Husband", "Wife") //type is InferedPair[String, String] // Equiv...
There are scenarios in which Scala type-inference does not work. For instance, the compiler cannot infer the type of method parameters: def add(a, b) = a + b // Does not compile def add(a: Int, b: Int) = a + b // Compiles def add(a: Int, b: Int): Int = a + b // Equivalent expression, compiles ...
#include <SPI.h> #define CSPIN 1 void setup() { pinMode(CSPIN, OUTPUT); // init chip select pin as an output digitalWrite(CSPIN, 1); // most slaves interpret a high level on CS as "deasserted" SPI.begin(); SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MO...
#include <Servo.h> Servo srv; void setup() { srv.attach(9); // Attach to the servo on pin 9 } To use a servo, you need to call attach() function first. It starts generating a PWM signal controlling a servo on a specified pin. On boards other than Arduino Mega, use of Servo lib...
Here are some example on how to add new filters/functions to twig,the synax for adding Twig_Functions are the same as the Twig_Filter ones, just change the keywords accordingly <?php $twig = new Twig_Environment($loader); /* You can chain a global function */ $twig->addFilter(ne...
Here is a workaround to temporary reset your password for your account. Login to your hosting panel and use the database tool that is available (probably PHPmyAdmin). Load the appropriate database and then go to the jos_users table. (The database prefix might be different for your case). ...

Page 225 of 457