« first day (2807 days earlier)      last day (1202 days later) » 

12:00 AM
RELOAD! There are 7254 unanswered questions (89.6428% answered)
 
1
Q: Command line utility for user data migration from MUBI.com to letterboxd.com

triclosanPlease make code review for command line utility for user data migration from MUBI.com to letterboxd.com. Utility makes Get HTTP request downloads json-data, parses it and saves as CSV-file. Can be found at github // mubi2letterboxd is a simple command line utility for user data migration from MU...

 
12:29 AM
0
Q: Feedback and concerns about my code

IdaI am fairly new to Python and have tried to create a tic tac toe game that is completley automatic, where you can see if a player1has an advantage if you let it start in the middle and I would love some feedback on it and improvement areas. Briefly about how it works is that you start by calling ...

0
Q: How can I view a 1D array in numpy as a 2D (1 by n) array?

tsumuji_kazeI apologize if this has been asked before, but I can't seem to find an answer or I am not searching for the answer correctly. I am currently writing code in python using numpy and my function takes a input as a matrix. I want to view a 1D array as a (1 by n) 2D array. Here is a minimal example of...

 
1:11 AM
 
 
2 hours later…
3:29 AM
0
Q: Exchange simulation that trades between currencies

ahmadalibinI need help to optimise the code as it becomes slow with a large dataset. I have an exchange simulation program that takes in market prices from a csv and then allows the user to place bids and offers for the products (currencies) that are up for trade. OrderBookEntry.cpp contains the constructor...

 
 
2 hours later…
5:12 AM
0
Q: Parse Certain C++ Headers and Dynamically Generate Other Headers Containing Boilerplate Code

user64742A link to the pull request in question. I maintain a C++ DLL / Game Maker library that constructs an environment that allows one to call any game maker script/function from within the C++ dll directly. It does this by placing all DLL function calls in a second thread that then communicates functi...

 
 
2 hours later…
7:11 AM
Please visit help center, take tour to see what and How to Ask. Do some research, search for related topics on SO; if you get stuck, post a minimal reproducible example of your attempt, noting input and expected output, preferably in a Stacksnippet - however your question is better asked at code review than here — mplungjan 49 secs ago
 
7:32 AM
user image
3
 
 
3 hours later…
10:20 AM
-1
Q: Can anyone tell me why my code doesn't finish when conditions are returned?

LukaPRGMSo, I made Connect 4 in C++ but my conditions for the win (pobjeda in my language) doesn't work, game just continues. I need you to tell me where I made a mistake so my code can finish when condition is returned to pobjeda(). #include <iostream> using namespace std; char polje[6][7]; char igrac =...

 
10:46 AM
0
Q: Are there any guidelines on naming lambda functions?

Andrew TruckleI am new to using lambda functions. I wrote the following: void CChristianLifeMinistryEntry::AddChairmanNotesToXML(tinyxml2::XMLDocument& rDoc, tinyxml2::XMLElement* pWeek) { tinyxml2::XMLElement* pChairmanNotes = InsertNewElement(rDoc, pWeek, "ChairmanNotes"); auto AddChairmanNote = [](...

 
11:09 AM
If this is working code you think could be improved, see Code Review. — jonrsharpe 1 min ago
 
0
Q: How to divide array of strings and store the strings in to 3 equal arrays in groovy jenkins pipeline

raghu veer Karumurii am trying to create a groovy script in jenkins pipeline script and I want to loop array of strings and store strings in to 3 equal arrays dynamically Example: def arr=['test1','test2','test3','test4','test5','test6','test7',.....] to def arr1=['test1','test2','test3'] def arr2=['test4','test5',...

 
12:03 PM
0
Q: Simple game on Unity with bad code

IslamI am a beginner to programming and I have created some simple game using Unity. The code spawns some 2d balls and player taps on the balls. I know, that my code is very bad, but I don't know what kind of mistakes I made. So I need your help to improve and optimize my game's code: using System.Col...

 
 
1 hour later…
1:13 PM
Monking!
 
Monkinng
 
1:36 PM
Monking
 
 
1 hour later…
2:54 PM
If the code is complete and works, it should be on Code Review instead. This site is primarily for fixing broken code. Note though that they require code to be complete, working, and posted in the question itself along with a basic description of what the code does. — Carcigenicate 30 secs ago
 
3:21 PM
Could this question be moved to the code review stack exchange site instead of closing it? — Frank Henard 56 secs ago
 
3:47 PM
IMHO this shouldn’t be used that way. Using an if without a real condition does not make sense, and will raise unnecessary questions in a code review, if the always true condition is an mistake or not. — t.niese 23 secs ago
 
0
Q: Getting feedback and suggestions

BorgI don't know if anyone is intrested but I'll give it a chans. I have some basic experiance in coding Python now and if anyone would be intrested to see how my code looks and if there is any suggestions on writing better code to improove myself. There is no need for writing code for me, just if yo...

0
Q: PHP to C, on PI

BonI have a simple PHP app running on a PI, but I would like to convert it to C(++). I need to time a minute from system clock and read a gpio pin status. In php I have written it like this : while($i == 1) { $current = date('i'); $count = 0; while (date('i') == $current) { $status = file_get_...

 
A lot of legacy ahk, which I'd personally be against, but if you don't mind writing legacy code, then it's fine I guess. Also, I don't think code review belongs on stackoverflow :/ — 0x464e 18 secs ago
see Code Review but i'm not sure if in its current state this would be on topic there — Sayse 16 secs ago
 
4:34 PM
@SimonForsberg You can't easily switch it out for httpd or something similar?
I mean, it's not exactly meant to be an application server AFAIK...
 
4:51 PM
@Mast httpd as in... Apache?
I don't think I need a Nuclear Bomb to crack an egg, thanks.
 
@SimonForsberg Yea.
 
If I switch over to Javalin, everything will be taken care of, no need to have any application server wrapping it
 
That sounds nice.
 
Motivation on that is still a bit so-and-so though
I think parts of it has already been done in the AWS branch, it's basically just the Javalin parts remaining, and then get it up and running somewhere
 
5:21 PM
I learned some things about Groovy, Spring, etc. while bringing Lurch up. I look forward to learning about Kotlin and Javalin from Duga2. :)
 
6:03 PM
0
Q: Stack based Calculator in Python

Akash PatelI programmed a calculator with int operations. The calculator stores functions in a dictionary. Also, the calculator stores how many arguments the function takes in a dictionary. The input format is arguments followed by module and function name. These are split by lines and spaces. Input lines t...

 
6:19 PM
@Edward Do you want to work on it? If so feel free. Or should I help out with some starting structure or anything?
 
Although there's some interest, I think I'll have to decline. Too many other projects going at the moment.
Glamorous projects like fixing the toilet...
:)
 
Such fun.
 
And repairing the leak in the dishwasher hot water intake.
 
Your dishwasher has a hot water intake?
Mine has a cold water intake, does the heating itself.
 
You can do it either way, but hot water intake means that the whole thing is more energy efficient because I have a high efficiency hot water heater.
 
6:30 PM
@Edward I know that feeling...
@Edward I don't know that feeling...
 
I still got to fix the backplate of our own toilet. Don't really know where to get a new one.
Might have to let someone 3D print one.
 
6:54 PM
@Edward We've been talking about security for Lurch, but I'm assuming it also has its own useraccount?
If so, is it in the sudoers file?
 
0
Q: Create a Card game called match

user6248190For an interview, I had to create a card game called match. The rules were the following: Players can choose a number of packs of playing cards and combine them into a single deck. The deck can be shuffled. Cards are played sequentially from the top of the deck into the pile, If two cards played ...

 
7:13 PM
It would be great if I can simply set-up a podman container on root and just run it from a dedicated user that's not in the sudoers list.
 
0
Q: A Tiny Text File Read/Write class Implementation in C#

JimmyHuI am trying to implement a tiny text file read / write class FileIO in order to make the operations of reading / writing pure text files easily. The usage is like: FileIO.Instance.FileWrite("TextFile1.txt", "This is a test1."); FileIO.Instance.FileWrite("TextFile2.txt", "This is a test2."); Conso...

 
7:28 PM
[SDuser@localhost SmokeDetector]$ sudo yum install sudo
Last metadata expiration check: 2:03:23 ago on Sat 09 Jan 2021 18:23:39 CET.
Package sudo-1.9.2-1.fc33.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[SDuser@localhost SmokeDetector]$ podman build . -t Dockerfile
STEP 1: FROM debian:bullseye AS builder
STEP 2: WORKDIR /tmp/
--> Using cache 8440493bd29e24ec27e392e2cf8803dcf8be161073388e139cfc20ae2b2e852c
--> 8440493bd29
STEP 3: ENV TZ=Netherlands/Amsterdam
--> Using cache ea76ddcc6616b78a15d5d3743d5ce1a4abb5a37e487c056e376830328b786061
Wat.
It's there. You just checked.
It's really there.
I'm missing something stupid again.
Brb, setting up socks.
 
7:43 PM
It might be good to use Tools > Auto Formatter to make your code neater. As well as checking out the code review stack exchange, they can show you how to optimize your code to make it run faster and a lot more reliably. I am looking in to your question, but it would be good if you update your question with some better code and a picture of the rfid, tag, arduino and wires (the schematic). — James Barnett 51 secs ago
 
@Mast RUN is inside the container...
 
@Vogel612 It's not available by default in the container?
 
apparently debian:bullseye does not come with sudo installed.
 
Naturally...
That's what you get for blindly following examples.
 
Do you even need to use sudo inside a container? 🤔
 
7:54 PM
fedora:33 works just fine...
@SimonForsberg To install everything that's not available, yes.
git, gcc, python, etc.
Honestly, I'm running with knives and playing with fire.
But the whole idea of a container is to make it exchangeable, AFAIK, so it should be complete.
 
8:12 PM
0
Q: Measurement converter written in C#

Nikas music and gamingI wrote a basic measurement converter with C# based on the framework CSUnits with some modification. Here's my code: Code Interfaces IQuantity.cs namespace Tools.Measurement { using System; public interface IQuantity { string DisplayName { get; } } } IUnit.cs namespace T...

 
One container may need a different Python version than another.
 
8:26 PM
This is going to be fun, I'm running Python 3.6 with python3-devel 3.9.1
What could possibly go wrong.
 
8:37 PM
0
Q: React hook to wrap useEffect and mimic React component class lifecycle calls

Steven I wanted to make a React hook that allowed me to use the React Component Class lifecycle calls. So I could use the named version instead of just having useEffect. For example, I want to be able to do this. useEffectWithName.componentDidMount(callback); Here is the code that I put together with h...

 
9:00 PM
@Mast Everything?
 
@skiwi I'm expecting it to fail spectacularly.
$ git glone foo
Cloning into 'Mapname'
$ cd Mapname
$ git config user.email "bar@baz.com"
fatal: not in a git directory
Wat.
Why do I keep forgetting how bad I am at this.
 
9:29 PM
0
Q: simpel AHK script auto clicker that clicks

PEEEZTThe code opens a window att the mouse positon on screen and you can enter a number in milliseconds and that is the timming for the clicker and to turn it of just tap the same hot key agian le code ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for...

 
9:54 PM
0
Q: Difference in using functions inside forEach loop

LV98So I ran into this: Code that I used notes.forEach(function(note) { eventAssignment(note); }) Somebody else's code notes.forEach(eventAssignment); Function function eventAssignment(note) { note.addEventListener('mousedown', keyPlay); note.addEventListener('mouseup', keyReturn); } Questio...

 
possible answer invalidation by user64742 on question by user64742: codereview.stackexchange.com/posts/254479/revisions
 
@Mast should be fixable with --global
that said: why would you need to set up a git user?
 
10:42 PM
@Mast: sorry - I was off doing plumbing chores.
You don't need sudo within a container because by default in most containers, you're already root.
So we build as root, save the resulting binary (war file in the case of Duga)
And then Tomcat runs as its own user (I think) and runs the war file
 
11:14 PM
Actually, I just checked and it appears Tomcat runs as root
 

« first day (2807 days earlier)      last day (1202 days later) »