Tutorial by Examples: ed

Template - signup.component.html <form #signUpForm="ngForm" (ngSubmit)="onSubmit()"> <div class="title"> Sign Up </div> <div class="input-field"> <label for="username">username</label> ...
You can get JCodec automatically with maven. For this just add below snippet to your pom.xml . <dependency> <groupId>org.jcodec</groupId> <artifactId>jcodec-javase</artifactId> <version>0.1.9</version> </dependency>
Starting with Android 3.1 all applications, upon installation, are placed in a stopped state. While in stopped state, the application will not run for any reason, except by a manual launch of an activity, or an explicit intent that addresses an activity ,service or broadcast. When writing system ap...
Override Pagination Style: Every available pagination style can be overridden by creating a new class that inherits from one of the available styles and then alters its parameters: class MyPagination(PageNumberPagination): page_size = 20 page_size_query_param = 'page_size' max_page...
Lets assume that we have a complex api, with many generic views and some generic viewsets. We want to enable PageNumberPagination to every view, except one (either generic view or viewset, does not make a difference) for which we want a customized case of LimitOffsetPagination. To achieve that we n...
This is an advanced subject, do not attempt without first understanding the other examples of this page. As stated in the official Django Rest Framework on pagination: Pagination is only performed automatically if you're using the generic views or viewsets. If you're using a regular APIView, you...
Laracasts - Learn practical, modern web development, through expert screencasts. Laravel News - Stay up to date with Laravel with Laravel News. Laravel.io - Forum with open-source code.
Then we finally pass the query to the writer to delete documents that match the query: See the answer to this question. See the API here // Remove the document by using a multi key query: // http://www.avajava.com/tutorials/lessons/how-do-i-combine-queries-with-a-boolean-query.html indexWriter....
Create new instance of UISegmentedControl filled with 3 items (segments): let mySegmentedControl = UISegmentedControl (items: ["One", "Two", "Three"]) Setup frame; mySegmentedControl.frame = CGRect(x: 0.0, y: 0.0, width: 300, height: 50) Make default s...
Getting started with xUnit.net, on Platform: .NET Core / ASP.NET Core Desktop CLR Universal Windows Apps
display dialog "Password" default answer "" set w to text returned of the result if w = "Password" then display notification "Correct" end if
CREATE INDEX first_name_idx ON user_data (UPPER(first_name)); SELECT * FROM user_data WHERE UPPER(first_name) = 'JOHN2'; Function based index means, creating index based on a function. If in search (where clause), frequently any function is used, it's better to create index based on ...
The NamedParameterJdbcTemplate class adds support for programming JDBC statements using named parameters, as opposed to programming JDBC statements using only classic placeholder ( '?') arguments. The NamedParameterJdbcTemplate class wraps a JdbcTemplate, and delegates to the wrapped JdbcTempl...
class ConversationsTableViewController: UITableViewController, NSFetchedResultsControllerDelegate { private var fetchedResultsController: NSFetchedResultsController<Conversation>! override func viewDidLoad() { super.viewDidLoad() initializeFetchedResultsController() } private...
Supervised learning is a type of machine learning algorithm that uses a known data-set (called the training data-set) to make predictions. Category of supervised learning: Regression: In a regression problem, we are trying to predict results within a continuous output, meaning that we are trying...
Unsupervised learning allows us to approach problems with little or no idea what our results should look like. We can derive structure from data where we don't necessarily know the effect of the variables. Example: Clustering: Is used for exploratory data analysis to find hidden patterns or groupi...
Calendar : Key : Privacy - Calendars Usage Description Value : $(PRODUCT_NAME) calendar events Reminder : Key : Privacy - Reminders Usage Description Value : $(PRODUCT_NAME) reminder use Contact : Key : Privacy - Contacts Usage Description Value : $(PRODUCT_...
It is possible to DELETE data from a table if it matches (or mismatches) certain data in other tables. Let's assume we want to DELETEdata from Source once its loaded into Target. DELETE FROM Source WHERE EXISTS ( SELECT 1 -- specific value in SELECT doesn't matter FROM Target ...
Suppose we have a POJO class User we need to validate. public class User { @NotEmpty @Size(min=5) @Email private String email; } and a controller method to validate the user instance public String registerUser(@Valid User user, BindingResult result); Let's extend the U...
Assume that, we implement a simple API and we have the following models. class Parent(models.Model): name = models.CharField(max_length=50) class Child(models.Model): parent = models.ForeignKey(Parent) child_name = models.CharField(max_length=80) And we want to return a respo...

Page 135 of 145