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...
This example will demonstrate how to get started with Firebase in your web apps with JavaScript.
We are going to add a text child in our Firebase Database and display it in realtime on our web app.
Lets get started.
Go to the Firebase Console - https://console.firebase.google.com and create a...
Opening a browser with to() method.
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
class navigateWithTo{
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.navigate().to("http://www.example.com...
Sample Data
XML Document
First, let's define a sample XML document named "books.xml" in our current directory:
<?xml version="1.0" encoding="UTF-8"?>
<books>
<book>
<title>Of Mice And Men</title>
<author>Joh...
Each .NET Core component (SDK, Host and Shared Framework) is versioned independently.
You can find the version for each of them separately.
SDK
You can use the --version option to dotnet to see the SDK
version. For example:
$ ~/dotnet-1.1.1/dotnet --version
1.0.0-preview2-1-003176
dotne...
This example expects an error, as the hello-world bucket already exists and S3 uses a global namespace.
New-S3Bucket -BucketName "hello-world"
New-S3Bucket : The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a dif...
This is a more flexible alternative to thread first or thread last. It can be inserted anywhere in the list of parameters of the function.
(as-> [1 2] x
(map #(+ 1 %) x)
(if (> (count x) 2) "Large" "Small"))
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...
You can use any name for the function.
function custom_postype(){
register_post_type('cus_post',array(
'labels'=>array(
'name'=>'khaiyam'// Use any name you want to show in menu for your users
),
'public'=>true,// **Must required
...
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...
Each watchOS target includes an App and an Extension. App contains the UI stuff and Extension contains the actual logic (similar to Views and Models in MVC architecture in iOS).
Each WatchKit App has a Interface.storyboard file which you design the app in it, and a Assets.xcassets file to put your ...
Like iOS where you use @IBOutlet and @IBAction, here you could use them too.
Let's say we have a button which when clicked changes the label's text to something else.
To get started:
Add a WKInterfaceLabel and a WKInterfaceLabel to the InterfaceController.
Ctrl-Drag from the WKInterfaceL...
Many watchOS apps (like Activity) have several pages which you could simply scroll between them, which is a very good way to use Apple Watch.
To create a page based navigation, Ctrl-Drag from one controller to another, and select "next page", as shown in the following picture:
SELECT e.emp_id , e.first_name , e.last_name FROM employees e INNER JOIN managers m ON m.mgr_id = e.mgr_id WHERE m.mgr_id = 'M01' ;
Results in:
EMP_IDFIRST_NAMELAST_NAMEE02ErinMacklemoreE04RonSonswan
Ultimately, for every manager we query for, we will see 1 or more employees returned.
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/...
Another way to parametrize your performance scripts is to use database data through JDBC. JDBC is an application programming interface that defines how a client can access a database.
First of all, download the JDBC driver to your database (refer to the database vendor). For example, mysql driver c...
If you need to execute a repeating sequence of the same action with different parameters, use the ‘Parameterized Controller’ 3rd party plugin from JMeter-Plugins project.
You need to install this plugin first by following installation procedure.
Let’s assume that we want to parameterize the login ...