Tutorial by Examples: field

db.people.createIndex({name: 1}) This creates an ascending single field index on the field name. In this type of indexes the sort order is irrelevant, because mongo can traverse the index in both directions.
This example assumes that your lookup column is named MultiLookupColumnName and that you want to set your multi-lookup field to lookup to the items with IDs 1 and 2. Using jQuery AJAX 2010 var listName = "YourListName"; var lookupList = "LookupListName"; var idOfItemToUpdate...
You can call an instance field using the .- syntax: (def p (java.awt.Point. 0 1)) (.-x p) ;;=> 0 (.-y p) ;;=> 1
Consider the following example: type Company struct { Name string Location string } Hide/Skip Certain Fields To export Revenue and Sales, but hide them from encoding/decoding, use json:"-" or rename the variable to begin with a lowercase letter. Note that this prevents ...
As a good developer you have created following struct with both exported and unexported fields: type MyStruct struct { uuid string Name string } Example in Playground: https://play.golang.org/p/Zk94Il2ANZ Now you want to Marshal() this struct into valid JSON for storage in somet...
If your enum class is required to have static fields, keep in mind they are created after the enum values themselves. That means, the following code will result in a NullPointerException: enum Example { ONE(1), TWO(2); static Map<String, Integer> integers = new HashMap<>(); ...
Multiple fields can be specified for the ORDER BY clause, in either ASCending or DESCending order. For example, using the http://stackoverflow.com/documentation/sql/280/example-databases/1207/item-sales-table#t=201607211314066434211 table, we can return a query that sorts by SaleDate in ascending o...
It's good practice to complete your AssemblyInfo's default fields. The information may be picked up by installers and will then appear when using Programs and Features (Windows 10) to uninstall or change a program. The minimum should be: AssemblyTitle - usually the namespace, i.e. MyCompany.MySo...
The SilverStripe Grid Field Extensions Module has some very nice features to enhance the basic GridField... GridFieldAddExistingSearchButton - a more advanced search form for adding items GridFieldAddNewInlineButton - builds on GridFieldEditableColumns to allow inline creation of records. GridF...
The module Better Buttons for GridField adds new form actions and buttons to the GridField detail form. Save and add another: Create a record, and go right to adding another one, without having to click the back button, and then add again Save and close: Save the record and go back to list view ...
(This example copied from this StackOverflow answer) Let's say you have a number of different data types that all ought to have a lens with the same name, in this case capacity. The makeFields slice will create a class that accomplish this without namespace conflicts. {-# LANGUAGE FunctionalDepen...
Field-Symbols are ABAP's equivalent to pointers, except that Field-Symbols are always dereferenced (it is not possible to change the actual address in memory). Declaration To declare a Field-Symbol the keyword FIELD-SYMBOLS must be used. Types can be generic (ANY [... TABLE]) to handle a wide vari...
It is possible to define a data type with field labels. data Person = Person { age :: Int, name :: String } This definition differs from a normal record definition as it also defines *record accessors which can be used to access parts of a data type. In this example, two record accessors are de...
When object's are linked by a lookup or master-detail relationship, the parent records field's can be referenced from the child record or 'base object' in a query. This is also known as upwards traversal. SELECT FirstName, Account.Name, Account.Category__c FROM Contact It's possible to traverse ...
The CharField is used for storing defined lengths of text. In the example below up to 128 characters of text can be stored in the field. Entering a string longer than this will result in a validation error being raised. from django.db import models class MyModel(models.Model): name = models...
Given these two CSV files: $ cat file1 1,line1 2,line2 3,line3 4,line4 $ cat file2 1,line3 2,line4 3,line5 4,line6 To print those lines in file2 whose second column occurs also in the first file we can say: $ awk -F, 'FNR==NR {lines[$2]; next} $2 in lines' file1 file2 1,line3 2,line4...
Steps to Reproduce (Turbo Forms, CRM 2015.1, --> CRM 2016.2) Form (with or without other required fields) has one field that is empty and required. Lose focus on the empty field ("title" in this example), this triggers the Field Notification Icon: Wire up onChange Handler for emp...
When rendering a form 'by hand', it can be useful to know if there are fields left to render or not. The function isRendered() from the FormView class returns true if there are still fields left to be rendered to the template. This snippet prints <h3>Extra fields</h3> if there are fiel...
Initialize the UITextField with a CGRect as a frame: Swift let textfield = UITextField(frame: CGRect(x: 0, y: 0, width: 200, height: 21)) Objective-C UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, 200, 21)]; You can also create a UITextField in Interface Builde...
#!/bin/bash FILENAME="/etc/passwd" while IFS=: read -r username password userid groupid comment homedir cmdshell do echo "$username, $userid, $comment $homedir" done < $FILENAME In unix password file, user information is stored line by line, each line consisting of i...

Page 5 of 11