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
// This prints the dependencies of each task in the current execution graph | |
gradle.taskGraph.whenReady( | |
closureOf<TaskExecutionGraph> { | |
println("About to run ${allTasks.size} tasks: (use `-i` to see why tasks are skipped, use `--rerun-tasks` to prevent UP-TO-DATE checks)") | |
allTasks.forEachIndexed { i, task -> | |
val dependenciesString = | |
if (task.dependsOn.isEmpty()) { | |
"" | |
} else { | |
task.dependsOn.joinToString(", ", " (depends on ", ")") { dependency -> |
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
/** | |
* A composable function that displays a text with a typewriter-like effect, revealing characters in chunks. | |
* | |
* @param text The input text to be displayed with the typewriter effect. | |
* @param minDelayInMillis The minimum delay in milliseconds between revealing character chunks, defaults to 10ms. | |
* @param maxDelayInMillis The maximum delay in milliseconds between revealing character chunks, defaults to 50ms. | |
* @param minCharacterChunk The minimum number of characters to reveal at once, defaults to 1. | |
* @param maxCharacterChunk The maximum number of characters to reveal at once, defaults to 5. | |
* @param onEffectCompleted A callback function invoked when the entire text has been revealed. | |
* @param displayTextComposable A composable function that receives the text to display with the typewriter effect. |
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 org.kodein.di.DirectDIAware | |
import org.kodein.di.instance | |
/** | |
* Auto resolve a class dependencies by using its constructor reference. | |
* The resolution is done at compile time by leveraging inline functions, no reflection is required. | |
* | |
* Example: | |
* ``` | |
* val myModule = DI.module("myModule") { |
- DP for beginners by @wh0ami - https://leetcode.com/discuss/general-discussion/662866/dp-for-beginners-problems-patterns-sample-solutions || [LIST - https://leetcode.com/list/x1k8lxi5]
- Graph for beginners by @wh0ami - https://leetcode.com/discuss/general-discussion/655708/graph-for-beginners-problems-pattern-sample-solutions/562734 || [LIST - https://leetcode.com/list/x1wy4de7]
- Sliding window for beginners by @wh0ami - https://leetcode.com/discuss/general-discussion/657507/sliding-window-for-beginners-problems-template-sample-solutions/562721 || [LIST - https://leetcode.com/list/x1lbzfk3]
- DP Patterns by @aatalyk - https://leetcode.com/discuss/general-discussion/458695/dynamic-programming-patterns Leetcode patterns from edu_cative_dot_io by @late_riser - https://leetcode.com/discuss/general-discussion/457546/LeetCode-Problem-Patterns-from-***
- List of questions sorted by common patterns by @Maverick2594 - https://leetcode.com/discuss/career/448285/List-of-q
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
#!/bin/bash | |
set -e | |
if [ -d ~/.local/share/JetBrains/Toolbox ]; then | |
echo "JetBrains Toolbox is already installed!" | |
exit 0 | |
fi | |
echo "Start installation..." |
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
fun main(args: Array<String>) { | |
if (args[0] == "start") { | |
launch(CommonPool) { | |
println("Launching") | |
SerialisationHelper.test() | |
println("Finished") | |
} | |
} |
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 java.lang.reflect.Constructor; | |
import java.lang.reflect.Method; | |
/** | |
* <h2>Type Signatures</h2><br/> | |
* The JNI uses the Java VM’s representation of type signatures. Table 3-2 shows | |
* these type signatures. | |
* <p/> | |
* Table 3-2 Java VM Type Signatures | |
* |
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 java.io.BufferedInputStream; | |
import java.io.BufferedOutputStream; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.util.zip.GZIPInputStream; | |
import org.xeustechnologies.jtar.TarEntry; | |
import org.xeustechnologies.jtar.TarInputStream; |
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
// | |
// This sketch will print some of interesting predefined constants to Serial. | |
// | |
// For more information, look at | |
// http://electronics4dogs.blogspot.com/2011/01/arduino-predefined-constants.html | |
// helper macro | |
#define LINE(name,val) Serial.print(name); Serial.print("\t"); Serial.println(val); | |
void setup() |
NewerOlder