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
package jp.co.bbreak.sokusen._1._8._3; | |
public class Employee { | |
// 社員名 | |
private String name; | |
// 役職 | |
private String position; | |
// 社員名のゲッタ | |
public String getName() { | |
return name; |
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 target = 'Helloooooooooooo!!'; | |
String result = ''; | |
// subString | |
result = target.substring(0, 5) + '...'; | |
System.debug('subString : ' + result + ' (' + result.length() + ')'); | |
// abbreviate | |
result = target.abbreviate(8); | |
System.debug('abbreviate : ' + result + ' (' + result.length() + ')'); |
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 gulp = require('gulp'); | |
var zip = require('gulp-zip'); | |
var forceDeploy = require('gulp-jsforce-deploy'); | |
var fs = require('fs'); | |
var path = require('path'); | |
var rename = require("gulp-rename"); | |
// function.getFolders | |
var getFolders = function (dir) { | |
return fs.readdirSync(dir) |
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> | |
<aura:attribute name="expense" type="Expense__c"/> | |
<p>Amount: | |
<ui:outputCurrency value="{!v.expense.Amount__c}"/> | |
</p> | |
<p>Client: | |
<ui:outputText value="{!v.expense.Client__c}"/> | |
</p> |
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 > | |
<aura:attribute name="item" type="Camping_Item__c" required="true" /> | |
<aura:attribute name="packed" type="Boolean" default="false"/> | |
<ui:outputText value="{!v.item.Name}" /> | |
<ui:outputCheckbox value="{!v.item.Packed__c}" /> | |
<ui:outputCurrency value="{!v.item.Price__c}" /> | |
<ui:outputNumber value="{!v.item.Quantity__c}" /> | |
<ui:button label="Packed!" press="{!c.packItem}" disabled="{!v.Packed}" /> | |
</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
public with sharing class StringFormatDemoController { | |
public StringFormatDemoController() { | |
this.demo01(); | |
this.demo02(); | |
} | |
private void demo01() { | |
String placeholder = 'Hello {0}, {1} is cool!'; | |
List<String> fillers = new String[]{'Jason','Apex'}; |
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(', ')); | |
} | |
} |