« first day (2455 days earlier)      last day (71 days later) » 

12:00 AM
RELOAD! There are 6368 unanswered questions (90.0836% answered)
4 hours later…
3:55 AM
I would recommend asking this kind of question on: codereview.stackexchange.combad_coder 38 secs ago
4:42 AM
i have posted in stack exchange for review but i didn't get any comments. codereview.stackexchange.com/questions/236011/…Damcho Thinley just now
4:58 AM
5:12 AM
There is a code review site on SE, use that one — Marged 33 secs ago
6:10 AM
Asked similar question on CodeReview, here is the linkachilles7744 13 secs ago
Q: Purely Virtual Function With Different Return Types

achilles7744I have a module with a parent class we'll call Parent and a bunch of children we'll call A, B, C. An external interrupt source triggers the reception of a byte array which is stored in a protected variable of the Parent. My problem is that when the user wants to extract the data it needs to be tr...

2 hours later…
7:56 AM
@CaptainObvious Hypothetical.
8:17 AM
Q: Trying to optimize VBA code to create worksheets

HoekPeterI am learning to clean my code and make it more efficient, however I'm having trouble with my code, because most of the post about the subject are specified to a given code. The code below looks like a lot, but it's the same step for different sheets (the code below is for two sheets, there are f...

This question belongs on another site in the Stack Exchange network. codereview.stackexchange.comjeb 51 secs ago
8:58 AM
Q: ffmpeg batch script for video resizing

user2910348I have a few hundred mp4 files (thanks android =/) that I need to convert. I only want to convert videos that are too large (>= 1080p) and I do want to keep the exif Information so the timeline is not broken. I hope someone can look over the script to point me to some grave mistakes or give some...

9:52 AM
codereview.stackexchange.com is more relevant for this kind of question. — CDJB 32 secs ago
10:40 AM
Q: TicTacToe Python

MrLok3rsCan you give me some advice how can i simplyfy that code? I just started with python and I'm pretty sure that code can be much easier. I mostly don;t like my check() function, but have no idead how to make it easier and still keep checking for which player won a game. Thanks for advices! def che...

11:00 AM
Q: Parsing text from multiple downloaded htmls

NikosI want to extract from a directory (where i have stored my downloaded htmls), all the "executives". In this directory their are app 1.000 htmls stored wich should have the div id= article_participants element (if not, the files can be ignored) : <DIV id=article_participants class="content_part hid"

11:41 AM
Q: File size when parsing XML

ebeThe code below takes a directory of xml files and parses them into a csv file. Right now parsing around 60 XML is fast and the output is a Csv file that is around 250mb. That is a real big file and the reason is because columns are being repeated. I’m repeating the columns for the reason that ev...

11:51 AM
@CaptainObvious Love it when people delete their off-topic posts and repost them.
2 hours later…
1:43 PM
Q: SQL String to get data from DB2

Zack EI decided to split the SQL Part away from This Question. Before we get started I need to let you know a critical piece of information: Due to permissions within an offsite database I am NOT allowed to create tables even temporary ones within the database that I am getting the data from. With tha...

Q: A lexer in C++ for analysing regex-like text

Hampus LundbergI'm creating a parser, and I have just finished my lexer. I wanted to ask if there is anything I should change, add, or reconsider in my code! (I don't think the grammars matter much, since it is only a lexer) lexical_analyzer.h #pragma once #include <iostream> #include <string> #include <vector>

It's really a simple thing sergio, present an actual minimal and compilable example of code that includes the problem area. Write a clearly stated explanation of where it is not working. If it is working, and you want to ask about improvements, post it here.ryyker 6 secs ago
2:29 PM
@Peilonrayz Well, the off-topic part is removed.
@Mast Debatable, it's still in the picture.
But I don't think there's much worth in debating it.
@Peilonrayz Agreed, especially since it's answered now.
Still going over those magic classifiers of yours by the way. As long as I don't properly understand them, I'll just be trading one maintainability problem for another.
Hopefully I have some time this weekend to debug the crap out of it and figure it out.
Looks very good, but generators and yields never were my strong suit.
Since I'm thinking of features too crazy to implement, I'm very glad with that answer though. Going to need it.
Hmm, I could add an explanation on how it works. Is it just BaseClassifier you don't understand?
2:52 PM
I think limit is never declared anywhere, BaseClassifier is doing the actual work and Classifier is basically just a collection of validations for that BaseClassifier. The BaseClassifier iterates over all the files and lets loose every validation against it one-by-one. The _get_validators is simply the magic getting the validators in. That's all relatively straight-forward, even though I'm a bit hazy on how the data actually flows at times.
But then classify_paths gets involved.
Is that the magic combining the file to the classifier?
Ah I change limit to time_limit and pass it in in main Classifier(time_limit=time.time() - limit), as it doesn't really need to be made in classify_paths.
Actually you seem to use both: time_limit=time.time() - limit but that last part should throw I think.
After all, limit never gets a value assigned, right?
Ah you're certainly right there. I'll fix that up now
@Mast Yeah that's pretty much how it works.
This would be more suited for codereview.stackexchange.com. — Warcupine 38 secs ago
3:25 PM
Q: Foreign key massacre: How many tables, Winston?

JuniusI'm designing a feature related to defining insurance policies. There's a list of Provisions that have names and IDs. Anything called an "ID" here is an integer which is a surrogate key in a table. We have Forms. A Form has selected provisions, and it has Benefits. A Form Benefit has selected...

@CaptainObvious That title
yeap, someone knows how to draw attention
Too bad it's off-topic.
database design is explicitly mentioned as on-topic in the dba.se help pages, btw
I know, I read the help-center before linking to it.
3:31 PM
aaand moved :)
With titles like that, he'd fit right at home on CR.
Welp. Turns out if you link to [help/on-topic] and the question gets migrated, it will get a new target.
@SiddharthRout Interesting, first I've seen of that. I stand by that you are more likely to get your question answered on Code Review with this kind of question though. So i'll leave that comment for posterity. — Warcupine 38 secs ago
Consider posting this on Code Review if you want more general feedback. If you have a specific concern, then you can post it here. — VLAZ 30 secs ago
@Mast oh wow that's cool :)
3:45 PM
Q: XGBoost for feature importances

Gabriele ValvoGood morning, I have some doubt in the code that I write for feature importance. In pricipal i'm not sure about the results that comes out, so I want to understand if the code is correct. Someone can help me? import pandas as pd import numpy as np from sklearn.ensemble import RandomForestRegres...

3:57 PM
@Mast The code 100% works now. I've ran all of it multiple times. I've also added some more info in the docstrings with some examples in the doctests. Hopefully the typehints will help when determining the flow as well. But if anything is still confusing just hit me up.
4:18 PM
os.write(reinterpret_cast<char const*>(&r1), sizeof(r1)); - that's unlikely to do what you want. Whenever you need to write reinterpret_cast, your first thought should be "this can't be right, I'm probably doing it wrong" (and you'll usually be right). The correct use cases for reinterpret_cast (and it's C-style cast brother) are very few and very narrow. Whenever I see a reinterpret_cast or C-style cast in a code review, my first thought is always "I need to read this carefully, there's probably a bug here". — Jesper Juhl 57 secs ago
Given that you already have a fairly lean and working solution, you might instead to post this on our sister site, Code Review Stack Exchange. — Tim Biegeleisen 17 secs ago
Q: C# Event Manager without allocations

XamtouoI'm using my own Action-based Event Manager for a while and looking for ways to improve it. Mainly it's used in game development, where excessive garbage collection can lead to severe consequences. That's why I'm trying to avoid any boxing which normally exists in such managers. There are diffe...

4:46 PM
Q: Parsing a string with specific pattern into json

AbhinavI've a string as an input which is having some specific patterns and I'm trying to parse it into a desired json. Here is my code: const input = "status:all,applied_date:2019-04-15--to--2019-04-15,screen_status:SR|NS"; const output = { and: {} }; const dateSeparator = RegExp("--to--"); ...

Q: C++ wrapper for graphviz library

Oliver SchonrockBackground The code below is (obviously minimally) ripped out of a current live project. The project does reasonably sized data extraction, cleaning, analysis, clustering and visualisation (on a budget, and that's why we are not using graphistry or similar for the visualisation part). So for o...

5:02 PM
@CaptainObvious the preview reminded me of this infamous post but I was surprised the actual post didn't look like that
A: RegEx match open tags except XHTML self-contained tags

bobinceYou can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...

@CaptainObvious Can someone tell me if I am needlessly harassing an OP here?
5:38 PM
Never mind, I've removed most of my comments.
5:49 PM
@pacmaninbw I have experienced issues with that user.
6:04 PM
@Peilonrayz Thanks for the warning.
possible answer invalidation by MrLok3rs on question by MrLok3rs: codereview.stackexchange.com/posts/236055/revisions
6:20 PM
possible answer invalidation by MrLok3rs on question by MrLok3rs: codereview.stackexchange.com/posts/236055/revisions
@Duga I think those should be rolled back though they don't really invalidate the answer...
6:49 PM
@Peilonrayz Much appreciated, thank you.
@SᴀᴍOnᴇᴌᴀ I'll find myself a moderately capable device to ahem moderate from.
Bloody lack of mobile support.
@Duga Rolled back both.
@Mast thanks; I doubt the OP incorporated advice from the answer - I think OP was just working and adding progress; you may want to revise your first comment
7:05 PM
@SᴀᴍOnᴇᴌᴀ It's a canned comment.
I like 200_success's brief rollback message: Please see What to do when someone answers. I have rolled back Rev 2 → 1
If there's question, I'll leave another one.
I've also seen Graipher's (presumably canned) response: `I rolled back your last edit. After getting an answer you are [not allowed to change your code anymore](https://$SITEURL$/help/someone-answers). This is to ensure that answers do not get invalidated and have to hit a moving target. If you have changed your code you can either post it as an answer (if it would constitute a code review) or ask a new question with your changed code (linking back to this one as reference). Refer to [this post](https://codereview.meta.stackexchange.com/a/1765/120114) for more information
@SᴀᴍOnᴇᴌᴀ The answer is a bit broad, so it's possible to call this invalidation depending on how you look at it. When in doubt, don't.
@SᴀᴍOnᴇᴌᴀ That's pretty nifty too.
Q: Linked list: adding/deleting nodes according to value

Alice DunI'm relatively new to programming as I've just started university. My assignment was to develop a program (by using a function and a linked list with pointers with integer elements) which does the following: the function visits every element from the beginning. if the current element plus one is <

7:11 PM
@SᴀᴍOnᴇᴌᴀ That link doesn't work....?
@DerKommissar sorry its from my autocomments script
@DerKommissar Take a look at how the link is built, you'll figure it out :-)
I know how it's built.
@SᴀᴍOnᴇᴌᴀ Which automatically fills the site-url with the active (sub-)domain I presume?
7:18 PM
I just think it's silly it doesn't work is all. Didn't know if @SᴀᴍOnᴇᴌᴀ thought it did.
@DerKommissar it works when using SE AutoReviewComments - I merely pasted a line from my list
I apologize for not explaining that at the time of pasting
:: shakes fist at past self
All good, I'm only half-reading anyway.
Need an eye patch emoticon.
7:25 PM
Q: Sales Calculator System

George Austin BradleyI'm looking for feedback on a program I've based off the scenario (which is found underneath highlighted in orange). I was hoping you'd be able to rate my program from your experienced viewpoint, give me ideas on how I can improve it or even make my program better or efficient. I would also like ...

7:41 PM
I would recommend the community: Code Review — Travis 20 secs ago
@Mast LOL, is this from Robber Duck's website?
@pacmaninbw I forgot where I got that from, but did you know there's a store in Amsterdam with a crapload of ducks?
Welcome back @ankii
@Mast \o :)
I was wondering if I can use the code that I'll get in the answers in the open source project, which it is actually being written for
Welcome to StackOverflow. Because your code is working and you're just looking for suggestions on how to better approach it, the Code Review Stack Exchange may be a more appropriate place to post. — Sean 50 secs ago
@ankii If the author says they'll dual-license then that's fine. Or, IIRC, if you're using GPL 3.0.
7:51 PM
opensource.stackexchange.com/questions/226/… this is from open source beta. I'll see if I can find for v4
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comSean Bright 21 secs ago
Welcome to the 2nd monitor @OliverSchonrock. How old is too old to format things by hand?
50 this year
63 and still formatting.
you're the better man
8:02 PM
Although I do use IDEs a lot these days, VS and CLion.
@OliverSchonrock not necessarily.
TBH I have used emacs for 25yrs and the main reason used to be that the "auto indent everything with one key" was always far superior to all these other fandangled IDEs. These days that has changed, but I stuck in emacs land.
I do all my formatting by hand, but I'm a stubborn masochist.
Not counting mass-indents.
I switch from VI/VIM a few years ago.
I downloaded CLion just 3 days ago.. I tried...for at least 2hrs..i really tried..i did some "graphical debugging" (whyich is much better than emacs) ...and I tried to lilke it.... but the next day i just fired up emacs and haven't started CLion since.
I pasted your code into CLion, automagically formatted.
8:06 PM
yeah that''s all good now. and with clang-format it is consisten as well, because you can check that in
What benefit are you trying to derive from std::string_view?
@ankii I'll break down the code in multiple posts, till I get rate limited
@ankii Why?
string_view: nothing really.... I am trying to find the right type .... and it doesn't seem to exist... I want somewthing which interacts nicely with string literals...(ie it can be const) and it interacts nicely with C's `char*``
@Mast last bit was a joke, but to avoid any license thing
and it will also make good titles
8:10 PM
Q: Suggestions on how to update equation?

Noctis SkytowerAfter discovering Float Toy, my goal was to create my own version using Python and Tkinter. The results of the endeavor is shown below. Most of the functionality is complete, but the Equation widget does not automatically update itself yet. Does anyone have any simple suggestions for updating its...

Q: Dealing Synchronous Request in Asynchronous Code

user101Problem I am trying to convert my synchronous code to an asynchronous implementation. Using aiohttp I was able to almost get where I want. My problem is how to deal with synchronous requests. I have 3 types of functions: Take argument, make one request (easy to turn async) Take argument, make ...

main doubts are about not knowing better methods
@OliverSchonrock Going to be hard to do in C++.
You could try to inherit from eoither string or string_view and add your own function.
yeah I fear you're right..sometimes C++ gets all twisted up witb all its standardese...in C..you write --- "char*" : I am the programmer damn it and I know what I am doing.
@OliverSchonrock Yes, but using strings are so much nicer than C string generally.
Strings and vectors made everything so much easier when I learned about those. Efficiency went down the drain, but hey...
8:13 PM
yeah..i tried to write some string heavy stuff in C a while back, which I had previoulsy written in a dynamic scripting lanuage.... I got exhausted quite quickly ... malloc... realloc...free!
@Mast it's efficient enough for me...just can't seem to get it to interact with old C in a "conforming" way
@OliverSchonrock That is the problem, I tried converting some of the your C style casts to static_cast and it wasn't very friendly.
yeah indeed...you need the big guns of reinterpret_cast or const_cast ... and then really you're in "trust me I am the programmer..it might look like UB to you Mr compiler, but I reckon it's all right" territory
So you want to know how I ended up with string_view. Well I realised that I had to "boss the compiler with reinterpret_cast or cimilar anyway"... so given that, I thought..alright then..why don't we carry on. I know that string literals have '\0' on the end in the ".text" segment of the elf file. So I can just point to them with a string_view (the nearest thing C++ has to a char*...it's a sort of figleaf for a char* really)..and lets just use that. I know it's fine...I am the programmer. ...
Is that bad?
is it any worse than the alternatives?
I really don't know
@OliverSchonrock You might want to try pinging @Edward or @TobySpeight for some ideas, unfortunately they are better at C++ then I am.
sure...thanks for your help
Gotta go get some lunch, have a good day.
8:23 PM
after supper here! enjoy
If it's working, this would be better suited for codereview.stackexchange.com, though you should be a little more explicit about what it does/is supposed to do, to guide any would-be reviewers. — chepner 57 secs ago
@pacmaninbw Or Martin
Thank you for the feedback! I completely forgot about code review and will post it on their now? Should I delete it from here to avoid downvotes etc. ? — oscarfrederiksen 41 secs ago
Q: Convert C string to NSURL object

ankiiThese are the methods I am using for getting an NSURL Object from a C string pointer filepath NSError *error = nil; NSString *string = [[NSString alloc] initWithUTF8String:filepath]; NSURL *url = [NSURL fileURLWithPath:string]; I'll need the url for bookmarkDataWithContentsOfURL + (NSData *)...

Q: wifi python module is not returning all wireless networks as regular user

Miguel RozsasRunning python as root returns all wireless networks but as regular user it returns only the 2.4GHz network; upsscan@orangepi3:~/bin$ ls /sys/class/net eth0 lo wlan0 upsscan@orangepi3:~/bin$ python Python 2.7.16 (default, Oct 10 2019, 22:02:15) [GCC 8.3.0] on linux2 Type "help", "copyright", ...

@CaptainObvious flagged as OT
@CaptainObvious @ankii There, have a tag.
@CaptainObvious @MartinR Would you mind taking a look at that and see if we can work with that question?
Yes, I would suggest deleting the question from here when reposting on Code Review -- cross-posting is generally frowned on, and anyone who answered this copy would be violating the guidelines in How to Answer. — Charles Duffy 18 secs ago
As for the tag creation, that's discussed somewhere around here.
8:54 PM
Why are you logging SO comments ?
@ankii @Duga is a bot keeping an eye out for false recommendations.
So do you reply them in comments?
Replying by chat won't work, if that's what you're asking.
@Mast yeah, interpersonal skills' chat also keeps an eye on their commetns
9:10 PM
You didn’t attack me personally and neither did I you. You pointed out something that was obviously an editing error I made in trying to keep some things confidential. It was spiteful, sanctimonious and not helpful at all to my question. A personal attack deserving of flipping you to the mods? No. Enough to tell you that I didn’t appreciate it because I’m not going to let anyone walk on me? Yes. If I wanted code review, I would have gone there. — Dan 49 secs ago
Q: Find the maximum GCD of a number with respect to all the values in an array for competitive programming

Rajnish KaushikHere is the Question. Find the largest GCD of the input variable with the values of an array. Inputs are as follows:- First-line contains two integers, N and Q. Second-line contains N integers which form the arr[]. Next, Q lines contain an integer M, the time in seconds she wishes to go back. ...

Q: Script to automate image searching and clicking on screen

Teodoro Bertolozzi MendesFor testing purposes of a platform I'm working on, I must automate the process of initiating Dota 2, accepting an invite that shows on screen, choose the right spot for that player (team A or team B), wait until the game starts and then exit it. All of that could be done with simple clicks on st...

Q: Python3 output based on input

oscarfrederiksenI have written this code and I wonder if there is a better way to do absolutely any of it. Also, if there is any way to optimise it or if there is a problem please also tell me preferably with fixed code as I am still sort of a beginner. It is one of my first school projects and I would like to s...

9:28 PM
@ankii we don't usually coordinate moderation for stack overflow comments from here
@Vogel612 sure, I was a logged in user there too, so I did.
@Mast I voted to close as off-topic (sample/hypothetical code).
I tried to reduce the obfuscation
9:54 PM
@MartinR Understood. I really don't have the domain knowledge to understand the question, but I figured you'd.
The full diff, I gave there, works. now an error handling needs to be added in between which can tell if the pointed to file is an alias or not.
aborting/ returning the function would be the action, if that happens
@ankii “error handling needs to be added” – that's asking for implementing something new, not for a code review.
Okay forget that part, I'll use this statement "This method returns nil if bookmark data cannot be created." [from the documentation: developer.apple.com/documentation/foundation/nsurl/… ]
So your question is if there is a better way to get the bmData from the filePath? Because the title says “Convert C string to NSURL object”.
It evolved on the way. Yes.
10:09 PM
OK, I have retracted my closing vote. But your code looks pretty straight-forward to me. Perhaps someone else finds something smart to say about it.
comments too ? :) [retracted my]
Q: Next Step for Efficiency and Learning

ProgradeThis is my second python program. It uses Pytesseract OCR to scan a templated document for customer account number and invoice/credit number, and then renames the file with the corresponding customer name and invoice/credit number. How could this program be more efficient? What other beginner-l...

10:48 PM
@CaptainObvious I'm torn on this one, the code is obviously broken, but there is a good answer that points out the problem with the compilation.
@pacmaninbw I tried running it on onlinegdb.com - while it does output a warning it does still run - same thing on repl.it
@SᴀᴍOnᴇᴌᴀ Thanks. I won't do any more than I have already done.
Thank you for your efforts. I spoke with them today and did a code review to examine how we're initializing the ApiClient object before calling CreateEnvelope. I feel like it must be something in the way we are using the SDK. We're going to add some more logging to see if we can narrow down when/where it is occurring. I'll update the issue with a resolution when one has been found. — Jean 33 secs ago

« first day (2455 days earlier)      last day (71 days later) »