0m0.057s
oof❯ openssl speed
Doing mdc2 for 3s on 16 size blocks: 5174992 mdc2's in 3.00s
Doing mdc2 for 3s on 64 size blocks: 1428405 mdc2's in 3.00s
Doing mdc2 for 3s on 256 size blocks: 364764 mdc2's in 3.00s
Doing mdc2 for 3s on 1024 size blocks: 91642 mdc2's in 3.00s
Doing mdc2 for 3s on 8192 size blocks: 11401 mdc2's in 3.00s
Doing mdc2 for 3s on 16384 size blocks: 5667 mdc2's in 3.00s
Doing md4 for 3s on 16 size blocks: 25496375 md4's in 3.00s
Doing md4 for 3s on 64 size blocks: 18429772 md4's in 3.00s
Doing md4 for 3s on 256 size blocks: 9538163 md4's in 3.00s
Doing md4 for 3s on 1024 size blocks: 3318838 md4's in 3.00s
Doing md4 for 3s on 8192 size blocks: 468306 md4's in 3.00s
Doing md4 for 3s on 16384 size blocks: 236379 md4's in 3.00s
Doing md5 for 3s on 16 size blocks: 36114377 md5's in 3.00s
Doing md5 for 3s on 64 size blocks: 20944396 md5's in 3.00s
Doing md5 for 3s on 256 size blocks: 8995503 md5's in 3.00s
Doing md5 for 3s on 1024 size blocks: 2755487 md5's in 3.00s
Doing md5 for 3s on 8192 size blocks: 368630 md5's in 3.00s
Doing md5 for 3s on 16384 size blocks: 185251 md5's in 3.00s
Doing hmac(md5) for 3s on 16 size blocks: 15471998 hmac(md5)'s in 3.00s
create table t(a int, b int);
.import --csv '|tr " ABCXYZ" ",123123" < day02.in' t
select sum(b+(4+b-a)%3*3) from t; # Part 1
select sum((a+b)%3+1+(b-1)*3) from t; # Part 2
create table t(a int, b int);
.import --csv '|tr " ABCXYZ" ",123123" < day02.in' t
select sum(b+(4+b-a)%3*3) from t; # Part 1
select sum((a+b)%3+1+(b-1)*3) from t; # Part 2
create table t(a int, b int);
.import --csv '|tr " ABCXYZ" ",123123" < day02.in' t
select sum(b+(4+b-a)%3*3) from t; # Part 1
select sum((a+b)%3+1+(b-1)*3) from t; # Part 2
[string "src/tools.lua"]:393: bad argument #1 to 'TableFlatten' (unexpected nil
bam.exe: script error (-t for more detail)
what is error?import sys
from collections import Counter
input = ["".join(x.split()) for x in open(sys.argv[1] if len(sys.argv) > 1 else "input")]
c = Counter(input)
print(c["AX"] * 4 + c["AY"] * 8 + c["AZ"] * 3 + c["BX"] * 1 + c["BY"] * 5 + c["BZ"] * 9 + c["CX"] * 7 + c["CY"] * 2 + c["CZ"] * 6)
# G:13682 L:11386
print(c["AX"] * 3 + c["AY"] * 4 + c["AZ"] * 8 + c["BX"] * 1 + c["BY"] * 5 + c["BZ"] * 9 + c["CX"] * 2 + c["CY"] * 6 + c["CZ"] * 7)
# G:12881 L:13600
let guide: HashMap<&str, &str> = inp.split_terminator('\n').map(|x| x.split_once(' ').unwrap()).collect();
"A.B".split(".") // ["A","B"]
in js&str.split(" ").collect::<String>();
"A.B.".split(".")
Array(3) [ "A", "B", "" ]
(edited)&str.split(" ").collect::<String>();
let result = line.split(" ").collect::<Vec<&str>>();
let opponent = match *result.get(0).unwrap() {
"A" => Shape::Rock,
"B" => Shape::Paper,
"C" => Shape::Scissors,
_ => panic!("Invalid shape !"),
};
import sys
from collections import Counter
input = ["".join(x.split()) for x in open(sys.argv[1] if len(sys.argv) > 1 else "input")]
c = Counter(input)
print(c["AX"] * 4 + c["AY"] * 8 + c["AZ"] * 3 + c["BX"] * 1 + c["BY"] * 5 + c["BZ"] * 9 + c["CX"] * 7 + c["CY"] * 2 + c["CZ"] * 6)
# G:13682 L:11386
print(c["AX"] * 3 + c["AY"] * 4 + c["AZ"] * 8 + c["BX"] * 1 + c["BY"] * 5 + c["BZ"] * 9 + c["CX"] * 2 + c["CY"] * 6 + c["CZ"] * 7)
# G:12881 L:13600
[N*N || N <- [1,2,3,4,5]].
7> Color = 16#F09A29.
15768105
8> Pixel = <<Color:24>>.
<<240,154,41>>
9>
10> Pixels = <<213,45,132,64,76,32,76,0,0,234,32,15>>.
<<213,45,132,64,76,32,76,0,0,234,32,15>>
11> <<Pix1:24, Pix2:24, Pix3:24, Pix4:24>> = Pixels.
<<213,45,132,64,76,32,76,0,0,234,32,15>>
12> <<R:8, G:8, B:8>> = <<Pix1:24>>.
<<213,45,132>>
<<SourcePort:16, DestinationPort:16,
AckNumber:32,
DataOffset:4, _Reserved:4, Flags:8, WindowSize:16,
CheckSum: 16, UrgentPointer:16,
Payload/binary>> = SomeBinary.
:o this is how u would parse a tcp segment[N*N || N <- [1,2,3,4,5]].
[n*n for n in [1,2,3,4,5]]
in python?NewList = [Expression || GeneratorExp1, GeneratorExp2, ..., GeneratorExpN, Condition1, Condition2, ... ConditionM].
[X || X <- [1,2,3,4,5,6,7,8,9,10], X rem 2 =:= 0].
[2,4,6,8,10]
===
?6> 5 =:= 5.
true
7> 1 =:= 0.
false
8> 1 =/= 0.
true
9> 5 =:= 5.0.
false
10> 5 == 5.0.
true
11> 5 /= 5.0.
false
3> RestaurantMenu = [{steak, 5.99}, {beer, 3.99}, {poutine, 3.50}, {kitten, 20.99}, {water, 0.00}].
[{steak,5.99},
{beer,3.99},
{poutine,3.5},
{kitten,20.99},
{water,0.0}]
4> [{Item, Price*1.07} || {Item, Price} <- RestaurantMenu, Price >= 3, Price =< 10].
[{steak,6.409300000000001},{beer,4.2693},{poutine,3.745}]
same(X,X) ->
true;
same(_,_) ->
false.
(edited)#!/bin/bash
# Advent of Code 02
x1=$(sed 's/A X/4/g;s/A Y/8/g;s/A Z/3/g;s/B X/1/g;s/B Y/5/g;s/B Z/9/g;s/C X/7/g;s/C Y/2/g;s/C Z/6/g' "$1" | paste -s -d+ | bc)
x2=$(sed 's/A X/3/g;s/A Y/4/g;s/A Z/8/g;s/B X/1/g;s/B Y/5/g;s/B Z/9/g;s/C X/2/g;s/C Y/6/g;s/C Z/7/g' "$1" | paste -s -d+ | bc)
echo "$x1 $x2"
#!/bin/bash
# Advent of Code 02
x1=$(sed 's/A X/4/g;s/A Y/8/g;s/A Z/3/g;s/B X/1/g;s/B Y/5/g;s/B Z/9/g;s/C X/7/g;s/C Y/2/g;s/C Z/6/g' "$1" | paste -s -d+ | bc)
x2=$(sed 's/A X/3/g;s/A Y/4/g;s/A Z/8/g;s/B X/1/g;s/B Y/5/g;s/B Z/9/g;s/C X/2/g;s/C Y/6/g;s/C Z/7/g' "$1" | paste -s -d+ | bc)
echo "$x1 $x2"
cmake -DDOWNLOAD_GTEST=OFF -DCLIENT=OFF ..
not workcmake DDNet-Server
should work just finecmake -DDOWNLOAD_GTEST=OFF -DCLIENT=OFF ..
not work ROW_NUMBER()
s in a query?ORDER BY
Pos
column on the row. After ordering how I want, now I need to set the Pos
columnPos
column on the row. After ordering how I want, now I need to set the Pos
column