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
Map<Id, Lead> ls = new Map<id, lead>([select Id, ConvertedAccountId, ConvertedContactId from Lead where IsConverted = true]); | |
Task[] ts = [select WhoId, WhatId, (select Id from TaskRelations) from Task where WhoId in :ls.keySet()]; | |
system.debug(ts.size()); | |
TaskRelation[] deletes = new TaskRelation[]{}; | |
TaskRelation[] inserts = new TaskRelation[]{}; | |
for (Task t : ts) { | |
for (TaskRelation tr : t.TaskRelations) { | |
deletes.add(tr); |
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
ConnectApi.ActionLinkGroupDefinitionInput defInput = new ConnectApi.ActionLinkGroupDefinitionInput(); | |
defInput.templateId = '07gB00000004CB9'; // Id for ActionLinkGroup | |
ConnectApi.ActionLinkGroupDefinition def = ConnectApi.ActionLinks.createActionLinkGroupDefinition(null, defInput); | |
ConnectApi.AssociatedActionsCapabilityInput actionCapabilityInput = new ConnectApi.AssociatedActionsCapabilityInput(); | |
actionCapabilityInput.actionLinkGroupIds = new String[]{def.id}; | |
// Add ActionLink to capability | |
ConnectApi.FeedElementCapabilitiesInput capabilitiesInput = new ConnectApi.FeedElementCapabilitiesInput(); |
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 showHeader="false" sidebar="false" standardController="Lead"> | |
<div style="overflow:scroll; width:100%; height:100%;"> | |
<object type="text/html" data="/lead/leadconvert.jsp?retURL=%2{!id}&id={!id}&isdtp=nv" | |
style="overflow:scroll; width:1200px; height:2400px;"> | |
</object> | |
</div> | |
</apex:page> |
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(){ | |
var o = {}; | |
o.open = function(clientId) { | |
o.clientId = clientId; | |
FDC.ForceOAuth.open(clientId); | |
}; | |
o.apiVersion = FDC.ForceOAuth.apiVersion; | |
o.makeRestCall = function (path, callback, error, method, payload, retry) { |
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
// this sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#000'); | |
var FDC = require('com.salesforce'); | |
Ti.API.debug("What what?"); | |
Ti.API.debug("Here is the FDC thingy\n" + JSON.stringify(FDC)); | |
var bWidth = "200"; | |
var view1 = Titanium.UI.createScrollView({ |
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
def time(fn: => Unit) = { | |
val start = System.currentTimeMillis | |
fn | |
println("%d ms".format(System.currentTimeMillis - start)) | |
} | |
import dispatch._ | |
import json._ | |
import JsHttp._ |
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
object GenTypeConstraints { | |
abstract class =:=|[F,A,B] extends (F => Either[A,B]) | |
object =:=| { | |
implicit def eqA[F,X]: =:=|[F,F,X] = new =:=|[F,F,X] {def apply(v:F) = Left(v)} | |
implicit def eqB[F,X]: =:=|[F,X,F] = new =:=|[F,X,F] {def apply(v:F) = Right(v)} | |
} | |
def main(args: Array[String]) { | |
println(f(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
package pomu0325.model; | |
import static org.hamcrest.CoreMatchers.is; | |
import static org.junit.Assert.assertThat; | |
import org.junit.Test; | |
import org.slim3.datastore.Datastore; | |
import org.slim3.datastore.S3QueryResultList; | |
import org.slim3.tester.AppEngineTestCase; |
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.util.Date | |
import java.text.SimpleDateFormat | |
import java.net.URL | |
import scala.xml._ | |
import scala.xml.parsing.XhtmlParser | |
import scala.io.Source | |
case class User( userId:Int, nickname:String, twitterId:Option[String], join:Boolean = true ) | |
class Event( eventId:String, eventXml:Node ) { | |
lazy val usersXml = XML.load( new URL( "http://api.atnd.org/events/users/?event_id=%s" format eventId )) |