« first day (3088 days earlier)      last day (211 days later) » 

12:02 AM
REFRESH! There are 7880 unanswered questions (89.2741 answered)
12:21 AM
Q: Mean and variance of element-wise distances in a set of multi-dimensional arrays in Matlab

JimmyHuThis is a follow-up question for Calculate distances between two multi-dimensional arrays in Matlab. Given a set SX $$ S_{X} = \{ { X_{1}, X_{2}, X_{3}, \dots, X_{n} } \} $$ where n is the count of elements in set SX (the cardinality of set SX) There are $${{ n }\choose{2}}$$ element-wise distanc...

12:45 AM
Q: Buggy mmap tutorial

bobcat(Not too sure if this type of question is appropriate for this site. Feel free to vtc if it's not) This mmap usage tutorial that I found on linuxquestions.org has a subtle bug in it that other forum members apparently missed. Can you find it? #include <stdio.h> #include <stdlib.h> #include <sys/t...

1 hour later…
1:52 AM
Q: My text message via Python email is being cut short or into two different text messages

SeanI sent this text message via Python SMTP, and looks like some carriers break the messages into 2? How can I avoid this? I’m trying to send mass message to individual phones without having to pay for a number or service, just pure Python. I also don’t mind using my number, just don’t want to pay f...

Q: Bash script for pull-mode backups via restic's rest-server

andrew-eI wrote the following Bash scripts to make pull-mode backups with restic, a backup solution written in Golang, similar to Borg Backup. The main use case for this script is pulling backups into a central backup server that you trust, especially if you don't want to create a shell account or sftp u...

3 hours later…
5:20 AM
Q: Before going further - Are move semantics really worth the trouble?

ShigotoShoujinAn tiny UI library is being written for fun and since its C++ and not C, I attempted to do the "right thing" and use stack objects with move semantics rather then heap objects with new/delete. Starting here: control.AddChild(EditControl{{10, y += 30}, {200, 20}, TEXT("New Edit Control")}); This ...

2 hours later…
7:48 AM
Q: Bash function to create a directory and change to it in a single command

Jose Fernando Lopez FernandezI find myself frequently needing to create a new directory and changing to it enough to want to combine the two commands, so I figured it was a good opportunity to practice scripting with bash. The command I use to create and change to a directory is mkdir -p directory_name && cd directory_name, ...

8:13 AM
Q: Throw exception if value is not found

Peter PenzovI want to create ENUM which maps different statuses: public enum BusinessCustomersStatus { A("active"), O("onboarding"), NV("not_verified"), private String status; BusinessCustomersStatus(String status) { this.status = status; } public String get...

8:36 AM
1 hour later…
9:51 AM
Q: Class to wrap result or exception, similar to the OneOf approach

JohnLBevanI recently came across the OneOf<T0,...,Tn> package from mcintyre321 via a video by Nick Chapsas, which presents the idea of holding exception types to be returned in the same object as would hold a successful result; e.g. public OneOf<User, InvalidEmail, EmailAlreadyExists> CreateUser { /* ... *...

10:16 AM
Q: Create a new string struct and making it user firiendly

PearCreated a new typedef and making functions supporting it making it user-friendly [specifically programmer friendly] What does the code do? It makes users [programmers] easy to deal with strings as most functions are there. additionally, we can append, obtain substrings, replace string very very ...

10:41 AM
Q: Implementing a pipe-like program without wait?

cassepipeSo I implemented a program that takes an input file, two command strings and an output file to mimick the behaviour of running : <input cmd1 -option | cmd2 -option > output that's called like this : ./pipe input "cmd1 -opt" "cmd2 -opt" output and I did without using the wait system call since wh...

11:05 AM
possible answer invalidation by greybeard on question by Manassés G.: codereview.stackexchange.com/posts/268988/revisions
possible answer invalidation by greybeard on question by Manassés G.: codereview.stackexchange.com/posts/268988/revisions
11:59 AM
I found the answer to my question at this link: codereview.stackexchange.com/questions/196167/…holdorfs 30 secs ago
1 hour later…
1:04 PM
@Duga I think the edit is a major improvement. It really doesn't change anything pertinent to the question.
1:56 PM
2:36 PM
@Klak031, answer is posted, further questions regarding code architecture better to ask at Code Review. — Olvin Roght 54 secs ago
2:54 PM
This site is not for general code review. This site is for specific solutions to a specific issue. — Basil Bourque 9 secs ago
1 hour later…
4:02 PM
Q: PHP object oriented programming

flowstackerI'm trying to learn OOP with PHP (I know it's hard because It's not an OOP language). I'm rewriting my procedural code to OOP.Please provide any feedback on my code, naming and file/folder structure. Structure: \classes Procurement.php ProcurementDetails.php \services DatabaseService.php ...

4:27 PM
Q: 2 Threads taking turns printing the alphabet

TheWerefoxI am supposed to write code for an assignment. The goal is to make 2 threads (which are objects of a class that implements runnable) take turns printing the alphabet. One of them prints upper case while the other one prints lower case. (they print only a single letter each turn, not the whole alp...

4:51 PM
Q: Python program that analyzes a corpus for randomword generation

Xeнεi ΞэnвϵςI play a lot of old-school western CRPGs, and most of them (if not all) require the player to generate an avatar at the start of a new game, including naming the character (with names that will never be pronounced). I want my character to have the most unique and beautiful name, with as few names...

5:48 PM
Since apparently you have working code, you may consider looking at Code Review, but you would have to follow their guidelines for making it an acceptable question there. Here we deal more with problems with code. — trincot 58 secs ago
6:25 PM
Maybe also try the code review stack. Probably better suited to this type of question — Hursey just now
7:02 PM
I’m voting to close this question because it should be asked on Code Review. — Peter O. 51 secs ago
7:40 PM
possible answer invalidation by Jakub on question by Jakub: codereview.stackexchange.com/posts/269002/revisions
8:34 PM
Q: CodeChef - Red Alert

King ColdI have solved this problem from the CodeChef platform using the Python prorgamming language Here is the code: test_cases = int(input()) for _ in range(test_cases): n, d, h = [int(x) for x in input().split()] rain_amounts = [int(y) for y in input().split()] red_alert = False water_level...

I’m voting to close this question because it belongs to codereview.stackexchange.comYury Tarabanko 9 secs ago
@YuryTarabanko this does not belong on code review unless it's a request to review code that the asker asserts is working as intended. The asker is questioning whether this code is correct at all, so it does not belong on code review. — Patrick Roberts 54 secs ago
1 hour later…
10:13 PM
This code needs a rollback, the OP updated it after it recieved an answer
Q: Simple Cash Register -Python

Jakubhere it is my simple cash register app. It lacks some functionality ( class Payments should have more options like daily statements etc, class TillSettings needs more settings as well) but it does the job. Simple Cash Register and Stock Manager allows to add items to stock and then sell it and re...

10:26 PM
@Duga @N3buchadnezzar Rolled back, comment posted
10:49 PM
Thanks, I do not have enough rep for it =)

« first day (3088 days earlier)      last day (211 days later) »