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...
Create folder. Open it in command line. Run npm install webpack -g. Create 2 files:
cats.js:
define(function(){
return ['dave', 'henry', 'martha'];
});
app.js
require(['./cats'],function(cats){
console.log(cats);
})
Run in command line:
webpack ./app.js app.bundle.js
Now i...
as written in MDN 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 Babel loader for Webpack:
Create folder. Add package.json file there:
{
&quo...
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...
IISNode allows Node.js Web Apps to be hosted on IIS 7/8 just like a .NET application would. Of course, you can self host your node.exe process on Windows but why do that when you can just run your app in IIS.
IISNode will handle scaling over multiple cores, process manageement of node.exe, and auto...
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...
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...
This is a statusbar that you see on top of your screen with icons of battry,clock ... .
let frame = require("ui/frame");
Hide:
frame.topmost().android.activity.getWindow().
getDecorView().setSystemUiVisibility(android.view.View.SYSTEM_UI_FLAG_FULLSCREEN);
Show:
frame.topmost()....
open APP_Resources/values/styles.xml and add the
<item name="android:windowTranslucentStatus">true</item>
in the
<style name="AppThemeBase" parent="Theme.AppCompat.Light.NoActionBar"> </style>
section.
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...
angular.module("app")
.service("counterService", ["fooService", "barService", function(anotherService, barService){
var service = {
number: 0,
foo: function () {
return fooService.bazMethod(); // Use of 'fooService'
...
Data races occur when a piece of memory is updated by one party while another tries to read or update it simultaneously (without synchronization between the two). Let's look at the classic example of a data race using a shared counter.
use std::cell::UnsafeCell;
use std::sync::Arc;
use std::threa...
From the Tools menu, select NuGet Package Manager > Package Manager Console. In the Package Manager Console window, type:
Install-Package Microsoft.AspNet.Odata
This command installs the latest OData NuGet packages.