« first day (2410 days earlier)      last day (1600 days later) » 

12:00 AM
RELOAD! There are 6294 unanswered questions (90.0730% answered)
 
 
2 hours later…
1:37 AM
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comMad Physicist 12 secs ago
 
2:06 AM
0
Q: Trying to create a vector of user defined class

Sharith GodamannaI defined the class below: class Vertex{ public: string color; int dist; Vertex *pred; Vertex(); }; Vertex::Vertex(){ color = ""; dist = 0; pred = new Vertex(); } I am trying to store an instance of this class in a vector and print out an attribute of it. vector<V...

 
Hey @SimonForsberg you still hanging around?
Or @Vogel612 or anyone who does Java / Kotlin + Android.
Actually nevermind tonight, just realized it's 9:10PM here so it's late late for you two.
 
2:27 AM
0
Q: VBA how to shorten runtime using functions other than .find

lalalisaMy code here loops through my folder and my files inside the folder and use.find and copy the strings into a new excel sheet and then with all the data in the new sheet, i will use .Find(What:=) to find the strings inside the new worksheet and then either split or use Right,Left,Mid functions, so...

 
Hello, all!
 
What's good
 
Eggnog and rum is good.
:)
 
Yes it is
 
Too bad I'm out of both at the moment...
 
2:30 AM
Can't drink tonight because GF is at a Christmas party for her work and I need to drive her home.
 
It's good to plan those things in advance. Good for you!
 
I'm a (mostly) responsible person lmao
 
I aspire.
 
That way she can have fun with her friends, and I don't have to worry about her drinking and driving.
Plus it gives me quiet time at home to work on things that need done.
Which right now is some Android stuff.
 
Yep, that's the smart way to do it.
I've only done a very little on Android, so I'm not likely to be of much help there, unfortunately.
 
2:32 AM
And take care of my dog that got bit by the other dog earlier.
 
Oh, poor doggie!
Nothing too serious, I hope.
 
It ripped his ear open, so I have to regularly make sure it's still clotting.
 
Yeah, ear wounds bleed a lot but usually aren't too serious.
True for humans or dogs, actually.
 
This one ended up being a 1 inch / 2.5cm rip in his ear (all the way through, it's two pieces in that spot now), so it's mostly just lots of blood to clean up every 15-20 minutes or so.
He's a long-haired dog which makes it worse because his hair traps a lot of the blood
And of course he keeps shaking his head back and forth because he's bothered by it being wet from blood, which just makes things worse.
Overall, crap end to the week lmao
 
:(
I'm just trying to finish up some end of year work, but no actual blood is involved. Yet...
 
2:37 AM
Same here, trying to get my Android brushed up for an interview Thursday...
 
ah, well good luck with that!
 
Should go pretty well, it's a Lean / Android coaching gig, so should be fun.
 
I've found that both from the interviewer and interviewee end, it tends to be that it's clear that it's going to be a fit or not within about the first 20 minutes.
 
Yeah. Same here. This is an all-day thing because of the type of work.
 
I'm sure you'll do well.
 
2:42 AM
Hope so.
If not, it be like that sometimes.
 
Well, I'm off to bed. Full day tomorrow. Good luck to you!
(and the pooch!)
 
Later chief, enjoy your sleep.
 
 
2 hours later…
4:32 AM
0
Q: Rate php code - crud class, validation, error messages, etc

Алексей ЯгодаровAndroid order class - stores order data, validates it before, saves relations data, returns search data: <?php namespace App\Models\Android; use App\Models\OrderDestination; use App\Models\OrderSeat; use App\Models\Origin; use App\Models\Settings; use Carbon\Carbon; use Illuminate\Database\Elo...

0
Q: batching calls to server in python with asyncio

UriI've written this decorator to avoid too many requests to a backend. Did I get it right? Do I need some locks or I can assume some things are atomic / thread safe because this is asyncio? Thanks def batch_calls(f): """Batches single call into one request. Turns `f`, a function that get...

 
5:11 AM
Monking
 
0
Q: Leetcode 1275. Find Winner on a Tic Tac Toe Game

A.LeeWorking on one easy question Leetcode 1275. Find Winner on a Tic Tac Toe Game. wondering how can i make my code even more clean? class Solution: def tictactoe(self, moves: List[List[int]]) -> str: from collections import Counter def is_win(pos: List[List[int]]) -> bool: ...

0
Q: Is this a good practice for getting an array of unknown size from a C code to Python using Ctypes

rakI am new to Ctypes. I am writing a piece of code that brings an array of unknown size from C to Python using Ctypes. Unknown size here mean that Python initially doesn't know the size of the array. C code has the algorithm which creates the array. Somehow after lot of trails, I managed to write ...

 
 
1 hour later…
6:32 AM
@SimonForsberg Hmm, yeah that's probably it. -4 seems a bit harsh tho.
 
6:49 AM
Your code is fine. If this is about getting some advice for writing an idiomatic code, you can post on codereview.stackexchange.com — French Boiethios just now
 
7:38 AM
0
Q: best way extract gameId from array object

Manjeet ThakurI have a 2D array "matches" where I store the game id and another array Object "games" where I store "gameId" with the "playerId". So What I have done here Step 1. I get opponent gameId against the gameId from "matches" array e.g. gameId "2" has an opponent "1" Step 2. check opponent_gam...

 
8:19 AM
0
Q: dictionaries not working for large files

Kshitiz KoiralaI am trying to add a list of entries to my dictionary using for loop. Is this is the proper way? And after that, a number of inputs is taken to check if the key,value are present in dictionary. If key is present it returns "key=value" else it returns not found . n = int(input()) phonebook = {"...

 
Consider posting this on codereview.stackexchange.com… — deceze ♦ 12 secs ago
This question is to broad, actually it is many questions in one. Please focus your question one one specific issue and remember this is not a code review site. — Joakim Danielson 25 secs ago
 
8:51 AM
@CaptainObvious Couldn't the occurrence of “not working” in question titles trigger some notification to the question author?
 
@MartinR it does. Just tested myself and got an exclamation mark and a message "Code that produces incorrect results is off-topic for Code Review."
 
@Heslacher Great, good to know. – So we must assume that the question author deliberately ignored the warning.
 
correct
 
Kaz
9:16 AM
@Mast This is why I have a strict one-function-per-cell rule.
 
0
Q: Use variable assignment within a loop in Go or lookup multiple times in an array directly?

Nick N.When looping through some code in Go and assigning properties within to a struct array. Is it better for performance / readability to use the first or the second approach? for i, transaction := range transactions { //first approach output.OpenTransactions[i].VehicleUUID = transac...

 
9:45 AM
@410_Gone 3AM, actually..
I'm trying to not be awake at those times anymore, soo :)
Monking
 
Monking
 
10:03 AM
0
Q: Image Classifier CNN model configuration

Kenjie Thio-acwhile trying to make an image classifier, I stumbled upon some codes which i then modified to make my own image classifier. To evaluate these classifiers, the code will show the confusion matrix, precision, recall, F1 score and support, accuracy, macro avg and weighted avg Are my implementa...

0
Q: C# Dictionary Wrapper for VBA

FreeflowI am a technical reviewer/writer and I use VBA for Word a lot to manage issues in Word documents I receive. I have frequently come across niggles when using Collections, Scripting.Dictionaries or Array lists. Then I saw some posts on creating a C# library for consumption by VBA. After much rea...

 
10:40 AM
You need to clarify the problem, because at the moment it looks like you expect us to do code review and debugging for you. Please, show what you have done so far, what code snippet you have implemented, what exactly are you doing with it? — Gander 15 secs ago
You'd better post it on Code Review - stackoverflow is dedicated to error handling while code review is what you look for. — ALX23z 24 secs ago
the only risk I see here is that the code does not compile. When asking for a code review you should show complete code. Afaik this also wouldnt be well received on code review — formerlyknownas_463035818 17 secs ago
 
11:01 AM
This would be better suited here. — Mansoor 15 secs ago
For code that works (that's a hard requirement) that you want a code-review on then please post on the Code REview SE site. — Some programmer dude 42 secs ago
So, should I wait for a mod to move it or should I delete the question and post in codereview.stackexchange.com/tour ? — GeorgicaFaraFrica 44 secs ago
 
11:56 AM
@MartinR Absolutely.
 
Possibly codereview.stackexchange.com would be more helpful — CDJB 22 secs ago
 
@Kaz In hindsight that might've been a much better idea, although I can imagine that would become messy as well.
Calculation-only tabs help, with some text as to what each cell is for.
 
JAD
@Mast code should document itself right? :P
 
0
Q: Processing all files in directory

flowitDO NOT RUN THIS EXAMPLE BLINDLY, IT REMOVES ALL FILES UNDER argv[1] Hello, This little programm should read all files from a given directory and do some work with them. New files are constantly written into the directory by an outside process. For the duration of the processing, the file should...

-1
Q: I am using threading for write logs request and response in spring boot.It through the error java lang IllegalStateException

Anitaerror is Exception in thread "Thread-17" java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web reque...

 
12:27 PM
0
Q: Wiegand 26-Bit Calculator - Transforming a decimal number into an 26-Bit binary number

GeorgicaFaraFricaI made a 26-bit binary Wiegand calculator for an ESP32 following this format: unsigned int * getWiegand(unsigned int dec) { unsigned int* wiegandNum = new unsigned int[26]; Serial.println(); // transform dec number into binary number and store it in binaryNum[] int n = 1; for(int i =...

 
12:37 PM
@Vogel612 I feel you there. I'm getting more tired in my old-age.
 
If the code works perfectly use [code review]( codereview.stackexchange.com). Anyway you need to post minimal reproducible examplec0der 45 secs ago
 
@410_Gone it's not about getting tired, actually...
it's about having a remotely usable sleep cycle.
 
12:57 PM
My "tiredness" is specifically linked to my piss-poor sleep habits.
 
1:09 PM
0
Q: ReactJS, Material UI component and code organization

devamatThis is my first post here so I hope you will be patient if I'm doing something wrong. I made a small website with create-react-app and I would like to request feedback about. This website was a test and I had a limited amount of time to complete it, hence there are no tests nor license, which fo...

 
1:19 PM
Cesar Manara on December 09, 2019

Around the globe, we look forward to celebrating traditions that are unique to us, our families, and our communities. The season gives us a chance to reflect, makes us smile, and helps bring us all together. 

This year is a special one for the Winter Bash tradition. A hectic end of the year (that included a company-wide Meetup and a ramped-up focus on delivering improvements across other parts of our Q&A experience) means this year’s Winter Bash theme is the same as last year’s. But don’t despair, last year’s theme was awesome! …

 
0
Q: Randomizing array elements with specific conditions for repetition

ErikI have written a function for producing a 16 step array (note[16]), intended to generate two numbers (in this example 1 and 2) with the following conditions: Any of the numbers can only be repeated once The sequence is meant to wrap around, meaning that the above applies to the first and last n...

 
Stack Overflow isn't the right place to get the kind of feedback that you're looking for. In its current form, this question is too broad to fit anywhere on the network, but if you can narrow down specific things that you want feedback on then you could post those questions to Code ReviewJonK 46 secs ago
@sleepToken: the question in its current state, even if he posted his code in the question, would be closed on Code-Review Stack Exchange since that site requires a more focused question as well. — Hovercraft Full Of Eels 57 secs ago
 
1:48 PM
@Feeds Oh no, not the hats!
3
 
0
Q: Should I use default in Swift's switch?

Roman PodymovConsider the following enum: enum E: CaseIterable { case a case b case c } This is how I use it: let someBool = Bool.random() if let a = E.allCases.randomElement() { switch a { case .a where someBool: print("case a where someBool") case .b: print("case ...

0
Q: A Backup Script for my Linux Server/NAS

Nico LindenlaufThis is my script. I want it to run on a weekly basis on my linux server on a Raspberry Pi 4, to back up all files that may have changed. On the GPIO are just LEDs. It requires a program called notify_run, and a file called "BackupSettings.ini" in its own directory that looks like this: [Sources...

 
2:05 PM
This may be more appropriate over at codereview.stackexchange.com. Here's their criteria for asking a question. — Andy 35 secs ago
 
2:29 PM
As a suggestion, there is a sister site to Stackoverflow specifically for code review, which I believe this post would fit best under... But having inheritance between a program and module sounds like it would be an issue with separation of concerns. Your model seems logical... I probably wouldn't have the program type do any serialization, I would probably build a factory to construct the types. — Trae Moore 36 secs ago
 
Kaz
@Mast You can always hide the extraneous columns/rows, but it makes it far, far easier to debug.
Especially because you can see all the intermediate return values.
 
0
Q: Use float not double in Java methods and constructors

JencyI am trying to use float type inside the constructors and methods like the following code. Unfortunately, my code says float is not compatible type in the constructors and methods in the code. import java.util.Scanner; public class Box { float width,height,length; Box(){ } B...

 
2:50 PM
@410_Gone Morning!
 
possible answer invalidation by GeorgicaFaraFrica on question by GeorgicaFaraFrica: codereview.stackexchange.com/posts/233683/revisions
Please refactor the question. Also if you want a code review, please ask here codereview.stackexchange.companoskarajohn 12 secs ago
 
3:13 PM
0
Q: Chart.js - Getting data from database using sql server and asp.net mvc5

beetle_juiceI displayed and styled the chart.js and am also using mock data in the array, I just can't get my head around how to populate the data in the chart.js using MVC 5. I have tried lots of different methods and it's displaying data but not displaying the chart. Ideally, I need two datasets; one is fo...

 
3:55 PM
0
Q: Advent of code #2 Haskell solution

msmI've tried to solve AoC day 2 challenge in Haskell (https://adventofcode.com/2019/day/2/ - don't worry, it's not a competition so sharing a solution here is OK). The goal is to implement a very simple VM with opcodes 1 (add), 2 (mult) and 99 (exit). I feel like my solution is incredibly verbose...

0
Q: multiple if statements "forced" by database query result & external api response

delaveyFollowing scenario: this is the code that resides in Ajax Controller class. It is responsible for handling input in one of the form fields. The logic is as follows: If user-inputted data validate as either Tax Number or Statistical Number, it's supposed to: check for presence of such data in d...

0
Q: Python Code for List of Month Names starting with current month

ChristopherI am looking for a cleaner, more pythonic way to get a list of the name of the months starting with the current month and ending 12 months later. For example, it's December so my list should be ['Dec', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov'] Here is how I'...

0
Q: Collecting 3 years of data and building a string

JeffersonI am collecting 3 years of data and building a string that will be used with an ASP Literal control. the method GetListOfMeetingBygroupId takes in a groupID and year and will return meeting for that group and year. MeetingService ms = new MeetingService(); int groupId = 574; //Meeti...

 
4:10 PM
possible answer invalidation by AlexV on question by Christopher: codereview.stackexchange.com/posts/233698/revisions
 
0
Q: Styled components in typescript

Gerard SantosI'm new to typescript and I'm trying to migrate this styled component from JS to TS but I'm stuck with types and calling of methods inside css helper. JS File to be converted: https://gist.github.com/jhefreyzz/5862b34eaa293bd5d981802093392ef1 Converted File: https://gist.github.com/jhefreyzz/61...

 
4:36 PM
0
Q: IntCode computer in Python 3

JornI'm using advent of code 2019 to start learning Python. I've read the Python style guide, and I'm trying to write readable and reusable code. This piece of code is an implementation of the IntCode computer used in many of the assignments. If you'd like to see code for the specific assignments, i...

 
4:50 PM
Code Review might be a better place to ask. Here it is likely to be closed as primarily opinion-based — John Coleman 31 secs ago
 
Monking
 
5:07 PM
I would expect "Ask reviewer for code review" to only happen after "PR on development branch will trigger jenkins build, all tests on development pass". I don't want to review code that's failing tests. — Lord Zsolt 34 secs ago
 
5:19 PM
I'm not sure this is a programming question. There are duplicates on several other sites in the Stack Exchange network. — John Y 8 secs ago
 
5:38 PM
0
Q: Manipulating list values in python

A MeriiI wrote a function that i use to preprocess pandas dataframes before running them through a machine learning model. The function works perfectly, however i don't think it's the most pythonic way to write it. This function accepts a list of words: ['here', 'is', 'a','sample', 'of','what','the','...

 
5:59 PM
0
Q: Is there a cleaner way of writing this dplyr sql server query

MCP_infiltratorThis is the first time I am writing R code to access/manipulate and save data. The SQL query I would normally run then save to a spreadsheet, read it into R, save to another sheet then copy and paste that yet to another spreadsheet, then import back into SQL-Server. To much going on so I wanted ...

 
6:17 PM
 
0
Q: Python - Displaying messages in ArcPy/IDLE

KarlI have created a wrapper for displaying messages with ArcPy and IDLE (as that is all I have available to myself due to certain circumstances) as I frequently use both to test and develop new tools. However I find myself repeating print statements and arcpy functions to display feedback. Unfortun...

 
6:35 PM
@JAD Excel formulae are only partly code in that regard.
 
I'm voting to close this question as off-topic because it is about optimizing working code and is therefore more suitable for Code Review, which was created for that purpose. — Ken White 44 secs ago
 
-2
Q: LINQ to filter result after Await call

vicageI have below code snippet to call async method and filter based on a condition. I was checking if there is a better way to do below code. I am avoiding to use ToListSync() public async Task<Assessments> FetchDetails(bool isSuperUser) { var x = await abc.GetDetails(Id); detail...

0
Q: C - random password generator

KarolSimple password generator, why do you think about it? I am learning C for a while on my school and in home. Just mix of symbols, lowercase, uppercase and numbers, how long do you want. #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { int i = 0; int n = 0; int ra...

 
Maybe a better fit for Code Review site: codereview.stackexchange.comalecxe 19 secs ago
If your code works and you just want to optimize it, then this question may be better suited to codereview.stackexchange.comcybernetic.nomad 15 secs ago
 
@Duga Rolled back by Simon
 
Questions about codereview are better asked at Code ReviewJens 41 secs ago
 
6:45 PM
Ohh I just realized I can do rollbacks now! I finally earned enough rep to do edits!!!
It only took 2 years!
 
@brug You have a name again!
 
I do! I had to wait a month before I could switch it back... Damned global namechange.
 
><
 
@Mast A long long time ago in a galaxy far far away!
 
6:53 PM
I'm voting to close this question as off-topic because it should be posted at codereview.stackexchange.com — JB Nizet 38 secs ago
 
@Duga sigh
 
@JBNizet Considering it's hypothetical code, Code Review won't touch it. Please take a look at their on-topic help center before making another recommendation. — Mast 1 min ago
 
7:42 PM
0
Q: How can I simplify the Python code dealing with lot of images and multiplications?

Ankit Jaiswalimport math import sys from PIL import Image import numpy as np import scipy.io as sio import os scalingFactor = 5000.0 fx_d=365.3768 fy_d=365.3768 cx_d=253.6238 cy_d=211.5918 fx_rgb=1054.8082 fy_rgb=1054.8082 cx_rgb=965.6725 cy_rgb=552.0879 RR = np.array([     [0.99991, -0.013167,-0.002080...

 
8:15 PM
@SimonForsberg How do you separate data actions from objects in Java? Curious what other folks are doing.
Specifically Android stuff, not that it matters.
 
@410_Gone Data actions from objects? How do you mean? Example?
What is the problem you are trying to solve?
 
I have a SQLite DB, and I have a Vehicle class, trying to decide where/how to do the transitions.
 
I don't think I understand your question.
What transitions?
You mean modifications to the Vehicle?
 
Say I need to get a list of all the vehicles
Where do you put that
 
0
Q: Implementing boost::asio's async_read_some

Lucas ZanellaI need to implement async_read_some from Boost Asio. The reason is here https://stackoverflow.com/questions/59223064/implementing-behaviour-of-boostasio-for-a-class but I don't think it's relevant. Mainly because my code does not use I/O, but OpenVPN3 thinks it's using I/O. async_read_some passe...

 
8:27 PM
@410_Gone usually you'd want either a "Repository" or a "DAO".
these things are basically the same
The difference between them is where the transaction management is
 
That's basically what I was thinking, I built a relatively trivial generic DAO.
 
Yeah I'd go with some repository of some kind
 
8:46 PM
Are there any alternatives to Function in Java?
(That is, something that lets me pass a function as a parameter.)
 
@410_Gone Functional interfaces. Depends on what the function you want to pass has as parameters.
 
not really, no
 
There's not "one interface to rule them all"
 
if you have the thing as a method, you can pass it as a "Method reference", though
 
Grumble
 
8:47 PM
There's interfaces such as Function<A, B>, Supplier<A>, Predicate<A> etc
Yeah, method reference might be what you want. What's the problem exactly?
this::someMethod refers to the method "someMethod" on the object "this"
 
I need a function that lets me pass a table definition, then a decoder for an object.
 
Two parameters and one output? BiFunction
 
I.e. database.loadAll<Vehicle>(db, "Vehicles", Vehicle::fromSql)
 
Or just make your own functional interface.
 
Where Vehicle::fromSql is Vehicle fromSql(Cursor c).
 
8:54 PM
ohhh manual mapping
that's a Function<Cursor, T>
 
Yeah
But I need Android API 24 at a minimum, which is unacceptable.
 
ya, about that ...
welcome to the world of pain that is android dev
 
Yep
 
IIRC you don't even have proper support for standard JPA annotations, let alone it's OR/M capabilities
(though I do hope that's changed a lot since I last looked)
 
Got my workaround going :D
Kotlin for the win, for the record
2
Made my table-structure class take a TRead, probably going to add a TWrite as well.
So far the reader looks like it should work.
 
9:21 PM
@410_Gone I could have told you that
 
Is the Android SQLite some weird derivation?
Nope, just a weird thing with SQLite in general. Ugh.
 
9:40 PM
I just realized how much more effective I am in Kotlin than in TypeScript, or basically any other language.
 
This app is kicking my butt....
The good news is I halfway know what I'm doing now, which was the goal.
 
10:07 PM
0
Q: Which code is more readable for finding first unused index?

user3772662I was playing around with the eight queen's problem, just to see how I could use C++ algorithms to write less code. I figured out a way to find the next unused column using find_if_not. I am showing both ways of writing it. Assume we are looping over every valid "file" on a given "rank" ( in C...

0
Q: PacketReceiver for multithreaded NetworkMonitor project

Adam StepniakI'm developing a toy project for monitoring some network parameters. Now I'm implementing a feature that will allow to measure a packet round trip between hosts by measuring time between TCP SYNC and TCP SYNC/ACK. One of the options for feeding this application with packets will be setting up cap...

 
10:25 PM
@SimonForsberg @Vogel612 Do either of you have a solid .gitignore for IntelliJ IDEA + Kotlin?
 
0
Q: Fixing Medical Claim Files through Text File Read/Write v3

puzzlepiece87This is another review on a program I've asked about before, now translated from VBA into C#. I'm sure I've brought over a lot of bad habits with me, so I'm spotlighting some key areas I'd love open-ended feedback on. This is a WPF desktop app. Program Function As before, this program makes ...

 
10:40 PM
You might want to check on Code Review. They have a somewhat high bar for code so as a beginner you might get feedback you don't understand. — Peter G 1 min ago
You should post it in codereview.stackexchange.com instead. — Lucca Ferri 6 secs ago
 
@410_Gone there's no such thing as a solid gitignore...
I've got one that's been continually refined over my whole student life and it still sucks
 
0
Q: What should I do to get coding feedback?

0 PoltI am studying C while listening to a lecture by myself. When I was studying coding and listening to a lecture, I heard that writing code should be concise and maintainable. But I didn't know if I was doing well, so I felt the need for feedback. But it's hard to find anyone who can give us feedbac...

 
@Vogel612 @410_Gone Whenever I need one, I go to gitignore.io - super easy to use and solid enough.
 
I got weird stuff that needs to be dealt with ...
mostly because assignments can be weird
 

« first day (2410 days earlier)      last day (1600 days later) »