« first day (2592 days earlier)      last day (1415 days later) » 

12:00 AM
RELOAD! There are 6714 unanswered questions (89.9283% answered)
 
12:50 AM
0
Q: alternative to requesting document from e-mail for mobile app

knot22I've written a mobile app that includes a page where the user taps a button to request a printable pattern. When the button is tapped the user's e-mail opens on the phone with prepopulated "To" and "Subject" fields. When the e-mail is received by the "To" address an automated response is sent b...

 
 
1 hour later…
1:59 AM
0
Q: C Hash table Implementation

Lev KnoblockI wrote a pretty simple hash table in C. It uses a prime modulus, linear probing, open addressing, and robin hood hashing. I'd like to optimize it for speed as much as possible, but I'm unsure of how to do so. I'd appreciate any feedback. typedef struct sftbl_bckt ftbucket; struct sftbl_bckt { ...

 
2:22 AM
1
Q: How to better organize the code for stock prices history SQL database with Python, Pandas and yfinance

guialmachadoWhat this code does: Creates a folder named Databases in C: path, lists two stock tickers (AMZN and GOOG),creates an sql .db file, iterates throgh the tickers and add their 1y history to the database called hist_prices inside a table called hist_prices_tickers. How can i organize my code for a...

0
Q: Battle City replica

FrakcoolI'm learning JS and Canvas, a friend of mine gave me the task to create a Battle City replica. I've already managed to make the map and the player to move. Nothing fancy just some squares. My code currently creates the map using 26 x 26 little squares, my player uses 2 x 2 which is not ideal, be...

 
 
1 hour later…
3:22 AM
@CaptainObvious The question doesn't show that the functions are defined in a header file, this needs to be reviewed.
 
 
1 hour later…
4:39 AM
0
Q: Convert list to dictionary with best performance

Amankhani MohammadJavadlist 2D how to convert to dictionary with best performance mylist = [[1,5],[4,6],[7,8]] var name_variable = mylist .ToDictionary(i => i.key, i => i.value); my code for convert list to dictionary. what is a better solution?

 
 
2 hours later…
6:09 AM
0
Q: Calculate Row Means

Patrick ThomasI have an Excel file that looks like this: Gene ID Number Replicate SA1 SA2 SA3 SB1 SB2 SB3 RA1 RA2 RA3 1.1 2.4 4.3 4.2 444 45.3 2222 444.3 333.1 I would like to calculate the row means for certain subsets of my data (SA1,SA2 and SA3 summed together to show the mean off all of the SA...

0
Q: Speeding up pandas apply

abhilash DasariI would like to speed up pandas apply function. I have been using swifter . It currently takes about 5 mins for 200000 records using multiprocessing as below . Is there any way to speed this up further . def partial_match(source_words, dest_words): matched_words = '' if any(word in dest...

0
Q: Adapter for RecyclerView with supported onClick handling and select color text on last clicked item

DestroyerI'm was written adapter for RecyclerView. It's adapter can handling click on item of RecyclerView and select color name TextView in last clicked item. That's by defoult first in first item TextView name are select color, after when user click in next item, In last item name TextView selected blac...

 
6:31 AM
Monking
 
6:57 AM
\o
 
possible answer invalidation by Serge Ve on question by Serge Ve: codereview.stackexchange.com/posts/243529/revisions
 
7:26 AM
If you have working code, the question is offtopic on SO, use codereview.stackexchange.com . async (done) => { is bad. You don't need done when you use promises, this is specific to Jest and not Redux. fetchAllPosts can be tested with github.com/axios/moxios . — Estus Flask 52 secs ago
 
7:44 AM
I am using Powered by Gerrit Code Review (2.16.15). — i_am_beginner 33 secs ago
 
8:03 AM
0
Q: Sum of all Paths in Binary Tree

Aashish PawarProblem For the given binary tree return the list which has sum of every paths in a tree. i.e Every path from root to leaf. I've written following solution. void check() { List<Integer> out = new ArrayList<>(); leafsum(root, 0, out); System.out.println(out); ...

 
8:50 AM
0
Q: Solving roots of negative numbers

LinnyAs part of an assignment for college summer classes, I was tasked with writing a program that solves roots of negative numbers. I've ran it through the test cases I was provided and it computes correctly. I'm looking for any feedback, especially about the determine_factors function, which really ...

 
9:05 AM
possible answer invalidation by Michiel uit het Broek on question by Michiel uit het Broek: codereview.stackexchange.com/posts/243432/revisions
 
9:18 AM
@RedBaron yeah, code review, i have to move it. — Matz Heri 6 secs ago
possible answer invalidation by Michiel uit het Broek on question by Michiel uit het Broek: codereview.stackexchange.com/posts/243432/revisions
 
0
Q: Cosmetic and performance code improvement

nopI'm using Binance.Net and I wanted to get historical candle data from start date to end date which is useful for backtesting. They don't really provide that functionality, so I have to do it myself. Their API allows me to specify startTime (start date) and endTime (end date) and limit (cannot exc...

 
10:05 AM
I think this would belong in codereview.stackexchange.com instead, but for one, your code is vulnerable to SQL injection attacks since you're not using correct parametrization. — AKX 41 secs ago
 
10:34 AM
Have you measured it to be too inefficient for what you're doing? If it takes five minutes and is run once per day, is there a problem? Either way, as said, if you want someone to take a look at your code and suggest improvements in general, post on Code Review.SO, not here. If you really want someone to take a look and suggest improvements, that's called consulting and it tends to cost money. — AKX 48 secs ago
 
0
Q: Suggestions on Python code to update/insert data in PRODUCTION system

LinuI need suggestions on improving this code, the code is working fine ,but i'm gonna deploy this to production system, so before that would like to ask the community for any improvements/suggestions. The script insert/update MySQL database using the data from PostgreSQL DB. I have tested with som...

 
10:53 AM
I think there is nothing wrong with your code above but as i said in the first comment you may divide your function into two parts. If you interested in developing your code you can visit here[codereview.stackexchange.com]Iron Hand Odin 19 secs ago
@IronHandOdin I am net to programming and these things like Stack Overflow and all. What is this codereview thing and how is it different from stack overflow? — Fiona Daniel 28 secs ago
 
Monking
 
0
Q: Complete function given string so each vowels printed on next line and after consonant should printed on new line in same order as appeared in string

MohitThe following code is in javascript. The Code runs perfectly fine, just finding a way to make it better. function vowelsAndConsonants(s) { let sp = s.split(""); let arr1 =[]; let arr2 =[]; for(let i=0;i<sp.length;i++) { if(sp[i]=='a'||sp[i]=='e'||sp[i]=='i'||sp[i]=='o'||sp[i]=='u'){ ...

 
Decent first answer by a new user.
@Duga Rolled back 2 revs.
@Duga That too.
> Complete function given string so each vowels printed on next line and after consonant should printed on new line in same order as appeared in string
Say what?
Something with putting things in the original order and newlines depending on vowels and consonants...
 
12:03 PM
@CaptainObvious Can someone give that a one over. Whilst I've improved it somewhat, it's still problematic. I don't really know what the OP is doing, so it's making rewording harder.
 
12:44 PM
Huh, my USB headphones kept crackling and DCing. Turns out if there's lots of dust in a USB port you may get some interference.🤦
 
I had a charger that was not working right, turned out my phone port had a boatload of dust in it.
 
Wow, you just made me add 1+1 together. My phone's charger has been playing up lately too...
 
possible answer invalidation by TVSuchty on question by TVSuchty: codereview.stackexchange.com/posts/243338/revisions
 
12:59 PM
Hehe I use a small sewing needle to clean it out.
 
1:12 PM
Not sure why y'all voted to close this question: codereview.stackexchange.com/q/243530/98493
 
@SᴀᴍOnᴇᴌᴀ I have had some issues with logging into certain sites, something to do with the built in security, I commonly have to turn off the shields on sites I trust.
 
0
Q: Rock, Paper, Scissors in C#

Ekrem GulcanFirst of all, I am very new to programming and also this site. This is a very simple "Rock, Paper, Scissors" game I made in C#. At first, it asks if I want to play the game. If my answer is yes, then I enter my name and the game starts. The program asks me to choose rock, paper or scissors, then...

 
@Graipher Ping @Mast @Peilonrayz
 
@DerKommissar Thanks, I knew I had forgotten something :D
 
@Graipher :)
Also I wasn't telling you to ping them, I was pinging them lol
 
1:19 PM
@DerKommissar I know, that's why I didn't edit the message / ping them myself afterwards
 
@CaptainObvious Poster has added header file, while there are no unit tests to show how the code is used I have retracted the VTC and feel the question is ready for review.
 
Ok cool. :) I didn't want you to think I was trying to be rude or anything lol
 
@DerKommissar Never crossed my mind...
 
1:39 PM
@DerKommissar @Graipher Human error. VTR applied.
Feel free to ping me anytime.
It must've looked too sketchy at first glance, but after careful reconsideration it can stay.
@Duga Why wasn't that rolled back?
Should've been a new question.
 
2:04 PM
@Graipher I VTC 15 hours ago, things can change. Like in edit 2
 
2:16 PM
@DerKommissar Damn, there was a nugget of dust in my phone too :O
 
Right? That's what I'm saying! Lol
Like, how does all that dust get in there?
 
It's called pocket lint, turn the pockets inside out before and after the wash.
 
That sounds plausible
 
2:49 PM
0
Q: Sudoku solver in C (backtracting, depth-first-search)

Ivan Shelomentseveveryone! I've recently finished implementing sudoku solver that uses backtracking technique in C as my first ever program in C. Does this looks like proper C-program? Any recommendations on improving this? #include <stdio.h> int valid(int[][9], int, int, int); int solve(int[][9]); int find_...

 
Ben Matthews on June 08, 2020
In a previous role, I was an engineering manager for a well-known company for a particular tech stack. One way we sorted through all the applications was requiring coding tests for potential candidates. One truly stood out, and it taught me to think about what I am really looking for in these sorts of submissions.
 
3:33 PM
Apparently blindman67 is taking a break for a while... :/ 16 points away from a gold badge in JS...
 
Monking
 
-1
Q: Python threading is working, but is working very weird

ZarovskySo i have a script that iterates through a list of urls and send them a request then grabs the tag. The script works perfectly withou threads, but when i added threading, it started to act very weird Here is my code: import os import requests from bs4 import BeautifulSoup import time, random f...

 
@SᴀᴍOnᴇᴌᴀ I've been looking at meta lately and I noticed that (and this is spelt wrong) Hosh (Dain Ironfoot) has deleted their account.
 
oh yeah - perhaps because of the SE changes
 
Possibly. SE lost many a good user cause of that nonsense
 
4:33 PM
@Peilonrayz Oh? That's a loss to the site. Was wondering if he'd come back, apparently not.
 
5:08 PM
He cited the thing around Monica as the straw that broke the camel's back
but he's contributing to Codidact from what I hear
 
@Mast Yeah, it is. :(
 
Monking
 
@Vogel612 I looked into that, but after two month with no code written it just seemed like it'd never start.
 
apparently they have multiple communities by now
dunno which ones switched over, though.
 
possible answer invalidation by Marius Popescu on question by Marius Popescu: codereview.stackexchange.com/posts/243268/revisions
 
5:15 PM
From what I recall they are on ArtOfCodes' ruby SE clone. But they're writing Condicate in C#
 
MOnking
 
0
Q: I am writing a small 3-tier mvc application. I am a beginner, and i would like to know what can i do better on it

Ristea StefanI have heard using other design patterns like factory, or observer, but i don't really see how to implement them in my application. Since i am a beginner, i am sure this needs improvements, but i don't really know how. Any help is welcome. Repository class internal class Repository<T> : IReposi...

 
If you're asking if making a complex, frequently used query into a view is bad practice, no, it's a very good practice. If you're asking about the query itself, this may be better for codereview.stackexchange.com. — Schwern 1 min ago
If the code is working correctly, then this question might fit better over at codereview.stackexchange.comTed Klein Bergman 11 secs ago
 
6:40 PM
0
Q: C++ Algorithm to implement multiple operators in one?

user225756Upon request I'm moving my question to the following forum. Please Note, The following code works as expected with no known bugs but I'm seeking help to improve its readability from your experience coding in C++. I have a class called IntMatrix which has 2 fields: Dimensions dimensions;//To sa...

0
Q: Raycasting python (pyagame)

KoliqaI want to share my raycasting source (the first engine:) ask and criticize! p.s I don't speak/write English very well (not my native language), but I tried to make the comments clear import math as m FOV, FOV_STEP, LENGHT_STEP, MAX_LENGHT = 1., .00375, .01, 50. prespeed = .08 # explained...

 
7:01 PM
@Peilonrayz Yea, that sums it up quite nicely.
 
@Mast I had reservations about "too many cooks spoil the broth" and how late-game all the 'discussions' were so I've kinda written it off. If they make something good on them, but I'm not holding out hope.
Can someone help me out with a name for something. I'm writing an answer about football statistics and one of the names is for (with the opponents being against) is there another word I can use instead of for, as it's a little problematic :( (It's a keyword in Python so things kinda blow up when I try to use it)
 
Code reviews are not a feature of Git directly, so there is no such command. This is built on top of Git by the Bitbucket service. But maybe they have an API for it. — mkrieger1 26 secs ago
 
7:44 PM
I’m voting to close this question because question about optimizing working code are more on topic for codereview.stackexchange.comTaplar 40 secs ago
 
0
Q: Connection to MySQL database in Java using try with resources

Pablo Aguirre de SouzaI'm following a 2017 tutorial on JavaFX and Database connection and the author doesn't use try with resources. I couldn't figure out how to create a connection using try with resources. I guess it comes down to lack of understanding of how try with resources work in regards to the availability of...

0
Q: Fetching all nodes of a directed graph by an id of any node

danilabagroffTask: Rowset of all reachable(in any direction) nodes from any node in a graph. In other words I need to extract all nodes of a particular graph from a table in the database where graph specified by an id of any one graph node. The final goal is a map in the app. Table structure of DocumentDepen...

 
8:01 PM
@Peilonrayz pro?
 
Doesn't that mean professional?
 
@Peilonrayz proponent - antonyms: "adversary, antagonist, opponent"
 
Thanks Sam :)
Damn, I can't read... "antonyms" not "synonyms"...
 
I was going to say... check out all those synonyms: "advocate, advocator, apostle, backer, booster, champion, espouser, exponent, expounder, friend, gospeler (or gospeller), herald, hierophant, high priest, paladin, promoter, protagonist, supporter, true believer, tub-thumper, white knight"
 
0
Q: Custom BibTeX Style File to Implement Patents in the ACS Style

Taylor ScottIntro I've been working to implement a modified version of the achemso.bst file from the American Chemical Society'sachemso package that properly implements patents as defined by the ACS Style Guide. This is the first time that I've worked in a meaningful way with BibTeX Style files and while ...

 
8:12 PM
"tub-thumper" makes me think of the album "Tubthumper" from the 90s
 
"protagonist, supporter" hmm, that's some odd synonyms you've got there. ;)
 
I blame Merriam and Webster
good ol' George and Chuck
 
What's "George and Chuck"?
@SᴀᴍOnᴇᴌᴀ Finds it on YouTube, "this content isn't available in your country". The irony isn't really funny...
 
Seeking improvements for working code is better suited to CodeReview. — Adrian Mole 33 secs ago
 
@Peilonrayz I doubt that is what I intended... I just took the first names from M-W - i.e. George M and Charles W.... and paired it with the knowledge that "Chuck" is often a nickname/alias for Charles
do a search online for "two buck chuck" or "three buck chuck" and the top results will likely include Charles Shaw wine
 
8:24 PM
Ah, that makes :)
 
Code reviews do not belong on stack overflow. Please wait for an answer on CR.SE. — Qix - MONICA WAS MISTREATED 13 secs ago
 
@Peilonrayz The inanimate versions of protagonist and antagonist, essentially?
 
-1
Q: Optimization using pulp python

arabinda MahapatraI have a data set upon which i wants to perform optimization.The output i am expecting to get is 10 items with 2 blue and 2 yellow items and other items can be taken random which in sum will maximize the value Constraints:1. Total of 10 items 2. That 10 items must contain 2 items each...

 
@Peilonrayz would it work to do homeTeam and awayTeam? or would the semantics be thrown off?
there's your daily double-ping :)
 
@Mast I not sure I follow 100%, but I think yes that.
 
8:36 PM
Allies Vs enemies.
 
@SᴀᴍOnᴇᴌᴀ Strangely they use home and away to mean something different to for and against.
 
Since it's sports, how about home team?
 
Even in Dutch it's Thuis versus Uit.
 
8:38 PM
For example they have "AwayCrossesAgainst" and "AwayCrossesFor" which mean very different things. And "Home..." of the same pattern.
 
That example doesn't make much sense yet.
 
It would be odd to have "AwayCrossesAway" :)
 
Definitely, what's up with the crosses anyway? What kind of sport teams are you working with?
In football, talking about the home team is quite standard.
Both football, rugby and soccer.
 
does it involve The Knights Who Say "Ni!"?
 
Eh, they have it in the form "{Away/Home}{Statistic}{For/Against}". I was trying to get something other than "for" as it's doesn't play ball with Python too well (cause I have to name everything for_)
It's also football, so statistics can be like crosses (I think that's a type of goal), goals, corners, etc
 
8:42 PM
could you use phor?
 
Home/Against looks fine here.
What do they put on scoreboards nowadays during games?
Home/Guests would be my guess
 
@SᴀᴍOnᴇᴌᴀ Is that like a ph == f thing? As much as I like butchering the English language with my own name, I'm not ready just yet to suggest that as an answer ;)
 
If it's about goals, it really is for and against.
It is what it is.
Goals for the team and goals against the team
 
Yeah, :/ I'm not a fan of any sports so I was hoping there could be a synonym. But :(
 
You could go Hungarian with gFor and gAgainst...
 
I'm sure this problem has been solved before but I'm on mobile so my google-fu is near 0.
 
Hmm, I prefer trailing _ as my 'goto way to fix my inability to name things'
Fortunately I can normally name things, otherwise I'd have names like dict__________
 
Lol
How about made Vs received?
 
:O
3
Yeah, that makes sense
 
Made Vs against even.
There are possibilities.
 
8:53 PM
Thanks @Mast, time to get rid of all those for_ ^^
 
You're welcome.
FGA is field goal attempts, FGM field goals made.
 
Wow, verifying FGM requires a few search terms... Yes they indeed do
 
@CaptainObvious hmm... there is currently 1 VTC as "Code not implemented or not working as intended"... I wonder why...
its a shame the downvoter didn't leave a comment...
 
@SᴀᴍOnᴇᴌᴀ "but i don't really see how to implement them"?
 
9:04 PM
Like taken out of context I hope you can see it. But not the close reason I'd pick. I don't know enough C# so I've left it be, but it smells a bit fishy
 
Hopefully I've removed any sources of confusion so no-one else VTC as broken. Now stopping UWYA I can't help with
 
thanks for your efforts
 
9:35 PM
If you have working code and are looking for a review then codereview.stackexchange.com may be a more appropriate place to ask. — Retired Ninja just now
 
9:51 PM
@smith Yes, you'll probably get less views on there but the people who see it are more likely to be invested in reviewing your code. Here you'll get more views, but most of the viewers aren't expecting to do a code review. Also, since this kind of question is off-topic here, it'll just create more work from administrators and QA-reviewer. Try to ask on-topic questions and refer to the link How to Ask if you're unsure. — Ted Klein Bergman just now
 
10:23 PM
@RMunroe lol
 
-1
Q: HackerRank Grading Students JS

crisestHere is my solution to Grading Students courtesy of HackerRank. It passes all the cases. Since I did not found a solution using map I wonder if there is a better implementation. const gradingStudents = (g) => { return g.map((grade) => { let nextMultiple = nextMultipleOfFive(grade) ...

 
 
1 hour later…
11:52 PM
Hi, this is not the best site to ask a review. You should try to post this question at code review exchangeThecave3 9 secs ago
I’m voting to close this question because it belongs on Code ReviewTrenton McKinney 48 secs ago
@Thecave3 Just so you know, you can generate that link using [codereview.se]: Code Review. — Carcigenicate 35 secs ago
 
@Duga a small flood there...
 

« first day (2592 days earlier)      last day (1415 days later) »