Tutorial by Examples: a

If mapping covariantly over only the first argument, or only the second argument, is desired, then first or second ought to be used (in lieu of bimap). first :: Bifunctor f => (a -> c) -> f a b -> f c b first f = bimap f id second :: Bifunctor f => (b -> d) -> f a b -> f...
Preface Instead of starting with a formal definition, the goal is to approach these topic via a row of examples, introducing definitions along the way. The remark section Theory will consist of all definitions, theorems and propositions to give you all informations to faster look up specific aspect...
A LocalDate is a date without a timezone. Consider using them when you are only concerned with the year, month, and day of month and are not interested in an exact time. For example, when we write our date of birth (such as 1960-01-01) we don't care about the timezone in which it happened.
A given year-month-day: LocalDate oneJanuaryNineteenSixty = new LocalDate(1960,1,1); Today's date: LocalDate today = LocalDate.now() Tomorrow: LocalDate tomorrow = LocalDate.now().plusDays(1); Yesterday: LocalDate yesterday = LocalDate.now().minusDays(1); Two weeks ago: LocalDate tw...
Converting a java.util.Calendar object: Calendar rightNow = Calendar.getInstance(); LocalDate today = LocalDate.fromCalendarFields(rightNow); Converting a java.util.Date object: Date rightNow = new Date(); LocalDate today = LocalDate.fromDateFields(rightNow); Converting a string: String d...
this is our index.html file <!DOCTYPE html> <html manifest="index.appcache"> <body> <p>Content</p> </body> </html> then we will create index.appcache file with below codes CACHE MANIFEST index.html write those files that you want ...
There's a useful set of type combinators for building big Functors out of smaller ones. These are instructive as example instances of Functor, and they're also useful as a technique for generic programming, because they can be used to represent a large class of common functors. The identity functor...
Below code is basic example of spark launcher.This can be used if spark job has to be launched through some application. val sparkLauncher = new SparkLauncher //Set Spark properties.only Basic ones are shown here.It will be overridden if properties are set in Main class. sparkLauncher.setSparkHom...
Overview: There are typically two types of SAS Deployments: SAS Foundation only installation (BASE SAS). This is typically is installed on a PC. It does not run any server software. SAS Planned Deployment for their server architecture which will install the SAS server environment along wit...
Description: mov copies values of bits from source argument to destination argument. Common source/destination are registers, usually the fastest way to manipulate values with[in] CPU. Another important group of source_of/destination_for values is computer memory. Finally some immediate values m...
This is usually used for renaming or shortening long namespace references such referring to components of a library. namespace boost { namespace multiprecision { class Number ... } } namespace Name1 = boost::multiprecision; // Both Type declarations are equivale...
Alias Declaration are affected by preceding using statements namespace boost { namespace multiprecision { class Number ... } } using namespace boost; // Both Namespace are equivalent namespace Name1 = boost::multiprecision; namespace Name2 = multiprecision; ...
For a circular View (in this case TextView) create a drawble round_view.xml in drawble folder: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval"> <solid...
Php arrayiterator allows you to modify and unset the values while iterating over arrays and objects. Example: $array = ['1' => 'apple', '2' => 'banana', '3' => 'cherry']; $arrayObject = new ArrayObject($array); $iterator = $arrayObject->getIterator(); for($iterator; $iterator-...
To declare a single namespace with hierarchy use following example: namespace MyProject\Sub\Level; const CONNECT_OK = 1; class Connection { /* ... */ } function connect() { /* ... */ } The above example creates: constant MyProject\Sub\Level\CONNECT_OK class MyProject\Sub\Level\Connection...
GridView definition on ASPX page As shown below, first column of grid is defined as a checkbox column, which is conditionally cleared as shown in further examples below (the header checkbox is only for selecting/un-selecting all rows on current page, but same can be extended for all on grid easily)...
MongoDB stores data records as BSON documents. BSON is the binary representation of JSON. $ python >>> from pymongo import MongoClient >>> client = MongoClient() >>> col = client.mydb.test Create Insert a single document insert_one(document) >>> result = ...
Clearing the content of a web element: (note - when simulating user actions in tests, it's better to send backspace, see next action) interactionWebElement.clear(); Entering data - simulating sending keystrokes: interactionWebElement.sendKeys("Text"); interactionWebElement.sendKeys(K...
Although not necessary in PHP however it is a very good practice to initialize variables. Uninitialized variables have a default value of their type depending on the context in which they are used: Unset AND unreferenced var_dump($unset_var); // outputs NULL Boolean echo($unset_bool ? "tr...
Fluent wait is a superclass of explicit wait (WebDriverWait) that is more configurable since it can accept an argument to the wait function. I'll pass on implicit wait, since it's a best practice to avoid it. Usage (Java): Wait wait = new FluentWait<>(this.driver) .withTimeout(drive...

Page 851 of 1099