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
/** | |
* Module dependencies. | |
*/ | |
var querystring = require('querystring'), | |
util = require('util'), | |
OAuth2Strategy = require('passport-oauth').OAuth2Strategy; | |
function Strategy(options, verify) { | |
options = options || {}; |
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 fs = require("fs") | |
var ssl_options = { | |
key: fs.readFileSync('privatekey.pem'), | |
cert: fs.readFileSync('certificate.pem') | |
}; | |
var port = process.env.PORT || 3000; | |
var express = require('express'); | |
var ejs = require('ejs'); | |
var passport = require('passport') |
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 WizardExample { | |
public Contact c {get; set;} | |
public WizardExample(ApexPages.StandardController controller) { | |
//reference the contact from the standardcontroller | |
c = (Contact)controller.getRecord(); | |
} | |
public PageReference Step1() { |
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 AJAXRemoteController { | |
webService static String getContextUserName() { | |
return UserInfo.getFirstName(); | |
} | |
webService static List<Contact> getAllMyContactsWS() { | |
List<Contact> contacts = [SELECT ID, FirstName, LastName, Phone, MobilePhone, AssistantPhone from Contact]; | |
return contacts; |
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 DataPoint { | |
public Boolean isPrint {get; set;} | |
public Boolean isEmail {get; set;} | |
public Contact contactData {get; set;} | |
public DataPoint(Contact c) { | |
contactData = 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
public with sharing class TestController { | |
public String mainContactField {get; set;} | |
public TestController(ApexPages.StandardController std) { | |
Contact c = (Contact)std.getRecord(); | |
mainContactField = 'Phone'; | |
List<Contact> cWithRecords = [SELECT Id, Phone, MobilePhone, AssistantPhone, OtherPhone from Contact where ID = :c.Id]; | |
if(cWithRecords.size() > 0) { |
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 filterQuarks(spin,mass) { | |
remoteTest.filterQuarks(spin,mass,updateResults); | |
remoteTest.testDouble(logTemperatures); | |
} | |
function logTemperatures(result, event) { | |
console.log(result); | |
} | |
function updateResults(result, 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
JSONObject mechandise = new JSONObject(); | |
try { | |
if (name != null && !name.trim().equals("")) | |
mechandise.put("Name", name); | |
if (price != null && !price.trim().equals("")) | |
mechandise.put("Price__c", price); | |
if (desc != null && !desc.trim().equals("")) | |
mechandise.put("Description__c", desc); | |
if (inventory != null && !inventory.trim().equals("")) |
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="Contact"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"/> | |
<script src="https://ajax.microsoft.com/ajax/jquery.ui/1.8.5/jquery-ui.js"/> | |
<script src="http://malsup.github.com/jquery.blockUI.js" /> | |
<link rel="stylesheet" type="text/css" media="screen" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/base/jquery-ui.css" /> | |
<script> | |
j$ = jQuery.noConflict(); | |
function blockme() { |
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
RestResponse res = RestContext.response; | |
res.addHeader('Error','This is an Error'); | |
res.StatusCode = 400; | |
return null; |