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
infix fun <T>Boolean.then(action : () -> T): T? { | |
return if (this) | |
action.invoke() | |
else null | |
} | |
infix fun <T>T?.elze(action: () -> T): T { | |
return if (this == null) | |
action.invoke() |
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
android { | |
signingConfigs { | |
getByName("debug") { | |
keyAlias = "debug" | |
keyPassword = "my debug key password" | |
storeFile = file("/home/miles/keystore.jks") | |
storePassword = "my keystore password" | |
} | |
create("release") { | |
keyAlias = "release" |
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
# ____ _ _ ____ ___ _ _ | |
# | _ \| | / \ / ___|/ _ \| \ | | | |
# | |_) | | / _ \| | _| | | | \| | | |
# | __/| |___ / ___ \ |_| | |_| | |\ | | |
# |_| |_____/_/ \_\____|\___/|_| \_| | |
# -------------------------------------- | |
from os import listdir as os_listdir, path as os_path | |
# pip install -U scikit-learn | |
from sklearn.feature_extraction.text import TfidfVectorizer |
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
// IMPORTANT! READ THIS FIRST | |
// Assisted Injection doesn't work with @HiltViewModel or @ViewModelInject | |
// Read more about the issue here: https://github.com/google/dagger/issues/2287 | |
// | |
// | |
// AssistedInject and Hilt working together in v2.28-alpha times | |
// Example of a ViewModel using AssistedInject injected in a Fragment by Hilt | |
// As AssistedInject isn't part of Dagger yet, we cannot use in | |
// conjuction with @ViewModelInject |
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
import org.jetbrains.exposed.sql.Column | |
import org.jetbrains.exposed.sql.ColumnType | |
import org.jetbrains.exposed.sql.CustomStringFunction | |
import org.jetbrains.exposed.sql.EqOp | |
import org.jetbrains.exposed.sql.Expression | |
import org.jetbrains.exposed.sql.ExpressionWithColumnType | |
import org.jetbrains.exposed.sql.Table | |
import org.jetbrains.exposed.sql.statements.api.PreparedStatementApi | |
import org.jetbrains.exposed.sql.statements.jdbc.JdbcPreparedStatementImpl | |
import org.jetbrains.exposed.sql.stringLiteral |
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
/** | |
* JSON and JSONB support for github.com/JetBrains/Exposed. | |
* | |
* Tested with | |
* - github.com/pgjdbc/pgjdbc 42.2.x | |
* - github.com/mysql/mysql-connector-j | |
* - github.com/h2database/h2database | |
* | |
* Based on gist.github.com/qoomon/70bbbedc134fd2a149f1f2450667dc9d | |
* Thanks for everyone in github.com/JetBrains/Exposed#127 |
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 ApplicationHelper | |
def will_paginate(coll_or_options = nil, options = {}) | |
if coll_or_options.is_a? Hash | |
options = coll_or_options | |
coll_or_options = nil | |
end | |
options = options.merge renderer: TailwindUIPaginationRenderer unless options[:renderer] | |
super(*[coll_or_options, options].compact) | |
end | |
end |
OlderNewer