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 static final String ATTRIBUTE_KEY = 'attributes'; | |
public static List<Map<String,String>> toMapList(List<sObject> recordList) { | |
List<Map<String,String>> mappedList = new List<Map<String,String>>(); | |
for(sObject record : recordList ){ | |
mappedList.add( Utils.toMap(record) ); | |
} | |
return mappedList; | |
} |
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
Opportunity opp = [select Reason_for_No_Withdrawal_Symptom__c,Withdrawal_Symptoms__c from opportunity where id='006g000000GVeVq']; | |
Map<String,Object> deserializeMap = (Map<String,Object>)JSON.deserializeUntyped(JSON.serialize(opp)); | |
Map<String,String> oppRecord = new Map<String,String>(); | |
for(String key : deserializeMap.keySet()){ | |
if( 'attributes'.equalsIgnoreCase(key) ) | |
continue; | |
Object value = deserializeMap.get(key); | |
oppRecord.put(key,String.valueOf( value != null ? value : '')); | |
} |
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
body{ | |
background-color: #f9f6ef; | |
} | |
.header{ | |
background-color: #144d68; | |
height: 50px; | |
} | |
.navbar-brand .logo { |
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 splitName = function(fullName){ | |
var name = {}; | |
var nameComponents = fullName.split(' '); | |
name.firstName = nameComponents.slice(0, -1).join(' '); | |
name.lastName = nameComponents.slice(-1).join(' '); | |
return name; | |
} |
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 server = { | |
remoteActions : { | |
'search' : '{!$RemoteAction.PreChatFormController.searchRecord}' | |
}, | |
config : { | |
buffer: false | |
, escape: false | |
, timeout: 120000 | |
}, | |
invoke : function(method,parameters,callback) { |
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 npm = require("npm") | |
var Parser = require('expr-eval').Parser; | |
var parser = new Parser(); | |
parser.functions.val = function (selector) { | |
var value; | |
var selectedElem = $(selector); | |
//textarea text(); |
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
* { margin: 0px; padding: 0px; } | |
body { | |
background: #f0f1f2; | |
font:12px "Open Sans", sans-serif; | |
} | |
#view-code{ | |
color:#89a2b5; | |
opacity:0.7; | |
font-size:14px; | |
text-transform:uppercase; |
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 encodedStr = 'TUlNRS1WZXJzaW9uOiAxLjANClJlY2VpdmVkOiBieSAxMC4yOC45OS4xOTYgd2l0aCBIVFRQOyBGcmksIDE4IFNlcCAyMDE1IDEzOjIzOjAxIC0wNzAwIChQRFQpDQpEYXRlOiBGcmksIDE4IFNlcCAyMDE1IDIyOjIzOjAxICswMjAwDQpEZWxpdmVyZWQtVG86IGVtdGhvbGluQGdtYWlsLmNvbQ0KTWVzc2FnZS1JRDogPENBRHNaTFJ5eGk2UGt0MHZnUS1iZHd1N2FNLWNHRmZKcEwrRHYyb3ZKOGp4SGN4VWhfQUBtYWlsLmdtYWlsLmNvbT4NClN1YmplY3Q6IFdoYXQgZGENCkZyb206IEVtaWwgVGhvbGluIDxlbXRob2xpbkBnbWFpbC5jb20-DQpUbzogRW1pbCBUaG9saW4gPGVtdGhvbGluQGdtYWlsLmNvbT4NCkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L2FsdGVybmF0aXZlOyBib3VuZGFyeT0wMDFhMTE0NjhmMTY1YzUwNDUwNTIwMGI0YzYxDQoNCi0tMDAxYTExNDY4ZjE2NWM1MDQ1MDUyMDBiNGM2MQ0KQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PVVURi04DQoNCmhlY2s_IE5vIGF0dGFjaG1lbnQ_DQoNCi0tMDAxYTExNDY4ZjE2NWM1MDQ1MDUyMDBiNGM2MQ0KQ29udGVudC1UeXBlOiB0ZXh0L2h0bWw7IGNoYXJzZXQ9VVRGLTgNCg0KPGRpdiBkaXI9Imx0ciI-aGVjaz8gTm8gYXR0YWNobWVudD88L2Rpdj4NCg0KLS0wMDFhMTE0NjhmMTY1YzUwNDUwNTIwMGI0YzYxLS0='; | |
encodedStr = encodedStr.replaceAll('-', '+').replaceAll('_', '/'); | |
Blob decodedBlob = EncodingUtil |
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 exp1 = "(true && true || false) && (true || (false && true))"; | |
var exp2 = "((true && true) || false && !true)"; | |
var exp3 = "(true && !false) && true && !false"; | |
var exp4 = "(a && b) && c && d"; | |
console.log(exp1 + ' = ' + parseBoolStr(exp1)); | |
console.log(exp2 + ' = ' + parseBoolStr(exp2)); | |
console.log(exp3 + ' = ' + parseBoolStr(exp3)); | |
console.log(exp4 + ' = ' + parseBoolStr(exp4)); |