Skip Navigation
Removed
Can I generate a text file of a folder's contents (files) on the phone?
  • You could download a terminal app (termux from f-droid) and run ls > file.txt. You would first want to cd (change directory) to the location you're interested in. This will generate a file.txt with the output of ls (list files command).

  • [2023 Day 3] Motivation time!
  • I'm still working on my part 1 😭 string parsing makes me feel so stupid haha. But I'm adamant on coming up with a "nice" solution even if the number of lines aren't minimal. I've got something quite nice at the moment and I anticipate coming in under 100 lines (including whitespace, comments, and formatting).

  • [2023 Day 3] Motivation time!
  • I haven't been parsing the input string character by character and instead have been parsing into native data structures. It makes the code more verbose but it's how I want to do it. Unfortunately it does mean most of the time coming up with a solution is structuring the data so I'm hoping I come up with a faster way after a few days.

  • [Help] [2023 Day #1 (Part 2)] Attempted solution - answer not accepted

    I'm using this starter kit for the scaffolding so I can simply run mix test for the example and mix d01.p2 to run the solution for my specific data set.

    I've got the following code that passes p1 completely and the p2 example but not my specific data set. I can't find any bugs but the result fails for being "too high" and I'm really not sure why this is not being accepted. I have the debug output for each step and running through it manually everything seems right to me.

    Is anyone able to point me in the right direction on what I'm missing?

    https://pastebin.com/US8ikNLx

    ``` defmodule AdventOfCode.Day01 do def part1(args) do args |> String.split(~r/\n/, trim: true) |> Enum.map(&line_calibration_value/1) |> Enum.sum() end

    def part2(args) do args |> String.split(~r/\n/, trim: true) |> Enum.map(&words_to_numbers/1) |> Enum.map(&line_calibration_value/1) |> Enum.sum() end

    defp words_to_numbers(string) do numbers = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]

    String.replace(string, numbers, fn x -> (Enum.find_index(numbers, &(&1 == x)) + 1) |> Integer.to_string() end) end

    TODO: doesn't work if the string has no numbers

    defp line_calibration_value(string) do # remove any non-numeric characters number_from_string = String.replace(string, ~r/[^\d]/, "")

    calibration_number = [ # first number String.at(number_from_string, 0), # last number, or first number is string has length of 1 String.at(number_from_string, -1) ]

    calibration_number |> List.to_string() |> String.to_integer() end end ```

    9
    40% off all Pragmatic Studio courses!
    pragmaticstudio.com The Pragmatic Studio

    Premium video courses for software developers. Real apps. Real code. Really good stuff!

    The Pragmatic Studio

    This only comes around once a year and is a great time to pick up some of their great courses using promo code 2023THANKS.

    • Elixir & OTP $149 down to $89
    • Phoenix LiveView $129 down to $77
    • Full-Stack GraphQL with Phoenix $99 down to $59
    0
    New Google Maps feature

    I got a push notification about how my Pixel just got more useful...yeah ok let's check this out. Turns out no, it's nothing new to me as Android 14 has been out for about a week now.

    EXCEPT for a new "Immersive View" mode in Google Maps. It's just that I can't help but feel something here is wrong...missing even.

    If you didn't see it, well I'm pretty sure the bridge doesn't have a huge structural gap in it.

    How long before Google kills this feature?

    0
    It's not a bug, it's a feature!

    I've noticed a small issue with my email client for quite some time now where composing a new email will have several blank lines by default.

    It's not too much of an issue to simply delete them but hey, maybe no one had pointed this out before! So I filed a bug report only to get this response... basically it's not a bug, its a feature!

    44
    It's not a bug, it's a feature!

    I've been a Proton Unlimited subscriber for some time now. I've always had an issue on Proton Mail (Android) when composing a new email it comes pre-filled with a number of blank lines in the body. Definitely a minor issue as it hadn't been fixed for a long time I decided to file a bug report. This was Proton's response:

    >Currently, this is the expected behavior when you are composing a message through the Proton Mail Android application. > >Please kindly note that other users have expressed their opinion regarding this behavior as well and we have added your vote for this feature improvement request.

    Basically: it's not a bug, it's a feature!

    Is there actually anyone out there relying on this "feature"?

    9
    InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)ST
    stifle867 @programming.dev
    Posts 6
    Comments 487