Tutorial by Examples: al

$BucketName = 'trevorrekognition' ### Create a new AWS S3 Bucket New-S3Bucket -BucketName $BucketName ### Upload two different photos of myself to AWS S3 Bucket Write-S3Object -BucketName $BucketName -File myphoto1.jpg Write-S3Object -BucketName $BucketName -File myphoto2.jpg ### Perform...
var Human = function() { this.canWalk = true; this.canSpeak = true; // }; Person.prototype.greet = function() { if (this.canSpeak) { // checks whether this prototype has instance of speak this.name = "Steve" console.log('Hi, I am ' + this.name); } else{ c...
/// <summary> /// Defines a student. /// </summary> [DataContract] public class Student { /// <summary> /// Gets or sets the student number. /// </summary> [DataMember] public string StudentNumber { get; set; } /// <summary> ///...
Below code represents an example of Opt-Out approach using Serializable and NonSerialized attributes. /// <summary> /// Represents a student. /// </summary> [Serializable] public class Student { /// <summary> /// Gets or sets student number. /// </summary&gt...
This will be our example data frame: color name size 0 red rose big 1 blue violet small 2 red tulip small 3 blue harebell small Accessing a single column from a data frame, we can use a simple comparison == to compare every element in the column to the given...
This will be our example data frame: color size name rose red big violet blue small tulip red small harebell blue small We can create a mask based on the index values, just like on a column value. rose_mask = df.index == 'rose' df[rose_mask...
Detailed instructions on getting validation set up or installed.
Lightweight simple translation module with dynamic json storage. Supports plain vanilla node.js apps and should work with any framework (like express, restify and probably more) that exposes an app.use() method passing in res and req objects. Uses common __('...') syntax in app and templates. Stores...
To use Autofac in your project, all you have to do is install Autofac from NuGet Package Manager. Open the solution that want to use Autofac in, then select Manager NuGet Packages for Solution... by going to: Tools -> NuGet Package Manager -> Manager NuGet Packages for Solution... In the N...
Validating the Name entered by a User contain the following check Ensure it is not empty Ensure it contain only alphabets, space and/or dot. So, the regular expression for this is ^[A-Z][a-z]*(\.?\s?[A-Z][a-z]*)+$ This means ^ -> Should start with [A-Z] -> the first lette...
Let's take the Range is from 18 to 80. So, to validate, We should check that the age is a positive integer. Then check it should be greater than or equal to 18 and less than or equal to 80. The test to check whether it is a number or not can be performed by a simple regular expression like ^[0-...
Sometimes, we have to take input from users which should contain only alpha numeric characters. For example, lets say a Username system which allow only letters and numbers, Then this can be done with the following Regular Expression ^[a-zA-Z0-9]+$ ^ is restrict the start [a-zA-Z0-9]+ is th...
To call the QML classes in C++, you need to set the objectName property. In your Qml: import QtQuick.Controls 2.0 Button { objectName: "buttonTest" } Then, in your C++, you can get the object with QObject.FindChild<QObject*>(QString) Like that: QQmlApplicationEngine e...
Many watchOS apps (like Workout, Weather, Music, etc) have a main WKInterfaceTable or a set of buttons which are hooked up to another controller, similar to the navigation on iOS. This is called hierarchical view structure. To connect a button, Ctrl-Drag from the button to a controller, and select ...
You finished your app, tested on debug mode and it is working perfect. Now, you want to prepare it to publish in the Google Play Store. Xamarin documentation provides good informations in here: https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/publishing_an_application/...
One of the common ways to parametrize your performance scripts is to use a CSV file. The best example of CSV input files usage is a login process. If you want to test your application across different users, you need to provide a list of user credentials. Let’s assume that we have a login request t...
Introduction Put simply, these are variables that are available in all scope in your scripts. This means that there is no need to pass them as parameters in your functions, or store them outside a block of code to have them available in different scopes. What's a superglobal?? If you're thinki...
See this example here. import React, { Component } from 'react'; import { Text, View, StyleSheet, Button, Modal } from 'react-native'; import { Constants } from 'expo'; export default class App extends Component { state = { modalVisible: false, }; _handleButtonPress = () =&gt...
Multiple database connections, of any type, can be defined inside the database configuration file (likely app/config/database.php). For instance, to pull data from 2 MySQL databases define them both separately: <?php return array( 'default' => 'mysql', 'connections' => array...
When applied on a map, returns a new map with new or updated key val pairs. It can be used to add new information in existing map. (def userData {:name "Bob" :userID 2 :country "US"}) (assoc userData :age 27) ;; { :name "Bob" :userID 2 :country "US&qu...

Page 241 of 269