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 | |
# A safer alternative to 'rm' in Bash | |
# Copyright (C) 2024 Kevin Tyrrell | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
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
public class B | |
{ | |
public static List<B> transform(List<A> as) | |
{ | |
try | |
{ | |
return as.stream() | |
.map(a -> | |
{ | |
if (a.nope()) throw new Exception(); |
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
``` | |
[admin@LenovoUltrabookU530Touch FishingBot]$ git status | |
On branch master | |
Your branch is up to date with 'origin/master'. | |
Changes to be committed: | |
(use "git reset HEAD <file>..." to unstage) | |
new file: FishingBot.iml | |
renamed: src/Style.css -> resources/css/main-window.css |
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
-- Picks up an item in the inventory, if present. | |
-- name - (string) name of the item in the inventory. | |
function r_pick_up(name) | |
local bag, slot = r_find_item(name) | |
if bag then | |
PickupContainerItem(bag, slot) | |
end | |
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
import java.util.Scanner; | |
public class test { | |
public static void main(String [] nameqn3) throws Exception | |
{ | |
Scanner console = new Scanner (System.in); | |
String answer; | |
char intAns; |
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
public class Creature implements Cloneable | |
{ | |
static class Hero extends Creature | |
{ | |
public Hero(final int HP, final boolean markedForDeath) | |
{ | |
super(HP, markedForDeath); | |
} | |
public Hero(final int HP) |
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
final String[][] clothing = new String[][] { | |
{ "Cap", "Bandana" }, | |
{ "Vest", "Blazer", "T-Shirt" }, | |
{ "Jeans", "Shorts" }, | |
{ "Shoes" } | |
}; | |
int permutations = 1; | |
for (final String[] i : clothing) | |
permutations *= i.length; |
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.util.Arrays; | |
public class Combinatorics | |
{ | |
public static void main(String[] args) | |
{ | |
final String[][] champs = new String[][] { | |
{ "Support#1", "Support#2", "Support#3" }, | |
{ "Bruiser#1" }, | |
{ "ADC#1", "ADC#2" } |
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.Serializable; | |
/** | |
* Project: SecretValues | |
* Author: User | |
* Created: May 17, 2017 | |
*/ | |
public final class SecretInteger implements SecretValue<Integer>, | |
Cloneable, Comparable<SecretInteger>, Serializable | |
{ |
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.Serializable; | |
/** | |
* Project: SecretValues | |
* Author: User | |
* Created: May 17, 2017 | |
*/ | |
public final class SecretInteger implements SecretValue<Integer>, | |
Cloneable, Comparable<SecretInteger>, Serializable | |
{ |
NewerOlder