Tutorial by Examples: n

Function Send-TCPMessage { Param ( [Parameter(Mandatory=$true, Position=0)] [ValidateNotNullOrEmpty()] [string] $EndPoint , [Parameter(Mandatory=$true, Position=1)] [int] $Port , ...
Some websites don’t like to be scraped. In these cases you may need to simulate a real user working with a browser. Selenium launches and controls a web browser. from selenium import webdriver browser = webdriver.Firefox() # launch firefox browser browser.get('http://stackoverflow.com/questi...
To get a difference between two Calendars, use getTimeInMillis() method: Calendar c1 = Calendar.getInstance(); Calendar c2 = Calendar.getInstance(); c2.set(Calendar.DATE, c2.get(Calendar.DATE) + 1); System.out.println(c2.getTimeInMillis() - c1.getTimeInMillis()); //outputs 86400000 (24 * 60 * ...
The Abstract Factory Pattern is a creational design pattern that can be used to define specific instances or classes without having to specify the exact object that is being created. function Car() { this.name = "Car"; this.wheels = 4; } function Truck() { this.name = "Truck"; ...
template <class InputIterator, class UnaryPredicate> InputIterator find_if (InputIterator first, InputIterator last, UnaryPredicate pred); Effects Finds the first element in a range for which the predicate function pred returns true. Parameters first => iterator pointing to the begin...
Detailed instructions on getting pyspark set up or installed.
var record = nlapiCreateRecord('task'); record.setFieldValue('title', taskTitle); var id = nlapiSubmitRecord(record, true);
"MySQL Cluster" disambiguation... NDB Cluster -- A specialized, mostly in-memory, engine. Not widely used. Galera Cluster aka Percona XtraDB Cluster aka PXC aka MariaDB with Galera. -- A very good High Availability solution for MySQL; it goes beyond Replication. See individual page...
There are two ways to use MaterializeCSS, either you can download the files on your system or use the files from CDN (Content Delivery Network). Download files Download the Materialize Package. Download the Materialize SASS Package. Install via NPM: npm install materialize-css Install via Bow...
// Usage: drawLineWithArrows(50,50,150,50,5,8,true,true); // x0,y0: the line's starting point // x1,y1: the line's ending point // width: the distance the arrowhead perpendicularly extends away from the line // height: the distance the arrowhead extends backward from the endpoint // arrow...
// Usage: var arc={ cx:150, cy:150, innerRadius:75, outerRadius:100, startAngle:-Math.PI/4, endAngle:Math.PI } drawArc(arc,'skyblue','gray',4); function drawArc(a,fill,stroke,strokewidth){ ctx.beginPath(); ctx.arc(a.cx,a.cy,a.innerRadius,a.startAngle,a.endAngle); ...
When Canvas draws a line it automatically adds anti-aliasing to visually heal "jaggedness". The result is a line that is less jagged but more blurry. This function draws a line between 2 points without anti-aliasing using Bresenham's_line algorithm. The result is a crisp line without the ...
A regular polygon has all sides equal length. // Usage: drawRegularPolygon(3,25,75,50,6,'gray','red',0); drawRegularPolygon(5,25,150,50,6,'gray','gold',0); drawRegularPolygon(6,25,225,50,6,'gray','lightblue',0); drawRegularPolygon(10,25,300,50,6,'gray','lightgreen',0); function drawRegular...
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> <s:Label text="Hello World!&...
adb devices Is your phone displaying? If not, enable developer mode on your phone, and connect it by USB. adb reverse tcp:8081 tcp:8081 : In order to link correctly your phone and that React-Native recognize him during build. (NOTE:Android Version 5 or above.) react-native run-andr...
Before you start the cherry-pick process, you can check if the commit you want to cherry-pick already exists in the target branch, in which case you don't have to do anything. git branch --contains <commit> lists local branches that contain the specified commit. git branch -r --contains <...
Bounded type parameters allow you to set restrictions on generic type arguments: class SomeClass { } class Demo<T extends SomeClass> { } But a type parameter can only bind to a single class type. An interface type can be bound to a type that already had a binding. This is achieve...
Create a Java class which extends org.apache.hadoop.hive.ql.exec.hive.UDAF Create an inner class which implements UDAFEvaluator Implement five methods init() – This method initializes the evaluator and resets its internal state. We are using new Column() in the code below to indicate th...
Another example is a MULTILINE modifier (usually expressed with m flag (not in Oniguruma (e.g. Ruby) that uses m to denote a DOTALL modifier)) that makes ^ and $ anchors match the start/end of a line, not the start/end of the whole string. /^My Line \d+$/gm will find all lines that start with My...
The common modifier to ignore case is i: /fog/i will match Fog, foG, etc. The inline version of the modifier looks like (?i). Notes: In Java, by default, case-insensitive matching assumes that only characters in the US-ASCII charset are being matched. Unicode-aware case-insensitive matching c...

Page 575 of 1088