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 docType="html-5.0" sidebar="false" showHeader="false" | |
standardStylesheets="false" cache="true"> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"/> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> | |
<script type="text/javascript"> | |
var SESSION_ID = '{!$Api.Session_ID}'; | |
var serverURL = '{!SUBSTITUTE(SUBSTITUTE(LEFT($Api.Partner_Server_URL_210, FIND( '/services', $Api.Partner_Server_URL_260)), 'visual.force', 'salesforce'), 'c.', '')}'; |
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:chart height="300" width="300" data="{!data}”> | |
<apex:axis type="Category" position="bottom" fields="ctype"> | |
<apex:chartLabel rotate="270"/> | |
</apex:axis> | |
<apex:axis type="Numeric" position="left" fields="cval"/> | |
<apex:barSeries axis="left" orientation="vertical" xField="ctype" yField="cval"> | |
<apex:chartTips rendererFn="renderer"/> | |
</apex:barSeries> | |
</apex:chart> |
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
// Client JS | |
$.ajax({ | |
cache: false, | |
dataType: 'jsonp', | |
url: 'https://MY_JSONP_SERVER/jsonp?sid='+SID_HERE+'&path='+REST_RESOURCE, | |
success: function(data){ | |
console.log(JSON.stringify(data)); | |
} | |
}); |
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
// Client iframe container | |
<iframe id="xdwin" width="0px" height="0px" src="PROXY_SERVER/xd"></iframe> | |
<script> | |
window.addEventListener('message',function(event) { | |
if(event.origin !== ALLOWED_ORIGIN) return; | |
console.log(JSON.stringify(event.data)); | |
},false); | |
function postMessage(e) { | |
var win = document.getElementById("xdwin").contentWindow; |
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
<!--// MAIN PAGE //--> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Oauth Tester</title> | |
<link rel="stylesheet" href="https://app.divshot.com/css/bootstrap.css"> | |
<script type="text/javascript"> | |
var CLIENT_ID = ''; | |
var CALLBACK_URL = ''; |
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
<?php | |
function decrypt_data($data, $iv, $key) { | |
$cypher = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, ''); | |
if(is_null($iv)) { | |
$ivlen = mcrypt_enc_get_iv_size($cypher); | |
$iv = substr($data, 0, $ivlen); | |
$data = substr($data, $ivlen); | |
} |
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="searchAccounts" sidebar="false" > | |
<apex:sectionHeader title="Convert Prospect" subtitle="Account Search and Create"/> | |
<apex:form id="form"> | |
<apex:pageBlock id="crit_block"> | |
<apex:pageblockSection columns="7" id="crit"> | |
<apex:pageBlockSectionItem > | |
<apex:outputLabel value="Account Name:"/> | |
<apex:inputText value="{!name}" onkeypress="return noenter();"/> | |
</apex:pageBlockSectionItem> | |
<apex:pageBlockSectionItem id="buttons"> |
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 without sharing class searchAccounts { | |
public String name { get; set; } | |
public String op { get; set; } | |
public String mdId { get; set; } | |
public String accId {get; set;} | |
public Account acc {get; set;} | |
public List<Acc> accs { get; set; } | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="React by Example - Components"> | |
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet" type="text/css" /> | |
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> | |
<script src="http://fb.me/react-with-addons-0.14.3.js"></script> | |
<script src="http://fb.me/react-dom-0.14.3.js"></script> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> |
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
global class Email2Case implements Messaging.InboundEmailHandler { | |
global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope envelope) { | |
Messaging.InboundEmailResult result = new Messaging.InboundEmailresult(); | |
String body = email.plainTextBody; | |
Case newCase = new Case(); | |
newCase.SuppliedEmail = parse(body,'EMAIL:',false); | |
newCase.SuppliedName = parse(body,'LAST NAME:',false); | |
newCase.Description = 'Accepted Terms: ' + parse(body,'ACCEPTED TERMS',false) + ' Receive Further Info: ' + parse(body,'RECEIVE FURTHER INFO',false) + ' ' + parse(body,'MESSAGE:',true); | |
newCase.Subject = 'Email from ' + parse(body,'EMAIL:',false); | |
insert newC |
OlderNewer