This file contains hidden or 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
module.exports = { | |
reactStrictMode: true, | |
webpackDevMiddleware: config => { | |
config.watchOptions = { | |
//小さな値にすると、ポーリングの頻度が上がるので、重くなるっぽい。 | |
//poll: 800, | |
poll: 5000, | |
aggregateTimeout: 300, | |
ignored: [ '**/node_modules/**', '**/.git/**', '**/.next/**' ] | |
} |
This file contains hidden or 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
/** | |
* @runInSeparateProcess | |
* @preserveGlobalState disabled | |
*/ | |
public function testEditWhenRecordNotFound() | |
{ | |
$this->mock = M::mock('alias:App\Contact')->makePartial(); | |
$this->mock->shouldReceive('find')->once()->with(self::ID)->andReturnUsing(function(){ | |
return null; |
This file contains hidden or 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
/** | |
* @runInSeparateProcess | |
* @preserveGlobalState disabled | |
*/ | |
public function testEditNormal() | |
{ | |
$this->mock = M::mock('alias:App\Contact')->makePartial(); | |
$this->mock->shouldReceive('find')->once()->with(self::ID)->andReturnUsing(function(){ | |
$contacts = (object)array( |
This file contains hidden or 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 the form for editing the specified resource. | |
* | |
* @param int $id | |
* @return \Illuminate\Http\Response | |
*/ | |
public function edit($id) | |
{ | |
$contact = Contact::find($id); |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<script> | |
function Kana(){ |
This file contains hidden or 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
File file = ... | |
// (1) | |
// intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file)); | |
// (2) | |
Uri uri = FileProvider.getUriForFile( | |
【アクティビティ名】.this | |
,getApplicationContext().getPackageName() + ".provider" | |
, file); |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<paths xmlns:android="http://schemas.android.com/apk/res/android"> | |
<external-path name="external_files" path="."/> | |
</paths> |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest ...> | |
<application ...> | |
<provider | |
android:name="android.support.v4.content.FileProvider" | |
android:authorities="${applicationId}.provider" | |
android:exported="false" | |
android:grantUriPermissions="true"> | |
<meta-data | |
android:name="android.support.FILE_PROVIDER_PATHS" |
This file contains hidden or 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
public JSONObject post(String urlString) throws Exception{ | |
URL url = new URL(urlString); | |
HttpsURLConnection con = (HttpsURLConnection) url.openConnection(); | |
con.setConnectTimeout(Const.HTTP_CONNECT_TIMEOUT); | |
con.setReadTimeout(Const.HTTP_READ_TIMEOUT); | |
con.setUseCaches(false); | |
con.setDoInput(true); | |
con.setDoOutput(true); | |
con.setChunkedStreamingMode(0); |
This file contains hidden or 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
public JSONObject post(String urlString) throws Exception{ | |
URL url = new URL(urlString); | |
HttpsURLConnection con = (HttpsURLConnection) url.openConnection(); | |
con.setConnectTimeout(Const.HTTP_CONNECT_TIMEOUT); | |
con.setReadTimeout(Const.HTTP_READ_TIMEOUT); | |
con.setUseCaches(false); | |
con.setDoInput(true); | |
con.setDoOutput(true); | |
con.setChunkedStreamingMode(0); |
NewerOlder