Reference
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
// Trim all whitespace characters | |
// It is a Unicode space character (SPACE_SEPARATOR, LINE_SEPARATOR, or PARAGRAPH_SEPARATOR) but is not also a non-breaking space ('\u00A0', '\u2007', '\u202F'). | |
// Reference : https://docs.oracle.com/javase/8/docs/api/java/lang/Character.html#isWhitespace-char- | |
public static String trim(String value){ | |
// first replace characters which are ignored by java to space. | |
char spaceChar = ' '; | |
return value == null ? null | |
: value.replace('\u00A0',spaceChar) | |
.replace('\u2007',spaceChar) | |
.replace('\u202F',spaceChar) |
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
function getStringBetween(str, start,end){ | |
return str.substring( | |
str.indexOf(start) + start.length, | |
str.lastIndexOf(end) | |
); | |
} |
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
var providers = [ | |
{ | |
"provider" : {"name" : "Zaa"}, | |
"licenseStates" : ["TX"] | |
}, | |
{ | |
"provider" : {"name" : "Aaa"}, | |
"licenseStates" : ["CA"] | |
}, | |
{ |
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 inherited sharing virtual class ApexExtension { | |
public static String str(String input){ | |
return input == null ? '' : input; | |
} | |
public static String str(Object input){ | |
return str(String.valueOf(input)); | |
} |
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<Contact> contactsToUnDelete = new List<Contact>(); | |
for(Contact c : [Select Id, Name, IsDeleted from Contact LIMIT 50000 ALL ROWS]){ | |
if( c.IsDeleted == true ) { | |
System.debug('Undeleting Contact ='+c.Name+' : '+c.IsDeleted); | |
contactsToUnDelete.add(c); | |
} | |
} | |
if( contactsToUnDelete.size() > 0 ){ | |
System.debug('Undeleting In Total '+contactsToUnDelete.size()+' Contacts'); | |
undelete contactsToUnDelete; |
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
import java.beans.IntrospectionException; | |
import java.beans.PropertyDescriptor; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.Type; | |
class Person { | |
public Gender gender; |
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
interface Action { | |
String getQuery(); | |
Boolean execute(List<SObject> records); | |
Object getResult(); | |
void setData(Object value); | |
Integer getDelay(); | |
String getJobName(); | |
} |
This file has been truncated, but you can view the full file.
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
/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ | |
!function (e, t) { | |
'use strict'; | |
'object' == typeof module && 'object' == typeof module.exports ? module.exports = e.document ? t(e, !0) : function (e) { | |
if (!e.document) throw new Error('jQuery requires a window with a document'); | |
return t(e) | |
} | |
: t(e) | |
}('undefined' != typeof window ? window : this, function (C, e) { | |
'use strict'; |
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 SurveyData { | |
public class Survey { | |
public List<Question> rows; | |
//index must map with the isApplicable array | |
public List<String> allProducts; | |
{ | |
rows = new List<Question>(); | |
allProducts = new List<String>(); |
NewerOlder