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
package com.example.example | |
import android.content.Context | |
import android.database.sqlite.SQLiteDatabase | |
import android.database.sqlite.SQLiteOpenHelper | |
class ActsDbHelper(val context: Context) : SQLiteOpenHelper(context, DATABASE_NAME, null, DATABASE_VERSION) { | |
override fun onCreate(db: SQLiteDatabase?) { | |
// Nothing to do |
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
CREATE TABLE android_metadata (locale TEXT); | |
INSERT INTO android_metadata VALUES ("en_US"); |
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
const data = { | |
a: 1, | |
b: 2, | |
}; | |
const newData = Object.entries(data) | |
.map(([key, value]) => ({ [`_${key}`]: value + 1 })) | |
|> Object.fromEntries; |
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
const data = { | |
a: 1, | |
b: 2, | |
}; | |
const newData = Object.fromEntries( | |
Object.entries(data) | |
.map(([key, value]) => ({ [`_${key}`]: value + 1 })) | |
); |
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
const data = { | |
a: 1, | |
b: 2, | |
}; | |
const newData = Object.entries(data) | |
.map(([key, value]) => ({ [`_${key}`]: value + 1 })) | |
.reduce((obj, item) => Object.assign(obj, item), {}); |
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
const data = { | |
a: 1, | |
b: 2, | |
}; | |
const newData = Object.keys(data) | |
.map(key => ({ [`_${key}`]: data[key] + 1 })) | |
.reduce((obj, item) => Object.assign(obj, item), {}); |
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
const data = { | |
a: 1, | |
b: 2, | |
}; | |
const newData = Object.keys(data) | |
.map(function (key) { | |
return { | |
key: '_' + key, | |
value: data[key] + 1, |
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
<?php | |
class ParentClass | |
{ | |
public function __construct() | |
{ | |
$this->child = new ChildClass($this); | |
} | |
public function destroy() |
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
<?php | |
class ParentClass | |
{ | |
public function __construct() | |
{ | |
$this->child = new ChildClass($this); | |
} | |
} |
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
<?php | |
/** | |
* Render the given HttpException. | |
* | |
* @param \Symfony\Component\HttpKernel\Exception\HttpException $e | |
* @return \Symfony\Component\HttpFoundation\Response | |
*/ | |
protected function renderHttpException(HttpException $e) | |
{ |