Tutorial by Examples: dc

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.
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...
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); }
If you want to provide a URL out of convenience for your user but map it directly to another one you're already using. Use a redirect: # config/routes.rb TestApp::Application.routes.draw do get 'courses/:course_name' => redirect('/courses/%{course_name}/lessons'), :as => "course&quot...
def quatNorm = { a, b, c, d -> Math.sqrt(a*a + b*b + c*c + d*d) } assert quatNorm(1, 4, 4, -4) == 7.0 def complexNorm = quatNorm.ncurry(1, 0, 0) // b, c == 0 assert complexNorm(3, 4) == 5.0
Summary: MVVM is an architectural pattern that is represented by three distinct components, the Model, View and ViewModel. In order to understand these three layers, it is necessary to briefly define each, followed by an explanation of how they work together. Model is the layer that drives the bus...
CDate() CDate() converts something from any datatype to a Date datatype Sub CDateExamples() Dim sample As Date ' Converts a String representing a date and time to a Date sample = CDate("September 11, 2001 12:34") Debug.Print Format$(sample, "yyyy-mm-dd hh:nn:...
Server Syntax var io = require('socket.io')(80); io.on('connection', function (mysocket) { //custom event called `private message` mysocket.on('private message', function (from, msg) { console.log('I received a private message by ', from, ' saying ', msg); }); //internal `di...
When storing JSON documents in SQL Server, We need to be able to efficiently filter and sort query results on properties of the JSON documents. CREATE TABLE JsonTable ( id int identity primary key, jsonInfo nvarchar(max), CONSTRAINT [Content should be formatted as JSON] CHECK...
public class ConnectSocketExample { private int HTTP_PORT = 80; /** * example method to create unconnected socket * then connect to it * at end return connected socket * * @param httpHostName - endpoint host name fot socket connection * @throws IOEx...
There are dozens of character sets with hundreds of collations. (A given collation belongs to only one character set.) See the output of SHOW COLLATION;. There are usually only 4 CHARACTER SETs that matter: ascii -- basic 7-bit codes. latin1 -- ascii, plus most characters needed for Western Eur...
As a developer, you frequently find yourself dealing with strings that are not created by your own code. These will often be supplied by third party libraries, external systems, or even end users. Validating strings of unclear provenance is considered to be one of the hallmarks of defensive program...
module.exports.routes = { 'GET /foo/*': { fn: function(req, res) { res.send("FOO!"); }, skipAssets: true }, };
Consider using Extension Methods as Functions which wrap other code, here's a great example that uses both a static method and and extension method to wrap the Try Catch construct. Make your code Bullet Proof... using System; using System.Diagnostics; namespace Samples { /// <summary&g...
In build.sbt, make sure you include (here for Mysql and PostGreSQL): "mysql" % "mysql-connector-java" % "5.1.20", "org.postgresql" % "postgresql" % "9.3-1100-jdbc4", "com.typesafe.slick" %% "slick" % "3.1.1&...
To setup a WebRTC-based communication system, you need three main components: A WebRTC signaling server To establish a WebRTC connections, peers need to contact a signaling server, which then provides the address information the peers require to set up a peer-to-peer connection. Signaling serv...
The example in Visitor Pattern provides a compelling use-case for CRTP: struct IShape { virtual ~IShape() = default; virtual void accept(IShapeVisitor&) const = 0; }; struct Circle : IShape { // ... // Each shape has to implement this method the same way ...

Page 13 of 28