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
45.0 APEX_CODE,FINEST;APEX_PROFILING,FINEST;CALLOUT,FINEST;DB,FINEST;NBA,INFO;SYSTEM,FINEST;VALIDATION,FINEST;VISUALFORCE,FINEST;WAVE,INFO;WORKFLOW,FINEST | |
Execute Anonymous: class kkkkkkk { | |
Execute Anonymous: void method1() { } | |
Execute Anonymous: } | |
Execute Anonymous: new kkkkkkk().method1(); | |
00:25:56.1 (1554571)|USER_INFO|[EXTERNAL]|00550000000wTdS|<redacted>|(GMT-04:00) Eastern Daylight Time (America/Indiana/Indianapolis)|GMT-04:00 | |
00:25:56.1 (1597258)|EXECUTION_STARTED | |
00:25:56.1 (1605985)|CODE_UNIT_STARTED|[EXTERNAL]|execute_anonymous_apex | |
00:25:56.1 (1913868)|HEAP_ALLOCATE|[72]|Bytes:3 | |
00:25:56.1 (1984554)|HEAP_ALLOCATE|[77]|Bytes:152 |
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
// Asking for extra CPU time and heap for those really "heavy" orgs | |
@isTest class GetExtraLimitsForYourUnitTest implements Queueable { | |
@testSetup static void testSetup() { | |
Test.startTest(); // TIP: this avoids governor limits for your @isTest methods | |
System.enqueueJob(new GetExtraLimitsForYourUnitTest()); // We'll get async limits! | |
// P.S. Did you know that the end of a unit test method triggers async code, | |
// just as if you called Test.stopTest()? | |
} | |
public void execute(QueueableContext context) { | |
// I now have 60000ms to do my setup, instead of just 10000ms. |
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 class MonitorAsyncUsage implements Schedulable { | |
public class ResourceInfo { | |
public Integer Max; | |
public Integer Remaining; | |
} | |
public class LimitsAPI { | |
public ResourceInfo DailyAsyncApexExecutions; | |
} |
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
String[] objects = new String[0]; | |
Set<String> exceptions = new Set<String> { 'caseexternaldocument' }; | |
for(sObjectType t: Schema.getGlobalDescribe().values()) { | |
DescribeSObjectResult r = t.getDescribe(); | |
if(r.isSearchable() && !exceptions.contains((''+t).toLowerCase())) { | |
objects.add(t+'('+string.join(r.fields.getMap().keySet(),',')+')'); | |
} | |
} | |
String searchTerm = 'find {demo} in all fields returning '+string.join(objects,','); | |
System.debug(searchTerm.length()); |
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
// WARNING: uses lots of CPU time, set all log levels to NONE, Apex to ERROR. | |
String[] charset = new String[0]; | |
for(Integer i = 48; i < 58; i++) { | |
charset.add(String.fromCharArray(new Integer[]{i})); | |
} | |
for(Integer i = 65; i < 91; i++) { | |
charset.add(String.fromCharArray(new Integer[]{i})); | |
} | |
for(Integer i = 97; i < 123; i++) { | |
charset.add(String.fromCharArray(new Integer[]{i})); |
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 class StripInaccessibleAction { | |
public class Input { | |
@InvocableVariable( | |
description='The record to clean up' | |
label='Record' | |
required=true | |
) | |
public sObject record; | |
@InvocableVariable( | |
description='The access type to use' |
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
global class PagingSortingController { | |
@AuraEnabled global static Account[] getAccounts() { | |
return [SELECT Name, Industry, AnnualRevenue FROM Account LIMIT 1000]; | |
} | |
} |
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
global class XmlToJson { | |
// Try to determine some data types by pattern | |
static Pattern | |
boolPat = Pattern.compile('^(true|false)$'), decPat = Pattern.compile('^[-+]?\\d+(\\.\\d+)?$'), | |
datePat = Pattern.compile('^\\d{4}.\\d{2}.\\d{2}$'), | |
timePat = Pattern.compile('^\\d{4}.\\d{2}.\\d{2} (\\d{2}:\\d{2}:\\d{2} ([-+]\\d{2}:\\d{2})?)?$'); | |
// Primary function to decode XML | |
static Map<Object, Object> parseNode(Dom.XmlNode node, Map<Object, Object> parent) { | |
// Iterate over all child elements for a given node | |
for(Dom.XmlNode child: node.getChildElements()) { |
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
<aura:component > | |
<aura:attribute name="currentStep" type="String" /> | |
<aura:attribute name="steps" type="String[]" /> | |
<aura:attribute name="renderInfo" access="private" type="Object[]" /> | |
<aura:registerEvent name="onselect" type="c:valueSelected" /> | |
<aura:handler name="init" value="{!this}" action="{!c.update}" /> | |
<aura:handler name="change" value="{!v.steps}" action="{!c.update}" /> |
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
/* | |
// Example implementation as follows: | |
public class AWSS3_GetService extends AWS { | |
public override void init() { | |
endpoint = new Url('https://s3.amazonaws.com/'); | |
resource = '/'; | |
region = 'us-east-1'; | |
service = 's3'; | |
accessKey = 'my-key-here'; | |
method = HttpMethod.XGET; |
NewerOlder