Tutorial by Examples: ect

A cycle in a directed graph exists if there's a back edge discovered during a DFS. A back edge is an edge from a node to itself or one of the ancestors in a DFS tree. For a disconnected graph, we get a DFS forest, so you have to iterate through all vertices in the graph to find disjoint DFS trees. ...
Default behavior is to de-select row when clicked twice. In some use cases, you might want to disable this de-selecting behavior. Note table.deselectItem(item) method will imperatively deselect an item. This works with both item or index (when using items array) as an argument. Working jsBin &lt...
Since Nightwatch has access to the browser console, it's possible to inspect client side objects using the .execute() API. In the following example, we're checking the Session object for a particular session variable. First, we begin by creating the file ./tests/nightwatch/api/meteor/checkSession...
Page Objects are similar to Custom Commands; except they are collections of custom commands that are associated with a specific UI component. This works extremely well with modern component based design, such as in React. module.exports = { url: 'http://localhost:3000/login', commands: [{ ...
First, we need a custom endpoint builder. public class WSConfigurator extends ServerEndpointConfig.Configurator { @Inject private static Injector injector; @Override public <T> T getEndpointInstance(Class<T> endpointClass) throws InstantiationException { ...
String jsonStr = "{\"name\" : \"Abcd\", \"greeting\": \"Hello\", }"; //Sample Json String Gson gson = new Gson(); // Creates new instance of Gson JsonElement element = gson.fromJson (jsonStr, JsonElement.class); //Converts the json string to Json...
I find that the examples in the docker inspect documentation seem magic, but do not explain much. Docker inspect is important because it is the clean way to extract information from a running container docker inspect -f ... container_id (or all running container) docker inspect -f ... $(docker p...
const r = require("rethinkdb"); r.connect({host: 'localhost', port: 28015}, (conn) => console.log(conn)) // Or as a promise let rdb_conn; r.connect({host: 'localhost', port: 28015}).then((conn) => { rdb_conn = conn; }).then(() => { // Continue to use rdb_conn }); ...
How to implement FirebaseRealTime database in android application. Following is the steps for do it. First install firebase sdk, If you dont know how to install then following is the URL for help. Install Firebase SDK After thet register your project in firbase console, URL of the firbas...
public ActionResult Index() { //Redirects to another action method by using its URL. return new RedirectResult("http://www.google.com"); } Action methods typically return a result that is known as an action result. The ActionResult class is the base class for all action resu...
public ActionResult PopulateFoods() { // Redirects to another action method. In this case the index method return RedirectToAction("Index"); } Action methods typically return a result that is known as an action result. The ActionResult class is the base class for all action ...
Let's say you don't want the fields houseNum and street in the address field of the final populated doc, use the populate() as follows, Person.findOne({_id: req.params.id}) .populate('address', '-houseNum -street') // note the `-` symbol .exec(function(err, person) { // do somet...
var renderer = Platform.GetRenderer(visualElement); if (renderer == null) { renderer = Platform.CreateRenderer(visualElement); Platform.SetRenderer(visualElement, renderer); } DoSomeThingWithRender(render); // now you can do whatever you want with render
XML <House> <numRooms>4</numRooms> <Floor number="1"> <Room name="living"/> <Room name="kitchen"/> </Floor> <Floor number="2"> <Room name="master bedroom&qu...
Sample XML <Students> <Student> <Name> <First>Ashley</First> <Last>Smith</Last> </Name> <Grades> <Exam1>A</Exam1> <Exam2>B</Exam2> ...
Sample XML <Students> <Student> <Name> <First>Ashley</First> <Last>Smith</Last> </Name> <Grades> <Exam1>A</Exam1> <Exam2>B</Exam2> ...
ML Transformers now generates org.apache.spark.ml.linalg.VectorUDT instead of org.apache.spark.mllib.linalg.VectorUDT. They are also mapped locally to subclasses of org.apache.spark.ml.linalg.Vector. These are not compatible with old MLLib API which is moving towards deprecation in Spark 2.0.0. //...
package com.example.domain; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; //simple person object with JPA annotations @Entity public class Person { @Id @GeneratedValue(strategy=GenerationType.AUTO) private Long id; ...
shopt -q login_shell && echo 'login' || echo 'not-login'
This can be done in 3 steps : You must define an elixir module which use Ecto.Repo and register your app as an otp_app. defmodule Repo do use Ecto.Repo, otp_app: :custom_app end You must also define some config for the Repo which will allow you to connect to the database. Here is an...

Page 67 of 99