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
const Papa = require("papaparse"); | |
const fs = require("fs"); | |
const FILE_NAME = "leads_modified_last7_days.csv"; | |
const COLUMN_NAME = "LastModifiedById"; | |
const file = fs.createReadStream(FILE_NAME); | |
const createdByIdCount = {}; | |
let count = 0; |
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
List<Schema.SObjectField> flds = Schema.sObjectType.Lead.fields.getmap().values(); | |
List<String> selectFields = new List<String>(); | |
for (Schema.SObjectField fld : flds) { | |
Schema.DescribeFieldResult fldDesc = fld.getDescribe(); | |
if (fldDesc.isCreateable() == true) { | |
selectFields.add(fldDesc.getName()); | |
} | |
} |
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
convertCensusResToObject: function(arrayResponse){ | |
//The first row is always going to the the headers/keys | |
var headers = arrayResponse[0]; | |
//Define array that will contain results as javascript objects | |
var objectResponse = []; | |
//Loop through the "rows" of data, start at index 1 as 0 is header row | |
for(var i = 1; i < arrayResponse.length; i++){ |
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
// See the question in the callback function | |
function getContacts() { | |
var accountId; | |
//Some code that dynamically sets accountId would be here | |
$.get("/contacts.json?accountId=" + accountId, function( data ) { //This is an asynchronous callback function | |
/*This inside an anonymous function executing asynchronously in a seperate context from when getContacts() |
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
Feb 28 11:38:21 Jasons-iPhone Chatter[276] <Warning>: Received memory warning. | |
Feb 28 11:38:21 Jasons-iPhone MobileMail[268] <Notice>: 2014-02-28 11:38:21.616 MobileMail[268:43815]: The connection to ACDAccountStore was interrupted. | |
Feb 28 11:38:21 Jasons-iPhone MobileMail[268] <Notice>: 2014-02-28 11:38:21.622 MobileMail[268:43815]: The connection to ACDAccountStore was interrupted. | |
Feb 28 11:38:21 Jasons-iPhone MobileMail[268] <Notice>: xpc __securityd_create_connection_block_invoke got event: Connection interrupted | |
Feb 28 11:38:21 Jasons-iPhone apsd[81] <Notice>: xpc __securityd_create_connection_block_invoke got event: Connection interrupted | |
Feb 28 11:38:21 Jasons-iPhone kernel[0] <Debug>: ttyioss7000002: enqueueData rtn (e00002d7) | |
Feb 28 11:38:21 Jasons-iPhone com.apple.launchd[1] (com.apple.librariand[265]) <Notice>: (com.apple.librariand) Idle-exit job was jettisoned. Will bypass throttle interval for next on-demand launch. | |
Feb 28 11:38:21 Jasons-iPhone com.apple.launchd[1] (com.apple.librariand[265]) |
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
//Determin if this is SF1 app | |
public static Boolean isSF1(){ | |
if(!Utils.checkNullOrBlank(ApexPages.currentPage().getParameters().get('sfdcIFrameHost')) || | |
!Utils.checkNullOrBlank(ApexPages.currentPage().getParameters().get('sfdcIFrameOrigin')) || | |
ApexPages.currentPage().getParameters().get('isdtp') == 'p1' || | |
(ApexPages.currentPage().getParameters().get('retURL') != null && ApexPages.currentPage().getParameters().get('retURL').contains('projectone') ) | |
){ | |
return true; | |
}else{ | |
return false; |
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
List<Object> fieldList = (List<Object>)JSON.deserializeUntyped('[{"field":"phone","object":"account"},{"field":"name","object":"account"}]'); | |
for(Object fld : fieldList){ | |
Map<String,Object> data = (Map<String,Object>)fld; | |
//Magic! | |
system.debug(data.get('field')); | |
} |
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
if(this is a condition) | |
} | |
then I should probably put brackets | |
} | |
else | |
{ | |
all over the place | |
} | |
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
node_modules |
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 http = require('http'); | |
var extensions = ['com', 'ac', 'ad', 'ae', 'com.af', 'com.ag', 'com.ai', 'am', 'it.ao', | |
'com.ar', 'as', 'at', 'com.au', 'az', 'ba', 'com.bd', 'be', 'bf', 'bg', 'com.bh', 'bi', | |
'bj', 'com.bn', 'com.bo', 'com.br', 'bs', 'co.bw', 'com.by', 'com.bz', 'ca', 'com.kh', | |
'cc', 'cd', 'cf', 'cat', 'cg', 'ch', 'ci', 'co.ck', 'cl', 'cm', 'cn', 'com.co', 'co.cr', | |
'com.cu', 'cv', 'cz', 'de', 'dj', 'dk', 'dm', 'com.do', 'dz', 'com.ec', 'ee', 'com.eg', | |
'es', 'com.et', 'fi', 'com.fj', 'fm', 'fr', 'ga', 'gd', 'ge', 'gf', 'gg', 'com.gh', | |
'com.gi', 'gl', 'gm', 'gp', 'gr', 'com.gt', 'gy', 'com.hk', 'hn', 'hr', 'ht', 'hu', | |
'co.id', 'iq', 'ie', 'co.il', 'im', 'co.in', 'io', 'is', 'it', 'je', 'com.jm', 'jo', | |
'co.jp', 'co.ke', 'com.kh', 'ki', 'kg', 'co.kr', 'com.kw', 'kz', 'la', 'com.lb', |