- Spring DATA JPAは、Spring Frameworkの拡張ライブラリ。
springframework-jdbc
シリーズかspringframework-orm
シリーズのようだが、安定したら本流に組み込まれるのかもしれない。 - この記事の執筆時点のバージョンは SPRING DATA JPA 1.1.0 GA
- Spring DATA JPAは、JPAの機能をベースに 汎用的な Repositoryの機能を提供する。
- ちなみに、Repositoryというのは、ドメイン駆動設計(Domain Driven Design)のパターンのひとつで、ドメインのEntityのCollectionのように振舞う責務を持つ。例えば
CustomerRepository
ならば、システムに存在するCustomer
EntityたちをCollectionに保持するかのように振舞う。 - PoEAAにもある。参照
- もちろん本当のCollectionに保持したら大変なことになるので、バックエンドではデータベースアクセスが行われたりするわけだが、そういったことを抽象化する。
This file contains 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
(function() { | |
function formatYYYYMM(dt) { | |
var y = dt.getFullYear(); | |
var m = ('00' + (dt.getMonth()+1)).slice(-2); | |
var d = ('00' + dt.getDate()).slice(-2); | |
return (y + m); | |
} | |
function getUpperLinePrice(txt) { |
This file contains 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
#!/bin/sh | |
# | |
# Download and run the latest release version of the Certbot client. | |
# | |
# NOTE: THIS SCRIPT IS AUTO-GENERATED AND SELF-UPDATING | |
# | |
# IF YOU WANT TO EDIT IT LOCALLY, *ALWAYS* RUN YOUR COPY WITH THE | |
# "--no-self-upgrade" FLAG | |
# | |
# IF YOU WANT TO SEND PULL REQUESTS, THE REAL SOURCE FOR THIS FILE IS |
This file contains 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
REM windows下,操作zip版postgres常用命令。参数的意义请参照官方文档 | |
REM zip版postgres下载地址:https://www.enterprisedb.com/download-postgresql-binaries | |
REM 设置为postgres zip版本解压缩路径<path_to_pgsql> | |
set PG_HOME=<path_to_pgsql> | |
cd %PG_HOME% | |
REM 自定义数据库保存文件夹 | |
mkdir data |
This file contains 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
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo | |
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo | |
sudo yum install -y apache-maven | |
mvn --version |
This file contains 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
// Patch for node_modules/@zxing/ngx-scanner/esm5/zxing-ngx-scanner.js | |
BrowserCodeReader.prototype.createBinaryBitmap = function (mediaElement) { | |
if (undefined === this.canvasElementContext) { | |
this.prepareCaptureCanvas(); | |
} | |
this.canvasElementContext.drawImage(mediaElement, 0, 0); | |
// FIXME byHo | |
// var luminanceSource = new HTMLCanvasElementLuminanceSource(this.canvasElement); | |
// var hybridBinarizer = new HybridBinarizer(luminanceSource); | |
// return new BinaryBitmap(hybridBinarizer); |
This file contains 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
<mirror> | |
<id>central-no-ssl</id> | |
<name>Central without ssl</name> | |
<url>http://repo.maven.apache.org/maven2</url> | |
<mirrorOf>central</mirrorOf> | |
</mirror> |
This file contains 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
# packstack --allinone --provision-demo=n --os-neutron-ovs-bridge-mappings=extnet:br-ex --os-neutron-ovs-bridge-interfaces=br-ex:em1 --os-neutron-ml2-type-drivers=vxlan,flat | |
/etc/sysconfig/network-scripts/ifcfg-em1 | |
DEVICE=em1 | |
TYPE=OVSPort | |
DEVICETYPE=ovs | |
BOOTPROTO=none | |
ONBOOT=yes | |
BOOTPROTO=none | |
DNS1=8.8.8.8 |
This file contains 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
# /tmp/test = EBS-SSD | |
# /mnt/test = instance-store | |
root@ip-10-0-2-6:~# dd bs=1M count=256 if=/dev/zero of=/tmp/test | |
256+0 records in | |
256+0 records out | |
268435456 bytes (268 MB) copied, 3.26957 s, 82.1 MB/s | |
root@ip-10-0-2-6:~# dd bs=1M count=256 if=/dev/zero of=/tmp/test | |
256+0 records in | |
256+0 records out |
If you are seeing Mongo soft rlimits warnings in your logs, or a WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
when you login to mongo shell via mongo
from the commandline, or any mysterious/unexplained mongo connection errors... follow this how-to exactly and it will resolve the issue for you.
(Source of this how to found at basho/basho_docs#1402)
First file:
sudo vi /Library/LaunchDaemons/limit.maxfiles.plist
...containing:
NewerOlder