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 AuthCallout { | |
public void basicAuthCallout(){ | |
HttpRequest req = new HttpRequest(); | |
req.setEndpoint('http://www.yahoo.com'); | |
req.setMethod('GET'); | |
// Specify the required user name and password to access the endpoint | |
// As well as the header and header information | |
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
<input class="input-field" /> | |
$(".input-field").on("keyup blur",function(event){ | |
var valStr = $(this).val(); | |
if($.trim(valStr) == '.' || $.trim(valStr) == '-'){ | |
return true; | |
} | |
if(isNumeric(valStr)){ |
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 | |
define('MAILGUN_URL', 'https://api.mailgun.net/v3/DOMAIN_NAME'); | |
define('MAILGUN_KEY', 'KEY'); | |
function sendmailbymailgun($to,$toname,$mailfromnane,$mailfrom,$subject,$html,$text,$tag,$replyto){ | |
$array_data = array( | |
'from'=> $mailfromname .'<'.$mailfrom.'>', | |
'to'=>$toname.'<'.$to.'>', | |
'subject'=>$subject, | |
'html'=>$html, |
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 DeferredTest { | |
@RemoteAction | |
public static String remoteActionOne(){ | |
return 'one'; | |
} | |
@RemoteAction | |
public static String remoteActionTwo(){ | |
return 'two'; | |
} |
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 delay = (function(){ | |
var timer = 0; | |
return function(callback,param, ms){ | |
clearTimeout (timer); | |
timer = setTimeout(function(){ | |
callback(param); | |
}, ms); | |
}; | |
})(); |
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 ts = ts || {}; | |
var sortStatus = {}; | |
ts.getValue = function(tdElem){ | |
var inputElemLst = $(tdElem).find("input:not([type='hidden']):first"); | |
return inputElemLst.length ? inputElemLst.val() : $(tdElem).text(); | |
}; | |
ts.handleSortClick = function(event){ |
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
<project name="Sample usage of Salesforce Ant tasks" default="test" basedir="." xmlns:sf="antlib:com.salesforce"> | |
<property file="build.properties"/> | |
<property environment="env"/> | |
<taskdef resource="com/salesforce/antlib.xml" uri="antlib:com.salesforce"> | |
<classpath> | |
<pathelement location="../ant-salesforce.jar" /> | |
</classpath> | |
</taskdef> |
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> | |
<title>Bootstrap Example</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="https://rawgit.com/wenzhixin/bootstrap-table/master/src/bootstrap-table.css"/> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> | |
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> |
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 people, asc1 = 1, | |
asc2 = 1, | |
asc3 = 1; | |
function sort_table(col, asc) { | |
actualData = document.getElementById("actualData"); | |
var rows = actualData.rows, | |
rlen = rows.length, | |
arr = new Array(), | |
arrshow= new Array(), |
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 method return the String value for the Label Name | |
public String getLabelString(String labelName ){ | |
Component.Apex.OutputText output = new Component.Apex.OutputText(); | |
output.expressions.value = '{!$Label.' + labelName + '}'; | |
return String.valueOf(output.value); | |
} |