Skip to content

Instantly share code, notes, and snippets.

Taiki Yoshikawa tyoshikawa1106

Block or report user

Report or block tyoshikawa1106

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tyoshikawa1106
tyoshikawa1106 / CommonUtil.cls
Created Mar 21, 2018
Apex Get Random Value
View CommonUtil.cls
public with sharing class CommonUtil {
/**
* ランダム値取得
*/
public static Integer getRandomNumber(Integer upperLimit) {
if (upperLimit == null || upperLimit <= 0) {
return 0;
}
View SLDS_SVG.page
<apex:page showHeader="true">
<apex:slds />
<div xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<div class="slds-m-around--Large">
<a class="slds-button slds-button--brand" >
<svg class="slds-button__icon slds-button__icon--left" aria-hidden="true">
<use xlink:href="{!URLFOR($Asset.SLDS, '/assets/icons/utility-sprite/svg/symbols.svg#edit')}"></use>
</svg>編集
</a>
</div>
View apex-demo-only-scroll
<apex:page showHeader="true" standardStylesheets="true">
<apex:slds />
<div class="demo-only" style="height:240px;">
<div class="slds-scrollable--x">
<div class="slds-grid slds-grid--overflow">
<div class="slds-col">
<p>Sit nulla est ex deserunt exercitation anim occaecat. Nostrud ullamco deserunt aute id consequat veniam incididunt duis in sint irure nisi. Mollit officia cillum Lorem ullamco minim nostrud elit officia tempor esse quis.</p>
</div>
<div class="slds-col">
<p>Sit nulla est ex deserunt exercitation anim occaecat. Nostrud ullamco deserunt aute id consequat veniam incididunt duis in sint irure nisi. Mollit officia cillum Lorem ullamco minim nostrud elit officia tempor esse quis.</p>
@tyoshikawa1106
tyoshikawa1106 / PostalCodeSearch.page
Created Jan 29, 2017
Visualforce × Postal Code Search
View PostalCodeSearch.page
<apex:page showHeader="true" sidebar="true">
<apex:slds rendered="true" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://ajaxzip3.github.io/ajaxzip3.js" charset="UTF-8"></script>
<style>
.postal-code-input {
width: 200px !important;
}
</style>
<div class="slds">
View UserWebService.cls
global with sharing class UserWebService {
WebService static String changeLanguage() {
try {
// ログインユーザの情報取得
User user = getLoginUserInfo();
// 現在の言語の判定と変更後の言語をセット
user = setUserLanguage(user);
// 更新
update user;
@tyoshikawa1106
tyoshikawa1106 / sample.page
Last active Sep 24, 2016
Visualforce × Bootstrap サンプル
View sample.page
<apex:page showHeader="true" sidebar="true" id="page">
<apex:includeScript value="https://code.jquery.com/jquery-2.2.4.min.js" />
<apex:stylesheet value="{!URLFOR( $Resource.Bootstrap337, 'dist/css/bootstrap.css' )}" />
<apex:includeScript value="{!URLFOR( $Resource.Bootstrap337, 'dist/js/bootstrap.min.js' )}"/>
<!-- App -->
<div class="myBootstrap">
<!-- alert -->
<div class="alert alert-success" role="alert">Success!!</div>
<div class="alert alert-info" role="alert">Info!!</div>
<div class="alert alert-warning" role="alert">Warning!!</div>
@tyoshikawa1106
tyoshikawa1106 / 01_InterfaceSample.cls
Created Sep 5, 2016
Apexとインターフェイスクラス
View 01_InterfaceSample.cls
public interface InterfaceSample {
String sampleMethod1();
String sampleMethod2(Integer num);
}
@tyoshikawa1106
tyoshikawa1106 / 01_ExEmployee.cls
Created Sep 5, 2016
Apex abstract サンプル
View 01_ExEmployee.cls
public abstract with sharing class ExEmployee {
/**
* コンストラクタ
*/
public ExEmployee() {
}
private String name;
@tyoshikawa1106
tyoshikawa1106 / 01_Employee.cls
Created Sep 5, 2016
オブジェクト指向サンプル - Apex
View 01_Employee.cls
public virtual with sharing class Employee {
// 社員名
private String name;
// 役職
private String position;
/**
* コンストラクタ
*/
@tyoshikawa1106
tyoshikawa1106 / 01_Employee.java
Last active Sep 5, 2016
オブジェクト指向サンプル - Java
View 01_Employee.java
package jp.co.bbreak.sokusen._1._8._3;
public class Employee {
// 社員名
private String name;
// 役職
private String position;
// 社員名のゲッタ
public String getName() {
return name;
You can’t perform that action at this time.