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
// Defines the keyboard layout used in Code OSS in the browser environment. | |
// Open Code OSS and run "Developer: Inspect Key Mappings (JSON)" from Command Palette. | |
// Once you have the keyboard layout info, please paste it below. | |
{ | |
"layout": { | |
"model": "pc105", | |
"group": 0, | |
"layout": "us", |
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
val pre = """ | |
- type: device.command.ColorAbsolute | |
color: | |
spectrumRGB: """ | |
val post = """ | |
devices: Light strip - myRm | |
- type: time.delay | |
for: 1 sec""" | |
var counter = 194 |
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
define :_togglePan do |pan| | |
if pan == -1 then pan = 1 else pan = -1 end | |
return pan | |
end | |
define :_calcFadedAmp do |isFadeIn, amp, ampFade| | |
if isFadeIn == true then amp += ampFade else amp -= ampFade end | |
return amp | |
end |
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
pacmd load-module module-null-sink | |
pacmd load-module module-loopback | |
pacmd load-module module-loopback |
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 kotlin.coroutines.experimental.buildSequence | |
import kotlin.system.measureTimeMillis | |
fun sieve(isPrime: Int, ints: Sequence<Int>): Boolean = with(ints.first()) { | |
return when { | |
isPrime < 2 -> false | |
isPrime == 2 -> true | |
isPrime == this -> true | |
isPrime.rem(2) == 0 -> false | |
// isPrime.and(1) == 0 -> false // same way to check if number is even |
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
package function | |
var Function = { function:Function<*> -> val function = function.javaClass.newInstance() as Function<*> } | |
fun Function(Function:Function<*>):(Function<*>) -> Function<*> = { Function -> | |
fun Function<*>.Function(Function:Function<*>):Function<*> = (function.Function.javaClass.newInstance() as ((Function<*>) -> Function<*>)?)!! | |
(Function(Function = function.Function(Function)).Function(Function = function.Function(Function = function.Function(Function = function.Function)(Function))) as Function<*>).Function(Function) | |
} |
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
interface Public { | |
public fun public():Public | |
} | |
public class public public constructor(public:Public):Public by object:Public { | |
public override fun public():Public { | |
return object:Public { | |
public override fun public():Public { | |
return Public@this.public() | |
} |
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
@Override protected void onViewBound(@NonNull View view) { | |
super.onViewBound(view); | |
TestDialog.reAttachListener(getActivity(), TestDialog.class, this); | |
btnShowDialog.setOnClickListener(v -> { | |
TestDialog gd = new TestDialogBuilder(R.dimen.dialog_add_inspection_item_height, | |
R.dimen.dialog_add_inspection_item_width, R.string.camera, R.string.title).build(); | |
TestDialog.show(getActivity(), gd, this); |
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
Verifying that "ersin_ertan.id" is my Blockstack ID. https://onename.com/ersin_ertan |
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
Api api = new Api() { | |
@Override Single<String> getKey() { | |
return Single.just("apiKey"); | |
} | |
}; | |
api.getKey().flatMap(new Func1<String, Single<String>>() { | |
@Override public Single<String> call(String key) { | |
return Single.create(new Single.OnSubscribe<String>() { | |
@Override public void call(final SingleSubscriber<? super String> singleSubscriber) { |
NewerOlder