« first day (1929 days earlier)      last day (2092 days later) » 

12:00 AM
RELOAD! There are 5484 unanswered questions (89.9753% answered)
 
 
1 hour later…
1:16 AM
Questions for code reviews should be posted on Code Review Stack ExchangeRufus L 36 secs ago
 
1:32 AM
By the way, assuming your code is working, it might be better suited to Code Review. But, as @RufusL notes, you might as well just use TimeSpan. — John 18 secs ago
 
 
2 hours later…
3:03 AM
0
Q: Simple ruby program for AWS ruby SDK

AparichithI wrote a simple ruby program for interacting with one of my temporary AWS S3 using Ruby SDK. Bellow is the program I've written. Since I learnt ruby by myself I need help/suggestion in following the ruby's best practices with OOPs concept. require './my_aws_helper' class AwsDemo include MyAw...

 
0
Q: How to get my question reopened?

sagTrick circumvents [position: sticky] restriction to parent My question was put on hold. Please vote to reopen it!

 
3:47 AM
0
Q: Find the year when the user will turn 100

austingaeI moved to python today after doing a little of c++. This works as intended, but I want to know if I should add the if name == "main" statement. Any other improvements? import datetime def inputInfo() : userName = input("Who are you?") userAge = input("How old are you?") return (use...

 
4:17 AM
Anyway i am voting to close this question, as its more of a code review, more than a little too broad, and is low quality for the spirit of this site — TheGeneral 51 secs ago
 
4:34 AM
Monking
 
 
1 hour later…
6:03 AM
0
Q: C++/SDL2 Tic-Tac-Toe

NickThis is my second attempt at creating a game. I think I have gotten the basic ideas of state machines and game loops down, but I'm sure there are still a lot of things I can learn. It is a basic Tic-Tac-Toe game. There is a menu where you can choose to play vs AI or another player. If the player...

 
6:24 AM
Monking
 
0
Q: Refactoring messy and repetitive code (getting orders of values)

dwan17 if (parseInt(obj[0].actual) > parseInt(obj[0].projected) && parseInt(obj[0].projected) > parseInt(obj[0].le)) { biggesteClass = 'bar'; biggestVal = obj[0].actual; secondClass ='bar2'; ...

 
Monking
 
6:48 AM
0
Q: Python GUI Calculator - Passing Variables Between Classes

D.AusterusI've recently come across this code that another user submitted for their python calculator using tkinter and have a few questions regarding it if anyone can help. I fully understand how they made their graphical interface using the "Calculator" class, but am stuck as to how to create the Calcul...

 
 
1 hour later…
7:58 AM
@202_accepted lmao
At least those are easy to fix once you figure it out.
Well, the good news is the amount of zombies has indeed somewhat stabilized, as expected.
Now we'll have to see what happens in September.
 
8:18 AM
0
Q: Managing database connections for unit tests

MeridianI have a series of unit test classes that use various connections to a database. Every test class uses two methods with the JUnit annotations BeforeClass and AfterClass to start and stop the database connections like so: public class AccountTest { private static DatabaseConnection _adminConn...

 
8:48 AM
0
Q: Insert dataframe to sql data base

praveenkumar beedanalI am trying to insert the Dataframe which looks like this Biomass Fossil Brown coal/Lignite Fossil Coal-derived gas Fossil Gas Fossil Hard coal Fossil Oil Geothermal Hydro Pumped Storage Hydro Run-of-river and poundage Hydro Water Reservoir Nuclear Other ...

 
9:02 AM
Monking
@202_accepted I'd like to see stats on total vs closed questions.
Total answered rate is so close to 90%..
 
9:19 AM
0
Q: Asp.Net MVC cookie expiration from browser side

wrdwSystem.Web.HttpContext.Current.Session.Clear(); System.Web.HttpContext.Current.Session.Abandon(); System.Web.HttpContext.Current.Response.Cookies.Add(new HttpCookie("ASP.NET_SessionId", "")); HttpCookie aCookie; string cookieName; ...

 
9:40 AM
@CaptainObvious why they don't close their function bodies, argh!
 
9:57 AM
@sineemore 89.98, just about 90, yes.
 
@sineemore site search says there's ~1.4k questions closed, as opposed to 53k questions open
 
On hold is similar to closed? Not that much..
 
There's around 7k deleted questions that are not closed and ~20k that are
so if you were to tally it up, that's around 22k questions closed as opposed to 60k questions asked
 
Hm, that's a bigger number.
 
@Vogel612 I imagine a good deal of those 1.4k could be thrown away without problem.
 
10:00 AM
I'm pretty sure that the vast majority of these 22k is/will be deleted by roomba
After a recent discussion in here I started deleting a bit more aggressively, but still ...
 
If a question is just about forgotten, it doesn't matter much, yea.
 
I see that most new user questions got closed with a single copy-paste comment. Is it OK to let them here in chat, so we can point out the exact weak parts of their questions.
 
I mean, if it was a low effort job to get them all sorted every once in a while, sure, go for it. But it probably isn't. There's bigger fish to fry.
 
Might be more user friendly..
 
@sineemore they need 20 rep to chat in the first place
and comments are easily attached to the question
 
10:02 AM
Oops, yeah..
 
@sineemore Chat takes 20 rep. Besides, a lot of them are unsalvageable.
If you want to explain more, use the rest of the comment thread.
 
additionally chat is "yet another step"
 
Everyone can comment on their own question.
 
Maybe we should have some grace period before vote closing them?
Like waiting for user changes, that may happen..
 
0
Q: Map array of objects and apply condition in javascript

Zeyad EtmanI'm mapping through array of objects and apply condition on each object by adding a new value according to the condition. I use map in ramda. Can I do this better? Here's my code in javascript: events = map(el => { if (!['ts', 'sxi', 'ht', 'hd'].includes(el.value)) { el['extras'] = {type...

 
10:04 AM
@sineemore if anything, I'd want question closing to go faster for off-topic questions
also implying that reopening happens faster
 
@Vogel612, I belive a good number of offtopic questions might get a fix to stay on topic..
 
and I'd want notifications for down- / close-voters when a question they voted on gets reopened
5
not that that will be implemented :/
 
Is there an SQL interface for CR?
 
@sineemore There's SEDE.
Updates once a week or so.
 
Is it that 202_accepted thing?
 
10:09 AM
No, that's SESE.
 
Link please :)
 
Nice, thanks!
 
10:49 AM
0
Q: AppTaskWorker - Running class methods at sporadic intervals

a5266680I decided to write a class to do this for me. I had a lot of methods that needed to be invoked at sporadic intervals, across multiple projects. The dictionary will eventually be class methods, I just put new Task()... as an example. I'm fairly new to asynchronous programming, so constructive cr...

 
@sineemore I don't remember why I don't have closed questions on there...I think there was an issue pulling that data.
@Vogel612 I asked for something similar a while back on the big meta
 
11:07 AM
 
Seems not implemented yet
 
Monking
 
Maybe this should be on code review? — ivcubr 30 secs ago
This question is much more suitable on codereview.stackexchange.com so post it there instead. — klutt 56 secs ago
 
0
Q: Add touch listener to custom view

Nepster I am learning CustomView, So I decided to draw some circle and lines using Canvas. I am succeeded in it. Now trying to make a circle draggable inside it. I have almost done it. But I think onTouchEvent is not quiet good . Give me suggestion to improve. And I want to make the circle only whe...

0
Q: Generating bingo boards with non-repeating sequences

Zev SpitzI am trying to write a bingo board generator. There are 40 possible entries, each board has 5 x 5 cells, and I need 25 boards. Each board has 12 winning sequences -- 5 rows (H0 to H4), 5 columns (V0 to V4) and 2 diagonals (D0 and D1). In order to avoid ties, I want to ensure that each sequence ...

 
@ivcubr Maybe the OP doesn't care about a code review but only about the algorithm? Because as mentioned, the algorithm is the least of the problems here. — Lundin just now
 
11:38 AM
If you write your own implementation, you can try to ask at Code Reviewvp_arth 23 secs ago
 
11:50 AM
@Ryan at a guess because it doesn’t seem like much effort has been made to diagnose the cause of slowness. You have profiling tools etc. available to determine where most of the time is spent. It is certainly worth spending some time getting to know them. Better luck on code review. — Paul Rooney 49 secs ago
 
@sineemore Given the age of the question, they probably won't.
 
@Mast Considering all the energy they just spent on the COC, you'd think this would become a bit more important...
 
Greetings, Programs.
 
12:05 PM
0
Q: JavaScript calculator w/ JQuery and Bootstrap

Omar.BThis is a JavaScript calculator that uses JQuery and bootstrap. How can I improve the CSS, HTML, JS and the general design? /// <reference path="jquery-1.9.1.js" /> var firstnum = ''; var first = true; var secondnum = ''; // Resets firstnum, secondnum and first function reset() { firstnum...

 
12:20 PM
0
Q: Showing a tooltip on hover based on a tooltip attribute

P. NickI'm showing a tooltip when you hover an element with the tooltip attribute. E.g. <div class="example" tooltip="Hello World">Hover me.</div> I also have to set the position of the tooltip based on it's width, and because I use width: max-content for the element, I have to do something like shown ...

 
12:35 PM
Hi, If it works but you are looking for a critique then consider the code review site. SO is for specific programming problems. — QHarr 1 min ago
 
12:51 PM
0
Q: Disjoint cycles of a permutation. Can this be made recursive?

SeFGiven an element of the permutation group, expressed in Cauchy notation, it is often useful to have it expressed in disjoint cycles (for example to apply the permutation to the keys of a dictionary). The code below provides a possible answer to the problem: how to go from the Cauchy notation to...

 
1:06 PM
0
Q: Try to reconnect with a timer [WinForms / C#]

Matthias Hermsenwhen I loose a connection an event gets triggered. This event should initialize a timer that should try to reconnect until the client is back online. I used the StopWatch for this but I think this code might not be the best. private void Client_StateChanged(Object source, ClientStateChangedE...

 
@Donald.McLean Greetings, User
 
Wooot! F-ed up Excel Spreadsheet Processing Day at work!
 
1:21 PM
0
Q: Median Calculation of List of Integers without using heap

danieltakeshiReferences Using those references: rolling median implementations benchmark FAST RUNNING MEDIAN USING AN INDEXABLE SKIPLIST Calculate the median of a billion numbers Find running median from a stream of integers Code A code was written to calculate the Median with the SortedContainers libra...

 
This might work better on our sister site Code Review Stack Exchange. Also, you should include more code sot that the function is in context. — Tim Biegeleisen 27 secs ago
 
1:51 PM
0
Q: The optimal way to decouple business logic from controller

ScarassThe rule is that controllers shouldn't have business logic, instead they should delegate it to the services. But when we do that, we can't handle all possible cases and return appropriate HTTP response. Let's look at an example. Let's that we are building some kind of a social network, and we ne...

 
2:02 PM
@202_accepted can you take a look at one of my answers and the comments to make sure I am not missing something? --> codereview.stackexchange.com/a/201685/18427
 
It's possible they have different results depending on what that function does.
So your versions are not equivalent, and we can construct a sample that shows why.
Well, maybe not.
Odd.
Wow that method does some weird stuff.
 
I missed a spot. I found my error
did you see my edit?
 
Yeah so we can construct a sample where calling CleanUriString twice does something different than doing it once.
return CleanUriString(CleanUriString("ABCD<ABCD>ABCD")); // Returns "ABCD"
return CleanUriString("ABCD<ABCD>ABCD"); // Returns "ABCD<ABCD"
That CleanUriString has some problems...
 
because of what is in the CleanUriString, right? because it doesn't do what it is meant to do....but that is a separate things from the code I reviewed....ugh this is getting messy
Johnbot mentioned it in his answer --> codereview.stackexchange.com/a/201712/18427
 
Yeah. So the way it works is it loops through each character, and it finds the first instance of that character in the original string and slices to that point. The problem with that is we don't clean all the bad characters, only the last one we found.
 
2:53 PM
@pedorro This does not seem to be as terrible as you're making it out to be. Anyone that understood that everything the Java committee does should not be taken as Gospel would pass this in a Code Review. It is worse having to re-write all of the Enum utility methods all because name() cannot be overridden. Instead of catching the exception and swallowing it, a RuntimeException should be thrown and then this is fine. — Andrew T Finnell 55 secs ago
 
3:08 PM
Hi @waleydeen, please keep in mind this is not a code review site, so you better provide an actual question here instead of asking people to debug your code. — toti08 17 secs ago
 
Monking
 
3:24 PM
~sigh... cargo-cult programming is such a frigging nuisance
 
3:47 PM
did anybody review flags for The Restaurant at the End of the Universe?
 
@Vogel612 Any background on this?
 
4:22 PM
0
Q: SQL Query CTE Recursive

jkaneCould someone please review the following and let me know if I can improve it. It works, but I ran it last night and was tired of waiting for it and killed it at 35 minutes. I'm not sure if I did something wrong or if the query is just that complex. Thanks in advance with P_Parts_CTE (Company, P...

 
> Mgt: "Can we use <X>?"
> Me: "No, it's not currently working."
> Mgt: "Oh well, we're going to use it anyway."
> ...
> Mgt: "<X> didn't work right, fix it."
4
 
4:55 PM
possible answer invalidation by 200_success on question by P. Nick: codereview.stackexchange.com/posts/201722/revisions
@CaseyPoon, if your program works correctly but takes too long, it might be better to ask a question at the code review site. Make sure to read through their how to ask page before you post though. — R Sahu 55 secs ago
 
@Duga I'm sure @200_success knows what would invalidate an answer by now. Looks fine.
 
If you do want to post about this on Code Review, make sure to include your actual code, otherwise it would be off-topic there. — Graipher 58 secs ago
 
@sineemore use of org.slf4j.ext.XLogger over org.slf4j.Logger for stuff that can be done with the latter only
 
Monking
 
0
Q: python hasattr() vs try/except

slyblotyI'm looking at two ways to address the situation when one member variable has or has not be assigned prior to it being used: either checking it using hasattr() or catching the exception when trying to utilize the variable. Using hasattr(): class myClass(): def doMyClass(self): if ha...

 
5:16 PM
Your question doesn't fit here particularly well, but is a worthy question. Please check "Which site?" for general issues and "Code Review or not?"Prune 27 secs ago
Your question doesn't fit here particularly well, but is a worthy question. Please check "Which site?" for general issues and "Code Review or not?"Prune 13 secs ago
 
^^
 
Saw that on a dumpster by my work. Does moderating the site ever feel that way?
@Vogel612
 
I saw that on google Images
 
5:34 PM
@SamOnela Those are garbage. (Don't ask me how I know.)
 
so those can be put into the Vogel dumpsters...
 
Yes.
 
who needs a sight on a glockenspiel anyway?
 
0
Q: Hex Dump Utility in x86-64 Assembly, under Linux

case_2501As a relative newbie to Assembly programming, although I can get my programs to work, I have no idea if they are disastrously constructed or not. I have created a simple Hex Dump Utility, using x86-64 under Linux, and it works just fine! I am learning in isolation however, so I have no peers...

 
@bruglesco on the really bad days, yea
but that's rather rare.
it's more like... picking up sweets wrappers around the house for the most part
and there's tons of stuff that's not comparable to waste disposal in any way
 
5:41 PM
@SamOnela They're garbage and have the accuracy of a deflated water balloon as it is.
 
I posted my code to codereview! Any criticism will be greatly appreciated codereview.stackexchange.com/questions/201743/…Casey Poon 34 secs ago
 
@202_accepted As opposed to a deflated air balloon?
 
@Phrancis At least you can throw one of those.
When I did my Pro Marksman training I had better accuracy with the Glocks when I tried to physically throw the weapon at my target. Everything else I passed with flying colors...those were...something else.
 
0
Q: Processing XYZ Data from large .txt file - C++

Casey PoonHi I'm new to programming (1.5 years experience at university), and I'm working on my first computer vision related project! My goal is to take a .txt file with XYZ coordinates and process the data. I want to round the X and Y coordinates into integers and leave the Z coordinate as a floating poi...

 
5:56 PM
@202_accepted Oh so the Glocks themselves were crap, not the sights?
 
@Phrancis The gun is garbage and that company needs to be shut down.
Even at 15ft accuracy starts to waver heavily.
 
Some person at the hospital I contract for managed to get their username changed in Active Directory (after they complained about it for a very long time)
It broke everything they had access to.
(hardly surprising right?)
 
Yeah I hate when people get married, for that reason...lol
 
We don't even do it when that happens. With thousands of users, it would be too much of a burden. They just have to suck it up. We'll change their last name, sure, but not the username
 
We "have" to, so I literally create a new profile, migrate all their settings and data, and delete the old profile.
 
6:03 PM
This formatting seems werid
 
Probably a manual <br />
 
Nope
 
Weird
 
First line after a nested list in the outer list
0
A: A thread safe task queue implementation using my own lock_guard in C++

hoffmalelock_guard The destructor never checks if mtx == nullptr, which will cause problems if lock_guard got default-constructed. The lock_guard(M&) constructor cannot be noexcept, as lock on a standard library compatible mutex class is allowed to throw. Any specific reasons why std::lock_guard or s...

heres the original
seems like some margin or padding is set incorrectly
 
oh yeah I noticed that yesterday when giving an answer - I manually added two break tags
 
6:06 PM
List formatting is kinda broken, you have to use funky workarounds to make them look right sometimes
 
@hoffmale Yeah, manually adding a <br /> or two should work. Odd that happens, I know I fight lists regularly as well.
 
Hmm... I might add that
 
adding a horizontal rule line (i.e. ---) might also work but could be undesired
 
@bruglesco They'll likely get marketing problems in Germany ;)
(Vogel = bird)
 
6:34 PM
huh - apparently the Chevrolet Nova did sell acceptably in Latin America
 
6:45 PM
You might want to ask on codereview.stackexchange.com to improve your current existing code you have. — Progman 58 secs ago
 
@SamOnela Random conspiracy theory of the day?
 
maybe I was inspired by the random channel on my companies Slack chat, but hoffmale's message about the marketing problems in Germany made me think of that
> The Chevy Nova legend lives on in countless marketing textbooks, is repeated in numerous business seminars, and is a staple of newspaper and magazine columnists who need a pithy example of human folly. Perhaps someday this apocryphal tale will become what it should be: an illustration of how easily even “experts” can sometimes fall victim to the very same dangers they warn us about.
 
Well, there are some slight differences between those two cases ;)
"Vogel" literally is the German translation of "bird", no language tricks involved
And you'd have to do some good advertising for a "bird disposal service" if you want to get jobs that don't involve birds
(Okay, the order could be changed to "Entsorgungsdienst Vogel", which wouldn't have that ambiguity)
But that would still have the same issues as "disposal service bird" (at least in a spoken context)
 
7:08 PM
0
Q: A simple brainf*** interpreter in Haskell

mrFooblesI am very new to Haskell and come from languages like C++, although I do have some experience with Scheme. Here, I wrote a simple brainf*** interpreter, which so far is my largest project. I followed a tutorial for some of the code (such as the Tape data type), but did most of this on my own. I h...

-1
Q: Quinne McCluskey Algorithm

user10055134This is the code for my Quine McCluskey Program. It only works for certain combinations. Would someone be able to explain to me what I am doing wrong? This is the Main. package quinemccluskey; import java.security.InvalidParameterException; import java.util.ArrayList; import java.util.Array...

 
7:23 PM
0
Q: Text color changes on button, but not every time

turtlebox1okay, so I'm new here and maybe I'm just tired from how long this has confused me, but here we go: On a button click: When the variable "GPA" is below 2.5, the text "finalText" should turn red. When it's 2.5 or above, it should turn green. I'm using bootstrap, and I've tried any number of soluti...

 
@MartinYork: Code review. I addressed the IMO second most significant problem with a Stack Exchange code review, that of not knowing the rationale of the decisions in the code. The most significant problem being that the reviewers can sound authoritative without even understanding the basics of programming, as I experienced when asked for review of some JavaScript code, where a number of the reviewers didn't appear to understand hex. — Cheers and hth. - Alf 41 secs ago
 
@CaptainObvious broken
@CaptainObvious also broken
 
@CaptainObvious doesn't work for "in certain cases"
 
@CaptainObvious I thought I heard something...
 
@Mast @200_success I reopened Trick circumvents position: sticky restriction to parent after I edited in a working code snippet as the example, note that I did not change the "code"
 
7:31 PM
@CaptainObvious honestly a bf interpreter in haskell is almost a hello world...
 
@Vogel612 I cannot recall that I've seen that kind of loop handling yet.
 
transforming a loop into primitive recursion seems appropriate
 
Nah, I mean that loop gets extracted out of the code. See the EndLoop case.
 
If you have code that works, then you should post that code on Code Review and someone will assist you in improving the code. — user3386109 just now
 
7:49 PM
darn - I recommended deletion on an answer but now see it has value beyond the thanks
 
It happens.
 
8:05 PM
@Vogel612 just loved the way you sad that (:
Anyone familiar with Rust?
 
8:28 PM
@TacB0sS I'm sure the Sun author who made this change didn't send it for code review :-D — asgs 16 secs ago
 
8:39 PM
0
Q: Better way to get a key's value in a nested dictionary

NestorI just found and solve a now deleted question at stackoverflow, the OP was asking for a way of how to get all the values contained by all 'PLU' keys. I solved it this way but how I am a newbie in python I was wonder if would be a optimal/better way of doing this, maybe using iterators, i dunno. ...

 
8:53 PM
That's fine if they spot it, that's the whole point of code review and why open source projects can be so beneficial, other coders will always find better ways to do things. Don't try to be perfect. — Devon 14 secs ago
 
0
Q: Vector-like type for type that can't be moved or copied

Tykeri was in need of a vector-like type that could hold types that couldn't be copied or moved so i implemented one. i tried to make it similar to standard stl containers. is the use of the macro to throw the exception for the at member function legitimate to prevent code repetition between the cons...

 
 
1 hour later…
9:54 PM
0
Q: Handling authentication in mobile app

JamI have a mobile app, made with Xamarin.Forms and Prism.Unity.Forms. I would like feedback on whether my solution is sane, and makes sense. I have CustomerService, EventService, and views. public class EventService : IEventService { public event Action LoggingIn; public void OnLoggingIn...

 
10:22 PM
I admit that I did it until was pointed to the community meta answer to First Post Review Queue but there are users selecting No Action Needed frequently in the First post queue
 
10:35 PM
possible answer invalidation by Jamal on question by Nestor: codereview.stackexchange.com/posts/201754/revisions
 
@SamOnela I make it a point to at least post a short welcome comment to first posts
 
@Duga not that guy again! it is fine- removing header text from output sample
@Phrancis I do sometimes too
unless it has already been proposed, I wonder if it is worth posting on SE Meta about a so the first posts review queue could either link to that community wiki, or better yet, not offer that option (though the post does state there are times when it is acceptable)
 
Good question, I'm not sure either. They may view it as a solution in search of a problem
 
10:51 PM
like it would be as if we are looking for a problem to solve?
 
Right. Then again, it could be useful for educating contributors to the first post queue
 
11:22 PM
consider posting on codereview (subject to reading their introductory materials e.g.). Stack overflow is for broken code. If you are trying to refactor consider that your functions might be doing too much and can be broken down a bit. I recommend kent becks implementation patterns book to help understand how to structure your code. It's java but can be applied to anything judiciously. — Paul Rooney 58 secs ago
Make sure you log the extra code review you'll need to do in 500 years. That technical debt can really add up! — Devin Lamothe 14 secs ago
You may want to consider posting on the CodeReview StackExchange for feedback on your code. — Roddy of the Frozen Peas 14 secs ago
 
@Duga is the Frozen Peas a musical group?
 
Code review StackExchange site is a better place for questions about code that is working correctly. — dasblinkenlight 29 secs ago
 
11:39 PM
0
Q: Making Code DRYer

Marcus LouvierAny tips on how I can make this code DRYer? I'm working on becoming a cleaner and less clunky coder overall. If you notice, user_one() and user_two() are mostly the same code, with minor adjustments. perfect_combo also shares some of the same. I feel like there's a way to cut down on the code in...

 
Your malloc() is wrong too. Should be malloc(sizeof(char) * n1) and the same for others. This is better suited for codereview.stackexchange.comUnmanned Player 16 secs ago
 
TTQW
KTHX BAI
 

« first day (1929 days earlier)      last day (2092 days later) »