When sleeping, I always wear a long pyjama trouser, otherwise the blanket touching me keeps me up.
- 2 Posts
- 87 Comments
Alternatively: I need to look for new types of <Thing> to add to my (digital) collection. <Thing> might be Plant Species, Funny License Plate Texts, WiFi names, …
mcmodknower@programming.devto
Linux@lemmy.ml•How to run a Flatpak Terminal without internet permission?English
4·3 months agoYou want to find a way to remove the “open other programs” permission from the terminal. Or run it in a VM without internet connection.
mcmodknower@programming.devto
Fox News@lemmy.sdf.org•Foxes moved into a solar farm, and they ended up turning the panels into part of their habitatEnglish
14·3 months agoFrom the comments of the crosspost on the solarpunk community:
This reads like AI garbage
This is the actual source that the article uses for all its claims: https://bren.ucsb.edu/events/response-endangered-san-joaquin-kit-foxes-solar-farms
Not quite the same conclusions between the two…
mcmodknower@programming.devto
Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ@lemmy.dbzer0.com•Which Android app do you use for YouTube?English
471·3 months agoI use firefox with ublock origin. Its not as good as an app, but it works for me.
its part of the Debian packages (https://packages.debian.org/search?keywords=ani-cli&searchon=names&suite=stable§ion=all), as well as some other distros packages, which is a huge green flag for me. in the top of their readme it says “This tool scrapes the site allmanga.”, so you should take a look at that site for more info on how it gets the anime.
mcmodknower@programming.devto
Android@programming.dev•Are the good, opensource email clients out there that check emails at regular intervals and configurable filters?English
3·4 months agotry K-9 Mail, it has a configurable background syncing: https://f-droid.org/packages/com.fsck.k9
mcmodknower@programming.devto
C Programming Language@programming.dev•[Beginner] How do I save previous input in variables/arrays?English
2·4 months agosome things seem to have duplicated in there, i will clean it up now.
mcmodknower@programming.devto
C Programming Language@programming.dev•[Beginner] How do I save previous input in variables/arrays?English
4·4 months agoFor saving the history inside of one program run, an array is enough. For saving the history over multiple program runs (over closing by typing and invalid character or ctrl+c and restarting it), you would need to store it in a file.
You can already print the last conversion by reading the value of
f_value/c_valuewithout writing to it (note that if no conversion of that type has happened before, you will get garbage, and that you will have to modify the if at the start of the loop to check for ‘x’ too):if (choice == 'x') { // x is the letter left of c, so i chose it as an easy example // we want to print the previous conversion, so we don't want to read in a new value. // printf("\nEnter the temperature in Celcius: "); // scanf("%d", &c_value); // you might need to comment this getchar() back in so your program skips over the enter after the x, but i am not sure. // getchar(); // no modification of the following line is needed, as the c_value of the last celcius conversion was never written too and as such still exists. printf("\n%d degrees Celcius is %.1f degrees Fahrenheit.\n", c_value, toFahrenheit(c_value)); }For a longer history you need some extra places to store the numbers. if you use an array, you need to store the length of the history too, since c does not store how far into the array you have written.
// at the start of your main function, where you also declare the other variables // allocate the array with fixed length int last_c_values[16]; // and store how many values you've written to it. Initialize it to zero so you don't do garbage with it later on. int last_c_values_count = 0; // after printing the conversion from celsius to farenheit if (last_c_values_count < 16) // we can't handle a history longer than that yet // copy over the current value into the array, the first one will be at index 0 last_c_values[last_c_values_count] = c_value; // increase the counter so the next value will be at the next place last_c_values_count = last_c_values_count + 1; // or shorter: last_c_values_count++; } //and the new choice for printing the stuff if (choice == 'x') { // x is the letter left of c, so i chose it as an easy example // start at 0, as long as i is below last_c_values_count, increment i by one at the end of each loop run for (int i = 0; i < last_c_values_count; i++) { // copy the value from last_c_values at index i into c_value c_value = last_c_values[i]; // and do the same calculation as before again. printf("\n%d degrees Celcius is %.1f degrees Fahrenheit.\n", c_value, toFahrenheit(c_value)); } }PS: the
forloop in here is equivalent to the following while loop:int i = 0; while (i < last_c_values_count) { // copy the value from last_c_values at index i into c_value c_value = last_c_values[i]; // and do the same calculation as before again. printf("\n%d degrees Celcius is %.1f degrees Fahrenheit.\n", c_value, toFahrenheit(c_value)); i++; }
mcmodknower@programming.devto
techsupport@lemmy.world•[Help with C] Any way NOT to display the input of getchar() TWICE?English
7·4 months agoThe first char appears because your terminal is echoing back what you are typing in. This is the default, and you see it also in most other programs, with password inputs as a big exception. Those tell the terminal in some way that it should disable the echo functionality, and turn it back on after the password has been read. see https://stackoverflow.com/questions/59922972/how-to-stop-echo-in-terminal-using-c for more info
mcmodknower@programming.devto
Ask Lemmy@lemmy.world•To which community can I post damaged euro coins?English
10·5 months agomaybe !justpost@lemmy.world
mcmodknower@programming.devto
Programming@programming.dev•What was the smallest python hobby project you worked on?English
2·5 months agoMy smallest python program was for filtering wifi names according to patterns. I hab collected some wifi names atomatically via sone other programs, and had them sitting in a text file with one name per line (a very simple data format). I wanted to find interesting names out of it, but didn’t want to spend much time scrolling through hundreds of names following the same pattern, like ISP-12C5, ISP-3F4B, … So i invented my own pattern syntax for very simple patterns, (ISP-%4Ax for ISP- followed by 4 hexadecimal digits with only capital letters), and wrote up a python script that read patterns from a file, and then filtered the standard input against those patters. any line not matching any pattern was then printed.
In short it was a small project that i wanted to do, with simple data formats that i could easily parse and relatively simpel logic that i had ideas how to implement while designing the patterns. And i had some data to test it on.
So my advice is similar to the other people here: look for things you are interested in or you need that sound simple to program, and then go on and program one of them. No problem is too small to make a program for.
mcmodknower@programming.devto
linuxmemes@lemmy.world•Well I can see why people might not careEnglish
8·6 months agoYay, welcome to the team.
PS: Are you on !emacs@programming.dev already? Maybe with new people it will have more activity.
mcmodknower@programming.devto
Git@programming.dev•What do you use to communicate with your git repositories?English
7·7 months agoi use the standard git cli mostly, and sometimes the magit package for emacs (but only when i am also working in emacs already)
mcmodknower@programming.devto
Ask Lemmy@lemmy.world•Can anyone recommend any good science communicators for a 12 year old girl?
16·7 months agoin german the z and s sounds are switched. and you missed the actual z. its Kurzgesagt (from the word “Kurz” (short) and the 3. person singular perfect of the verb “sagen” (to say), “gesagt” (said)).
(sorry but i couldn’t not correct you and explain where the word came from)
mcmodknower@programming.devto
ich_iel@feddit.org•ich🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆
7·7 months agoLasse mich aber gerne vom Gegenteil überzeugen.
Das was du willst ist
echo Ente | tee /dev/stdin, da tee sowohl in /dev/stdin als auch auf die Konsole schreibt.
mcmodknower@programming.devto
Linux@programming.dev•Where is Linux not working well in your daily usage? Share your pain points as of 2026, so we can respectfully discuss
8·8 months agokde connect allows you to sync the (text) clipboard between a pc and a smartphone that are in the same network.
mcmodknower@programming.devto
No Stupid Questions@lemmy.world•What do other languages use for "magic" words; or names and titles in fantasy and sci-fi novels or cinema?English
342·9 months agoOne Japanese anime (Ascendance of a Bookworm) uses German for the names of the gods.
mcmodknower@programming.devto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?English
16·10 months agoSome minecraft mods had/have a similar problem. They use javas serialization stuff for sending stuff between client and server. There is mod that partially fixes this by only allowing whitelisted classes to be deserialized.



That’s not installing Firefox, that’s https://github.com/dustinkirkland/hollywood