Tutorial by Examples: is

We are so used to the name D3.js that it's possible to forget that D3 is actually DDD (Data-Driven Documents). And that's what D3 does well, a data-driven approach to DOM (Document Object Model) manipulation: D3 binds data to DOM elements and manipulates those elements based on the bounded data. Le...
git log --pretty=format:"%Cgreen%ci %Cblue%cn %Cgreen%cr%Creset %s" This will give a nice overview of all commits (1 per line) with date, user and commit message. The --pretty option has many placeholders, each starting with %. All options can be found here
Arrow functions are lexically scoped; this means that their this Binding is bound to the context of the surrounding scope. That is to say, whatever this refers to can be preserved by using an arrow function. Take a look at the following example. The class Cow has a method that allows for it to pr...
Sun / Oracle releases of Java SE come in two forms: JRE and JDK. In simple terms, JREs support running Java applications, and JDKs also support Java development. Java Runtime Environment Java Runtime Environment or JRE distributions consist of the set of libraries and tools needed to run and mana...
Orthogonal to the JRE versus JDK dichotomy, there are two types of Java release that are widely available: The Oracle Hotspot releases are the ones that you download from the Oracle download sites. The OpenJDK releases are the ones that are built (typically by third-party providers) from the Ope...
Tests if the [x,y] point is inside a closed arc. var arc={ cx:150, cy:150, innerRadius:75, outerRadius:100, startAngle:0, endAngle:Math.PI } function isPointInArc(x,y,arc){ var dx=x-arc.cx; var dy=y-arc.cy; var dxy=dx*dx+dy*dy; var rrOuter=arc.outerRadiu...
Tests if the [x,y] point is inside a wedge. // wedge objects: {cx:,cy:,radius:,startAngle:,endAngle:} // var wedge={ // cx:150, cy:150, // centerpoint // radius:100, // startAngle:0, endAngle:Math.PI // } // Return true if the x,y point is inside the closed wedge function is...
Tests if an [x,y] point is inside a circle. // circle objects: {cx:,cy:,radius:,startAngle:,endAngle:} // var circle={ // cx:150, cy:150, // centerpoint // radius:100, // } // Return true if the x,y point is inside the circle function isPointInCircle(x,y,circle){ var dx=x-circ...
Tests if an [x,y] point is inside a rectangle. // rectangle objects: {x:, y:, width:, height: } // var rect={x:10, y:15, width:25, height:20} // Return true if the x,y point is inside the rectangle function isPointInRectangle(x,y,rect){ return(x>rect.x && x<rect.x+rect.width...
Since JSON is stored textual column, you might want to ensure that it is properly formatted. You can add CHECK constraint on JSON column that checks is text properly formatted JSON: CREATE TABLE ProductCollection ( Id int identity primary key, Data nvarchar(max) CONSTRAINT [Data shoul...
Step 1: Locate your download of Node.js, typically it is installed under C:/program files/nodejs Step 2: Open Visual Studios and navigate to "Tools>Options" Step 3: In the options window navigate to "Projects and Solutions>External Web Tools" Step 4: Add new entry with y...
NULL is a special case when it comes to comparisons. Assume the following data. id someVal ---- 0 NULL 1 1 2 2 With a query: SELECT id FROM table WHERE someVal = 1 would return id 1 SELECT id FROM table WHERE someVal <> 1 would return id 2 SELECT id FROM tabl...
A common mistake a lot of people starting out with FileSystemWatcher does is not taking into account That the FileWatcher event is raised as soon as the file is created. However, it may take some time for the file to be finished . Example: Take a file size of 1 GB for example . The file apr ask c...
CoffeeScriptJavaScriptis, =====isnt, !=!==not!and&&or||true, yes, ontruefalse, no, offfalse@, thisthisofininNo equivalenta ** bMath.pow(a, b)a // bMath.floor(a / b)a %% b(a % b + b) % b
The disabled binding adds a disabled attribute to a html element causing it to no longer be editable or clickable. This is useful mainly for <input>, <select>, <textarea>, <a> and <button> elements <input data-bind="disabled: disableInput"/> <sc...
img{ float:left; width:100px; margin:0 10px; } .div1{ background:#f1f1f1; /* does not create block formatting context */ } .div2{ background:#f1f1f1; overflow:hidden; /* creates block formatting context */ } https://jsfiddle.net/MadalinaTn/qkwwmu6m/2/ Using the o...
HTML: <div class="wrapper"> <div class="outer"> <div class="inner"> centered </div> </div> </div> CSS: .wrapper { height: 600px; text-align: center; } .outer { display: table; ...
Redis has publish/subscribe for sending messages. This is handled by subscribing to a channel & publishing to channel. Yes, subscribers will subscribe to one or more channels. Publisher need not know who are all subscribers. Instead, publisher will publish to specific channel. All the subscriber...
Noting that zip transposes a tuple of lists into a list of tuples, ghci> uncurry zip ([1,2],[3,4]) [(1,3), (2,4)] and the similarity between the types of transpose and sequenceA, -- transpose exchanges the inner list with the outer list -- +---+-->--+-+ -- | | ...
In order to call a function through a function pointer, the function pointer's type must exactly match the function's type. Otherwise, the behaviour is undefined. Example: int f(); void (*p)() = reinterpret_cast<void(*)()>(f); p(); // undefined

Page 56 of 109