/r/shittyprogramming
r/ShittyProgramming is participating in the Reddit blackout begging June 12th to protest the planned API changes that will kill third party apps.
More here: https://www.theverge.com/2023/6/10/23756476/ & https://archive.is/RtZdp.
For general news and info on the situation: r/Save3rdPartyApps and r/ModCoord.
Join the r/ShittyProgramming Discord server to discuss whatever: https://discord.gg/shittyprogramming
We will not be adding approved users to the subreddit during the blackout.
Have a tough programming question that /r/programming couldn't answer? Banned from Stack Overflow? Can't afford Experts Exchange?
Post your question/tips/secrets/advice and get a response from our highly-trained professional developers.
/r/shittyprogramming
Bug programmer and manager 🤣🤣
I am seeking a cloud service where a Python script, using PyAutoGUI or a similar tool, can interact with website elements, including mouse clicks, within a headless environment or through remote access. The challenge lies in finding a platform that supports such graphical interactions in a headless or remotely accessed setting
built this platform during the winter break and now it has a lot of features and good amount of active users so thought of sharing here
DevMatch - a platform for developer to meet other developers with similar interests, you can like, dislike and communicate with users using a decentralized chat protocol that you're matched with.
It has a job portal as well where you don't really have to add anything manually, it just goes through your github public repositories, gets all the tech stack that you've worked with and recommends you jobs as per that
You can check it out using the below link!
(you don't need any kind of external wallet to use it, just authenticate using your github, it only takes your username from there and scrapes the data that are already public)
Un amigo que tiene una empresa independiente esta teniendo problemas con el correo de Hostinger le podrían dar una manito, ya vimos hasta los tutoriales de indues para hacerlo funcionar y no anda.. el E-mail de contacto es el siguiente. innova_web@outlook.com
This Singleton can only be accessed by one thread at a time and uses modern .NET!
public class MySingleton
{
public static void Init()
{
//Make sure the static constructor gets called
}
private MySingleton() { }
static MySingleton()
{
var array = ArrayPool<MySingleton>.Shared.Rent(1);
array[0] = new MySingleton();
ArrayPool<MySingleton>.Shared.Return(array);
}
}
You need to call MySingleton.Init();
once or however often you please, the invocation of the static construcotr is thread safe. To use the Singleton call ArrayPool<MySingleton>.Shared.Rent(1);
if the array you got has the instance at [0] you are the thread that gets the instance. If not, try again later. Remember to return the instance with ArrayPool<MySingleton>.Shared.Return(array, false);
If you no longer need the singleton, set the second parameter of Return
to true
to destroy the instance and it can never be used again. Very secure!
Hi! Could I have a brief C++ code on two push buttons with 2 limit switches and a DC motor? The process will be button 1 will is pressed then the motor will move clockwise and when the limit switch 1 is triggered then the dc motor will stop. And if the button 2 is pressed (while the limit switch 1 might still be pressed) then it will rotate counter clockwise then it will stop if the limit switch 2 is turned on. This process will repeat itself and there are instances where button 2 will be pressed while limit switch 1 is still pressed and vice versa but it should still work. I'm also using an Arduino Uno board and a L298N motor driver as an H bridge. I wasn't able to do it and would be very very grateful if someone could help me or preferably write me the code! I'm just starting out with Arduino.
public class BadClass {
public static void main(String[] args) {
int $I = 0;
int _1 = 1;
do {
$I += _1;
System.out.println($I);
} while (_1 != ($I > 9 ? 0 : 1) && (Math.random() > 0.2 || Math.random() < 0.8));
}
}
Hello friends, as two amateur developers, we are about to release our first game. Since this is our first game, there may be mistakes and shortcomings, so we need your help. Our request is for you to go to our game's Steam page, download the demo, play it briefly, and provide us with feedback. Additionally, you can support us by adding it to your wish list.
https://store.steampowered.com/app/2703290/Bondman_Of_Traps/
Look at this switch...
int opt;
do switch (opt = getopt(argc, argv, "w:h:q:n:m:k:z:s:t:x:y:r:i:b:g:a:p:o:c:")) {
case 'w': width = atoi(optarg); break;
case 'h': height = atoi(optarg); break;
case 'q': samppp = atoi(optarg); break;
case 'n': maxi = atoi(optarg); break;
case 'm': bias = atoi(optarg); break;
case 'z': invert = atoi(optarg); break;
case 'k': kappa = atoi(optarg); break;
case 's': scale = atof(optarg); break;
case 't': theta = atof(optarg); break;
case 'x': vreal = atof(optarg); break;
case 'y': vimag = atof(optarg); break;
case 'r': jreal = atof(optarg); break;
case 'i': jimag = atof(optarg); break;
case 'b': bailout = atof(optarg); break;
case 'g': gam = atof(optarg); break;
case 'a': alpha = atof(optarg); break;
case 'p': gain = atof(optarg); break;
case 'o': fout1 = optarg; break;
case 'c': fin1 = optarg; break;
default: /* '?' */ break;
} while (opt != -1);
The twinkle in your eye...
The fizzle on your tongue...
Your fingers electric...
Your lips parting to grin...
int opt;
do switch (opt = getopt(argc, argv, "w:h:q:n:m:k:z:s:t:x:y:r:i:b:g:a:p:o:c:")) {
#define foo(ch, var, func) case ch: var = func(optarg); break;
foo('w', width, atoi); foo('h', height, atoi); foo('q', samppp, atoi);
foo('n', maxi, atoi); foo('m', bias, atoi); foo('z', invert, atoi);
foo('k', kappa, atoi); foo('s', scale, atof); foo('t', theta, atof);
foo('x', vreal, atof); foo('y', vimag, atof); foo('r', jreal, atof);
foo('i', jimag, atof); foo('b', bradi, atof); foo('g', gamma, atof);
foo('a', alpha, atof); foo('p', gain, atof); foo('o', fout1, );
foo('c', fin1, ); default: /* '?' */ break; } while (opt != -1);
#undef foo
Did you flinch?