platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
var url= "https://blog.knoldus.com/";
var browserRef = window.cordova.InAppBrowser.open(url, &qu...
Instead of this (unfortunately too often seen in the real code) "masterpiece":
function isEven(n) {
return n % 2 == 0;
}
function isOdd(n) {
if (isEven(n)) {
return false;
} else {
return true;
}
}
You can do the parity check much more effecti...
This is especially useful if we have a class that we want to extend in the rule. See example below for a more convenient method.
import org.junit.rules.TestRule;
import org.junit.runners.model.Statement;
public class AwesomeTestRule implements TextRule {
@Override
public Stateme...
JUnit has an abstract implementation of @TestRule that lets you write a rule in a more simpler way. This is called ExternalResource and provides two protected methods that can be extended like this:
public class AwesomeTestRule extends ExternalResource {
@Override
protected void befor...
Add the hyperloop gem to your rails (4.0 - 5.1) Gemfile
bundle install
Add the hyperloop manifest to the application.js file:
// app/assets/javascripts/application.js
...
//= hyperloop-loader
Create your react components, and place them in the hyperloop/components directory
# app/hyperl...
# all react callbacks are supported using active-record-like syntax
class SomeCallBacks < Hyperloop::Component
before_mount do
# initialize stuff - replaces normal class initialize method
end
after_mount do
# any access to actual generated dom node, or window behaviors goes ...
To find your existing .cs files, right click on the project in your instance of Visual Studio, and click Open Folder in File Explorer.
Visual Studio --> Your current project (Windows Form) --> Solution Explorer --> Project Name --> Right Click --> Add --> Existing Item --> ...
The TestProducerfrom this example produces Integerobjects in a given range and pushes them to its Subscriber. It extends the Flowable<Integer> class. For a new subscriber, it creates a Subscription object whose request(long) method is used to create and publish the Integer values.
It is impor...
Required External Jar: mysql-connector-java-5.1.40-bin.jar to connect to Data Base.
Add this jar by right clicking the project -->Build Path--> Add external Archieve.
Create the Flow as Flowing
2) Database Connector Configuration:
Select MySQL as your database by double clicking the Data...
Step1 Message Flow:
[![enter image description here][1]][1]
Step 2: Databse Connector Configuration
For this you need mysql-connector-java-5.1.40-bin.jar .
Right click on Project -->build Path--> Add external archieve and add the jar(without jar it cannot be connected)
Enter all the value...
#pragma strict
import UnityEngine.Advertisements;
#if !UNITY_ADS // If the Ads service is not enabled
public var gameId : String; // Set this value from the inspector
public var enableTestMode : boolean = true; // Enable this during development
#endif
function InitializeAds () // Example o...
GitHub Flavored Markdown (sometimes abbreviated to GFM) makes it easier to work with markdown on GitHub.com.
Key features of GFM include:
code indentation
task list support
easy GitHub issue referencing
automatic GitHub username and SHA detection
automatic url detection
emoji support
GFM...
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Route, BrowserRouter as Router, Link } from 'react-router-dom';
class Home extends React.Component<any, any> {
render() {
return (
<div>
<div>HOME</div>
<d...
This example shows how to embed some basic C# into a PowerShell script, add it to the runspace/session and utilise the code within PowerShell syntax.
$code = @"
Imports System
Namespace MyNameSpace
Public Class Responder
Public Shared Sub StaticRespond()
Console....
Router enables navigation from one view to another based on user interactions with the application.
Following are the steps in implementing basic routing in Angular -
NOTE: Ensure you have this tag:
<base href='/'>
as the first child under your head tag in your index.html file. This ele...
The following example demonstrates a simple HTTP GET request. http.get() returns an Observable which has the method subscribe. This one appends the returned data to the posts array.
var posts = []
getPosts(http: Http): {
this.http.get(`https://jsonplaceholder.typicode.com/posts`)
....