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
====================== | |
Proton: 1715119560 hotfix-20240508-thefinals-apex | |
SteamGameId: 1172470 | |
Command: ['/home/alexander/.local/share/Steam/steamapps/common/Apex Legends/start_protected_game.exe', '-steam'] | |
Options: {'forcelgadd', 'none'} | |
depot: 0.20240415.84603 | |
pressure-vessel: 0.20240415.0 scout | |
scripts: 0.20240415.0 | |
sniper: 0.20240415.84603 sniper 0.20240415.84603 | |
Kernel: Linux 6.8.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 02 May 2024 17:49:46 +0000 x86_64 |
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.nio.charset.StandardCharsets; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.Random; | |
public class Main { | |
public static void main(String[] args) { | |
String rawPassword = args[0]; | |
String sault = generateSalt(); | |
String encodedPassword = encode(sault + rawPassword); |
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
private fun findIndices(text: String, pattern: String): List<Int> { | |
val n = text.length | |
val m = pattern.length | |
val indices: MutableList<Int> = ArrayList() | |
// Frequency arrays - assuming we have a set of 256 characters | |
val textCount = IntArray(256) | |
val patternCount = IntArray(256) | |
// Loop until m |
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 findMaximumSum(a: IntArray, k: Int): Int { | |
var currentSum: Int = 0 | |
var maximumSum: Int | |
for (i in 0 until k) { | |
currentSum += a[i] | |
} | |
maximumSum = currentSum |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
$, = " "; | |
sub GetUniqueSorted { | |
my (@arr) = @_; | |
my %uniqueHash = (); |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
$, = ", "; | |
sub GetSymmetricDifference { | |
my (@firstArr, @secondArr) = @_; | |
my %uniqueHash = (); |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
my $num = 10; | |
my @arrWithNum = (1, 2, 3, 10, 9, 11, 12); | |
my @arrWithoutNum = (1, 2, 4, 5, 3, 8, 9); | |
sub Exists { |
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 (average x y)(/(+ x y) 2)) | |
(define square(lambda (x)(* x x))) | |
(define (my-abs x) | |
(cond ((< x 0)(- x)) | |
((= x 0) 0) | |
((> x 0) x))) | |
(define (my-sqrt x) |