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
pragma solidity ^0.4.24; | |
contract ExampleContract { | |
function example(address _address) public view returns (address[]) { | |
address[] addressList; | |
for (uint i = 0; i < 100; i++) { | |
// memory で定義された配列は可変長の配列として扱えないためエラーが発生する | |
addressList.push(_address); | |
} |
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
<VirtualHost *:443> | |
ServerAdmin hoge@hoge.com | |
ServerName encrypt.hoge.com | |
DocumentRoot /var/www/hoge | |
# ここはお好みで | |
<Directory /var/www/hoge> | |
# .htaccessの許可 | |
AllowOverride All |
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
# RegisterController.php | |
$ vim app/Http/Controllers/Auth/RegisterController.php | |
$ cat app/Http/Controllers/Auth/RegisterController.php | |
<?php | |
namespace App\Http\Controllers\Auth; | |
# 「Models\」を追加 | |
use App\Models\User; | |
use App\Http\Controllers\Controller; |
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
$ mv app/User.php app/Models/ | |
$ vim app/Models/User.php | |
$ cat app/Models/User.php | |
<?php | |
# 「Models\」を追加 | |
namespace Models\App; | |
use Illuminate\Notifications\Notifiable; |
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
$ cd <Laravelプロジェクト PATH> | |
$ mkdir app/Models |
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
let insert = await this.client.query( | |
'INSERT INTO table(column1, column2, column3, column4, column5) VALUES($1, $2, $3, $4, $5)', | |
[val1, val2, val3, val4, val5] | |
); |
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
let insert = await this.client.query( | |
'INSERT INTO table(column1, column2, column3, column4, column5) VALUES($1, $2, $3, $4, $5)', | |
[val1, val2, val3, val4] | |
); |
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
$ cat es6.js | |
import moment from 'moment'; | |
console.log(moment.now()); | |
$ npm run start | |
> nodejs@1.0.0 start /Users/daiki.sekiguchi/work/blog/nodejs | |
> babel-node es6.js |
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
... | |
"scripts": { | |
"start": "babel-node es6.js", | |
... | |
}, | |
... |
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
Show hidden characters
{ | |
"presets": [ | |
[ | |
"env", { | |
"targets": { | |
"node": "current" | |
} | |
} | |
] | |
] |
NewerOlder