Tutorial by Examples: c

Publications can be merged on the client, resulting in differently shaped documents within a single cursor. The following example represents how a user directory might publish a minimal amount of public data for users of an app, and provide a more detailed profile for the logged in user. // client...
Build yourself three servers using whatever physical or virtual hardware you wish. (This tutorial assumes you're using Ubuntu as your operating system.) Then repeat the following instructions three times... once for each server. # add the names of each server to the host file of each server sudo n...
Then go into the mongo shell and initiate the replica set, like so: meteor mongo > rs.initiate() PRIMARY> rs.add("mongo-a") PRIMARY> rs.add("mongo-b") PRIMARY> rs.add("mongo-c") PRIMARY> rs.setReadPref('secondaryPreferred')
Knitr is an R package that allows us to intermingle R code with LaTeX code. One way to achieve this is external code chunks. External code chunks allow us to develop/test R Scripts in an R development environment and then include the results in a report. It is a powerful organizational technique....
FunctionWidgetactionButtonAction ButtoncheckboxGroupInputA group of check boxescheckboxInputA single check boxdateInputA calendar to aid date selectiondateRangeInputA pair of calendars for selecting a date rangefileInputA file upload control wizardhelpTextHelp text that can be added to an input form...
A very useful feature many people overlook is the ability to construct a Map using a SOQL query. Map<Id, Account> accounts = new Map<Id, Account>([SELECT Id, Name FROM Account]); System.debug(accounts); When you run this code, accounts then contains a Map of your Account objects, ke...
Instead of struct IShape { virtual ~IShape() = default; virtual void print() const = 0; virtual double area() const = 0; virtual double perimeter() const = 0; // .. and so on }; Visitors can be used: // The concrete shapes struct Square; struct Circle; // The v...
We try to extract imdb top chart movies and ratings R> library(RCurl) R> library(XML) R> url <- "http://www.imdb.com/chart/top" R> top <- getURL(url) R> parsed_top <- htmlParse(top, encoding = "UTF-8") R> top_table <- readHTMLTable(parsed_top)[...
You can clear the console window using the console.clear() method. This removes all previously printed messages in the console and may print a message like "Console was cleared" in some environments.
The Display Logic module allows you to add conditions for displaying or hiding certain form fields based on client-side behavior. This module is incredibly useful to make forms much more professional by showing only the appropriate fields and without adding a lot of custom JavaScript. Example usag...
The Grouped CMS Menu Module allows you to group CMS menu items into nested lists which expand when hovered over. This is useful when there are so many CMS menu items that screen space becomes an issue.
Intuition The categorical product of two types A and B should contain the minimal information necessary to contain inside an instance of type A or type B. We can see now that the intuitive coproduct of two types should be Either a b. Other candidates, such as Either a (b,Bool), would contain a part...
First thing to do is enable the mod rewrite on wamp go to Apache modules and scroll down the list If not showing tick enable it and then restart all servers. Linux users can also use below terminal command to enable rewrite module sudo a2enmod rewrite Then restart apache using: sudo service...
Chaining and Chainable is a design methodology used to design object behaviors so that calls to object functions return references to self, or another object, providing access to additional function calls allowing the calling statement to chain together many calls without the need to reference the v...
Paste your fonts file inside android/app/src/main/assets/fonts/font_name.ttf Recompile the Android app by running react-native run-android Now, You can use fontFamily: 'font_name' in your React Native Styles
The GHC compiler has mature support for compiling with profiling annotations. Using the -prof and -fprof-auto flags when compiling will add support to your binary for profiling flags for use at runtime. Suppose we have this program: main = print (fib 30) fib n = if n < 2 then 1 else fib (n-1)...
Cost centers are annotations on a Haskell program which can be added automatically by the GHC compiler -- using -fprot-auto -- or by a programmer using {-# SCC "name" #-} <expression>, where "name" is any name you wish and <expression> is any valid Haskell expression:...
Check screencast video on YouTube about this feature IntelliJ provides a quick-preview feature called Viewing Definition. Using this feature allows a user to quickly see the contents of a method/class without navigating into the class itself OS X - (⌘+Y) or (⌥+Space) Unix / Windows - Ctrl+Shif...
Similar to currying, partial application is used to reduce the number of arguments passed to a function. Unlike currying, the number need not go down by one. Example: This function ... function multiplyThenAdd(a, b, c) { return a * b + c; } ... can be used to create another function that...
SQL Server 2008 R2 Supported compound operators: += Add and assign -= Subtract and assign *= Multiply and assign /= Divide and assign %= Modulo and assign &= Bitwise AND and assign ^= Bitwise XOR and assign |= Bitwise OR and assign Example usage: DECLARE @test INT = 42; SET @test...

Page 363 of 826