Tutorial by Examples: er

Will select records in TableName that have records matching in TableName1. SELECT * FROM TableName t WHERE EXISTS ( SELECT 1 FROM TableName1 t1 where t.Id = t1.Id)
mount is used to mount another application (basically rack application) or rails engines to be used within the current application syntax: mount SomeRackApp, at: "some_route" Now you can access above mounted application using route helper some_rack_app_path or some_rack_app_url. But ...
Step 1: Create the controller, set the delegate, and conform to the protocol //Swift class ImageUploadViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate { let imagePickerController = UIImagePickerController() override func viewDi...
LISP and Scheme's greatest advantage over other mainstream programming language is their macro system. Unlike the C preprocessor and other macro languages, Scheme macros take parsed code as input and return expanded code as output. This is one of the applications of Scheme's “code is data” phrase, a...
In this example we want to create a class that will generate and output to console, a random number between a range of two integers which are passed as arguments during the initialization. public class SimpleRangeRandom implements Runnable { private int min; private int max; pr...
When you implement java.io.Serializable interface to make a class serializable, the compiler looks for a static final field named serialVersionUID of type long. If the class doesn't have this field declared explicitly then the compiler will create one such field and assign it with a value which come...
Converting an integer type to the corresponding promoted type is better than converting it to some other integer type. void f(int x); void f(short x); signed char c = 42; f(c); // calls f(int); promotion to int is better than conversion to short short s = 42; f(s); // calls f(short); exact mat...
Download the Atlassian conversion utility here. This utility requires Java, so please ensure that you have the Java Runtime Environment JRE installed on the machine you plan to do the conversion. Use the command java -jar svn-migration-scripts.jar verify to check if your machine is missing any of t...
git show shows various Git objects. For commits: Shows the commit message and a diff of the changes introduced. CommandDescriptiongit showshows the previous commitgit show @~3shows the 3rd-from-last commit For trees and blobs: Shows the tree or blob. CommandDescriptiongit show @~3:shows the ...
In case we want to use enum with more information and not just as constant values, and we want to be able to compare two enums. Consider the following example: public enum Coin { PENNY(1), NICKEL(5), DIME(10), QUARTER(25); private final int value; Coin(int value){ this....
Using the baseline-shift parameter, you can specify super- or subscript. But this is not supported by all major browsers. <svg xmlns="http://www.w3.org/2000/svg"> <text x="10" y="20">x<tspan baseline-shift="super">2</tspan></te...
In cases such as restoring a database dump, or otherwise wishing to push some information through a pipe from the host, you can use the -i flag as an argument to docker run or docker exec. E.g., assuming you want to put to a containerized mariadb client a database dump that you have on the host, in...
Example for date or time range.
Consider the table dbo.state_zip, which contains the columns city, statecode and zipcode and has over 80,000 records. Parameters AttributeRequiredTypeDefaultDescriptionquerytruestringThe variable name of a query object.startrowfalsenumericThe starting row index of the query object.endrowfalsenumer...
To split a JID into its component parts (the localpart, domainpart, and resourcepart), the following algorithm should be used (where the localpart is represented by lp, the resourcepart by rp, and the domainpart by dp and ∈ is used to check if the given character is included in the string): Note ...
In some cases, you want to show your users a UIPickerView with predefined contents for a UITextField instead of a keyboard. Create a custom UIPickerView At first, you need a custom wrapper-class for UIPickerView conforming to the protocols UIPickerViewDataSource and UIPickerViewDelegate. class My...
Data attributes were introduced in HTML5 which is supported by all modern browsers, but older browsers before HTML5 don't recognize the data attributes. However, in HTML specifications, attributes that are not recognized by the browser must be left alone and the browser will simply ignore them when...
JsonReader reads a JSON encoded value as a stream of tokens. public List<Message> readJsonStream(InputStream in) throws IOException { JsonReader reader = new JsonReader(new InputStreamReader(in, "UTF-8")); try { return readMessagesArray(reader); } finall...
[ServiceContract] public interface IBookService { [OperationContract] [WebGet] List<Book> GetBooksList(); [OperationContract] [WebGet(UriTemplate = "Book/{id}")] Book GetBookById(string id); [OperationContract] [WebInvoke(UriTemplate = &...
Object obj = new Object(); // Note the 'new' keyword Where: Object is a reference type. obj is the variable in which to store the new reference. Object() is the call to a constructor of Object. What happens: Space in memory is allocated for the object. The constructor Object() is call...

Page 124 of 417