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

12:00 AM
RELOAD! There are 5862 unanswered questions (89.8173% answered)
 
12:11 AM
0
Q: performance issues increase with each new object

KeizzerweissSo my code works as intended, but suffers major performance issues every time I add a new object to the screen. The speed of my objects basically gets cut in half. All you have to do to observe this is run the code and hit spacebar to create a new object. it is suppose to represent a productio...

 
12:53 AM
If the code is correct, but just needs performance improvements, it should be on Code Review, not here. Note though that they require working, complete code. — Carcigenicate 43 secs ago
 
0
Q: Simple Matrix Library on C++

Afonso MatosToday I started learning C++ and at the end of the day have made a simple generic matrix class. I'm looking for feedback on techniques and features. It's still not complete, though. But everything works! I put some functions outside the class and inside a namespace because I was trouble defining...

0
Q: Comma Code, Automate the Boring Stuff with Python, Help Needed

E. Ad I have little experience with coding, and I have this problem solving the Comma Code problem in chapter 4 of the book. Instructions: Write a function that take a list value as an argument and returns a string with all the items separated by a command a space, with and inserted before the last ...

 
 
1 hour later…
2:18 AM
0
Q: Changing the text of a few elements

PerpetualJI have created a basic web page that contains a panel which displays some details about an object, and a panel which contains some tiles that are used to choose which object to view. The idea is straight-forward, and with plenty of C# experience, the learning curve was small. However, since I am ...

 
2:40 AM
This question is better suited for this siteNick Parsons 25 secs ago
possible answer invalidation by MadLax on question by MadLax: codereview.stackexchange.com/posts/212121/revisions
 
@Duga added a usage example
 
3:07 AM
0
Q: C# Create Dictionary unique identifiers key by `property.MetadataToken + property.Module.ModuleVersionId`

IT WeiHanMyLogic Use Expression + Compile + Cache Improve efficiency Cache property unique Key use property.MetadataToken + property.Module.ModuleVersionId lock add cache scope MyCode: public class Program { public static void Main() { var obj = new MyClass() { MyProperty = "Test" }; ...

 
I'm voting to close this question as off-topic because code that works and should be optimized makes a great question for Code Review. — Klaus D. 35 secs ago
 
3:39 AM
0
Q: How to eliminate for loops in Python?

Brandon MacLeodI'm writing a loss function for a linear classifier. The function takes in several arrays and outputs the loss. 's' is a score array which contains 10 entries that are the scores for each class. y is the array that contains the correct class assignments. My loss function takes the max of 0 and th...

 
3:55 AM
0
Q: Plots of prior and posterior distributions for a model

MichelleI have an exercise that ask to plot the prior and posterior distribution in the Poisson-Gamma model. I did it (I think it's correct) inspired in the answer of this question https://stats.stackexchange.com/questions/70661/how-does-the-beta-prior-affect-the-posterior-under-a-binomial-likelihood Is...

 
This type of question should be directed to: codereview.stackexchange.comPaul T. 55 secs ago
 
 
1 hour later…
5:01 AM
-1
Q: Python code for Krikwood-Buff Integrals

D.H.NI am writing a code for the Krikwood-Buff Integrals which has the formula as: https://i.stack.imgur.com/lMtie.png import os import numpy as np import matplotlib from matplotlib import pyplot as plt A = np.loadtxt ('abc.dat') B = open('1.dat','w') r = A[:,0] #r is the 1st column (ie., x-axis valu...

-2
Q: setText causing app to crash upon starting

CykapathI have built a small maze game in which you have to navigate to the end before the 10 second timer runs out. The timer works fine and restarts the game if you run out of time, however I have tried numerous methods to update the textview with the timer but all of them cause the app to crash upon s...

 
Monking
 
Please read this stackoverflow.com/help/how-to-ask. First of all stackoverflow is not for questions like ”why doesn’t my code work”, second: your code had a simple error that a read through would have caught and the solution will not help anyone but you, third: there is a stack exchange for code review codereview.stackexchange.com and lastly: even though you didn’t follow any of the community guidelines, you still got the help you wanted. Don’t be ungrateful — SimonF 52 secs ago
 
5:32 AM
-1
Q: Improving the API endpoints

RehanI have been developing an API for my product for the first time. I am bit confused whether the way I have designed the endpoints are correct or not. For example, I have a POST endpoint when updates a record when called and it is like so. /testRunResults/status/{projectID}/{testRunID}/{resultID}...

 
5:45 AM
I'm voting to close this question as off-topic because question belongs to codereview.stackexchange.comKiran Shahi 7 secs ago
 
 
2 hours later…
7:24 AM
0
Q: Random call efficiency

CodyIs it better to do Result = random(36) Dice1 = Result/6+1 Dice2 = Result%6+1 Or Dice1 = random(6)+1 Dice2 = random(6)+1 Would there be more bias on second option or first option

 
7:40 AM
0
Q: Laravel working with dynamic start and end dates to grab some data

HardistSo, to start off, the below code does work, but it feels like a newbie solution to me, and if I ever need to come back to this code, I will have no idea what I was thinking. I have a table called incomes with a model Income, and one of the columns is called description_id. If the description_id ...

 
@Kerry7777 For more idea about code refactoring and improvement, it might be a good idea to ask here. — Mukyuu 49 secs ago
 
8:10 AM
I'm voting to close this question as off-topic because this question belongs on codereview.stackexchange.comadiga 58 secs ago
 
8:28 AM
0
Q: Python 3: Pandas calculations per columns and per rows when for very big datasets

AdrianI am using a panda's dataframe and I am doing filtering and some calculations per column and per row. The dataframe looks this: 100 200 300 400 0 1 1 0 1 1 1 1 1 0 Each header of the dataframe represents a company ID (x) and the rows represent specific users (y)...

 
9:00 AM
0
Q: Avoid unchecked cast warning when actually checked

Mark JeronimusHow can I avoid the unchecked cast warning when using generics when IDE is too dumb to realize I actually checked it? Before I submit a feature request to IntelliJ (they really have the best inline static code analysis I've ever seen, but it's never enough) This is my current code: ((Collection<?

 
Monking
 
9:20 AM
possible answer invalidation by Roberto Carlos on question by Roberto Carlos: codereview.stackexchange.com/posts/212134/revisions
 
10:20 AM
0
Q: Using decorator design pattern to configure serilog sinks on the client

Dmitry SI'm writing a helper library that would be able the client to configure Serilog sinks to write logs into several sources. For example, in case of I need to write into console and to some source by tcp in Program.cs file of dot.net core web api I could configure it as follows: public class Progr...

 
10:36 AM
0
Q: Refactoring advice across multiple WCF Service with boilerplate error handling

d347hm4nI have several (12) WCF services which are structured like this: I have inherited a very large 10-year-old project, I've introduced some inheritance so that I can have 1 echo method where I can control the timeout and not have duplicate code everywhere. The PostalAddressFinderServiceService (Sh...

 
11:23 AM
0
Q: Developer Assignment - Family Tree

bszydI have an alternative solution for family tree that have been posted some time ago and please forgive the similarity of the task but when i tried to post alternative solution in someone else's post and asked for review I got deleted. Model the family tree such that: Input: Person=Alex Relat...

 
 
1 hour later…
12:27 PM
0
Q: Python - Count occurrence of a specific letter/character in txt file but not counting first line

A.FarI am in the second week of my first-ever python (and coding generally) class, and one of the assignments is to count the number of occurrences of a specific letter (variable is letter) from an external txt file that we created. When using file.read(), the output showed the entire text. However, w...

 
1:06 PM
This would be better suited for codereview.stackexchange.comTorben 35 secs ago
 
1:25 PM
If your code works then Code Review could be a better place for your question. — Opsse 45 secs ago
 
0
Q: Python process-subprocess communication

MontrealI have two processes. First (main) one is "dealing" with user stuff. Second one is doing some internal stuff and should update its internal state according to user actions. So I've created two pipes. By one I send actions to subprocess, from another I get messages that emits this subprocess. I w...

 
1:41 PM
@Opsse. The question (in bold) is why it's posted here and not on Code Review. The code is mainly to help understand the question. — svenema 52 secs ago
 
1
Q: How to avoid code duplication in forum system?

user10322178I have a function which does the following: When new Post Entity is added some fields in Category table are updated. When new Thread Entity is added the same fields in Category table are updated. Because of this, some lines are completely the same. public function postPersist(LifecycleEv...

 
2:20 PM
0
Q: Simple wrapper for PHP mysqli connection

Taekmin LeeI'm creating some web apis to sync some data between desktop/mobile apps. Working on it, I wrote a simple wrapper for mysqli connection to simplify querying like: // examples $connection = new MySQLiConnection(); $connection->execute("INSERT INTO songs VALUES ('God\'s Plan', 'Drake')"); $connec...

 
2:31 PM
posted on January 25, 2019 by CommitStrip

 
0
Q: Inter Thread communication between n thread

Akhilesh SinghThe following program takes 3 integer inputs(noOfThreadToBeCreate,fromNo,toNo) and print the Consecutive numbers based on the range using different threads e.g (Thread 1 - Print 1, Thread 2 - print 2, and so on ). I am new to the multi threading and implement this program as per my basic unders...

 
3:08 PM
1
Q: VBA code slowing workbook

BenI have a spreadsheet with five sheets all of which run the same VBA code; everything was good when it was on just the one sheet, but now its running on all five sheets Excel is extremely slow to load and the items take a while to update. I have a drop down menu in one column and if a user sel...

 
3:27 PM
I dont know about vba. But C# have some function for that. I made a question about it some time ago. codereview.stackexchange.com/questions/155253/…Juan Carlos Oropeza 23 secs ago
 
3:56 PM
0
Q: Cleaner way to synchronise data in C#

andreasWe use a third party dll which has an object called CServer and was provided by one of our software vendors to act as an API between our applications and their applications. CServer has the following method: bool SynchroniseData() which can be called if we want to fetch data from server which i...

 
4:22 PM
You may also want to ask at [database.SE] and/or Code ReviewAleks G just now
Hey! Welcome to StackOverflow! Please check this one: codereview.stackexchange.com/questions/134048/…Zooly 41 secs ago
 
0
Q: Optimised code to compute Huffman codes when implementing RFC 1951

George BarwoodI found a trick to significantly reduce the time needed to compute Huffman codes in my implementation of RFC1951. I was slightly surprised to find it slightly improves compression as well, something I had not anticipated. The trick is to encode the required information about a tree node in a ul...

 
4:39 PM
Monking
@Duga rolled back by @Ludisposed -thanks
 
 
1 hour later…
5:40 PM
0
Q: Good format to post code for review

Konrad VilterstenI have a project that I used to try out in-memory databases. After fighting it for a few days, I'm code blind and need to have it reviewed. Haven't been much on this particular site (I'm well acquainted with SO, though) so I thought better to ask than have this epic downvote and a bucketfull of l...

 
@Feeds wow @202_accepted - an upvote on your answer within 17 seconds...
 
0
Q: Leetcode Two Sum Code in Python

zthomas.ncHere's my solution for the Leet Code's Two Sum problem -- would love feedback on (1) code efficiency and (2) style/formatting. Thanks! Problem: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input wou...

0
Q: Efficient method to look for an instance of an object in a collection

ProgrockI'm trying to determine if an instance of an object exists within a collection. I'm using array_walk_recursive to walk and check the leaves of an array. I've added a small short circuit, but still all leaves will be iterated over. I could alternatively use something like an exception which is ...

 
@SᴀᴍOnᴇᴌᴀ Well @Mast commented, so likely either them or OP. ;)
 
@202_accepted apparently OP hasn't seen page within 29 minutes... according to meta profile
 
It was asked 22 minutes ago...lol
 
5:48 PM
@202_accepted Yup, that was me. I was writing an answer on it, but yours was faster and more to-the-point.
 
@Mast Hehehe ;)
 
@202_accepted yeah I've noticed a few time differences that don't seem to make sense lately
 
I actually searched for all of those questions while writing it -- none of those are bookmarked.
 
FGIW FTW!
 
I type literally all day, every day, so it's easy for me to FGITW things.
I don't know my WPM anymore but it's probably really high, 100+ I'd bet.
 
5:50 PM
Edited.
 
I almost feel like the point in #6 should be moved to the top, per the questions at the end of the OPs post...
 
@SᴀᴍOnᴇᴌᴀ Got a point there.
 
Feel free to reorder them as you like @SᴀᴍOnᴇᴌᴀ.
Good job, I also added the "As a note: our body limit is 2x the size of Stack Overflow, specifically to put all code in the question."
 
@202_accepted I saw that
 
Welp, would you look at us, collaborating like a proper community.
4
Stack Overflow, eat your heart out.
 
5:56 PM
0
Q: Why did this js Fizzbuzz question get so many more views than others?

Sᴀᴍ OnᴇᴌᴀWhy did this recent question: FizzBuzz in Javascript get so many views and presumably more votes? My initial theory was that it contains the tags fizzbuzz and possibly that tag combined with javascript, though I created a related question with those same tags (plus a couple others) and (at the ti...

2
 
Jamalized, by me.
2
 
@Feeds @202_accepted Jamalize that
 
6:12 PM
0
Q: Is it ok to post code that didn't work out as intended?

George BarwoodI recently tried to optimise some code by using parallel processing, putting two cores to work on the problem instead of one. For whatever reason it didn't work, I don't know why, but I doubt much can be done about the reason why it didn't work, on the other hand posting the failure might save s...

 
@SᴀᴍOnᴇᴌᴀ Done.
Took two swipes.
 
@202_accepted <requisite gif of the Emperor saying "Yes, Yes">
 
Monking
 
@SᴀᴍOnᴇᴌᴀ Not surprising. "Eventual Consistency."
 
6:19 PM
@rob in other words, last seen does not mean I have not seen you since I last saw you. It just means THAT was the last time I saw you. I might see you again in 2 minutes, too. — Jeff Atwood Nov 16 '10 at 2:26
⊙﹏⊙
apparently UPS started allowing customers to see the location of a delivery vehicle with their package(s)
 
@Feeds And bam. Jamalized by me, and answered.
@SᴀᴍOnᴇᴌᴀ Yeah that was like a month ago, maybe?
 
apparently it has been around since 2016
 
Oh wow
 
but I recently got links to it with updates via email
 
There's a UPS dispatch center around the block from my house, I wonder if I can see all the vehicles leaving it on there. ;)
 
6:29 PM
@SᴀᴍOnᴇᴌᴀ Some of the carriers around here do that too, but it's not common yet.
DPD does it, I think.
 
@202_accepted ಠ_ಠ I think you would need to either have access to their system (e.g. as an employee, hacker) or have a package on each vehicle...
 
One of the few good things that came out of France...
 
@SᴀᴍOnᴇᴌᴀ Or exploit something...
 
@SᴀᴍOnᴇᴌᴀ if I wasn't at work I might go down to the park where the vehicle with my package is and ask the driver what is happening...
 
6:51 PM
0
Q: Implement Recursive Insertion Sort in Python

AxelPhimanI'm a beginner to programming and I need help with my code. It isn't currently working and I can't see what's the error of my code. Thank you in advance. def Inserction_Sort(array): if len(array)>1: copy_array=array[:len(array)-1] Inserction_Sort(copy_array) key = array[len(arra...

 
7:02 PM
Monking
 
7:29 PM
@Mast this may be a can of worms but what else is on that list?
 
@SᴀᴍOnᴇᴌᴀ It's a short list.
 
@Mast would you consider any automobiles to be on that list?
 
But on it, among others, photography, cinema and the SI system.
@SᴀᴍOnᴇᴌᴀ No, those are on a different list.
If you want a good car, get a Toyota.
 
had one for 11 years - now have a Subaru
 
AFAICT from the mod timeline I'd guess that it was HNQ even before it was tweeted — Vogel612 ♦ 31 secs ago
CC @Mast @SᴀᴍOnᴇᴌᴀ
 
7:34 PM
@Vogel612 Makes sense.
 
@CaptainObvious Broken code.
 
Basically, any time you're wondering "why did this question do so well?", the answer is either 1. punny title and/or 2. HNQ
 
or both, yea
 
@Zeta Don't forget to comment.
2
You were still writing one, I presume?
 
@Mast Was going to, but didn't have the auto comment at hand.
 
7:36 PM
I have so many tabs open, it's bound to be open somewhere.
 
I usually close tabs immediately after I'm done with their contents
 
"freq<RET>" or "guide to<RET>" opens the important q&as either way.
 
I'm never done with those comments. There will always be new posts to put them on.
 
@Phrancis No TM/GM.
 
7:38 PM
@SᴀᴍOnᴇᴌᴀ Renault RS.01
 
@Phrancis I have that installed at work though.
 
@Mast do you not use the auto script?
 
@SᴀᴍOnᴇᴌᴀ Nope.
 
@Mast Or you wonder "why do I still get upvotes on an obscure C++ Pokedex review". o.O
 
7:40 PM
@SᴀᴍOnᴇᴌᴀ Oh that's cool, I forgot that existed!
 
yea... upvotes on 99 bottles of beer...
 
@SᴀᴍOnᴇᴌᴀ I have a 2015 Ford Fusion, works well enough. Next one will probably be something sportier.
 
@Phrancis yeah its pretty nice
 
Thanks santa?
 
@202_accepted my wife and I rented one and drove it from MA to OR in 2011, and my wife's uncle has one
 
7:44 PM
@SᴀᴍOnᴇᴌᴀ The 2014+ model is much better than the one you had, but still meh.
 
@SᴀᴍOnᴇᴌᴀ "202_accepted my wife" sounds like something you want to engrave on your wedding rings.
8
 
@202_accepted A Corolla?
 
@Mast No, the Ford Fusion.
 
@202_accepted No, sportier than the Fusion.
I linked to the wrong comment...
 
@Mast Oh, yeah I'm looking at Mustang / et. al.
 
7:46 PM
Fixed.
 
Something with more horsepower, most likely.
Haven't really decided. #meh
 
@Zeta shouldn't that be a 302?
or even a 301?
 
@Vogel612 lol
 
@Vogel612 Those are redirection, seems kinda inappropriate, no?
 
As long as you don't use 303...
 
7:48 PM
@202_accepted It would be, if you accepted his wife.
 
I thought that was the usual inside wedding rings. The name and possibly DOB of the spouse?
 
@Vogel612 Date of wedding, not birth.
 
I dunno, I guess I'm a pretty unauthoritive source: not married.
 
I am.
 
Or 410
 
7:49 PM
Death is quite permanent, so 301 is quite fitting I'd say.
 
Or... 418
 
@Zeta that's just an infinite recursion
 
@skiwi 410 is when the content is intentionally removed, isn't it? That would imply murder.
 
@Vogel612 That speeds the "till death do us part" definitely up.
411. lol
 
417 might work too.
 
7:52 PM
451 is downright dark in that context.
 
Yes, it is.
 
I don't think getting married is an error...
I think I would stick with 200, less shaky ground there.
 
I'd stay well away from status codes when getting married. Won't do you any good.
 
8:20 PM
What about 450?
 
possible answer invalidation by Michelle on question by Michelle: codereview.stackexchange.com/posts/212189/revisions
 
@Duga That looks breaking, but I'm not sure?
 
8:42 PM
How can I improve that? Hard to say. What work you are assigning and how you are assigning it to the threads has not been documented in the question. A Minimal, Complete, and Verifiable example would probably be very helpful in getting your point across. With a good code example you might be able to take advantage of Code Review.user4581301 55 secs ago
 
0
Q: Proper setup for testing a controller

Konrad VilterstenI have the following testing suite that I'd like to get criticized and suggested improvements to and weaknesses in. public class GameTesting { private Context Before { get; } private Context After { get; } public GameTesting() { string name = "test_db_" + new Random().Next(); Be...

 
9:08 PM
Please consider using Code Review Stack Exchange for questions regarding correctness of your code. — natiiix 43 secs ago
 
0
Q: Shuffle Deck of Cards in JavaScript

Lou BagelI know randomness in programming can be a deep topic, and searching the topic seems to result in Fisher-Yates being the best method, but I'm curious what people would say about this method. Basically, since I have the cards as objects, I just add a property of a random number then sort the entir...

 
9:47 PM
0
Q: game tournament service - core logic for matchmaking and results

Ali BordbarWe have a little tournament in our company between coworkers and I decided to write an application for managing games, results and rankings of players and teams. The base logic for application is quite simple: We have players. We have teams, which are formed from players We have game/s There ...

 
 
2 hours later…
11:30 PM
But this isn't Code Review.... — Barmar 16 secs ago
 
11:55 PM
0
Q: Arrays of hashes to hash

sekmoTask: convert this array of hashes: animals = [ {"cats" => 3}, {"dogs" => 5 } ] to this hash: { "cats" => 3, "dogs" => 5 } This is my solution, any feedback is appreciated :-) animals.reduce({}) {|m,e| e.each{|k,v| m[k] = v}; m }

 

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