Tutorial by Examples: c

Activity lifecycle is quite more complex. As you know Activity is single page in the Android app where user can perform interaction with it. On the diagram below you can see how Android Activity lifecycle looks like: As you can see there is specific flow of Activity lifecycle. In the mobile appl...
As you know you can have one activity but different fragments embedded in it. That is why fragment lifecycle is also important for developers. On the diagram below you can see how Android fragment lifecycle looks like: As described in the official Android documentation you should implement at le...
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...
Glass.Mapper.Sc allows you to move your data from Sitecore and into your code seamlessly using strongly typed objects. The framework allows you to map data on to c# classes and interfaces without any additional mark-up. As the data is mapped to your target objects it is converted to the target type...
Visual Basic for Applications (VBA) is the macro language behind all Microsoft Office products and is essentially identical across all Office products. What differs from product to product is the Object model. Excel has workbooks, worksheets and cells. Access has tables and attributes. Outlook h...
JdbcTemplate also provides convenient methods to execute batch operations. Batch Insert final ArrayList<Student> list = // Get list of students to insert.. String sql = "insert into student (id, f_name, l_name, age, address) VALUES (?, ?, ?, ?, ?)" jdbcTemplate.batchUpdate(sql, n...
CIDER function cider-eval-last-sexp can be used to execute the the code while editing the code inside the buffer. This function is by default binded to C-x C-e or C-x C-e. CIDER manual says C-x C-e or C-c C-e will: Evaluate the form preceding point and display the result in the echo area and/or ...
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...
You can create a Sequential model by passing a list of layer instances to the constructor: from keras.models import Sequential from keras.layers import Dense, Activation model = Sequential([ Dense(32, input_dim=784), Activation('relu'), Dense(10), Activation('softmax'), ]) ...
The idea is to measure a layout before and after each change and if there is a significant change you can be somewhat certain that its the softkeyboard. // A variable to hold the last content layout hight private int mLastContentHeight = 0; private ViewTreeObserver.OnGlobalLayoutListener keyboa...
P( glasses | reading ) = Count( reading glasses ) / Count( reading ) We count the sequences reading glasses and glasses from corpus and compute the probability.
//MySingletonClass.h @interface MYSingletonClass : NSObject + (instancetype)sharedInstance; -(instancetype)init NS_UNAVAILABLE; -(instancetype)new NS_UNAVAILABLE; @end //MySingletonClass.m @implementation MySingletonClass + (instancetype)sharedInstance { static MySingleto...
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...
Clone the repository Place a copy of your Sitecore.Kernel.dll assembly in /lib/sitecore/v7 (for v7/v8) Build the project for your Sitecore version using Visual Studio 2012 or later Copy Unicorn.dll, Rainbow.dll, Rainbow.Storage.Sc.dll, Rainbow.Storage.Yaml.dll and Kamsar.WebConsole.dll to your ...
There are two components to the Unicorn data provider: the database-specific implementation, and the Unicorn implementation. The Unicorn implementation is an individual configuration of Unicorn dependencies that get automatic serialization. For example, if you were serializing two presets you'd nee...

Page 691 of 826