Tutorial by Examples

First of all you should know that you can extend Android.Application class so you can access two important methods related with app lifecycle: OnCreate - Called when the application is starting, before any other application objects have been created (like MainActivity). OnTerminate - This...
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...
If you would like to get base project with methods described below you can download Xamarin.Android application template from my GitHub. You can find examples for: Application lifecycle methods Activity lifecycle methods Fragment lifecycle methods https://github.com/Daniel-Krzyczkowski/Xamar...
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 ...
For example if the given tree is: Level order traversal will be 1 2 3 4 5 6 7 Printing node data level by level. Code: #include<iostream> #include<queue> #include<malloc.h> using namespace std; struct node{ int data; node *left; node *right; }; ...
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...
// 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]"
// Create a new read-only Map<Integer, String> val map = mapOf(Pair(1, "Item 1"), Pair(2, "Item 2"), Pair(3, "Item 3")) println(map) // prints "{1=Item 1, 2=Item 2, 3=Item 3}"
// Create a new read-only Set<String> val set = setOf(1, 3, 5) println(set) // prints "[1, 3, 5]"
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...
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-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 ...
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...

Page 1111 of 1336