What is Kibana:
Kibana is used for making visualizations and creating dashboards for the indexes presented in elasticsearch. Basically, it is an open source plug-in for elasticsearch.
There are Six Tabs:
Discover:
You can explore your data from Discover tab
Visulization:
Creating v...
Consider the Binary Tree:
Pre-order traversal(root) is traversing the node then left sub-tree of the node and then the right sub-tree of the node.
So the pre-order traversal of above tree will be:
1 2 4 5 3 6 7
In-order traversal(root) is traversing the left sub-tree of the node then the node ...
// Create a new read-only List<String>
val list = listOf("Item 1", "Item 2", "Item 3")
println(list) // prints "[Item 1, Item 2, Item 3]"
You can pass parameters by Bundle:
Bundle myBundle = new Bundle();
myBundle.putString(MY_KEY, myValue);
Get the value in onCreateLoader:
@Override
public Loader<String> onCreateLoader(int id, final Bundle args) {
final String myParam = args.getString(MY_KEY);
...
}
CIDER function cider-insert-last-sexp-in-repl can be used to execute the the code while editing the code inside the buffer and get the output pretty printed in a different buffer. This function is by default binded to C-c C-p.
CIDER manual says C-c C-p will
Evaluate the form preceding point and ...
Consider the tree:
Lowest common ancestor of nodes with value 1 and 4 is 2
Lowest common ancestor of nodes with value 1 and 5 is 3
Lowest common ancestor of nodes with value 2 and 4 is 4
Lowest common ancestor of nodes with value 1 and 2 is 2
For example if the inputs are:
Example:1
a)
b)
Output should be true.
Example:2
If the inputs are:
a)
b)
Output should be false.
Pseudo code for the same:
boolean sameTree(node root1, node root2){
if(root1 == NULL && root2 == NULL)
return true;
if(root1 == NULL ...
The core data structure of Keras is a model, a way to organize layers. The main type of model is the Sequential model, a linear stack of layers. For more complex architectures, you should use the Keras functional API.
Here's the Sequential model:
from keras.models import Sequential
model = Sequ...
Usually, an HTML form element submitted to PHP results in a single value. For example:
<pre>
<?php print_r($_POST);?>
</pre>
<form method="post">
<input type="hidden" name="foo" value="bar"/>
<button type="su...
One of the ways to think about the commands that should be executed, to edit a text in a certain manner, is as entire sentences.
A command is an action performed on an object. Therefore it has a verb:
:normal i " insert
:normal a " append
:normal c " overwrite
:normal y ...
P( glasses | reading ) = Count( reading glasses ) / Count( reading )
We count the sequences reading glasses and glasses from corpus and compute the probability.
The following would work in IE9+
import React from 'react'
class App extends React.Component {
constructor () {
super()
this.state = {someData: null}
}
componentDidMount () {
var request = new XMLHttpRequest();
request.open('GET', '/my/url', true);
request...
Consider the BST:
Lowest common ancestor of 22 and 26 is 24
Lowest common ancestor of 26 and 49 is 46
Lowest common ancestor of 22 and 24 is 24
Binary search tree property can be used for finding nodes lowest ancestor
Psuedo code:
lowestCommonAncestor(root,node1, node2){
if(root == NULL) ...
This example demonstrates how to install Tomcat as a service on Ubuntu using the *.tar.gz releases of both Tomcat as well as Java.
1. Install the Java Runtime Environment (JRE)
Download the desired jre .tar.gz release
Extract to /opt/
This will create a directory /opt/jre1.Xxxx/
Create a sym...
This method allows non-implementation-specific code to be written and deployed across multiple jms platforms. Below basic example connects to activemq jms server and sends a message.
import java.util.Properties;
import javax.jms.JMSException;
import javax.jms.Queue;
import javax.jms.QueueConne...
PDO::setAttribute sets an attribute on the database handle.
Desctiption of setAttribute is:
public bool PDO::setAttribute ( int $attribute , mixed $value )
PDO::ATTR_ERRMODE: This attribute is used for error reporting. It can have one of the following values.
PDO::ERRMODE_SILENT: If the ATTR...