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 function "converts" a Uint8Array to a CryptoKey object | |
// Consider this "Boilerplate" code, that doesn't do anything useful. | |
function importKey(rawKey) { | |
return window.crypto.subtle.importKey("raw", rawKey, "AES-GCM", true, ["encrypt", "decrypt"]); | |
} | |
// This function takes raw bytes and decodes them to utf-8 | |
function decode(bytes) { | |
// Even though utf-8 is the default, it's always good to be explicit | |
return new TextDecoder("utf-8").decode(bytes); |
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 is free and unencumbered software released into the public domain. | |
* | |
* Anyone is free to copy, modify, publish, use, compile, sell, or | |
* distribute this software, either in source code form or as a compiled | |
* binary, for any purpose, commercial or non-commercial, and by any | |
* means. | |
* | |
* In jurisdictions that recognize copyright laws, the author or authors | |
* of this software dedicate any and all copyright interest in the |
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/python3 | |
import csv | |
if __name__ == '__main__': | |
with open('file.csv', 'r') as f: | |
reader = csv.reader(f) | |
your_list = list(reader) | |
print(your_list) |
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/python3 | |
import math | |
if __name__ == '__main__': | |
a = int(input("a: ")); | |
b = int(input("b: ")); | |
res = pow(a,2) + 2*a + pow(b,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
#!/bin/bash | |
# Skript: m122_Scripts/BC2SQL_fast.sh | |
DBFILE="SIX_Bankenstamm.db" | |
SRCFILE="SIX_BankenstammCH.csv" | |
TABLENAME="Bankenstamm" | |
if ! [ -r "$SRCFILE" ] | |
then | |
echo "Could not read $SCRFILE. Exiting..." |
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
using System; | |
namespace Memory | |
{ | |
class Program | |
{ | |
/// <summary> | |
/// Motives of the pairs | |
/// </summary> | |
private static char[] displaySymbols = { '@', '☺', '☻', '●', 'Ⱡ', '♫', '♪', '♦', '♥', '♣', '♠', '♂', '♀', '☼', '█', '▲', '℗', 'Ω' }; |
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
using System; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
//Liest 10 Gleitkomma-Zahlen ein und speichert sie in ein Array. | |
double[] numbers = ReadNumbers(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
#!/bin/bash | |
# Skript: m122_Scripts/SQLTux.sh | |
DBFILE=linuxusers.db | |
PASSWDFILE=/etc/passwd | |
TABLENAME="LinuxBenutzer" | |
#Stop if the password file is not readable | |
if ! [ -r "$PASSWDFILE" ] | |
then |
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 void WriteLog(string message, | |
Severity severity = Logger.Defaults.Severity, | |
Encoding = Logger.Defaults.Encoding, | |
Color = Logger.Defaults.Color) | |
{ | |
/*Write your log here*/ | |
} | |
public void Main() | |
{ |
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 void WriteLog(string message) | |
{ | |
WriteLog(message, Logger.Defaults.Severity, Logger.Defaults.Encoding, Logger.Defaults.Color); | |
} | |
public void WriteLog(string message, Severity severity) | |
{ | |
WriteLog(message, severity, Logger.Defaults.Encoding, Logger.Defaults.Color); | |
} |
NewerOlder