Tutorial by Examples: donc

First of all, implement your view holder: implements View.OnClickListener, View.OnLongClickListener Then, register the listeners as follows: itemView.setOnClickListener(this); itemView.setOnLongClickListener(this); Next, override the listeners as follows: @Override public void onClick(Vie...
Angular has reputation for having awesome bidirectional data binding. By default, Angular continuously synchronizes values bound between model and view components any time data changes in either the model or view component. This comes with a cost of being a bit slow if used too much. This will hav...
If we have a Model as following, from django.db import models from django.contrib.auth.models import User class UserModuleProfile(models.Model): user = models.OneToOneField(User) expired = models.DateTimeField() admin = models.BooleanField(default=False) employee_id = models...
With IpRateLimit middleware you can set multiple limits for different scenarios like allowing an IP or IP range to make a maximum number of calls in a time interval like per second, 15 minutes, etc. You can define these limits to address all requests made to an API or you can scope the limits to eac...
With ClientRateLimit middleware you can set multiple limits for different scenarios like allowing a Client to make a maximum number of calls in a time interval like per second, 15 minutes, etc. You can define these limits to address all requests made to an API or you can scope the limits to each URL...
The following example is a very useful basis when you are trying to convert transaction data to un-pivoted data for BI/reporting reasons, where the dimensions which are to be un-pivoted can have a dynamic set of columns. For our example, we suppose that the raw data table contains employee assessme...
Sample XML <Students> <Student> <Name> <First>Ashley</First> <Last>Smith</Last> </Name> <Grades> <Exam1>A</Exam1> <Exam2>B</Exam2> ...
Command Structure is sqlcmd -S yourservername\instancename -d database_name -o outputfilename_withpath -Q "your select query" Switches are as follows -S for servername and instance name -d for source database -o for target outputfile (it will create output file) -Q fo...
You can also make a switch statement switch based on the class of the thing you're switching on. An example where this is useful is in prepareForSegue. I used to switch based on the segue identifier, but that's fragile. if you change your storyboard later and rename the segue identifier, it breaks ...
select cst.constraint_schema, cst.constraint_name,                        fk.table_name, fk.ordinal_position, fk.column_name,                pk.table_name, pk.column_name                                 from qsys2.syscst cst join qsys2.syskeycst fk                         on fk.constraint_sc...
select cst.constraint_schema, cst.constraint_name,                        fk.table_name, fk.ordinal_position, fk.column_name,                pk.table_name, pk.column_name                                 from qsys2.syscst cst join qsys2.syskeycst fk                         on fk.constraint_sc...
This will be our example data frame: color name size 0 red rose big 1 blue violet small 2 red tulip small 3 blue harebell small Accessing a single column from a data frame, we can use a simple comparison == to compare every element in the column to the given...

Page 1 of 1