Tutorial by Examples: and

A CSS rule consists of a selector (e.g. h1) and declaration block ({}). h1 {}
Make sure your tomcat configurations file, server.xml has this line: <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" maxHttpHeaderSize="8192" SSLEnabled="true" maxThreads="150" minSpareThrea...
PMF FOR THE BINOMIAL DISTRIBUTION Suppose that a fair die is rolled 10 times. What is the probability of throwing exactly two sixes? You can answer the question using the dbinom function: > dbinom(2, 10, 1/6) [1] 0.29071 PMF FOR THE POISSON DISTRIBUTION The number of sandwhich ordered in ...
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....
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)[...
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
Join parent objects with their child entities, for example we want a relational table of each person and their hobbies DECLARE @json nvarchar(1000) = N'[ { "id":1, "user":{"name":"John"}, "hobbies":[ {...
Scope guards allow executing statements at certain conditions if the current block is left. import core.stdc.stdlib; void main() { int* p = cast(int*)malloc(int.sizeof); scope(exit) free(p); }
Here we have a simple class to be tested that returns a Promise based on the results of an external ResponseProcessor that takes time to execute. For simplicty we'll assume that the processResponse method won't ever fail. import {processResponse} from '../utils/response_processor'; const ping =...
Selective imports may also be renamed. void main() { import std.stdio : fooln = writeln; fooln("Hello world"); }
Suppose, that we have three users : The Administrator of the database > admin The application with a full access for her data > read_write The read only access > read_only --ACCESS DB REVOKE CONNECT ON DATABASE nova FROM PUBLIC; GRANT CONNECT ON DATABASE nova TO user; With th...
Media queries allow one to apply CSS rules based on the type of device / media (e.g. screen, print or handheld) called media type, additional aspects of the device are described with media features such as the availability of color or viewport dimensions. General Structure of a Media Query @media ...
You can set a setUp and tearDown function. A setUp function prepares your environment to tests. A tearDown function does a rollback. This is a good option when you can't modify your database and you need to create an object that simulate an object brought of database or need to init a configu...
context.stroke() Causes the perimeter of the Path to be stroked according to the current context.strokeStyle and the stroked Path is visually drawn onto the canvas. Prior to executing context.stroke (or context.fill) the Path exists in memory and is not yet visually drawn on the canvas. The unu...
context.fill() Causes the inside of the Path to be filled according to the current context.fillStyle and the filled Path is visually drawn onto the canvas. Prior to executing context.fill (or context.stroke) the Path exists in memory and is not yet visually drawn on the canvas. Example code usi...
context.clip Limits any future drawings to display only inside the current Path. Example: Clip this image into a triangular Path <!doctype html> <html> <head> <style> body{ background-color:white; } #canvas{border:1px solid red; } </style> <sc...
Julia provides macros to simplify distributing computation across multiple machines or workers. For instance, the following computes the sum of some number of squares, possibly in parallel. function sumofsquares(A) @parallel (+) for i in A i ^ 2 end end Usage: julia> sumo...
For branching The short-circuiting conditional operators && and || can be used as lightweight replacements for the following constructs: x && y is equivalent to x ? y : x x || y is equivalent to x ? x : y One use for short-circuit operators is as a more concise way to test a ...

Page 65 of 153