Tutorial by Examples: f

trigger MyTrigger on SomeObject__c (after insert, after update) { if (Trigger.isAfter && Trigger.isInsert) { System.debug('The following records were inserted: '); for (SomeObject__c o : Trigger.new) { System.debug(o.Name); } } else if (Trigg...
To reference a variable in a query, add a colon (:) before the variable name. Datetime targetDate = Datetime.now().addDays(-7); List<Lead> recentLeads = [SELECT Id FROM Lead WHERE CreatedDate > :targetDate]; string targetName = 'Unknown'; List<Contact> incompleteContacts = [SELE...
entry = tk.Entry(parent, width=10) entry.insert(0, "Hello, World!")
The value of an entry widget can be obtained with the get method of the widget: name_entry = tk.Entry(parent) ... name = name_entry.get() Optionally, you may associate an instance of a StringVar, and retrieve the value from the StringVar rather than from the widget: name_var = tk.StringVar() ...
Modules can be required without using relative paths by putting them in a special directory called node_modules. For example, to require a module called foo from a file index.js, you can use the following directory structure: index.js \- node_modules \- foo |- foo.js \- package.json ...
ngHref is used instead of href attribute, if we have a angular expressions inside href value. The ngHref directive overrides the original href attribute of an html tag using href attribute such as tag, tag etc. The ngHref directive makes sure the link is not broken even if the user clicks the lin...
Usage: $ nodetool repair [-h | -p | -pw | -u] <flags> [ -- keyspace_name [table_name]] Default Repair Option $ nodetool repair This command will repair the current node's primary token range (i.e. range which it owns) along with the replicas of other token ranges it has in all tables a...
Apps Script: //Triggered when the page is navigated to, serves up HTML function doGet(){ var template = HtmlService.createTemplateFromFile('index'); return template.evaluate() .setTitle('Example App') .setSandboxMode(HtmlService.SandboxMode.IFRAME); } //Called from the cli...
Clone the SFML Repository from Github. Enter following comands in a cmd window: git clone https://github.com/SFML/SFML.git SFML If you already downloaded SFML before you can just use the existing one. Create some folders for the build-files cd SFML mkdir build && cd build mkdir ar...
You can find the Android Sample in [SFML_ROOT]\examples\android You can copy it to leave the SFML repository in it's original state. Open cmd.exe in the sample location. To get a list of all available Android build targets: android list target Run Update Project for the Sample: android upda...
Here is an example: my_array = array('i', [1,2,3,4,5]) c=[11,12,13] my_array.fromlist(c) # array('i', [1, 2, 3, 4, 5, 11, 12, 13]) So we see that the values 11,12 and 13 were added from list c to my_array.
index() returns first index of the matching value. Remember that arrays are zero-indexed. my_array = array('i', [1,2,3,4,5]) print(my_array.index(5)) # 5 my_array = array('i', [1,2,3,3,5]) print(my_array.index(3)) # 3 Note in that second example that only one index was returned, even though...
This method provides you the array buffer start address in memory and number of elements in array. Here is an example: my_array = array('i', [1,2,3,4,5]) my_array.buffer_info() (33881712, 5)
count() will return the number of times and element appears in an array. In the following example we see that the value 3 occurs twice. my_array = array('i', [1,2,3,3,5]) my_array.count(3) # 2
You are able to append a string to a character array using fromstring() my_char_array = array('c', ['g','e','e','k']) my_char_array.fromstring("stuff") print(my_char_array) #array('c', 'geekstuff')
<!-- file.xml --> <people> <person id="101"> <name>Jon Lajoie</name> <age>22</age> </person> <person id="102"> <name>Lord Gaben</name> <age>65</age> ...
Suppose that we have a sequence of integers and we want to create a sequence that contains only the even integers. We can obtain the latter by using the filter function of the Seq module. The filter function has the type signature ('a -> bool) -> seq<'a> -> seq<'a>; this indicat...
-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *,id> *)change context:(void *)context Context is important if you ship your class for others to use.Context lets your class observer verify that its you observer which is being called. The ...
If you are using library that contains (for example) AwesomeViewController with a wrong status bar color you can try this: let awesomeViewController = AwesomeViewController() awesomeViewController.navigationBar.barStyle = .blackTranslucent // or other style
An interface is declared like a class, but without access modifiers (public, private, ...). Also, no definitions are allowed, so variables and constants can't be used. Interfaces should always have an Unique Identifier, which can be generated by pressing Ctrl + Shift + G. IRepository = interface ...

Page 222 of 457