Tutorial by Examples: c

Scala offers implicit conversions between all the major collection types in the JavaConverters object. The following type conversions are bidirectional. Scala TypeJava TypeIteratorjava.util.IteratorIteratorjava.util.EnumerationIteratorjava.util.IterableIteratorjava.util.Collectionmutable.Bufferjav...
>>> df = pd.DataFrame({'Name':['John Smith', 'Mary Brown'], 'Gender':['M', 'F'], 'Smoker':['Y', 'N']}) >>> print(df) Gender Name Smoker 0 M John Smith Y 1 F Mary Brown N >>> df_with_dummies = pd.get_dummies(df, ...
Create folder. Open it in command line. Run npm install webpack -g. Create 2 files: cats.js: var cats = ['dave', 'henry', 'martha']; module.exports = cats; app.js cats = require('./cats.js'); console.log(cats); Run in command line: webpack ./app.js app.bundle.js Now in folder will be fil...
as written in [MDN][1] at July 2016: This feature is not implemented in any browsers natively at this time. It is implemented in many transpilers, such as the Traceur Compiler, Babel or Rollup. So here is example with Typescript loader for Webpack: //TODO Create simplified version of this ar...
Configuring a private registry to use an AWS S3 backend is easy. The registry can do this automatically with the right configuration. Here is an example of what should be in your config.yml file: storage: s3: accesskey: AKAAAAAACCCCCCCBBBDA secretkey: rn9rjnNuX44iK+26qpM4cDEo...
To get this example working, you'll need to create an IIS 7/8 app on your IIS host and add the directory containing the Node.js Web App as the Physical Directory. Ensure that your Application/Application Pool Identity can access the Node.js install. This example uses the Node.js 64-bit installation....
Using a Virtual Directory or Nested Application in IIS is a common scenario and most likely one that you'll want to take advantage of when using IISNode. IISNode doesn't provide direct support for Virtual Directories or Nested Applications via configuration so to achieve this we'll need to take adv...
To get Socket.io working with IISNode, the only changes necessary when not using a Virtual Directory/Nested Application are within the Web.config. Since Socket.io sends requests starting with /socket.io, IISNode needs to communicate to IIS that these should also be handled IISNode and aren't just s...
NSURLRequest * urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://google.com"]]; NSURLResponse * response = nil; NSError * error = nil; NSData * data = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:&a...
// Create the request instance. NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://google.com"]]; // Create url connection and fire request NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:request delegate:self];
Simulation environments A simulation environment for a VHDL design (the Design Under Test or DUT) is another VHDL design that, at a minimum: Declares signals corresponding to the input and output ports of the DUT. Instantiates the DUT and connects its ports to the declared signals. Instant...
This example deals with one of the most fundamental aspects of the VHDL language: the simulation semantics. It is intended for VHDL beginners and presents a simplified view where many details have been omitted (postponed processes, VHDL Procedural Interface, shared variables...) Readers interest...
ASP.NET MVC is open source web application framework. MVC itself is a design pattern which is built around three main components: model-view-controller. Model - Models reflect your business objects, and are a means to pass data between Controllers and Views. View - Views are the pages that render ...
struct Fibonacci(u64, u64); impl Iterator for Fibonacci { type Item = u64; // The method that generates each item fn next(&mut self) -> Option<Self::Item> { let ret = self.0; self.0 = self.1; self.1 += ret; Some(ret) ...
The following codes will output the numbers 1 through 10 in the console, although console.log could be any function that accepts an input. Method 1 - Standard for x in [1..10] console.log x Method 2 - Compact console.log x for x in [1..10]
The TLC5940 is a handy item to have when you run out of PWM ports on the Arduino. It has 16 channels, each individually controllable with 12 bits of resolution (0-4095). An existing library is available at http://playground.arduino.cc/Learning/TLC5940. It is useful for controlling multiple servos or...
Storage options in Azure provide a "REST" API (or, better, an HTTP API) The Azure SDK offers clients for several languages. Let's see for example how to initialize one of the storage objects (a queue) using the C# client libraries. All access to Azure Storage is done through a storage ac...
Firstly, you have to import jquery library . We also need to import findDOmNode as we’re going to manipulate the dom. And obviously we are importing React as well. import React from 'react'; import { findDOMNode } from ‘react-dom’; import $ from ‘jquery’; We are setting an arrow function ‘hand...
Builders can be defined as a set of extension functions taking lambda expressions with receivers as arguments. In this example, a menu of a JFrame is being built: import javax.swing.* fun JFrame.menuBar(init: JMenuBar.() -> Unit) { val menuBar = JMenuBar() menuBar.init() setJMe...
-v, --version Added in: v0.1.3 Print node's version. -h, --help Added in: v0.1.3 Print node command line options. The output of this option is less detailed than this document. -e, --eval "script" Added in: v0.5.2 Evaluate the following argument as JavaScript. The modules whi...

Page 514 of 826