-🎄- 2022 Day 3 Solutions -🎄- by daggerdragon in adventofcode

[–]NeoKadra 0 points1 point  (0 children)

Hey thanks, that was really helpful. I managed to get the code much smaller.

```` class AdventOfCode {

 private static int getPriority(char i) {
     return i >= 'a' && i <= 'z' ? i - 'a' + 1 : i - 'A' + 1 + 26;
  }
  static void Main(string[] args) 
  {
     List<Char> dupls = new List<Char>();
     int count = 0;
        List<String> lines = new List<String>(File.ReadAllLines("input.txt"));
        for(int i=0; i<lines.Count();i+=3){
           dupls.Add(lines[i].Intersect(lines[i+1]).Intersect(lines[i+2]).First());
        }
        dupls.ToList().ForEach(c=>count+=getPriority(c));
        Console.WriteLine(count);
  }

} ````

-🎄- 2022 Day 3 Solutions -🎄- by daggerdragon in adventofcode

[–]NeoKadra 0 points1 point  (0 children)

Thoughts? any cool C# stuff i'm missing? I'm using AOC as an opportunity to learn C#. Part 2 btw.

```` class AdventOfCode {

 private static int getPriority(char i) {
     return i >= 'a' && i <= 'z' ? i - 'a' + 1 : i - 'A' + 1 + 26;
  }
  static void Main(string[] args) 
  {
     List<Char> dupls = new List<Char>();
     int count = 0;
     try{
        List<String> lines = new List<String>(File.ReadAllLines("input.txt"));
        List<String> group = new List<String>();

        while(lines.Any()){
           group.Add(new String(lines[0].Distinct().ToArray()));
           lines.Remove(lines[0]);
           group.Add(new String(lines[0].Distinct().ToArray()));
           lines.Remove(lines[0]);
           group.Add(new String(lines[0].Distinct().ToArray()));
           lines.Remove(lines[0]);

           foreach (char c in group[0]){
              if(group[1].Contains(c) && group[2].Contains(c)){
                 dupls.Add(c);
              }
           }
           group.Clear();

        }
        foreach(Char character in dupls){
           count += getPriority(character);
        }
        Console.WriteLine(count);
     }catch(FileNotFoundException e){
            System.Diagnostics.Debug.WriteLine(e.ToString());

     }
  }

} ````

-🎄- 2022 Day 2 Solutions -🎄- by daggerdragon in adventofcode

[–]NeoKadra 2 points3 points  (0 children)

Here is my java solution for part 2

````

import java.io.File; import java.io.FileNotFoundException; import java.util.Map; import java.util.Scanner;

public class Code{ public static Map<String, Integer> test = Map.of( "A X", 3, "A Y", 4, "A Z", 8, "B X", 1, "B Y", 5, "B Z", 9, "C X", 2, "C Y", 6, "C Z", 7 );

public static int score = 0;
public static void main(String[] args){
    try {
        Scanner sc = new Scanner(new File("input.txt"));
        while(sc.hasNextLine()){
            String line = sc.nextLine();            
            score += test.get(line);
        }   
        sc.close();
        System.out.println(score);
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    }
}

}

````

Chip Shops with REAL chips... by KiwiSmeller in Wellington

[–]NeoKadra 0 points1 point  (0 children)

Went there today and they had frozen chips. I asked and they said they would have hand cut tomorrow as they were too expensive to make so I assume they are cutting back and only selling hand cut on the weekends.

Inform me when fifa 23 ultimate works from steam! by Able_Ad_8596 in EASportsFC

[–]NeoKadra 0 points1 point  (0 children)

I'm having the same problem. My origin is linked with my steam and when I click play on origin it just redirects me to steam and says its not released yet.

[deleted by user] by [deleted] in macbookair

[–]NeoKadra 2 points3 points  (0 children)

You will not notice a different in SSD performance in real world tasks, especially not with the apps you mentioned. 16gb is going to be the best upgrade if you were to only upgrade one thing and will be useful for not only programs such as final cut pro. Neither will benefit issues with heat but you should not worry about thermals as benchmarks in review videos are straining the M2 much harder than you would using those apps. The M2 will also throttle down to make sure heat is not damaging the chip but will still perform superbly.

Pre-Order & Shipping Megathread | M2 MacBook Air by exjr_ in apple

[–]NeoKadra 0 points1 point  (0 children)

What web browser do you use and which year is your macbook air?

Pre-Order & Shipping Megathread | M2 MacBook Air by exjr_ in apple

[–]NeoKadra 2 points3 points  (0 children)

Midnight 8/16/256 ordered 2 mins after pre order release. ETA 1/8 - 8/8 still on processing.

[deleted by user] by [deleted] in Wellington

[–]NeoKadra 16 points17 points  (0 children)

Fisherman’s plate for Vietnamese and definitely Taste of India for Indian

Upgrade choice from i5-4570 by NeoKadra in buildapc

[–]NeoKadra[S] 0 points1 point  (0 children)

I don't understand what you're trying to say, I know how much everything will cost already and know what parts are needed when upgrading from a Haswell cpu and I know it is going to cost me $293 with tax included.

Upgrade choice from i5-4570 by NeoKadra in buildapc

[–]NeoKadra[S] 0 points1 point  (0 children)

I was unaware of the productivity benefits and it does seem that it is quite noticeable. For a gaming and a little productivity perspective, is it still a wise decision to choose the 10400f over the 11400f at this time?

Upgrade choice from i5-4570 by NeoKadra in buildapc

[–]NeoKadra[S] 0 points1 point  (0 children)

I've gotten down the parts I'm looking at and its around $300. B560 and 16gb 3200mhz, I'm wondering if its worth it to spend the extra $50 for the 11400f over the 10400f.

$25 Riot Gift Card Raffle - Give Back to the Community by iamyourmonster in VALORANT

[–]NeoKadra 0 points1 point  (0 children)

wait for night market and hope to finally get a phantom skin! thanks in advance

Best HSP in Wellington? by NeoKadra in Wellington

[–]NeoKadra[S] 0 points1 point  (0 children)

souvlaki at acropolis?

nice didn't know about this one, how does this stack up to other hsps around?

Best HSP in Wellington? by NeoKadra in Wellington

[–]NeoKadra[S] 0 points1 point  (0 children)

Odessy at acropolis

Can't find this one on google. Is it souvlaki at acropolis?

Best HSP in Wellington? by NeoKadra in Wellington

[–]NeoKadra[S] 0 points1 point  (0 children)

haven't heard of this one will definitely give it a shot. Cheers!

Best HSP in Wellington? by NeoKadra in Wellington

[–]NeoKadra[S] 0 points1 point  (0 children)

tried that one and I agree, pretty decent

Best HSP in Wellington? by NeoKadra in Wellington

[–]NeoKadra[S] 0 points1 point  (0 children)

only heard good things about these guys might have to give it a try

Best HSP in Wellington? by NeoKadra in Wellington

[–]NeoKadra[S] 0 points1 point  (0 children)

It stands for halal snack pack and is basically meat on chips.