Tutorial by Examples: l

Traditional way interface MathOperation{ boolean unaryOperation(int num); } public class LambdaTry { public static void main(String[] args) { MathOperation isEven = new MathOperation() { @Override public boolean unaryOperation(int num) { ...
CREATE TABLE XtoY ( # No surrogate id for this table x_id MEDIUMINT UNSIGNED NOT NULL, -- For JOINing to one table y_id MEDIUMINT UNSIGNED NOT NULL, -- For JOINing to the other table # Include other fields specific to the 'relation' PRIMARY KEY(x_id, y_id), --...
One can verify whether a method was called on a mock by using Mockito.verify(). Original mock = Mockito.mock(Original.class); String param1 = "Expected param value"; int param2 = 100; // Expected param value //Do something with mock //Verify if mock was used properly Mockito.veri...
Detailed instructions on getting plesk set up or installed.
Detailed instructions on getting websphere set up or installed.
The DatePicker class has a property, SelectedDate, which enable you to get or set the selected date. If there is none selected, it means its value will be null. if (datePicker.SelectedDate == null) { // Do what you have to do }
You call use Thread.kill or Thread.terminate: thr = Thread.new { ... } Thread.kill(thr)
Android developers(mainly beginners) have been confused regarding Internal & External storage terminology. There are lot of questions on Stackoverflow regarding the same. This is mainly because of the fact that terminology according to Google/official Android documentation is quite different to...
var client = new MongoClient("mongodb://localhost:27017"); var database = client.GetDatabase("test"); var collection = database.GetCollection < Interactions > ("Interactions"); var result = IMongoCollectionExtensions .AsQueryable(collection) ...
var client = new MongoClient("mongodb://localhost:27017"); var database = client.GetDatabase("test"); var collection = database.GetCollection < Interactions > ("Interactions"); collection.DeleteOne(s => s.SiteName == "New Example");
To add a child view controller: - (void)displayContentController:(UIViewController *)vc { [self addChildViewController:vc]; vc.view.frame = self.view.frame; [self.view addSubview:vc.view]; [vc didMoveToParentViewController:self]; } To remove a child view controller: - (void)hid...
Introduction Maps stores key/value pairs, where each key has an associated value. Given a particular key, the map can look up the associated value very quickly. Maps, also known as associate array, is an object that stores the data in form of keys and values. In Java, maps are represented using Ma...
DELETE FROM Helloworlds This will delete all the data from the table. The table will contain no rows after you run this code. Unlike DROP TABLE, this preserves the table itself and its structure and you can continue to insert new rows into that table. Another way to delete all rows in table is ...
TRUNCATE TABLE Helloworlds This code will delete all the data from the table Helloworlds. Truncate table is almost similar to Delete from Table code. The difference is that you can not use where clauses with Truncate. Truncate table is considered better than delete because it uses less transacti...
Static .Net library methods can be called from PowerShell by encapsulating the full class name in third bracket and then calling the method using :: #calling Path.GetFileName() C:\> [System.IO.Path]::GetFileName('C:\Windows\explorer.exe') explorer.exe Static methods can be called from the c...
trigger ContactTrigger on Contact (before insert, after insert, before update, after update, before delete, after delete, after undelete) { /** Before or After trigger execution**/ /...
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 ensure that all possible items are documented, you can use the missing_docs link to receive warnings/errors from the compiler. To receive warnings library-wide, place this attribute in your lib.rs file: #![warn(missing_docs)] You can also receive errors for missing documentation with this lin...
Vaadin plug-in for eclipse provides a quick way to build vaadin project with Apache Ivy dependency manager. Vaadin's documentation explains how to create vaadin project with the help of Eclipse plugin. To install the plug-in just go to eclipse marketplace and search vaadin. Current version of the p...
To perform a query in Apex, surround the query with square brackets. The result can be assigned to a list, or to a single object. List<Account> allAccounts = [SELECT Id, Name FROM Account]; Account oldestAccount = [SELECT Id, Name FROM Account ORDER BY CreatedDate LIMIT 1];

Page 418 of 861