Tutorial by Examples: cycle

Data saved to TempData is stored in the session and will be automatically removed at the end of the first request where the data is accessed. If never read, it will be kept until finally read or the session times out. The typicaly usage looks like the following sequence (where each line is invoked ...
Checking whether the current date contains the symbol for AM or PM Objective-C NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setLocale:[NSLocale currentLocale]]; [formatter setDateStyle:NSDateFormatterNoStyle]; [formatter setTimeStyle:NSDateFormatterShortStyle]; NSStr...
Every Windows Phone project contains App.cs class: public sealed partial class App : Application This class is your global application context. General Application class usage: App entry point, particularly for various activation contracts. Application lifecycle management. Application g...
Following are the page life cycle events: PreInit - PreInit is the first event in page life cycle. It checks the IsPostBack property and determines whether the page is a postback. It sets the themes and master pages, creates dynamic controls, and gets and sets profile property values. This event ca...
Here is a generic ViewHolder class that you can use with any DataBinding layout. Here an instance of particular ViewDataBinding class is created using the inflated View object and DataBindingUtil utility class. import android.databinding.DataBindingUtil; import android.support.v7.widget.RecyclerVi...
To add a Swipe To Refresh layout with a RecyclerView add the following to your Activity/Fragment layout file: <android.support.v4.widget.SwipeRefreshLayout android:id="@+id/refresh_layout" android:layout_width="match_parent" android:layout_height="match_pa...
Setup variables JUSERID=$[ ( $RANDOM % 100 ) + 1 ] JUSERNAME="admin" JUSEREMAIL="[email protected]" JUSERPASS="qweasd" DB="joomla_3" DBUSER="jdbuser" DBPASS="dbupass" DBPREFIX="prfx_" JOOMLAVERSION="3.6.2" ...
This example serves as a complement to other examples which talk about how to use the lifecycle methods and when the method will be called. This example summarize Which methods (componentWillMount, componentWillReceiveProps, etc) will be called and in which sequence will be different for a componen...
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. ...
The RxLifecycle library makes it easier binding observable subscriptions to Android activities and fragment lifecycle. Keep in mind that forgetting to unsubscribe an Observable can cause memory leaks and keeping your activity / fragment alive event after it has been destroyed by the system. Add th...
Before reading this example, it is required to have a brief idea on edge-relaxation. You can learn it from here Bellman-Ford Algorithm is computes the shortest paths from a single source vertex to all of the other vertices in a weighted digraph. Even though it is slower than Dijkstra's Algorithm, i...
To understand this example, it is recommended to have a brief idea about Bellman-Ford algorithm which can be found here Using Bellman-Ford algorithm, we can detect if there is a negative cycle in our graph. We know that, to find out the shortest path, we need to relax all the edges of the graph (V-...
Cycle Sort is sorting algorithm which uses comparison sort that is theoretically optimal in terms of the total number of writes to original array, unlike any other in-place sorting algorithm. Cycle sort is unstable sorting algorithm. It is based on idea of permutation in which permutations are facto...
Here I have shared a code snippet for implementing endless scrolling in recycle view. Step 1: First make a one abstract method in Recycleview adapter like below. public abstract class ViewAllCategoryAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { public abstract void lo...
Data is usually perceived as something static that is entered into a database and later queried. But in many environments, data is actually more similar to a product in an assembly line, moving from one environment to another and undergoing transformations along the way. ■ OLTP: online transactio...
Lets have a look at the native app lifecycle methods for different platforms. Android. //Xamarin.Forms.Platform.Android.FormsApplicationActivity lifecycle methods: protected override void OnCreate(Bundle savedInstanceState); protected override void OnDestroy(); protected override void OnPause()...
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...
Hello friends before start code we have need to declare dependency for access firebase ui component, so here is the dependency which you can put it in your gradel other wise you can add dependency as jar also. compile 'com.firebaseui:firebase-ui-database:0.4.0' Then after we are querying in fire...

Page 2 of 3