« first day (2579 days earlier)      last day (1435 days later) » 

12:00 AM
RELOAD! There are 6669 unanswered questions (89.9651% answered)
2
 
12:21 AM
0
Q: Spark Scala: SQL rlike vs Custom UDF

Wiki_91I've a scenario where 10K+ regular expressions are stored within a table along with various other columns and this needs to be joined against an incoming dataset. Initially I was using "spark sql rlike" method as below and it was able to hold the load until incoming record counts were less than 5...

 
 
2 hours later…
1:56 AM
Also the [Code Review](codereview.stackexchange.com) site may be better suited for this kind of question. There you'll find (again) Find all integers between m and n whose sum of squared divisors is itself a square. — Ivo Mori 9 secs ago
 
 
2 hours later…
4:49 AM
Ben Popper on May 26, 2020
The software industry has become a kinder, more welcoming place. Has it finally left a certain kind of leadership behind?
 
 
2 hours later…
6:20 AM
If your code is working fine and you just looking for better implementation you just ask this on codereview. — SMAKSS 50 secs ago
Well, you are correct, but this is only for a small java program to learn statement. If it is not useful at all why java don't delete it in the new version? But for code review we should use prepared statement to make it safer, and also should close the connection in the finally block. Just modified the answer to make it better. — marqueen 49 secs ago
 
6:57 AM
There's no point using emplace here. Emplace constructs the element in place by forwarding the arguments - because you're using pointers it makes no difference whether you use emplace or insert. I would just write your code first the way you understand and get it working. Then try to optimise it. You could submit you code for review here: codereview.stackexchange.comcastro 48 secs ago
 
7:08 AM
0
Q: Two player tic tac toe Python

ElbaselUsed classes to make this simple tic tac toe game. Any improvements? from itertools import chain class Field: def __init__(self, sequence): self.sequence = sequence self.rows = [[sequence[i] for i in range(j, j + 3)] for j in range(0, 9, 3)] self.columns = [[row[i...

 
7:31 AM
-1
Q: First Code, But I Feel It Is So Ugly , Can u Explain Why?

Neeraj SoniQuestion :- Why is this code so ugly ?? *This is my first code , it is working fine , but i feel it doesn't looks as standard code .. i am still studying java through youtube ,, as i have just completed two topics language fundamentals and operators and assignments in java. i have tried to creat...

 
8:19 AM
0
Q: Conway game of life implemented with C++/OpenCV

Long NguyenHere is an implementation of Conway's Game of Life. It is kind of a brute force but it works fine. I have a special question about the method cv::Mat render() const, which renders and returns a cv::Mat. Should I return a reference cv::Mat& render() const or allocate an object on the heap and retu...

 
8:43 AM
0
Q: First published Python module, how is my project/code structure?

Nick van H.So I've just finished my first Python module (and published on Github), with this little project I'd like to learn how to distribute my code so that other users can use it as a plug in for their own projects. Specifically I'm looking for feedback in the following direction: Is the interface to...

 
 
2 hours later…
11:06 AM
This likely belongs at codereview — mplungjan 14 secs ago
 
11:18 AM
@mplungjan Do you mean (codereview.stackexchange.com) ? — Lachman 16 secs ago
 
Today is a sad day.
I just heard the news
 
"What would be a better, less repetitive solution" - that is code review. "My function x returns y instead of z, I found this solution but it does not work as expected" is a Stackoverflow question — mplungjan 34 secs ago
 
11:54 AM
0
Q: Javascript: Mapping combinations of input and possible suffix arrays leads to repetitive if statements

LachmanI am writing a program to combine the basic form of a word with suffix arrays following the choices from a form group (Angular 9) to receive the declination. This is the flow: The user inputs a word. The user chooses the predefined grammar categories of the word (genus, class, animacy and othe...

 
12:09 PM
This question appears to be off-topic because it is a code review request. This might be better suited to the Code Review Stack Exchange site. Before posting there be sure to read their FAQ to ensure that your question meets their guidelines. — John Conde just now
"Is it possible...?" - Yes (but code reviews are more suitable for codereview.stackexchange.com). A first start would be to use a .addEventListener() and thisAndreas 10 secs ago
 
12:42 PM
0
Q: React: Live DOM element position/dimension resolver hook optimization

OguntoyeI implemented the following react hook to get live updates of an element's position and dimensions in the DOM: /** * @author devskope */ import { useCallback, useRef, useState } from 'react'; import { throttle } from '../limiters'; const useElementDimensions = () => { const [dimensions,...

 
@jackfora: Consider the question you're asking us... You've told us that the code works and there's nothing wrong with it, but are asking us what's wrong with it. That's fundamentally unanswerable. If you're just looking for feedback on working code then you might try codereview.stackexchange.com If there's an actual problem you need help solving then you're going to have to describe what indication of a problem you're observing. — David 5 secs ago
 
1:06 PM
0
Q: Learning javascript by developing a simple game. Need to convert it to Object Oriented Design

Lazycoder_007I am learning javascript and have developed a car game using : HTML Canvas javascript The repository link is : https://github.com/lazycoder-007/car_race_html_javascript_game The code is given below : This is the GameArea object, with functions related to load, start and stop the game. v...

0
Q: Getting data from database through Ajax post request

Riccardo PeregoI am wondering if the method I am using to get data from a database is efficient and optimal. I have my data in phpmyadmin database, and in my server I have a php file with the following code to return some information: if($_POST["method"] == "requestBusinessFood") { requestBusinessFood(); }...

0
Q: Download statements from Yahoo Finance

MisterButterThis is a Yahoo Finance wrapper to get income/balance statement for a stock ticker. What I have tried to do is make an abstract implementation so more features can be added easily in the future. The base-class YahooFin contains methods to get and beat the data into shape so it easily can be put i...

 
possible answer invalidation by Alter Lagos on question by reggaeguitar: codereview.stackexchange.com/posts/242807/revisions
 
1:27 PM
@Duga Fine.
 
What you are asking for is a code review and you should be asking such questions on the Code Review Stack Exchange Please delete this and ask over there. What topics can I ask about here?Rob 18 secs ago
 
0
Q: DnD-like Fight (Single Round)

Martin FrankLet's Fight: one Entity can perform an attack (thus making him an attacker) on another Entity (defender). This follows some Rules, described within the AttackProcedure.performAttack(). The FightRules describe, what Chances one Entity has to succeed (or not) and what Damage will results from an a...

0
Q: Is it possible to simplify the following Javascript code but keep the same functionality

Delroy BrownI have written the following Javascript code which increments and decrements 3 separate inputs by 1: JS CODE //INCREMENTS/DECREMENTS BEDROOMS BY 1 function plusOneBedrooms() { var addRoom = document.getElementById('rooms_amount_bedroom'); value = parseInt(addRoom.getAttribute('value'),...

0
Q: Web Scrapping Newspapers

Varchasv ShriWrote a python script to web scrap multiple newspapers and arrange them in their respective directories. I have completed the course Using Python to access web data on coursera and I tried to implement what I learnt by a mini project. I am sure there would be multiple improvements to this script ...

 
1:52 PM
@SimonForsberg She let me know they're probably doing services late summer / fall due to COVID.
 
@DerKommissar Ok, thanks.
 
I'm assuming you don't want to fly in, but I am going to see if they or I can record or stream services.
 
@DerKommissar It's quite unlikely that I will fly in, but I'm not ruling it out. Recording or streaming would be appreciated either way.
 
Well if you want to fly in, if you let me know I can meet you at the airport if you would like.
 
2:27 PM
didn't downvote, but the question seems more suited to codereview.stackexchange.com maybe you could use something like pyparsing e.g. stackoverflow.com/a/1350314/1358308 you say you want to "optimize" your code, but with respect to what? do you want the fastest / shortest / easiest to maintain / easy to understand for a beginner — Sam Mason 33 secs ago
 
@DerKommissar If I fly in, I'd very much appreciate that. Let me know when you know the date and we'll see.
 
@SimonForsberg Will do, she's going to keep me in the loop. It's only 5 or so hours from my house, if you fly into DTW it's about an hour 15 minutes for me to pop up, then we have to drive back down so it's about 6 and-a-half from there. If you fly into CVG or something in Cincinnati, OH I could pick you up on the way, but we can talk about that as things get closer.
 
Yup ^^
 
posted on May 26, 2020 by CommitStrip

 
2:43 PM
1
Q: BST implementation (MIT OCW Runway scheduling problem) + Unit Testing in Python3

cloudy_eclispseInspired by MIT OCW (6.006)'s lecture on BSTs, I implemented them with the slight tweak where an element has to satisfy the "k-minute check" before insertion. If its value is within k of any other existing value in the node, the node should not be inserted. k is a positive integer parameter prov...

 
Sara Chipps on May 26, 2020
We received a bunch of requests to share how we use our feedback framework on specific features. We got excited about this, and given that we just released Dark Mode (and “Ultra Dark Mode”), we thought this was a great opportunity to show how we arrived at our solution.
 
Kaz
3:00 PM
@DerKommissar :(
 
0
Q: 2 player CLI Tic-Tac-Toe game in python

ShreddedPumpkinThis is a fully functional code that i have just completed today. I just want to know how efficient is this. and how could i improve it or if theres any bugs that i have miss out. import os from AskUser import ask_user as As from random import randint #initialising the board class Board(): ...

0
Q: Is this tkinter code well-written?

ArySI've self-taught myself Python and have recently started learning tkinter. I made a simple stopwatch program and I wanted to know if the code is clean and written in a way that the code works efficiently. I would highly appreciate any suggestions on how to improve my code! Thank you! from tkinte...

 
@Kaz Yep.
 
Hey there
 
3:53 PM
thanks for the update @DerKommissar
I'd consider flying in, but COVID is going to make it much harder for that to happen
 
The services will be late this year, so there is still time.
 
0
Q: Basic tic-tac-toe matrix in Haskell

GustBeginner functional programmer... (but not beginner programmer) Currently, I have the following code: import Control.Monad (mapM_) main = gridMaker 3 gridMaker :: Int -> IO () {-Creates a nxn matrix filling the lower triangle with "O"'s and filling the rest with "X"s Example: O --- X --...

 
Certainly, Ireland is expected to still be in lockdown until August
Assuming zero delays
So we'll see
 
Yeah I don't think things will be before then. She suggested late August or sometime in September or October.
 
sept/oct look more feasible
if I can be there, I will
 
3:59 PM
That's what I'm hoping for, but I don't have any further info yet.
I think she intends to do something in KY, his family is from Canada though so I'm not sure how that is all going to play out. Just going by ear so far.
 
Monking
 
4:22 PM
Welcome back @Dan
Haven't seen you in a while.
 
By the way, check out CodeReview Stack Exchange - your question is bang on for the site. — cbr 51 secs ago
 
If it's done in Canada, I'm probably near his family so I could go to that one
 
yeah I came when I heard the news @Mast
 
5:16 PM
@DanPantry Are you working from home?
What color is your hair now?
 
@pacmaninbw blonde and brown :) Yes, I started to work from home on March 13th and will be until at least August 18th
Slow replies - I am cooking
 
how can you cook at a time like this???
 
codereview.stackexchange.com is probably a better place for this type of question. — matt 30 secs ago
 
5:35 PM
@SᴀᴍOnᴇᴌᴀ mumble timezones mumble
 
I'm kidding... I used to say that years ago in an attempt to be dramatic
are you wearing a balaclava in that photo?
maybe it is more of a "scarf" since it doesn't cover the top of the head
 
it's a neck gaiter. you need to wear some kind of face covering
when going outside*
I was just about to go out :)
 
The only gaiters I know are for near your shins.
 
possible answer invalidation by cloudy_eclispse on question by cloudy_eclispse: codereview.stackexchange.com/posts/242953/revisions
 
Not sure how we'd call something like that in Dutch.
 
@Duga shrug
 
seared pork chop in paprika and cumin with bok choi and apple served with rice
 
nice
 
@Duga it appears OP just added directory structure and other info about why sys.path.append(os.path.abspath('..')) #this was a workaround I found to avoid ModuleNotFoundErrors, but now I need to mandatorily run tests from ../ was added to code
I presume rn is an abbreviation for right now
 
@SᴀᴍOnᴇᴌᴀ Wow, the kerning on that is terrible looks like an m
 
5:46 PM
@DanPantry Sounds good enough to eat, not quite lunch time in Los Angeles.
 
Yeah, I know, I'm annoying all of my LA coworkers because lots of them are hungry but they aren't eating yet
 
@DanPantry Not the weirdest I've seen lately.
 
@Mast perfect for sewing your own mask or wearing just like that as a provisional replacement for one
 
I saw some bizarre face coverings on peopleofwalmart.com last month...
 
By the way, Code Review Stack Exchange may be a better place to post this :) — cbr 49 secs ago
 
5:52 PM
that is incredible, Mast
though I think I'm past the age where it's appropriate to wear that
 
Normally I'd say that's inappropriate at any age, but who knows what's appropriate in a pandemic.
 
is there a maximum age for wearing pool noodles?
2
 
 
low tech force-field
 
-1
Q: Output is showing "None" at the end

DanI am trying to do the following problem from the online book/website, Think Python (page 29 of the document, page 51 of the PDF): Python provides a built-in function called len that returns the length of a string, so the value of len('allen') is 5. Write a function named right_justify tha...

 
6:17 PM
@DanPantry A friend of mine made me a mask: pbs.twimg.com/profile_images/1257861667225993216/…
 
 
2 hours later…
7:52 PM
I’m voting to close this question because it's a question about improving working code. The site for that is codereview.stackexchange.comRaymond Chen 15 secs ago
@jms - Have you ever submitted anything to Code Review? Since this code actually seems to work, and you are just not sure of its correctness, there are code reviewers that will go through it for you there. Maybe get a better response. — ryyker 5 secs ago
 
8:16 PM
0
Q: String data manipulated given CSV variables

amalgamateThe Requirements: List the expensable items sorted by date and location given two variables: 'categories' and 'expenses'. The Categories variable provides the following information in order: Category ID, Category Name, and whether the category is expensable (Y/N). The Expenses variable provides...

 
8:40 PM
-1
Q: How to implement a CRC-10 Algorithm

jmsI posted this over at stackoverflow originally but was pointed over here. So, I'm trying to implement a 10-bit CRC with a polynomial of 0x633. I've scoured through countless pages but not much is written on CRC-10. I've written some sample code that seems to calculate it just fine. I can run so...

0
Q: Registration code

user13477176Hello everyone I was following a tutorial for a social network. I want to know how secure this code is because I plan on launching it to the public web. <?php error_reporting(E_ALL); ini_set('display_errors', 1); // declaring vars to prevent errors $fname = ""; //First name $lname = ""; //Las...

 
8:57 PM
@ryyker The code doesn't work. "The problem is that we're testing it against this calculator and getting incongruent results". It's likely getting closed at Code Review. — Mast just now
 
@Duga That's the CRC-10 post 2 higher in chat.
 
@Duga I'm optimistic we can wrap this up soon and stop having to deal with so many posts like that...
 
9:29 PM
0
Q: Is this a topological sort?

Serghey HmeliI am trying to implement topological sort. Idea is that I have vector of pairs in which first element is indegree and second linked list. I tried a bunch of tests, they seem to work, but I am not really sure about my implementation. Can you please review my code and give some advices? class Gra...

 
@CaptainObvious I see this one as off-topic because the author can't identify if his algorithm is a topological sort or not, does anyone agree?
 
@Mast - It seems there is more to it than that. OP has stated the root cause for the incongruity is not known, i.e. is it because one is bit-by-bit and the other using byte-by-byte. I have had code reviewed that I felt was working but developers on that site were able to show me much improved methods/techniques that. In any case, thanks for the heads up. — ryyker 57 secs ago
@RaymondChen If the author doesn't know if it is a topological sort or not, then it is not ready for a code review. — pacmaninbw 53 secs ago
 
9:47 PM
@CaptainObvious One more to close it.
 
@pacmaninbw Roland appears to have a similar thought:
Since topological sort is a well-known topic, you should try your code with the standard test cases that other people have already thought out. After that test has succeeded, you can remove the question mark from the title, then your code is ready for review. Right now it is off-topic because "the author is reasonable sure that the code works" does not apply. — Roland Illig 5 mins ago
Roland also left this comment before that:
Undeclared identifier: stack. Please post your actual, complete, compilable code. — Roland Illig 9 mins ago
 
Thanks Sam.
 
SO seems to be dumping a lot of bad code on us today.
 
10:05 PM
yes, better delete and ask this question on specialized site for code reviews. I would suggest also add few details about your Result type — Sergey Berezovskiy 56 secs ago
 
10:19 PM
-1
Q: Best practice when handling conditions and results within classes?

t.karalisThe method below needs to perform a set of operations in order to achieve a result. Neither the operations nor the result are relevant to the question. As you can see some smaller simpler operations have been split out into smaller private methods. I have left out the params and details for simpl...

 
 
1 hour later…
11:32 PM
0
Q: List with object and index filtering out the object depends upon the index present at list

user3789184I have a following list which indicates the indexes. List<Integer> integerList = Arrays.asList(1, 3, 5, 6); // index I have the following collection of objects. Collection<Test> testCollection = new ArrayList<>(); Test test01 = new Test(0, "A"); // 0 Test test02 = new Test(1, "B"); // 1 Tes...

 

« first day (2579 days earlier)      last day (1435 days later) »