WinmergeツールでExcel比較する手順共有
1.Winmergeインストール
https://winmergejp.bitbucket.io/
最新版をインストールする。
今回インストールしたバージョン
Version 2.16.4.9 Japansese + jp-9 X64
2.「プラグイン」メニュー → プラグインの設定 → 「プラグインを有効にする」チェックする。→「OK」ボタン押下する。
3. 「プラグイン」メニュー → 自動展開
4.比較したファイルを比較する。
kinkun's blog
WinmergeツールでExcel比較する手順共有
1.Winmergeインストール
https://winmergejp.bitbucket.io/
最新版をインストールする。
今回インストールしたバージョン
Version 2.16.4.9 Japansese + jp-9 X64
2.「プラグイン」メニュー → プラグインの設定 → 「プラグインを有効にする」チェックする。→「OK」ボタン押下する。
3. 「プラグイン」メニュー → 自動展開
4.比較したファイルを比較する。
Queueable インターフェースについて共有します。
特徴
・ジョブの監視可
・2つのジョブの連続的な処理可
使用方法
・ Queueable クラス作成
public class MyQueueableClass implements Queueable {
以下はメソッド
public void execute(QueueableContext context) {
// Your code here
}
・ Queueable クラス呼び出し
ID jobID = System.enqueueJob(new MyQueueableClass());
例
・ Queueable クラス作成
public class AsyncExecutionExample implements Queueable {
public void execute(QueueableContext context) {
Account a = new Account(Name='Acme',Phone='(415) 555-1212');
insert a;
}
}
・ Queueable クラス呼び出し
ID jobID = System.enqueueJob(new AsyncExecutionExample());
・ジョブ監視
AsyncApexJob jobInfo = [SELECT Status,NumberOfErrors FROM AsyncApexJob WHERE Id=:jobID];
・テストクラス
@isTest
public class AsyncExecutionExampleTest {
static testmethod void test1() {
// startTest/stopTest block to force async processes
// to run in the test.
Test.startTest();
System.enqueueJob(new AsyncExecutionExample());
Test.stopTest();
// Validate that the job has run
// by verifying that the record was created.
// This query returns only the account created in test context by the
// Queueable class method.
Account acct = [SELECT Name,Phone FROM Account WHERE Name='Acme' LIMIT 1];
System.assertNotEquals(null, acct);
System.assertEquals('(415) 555-1212', acct.Phone);
}
}
API検証時によく使うpostmanツールについて共有します。
以下のURLでダウンロードする。
https://www.getpostman.com/downloads/
今回はREST API JSONでGETコマンドで確認しました。
タブ「New」選択→「Request」選択する。
Request Nameを登録する。
例えば、RequestTest
「GET」選択する。GETは該当サーバから必要な情報を取得時に使います。
※注意点
「GET」はParameterが存在する場合には、「POST」を使う。
例、GETはURLに付加してリクエストします
例、POSTはBodyに含めてリクエストします。
End Pointを入力します。
例えば、https://xxx.xxx
必要に応じじて、以下を登録する。
・Params
key = xxxx
・Authorization
例えば、Basic Auth
Postmanでは、Basic Authは64 Encodeします。
・Headers
・Body
用意ができたら、「Send」ボタン押下する。
正常であれば、画面下の「Response」欄にBodyの内容が表示される。
SalesforceのmapクラスのkeySetメソッドについて共有します。
対応付けのすべてのキーを含むセットを返します。
Map<String, String> colorCodes = new Map<String, String>();
colorCodes.put('Red', 'FF0000');
colorCodes.put('Blue', '0000A0');
Set <String> colorSet = new Set<String>();
colorSet = colorCodes.keySet();
System.debug('colorSet:'+colorSet);
結果
colorSet:{Blue, Red}
SalesforceのStringリストのメソッドremoveについて共有します。
remove(index)
指定されたインデックスに保存されたリスト要素を削除し、削除された要素を返します。
例
List<String> colors = new String[3];
colors[0] = 'Red';
colors[1] = 'Blue';
colors[2] = 'Green';
String s1 = colors.remove(2);
system.assertEquals('Green', s1);
0.visual studio codeをインストールする。
https://code.visualstudio.com/?wt.mc_id=DX_841432
1.Salesforce CLI インストール
ダウンロードして、インストールする。
2.1.をインストールしたら、コマンドプロンプトで以下のコマンドインストールを確認する。
sfdx plugins --core
3.vs codeに拡張機能をインストールする。
https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode
4.ローカルにプロジェクトを作成
vs codeを起動する。
表示 → コマンドパレット → sfdx: Create Project with Manifestを選択→フォルダ名入力(例えば、testproject)→Enterキー押下
選択すると、ローカル画面が表示される。
例えば、入力したフォルダ名を置くフォルダを選択、例えば「Project」ファルダを選択してして、「プロジェクト作成」ボタン押下する。
5.Salesforce組織とつなげる。
vs code画面にて、表示 → コマンドパレット → sfdx: Authorize an Org選択する。
Production/Sandboxどちらを選択する。
Salesforceログイン画面が表示されるが、ログインする。
6.メータデータ取得
vs codeにて、package.xmlの右クリックして、SFDX: Retrieve Source from Org選択する。
するとメータデータを取得される。
7.ソースコードを組織にDeploy
該当ソースコードに変更し、右クリックして、SFDX: Deploy from to Orgを選択する。
SalesforceのユーザIDを入力する欄があるので、入力する。
vscodeのforcecode拡張で開発手順
1.vscodeインストールする。
https://code.visualstudio.com/download
2.forcecode拡張インストール
vscode起動して、左サイドメニュー「Extentions」押下する。
検索欄に「forcecode」を入力して、「install」ボタン押下する。
3.メニュー → 表示 → コマンド パレット → ForceCode: Create Project押下
フォルダー選択画面が開くので、フォルダーを作成する。
例えば、C:\workspace\TestProject
C:\workspace直下に、TestProjectフォルダーを作成し、TestProjectフォルダーにて、「Create Project」ボタン押下する。
4.vscodeに戻るので、戻ると、New Org押下 → Production / Sandbox選択する。
Salesforceログイン画面が開くので、ユーザ名とパスワードを入力し、「ログイン」ボタン押下する。
5.vscode画面にて、 メニュー → 表示 → コマンド パレット → ForceCode: Get Class, Page or Trigger 押下する。
取得するモジュールをチェックして、「OK」ボタン押下する。
6.例えば、編集したクラスを表示して編集し、保存する。
組織にて反映されていることを確認する。
7.組織にて、編集したいクラスを表示して編集し、保存する。
vscodeにて、該当クラスにて、マウス右クリックして、「Forcecode: Refresh From Server」押下して、反映されているこを確認する。
Json形式
{ "name": "Tanaka" }{
"age": 26,
"pi": 3.14,
"planck_constant": 6.62607e-34
}
{
"name": null
}
{
"active_flag": true,
"delete_flag": false
}
{
"user_info": {
"user_id": "A1234567",
"user_name": "Yamada Taro"
}
}
{
"color_list": [ "red", "green", "blue" ],
"num_list": [ 123, 456, 789 ],
"mix_list": [ "red", 456, null, true ],
"array_list": [ [ 12, 23 ], [ 34, 45 ], [ 56, 67 ] ],
"object_list": [
{ "name": "Tanaka", "age": 26 },
{ "name: "Suzuki", "age": 32 }
]
}
jsonデータ 例
{
"movies": [
{"id": 1, "name": "The Godfather", "director":"Francis Ford Coppola", "rating": 9.1},
{"id": 2, "name": "Casablanca", "director": "Michael Curtiz", "rating": 8.8}
]
}
[
{
"id": 1,
"name": "The Godfather",
"director": "Francis Ford Coppola",
"rating": 9.1
},
{
"id": 2,
"name": "Casablanca",
"director": "Michael Curtiz",
"rating": 8.8
}
]
idとPWで一行でログイン方法
sandboxの場合
https://test.salesforce.com/?un=sfdcid&pw=sfdcpw
本番の場合
https://login.salesforce.com/?un=sfdcid&pw=sfdcpw
1.Google拡張機能で、以下をインストール
Restlet Client – REST API Testing
2.例
<Request>
GET
https://map.yahooapis.jp/weather/V1/place?appid={アプリケーションID}&coordinates={緯度、経度}
<Response>
HTTP/1.1 200
status: 200
date: Wed, 11 Sep 2019 07:52:52 GMT
x-frame-options: SAMEORIGIN
cache-control: public, max-age=113
expires: Wed, 11 Sep 2019 07:54:45 GMT
vary: Accept-Encoding
content-encoding: gzip
content-length: 564
content-type: application/xml; charset=UTF-8
age: 0
via: http/1.1 edge2469.img.djm.yahoo.co.jp (ApacheTrafficServer [c sSf ])
server: ATS
<?xml version="1.0" encoding="UTF-8"?>
<YDF xmlns="http://olp.yahooapis.jp/ydf/1.0" firstResultPosition="1" totalResultsAvailable="1" totalResultsReturned="1">
<ResultInfo>
<Count>1</Count>
<Total>1</Total>
<Start>1</Start>
<Status>200</Status>
<Latency>0.004252</Latency>
<Description></Description>
<Copyright>(C) Yahoo Japan Corporation.</Copyright>
</ResultInfo>
<Feature>
<Id>201909111640_35.663613_139.73229</Id>
<Name>地点(35.663613,139.73229)の2019年09月11日 16時40分から60分間の天気情報</Name>
<Geometry>
<Type>point</Type>
<Coordinates>35.663613,139.73229</Coordinates>
</Geometry>
<Property>
<WeatherAreaCode />
<WeatherList>
<Weather>
<Type>observation</Type>
<Date>201909111640</Date>
<Rainfall />
</Weather>
<Weather>
<Type>forecast</Type>
<Date>201909111650</Date>
<Rainfall />
</Weather>
<Weather>
<Type>forecast</Type>
<Date>201909111700</Date>
<Rainfall />
</Weather>
<Weather>
<Type>forecast</Type>
<Date>201909111710</Date>
<Rainfall />
</Weather>
<Weather>
<Type>forecast</Type>
<Date>201909111720</Date>
<Rainfall />
</Weather>
<Weather>
<Type>forecast</Type>
<Date>201909111730</Date>
<Rainfall />
</Weather>
<Weather>
<Type>forecast</Type>
<Date>201909111740</Date>
<Rainfall />
</Weather>
</WeatherList>
</Property>
</Feature>
</YDF>