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 EmailLogic { | |
public static String renderTemplate(sObject sobj, String template) { | |
for (String fieldName : fields(sobj.getSObjectType())) { | |
String key = '{!' + fieldName + '}'; | |
while (template.containsIgnoreCase(key)) { | |
try { | |
Integer foundPosition = template.indexOfIgnoreCase(key, 0); | |
template = template.left(foundPosition) + | |
String.valueOf(sobj.get(fieldName)) + |
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
Lead[] leads = [ | |
select Id, | |
(select Id, Field, OldValue, NewValue, CreatedDate from Histories order by CreatedDate asc) | |
from Lead | |
where Status='Closed' | |
and Closed_Date__c = null | |
order by LastModifiedDate asc | |
limit 1000 | |
]; | |
Lead[] toUpdate = new Lead[]{}; |
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
Map<String, Id> rank = new Map<String, Id>(); | |
Map<Id, User_Story__c> stories = new Map<Id, User_Story__c>([ | |
select Id, Customer_Story_ID__c, Customer_Story_Raw_Data__c | |
from User_Story__c | |
where Project__r.Name = 'projectname' | |
]); | |
for (User_Story__c us : stories.values()) { | |
if (String.isBlank(us.Customer_Story_Raw_Data__c)) continue; | |
Map<String, Object> data = (Map<String, Object>)JSON.deserializeUntyped(us.Customer_Story_Raw_Data__c); | |
// rally DragAndDropRank is not unique, so combine with id |
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
<apex:page showHeader="false" sidebar="false" expires="0" cache="false" docType="html" controller="TargetX_Base.TX_CommunitiesBase" extensions="AppStartController"> | |
<apex:composition template="{!defaultTemplate}"> | |
<!-- use head for extra css or important js before dom load --> | |
<apex:define name="head"/> | |
<!-- set subheading tag to disable the boilerplate heading --> | |
<apex:define name="subheader"/> | |
<apex:define name="content"> |
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
/* | |
* Author: Kevin O'Hara | |
* Date: 02/10/2012 | |
* | |
* Description: The Async class aims to circumvent a limitation of asynchronous (@future) | |
* methods in Salesforce. The current @future implementation will only allow for primitives | |
* or collections of primitives to be passed into an @future method. The Async class uses | |
* native JSON serialization/deserialization to allow for passing an SObject, or List<SObject> | |
* into an asynchronous method for DML operations. A helper method is also included for making | |
* the serialization processes simpler. |
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
Golang Requests per second: 6446.75 [#/sec] (mean) | |
Flask Requests per second: 1029.64 [#/sec] (mean) | |
gunicorn+wsgi Requests per second: 2164.54 [#/sec] (mean) |
NewerOlder