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 with sharing class MyExtension { | |
public Boolean showPanel {get; set;} | |
public String inputValue {get; set;} | |
public MyExtension(ApexPages.StandardController controller) { | |
inputValue = ''; | |
showPanel = true; | |
} |
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 Controller="DataController" showHeader="false" standardStylesheets="false"> | |
<apex:includeScript value="{!URLFOR($Resource.HTML5Util, 'jquery.min.js')}" /> | |
<apex:includeScript value="{!$Resource.jQote2}"/> | |
<script type="text/javascript"> | |
j$ = jQuery.noConflict(); | |
j$(document).ready( | |
function() { | |
DataController.getRecords(function(result, event) { | |
j$('#contactList').jqoteapp('#contacts_tmpl', result); |
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
<?xml version="1.0" encoding="utf-8"?> | |
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" | |
xmlns:mx="library://ns.adobe.com/flex/mx" | |
xmlns:salesforce1="com.salesforce.*" | |
creationComplete="login();" | |
> | |
<fx:Declarations> | |
<salesforce1:Connection id="force" /> | |
</fx:Declarations> |
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
<!Doctype html> | |
<HTML> | |
<HEAD> | |
<script src="jQuery-1.5.1.min.js" ></script> | |
<script src="jQuery.jQote2.min.js" ></script> | |
<script type="text/javascript"> | |
j$ = jQuery.noConflict(); | |
j$(document).ready( | |
function() { | |
j$('#contacts_tmpl').load('test_template.js', function() { |
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
#create initial JSON file | |
touch ${1%.*}.json | |
echo '{ "BlueButtonData" : {' > ${1%.*}.json | |
echo '"Conversion Data": "Converted by BlueConverter",' >> ${1%.*}.json | |
#read ASCII data file | |
blackcats="MY HEALTHEVET PERSONAL INFORMATION REPORT,DOWNLOAD REQUEST SUMMARY" | |
arraykeys="Contact First Name:Contacts,Provider Name:Providers,Facility Name:Facilities,Health Insurance Company:Companies,Date/Time:Appointments,Medication:Medications,Category:Medications,Allergy Name:Allergies,Medical Event:Events,Immunization:Immunizations,Test Name:Tests,Measurement Type:Measurements,Event Title:Events" | |
militarycategories="Regular Active Service,Reserve/Guard Association Periods,Reserve/Guard Activation Periods,Deployment Periods,DoD MOS/Occupation Codes,Military/Combat Pay Details,Separation Pay Details,Retirement Periods,DoD Retirement Pay" |
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
@RestResource(urlMapping='/FieldCase/*') | |
global class ApexRESTUpdate { | |
//Note we no longer need to include RestRequest and RestResponse as incoming parameters | |
//The static RestContext has request and response properties instead | |
@HttpGet | |
global static List<Case> getOpenCases() { | |
String companyName = RestContext.request.params.get('companyName'); | |
Account company = [ Select ID, Name, BillingState from Account where Name = :companyName]; | |
List<Case> cases = [SELECT Id, Subject, Status, OwnerId, Owner.Name from Case WHERE AccountId =: company.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
#!/usr/bin/env python | |
def gmail_checker(username,password): | |
import imaplib,re | |
i=imaplib.IMAP4_SSL('imap.gmail.com') | |
try: | |
i.login(username,password) | |
x,y=i.status('INBOX','(MESSAGES UNSEEN)') | |
messages=int(re.search('MESSAGES\s+(\d+)',y[0]).group(1)) | |
unseen=int(re.search('UNSEEN\s+(\d+)',y[0]).group(1)) | |
return (messages,unseen) |
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 with sharing class KennelTest { | |
public Dog__c exampleDog {get; set;} | |
public Attachment dogImage {get; set;} | |
public String getImageBase64() { | |
if(dogImage.Body != null) { | |
return EncodingUtil.base64Encode(dogImage.Body); | |
} else { | |
return ''; | |
} |
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
j$ = jQuery.noConflict(); | |
j$(document).ready(function() { | |
j$.cometd.configure({ | |
url:'https://'+window.location.hostname+'/cometd/23.0', | |
requestHeaders: {"Authorization": "OAuth {!$Api.Session_ID}"} | |
}); | |
j$.cometd.init(); | |
j$.cometd.subscribe('/topic/AllDogs', function(message) { |
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
var port = process.env.PORT || 3000; | |
var fs = require('fs'); | |
var express = require('express'); | |
var passport = require('passport') | |
, OAuthStrategy = require('passport-oauth').OAuth2Strategy; | |
passport.serializeUser(function(user, done) { | |
done(null, user); | |
}); |