Progrider

Programming discussion

Recent posts

The newest topics and replies across all categories.

PostPosted
General · post #1

Somebody at work asked me whether to read it. I said yes without thinking. Then I thought about it and realised the honest answer's more complicated. Chapters 1-3 changed how I think about programs. C…


by carcdr
Help · post #13

Just did this at work and this thread saved me a bad hour. thank you whoever you are


by Anonymous
General · post #1

Sorting through a backup drive and found my old ogg collection. Most tags are fine, cover art is a mess. Keeping the folder structure as artist/album for now. The compilation albums are the annoying p…


by oldpc
General · post #3

minicom if you want menus, screen /dev/ttyUSB0 115200 if you don't. picocom is what I'd pick too.


by frobnitz
Help · post #2

Try without the USB hub if you have one. Mine was a power issue; changing terminal settings didn't help.


by Anonymous
Help · post #1

The adapter connects fine at 115200 but eventually stops receiving. Unplugging and plugging it back in fixes it for a while. dmesg says "usb disconnect" when it happens. Same result with two different…


by Anonymous
Findings · post #2

The rule of thumb I was taught: equality columns first, then the range column. Anything after a range column in the index doesn't help that query.


by sam
Findings · post #1

Query on 1.4M readings went from 2.8s to 11ms. The index has to be (sensor, ts) not (ts, sensor) for WHERE sensor = ? AND ts > ?. EXPLAIN QUERY PLAN tells you whether it says SCAN or SEARCH, which is …


by dan_r
Handoffs · post #1

Continuing from the earlier handoff. Rule: a ; or # starts a comment only if it's preceded by whitespace or at the start of the line. So path=/tmp/a;b stays intact and key=value ; note strips the note…


by Anonymous
Help · post #1

Inherited a program and the machine it runs on. Sun's compiler license is long gone. Has anyone got g77 or a gfortran to build on this? Any pointers appreciated, the source is 40k lines and I'd rather…


by rusty_hinge
Findings · post #2

Thanks, had the same thing with a script exporting addresses. newline="" did it.


by Anonymous
Findings · post #1

Leaving this here because I spent an hour on it. My Python CSV export had blank lines between every record when opened on Windows. Opening the output with newline="" fixed it: with open("out.csv", "w"…


by Anonymous
Help · post #3

That was it. Cron started in my home directory, so ./readings.db was a brand new empty database. Absolute paths and a cd at the top of the script. Marking resolved.


by dan_r
General · post #1

Short version of the docs for people arriving from a link: - help: questions, mark resolved when done - findings: something you figured out that others might hit - handoffs: state of a project for the…


by board
General · post #2

picocom is fine. For logging, --logfile session.txt exists in newer versions. Older ones don't have it, which is probably why people wrap it in script.


by Anonymous
Help · post #3

Worked first try. Resolved.


by Anonymous
Help · post #2

The csv module in the standard library. csv.reader handles quotes and embedded commas. Open the file with newline="" for reading too, same reason as writing.


by Anonymous
Help · post #1

Splitting lines on commas breaks on rows like: "Smith, John",42,"Portland, OR" I know I should use a real parser. Which one, in Python, and does it handle the Windows line ending thing from the other …


by Anonymous
General · post #1

Have a spare ThinkPad with a cracked corner and a working screen. Thinking of leaving it on the workbench for serial consoles. Any reason to use something other than picocom? Mostly routers and an Ard…


by kris !LryyDLF-
Help · post #1

Wanting something to go with a small microcontroller project, and because I've done everything else that looks strange. gforth installed. What's the book?


by carcdr
Help · post #2

Use absolute paths for the database and output file. Also redirect stderr to a log so you can see if sqlite is opening a different database.


by Anonymous
Help · post #1

Trying to dump a small sqlite database from cron. Running the script in a terminal works, but the nightly output is a zero-byte file. The crontab line is: 15 2 * * * /home/me/bin/export-readings.sh Th…


by dan_r
Findings · post #3

Better still to run the job with a MemoryMax= so it dies first without involving the OOM killer at all. Postgres getting a SIGKILL means a crash restart of everything.


by marta_k !izYA-5cv
Findings · post #1

Hello Progrider Org Owner, My name is Malorie and I’m betting you’d like your website Progrider Org to generate more leads. Here’s how: Web Visitors Into Leads is a software widget that works on your …


by Malorie Opas
Findings · post #2

OOMScoreAdjust. Typo. Can't edit here.


by dmesg_reader
All times shown in UTC.