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 homepage = ` | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<title>Simple Server</title> | |
</head> | |
<body> |
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
// Karma configuration | |
// Generated on Tue Mar 15 2016 16:19:43 GMT+0900 (JST) | |
module.exports = function(config) { | |
config.set({ | |
// base path that will be used to resolve all patterns (eg. files, exclude) | |
basePath: '', | |
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 class UpdateParentAccount implements Queueable { | |
private List<Account> accounts; | |
private ID parent; | |
public UpdateParentAccount(List<Account> records, ID id) { | |
this.accounts = records; | |
this.parent = 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
public class LeadProcessor implements Database.Batchable<sObject>, Database.Stateful { | |
/** | |
* コンストラクタ | |
*/ | |
public LeadProcessor() { | |
} | |
/** |
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 class AccountProcessor { | |
@future | |
public static void countContacts(List<Id> accountIds) { | |
List<Account> accounts = [SELECT Id,(SELECT Id FROM Contacts) FROM Account WHERE Id IN: accountIds]; | |
for (Account a : accounts) { | |
a.Number_of_Contacts__c = a.Contacts.size(); | |
} | |
if (!accounts.isEmpty()) { | |
update accounts; |
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
User loginUser = [SELECT Id,Username,FirstName,LastName FROM User WHERE Id =: UserInfo.getUserId() LIMIT 1]; | |
Site.validatePassword(loginUser, this.newPassword, this.verifyNewPassword); |
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
ProcessInstance p = [ | |
SELECT | |
Id | |
,CompletedDate | |
,LastActorId | |
,ProcessDefinitionId | |
,Status | |
,TargetObjectId | |
,(SELECT Id,ActorId,Comments,IsPending,OriginalActorId,ProcessInstanceId,ProcessNodeId,StepStatus,TargetObjectId FROM StepsAndWorkitems) | |
FROM |
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
<aura:component implements="flexipage:availableForAllPageTypes,force:appHostable"> | |
<forceChatter:fullFeed /> | |
</aura:component> |
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 standardStylesheets="false" showHeader="false" applyHtmlTag="false" applyBodyTag="false"> | |
<head> | |
<!-- meta --> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<!-- lightning desin system --> | |
<apex:stylesheet value="{!URLFOR($Resource.SLDS0122, 'assets/styles/salesforce-lightning-design-system.css')}" /> | |
</head> | |
<body> | |
<!-- main --> | |
<div class="slds-m-around--medium"> |
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 > | |
<script type="text/javascript"> | |
(function(){ | |
beenFocused = true; | |
////var maxStringSize = 6000000; // Maximum String size is 6,000,000 characters | |
var MAX_FILE_SIZE = 1000000; // After Base64 Encoding, this is the max file size [Check! 1MB!] | |
var MAX_FILE_CNT = 2; // Upload File Count | |
var CHUNK_SIZE = 950000; // Maximum Javascript Remoting message size is 1,000,000 characters |