## 見出し2
### 見出し3
#### 見出し4
##### 見出し5
###### 見出し6 ## Block 段落 空白行を挟むことで段落となります。 ```
段落1
(空行)
段落2
``` 段落1 段落2 ## Br 改行 改行の前に半角スペース` `を2つ記述します。 ```
hoge
fuga(スペース2つ)
piyo
``` hoge
fuga piyo ## Blockquotes 引用 先頭に`>`を記述します。ネストは`>`を多重に記述します。 ```
> 引用 > 引用
>> 多重引用
``` > 引用 > 引用
>> 多重引用 ## Code コード `` `バッククオート` `` 3つ、あるいはダッシュ`~`3つで囲みます。 ```
print 'hoge'
``` ```
print 'hoge'
``` ### インラインコード `` `バッククオート` `` で単語を囲むとインラインコードになります。 ```
これは `インラインコード`です。
``` これは `インラインコード`です。 ## pre 整形済みテキスト 半角スペース4個もしくはタブで、コードブロックをpre表示できます ``` class Hoge def hoge print 'hoge' end end
``` class Hoge def hoge print 'hoge' end end ## Hr 水平線 アンダースコア`_` 、アスタリスク`*`、ハイフン`-`などを3つ以上連続して記述します。 ```
hoge
***
hoge
___
hoge
---
``` hoge
***
hoge
___
hoge
--- # Lists ## Ul 箇条書きリスト ハイフン`-`、プラス`+`、アスタリスク`*`のいずれかを先頭に記
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
@Inject | |
private MessagesApi messagesApi; | |
protected Messages messages() { | |
return messagesApi.preferred(request()); | |
} |
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
for (Map.Entry<String, List<ValidationError>> stringListEntry : form.errors().entrySet()) { | |
List<Object> arguments = new ArrayList<Object>(); | |
arguments.addAll(stringListEntry.getValue().get(0).arguments()); | |
arguments.add(0, Messages.get(stringListEntry.getValue().get(0).key())); | |
flashError(Messages.get(stringListEntry.getValue().get(0).message(), arguments)); | |
break; | |
} |
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
@Messages("foo.baa") |
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
PutObjectRequest request = new PutObjectRequest(bucketName, path, file); | |
ObjectMetadata objectMetadata = new ObjectMetadata(); | |
objectMetadata.setContentType("image/png"); //pngファイルの例 | |
s3client.putObject(request); |
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
Date expiration = new Date(); | |
long msec = expiration.getTime(); | |
msec += 1000 * 60 * 60; // 1 hour. | |
// 有効期限の設定(デフォルトは15分らしい) | |
expiration.setTime(msec); | |
GeneratePresignedUrlRequest generatePresignedUrlRequest = | |
new GeneratePresignedUrlRequest(bucketName, path); | |
// GET Request(POSTもできる) |