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
// Example: cities.sortedWithLocaleBy(Locale("tr")) { it.name } | |
inline fun <T, R : Comparable<R>> Iterable<T>.sortedWithLocaleBy( | |
locale: java.util.Locale, | |
crossinline selector: (T) -> R? | |
) = sortedWith(compareBy(java.text.Collator.getInstance(locale), selector)) | |
// Example: cities.sortedWithLocaleByDescending(Locale("tr")) { it.name } | |
inline fun <T, R : Comparable<R>> Iterable<T>.sortedWithLocaleByDescending( | |
locale: java.util.Locale, | |
crossinline selector: (T) -> R? |
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
import React from "react"; | |
import { withState, multiState } from "./multi-state"; | |
const Input = ({ state, ...props }) => ( | |
<input | |
value={state.value} | |
onChange={e => state.setValue(e.target.value)} | |
{...props} | |
/> | |
); |
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
import React from "react"; | |
export const ClientSide = ({ children, placeholder, delay }) => { | |
const [showState, setShowState] = React.useState(false); | |
const delayInMillis = delay !== undefined ? parseInt(delay) : 0; | |
React.useEffect(() => { | |
const timeout = setTimeout(() => setShowState(true), delayInMillis); | |
return () => clearTimeout(timeout); | |
}, []); |
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
/** | |
* usage: | |
* <ul> | |
* <Repeat times="3"> | |
* <li>item</li> | |
* </Repeat> | |
* </ul> | |
* or | |
* <ul> | |
* <Repeat times="3"> |
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
/** | |
* @author Mustafa Köroğlu | |
*/ | |
const val kTableFunction = """ | |
function kTable(table, configURL, cb) { | |
$.post(configURL, function (config) { | |
config.options.ajax.data = JSON.stringify; | |
config.column = function (columnName) { | |
return config.options.columns.filter(function (row) { | |
return row.name === columnName; |
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
RUN tz=Europe/Istanbul && cp -vf /usr/share/zoneinfo/$tz /etc/localtime && echo $tz | tee /etc/timezone |
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
<!-- | |
project structure | |
============================================= | |
- libs | |
- com.example | |
- 1.1 | |
- test-1.1.jar | |
- org.example | |
- 3.4 | |
- test-3-4.jar |
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
<project> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-maven-plugin</artifactId> | |
<executions> | |
<execution> | |
<goals> | |
<goal>repackage</goal> |
NewerOlder