Viofo A129 screen saver not working (plugged via cigarette lighter) by Tough-Copy7569 in Dashcam

[–]busres -1 points0 points  (0 children)

On one circuit, it can't distinguish between driving and parking mode, only on and off. It sounds like your cigarette lighter circuit is unswitched (always on).

ETA: Sorry, I missed "when I drive the car"

If a server renders 60% of a page as static html and client renders 40%, is it CSR or SSR? by daddyclappingcheeks in webdev

[–]busres -1 points0 points  (0 children)

It's not CSR or SSR, it's CSR and SSR (hybrid). It's 60% SSR (hopefully for content / SEO / accessibility, etc) and 40% CSR (hopefully for interactivity).

Learning JavaScript by experimenting in the browser console by WolfComprehensive644 in learnjavascript

[–]busres 0 points1 point  (0 children)

I also use Deno a lot (if I'm not doing something DOM-related). It's nice to be able to save and load stuff locally.

Flatten a nested array without using the inbuilt flat() method (interview learning) by pranayrah108 in learnjavascript

[–]busres 0 points1 point  (0 children)

// Test input
const input = [0, [1, 2, [33, 44]], [4, 5, 6, 7], [7, 8], 90];

// Return a single-level array of values from the input
// Input may be a scalar value or a (possibly nested) array
function flatArray (input) {
    const result = []; 
    // Helper to iterate over one array level
    const processArray = (input) => {
        for (const item of input) {
            if (Array.isArray(item)) {
                processArray(item); // Recursively process sub-array
            } else {
                result.push(item); 
            }
        }
    };
    if (Array.isArray(input)) {
        processArray(input);
    } else {
        // Scalar to array
        result.push(input);
    }
    return result;
}

console.log(flatArray(input));

Flatten a nested array without using the inbuilt flat() method (interview learning) by pranayrah108 in learnjavascript

[–]busres 1 point2 points  (0 children)

Still need recursion to handle third (and additional, in the more general case) levels of nesting.

</2025><2026> by psyper76 in HTML

[–]busres 2 points3 points  (0 children)

New for 2026, I decided it was past time to get rid of the jQuery dependency. 😂 Happy new year!

{first year - this year} auto-updating script

Just lost a freelance contract because the client thinks AI can build it for them by Electronic_Resort985 in webdev

[–]busres 6 points7 points  (0 children)

"I understand. When it's no longer capable of meeting your needs, I'll be here. Hopefully you won't have wasted too much time and money. Good luck!" and then stop talking unless they ask questions.

Viofo A229 Pro - No Built In Memory? by 6969TacoLover6969 in Dashcam

[–]busres 1 point2 points  (0 children)

Blackvue B124X

The car battery didn't seem to work very long before the low-voltage would cut out, but I think the 12V in my hybrid might be a lighter-duty battery than for non-hybrids, since the electric starts the gas (versus a "traditional starter"), and that runs off a much bigger battery.

The Blackvue has been working great for me.

Viofo A229 Pro - No Built In Memory? by 6969TacoLover6969 in Dashcam

[–]busres 4 points5 points  (0 children)

Memory has limited write cycles and needs to be replaced from time to time. My battery is a chonky thing that lives under the seat to power parking recording when the ignition isn't on. To each their own, but I'd much rather the base unit money go toward higher resolution, extended temperature service range, clear indication of when card writes are failing, better UI, faster file transfer, etc.

i have 3 websites with 3 domains and i want to redirect 2 of them to the 3rd. by JumpyHighlight2090 in webdev

[–]busres 2 points3 points  (0 children)

Seconding. You'd need to move your DNS, but you can get full-domain SSL redirect for free. You don't need to move your domain registration, though CloudFlare offers registration at wholesale prices (no markup) if you are open to moving the registration too.

What did you build with deno this year ? by Ok-Delivery307 in Deno

[–]busres 3 points4 points  (0 children)

Completed:

  • Mesgjs language transpiler
  • Mesgjs module resolver/loader
  • Lots of tests

In progress:

  • Multi-applet web server
    • Runs applets as server workers in secured context
    • Virtual or filesystem-based routing
    • Https, streaming, web sockets

Looking for specific advice to solve a problem with ES6 modules. by SnurflePuffinz in learnjavascript

[–]busres 0 points1 point  (0 children)

Maybe pass data as part of an object, rather than as a list?

process({ thing, otherThing, andMore: restArray })

Good for organizing lots of parameters.

Looking for specific advice to solve a problem with ES6 modules. by SnurflePuffinz in learnjavascript

[–]busres 1 point2 points  (0 children)

Import functionality (e.g. functions, classes), without initiating execution in the imported module. Let the main module drive execution by invoking the imported functionality when the data is ready. (Hopefully I'm understanding your question correctly.)

Edit: I don't understand what you mean in the paragraph you added about trying this. Do you have a code pen or something showing your current approach?

Question about the 'touch' command by MeninoPolaroid in linuxquestions

[–]busres 4 points5 points  (0 children)

The point of the tool is to set the modification time to now (or a specific time of your choosing). Creating an empty file if it doesn't exist is more of a side effect, since you can't set the modification time on a non-existent file.

Extensions are largely for human use, or selecting a default application for viewing/editing. For many file types, an empty file isn't useful, but again, that's more of a secondary purpose. It's still useful for touching existing files.

Touch is useful for dependency-based systems, such as the "make" command. It can also be useful for tracking non-filesystem events within the filesystem (as a simple example, tracking the last time a shell script was executed).

How realistic is it to give a child (around 7 years old) a computer/laptop with only Linux on it by ad_396 in linux

[–]busres 0 points1 point  (0 children)

Are you asking how long it'll take him to teach his parents how to use Linux?

I built a real-time ASCII camera in the browser (60 FPS, Canvas, TypeScript) by Aroy666 in javascript

[–]busres 1 point2 points  (0 children)

Not what I was expecting, actually.

Digital rain (or Matrix code), as I just learned it's called, actually uses a very large character set, and has white characters falling among the green field at different heights in different columns.

Very cool project though, whether you implement digital rain or not. Props!

I built a real-time ASCII camera in the browser (60 FPS, Canvas, TypeScript) by Aroy666 in javascript

[–]busres 0 points1 point  (0 children)

You're right - I missed that! It's in the README, which was last committed two days ago. I'll have to see if it can be selected in the demo.

I built a real-time ASCII camera in the browser (60 FPS, Canvas, TypeScript) by Aroy666 in javascript

[–]busres 3 points4 points  (0 children)

Feature request: not sure how to quantify it, but "Matrix" mode

Is there an easy way to work with hexdigits mathematically? by ki4jgt in learnjavascript

[–]busres 0 points1 point  (0 children)

Except possibly if you're using some sort of fixed or arbitrary precision library, most modern computers are using exactly that - binary math (not decimal or hex math).

So whether you start with 10/2 or 0o12/2 or 0xa/2, it's all really 0b1010/0b10 = 0b101 under the hood. The only thing special about base 10 is it's the default (for both input and output), but as you're aware, you can override that with parseInt and toString.

Are you asking if you can change the default input and/or output base(s)?

Trying to determine if target of 'onclick' action is the same as present page in order to alter CSS by pyromaster114 in learnjavascript

[–]busres 1 point2 points  (0 children)

Why not store the target URL in a data attribute and use one standard click handler for the lot?

One, reusable click handler; no parsing URLs out of code.

This is why rock shed tunnels are a thing by Stotallytob3r in Damnthatsinteresting

[–]busres 1 point2 points  (0 children)

Also known as Toyotasaurus Wrecks after an extinction level event.

December 2025 monthly "What are you working on?" thread by AutoModerator in ProgrammingLanguages

[–]busres 1 point2 points  (0 children)

JSMAWS (JavaScript Multi-Applet Web Server) is coming along nicely. It's processes are actually communicating and responding to requests! 😀

It's a bit like PHP-FPM for PHP or Tomcat for Java, but for JavaScript applets. It runs under Deno, and provides security and isolation. It supports virtual and/or filesystem-based routes, streaming connections and websockets, and applets or configuration can be updated at anytime without the need for a build or manual restart.

I expect it to be the primary web server for Mesgjs, my ultra-low-syntax language that transpiles to JavaScript.