Tutorial by Examples: c

Commander.js var program = require('commander'); program .version('0.0.1') program .command('hi') .description('initialize project configuration') .action(function(){ console.log('Hi my Friend!!!'); }); program .command('bye [name]') .description('initialize pro...
trait PartialFunction[-A, +B] extends (A => B) Every single-argument PartialFunction is also a Function1. This is counter-intuitive in a formal mathematical sense, but better fits object oriented design. For this reason Function1 does not have to provide a constant true isDefinedAt method. To...
def hello puts "Hello readers" end hello # => "Hello readers" def hello puts "Hell riders" end hello # => "Hell riders"
puts "Hello readers".reverse # => "sredaer olleH" class String def reverse "Hell riders" end end puts "Hello readers".reverse # => "Hell riders"
You can access the exact same context as the method you override. class Boat def initialize(name) @name = name end def name @name end end puts Boat.new("Doat").name # => "Doat" class Boat def name "⛵ #{@name} ⛵" end end ...
class String def fancy "~~~{#{self}}~~~" end end puts "Dorian".fancy # => "~~~{Dorian}~~~"
<appSettings> <add key="ClientValidationEnabled" value="true"/> <add key="UnobtrusiveJavaScriptEnabled" value="true"/> </appSettings>
<package id="jQuery" version="1.10.2" targetFramework="net452" /> <package id="jQuery.Validation" version="1.11.1" targetFramework="net452" /> <package id="Microsoft.jQuery.Unobtrusive.Validation" version="3....
public class BundleConfig { public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js")); bundles.A...
public class MvcApplication : System.Web.HttpApplication { protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes);...
These events can be used to communicate between 2 or more controllers. $emit dispatches an event upwards through the scope hierarchy, while $broadcast dispatches an event downwards to all child scopes.This has been beautifully explained here. There can be basically two types of scenario while comm...
TStringList is a descendant of the TStrings class of the VCL. TStringList can be used for storing and manipulating of list of Strings. Although originally intended for Strings, any type of objects can also be manipulated using this class. TStringList is widely used in VCL when the the purpose is t...
1. Install GLFW First step is to create an OpenGL window. GLFW is an Open Source, multi-platform library for creating windows with OpenGL, to install GLFW first download its files from www.glfw.org Extract the GLFW folder and its contents will look like this Download and install CMake to buil...
What is an exception? Exception in PL/SQL is an error created during a program execution. We have three types of exceptions: Internally defined exceptions Predefined exceptions User-defined exceptions What is an exception handling? Exception handling is a possibility to keep o...
An internally defined exception doesn't have a name, but it has its own code. When to use it? If you know that your database operation might raise specific exceptions those which don't have names, then you can give them names so that you can write exception handlers specifically for them. Otherwis...
Predefined exceptions are internally defined exceptions but they have names. Oracle database raise this type of exceptions automatically. Example create or replace procedure insert_emp is begin insert into emp (emp_id, ename) values ('1','Jon'); exception when dup_val_on_index then ...
As the name suggest user defined exceptions are created by users. If you want to create your own exception you have to: Declare the exception Raise it from your program Create suitable exception handler to catch him. Example I want to update all salaries of workers. But if there are no work...
using CLI: $ opennlp SentenceDetector ./en-sent.bin < ./input.txt > output.txt using API: import static java.nio.file.Files.readAllBytes; import static java.nio.file.Paths.get; import java.io.IOException; import java.util.Objects; public class FileUtils { /** * Get file data as...
Install the required dependencies: 'org.apache.solr:solr-solrj:5.5.1' 'org.apache.httpcomponents:httpclient:4.3.6' 'com.ibm.watson.developer_cloud:java-sdk:3.2.0' The code below assumes you have a Solr collection with documents and you have trained a ranker, otherwise follow this tutorial pub...
Bootstrap components are a collection of optional jQuery plugins which bundled with Bootstrap. The purpose of Bootstrap components is to provide extended features and capabilities which would be difficult (or impossible) to accomplish without the use of Javascript. Some components provide are pure...

Page 517 of 826