This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Given an integer 'n', create a generator that will return a new permutation | |
of the integers between 1 and n, until all the permutations have been | |
exhausted. | |
Ex: input: 3 | |
output: 123, 132, 321, 231, 312, 213 | |
""" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the Type corresponding to the class name | |
Type t = Type.forName('DummyTypeInstantiableOne'); | |
// Instantiate the type. | |
// The type of the instantiated object | |
// is the interface. | |
DummyTypeInstantiableOne dtiOne = (DummyTypeInstantiableOne) t.newInstance(); | |
// Call the methods that have a custom implementation | |
System.debug('Output for the method :' + dtiOne.processRule('one')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public with sharing class BeerPaginatorJSRemoting { | |
public BeerPaginatorJSRemoting() { | |
// Do nothing | |
} | |
@RemoteAction | |
public static List<Beer__c> getBeerList(){ | |
List<Beer__c> beerList = [SELECT Id, Name, Tags__c, Alcohol__c, Brewery__r.Name FROM Beer__c LIMIT 1000]; | |
return beerList; | |
} |