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
| String requestBody = '{'; | |
| requestBody += ' "tests": ['; | |
| requestBody += ' {'; | |
| requestBody += ' "classId": "01p10000001lEPV",'; | |
| requestBody += ' "testMethods": ["Summer16ApexDemoControllerTest1","doSerializeJsonTest1", "doSerializePrettyJsonTest1"]'; | |
| requestBody += ' }'; | |
| requestBody += ' ]'; | |
| requestBody += '}'; | |
| System.debug(requestBody); |
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> | |
| <title>Redux basic example</title> | |
| <script src="https://npmcdn.com/redux@latest/dist/redux.min.js"></script> | |
| </head> | |
| <body> | |
| <div> | |
| <p> | |
| Clicked: <span id="value">0</span> times |
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="jQueryDeferredDemoController" sidebar="false"> | |
| <apex:includeScript value="https://code.jquery.com/jquery-2.2.3.min.js" /> | |
| <apex:stylesheet value="{!URLFOR($Resource.SLDS100, 'assets/styles/salesforce-lightning-design-system-vf.css')}" /> | |
| <apex:include pageName="jQueryDeferredDemoCss" /> | |
| <div id="vf-page" class="slds"> | |
| <div xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | |
| <apex:form id="form"> | |
| <button class="slds-button slds-button--brand" id="submitBtn">Demo</button> | |
| <div class="view-panel box-shadow slds-m-top--small"> | |
| <div id="target"></div> |
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
| batch.on("response", function(rets) { // fired when batch finished and result retrieved | |
| console.log('response'); | |
| console.log(rets); | |
| for (var i=0; i < rets.length; i++) { | |
| if (rets[i].success) { | |
| console.log("#" + (i+1) + " loaded successfully, id = " + rets[i].id); | |
| } else { | |
| console.log("#" + (i+1) + " error occurred, message = " + rets[i].errors.join(', ')); | |
| } | |
| } |
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); |