Tutorial by Examples

This is a minimal tsconfig to get you up and running. { "include": [ "src/*" ], "compilerOptions": { "target": "es5", "jsx": "react", "allowSyntheticDefaultImports": tr...
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; interface AppProps { name: string; } interface AppState { words: string[]; } class App extends Component<AppProps, AppState> { constructor() { super(); this.state = { ...
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...
Detailed instructions on getting validation set up or installed.
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...
This is an enumeration for const creation. Go compiler starts iota from 0 and increments by one for each following constant. The value is determined at compile time rather than run time. Because of this we can't apply iota to expressions which are evaluated at run time. Program to use iota in cons...
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...
It's possible to have multiple .NET Core SDKs and Runtimes available on disk. You can select the versions for each separately. To select the version of the SDK to use, use global.json. To select the version of the shared framework to use, target the specified framwork in the .csproj file (or proj...
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...
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...
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...
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...
Minimal example based on PHP manual example found here: http://php.net/manual/en/sockets.examples.php Create a websocket script that listens to Port 5000 Use putty, terminal to run telnet 127.0.0.1 5000 (localhost). This script replies with the message you sent (as a ping-back) <?php set_ti...
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 ...

Page 1204 of 1336