Tutorial by Examples: ti

Linked list representation is more efficient in terms of memory managerment. Code to show enqueue and deque in a Queue using Linklist in O(1) time. #include<stdio.h> #include<malloc.h> struct node{ int data; node* next; }; node* front = NULL; node* rear = NULL; vo...
Detailed instructions on getting gstreamer set up or installed.
struct tree{ int a; tree* right; tree* left; }; tree* root=NULL; void insert(tree*& in, int b){ if(in){ if(in->a<b) insert(in->right,b); else if(in->a>b) insert(in->left,b); ...
A Vector3 structure can be created in several ways. Vector3 is a struct, and as such, will typically need to be instantiated before use. Constructors There are three built in constructors for instantiating a Vector3. ConstructorResultnew Vector3()Creates a Vector3 structure with co-ordinates of...
Setup ActiveMQ Download a ActiveMQ distribution from activemq.apache.org and unpack it somewhere You can start the server immediately, running unsecured on localhost, using the script bin/activemq When it is running, you can access your local server's console on http://localhost:8161/admin/ Co...
Android Apps are written in Java. The Android SDK tools compile the code, data and resource files into an APK (Android package). Generally, one APK file contains all the content of the app. Each app runs on its own virtual machine(VM) so that app can run isolated from other apps. Android system wor...
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...
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...
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; }; ...
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 ...
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'), ]) ...
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.
//MySingletonClass.h @interface MYSingletonClass : NSObject + (instancetype)sharedInstance; -(instancetype)init NS_UNAVAILABLE; -(instancetype)new NS_UNAVAILABLE; @end //MySingletonClass.m @implementation MySingletonClass + (instancetype)sharedInstance { static MySingleto...
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...

Page 417 of 505