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
#%RAML 1.0 | |
title: cool-system-api | |
securitySchemes: | |
oauth_2_0: | |
description: Mulesoft OAUTH 2 | |
describedBy: | |
headers: | |
Authorization: | |
type: string |
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
%dw 2.0 | |
output application/json | |
--- | |
read(payload.^raw,"application/json") |
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
output application/java --- readUrl('classpath://sample_data/gsheet_date.json') |
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
%dw 2.0 | |
output application/java | |
--- | |
flatten(valuesOf(payload) map ((item, index) -> item.*payload)) |
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 RestServiceConsumerDW { | |
public static void consume(){ | |
Http http = new Http(); | |
HttpRequest request = new HttpRequest(); | |
request.setEndpoint('https://techcrunch.com/wp-json/wp/v2/posts?per_page=2&context=embed'); | |
request.setMethod('GET'); | |
HttpResponse response = http.send(request); | |
// If the request is successful, parse the JSON response. | |
if(response.getStatusCode() == 200) { |
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
List<String> listWords = new List<String>{'bored','robed','cat','act','tac','eme'}; | |
Map<String,List<String>> mapWords = new Map<String,List<String>>(); | |
for(String word: listWords){ | |
List<String> splittedWord = word.split(''); | |
splittedWord.sort(); | |
String wordNew = ''; | |
for(String newWord:splittedWord){ |
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 Employee__c getTopManager(String employeeId){ | |
Boolean topLevel = false; | |
Employee__c top_employee = new Employee__c(); | |
while(!topLevel){ | |
Employee__c employee = [Select Id,Name,Manager__c from Employee__c where Id =:employeeId limit 1]; |
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 SObject { | |
public static void run(){ | |
switch on Trigger.operationType { | |
when BEFORE_INSERT { | |
//Perform Before Insert logic' | |
System.debug('BEFORE INSERT FIRED');' | |
} when BEFORE_UPDATE { | |
//perform Before Update logic | |
} when BEFORE_DELETE { | |
//perform Before Delete logic |
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 CheckRecursive { | |
private static boolean run = true; | |
public static boolean runOnce(){ | |
if (run) { | |
run = false; | |
return true; | |
} | |
else{ |
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
<apex:page standardController="Account" extensions="AccountApprovalCloneExtension" > | |
<apex:pageBlock title="Approval History Clone"> | |
<table class="list" border="0" cellspacing="0"> | |
<tbody> | |
<tr class="headerRow"> | |
<th class="actionColumn" scope="col">Action</th> | |
<th scope="col" class=" zen-deemphasize">Date</th> | |
<th scope="col" class=" zen-deemphasize">Status</th> | |
<!--<th scope="col" class=" zen-deemphasize">Assigned To</th>--> |
NewerOlder