Tutorial by Examples

Two important things to note when adding fields to a Pivot Table are Orientation and Position. Sometimes a developer may assume where a field is placed, so it's always clearer to explicitly define these parameters. These actions only affect the given Pivot Table, not the Pivot Cache. Dim thisPivot ...
This example changes/sets several formats in the data range area (DataBodyRange) of the given Pivot Table. All formattable parameters in a standard Range are available. Formatting the data only affects the Pivot Table itself, not the Pivot Cache. NOTE: the property is named TableStyle2 because the ...
Options pages are used to give the user the possibility to maintain settings for your extension. Version 2 Since Chrome 40 there is the possibility to have the option page as a predefined dialogue at chrome://extensions. The way to define an option page in the manifest.json is like the following:...
Patterns annotated with a bang (!) are evaluated strictly instead of lazily. foo (!x, y) !z = [x, y, z] In this example, x and z will both be evaluated to weak head normal form before returning the list. It's equivalent to: foo (x, y) z = x `seq` z `seq` [x, y, z] Bang patterns are enabled ...
Online REPL The easiest way to get started writing Haskell is probably by going to the Haskell website or Try Haskell and use the online REPL (read-eval-print-loop) on the home page. The online REPL supports most basic functionality and even some IO. There is also a basic tutorial available which c...
A function can be defined using guards, which can be thought of classifying behaviour according to input. Take the following function definition: absolute :: Int -> Int -- definition restricted to Ints for simplicity absolute n = if (n < 0) then (-n) else n We can rearrange it using gua...
Haskell supports pattern matching expressions in both function definition and through case statements. A case statement is much like a switch in other languages, except it supports all of Haskell's types. Let's start simple: longName :: String -> String longName name = case name of ...
Maybe Maybe is a Functor containing a possibly-absent value: instance Functor Maybe where fmap f Nothing = Nothing fmap f (Just x) = Just (f x) Maybe's instance of Functor applies a function to a value wrapped in a Just. If the computation has previously failed (so the Maybe value is ...
const namedMember1 = ... const namedMember2 = ... const namedMember3 = ... export { namedMember1, namedMember2, namedMember3 }
The __import__() function can be used to import modules where the name is only known at runtime if user_input == "os": os = __import__("os") # equivalent to import os This function can also be used to specify the file path to a module mod = __import__(r"C:/path/...
You are right in the middle of working on a new feature, and your boss comes in demanding that you fix something immediately. You may typically want use git stash to store your changes away temporarily. However, at this point your working tree is in a state of disarray (with new, moved, and removed ...
An actor inside Service Fabric is defined by a standard .NET interface/class pair: public interface IMyActor : IActor { Task<string> HelloWorld(); } internal class MyActor : Actor, IMyActor { public Task<string> HelloWorld() { return Task.FromResult(&quot...
A VHDL program can be simulated or synthesized. Simulation is what resembles most the execution in other programming languages. Synthesis translates a VHDL program into a network of logic gates. Many VHDL simulation and synthesis tools are parts of commercial Electronic Design Automation (EDA) s...
Until recently, using android.support.v4.app.FragmentPagerAdapter would prevent the usage of a PreferenceFragment as one of the Fragments used in the FragmentPagerAdapter. The latest versions of the support v7 library now include the PreferenceFragmentCompat class, which will work with a ViewPager ...
An atomic type can be used to safely read and write to a memory location shared between two threads. A Bad example that is likely to cause a data race: #include <thread> #include <iostream> //function will add all values including and between 'a' and 'b' to 'result' void add(int...
docker run --name="test-app" --entrypoint="/bin/bash" example-app This command will override the ENTRYPOINT directive of the example-app image when the container test-app is created. The CMD directive of the image will remain unchanged unless otherwise specified: docker run -...
docker run --add-host="app-backend:10.15.1.24" awesome-app This command adds an entry to the container's /etc/hosts file, which follows the format --add-host <name>:<address>. In this example, the name app-backend will resolve to 10.15.1.24. This is particularly useful for t...
A good way to learn about Elm is to try writing some expressions in the REPL (Read-Eval-Print Loop). Open a console in your elm-app folder (that you have created in the Initialize and build phase) and try the following: $ elm repl ---- elm-repl 0.17.1 ----------------------------------------------...
For this example, we will use the vector: > x <- 11:20 > x [1] 11 12 13 14 15 16 17 18 19 20 R vectors are 1-indexed, so for example x[1] will return 11. We can also extract a sub-vector of x by passing a vector of indices to the bracket operator: > x[c(2,4,6)] [1] 12 14 16 ...
0.170.18.0 At the time of writing (July 2016) elm-reactor has been temporarily stripped of its time traveling functionality. It's possible to get it, though, using the jinjor/elm-time-travel package. It's usage mirrors Html.App or Navigation modules' program* functions, for example instead of: im...

Page 508 of 1336