which = Get-Command or gcm
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
#Characters to replace | |
escape_table = { | |
"&" : " ", | |
"#" : "1" | |
} | |
#Initial string | |
text = "asd&#" | |
#Final string | |
new = "".join(escape_table.get(c,c) for c in text) |
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 graphs; | |
import java.util.*; | |
class Graph{ | |
Node root = null; | |
Graph(){ | |
} | |
static class Node{ | |
int data; | |
Node left, right; |
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
#built application files | |
*.apk | |
*.ap_ | |
# files for the dex VM | |
*.dex | |
# Java class files | |
*.class |
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 'package:flutter/material.dart'; | |
typedef void OnPressed(String id); | |
class FancyFab extends StatefulWidget { | |
final OnPressed onPressed; | |
FancyFab({@required this.onPressed}); | |
@override |
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 com.expedia.ord.recon | |
import java.util.* | |
fun main(args: Array<String>) { | |
val helloApp = HelloApp() | |
helloApp.work() | |
helloApp.funstuff("skiing") | |
try { | |
val asd = helloApp.otherstuff(10) |
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 Project.configurePublishing(artifactId: String, android: Boolean = false) { | |
var publishingExtension: PublishingExtension? = null | |
apply<MavenPublishPlugin>() | |
apply<SigningPlugin>() | |
configure<PublishingExtension> { | |
publishingExtension = this | |
publications { | |
create<MavenPublication>("mavenRelease") { | |
this.artifactId = artifactId | |
if (android) { |
gpg --gen-key
git config --global user.signingkey 0A46826A
git config --global commit.gpgsign true
(Optional, enable sign always)git commit -S -m "foobar
(Optional, for manual sign commit)- Copy output of
git --armor --export 0A46826A
to github/gitlab settings etc - Have fun
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 Double.round(places: Int) = BigDecimal(this).setScale(places, RoundingMode.HALF_EVEN).toDouble() |
OlderNewer