This file contains hidden or 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 AWSTranscribeExample extends AWS { | |
public override void init() { | |
endpoint = new Url('https://transcribe.us-west-2.amazonaws.com/'); | |
resource = '/'; | |
region = 'us-west-2'; | |
service = 'transcribe'; | |
accessKey = 'my-key-here'; | |
method = HttpMethod.XPOST; | |
payload = Blob.valueOf('{"LanguageCode": "en-US","Media": {"MediaFileUri": "S3 audio file link"},"MediaFormat": "mp4","MediaSampleRateHertz": 44100,"TranscriptionJobName": "SampleRestJob7"}'); | |
setHeader('x-amz-target','Transcribe.StartTranscriptionJob'); |
This file contains hidden or 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:application controller="q292183"> | |
<aura:handler name="init" value="{!this}" action="{!c.init}" /> | |
<aura:attribute name="data" type="Map" /> | |
{!v.data.a} {!v.data.b} {!v.data.c} | |
<hr /> | |
<c:q292183lwc /> | |
</aura:application> |
This file contains hidden or 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
// Technical Note: We can't add any strings to the debug logs | |
// because strings go in to a "string pool", which affects | |
// heap size for each non-unique string. | |
// Base heap | |
System.debug(Limits.getHeapSize()); | |
// The "symbol table" has a new entry added, +0 heap | |
// i is defined, no value (heap does not change) | |
Integer i; |
This file contains hidden or 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 hidden or 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 WizardDemoController { | |
public WizardDemoController getSelf() { | |
return this; | |
} | |
public String message { get; set; } | |
public Integer pageNumber { get; set; } | |
public WizardDemoController() { | |
pageNumber = 1; | |
} | |
public void nextPage() { |
This file contains hidden or 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[] s = new string[0]; | |
for(integer i = 0; i < 10100; i++) { | |
s.add('*'.repeat(i)); | |
} | |
system.debug(Limits.getHeapSize()); |
This file contains hidden or 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:application > | |
<aura:attribute name="value1" type="String" access="private" /> | |
<aura:attribute name="value2" type="String" access="private" /> | |
<lightning:input value="{!v.value1}" label="Value 1" placeholder="Enter 'a'" /> | |
<aura:if isTrue="{!v.value1 eq 'a'}"> | |
<lightning:input value="{!v.value2}" label="Value 2" placeholder="Enter 'b'" /> | |
<aura:if isTrue="{!v.value2 eq 'b'}"> | |
<lightning:input label="Value 3" value="{!join(' ',v.value1,v.value2)}" /> | |
</aura:if> | |
</aura:if> |
This file contains hidden or 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:application extends="force:slds"> | |
<aura:attribute name="contactFields" type="Contact" default="{sobjectType:'Contact',Gender__c:'Male',Partner_Gender__c:'Female'}" /> | |
<aura:attribute name="genderOptions" type="List" default="[{label:'Male',value:'Male'},{label:'Female',value:'Female'},{label:'Not Specified/Other',value:'Not Specified/Other'}]" /> | |
<lightning:combobox name="applicantgender" label="Applicant Gender" value="{!v.contactFields.Gender__c}" placeholder="Select Gender" options="{! v.genderOptions }" /> | |
<lightning:combobox name="partnergender" label="Partner Gender" value="{!v.contactFields.Partner_Gender__c}" placeholder="Select Gender" options="{! v.genderOptions }" /> | |
Applicant Gender: {!v.contactFields.Gender__c}<br /> | |
Partner Gender: {!v.contactFields.Partner_Gender__c} | |
</aura:application> |
This file contains hidden or 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:application > | |
<aura:attribute name="opts" type="String[]" default="['A','B','C']" /> | |
<aura:attribute name="disableButton" type="Boolean" default="false" /> | |
<select aura:id="picklist" onchange="{!c.updateButtonState}" multiple="multiple"> | |
<aura:iteration items="{!v.opts}" var="opt"> | |
<option value="{!opt}">{!opt}</option> | |
</aura:iteration> | |
</select> | |
<lightning:button label="Test Button" disabled="{!v.disableButton}" /> | |
</aura:application> |
This file contains hidden or 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
// Help report errors to parent/child object on failed DML update | |
// For use in Trigger contexts only. | |
// This version is for demonstration purposes only, and should not | |
// be considered production ready without additional modifications. | |
// | |
// Example trigger: | |
// | |
// trigger updateContactPhone on Account(after update) { | |
// Id[] updates = new Id[0]; | |
// for(Account record: Trigger.new) { |