A shell-style pipeline consists of two or more processes, each one with its standard output connected to the standard input of the next. The output-to-input connections are built on pipes. To establish a pipeline-like set of processes, one creates pipe-connected child processes as described in ano...
cURL can keep cookies received in responses for use with subsequent requests. For simple session cookie handling in memory, this is achieved with a single line of code:
curl_setopt($ch, CURLOPT_COOKIEFILE, "");
In cases where you are required to keep cookies after the cURL handle is de...
Example of creating an empty HashTable:
$hashTable = @{}
Example of creating a HashTable with data:
$hashTable = @{
Name1 = 'Value'
Name2 = 'Value'
Name3 = 'Value3'
}
An example of defining a hash table and accessing a value by the key
$hashTable = @{
Key1 = 'Value1'
Key2 = 'Value2'
}
$hashTable.Key1
#output
Value1
An example of accessing a key with invalid characters for a property name:
$hashTable = @{
'Key 1' = 'Value3'
Key2 = 'Val...
An example, to add a "Key2" key with a value of "Value2" to the hash table, using the addition operator:
$hashTable = @{
Key1 = 'Value1'
}
$hashTable += @{Key2 = 'Value2'}
$hashTable
#Output
Name Value
---- -----...
The cluster library contains the ruspini data - a standard set of data for illustrating cluster analysis.
library(cluster) ## to get the ruspini data
plot(ruspini, asp=1, pch=20) ## take a look at the data
hclust expects a distance matrix, not the original data. We ...
With hierarchical clustering, outliers often show up as one-point clusters.
Generate three Gaussian distributions to illustrate the effect of outliers.
set.seed(656)
x = c(rnorm(150, 0, 1), rnorm(150,9,1), rnorm(150,4.5,1))
y = c(rnorm(150, 0, 1), rnorm(150,0,1), rnorm(150,5,1))
...
This package is created to handle server-side works of DataTables jQuery Plugin via AJAX option by using Eloquent ORM, Fluent Query Builder or Collection.
Read more about this here or here
Intervention Image is an open source PHP image handling and manipulation library. It provides an easier and expressive way to create, edit, and compose images and supports currently the two most common image processing libraries GD Library and Imagick.
Read more about this here
Let
df = pd.DataFrame({'col_1':['A','B','A','B','C'], 'col_2':[3,4,3,5,6]})
df
# Output:
# col_1 col_2
# 0 A 3
# 1 B 4
# 2 A 3
# 3 B 5
# 4 C 6
To get the distinct values in col_1 you can use Series.unique()
df['col_1'].unique()
# Output:
...
Get your APIs and Admin Panel ready in minutes.Laravel Generator to generate CRUD, APIs, Test Cases and Swagger Documentation
Read more about this here
Parallel extensions have been introduced along with the Task Parallel Library to achieve data Parallelism. Data parallelism refers to scenarios in which the same operation is performed concurrently (that is, in parallel) on elements in a source collection or array. The .NET provides new constructs t...
When you execute scala in a terminal without additional parameters it opens up a REPL (Read-Eval-Print Loop) interpreter:
nford:~ $ scala
Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_66).
Type in expressions for evaluation. Or try :help.
scala>
The REPL allows ...
Prerequisites
This topic is not about Redux and/or Ngrx :
You need to be comfortable with Redux
At least understand the basics of RxJs and Observable pattern
First, let's define an example from the very beginning and play with some code :
As a developer, I want to :
Have an IUser inter...
Live upcase server that returns error when input string is longer than 10 characters.
Server:
const express = require('express'),
jsonParser = require('body-parser').json(),
app = express();
// Add headers to work with elm-reactor
app.use((req, res, next) => {
res.setHeader...
###### Used for both Classification and Regression examples
library(randomForest)
library(car) ## For the Soils data
data(Soils)
######################################################
## RF Classification Example
set.seed(656) ## for ...
DescriptionCodeAssign immutable int valueval x = 3Assign mutable int valuevar x = 3Assign immutable value with explicit typeval x: Int = 27Assign lazily evaluated valuelazy val y = print("Sleeping in.")Bind a function to a nameval f = (x: Int) => x * xBind a function to a name with expl...
To use an in memory cache in your ASP.NET application, add the following dependencies to your project.json file:
"Microsoft.Extensions.Caching.Memory": "1.0.0-rc2-final",
add the cache service (from Microsoft.Extensions.Caching.Memory) to ConfigureServices method in Startup...
If you have a dataframe with missing data (NaN, pd.NaT, None) you can filter out incomplete rows
df = pd.DataFrame([[0,1,2,3],
[None,5,None,pd.NaT],
[8,None,10,None],
[11,12,13,pd.NaT]],columns=list('ABCD'))
df
# Output:
# A B ...