« first day (2668 days earlier)      last day (1647 days later) » 

00:00
RELOAD! There are 6931 unanswered questions (89.7994% answered)
-1
Q: Python Method to extract info from a class

Uncle Bobbelow is my python code for a class Car. If I use print(car.make), then I would get Audi. Is there another way that I can extract the Audi info by using just car.make? Is there another method that I need to write in order to use just car.make instead of print(car.make) 1 class Car: 2 def ...

00:45
Stack Overflow is limited to narrow, specific questions about code with a well-defined problem. General "how can I improve this?" for working programs is more likely to be accepted at Code Review. — Charles Duffy 29 secs ago
01:22
0
Q: Determine if points are within a rotated rectangle

User1973Using only Python 2.7 and the standard library (no imports): Determine if a point is inside the rotated rectangle. Test point 1: 670831 4867989 Test point 2: 675097 4869543 Rectangle: Vertex 1: 670273 4879507 Vertex 2: 677241 4859302 Vertex 3: 670388 4856938 Vertex 4: 66...

0
Q: Using Node.js, Express, and Express Router to implement a very simple REST API

Al DenteTo learn the ropes of Node.js and Express, I'm trying to implement a very simple REST API. The API says what it should do instead of doing it, so I can focus on the framework's structure. The requirement for the API is the following: Mock API for a question and answer game. /qanda endpoint: Repo...

 
2 hours later…
03:24
0
Q: Refactor class based approach in NodeJS

user662539I am writing a lambda function to make a request and fetch data from API. I am using as a class based approach which I think could refactor it and write in correct way. May be we can change this class based approach if required. Below is the approach which I have implemented. app.js const apiSer...

0
Q: Finding the first null character in a file

user229559May I have a code review on how I can improve my code to find the first null character in a file? The first malloc is the entire size of the file. I'm only reading it in chunks, and then scanning each chunk. Is there a way to handle an expanding buffer of entries instead of assuming the max possi...

03:46
@CaptainObvious Flagged for moderator attention, the sooner it gets deleted the better.
04:23
0
Q: Why the downvotes?

user229559Finding the first null character in a file got downvoted a lot. Why?

05:15
I’m voting to close this question because it belongs to the codereview.stackexchange.comblurfus 34 secs ago
05:26
-1
Q: making an Arbitrary instance for a complicated type

kirill fedorovI'm trying to check my code using QuickCheck so I need to make Arbitrary instances for my types. the types are complicated, and I don't know how to treat them properly. What I have implemented by far is incorrect, and I seek for help with fixing it. data Schedule = Schedule [(Date,[Activity])] da...

0
Q: Why cant I create a binary tree using the following code?

Adityaclass node{ int data; node left,right; public node(int x) { data=x; left=right=null; } } class tree{ node root; public tree() { root=null; } public void addNode(int x) { if(root==null) { root...

Here are couple of posts, ref1, ref2sushanth 20 secs ago
Here is a refsushanth 24 secs ago
@pacmaninbw And now they're on meta :-)
07:03
1
Q: Using smart pointers to construct Binary Search Tree

userffI have three main questions: Am I using std::unique_ptr correctly here? Using std::move and get? Is there any way for me to make my _insert and _delete functions iterative? I'd like for it to be something similar to my search function. Do I need a destructor? Or since I am using automatic memo...

If your code works correctly (to the best of your knowledge) and you are looking for a review and possible improvements then you can post it on codereview.stackexchange.com. – You might possibly be interested in On Knuth's “Algorithm L” to generate permutations in lexicographic order and Sequence-based enumeration of permutations in lexicographic order. — Martin R 5 secs ago
 
1 hour later…
08:40
Welcome to Stack Overflow! Please take the tour (you get a badge!), have a look around, and read through the help center, in particular How do I ask a good question?, What types of questions should I avoid asking?, and What topics can I ask about here? As asked, this question is asking for opinion, which makes it off-topic for SO. It may (or may not) be on-topic for codereview.stackexchange.com, please check their help to see before posting there. — T.J. Crowder 29 secs ago
-1
Q: Does anyone have any roblox hack injectors

Coder9292Does anyone have any roblox hack injectors I can download that you have made? #Hangman_Finished import random words = ['chicken', 'dog', 'cat', 'mouse', 'frog', 'elephant', 'zebra', 'horse', 'alphabet', 'rat', 'fat', 'gate', 'programme', 'yell', 'goat', 'trash', 'hanged', 'water', 'fish', 'turtl...

 
1 hour later…
09:55
@Mast Yeah. The bad sectors on the SSD ultimately lead to a fresh installation.
Funny enough, the final clone operation that somehow finished also killed the Windows bootloader on the SSD.
I guess there is something else wrong with that SSD, and the problems were just a symptom.
Either way, it works now.
The user isn't really a fan, since they need to reinstall some software, but I told them to use this as a chance to keep the amount of installed crap to a minimum.
@Zeta That helps a lot performance-wise.
Installing crap is a sure-fire way to bog your system down.
10:21
Main coding principle is KISS and better readable code is simpler. Then go for reputaion and Chris explicit advised you what to do and why. Also if you have working code but want to improve that SO is wrong place, go for [codereview]! — ComputerVersteher 40 secs ago
10:33
@CaptainObvious I don't see why this is off-topic. The user has a function now and the code seem to work fine. Not enough to answer? I don't see it.
10:47
@Mast Yeah. The file context menu had like... 30 entries? You had to scroll the context menu.
@Mast And both the short story and the long story are correct.
11:08
@Peilonrayz @pacmaninbw @Mast
@Peilonrayz Look at the edit history, especially version 4.
@pacmaninbw I have, how does that make it off-topic?
Version 1 and Version 5 were MRC, it's really still MRC because there isn't any clue what this is all about.
Are you saying there is a lack of context in the code (MRC) or the English section of the question (Needs details or clarity)
It really needs both more details and clarity and code to indicate why this is even being done. The function does exactly one thing, which is fine, but I don't believe that was the entire function.
@Peilonrayz Just FYI, unlike Python it takes a lot of code to do something in C.
11:19
I'm trying to convert this to a comment so the OP even has a chance to make their question on-topic. But I don't know how to relate it to our rules in any way.
Both @sleptic and Pie provided alternate solutions. It is really not clear why the code is reading only 8 characters at a time do to the lack of context.
@pacmaninbw Given that it has 2 answers in comments I really doubt it's MRC.
Sorry, my acronym dictionary is broken atm. "MRC"?
Nevermind. Missing Review Context. 🤦
It's also not clear why it is using fseek() and why the user feels that all the text needs to in memory.
@pacmaninbw Because Len = Ptr - OtherPtr.
Alright, I wanted to fix the question, but the code is even broken.
It doesn't find the first, it finds the last null character.
11:34
@Zeta Among other problems with that question, yes.
How and why did this answer get a +1? That smells like some sock puppet/voting manipulation.
Monking
@Zeta It's hard to tell, but I believe this user has done this before. If you read their deleted rant in the edit history it's clear they have figured out ways around SE security.
@CaptainObvious It seems like the user got their [deleted][deleted][deleted]... answer out there to keep their current question from being deleted.
@Peilonrayz I believe we have discussed this user at least twice before.
11:45
@pacmaninbw They have that rant on their profile page, btw.
@Zeta Wonder how long that is going to stay there.
@pacmaninbw And what does that have to do with this?
@Peilonrayz Multiple questions that have been deleted by moderators.
Always about performance in C using the mem* functions rather than normal string functions.
Usually 2 line questions.
Cool, and what does that have to do with this question?
Everything.
You aren't going to change my mind about this question.
11:55
@pacmaninbw I don't see it. Isn't one of SE's rules vote on the content not the user? What does them posting one or two bad questions before have to do with this question?
Their account has been deleted multiple times on all SE accounts, they even state that in their rant.
That makes me doubt the validity of any question they ask.
0
Q: How can I shorten the runtime of my simulation?

grimrol123Before you read the code below, note the following explanation: I have three classes: Driver, Vehicle, and Itinerary. They have attributes Driver.behavior, Vehicle.pRange, Vehicle.pBattery, Itinerary.destinations, and Itinerary.startTime. The function findCand takes all these class attributes as ...

12:14
@Peilonrayz MyFuncdoesn't sound like a real name. It might be, but my first impression on that question is that it is a snippet copied from some larger program and stuck into a function to be "on-topic". This would also explain why the !Buffer handling is completely omitted, as it will likely also close(...) the file in the user's real code.
While I haven't voted to close, I would certainly raise doubts about the code's context (which I already did in some part).
@Zeta Yes I believe stuck into a function to be "on-topic" is exactly what happened as the first comment said effectively "anything that isn't a full function is off-topic". As for the rest of the message, that sounds reasonable and I can tie it to our rules.
And while I would love to improve the question (I already had a draft), I cannot fill those holes (MyFunc, !Buffer handling, original <DATA>\0<JUNK> file format) left by the poster.
I can assume some rational behind the code and probably get 80% right, but that usually tells me that there is at least something very relevant missing.
@Zeta I'm assuming I'm misreading this wrong. By a draft you mean an answer, as opposed to an edit?
That all sounds reasonable. Thank you for your insight Zeta
0
Q: Custom MediaController with full screen video image option

Android DeveloperI have overridden setAnchorView() of MediaController class to display full screen option icon using below code.The code seems to be working fine in devices I tested but I have few doubts for which I need review- The class assumes the anchor view is a FrameLayout to position full screen imageview...

@Zeta 30? Shhhheee....
12:26
@Mast ~5 by 7zip (might be combined in a single one, though), ~5 by WinRar, ~5 by WinZip, ~10 by Ashampoo SomethingZip
And that was on any file. There where even more on packed files...
@Peilonrayz There's quite a lot wrong with that question, it's missing a lot of dependencies for starters.
No main function.
Poor description.
If the question had been salvageable, I'd have left a comment. But the user is hostile.
Perhaps ND would've been a better fit, but MRC isn't wrong here.
@Peilonrayz I had drafted an edit on the question to improve it and get it back on-topic. But I discarded it since I wasn't able to fill some critical parts. For example, the usage of MyFunc would have been up to my interpretation, and my interpretation might be completely wrong.
And that's exactly one of the reasons we don't review questions that don't have the required contest.
Nobody gets happy from guesswork.
Yup.
@Mast Are there some comments that have been deleted?
Or is that just from Rev? when they added the rant
12:30
User being hostile is from rev4.
@Mast ND = Needs details or clarity?
@Peilonrayz Yeah, NDOC is such a mouthful.
;-)
Yeah, I'm just not used to seeing either :)
I'm not sure what we should be doing with the related meta.
It could be answered, but it would benefit no-one.
lol, they just posted their file format in a meta comment and then deleted it afterwards.
12:38
Completely unhelpful...
I was really confused, I thought you deleted your comment and reposted it cause when I clicked the "load comment" button your comment changed XD
Yeah, the format was something along 0915125jzq34t4vui3vt4x7tviabr4t43t9o14hr\03p8zg7t4tws98erho4
🤷
...
I should have pulled a skiwi and should have kept that tab.
4
There are some things we can't change. Users doing thing odd things is one of them.
We can discourage it, we can cure the symptoms, but we can't change users.
I'm a big fan of optimizing for pearls, not sand.
There's simply too much sand.
12:42
<insert prequel meme here>
@Mast Yeah I think Zeta's comments, if the OP follows them, should solve this. Maybe just hold off on answering 'till tomorrow and repeat your comments
in an answer
We could always not answer, but I'm thinking about people that stumble across this in the future when SE has banned and deleted all comments ;)
@Peilonrayz Wait, what?
I'm poking fun of SE. Don't think they have any plans for that, yet...
#yet #nocommentsnocomplaints
3
@Peilonrayz Yea, probably.
@Peilonrayz Either the question goes or it needs an answer. That's how I think about meta questions...
12:56
Yeah I can agree with that
There's a couple of exceptions where it simply doesn't make sense to write an explicit answer, but basically, that.
For example, bug reports that are but have been answered in the comments years ago.
Perhaps we should simply close questions like this one because they're no longer relevant, but I suspect that's against SE policy.
1
Q: Stack Overflow Worldwide Meetups 2012: You're invited!

LauraWe're having a Stack Overflow meetup to get together with fellow programming, web, and other technology enthusiasts. But not all of our programmers and technology enthusiasts live on Stack Overflow, so this year we're explicitly expanding the Meetup Everywhere to include the whole Stack Exchange ...

Historic lock comes to mind, but unnecessary.
Just, leave it be. There will be no discussion, there will be no answer.
It's an invitation for an event 8 years ago.
Yeah there's always a darn asterisk ;) Also I've not seen that meta post in a while...
@Mast We can. It might not be a profound change, but just as their low-quality question's can ruin our day, our reactions and guidance can be the difference between the stepping stone to an informed user or the way down to an absolute raging troll.
@CaptainObvious Question's fixed.
@Zeta Damn. Nicely put
13:14
@Zeta Well, yes. We can make things worse, absolutely.
@Peilonrayz There was at least 2 comments to me that were deleted.
@pacmaninbw Are you continuing the line of thought? (the comments were hostile)
I'm hostile to the question not you. Sorry if it comes out that way.
Oh, no I don't think you're being hostile to me. I don't understand your response.
13:30
@Peilonrayz Stack exchange is stack exchange, the moderators do a pretty good job, and they don't delete accounts unnecessarily. Users that rant about their accounts being deleted and being banned for long times means to me that they were misusing the system. For instance if this user is who I think it is, than they baited our Greek named user many times when they answer the question in comments. The user has been very rude before.
The use of profanity on a Q/A site bothers me.
There was no reason to add the rant to the question originally, but I wasn't the first down vote and that may have caused it.
I've looked at the fixed question and voted to reopen, with the comments there is now enough information.
[1] take a look at Invoke-Command. that accepts a list of systems, a scriptblock, and any other items needed ... and runs the code on the target systems in parallel. [2] this seems likely to be a better fit for the Code Review site, but i aint gonna mote to close it since it am unsure of that. — Lee_Dailey 46 secs ago
0
Q: Sequence state machine

cevingI tried to parse command line arguments. The program requires four arguments. I iterate over the arguments. If the argument is an option, I process the option. Otherwise the argument is one of the required arguments. In order to read the required arguments I need some kind of state machine. In th...

Oh looky looky looky
@Zeta It turns out my real code, that code isn't in a function. It's in a for loop. I use scandir(), and iterate through the resulting files, and add their data to a list. Would you like me to provide my entire function, even though it contains a lot of irrelevant details, and globals defined elsewhere so it won't compile? — user229559 24 mins ago
my real code, that code isn't in a function
...
@Mast Did you not see Rev1 and pacmaninbw's comment?
@Mast Yeah, I'm aware.
13:44
@Peilonrayz I did.
I mean, I even proposed a way to fix this in the comment above.
Yup.
It's the user making a mess.
I hope that there's some language barrier involved.
I'm on the fence between spelling it out and ignoring the situation since enough people are involved.
Either way, I invested enough time and edits into that specific question. I'm not going to bother any more. The foundation is there, everything else is now in the user's hand.
Although πάντα's comments might reverse that…
Nah. Not going to bother.
13:56
Hi, I don't see a question here. Stack Overflow is for specific problems you're having about code you're writing. If you're looking for more general feedback, check out codereview.stackexchange.com. — Jonathon Reinhart 44 secs ago
New user with decent first answer.
@Mast It happens, not the first one I've seen this week.
1
Q: How does this std::function implementation looks like?

newstudentHere is one implementation of std::function using templates and trying to imitate the function from the library. Can you tell me your opinion about this implementation of std::function? What should be changed, what do I need to add and is it good? Thanks in advance namespace my_std { namespac...

@Kent_Erbert It's likely to be closed here, but you could ask about the corrected piece of code over at Code Review to get more feedback (and probably even a datetime version). — phipsgabler 11 secs ago
14:30
-1
Q: Java collection program

Dominik MyśliwyCould you review this program? Could you point what's wrong etc.? I suppusoe something is wrong with display data from StringSplitter Thank you in advance Part 1 Write a program that puts 50 objects storing strings in the ArrayDeque queue, consisting of the letter 'a' repeated randomly (repeat ra...

I am confused, what does this have to do with ruby-on-rails? Also, if your code works, but you want to make it better, Code Review is better equipped for that than Stack Overflow. However, please make sure that you follow their rules, read the help center, the FAQ, etc pp, just like you would do on every other website. In particular, they generally want to know what your goal is, i.e. what you want to improve about your code. — Jörg W Mittag 42 secs ago
Possibly more of a question for Code Review? However, a quick look through the first of each of your for loops suggests only one difference: a change between 7 and aryImport.GetSize(); so, assigning one of these values to a 'new' variable would make the loops identical ... or did I miss something? — Adrian Mole 55 secs ago
15:15
Too much for one Q. First off, run your code thru shellcheck.net and fix any suggestions there. Then, what you're asking for here is more appropriate to Code Review. Please read Help On-topic and Help How-to-ask before posting more Qs here. Good luck. — shellter 20 secs ago
1
Q: Structuring code logic for events on laravel controller

helloworld1014The code below will store a base64 image on another website and create an event to display the image on a vue page in real time. It works fine and all. My question is, is this a good way of doing it or there's a better way to structure the code? I've thought about placing the logic in a listener ...

0
Q: Optimization of current script on Ruby

ViktorSo I want to ask a little bit for your help. I do have currently working script witch was made by me on Ruby. I'm not strong in theory, so what improvements I can make up here: #!/usr/bin/ruby class Test def initialize price = ARGV # We can also use .shift here, but this will kill the proc...

15:31
@pacmaninbw I don't like an eye for an eye approach. Whilst they quite possibly have been rude and that isn't right, I'd like people to overlook my similar mistakes. So do unto others etc. I don't know how to say anything else without coming across as critical of you or seeming like I'm moaning to get the question opened.
15:43
@shellter Thank you for your feedback. I wan't aware of the Code Review section. Definitely seems like a more appropriate place. Should I delete this question and move it there? I know about the --color option, but wasn't sure how to use it amidst all the piping. The goal is to log errors both to the file and the console just ensuring that there are no color codes in file but yes on console. Thanks again, will keep questions on here more nuclear in the future. — Carlos Soriano 17 secs ago
0
Q: Inversion of control in Rust

MikkelI'm working on my first Rust project of any particular size, a rudimentary IRC bot. So far I've found solutions to most of the problems I've encountered, but something I'm now getting tangled up in as the project grows is my attempts to apply DI/IoC principles for testability. (I'm coming to Rust...

0
Q: Tokenizer FSM in Rust - better way to do match statements?

Kyle_S-CI'm learning Rust and have decided to code up a toy YANG parser as an exercise. In case it's relevant, I mainly work in C and Python. While working on the tokenizer/lexer, I tried to make it Rust-y, but have ended up with some rather clunky-looking match statements. They're of the form: match fn_...

I agree with what has been said by others here: for SO this question is of the category "caused by a typo / not reproducible", but once you have it working, you could go to Code Review to ask for feedback to improve your code. — wovano 57 secs ago
Good show. Be sure to read the help for Code Review first. You may still need to break this up some more or others. People are too eager to vote-to-close on new posters, without leaving a comment (I can't in good conscious upvote this Q, but I haven't v-t-c either). So, IMHO, yes, copy/paste this into codeRev, and delete here. Don't be afraid to post again, ping me if you want me to look at your next Q. I would just emit the error message with color to the console, and without to the logfile, rather than try and remove it. .... — shellter 44 secs ago
16:16
@Peilonrayz While an eye for an eye was involved, the major problem for me was that the user has been repeatedly booted off of stack exchange which really taints anything they say. I don't believe SE removes all accounts for no reason.
@pacmaninbw That is fair. After the CoC stuff, (mods being toxic to other mods) Monica stuff (SE being toxic to a mod) and how some mods act. (mods being toxic to users) I'm now sceptical of any action I don't know every detail of.
17:00
-1
Q: Should I name my property `Value` or `Message` per C# standards?

TacoI have a simple object called FeedbackMessage which stores the display name of the user that submitted feedback, and the feedback they submitted. With that in mind, the property that stores the feedback supplied is where I'm questioning myself. It's not that either way really bothers me, it's mor...

17:12
This question probably belongs to codereview.stackexchange.comMagiczne 55 secs ago
17:25
0
Q: Reactjs famous TicTacToe Game Tutorial implemented in React Hooks

SamFastDuring my learning of React Hooks, I converted the implementation of famous ReactJS game tutorial TicTacToe into React Hooks. Please review and let me know if I have not followed any React Hooks principles. I am particularly concerned about how I am calculating moves on component render. Click he...

18:15
0
Q: Parsing CLI arguments in GoLang

ComplexityI'm quite new to GoLang and I've started to write a package to parse CLI arguments. I know there are some packages for it already, but I wanted to give it a try. Please provide me any suggestions on the code listed below: FS Package. // Package fs implements methods for working with the underlyin...

0
Q: Recursive Sudoku solver using Python

fabrizzio_gzA Sudoku solver that works recursively. I'd appreciate your comments about coding style, structure and how to improve it. Thank you very much for your time. Code structure The Solver works by accepting a string of 81 digits for the Sudoku puzzle input. Zeros are taken as empty cells. It parses it...

18:57
Oh poo...
1
Q: Structuring code logic for events on laravel controller

GreyThe code below will store a base64 image on another website and create an event to display the image on a Vue page in real time. It works fine and all. My question is, is this a good way of doing it or there's a better way to structure the code? I've thought about placing the logic in a listener ...

0
Q: Structuring code logic for events on laravel controller

HelloWorld1014The code below will store a base64 image on another website and create an event to display the image on a vue page in real time. It works fine and all. My question is, is this a good way of doing it or there's a better way to structure the code? I've thought about placing the logic in a listener ...

@Vogel612 What's the appropriate action if there's a duplicate due to the question being cross-posted and migrated?
I was editing one, when I noticed I couldn't capitalize laravel to Laravel because the title already existed.
I honestly don't care which one goes, but we don't need both.
Preferably one of them goes up in smoke before answers start coming in.
@Mast dup-closure does not reject migration
so I'd dup-close the migrated one unless it's answered
@Vogel612 Currently neither is answered.
Feel free to do so.
done :)
I don't think I can vote as dupe if both are unanswered, so, thanks :-)
ugh, right that was a thing
19:03
Only for us mortals.
If that question gets roomba'd, will the migration be rejected?
not to my knowledge.
19:55
0
Q: Finding the possible number of equal pairs in an array

StarI got this test online last week. here is an example: given this array: { 1 , 2 , 4 , 5 , 1 , 4 , 6 , 2 , 1 , 4 } on condition that index(x) < index (y) find the number of possible pairs (x,y). where x = y. the answer would be: count = 7 - (0,4), (0,8), (4,8), (1,7), (2,5), (2,9), (5,9) the...

20:21
0
Q: Button Click Counter

bliboyi decided to get to learn tkinter a bit better , so i decided to make this small project . I want to keep programming , so i ask you ? What other projects should i try ? Thanks in advance . from tkinter import * class Press(): def __init__(self): self.root = Tk() self.scale ...

21:11
0
Q: How to make this code more "pythonic"?

NitwitI stumbled upon a post on Reddit a few days ago and I thought I make my own! It's a program to extract from a movie file (.mkv, .mp4, etc.) and stack them horizontally next to each other and make one picture of all the frames available in the movie file. how can I make it more pythonic, readable,...

21:36
1
Q: base64 iterators

Martin YorkWas a tiny bit bored reading authentication protocols. Needed to clear the mind and read some base64 encode text. So I implemented these iterators that will encode or decode base64 text. Not sure about: Interface is there a better way Iterator Implementation (its been a while since I did one) Ho...

21:52
@Peilonrayz Deleted by Community.
@pacmaninbw Yeah I noticed legit like 2 minutes ago as well.
22:26
0
Q: Insertion sort vs Selection Sort benchmarking

John BollingerOver on Stack Overflow, I read an answer asserting that Insertion Sort was inferior to Selection Sort for array data (as opposed to linked list data) on account of the larger amount of data movement that insertion sort performs on average. This claim was new to me, running counter to many assert...

22:51
0
Q: Permission Representation

NightloeweI'm currently implementing permissions into an application and are trying to save this onto a database using Hibernate. There are modules with commands and the permissions are also categorized using possible-null role, text channel and role+text channel. Therefore I want to achieve the following:...


« first day (2668 days earlier)      last day (1647 days later) »