Quantcast
[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr / vt ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

Due to resource constraints, /g/ and /tg/ will no longer be archived or available. Other archivers continue to archive these boards.Become a Patron!

/g/ - Technology

Search:


View post   

[ Toggle deleted replies ]
>> No.72263676 [View]
File: 84 KB, 800x800, e0stFTO.png [View same] [iqdb] [saucenao] [google] [report]
72263676

yesy

>> No.71597546 [View]
File: 84 KB, 800x800, 1558641867759.png [View same] [iqdb] [saucenao] [google] [report]
71597546

>why aren't all languages compatible

>> No.69983619 [View]
File: 84 KB, 800x800, 1523994052330.png [View same] [iqdb] [saucenao] [google] [report]
69983619

>>69983420

>> No.69871241 [View]
File: 84 KB, 800x800, e0stFTO.png [View same] [iqdb] [saucenao] [google] [report]
69871241

based 3 iq poster

>> No.69782072 [View]
File: 84 KB, 800x800, e0stFTO.png [View same] [iqdb] [saucenao] [google] [report]
69782072

>>69781833
>>69781707
cause its "new"

>> No.69558773 [View]
File: 84 KB, 800x800, 1548397227580 e0stFTO.png [View same] [iqdb] [saucenao] [google] [report]
69558773

>>69558736
>disliked

>> No.69513630 [View]
File: 84 KB, 800x800, e0stFTO.png [View same] [iqdb] [saucenao] [google] [report]
69513630

>>69513607
its instructions, retard

>> No.69471628 [View]
File: 84 KB, 800x800, e0stFTO.png [View same] [iqdb] [saucenao] [google] [report]
69471628

>>69470810
i remember that she responded like this
>omg math

>> No.69295820 [View]
File: 84 KB, 800x800, e0stFTO.png [View same] [iqdb] [saucenao] [google] [report]
69295820

>>69295718
>Fixed by Q2 2019, guaranteed.

>> No.68752715 [View]
File: 84 KB, 800x800, 1522839409369.png [View same] [iqdb] [saucenao] [google] [report]
68752715

enjoy my brainlet solution, not even gonna try and make it look better. getting more comfortable reading the rust documents at least.

use std::fs;
use std::collections::HashMap;

fn main() {
let contents = fs::read_to_string("input").expect("error reading file");
let mut h = HashMap::new();
let (mut two, mut three) = (0, 0);
let mut p2 = Vec::new();

// p2
for line in contents.lines() {
h.clear();
for ch in line.chars() {
let c = h.entry(ch).or_insert(0);
*c += 1;
}

let (mut btwo, mut bthree) = (true, true); // whatever
for val in h.values() {
if *val == 2 && btwo {
two += 1;
btwo = false;
p2.insert(0, line);
} else if *val == 3 && bthree {
three += 1;
bthree = false;
p2.insert(0, line);
}
}
}

// p2
let mut matches = 0;
let mut chrs = String::new();
for line in p2.iter() {
for lone in p2.iter() {
let mut lmatches = 0;
let mut lchrs = String::new();
if line == lone {
break
} else {
let test = line.chars().zip(lone.chars());
for (ch1, ch2) in test {
if ch1 == ch2 {
lmatches += 1;
lchrs.push(ch1);
}
}
}
if lmatches > matches {
matches = lmatches;
chrs = lchrs;
}
}
}

println!("part 2 = {}", chrs);
println!("part 1 = {}", two * three); // p1
}

>> No.68649023 [View]
File: 84 KB, 800x800, 1522839409369.png [View same] [iqdb] [saucenao] [google] [report]
68649023

we can't all be 140 iq linux users OP, it's just not for you

>> No.67641457 [View]
File: 84 KB, 800x800, e0stFTO.png [View same] [iqdb] [saucenao] [google] [report]
67641457

>listening to daft punk

>> No.67239694 [View]
File: 84 KB, 800x800, 1523110704926.png [View same] [iqdb] [saucenao] [google] [report]
67239694

NEW THREAD
>>67239685
>>67239685
>>67239685

NEW THREAD
>>67239685
>>67239685
>>67239685

NEW THREAD
>>67239685
>>67239685
>>67239685

NEW THREAD
>>67239685
>>67239685
>>67239685

>> No.67031484 [View]
File: 84 KB, 800x800, fdhfdjdf.png [View same] [iqdb] [saucenao] [google] [report]
67031484

iTerm2

The tabs look slightly less ugly than the stock mac terminal and it uses non-transparent themes out of the box.

There are probably more reasons to use it over Terminal.app but I haven't figured them out yet.

>> No.66944943 [View]
File: 84 KB, 800x800, 1506116670065.png [View same] [iqdb] [saucenao] [google] [report]
66944943

>>66944348
I don't care. Blow it out you dick, nigger.

>> No.66801715 [View]
File: 84 KB, 800x800, 1522839409369.png [View same] [iqdb] [saucenao] [google] [report]
66801715

MUH MUH MUHMU GGOOOOOIIIIII I NEED BIG COLOR BOTTONS

>> No.66681634 [View]
File: 84 KB, 800x800, brainlet03.png [View same] [iqdb] [saucenao] [google] [report]
66681634

>>66681618
>wot de fuck i cant do it, it must bee trash

>> No.66386848 [View]
File: 84 KB, 800x800, e0stFTO.png [View same] [iqdb] [saucenao] [google] [report]
66386848

>>66386745
>There's no use case for declaring variables

>> No.66340330 [View]
File: 84 KB, 800x800, 1523994052330.png [View same] [iqdb] [saucenao] [google] [report]
66340330

>>66340000
>quads not understanding irony

>> No.66311745 [View]
File: 84 KB, 800x800, e0stFTO.png [View same] [iqdb] [saucenao] [google] [report]
66311745

>>66311441
>wanting to install windows 10

>> No.66254342 [View]
File: 84 KB, 800x800, jellybrainlet.png [View same] [iqdb] [saucenao] [google] [report]
66254342

>>66254047
>t. brainlet

>> No.66164997 [View]
File: 84 KB, 800x800, Brainlet jellyfish.png [View same] [iqdb] [saucenao] [google] [report]
66164997

>>66148916
>Only conservatives ar le redpilled

>> No.66161356 [View]
File: 84 KB, 800x800, 1506116670065.png [View same] [iqdb] [saucenao] [google] [report]
66161356

>>66159169
>480x854

>> No.66147503 [View]
File: 84 KB, 800x800, 1523994052330.png [View same] [iqdb] [saucenao] [google] [report]
66147503

>>66147474
>le brainlet maymay



Navigation
View posts [+24] [+48] [+96]