package MyHiveUDFs;
import org.apache.commons.lang.StringUtils;
import org.apache.hadoop.hive.ql.exec.UDF;
import org.apache.hadoop.io.Text;
public class Strip extends UDF {
private Text result = new Text();
public Text evaluate(Text str) {
if(str == null) {
return null;
}
resul...
class ParentClass
{
[string] $Message = "Its under the Parent Class"
[string] GetMessage()
{
return ("Message: {0}" -f $this.Message)
}
}
# Bar extends Foo and inherits its members
class ChildClass : ParentClass
{
}
$Inherit = [ChildClass...
From Java 8 onwards, the Lambda operator ( -> ) is the operator used to introduce a Lambda Expression. There are two common syntaxes, as illustrated by these examples:
Java SE 8
a -> a + 1 // a lambda that adds one to its argument
a -> { return a + 1; } // an equivalen...
Naturally, being able to install hard drive cloning utilities can be an important aspect of installing and maintaining your operating system.
Getting set up with Clonezilla is surprisingly less straightforward than I'd have expected. The wealth of options, while valuable, also makes each part of id...
Make sure you link the Angular and Angular Material libraries!
index.html:
<html ng-app="mdButtonApp">
<head>
<!-- Import Angular -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>...
This example will be using the class md-icon-button, which must be applied to <md-button> in order to get an icon button.
It is also recommended to add an aria-label attribute to <md-button> for accessibility purpose or the ARIA provider will throw a warning that there is no aria-labe...
Starting with version 3.2 of the ArcGIS API for JavaScript, developers must include an additional Cascading Style Sheet (CSS) file: esri.css.
The URL for this file is:
// versions 3.11 and forward
<link rel="stylesheet" href="https://js.arcgis.com/API-VERSION/esri/css/esri.css&...
The esri.css file does not include the CSS for various Dojo widgets or themes like tundra or claro; those files must be included separately. Exceptions are the Grid and RangeSlider, which are used by widgets in the API. Grid styles must be explicitly included.
For instance, this CSS file would be i...
Let's take this example without using generics
protocol JSONDecodable {
static func from(_ json: [String: Any]) -> Any?
}
The protocol declaration seems fine unless you actually use it.
let myTestObject = TestObject.from(myJson) as? TestObject
Why do you have to cast the result to T...
Introduction
When working with various libraries and their associated requirements, it is often necessary to know the version of current PHP parser or one of it's packages.
This function accepts a single optional parameter in the form of extension name: phpversion('extension'). If the extension in...
Informats are used to tell SAS how to read in the data and are identified with an informat statement.
data test;
infile test.csv;
informat id $6.
date mmddyy10.
cost comma10.2
;
input @1 id
@7 date
@20 cost
;
run;
Informats and Format...
Keras is a high-level neural networks library, written in Python and capable of running on top of either TensorFlow or Theano. It was developed with a focus on enabling fast experimentation. Being able to go from idea to result with the least possible delay is key to doing good research.
Use Keras ...
If for some reason, the default PowerShell module repository PSGallery gets removed. You will need to create it. This is the command.
Register-PSRepository -Default