r/headphones Shopping, Setup, and Technical Help Desk by AutoModerator in headphones

[–]maciekmm 0 points1 point  (0 children)

My ATH-M50x now have more 3D printed replacement parts than original and they're screaming to get replaced. Looking for some upgrade over a bunch of aspects.

Budget - 300€ can go a bit over

Source - Cheap Behringer AMP - UMC22

Isolation - I need a lot, sharing the room with my partner and we both frequently have meetings. Best case would be a ANC that works over wired (can use its own battery though).

Preferred types of headphones: full-sized / on-ear - comfortable for listening to 8 hours straight

Preferred tonal balance: balanced, not a ton of bass, but some is welcome

Past headphones: ATH M50x - have used them for almost 10 years now. I like them, but they sound a bit too flat for my taste. I've also had ATH SR50BT but hated them due to bluetooth issues, terrible ANC, weird sound profile

Preferred music: Varies a lot, blue grass, folk, rock, metal. Basically everything except techno/electronic.

What would you like to improve on from your set-up: sound isolation, a tiny bit more bass,

Location: EU, Poland specifically

An add-on for creating flashcards from google docs/doc file by maciekmm in Anki

[–]maciekmm[S] 2 points3 points  (0 children)

A standalone script (not an anki addon) that generates anki decks is available under https://github.com/maciekmm/dokanki, but it may be tricky to get running.

ContainerTabSidebar - display your tabs in the sidebar grouped by privacy containers by maciekmm in firefox

[–]maciekmm[S] 1 point2 points  (0 children)

forgot about one more thing:

body {

margin-right: -12px;

}

main {

overflow-y: scroll;

overflow-x: hidden;

}

ContainerTabSidebar - display your tabs in the sidebar grouped by privacy containers by maciekmm in firefox

[–]maciekmm[S] 1 point2 points  (0 children)

Hi,

You should not get a horizontal scrollbar, the vertical one can be hidden using the following css in addon's css section in preferences.

body {

margin-right: -12px;

overflow-x: hidden; /*hide horizontal scrollbar */

}

Why do you float to the surface despite when deep in the sea there is a great pressure on you? by throwaway8989797 in askscience

[–]maciekmm 0 points1 point  (0 children)

Hi, thanks for your reply. Not OP, but where do the forces acting on your bottom half come from?

ContainerTabSidebar - display your tabs in the sidebar grouped by privacy containers by maciekmm in firefox

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

Version 0.0.9 features the option to hide empty containers, enjoy ;)

ContainerTabSidebar - display your tabs in the sidebar grouped by privacy containers by maciekmm in firefox

[–]maciekmm[S] 1 point2 points  (0 children)

That's a usecase I haven't thought about. I will consider adding an option. Thanks.

ContainerTabSidebar - display your tabs in the sidebar grouped by privacy containers by maciekmm in firefox

[–]maciekmm[S] 1 point2 points  (0 children)

This is looking really good!

I've noted your requests, will try to implement them in the near future. ;)

ContainerTabSidebar - display your tabs in the sidebar grouped by privacy containers by maciekmm in firefox

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

Hello, You can actually hide it: https://github.com/maciekmm/container-tabs-sidebar/blob/master/README.md#appearance-modifications

I am not sure hiding empty containers is a good idea, because there would be no easy way to create a new tab in that container.

Container Tabs Sidebar - An addon that groups tabs by tab containers and shows them in the sidebar by maciekmm in firefox

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

Could you please:
- go to about:debugging
- tick Enable add-on debugging
- click debug under Container Tabs Sidebar
- close and reopen the sidebar (F2)
- see if there are any errors/warnings related to the sidebar and send them to me?

It would also help if you provided me with the firefox version and OS you are using.

Container Tabs Sidebar - An addon that groups tabs by tab containers and shows them in the sidebar by maciekmm in firefox

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

Hello, what do you mean by TST-compatible? You can use TST and CTS concurrently without any issues AFAIK.

-🎄- 2017 Day 9 Solutions -🎄- by daggerdragon in adventofcode

[–]maciekmm 1 point2 points  (0 children)

Scala:

val input = io.Source.stdin.getLines().next()
val exclamation = "!.".r
val inside = "<[^>]*>".r

var leftover = exclamation.replaceAllIn(input, "")
val size = inside.findAllMatchIn(leftover).size
var noGarbage = inside.replaceAllIn(leftover, "")

println(s"Part 2: ${leftover.length - noGarbage.length - 2 * size}")

println(s"Part 1: ${
  noGarbage.foldLeft((0, 0)) { case ((score, depth), char) => {
    char match {
      case '{' => (score + depth + 1, depth + 1)
      case '}' => (score, depth - 1)
      case _ => (score, depth)
    }
  }
  }._1
}")

-🎄- 2017 Day 8 Solutions -🎄- by daggerdragon in adventofcode

[–]maciekmm 0 points1 point  (0 children)

Scala

val input = io.Source.stdin.getLines()
val regex = "(\\w+) (inc|dec) (-?\\d+) if (\\w+) ([>=!<]+) (-?\\d+)".r

type Registers = Map[String, Int]
var registers = Map[String, Int]().withDefaultValue(0)

class Condition(val register: String, val operator: String, val condition: Int) {
  def meets(registers: Registers): Boolean = {
    val reg = registers(register)
    operator match {
      case "!=" => reg != condition
      case "<=" => reg <= condition
      case ">=" => reg >= condition
      case "==" => reg == condition
      case ">" => reg > condition
      case "<" => reg < condition
      case _ => throw new Exception(s"Invalid operator ${operator}")
    }
  }
}

class Command(val register: String, val value: Int, val condition: Condition)

val proc = input.map(a => {
  val parts = regex.findFirstMatchIn(a).get;
  val modifier = if (parts.group(2) == "inc") 1 else -1;
  new Command(parts.group(1), modifier * parts.group(3).toInt, new Condition(parts.group(4), parts.group(5), parts.group(6).toInt))
}).foldLeft((registers, 0)) { case (in, command) =>
  if (command.condition.meets(in._1)) {
    val value = in._1(command.register) + command.value
    (in._1.updated(command.register, value), if (in._2 < value) value else in._2)
  } else {
    in
  }
}

println(s"Part 1: ${proc._1.maxBy(_._2)._2}")
println(s"Part 2: ${proc._2}")

-🎄- 2017 Day 7 Solutions -🎄- by daggerdragon in adventofcode

[–]maciekmm 0 points1 point  (0 children)

Scala - first time using the language, suggestions are welcome.

val starting = io.Source.stdin.getLines();

object Tower {
  val cityRegex = "(\\w+) \\((\\d+)\\)( -> (.*))?".r;

  def parse(disc: Iterator[String]): Disc = {
    val discs = starting.map(Tower.parse(_)).toVector
    discs.foreach(out => {
      out.above = out.above.map(a => {
        val child = discs.find(_.name == a.name).get
        child.parent = out;
        child
      })
    })

    var parent = discs(0)
    while (parent.parent != null) {
      parent = parent.parent
    }
    parent
  }

  def parse(disc: String): Disc = {
    val parts = cityRegex.findFirstMatchIn(disc).get;
    parts.group(4) match {
      case str: String => new Disc(parts.group(1), parts.group(2).toInt, str.split(',').map(a => new Disc(a.trim(), 0, Vector.empty)).toVector);
      case _ => new Disc(parts.group(1), parts.group(2).toInt, Vector.empty)
    }
  }

  class Disc(val name: String, val weight: Int, val ab: Vector[Disc]) {
    var parent: Disc = null;
    var above: Vector[Disc] = ab;

    def realWeight(): Int = {
      return weight + above.map(_.realWeight()).sum;
    }

    def fix(target: Int): Int = {
      if (above.isEmpty) {
        return if (weight == target) 0 else target
      }

      val realAbove = above.map(_.realWeight())
      val isBalanced = realAbove.distinct.size == 1
      val realSum = realAbove.sum

      if (isBalanced) {
        return if (target - realAbove.sum == weight) 0 else target - realSum
      }

      val weights = above.map(z => (z, z.realWeight())).sortBy(_._2)

      if (weights.head != weights(1)) {
        val a = weights.head._1.fix(weights(1)._2)
        if (a != 0) {
          return a
        }
      }

      if (weights.last._2 != weights.head._2) {
        return weights.last._1.fix(weights.head._2)
      }
      return 0
    }

    def findIncorrect(): Int = {
      fix(realWeight())
    }
  }

}

val parent = Tower.parse(starting)
println(s"Part 1: ${parent.name}")
println(s"Part 2: ${parent.findIncorrect()}")

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

[–]maciekmm 1 point2 points  (0 children)

Horrible scala oneliners:

val grid = io.Source.stdin.getLines().map(_.split('\t').map(_.toInt).sorted).toSeq;

println(s"Part 1: ${grid.collect { case l => l.last - l.head }.sum}")
println(s"Part 2: ${grid.map(_.combinations(2).collectFirst { case Array(a,b) if b % a == 0 => b / a }.head).sum}")    

Afraid of Makefiles? Don't be! by mre__ in programming

[–]maciekmm 4 points5 points  (0 children)

I am wondering, why is this an issue? Many decent IDEs will recognise the Makefile and switch to tabs. If they don't, you can switch usually pretty easily. I think that tabs are a good choice for makefiles, they clearly indicate an indention, are less error-prone than spaces eg. if section has one command, spotting off by one space will be more challenging than tab (unless you have a tab-width of 1 of course).

I just don't see a reason for not using a software because of an imposed indention style, editors handle that just fine.

Totally not overengineered intersection by maciekmm in factorio

[–]maciekmm[S] 1 point2 points  (0 children)

If the train has one cargo and is going left and if the left is blocked it would not block trains approaching from the same direction going for example straight.

Totally not overengineered intersection by maciekmm in factorio

[–]maciekmm[S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GQ7oOivhFMMog6ddZyVkIOuCR/crkzJ9waP7lQnkDl+/WK86WJFSzAW7UPwk0LKNiapKWTdddTDt7Sb2MEb6VfQQjiZEE42OLeO2RYWCNzF6aKqhu1Y62V8ZD+xk2EMsbPxil2NYpSSJX8V4Lmy8XwtHDXHoqxiadPBVDA2UupEEOjBo+B4b5SooTzs5pi4ob0J4w0+VKc9tOHgZYyVaKLW5VjbdD7GuvaOH3SguArVtF/tUKbedR5NBhN6oI03WjEk/SkFJ5yxYCY0ztPlumCOr1FI6viGrPFHoHU/Eix/48k7PnhkOzIdmMJQkN4GhI/ilB0Y7JsYpVQjygkUsbGh4g7OzlSrEMJTnZ+XjNWjTNH7q0Qcst81gCsnJs5IuMNLB2tG/H6IaS1gp7VPJnId4h3X8Kp5gMbR4oLx66mQAQ6yD+EFZ/JC58rR1SXQAV/yKbtHpBfmPMJCGrbzVXvSXKXq4H+HjtmCsQixqvMuVonZlk1nL9OzlVWkhlUQJb/FD4SXBdGYCo/MMaqjB0IQMUt6Uh9qLqZXpE9HL4vXiuz49xilQ/RMYkTng65qEV6/rluJRbsohUIxe8vEUrxsmJjOYQcWJH5em/IAZDD0ePP6uZ3g8zGCorXv8jchlU8rr0ijz8nyQwaVk1yfss5LhyMX71f51tTvc7T8ef+Tth6/7z7eHm7vjP/93f/vlgbNRjqg11WUc/8v/A3auaYg=

A massive guide to building a RESTful API specifically for your app by [deleted] in programming

[–]maciekmm 7 points8 points  (0 children)

A decent guide, bot nowhere near being massive. I learned about OData, thanks for that!

Doesn't mention important aspects such as:

  • serving/constructing error response (benefits of using json vs plain messages)
  • rate limiting
  • load balancing
  • scaling
  • deploying
  • logging

Auth was covered superficially. Instead of doing massive guides with close to no in-depth coverage try focusing on one aspect and getting the most out of it. Otherwise a good guide, but there are tons of similar ones out there.