An expression in Scheme is what is going to get executed. A S-expression, as it's usually called starts with a ( and end with a ). The first member of the expression is what is going to get executed. The following member of the expression are the parameters that will be sent to the expression during...
from neo4jrestclient.client import GraphDatabase
db = GraphDatabase("http://localhost:7474", username="neo4j", password="mypass")
Warning: this is not the standard way of installing Coq.
For users of Linux (and MacOS) who wish to gain access to up-to-date versions of Coq or to be able to use several versions of Coq on the same machine, without the hassle of using opam, and without having to compile from source, this is an alt...
SciPy provides basic image manipulation functions. These include functions to read images from disk into numpy arrays, to write numpy arrays to disk as images, and to resize images.
In the following code, only one image is used. It is tinted, resized, and saved. Both original and resulting images a...
.NET Core project.json supports NuGet importing (a.k.a. lying according to this SO answer). It is impossible to include a mscorlib based library due to an import statement.
{
"version": "1.0.0-*",
"dependencies": {
"Microsoft.AspNet.Identity.E...
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, ...
SELECT val
FROM (SELECT val, rownum AS rnum
FROM (SELECT val
FROM rownum_order_test
ORDER BY val)
WHERE rownum <= :upper_limit)
WHERE rnum >= :lower_limit ;
this way we can paginate the table data , just like web serch page
Before creating any extension, always check if it has already been implemented.
The first thing one would have to do is define the extension class which will house the twig filters and/or functions.
<?php
namespace AppBundle\Twig;
class DemoExtension extends \Twig_Extension {
/**
...
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...
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...
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...
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...
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]
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...