Tutorial by Examples: and

Visual Studio also features an available Bundler and Minifier Extension that is capable of handling this process for you. The extension allows you to easily select and bundle the files you need without writing a line of code. Building Your Bundles After installing the extension, you select all of ...
Elm allows the definition of custom infix operators. Infix operators are defined using parenthesis around the name of a function. Consider this example of infix operator for construction Tuples 1 => True -- (1, True): (=>) : a -> b -> ( a, b ) (=>) a b = ( a, b ) Most of t...
Pipe operators are used to pass parameters to a function in a simple and elegant way. It allows to eliminate intermediate values and make function calls easier to read. In F#, there are two pipe operators: Forward (|>): Passing parameters from left to right let print message = print...
The ref keyword is used to pass an Argument as Reference. out will do the same as ref but it does not require an assigned value by the caller prior to calling the function. Ref Parameter :-If you want to pass a variable as ref parameter then you need to initialize it before you pass it as ref param...
The ASP.NET Core RTM release introduced BundlerMinifier.Core, a new Bundling and Minification tool that can be easily integrated into existing ASP.NET Core applications and doesn't require any external extensions or script files. Using BundlerMinifier.Core To use this tool, simply add a reference ...
Module MainPrompt Public Const PromptSymbol As String = "TLA > " Public Const ApplicationTitle As String = GetType(Project.BaseClass).Assembly.FullName REM Or you can use a custom string REM Public Const ApplicationTitle As String = "Short name of the application" Sub M...
To get current page width and height (for any browser), e.g. when programming responsiveness: function pageWidth() { return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.bo...
When you show a location to your users, you might want the MKMapView to display a coordinate at a zoom-level instead of setting a region to show. This functionality is not implemented by default, so you need to extend MKMapView with a methods that do the complex calculation from a coordinate and zoo...
Prerequisites Have Maven installed. Have an IDE installed such as Intellij, Eclipse, or NetBeans. Create a Maven project Create a Maven project with the standard project structure (i.e. Group ID as com.organization.app and Artifact ID as SpringBatchExample: SpringBatchExample |-- pom.xml ...
class Message DEFAULT_MESSAGE = "Hello, world" def speak(message = nil) if message puts message else puts DEFAULT_MESSAGE end end end The constant DEFAULT_MESSAGE can be changed with the following code: Message::DEFAULT_MESSAGE = "Hullo, wo...
The easiest way to install and manage various versions of Ruby with rbenv is to use the ruby-build plugin. First clone the rbenv repository to your home directory: $ git clone https://github.com/rbenv/rbenv.git ~/.rbenv Then clone the ruby-build plugin: $ git clone https://github.com/rbenv/rub...
In Emacs M-x slime will start slime with the default (first) Common Lisp implementation. If there are multiple implementations provided (via variable slime-lisp-implementations), other implementations can be accessed via M-- M-x slime, which will offer the choice of available implementations in mini...
Reflection is useful when it is properly used for right purpose. By using reflection, you can access private variables and re-initialize final variables. Below is the code snippet, which is not recommended. import java.lang.reflect.*; public class ReflectionDemo{ public static void main(St...
var baseType = typeof(List<>); var genericType = baseType.MakeGenericType(typeof(String)); var instance = Activator.CreateInstance(genericType); var method = genericType.GetMethod("GetHashCode"); var result = method.Invoke(instance, new object[] { });
Once you installed Ubuntu, you might want to get the latest patches and updates. Using Ubuntu's easy to use package manager Aptitude, the OS along with all future packages that is installed using this manner can be kept up to date. Download the latest package lists by refreshing information from ...
The Java language provides three operator for performing bitwise shifting on 32 and 64 bit integer values. These are all binary operators with the first operand being the value to be shifted, and the second operand saying how far to shift. The << or left shift operator shifts the value g...
You should already have your backend REST resource available. On the client side (GWT) your need to Add RestyGwt dependency to your project with maven <dependency> <groupId>org.fusesource.restygwt</groupId> <artifactId>restygwt</artifactId> <vers...
// Obtain an instance of JavaScript engine ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine engine = manager.getEngineByName("nashorn"); try { // Set value in the global name space of the engine engine.put("name","Nashorn"); // E...
Exporting a database is a simple two step process: sqlite> .output mydatabase_dump.sql sqlite> .dump Exporting a table is pretty similar: sqlite> .output mytable_dump.sql sqlite> .dump mytable The output file needs to be defined with .output prior to using .dump; otherwise, the...
All integers or pointers can be used in an expression that is interpreted as "truth value". int main(int argc, char* argv[]) { if (argc % 4) { puts("arguments number is not divisible by 4"); } else { puts("argument number is divisible by 4"); } ... ...

Page 61 of 153