« first day (2308 days earlier)      last day (1716 days later) » 

12:00 AM
RELOAD! There are 6197 unanswered questions (89.9525% answered)
 
@Duga it's goin' up!
 
 
2 hours later…
1:40 AM
possible answer invalidation by Linny on question by aorta: codereview.stackexchange.com/posts/227042/revisions
 
 
1 hour later…
2:49 AM
0
Q: More elegant code to write function about abtest using chi-square?

JackThe definition of ABtest Input: grp tot lgn read 0 a1 6300 360 30 1 ca1 2300 60 7 2 b1 26300 148 6 3 cb1 10501 15 3 4 c1 74600 36 2 5 cc1 26000 6 1 Code: import numpy as np from scipy.stats import chi2_contingency from itertools impo...

 
3:28 AM
0
Q: A basic trivia app, I'm hoping for some good feedback on how bad my new, self taught coding style

millies1919The app grabs 10 questions from an API, displays them one by one with 4 multiple choice answers. These answers are clickable buttons that alert to whether the answer is correct or not. Finally the last screen shows the amount write and wrong (via wrongCount) and the percentage score as well as a ...

 
3:48 AM
1
Q: Find the rotation point of a sorted array that is "rotated"

太極者無極而生This problem comes from part of a solution of LeetCode for rotated array. Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [2,3,5,6,7,8,12] might become [6,7,8,12,2,3,5]). (And we just want to find the "rotation point" here, whi...

 
 
1 hour later…
4:52 AM
This kind of question is outside of the scope of Stack Overflow (see stackoverflow.com/help/how-to-ask). You should consider posting it here: codereview.stackexchange.comJerry M. 1 min ago
 
5:09 AM
0
Q: Add or remove a class on two elements when two different events fire

thenomadicmannI want to add/remove a class on the html and body tags in the dom when my nav menu is opened or closed. Is this the most optimal way of writing this logic? $( '#navbarNav' ).on( 'show.bs.collapse', function() { $( 'html, body' ).addClass( 'noscroll' ); }); $( '#navbarNav' ).on( 'hide.bs.col...

 
5:45 AM
@yoloy , a recommendation: When you have the bugs all knocked out, ask for help improving the performance over at Code Review. The community there specializes in taking working code and making it better. I linked to the How to Ask pages of their help because you'll want to read it and compose a question that conforms to their requirements before asking. — user4581301 29 secs ago
 
6:08 AM
0
Q: sluggishness of python application

Subrata MitraProject description:- we have different types of devices like sov,motor,analog, digital,controlvalves etc. Each type of devices have 100 items. Now our software continuouly monitor with the plc to read some property of each type according to we need to write some property. AS an example :- Suppos...

 
6:28 AM
-1
Q: Observer pattern implementation, am I doing it right?

bakunetI have doubts regarding my implementation of observer pattern, but with complete separation of concerns. Example below is not a real life code, but just an example of idea how I want to do it. In my solution I have two project layers: Desktop layer (views, view models, models) Service library...

 
Monking
 
 
1 hour later…
7:47 AM
1
Q: Generic Extension Method To Count Descendants

ShawnI've created a extension method to count every available descendant starting from a single, given key. The data is a flat list, there's is no hierarchical structure. (Well, not entirely true. There is an hierarchy in the data-model, but not in the list itself) self-reference parent-refere...

0
Q: weird thing with power

the best everi made an array called arra and it contains numbers like 1 , 2 ,3 ,4... but i want them to become 1234 at once, so i made this the problem here is that it outputs crazy thing like when the array contains 1 , 2 ,3 ,4 , 5 it outputs 1 20 299 4000 49999 can anyone tell me it decreased one at 3 and ...

 
 
1 hour later…
9:06 AM
0
Q: Using Dynamic Programming to reduce time complexity

Santosh PrasadInput - A long string of numbers, A list of numbers in string Output - Minimum space needed in long string to match maximum numbers from list e.g. - minSpaces('3141592653589793238462643383279',['314','49','15926535897','14','9323','8462643383279','4','793']) - will return - 3 I am using below ...

 
9:45 AM
possible answer invalidation by jorrebor on question by adrienlucca.wordpress.com: codereview.stackexchange.com/posts/183264/revisions
1) this program is rather long for question format 2) it may be more suitable for codereview.stackexchange.com 3) even from C perspective this code is very low quality — VTT 16 secs ago
No, why would you even want to do this and how would you enforce that the developer would use it? Have more code reviews if you want to ensure code quality. — Piers Myers 18 secs ago
 
10:44 AM
0
Q: Is there a way to make the following shorter and cleaner?

Péter LeéhI'm trying to reshape my input arrays in a way that's described below to be able to fit a curve on the data points, plot it, etc. It works fine, but I'm afraid it's not the most efficient way of doing it, and also it's hard to understand and read. It's part of a bigger function, but I only post ...

0
Q: Python Method for Text Input from Project Euler

A.L. VerminburgerFrequently input for problems is given as a 1D or 2D array in a text file. Have knocked out a method to do so, but believe something shorter, clearer and cheaper can be written: def read_array_from_txt(path, dim, typ, sep): ''' @time: O(n) @space: O(n) ''' txt_file_object = ...

 
11:04 AM
0
Q: Looping through list to create SQL Query

Harry AdamsI have a list of variables which I need to convert to LIKE statements in SQL. The final query should look like the following: ... WHERE ([TraceableItem].[IdentificationNo] LIKE N'%015558' OR [TraceableItem].[IdentificationNo] LIKE N'%123456' OR [TraceableItem].[IdentificationNo] ...

-1
Q: Need A Bit Of Assistance On A Beginner 'C++' Program (Snake Game)

PropheticI'm 57 years old. I've begun into C++ from a heavy C background. But it has been years since I was fast at this. This is my first '++' program, which I'm using as a learning experience. A simple Snake Game. Everything runs smoothly. My issue is that I've been scratching my head for the last few "...

 
11:43 AM
0
Q: Feedback on a responsive web design project (HTML/CSS)

ØyvindsenI would appreciate som feedback on my fictional product landing page. I am doing the freeCodeCamp curriculum and this is one of the Responsive Web Design Projects using only HTML/CSS. I am especially interested in feedback regarding best practice, naming conventions and efficient code. Thanks. ...

 
12:03 PM
0
Q: Adding new element in python Queue is changing all previous values to the latest value(Implimenting all previous StackOverflow answers)

RJ_SUWhile coding for 0/1 Knapsack using Branch and Bound in python, I used a queue from the queue module, to store all the nodes .... The code snippet where the queue is checked to not be empty, and then values are fetched and pushed into the queue as per code. Here, q = queue.Queue(), initialised ...

 
Kaz
12:19 PM
@Mast I know. They failed by the standards of what I was hoping to see from them.
Also, these are meant to be "experienced data analysts" (according to our Indian outsourcing contractor". Let's just say I'll believe it when I see it.
 
12:35 PM
 
Kaz
@DerKommissar Yeah. One of the many reasons I've finally had enough and am actively looking for a new role somewhere else.
It's been 5 years, probably time to move on anyway.
 
0
Q: Flattening XML and selecting nodes based on input to convert to CSV

noobie-phpso i have an XML that i want to flatten based on its Xpath, the task is to acquire certain nodes that are passed as input. That said i have to get to parent nodes and looking for nodes that might be part of the configuration. I am avoiding lists in a given iteration. following is what is my code...

 
@Kaz Same. I've been doing IC work as a consultant / contractor and working with a full time job... My job has literally taken my office and put me in a "shared office", my parking garage is about to displace me for a "restoration" project, and there's nothing but construction from my house to work. On top of the fact that I have averaged 65 hours a week this year, and get paid for 40. Think it's time to beef up the contracting...
They're changing things for the sake of change and I'm done with it, man.
 
possible answer invalidation by Trauer on question by Trauer: codereview.stackexchange.com/posts/226968/revisions
 
@Duga looks ok, only added unit tests
@DerKommissar my parking costs went times 10 this year, they want cars out of the big cities
 
12:46 PM
And you could say "well, Elliott, it seems petty to be mad about that stuff." You're right, if it were one individual thing, it would be petty, but all this crap together? Nah, not petty no more.
@dfhwze Mine is just that the garage is falling apart, so they're literally blocking sections off (by surprise!) to fix them.
Though, that said, the registration fee on my car went up $65/year this year (my state just made hybrids cost $65 more than standard per year, and electric-only cost $165 more per year).
Gas guzzler: $35/year
Hybrid: $100/year
Electric / Alternative: $200/year
 
@DerKommissar I don't like the current politics, too much drama and all costs boil down to us working folks
 
Yep. It's you and my problem.
I have too much gray hair to be 25...and it's all "stress gray", not natural gray.
4
 
@DerKommissar so your profile pic is not an actual representation of you anymore :p please update the picture for us to make a proper review. As it currently stands, you are off-topic!
 
@dfhwze Yeah....
I've actually fattened up since that pic too
 
@DerKommissar I've also changed quite a bit since my pic was taken
and you'll get over it
at 32 you'll accept it
 
12:52 PM
Look man, I've said it time and time again, I'm cool with gray, if it's all gray, and not this mix-and-match BS.
 
but then again, a semi gray beard would be really kewl, no?
shave your head and get a beard.. how about that?
 
The part that's messed up is my beard is brown...
Only my head is gray.
Nah, not going the nazi-skin-head route lmao
 
oh that's messed up man
=D
 
If I shaved my head I would literally look like one of those bad skinheads you see...
 
don't the girls love those types?
 
12:55 PM
Nah I'm ugly so I'm already playing life on hard-mode.
 
well I hope you get fully gray soon
to ease the pain
 
I appreciate it
 
@DerKommissar Does Ohio actually want smog?
 
JAD
@dfhwze wouldn't that invalidate existing reviews?
 
@pacmaninbw Looking like it...
 
1:00 PM
@JAD It might, what do you think in this case? OP commented yesterdat they would add some unit tests to question
answers were made after that comment, so I guess reviewers were up to speed
 
JAD
They're doing something similar here. Their reasoning is the lower income from fuel taxes
@dfhwze check which message I'm responding to :P
2
 
@JAD Oh god, hahaha!
 
@JAD That's the "justification" of it.
 
JAD
yeah, it's stupid, I know
 
@JAD Yeah but I'm good with it
@JAD Well, I ran the math, with the extra $65, and the extra cost of my car, I have to drive about 3k miles to break even from my old car.
 
JAD
1:03 PM
hmm, and it's not like electricity isn't taxed
just less than fuel
 
Mine is an internal system, so there's no "plugin"
So, technically speaking, the state doesn't get "electricity tax" from my car.
 
1:18 PM
@Kaz Indian outsourcing contractor? Oh boy, good luck.
@JAD Around here, a heck of a lot less than fuel.
 
0
Q: Generic method to call API functions with simple retrial on errors

AlexeiI have to develop a small security management application that relies on a Web API. Based on that API, I have generated the REST client classes (Open API generator), but I still have to code on top to provide things like retrials and token management (avoid getting a token for each call). Code ///

 
2:04 PM
If your code works and you're only asking for a review, the correct place is codereview.stackexchange.comJames Z 34 secs ago
 
Greetings, Programs.
 
2:27 PM
This question really seems a homework, and not a real code needed in an application. This may be an in-topic question for other StackExchange sites, such as Code Golf, Code Review, Software Engineering, or Software Recommendations. — gog 39 secs ago
 
2:41 PM
1
Q: Counting numbers that are divisible by 3 and can be produced from the digits of a given number

tarit goswamiI'm trying to solve this problem from codewars. Problem Given a certain number, how many multiples of three could you obtain with its digits? Suppose that you have the number 362. The numbers that can be generated from it are: 3, 6, 2, 36, 63, 62, 26, 32, 23, 236, 263, 326, 362, 623, 632...

 
3:00 PM
0
Q: Finding the least number of terms to satisfy integer square equation

Simon ShineThe following code is a solution to an exercise I've made. I am unsure how to improve on it, but among the things I am dissatisfied with are: (1) the repetitiveness inside hasTwo and hasThree, and (2) the use of elemOrd seems a little non-standard, and (3) the constant use of (^ 2) throws a bunch...

 
3:19 PM
Greetings
 
0
Q: A Python script that generates git commits for the last year

Sasha ShpotaI implemented a Python script that generates git commits for the last year making one's Contribution Graph look full of changes. It was my first Python program (I work mostly with Java). Although the program is quite useless I want to use it as a learning playground to build my Python competences...

0
Q: Java convention regarding construction

bbnumber2I have recently started writing small single-use programs with Java and would like to know if I'm writing in a readable (or at least common) format. I have read the somewhat official guide but noticed that it didn't mention my instance. Specifically, if I am using declarations and constructors pr...

 
3:32 PM
@AndreyAkhmetov I didn't tested it yet. This method is used while fetching dependent entities. I don't have access to production environment and I'm not sure if I will able to make proper test on my local machine. Whole ideas happen in code review, probably it would not have a big impact on performance. — Jake 11 secs ago
 
0
Q: Pokemon Go Spoofing Gps Location On Android And IOS?

Dwana PizerPokemon Go Spoofing Gps Location On Android And IOS? [NEW] Pokemon Go Spoofing ((IOS & ANDROID)) Tutorial Get Pokemon Joystick Hack + Teleport.. Pokemon Go GPS Spoofer iOS/Android. ... We Stayed At The Taco Bell Hotel! ... Gordon Ramsay Makes SPAM Scrambled Eggs in Hawaii. UPDATED Pokemon GO Hac...

 
@CaptainObvious spam alert
TIL there is (apparently) a Taco Bell Hotel...
 
3:59 PM
0
Q: Scala code needs improvement

Gaurang ShahThis is my first Scala Project. It works, However I am not sure if it's upto mark with Scala. I would be delightful is someone let me know what I can do more to improve it. import org.apache.http.HttpResponse import org.apache.http.auth.UsernamePasswordCredentials import org.apache.http.clien...

0
Q: AES encryption/decryption in rust: performance and beast practices

Ivano DonadiI wrote a small rust library available on github that can encrypt/decrypt a 16 bytes block using either 128,192 or 256 bits password. This implementation is tested with the test data provided in the standard description. Since I'm pretty new to rust and this was mainly an exercise to learn to use...

 
Monking
 
4:19 PM
-1
Q: QPrinter error - QTableWidget (pyqt5)

summerbyeI'm trying to print a QTableWidget with QPrinter, after making an .ui with Qt Designer. If there is not an answer for this error, maybe try to think of an alternative of printing the table widget(exporting it in some way, with a website or even giving up on the qtablewidget and trying putting th...

 
4:39 PM
@CaptainObvious lol
 
Would you consider these answers on-topic? codereview.stackexchange.com/questions/227091/…
 
4:59 PM
0
Q: Newb in Ruby: calculating p-value

conI am attempting to translate some of my Perl code to Ruby, from http://rosettacode.org/wiki/Welch%27s_t-test I am a very very beginner with Ruby, but I have verified that this is producing the correct answers, but is this "idiomatic" Ruby code? how is this with regard to best practices? def ca...

0
Q: GUI table widget filling with nested for loops

Péter LeéhI'm doing a larger PyQt5 project which includes loading in large amount of data into a QTableWidget. However filling the table up with the loaded data is extremely slow due to nested for loops. I put there a minimal working example. The loaded .txt files usually look like this: ... 3.13785602664...

 
@CaptainObvious I got OP to improve title; should we add and/or , or would that only be if the code implemented a REST API?
 
@SᴀᴍOnᴇᴌᴀ we recently had either some meta or a discussion in chat about API
 
yeah let's look at meta
 
only use that tag if OP created an API, not if merely using one
 
4
A: What's the [api] tag for?

MastLacking answers, I've suggested an edit to the api tag to clarify its intended usage (code that implements and/or wraps an API, not code that uses one). Feel free to improve it further along those lines. Allowing the tag to be used on any question containing code that simply talks to an API woul...

 
5:11 PM
API, for code implementing (not using) an Application Programming Interface. A program's API defines the proper way for a developer to request services from that program, site and/or service.
 
H5
 
I added the tag to that post... I'm not sure what other tags might be applicable
 
perhaps REST can be used, since OP builds a rest request
 
5:53 PM
@SᴀᴍOnᴇᴌᴀ Meh, not sure that's a good fit, but it's close enough.
 
@Mast yeah maybe it isn't ... we can remove it
 
Not everything has to be tagged into oblivion, especially with such short pieces of code that are relatively straight forward and only have one function.
 
6:08 PM
H5
 
It's starting to look like SO here. Could you also review the OP's code and explain your method? — dfhwze 16 mins ago
True enough
 
...especially when you consider the other answer by William...
 
@SᴀᴍOnᴇᴌᴀ That tag edit of yours, did you write that yourself or grab it from SO?
 
Yea, it smelled like SO all over.
 
6:17 PM
I looked on metas... found this
man what is up with my closing parenthesis today...
 
Please try something that's a bit more suited to CR instead, that tells something useful instead of referencing dead links and a study that goes into a very specific part of the tag.
 
okay
I should have looked at the rejection reasons - I felt like there was one like that
I should have paid more attention to point #3 on the linked page See our advice on writing great tag wikis.
 
The least you can do is verify the content of the wiki. Dead links are a giveaway you cut corners here.
Don't take it personal, don't do it again.
 
possible answer invalidation by Avi on question by Avi: codereview.stackexchange.com/posts/227049/revisions
 
Don't forget to leave a comment on off-topic questions, especially if there are no comments on that question at all.
10
 
6:29 PM
@Mast I was looking for your opinion on anwers here: codereview.stackexchange.com/questions/227091/…
I'm struggling to decide whether answers are on-topic here
 
@dfhwze Rule of thumb: answers can't be off-topic
 
Oh ok, so I could leave comments in such case.
 
Toby's answer mentions the algorithm is sub-par, so technically it's a review.
Dario's could be construed as VLQ, since it's an alternative implementation. But, that's a bit of a grey area. And, honestly, on programming-challenge questions, as long as OP is happy, who cares.
 
haha ok
@SᴀᴍOnᴇᴌᴀ I see your suggested edit on REST
 
Alternative implementations should be accompanied by a review. Since that's what we do.
But sometimes, it's implicit.
 
6:34 PM
@Mast sometimes reviewing a question is just stating the obvious
@SᴀᴍOnᴇᴌᴀ I think the most crucial part is a 'tag usage' section
 
Not every user here sees the same as obvious, or has enough experience to even know what is and isn't obvious to those with a bit of experience.
 
I've had suggested edits of mine rejected because I lacked this crucial section
 
0
Q: Reduce this nested if condition to a single one block

maksbd19To be honest I don't like to nest blocks, I try to avoid them if possible. But I am quite disturbed with the following piece of code that I can't stand. if(conditionA) { if(conditionB) { // do some stuff } else { // do some other stuff } } I keep stumbling upon ...

 
@CaptainObvious No
@dfhwze So, why did you approve it?
 
@Mast I don't see it black or white, I would like to see that section included as well
 
6:44 PM
@dfhwze If you scroll upwards a bit, you can see why I disagree with the edit.
 
Oh I read that, thought it was related to that tagging and removal of tags
If you look at Java, C#, Python tags ... what is your opinion of those?
they have to be updated regularly in this format to be kept up to date, because of all the versioning info
 
It has long ago been decided we need language tags. Honestly, there's too much information in some of them.
 
@Mast Perhaps a simple description, tag guidance and wiki link would suffice
to have minimal maintenance and best advise for usage
 
Better than the clutter I encounter in some of the tags, yea.
 
@Mast Added another nail to the coffin.
 
6:49 PM
@pacmaninbw make that 3
 
@dfhwze one more to go
 
7:04 PM
RBA
 
This should be posted on code review site. — michalk 51 secs ago
 
how's the zombie count doing?
 
@dfhwze Duga will tell us in a couple of hours.
 
@michalk Absolutely not. Please take a look at their help center first. — Mast 22 secs ago
 
7:21 PM
0
Q: Codewars - Highest Scoring Word

King ColdHere is my solution for CodeWars - Highest Scoring Game Given a string of words, you need to find the highest scoring word. Each letter of a word scores points according to its position in the alphabet: a = 1, b = 2, c = 3 etc. You need to return the highest scoring word as a string...

 
possible answer invalidation by Ananthhokage on question by Ananthhokage: codereview.stackexchange.com/posts/226979/revisions
 
@dfhwze pretty close to 10% unanswered - just above by a hair
March 11 we got close but yesterdays stat was lower
just over a year ago (i.e. Aug 17 '18 ) we had 89.9821% answered
so yesterday's stat was the highest since Aug 19 '18
we had 90+% answered from May 27 '18 - Jun 10 '18
 
7:40 PM
Just an FYI that stopped collecting data
 
8:00 PM
0
Q: Generic wrapper for single value or array of values

JoeliusI'm writing a chart.js port for c# blazor (you can find it here). In chart.js there is this thing called indexable options. It let's you use either a single value or an array and handles it accordingly. Because I want the port to be as type-safe as possible, I implemented a wrapper which allows y...

0
Q: Any ideas how to make this more efficient?

FluxedScriptSo I have been working on something and I know its inefficient and I am unsure how to reduce the if count and keeping a cyclomatic complexity below 15. I need to add 8 more jobs but I can't add anymore. How can I reduce the if count? What else have I done wrong? The code I have been working o...

 
@michalk This is about general best practices, the program provided is hypothetical. Please note how that's explicitly off-topic. There's also the Don't Ask page. — Mast 37 secs ago
 
8:51 PM
If your question is whether this is idiomatic, I would not self answer. If the first works, Code Review may be a better place to get advise on how to write more idiomatic code. — jpmc26 17 secs ago
 
0
Q: Alternate solution - what counts as an insightful observation?

PeilonrayzOne of our latest HNQ's has drawn the attention of alternate solutions. Soon after the question was posted I answered it with an alternate solution, and got quite a few upvotes. My first version looked like this, it has 0 downvotes: The best solution is to use str.join(), using ', ' as the...

 
9:27 PM
You can able to create it even though it takes lot of time ? No memory error right ? it looks like its more related to codereview platform than stackoverflow. consider posting it in codereview.stackexchange.comajayramesh just now
 
9:39 PM
0
Q: Single Linked List in Python

EmmaI'm following a tutorial on Single Linked List (SLL). There are so many methods in the code, if you had time please feel free to review any part of it and I can work on it and repost it. I'm especially interested in object-oriented, algorithms, design, logic, exception handling, and other pro...

 
9:59 PM
-1
Q: Pytorch Implementation of NN stuck on a loss value irrespective of parameters

m1cro1ceI am implementing a simple torch network on titanic dataset to predict the user id (as a multiclass classification problem) from the dataset. I am running the experiment just to check the functioning of the network. So to make the task easier for the network I am adding the user ids as a dummy fe...

 
10:10 PM
@CaptainObvious no
@CaptainObvious fruity comments :)
 
10:38 PM
0
Q: Multithreading to process requests and save results in python

inblankI was presented with a task to come up with a script that generates a CSV with POSTAL codes via bruteforce(I'm in Brazil, so that means CEP to us). Points to note: I'm using an external library, but basically consuming a SOAP service provided by the Postal agency; I have a list of cities I ha...

0
Q: Writing 1.5 million rows in a file

Subhadeep MajumderI am trying to write sql statements into a sql file to create 10,000 tables. Each table containing 5 columns with 1.5 million rows of data in each column text_file = open("D:\Output.sql", "a", encoding="utf-8") count = 0 for i in range(1,10001): a=[] b=[] x='Tab_'+str(i) a.appen...

 
10:52 PM
If I gave anecdotal evidence on how I messed up, and say "don't be an idiot like me" is that R&A?
 
0
Q: Ordering 2D Border Points

Bot WadeWhat i am trying to do I have an image of a polygon exemple: what i am tring to do is getting all border points, that do not have at least one neighbour with the same color, and ordering them in a way that later i can draw lines Working Exemple: The Code private Vector2F[] ReorderBorder(V...

0
Q: Need help refactoring conditional validation

Amandeep Pasrichathis is the piece of code I'd like to refactor. Basically, when the credit card option is selected, then do I want the credit card number, zip code, and Cvv inputs to be validated. validateForm=(e)=> { Array.from(inputElements).forEach(element=> { let value=element.value; let input=el...

 
11:57 PM
0
Q: C++ header file containing only functions

Christian PanovIn my project I have a header file which contains only functions which are put into a namespace, the purpose of these functions is to be used from another class of the framework I'm working on, or from client code. Does this code follow best practices? How can I efficiently just keep such data? ...

 

« first day (2308 days earlier)      last day (1716 days later) »