Tutorial by Examples: cli

let list1 = [ 1; 2 ] let list2 = [ 1 .. 100 ] // Accessing an element printfn "%A" list1.[0] // Pattern matching let rec patternMatch aList = match aList with | [] -> printfn "This is an empty list" | head::tail -> printfn "This list consists o...
Create a .gitattributes file in the project root containing: * text=auto This will result in all text files (as identified by Git) being committed with LF, but checked out according to the host operating system default. This is equivalent to the recommended core.autocrlf defaults of: input o...
Server side: import socket serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) serversocket.bind(('localhost', 8089)) serversocket.listen(5) # become a server socket, maximum 5 connections while True: connection, address = serversocket.accept() buf = connection.recv(6...
The following code is based on the examples provided by the documentation on std::net::TcpListener. This server application will listen to incoming requests and send back all incoming data, thus acting as an "echo" server. The client application will send a small message and expect a reply...
This code example creates a TCP client, sends "Hello World" over the socket connection, and then writes the server response to the console before closing the connection. // Declare Variables string host = "stackoverflow.com"; int port = 9999; int timeout = 5000; // Create ...
For if you have to fine-tune what is published. import { Mongo } from 'meteor/mongo'; import { Meteor } from 'meteor/meteor'; import { Random } from 'meteor/random'; if (Meteor.isClient) { // established this collection on the client only. // a name is required (first parameter) and this...
const readline = require('readline'); const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); rl.question('What is your name?', (name) => { console.log(`Hello ${name}!`); rl.close(); });
Define your class that will represent your custom error. public class ErrorDto { public int Code { get; set; } public string Message { get; set; } // other fields public override string ToString() { return JsonConvert.SerializeObject(this); } } Then put nex...
app/assets/javascripts/channels/notifications.coffee App.notifications = App.cable.subscriptions.create "NotificationsChannel", connected: -> # Called when the subscription is ready for use on the server $(document).on "change", "input", (e)=> ...
To implement an item click listener and/or an item long click listener, you can create an interface in your adapter: public class CustomAdapter extends RecyclerView.Adapter<CustomAdapter.ViewHolder> { public interface OnItemClickListener { void onItemSeleted(int position, Vi...
A <clip-path> defines a shape which acts as a window, only allowing parts of a <path> to show if they are within the <clip-path> shape and cutting off the rest. <vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.an...
Ember CLI is a normal npm package. To update it we have to uninstall it and then install the version we want. As of writing this post the latest version is 2.13.2. From the command line run: npm uninstall -g ember-cli npm cache clean bower cache clean npm install -g [email protected] To verif...
This example will show you how to quickly get a hello world Aurelia application up and running using the Aurelia CLI. Prerequisites The Aurelia CLI is a Node.js based application, so make sure you install it first before proceeding. You will need Node.js 4.4.7 or later. You will also need a Git c...
A commonly used CSS/Javascript library is Bootstrap. To install it into your Aurelia CLI driven application first you need to install it using Npm. npm install bootstrap --save Because Bootstrap has a hard dependency on jQuery, we need to make sure we also have jQuery installed: npm install jqu...
To install Eclipse RCP follow the steps : Download Eclipse RCP/RAP version from Eclipse.org Eclipse RCP/RAP project downloading URL
To increase the maximum amount of heap memory used Eclipse, edit the eclipse.ini file located in the Eclipse installation directory. This file specifies options for the startup of Eclipse, such as which JVM to use, and the options for the JVM. Specifically, you need to edit the value of the -Xmx JV...
Angular 2.0.0-rc.4 In this example we'll create a "Hello World!" app with only one root component (AppComponent) for the sake of simplicity. Prerequisites: Node.js v5 or later npm v3 or later Note: You can check versions by running node -v and npm -v in the console/terminal. ...
You can take advantage of Apache Maven's powerful features in Eclipse by installing the M2Eclipse feature. Follow these steps to install Maven in Eclipse: Open Eclipse and select Help → Install New Software… In the opened dialog, select the Add... button to add a new repository. Fill ...
Install jquery via npm : npm install jquery --save Install typings for the library: To add typings for a library, do the following: typings install jquery --global --save Add jquery to angular-cli-build.js file to vendorNpmFiles array: This is required so the build system...
The click binding can be used with any visible DOM element to add an event handler, that will invoke a JavaScript function, when element is clicked. <button data-bind="click: onClick">Click me</button> ko.applyBindings({ onClick: function(data, event) { // data: the...

Page 2 of 13