« first day (2697 days earlier)      last day (40 days later) » 

12:00 AM
RELOAD! There are 6998 unanswered questions (89.7651% answered)
 
12:49 AM
So are you having an issue with this? It sounds like you are looking for best practice/improvement of your code. if this is the case may I suggest looking at Code ReviewThe Grand J 29 secs ago
 
1
Q: I am looking for ways to decrease runtime and ram usage

Hackernoob666I am looking for ways to improve runtime and decrease ram usage. # updates list length (length3) is aprox 1728000, this whole code block is in a while true loop so I can pause the code and update it over time. while True: for u in range(1,1001): with open('update_storage.txt', "a") as...

 
 
3 hours later…
3:29 AM
The question that was suggested as off-topic should be moved to codereview.stackexchange.com, not closed as Opinion-based. — Michael Freidgeim 7 secs ago
 
3:49 AM
0
Q: Python Regex to validate an email

gssI have written this regex to validate an email. It seems to work fine. Can someone advise on the regex used? Does it work properly or can be done in a better way? '''pattern=r"^[A-Za-z]+[-_$.A-Za-z]*@[A-Za-z]*\.[A-Za-z]+$" x=re.search(pattern,"abc.xyz@gmail.com) print x Note: I have used x...

 
4:29 AM
Monking
 
4:39 AM
0
Q: Implementing a quiz application in C# (object-oriented)

tommy99I posted a recent question on code review detailing my previous C# object-oriented application which used animals as the main context. Although this example doesn't really include inheritance or anything similar, I did try and create something a little bit more interactive. Maybe, just maybe this...

 
5:04 AM
0
Q: im making a dynamically allocated array of structures called restaurant that has dynamically allocated arrays of floats and strings for reviews,

ugh leeim making a dynamically allocated array of structures called restaurant that has dynamically allocated arrays of floats and strings for reviews, but the code isn't reading my text file correctly and my compiler is creating a separate main file with question marks. I don't know what went wrong, al...

 
 
1 hour later…
6:17 AM
Monking
 
6:54 AM
@CaptainObvious Ironic how that's riddled with style violations.
 
7:37 AM
Woah, so much Async suffix displeasure here. Leaving it off any method triggers my OCD and makes me mark any code review as a fail. — Michael Randall 28 secs ago
 
7:57 AM
1
Q: Stock data REST API extractor with GCP storage options

bullseyeI'm currently working on an AI-driven trading system, the code below aims to extract ticker data from polygon REST API, this is a paid service so, in order to test the code you will need to subscribe / obtain a free API key with limited data history. You'll find base_extractor.py, polygon_extract...

0
Q: Displaying some multiples

cliegDisplaying Some Multiples Write a program to calculate the multiples of a given number. Have the user enter a number, and then use a for loop to display all the multiples of that number from 1 to 12. It is not necessary to use a function. You must use a for loop. /* * Code by Clint <https://gith...

 
8:18 AM
Probably this should be asked over at Code Review. — Filburt 10 secs ago
No I am not going to check your project. And as mentioned maybe you can post this at Code Review — Joakim Danielson 13 secs ago
 
8:30 AM
Apart from list questions being off-topic, this particular list is arbitrary and ignores many parts that are crucial for code review, concerned with the code being maintainable. You're only focusing on security, ignoring code quality. — CodeCaster 44 secs ago
Please be aware that on Code Review the code needs to be posted inside the question. — Heslacher 22 secs ago
 
8:47 AM
0
Q: Reactor pattern in modern C++. Please comment on coding improvements to be done

Vijayendar SridharanHopefully this is a good question, I did read the link on how to ask questions and saw nothing against this. Requirements for this reactor are: The reactor possesses its own thread to wait for messages in an event loop. Users should be able to start or stop the reactor at any point. These two op...

0
Q: SQLite Entity Framework Core - Handling Lists and Dictionaries in Database

user13132545Context: I have a GameConsole model containing a list of valid inputs in the form of strings, as well as button and axes mappings to map the inputs to certain numerical button and axes values on a game controller. This data was originally stored in multiple text files, and I'm migrating it to a S...

 
9:12 AM
1
Q: Chaining list operations in Python

Ray ToalI assigned the following contrived problem in a comparative programming languages course to give students practice with "streaming": Write function that returns the top ten players by points-per-game among the players that have been in 15 games or more. The input to your function will be an obje...

 
9:32 AM
I’m voting to close this question because it belongs on code reviewMichael 52 secs ago
@Michael Don't use the existence of Code Review as a reason to close a question. From now on evaluate the question and use a reason like; needs focus, primarily opinion-based, etc. — Peilonrayz 8 secs ago
@Peilonrayz the question is not a good fit for StackOverflow, because it is not asking about a specific programming question and is explicitly opinion-based. However, it would be a very good fit on Code Review. — tucuxi 5 secs ago
@Peilonrayz I know Code Review's rules. — Michael 1 min ago
 
10:01 AM
0
Q: Bounded tasks with completion service

OFKI have the following implementation which does the following There are incoming download tasks and downloads need to be done concurrently. Each download task has its own following task and when a download ends, relative process starts. Download and Process classes are not of concern. Is this a go...

0
Q: Convert interface object to map in Go

MichaelI have this method(objectToFilteredMap) which converts an interface(struct for example) to a map, removes the fields that are NOT defined in "fieldNames" and outputs it as a json object. But I feel like I am using to many "for" loops. Is there a more efficient way to filter out the unneeded field...

 
10:26 AM
0
Q: Can this be more efficient?

Nad DebI've only been learning Java for two weeks, and I had to complete this task as part of my course. My instructor could not give specific feedback as answer file is already provided, the code works but I am just wondering what some of you might think of my code if it can be refined. It's a basic pi...

0
Q: I have solved a problem that is to find out whether a number is a palindrome or not. How can I simplify my solution?

Ashiful Islam PrinceHere is the solution-> //Write a program to check the number whether it is palindrome or not #include <stdio.h> int main(void){ //Put variables for the further proceed int number, quotient=1, remainder,i=0; //To declare a character array char text[100]; //To show the message to the user printf("...

 
10:40 AM
If you code is working, but you just want it to work faster, then your question belongs in Code Review instead - codereview.stackexchange.combraX 5 secs ago
 
 
2 hours later…
12:30 PM
0
Q: all appointment based on interval distance

Masoud RCurrently with a given Date and an Interval in Day, I can calculate all of the appointment in the future. for example if you are supposed to have an appointment each 30 day starting '2020-09-24', all the future appointments would be calculated like this. --Source Table Creation DROP TABLE IF EXIS...

 
If this is working code that you think can be improved, see Code Review. — jonrsharpe 24 secs ago
I’m voting to close this question because this belongs on codereview SE — Fildor 38 secs ago
@Fildor Don't use the existence of Code Review as a reason to close a question. From now on evaluate the question and use a reason like; needs focus, primarily opinion-based, etc. This question likely is off-topic on Code Review as the OP probably doesn't own the companies code. — Peilonrayz 39 secs ago
@Peilonrayz I didn't "use the existence of CR". This question fits CR "what can I ask" but clearly is off-topic on SO. — Fildor 57 secs ago
@Fildor What are you on about, you literally said "I’m voting to close this question because this belongs on codereview SE". No, it's likely off-topic because of the authorship reason (legal, moral and practical reasons) on Code Review. — Peilonrayz 59 secs ago
@Fildor Ok, ignoring our opinions on the topicality of the question on CR. Please don't close and point to Code Review, close for another reason if it applies. — Peilonrayz 56 secs ago
 
1:24 PM
This seems more appropriate for codereview.stackexchange.comGallaecio 41 secs ago
 
My first LQP edit, some people need to improve their knowledge of English idioms before using them.
@Mast Why would anyone use plain BASIC in this day and age?
 
1:44 PM
0
Q: how to filter selected with ID javascript

hikarii try this code but not work, i wanna show selected option with id because i wanna save value. <select class='filterElements' onchange="dusunFunction(this)"> <option>select country</option> <option value = '1'>Country 1</option> <option value = '2'>Country 2</option> </select> <select id="...

0
Q: how to get median value more fast

FabrizioUsing Excel, I'one sheet("db") with data extract from MES, I've to analize this data and I need: Articolo, Fase, Tipo Confezione, TURNO, Macchina, avg and median. I searc everywhere ho to get median whit sql but I found only how to get median for on item alone. Then I wrote this code, and I loop ...

 
Maybe this would be a better fit for the code review site? — UuDdLrLrSs 55 secs ago
 
@pacmaninbw Today? Not many people. But it's a fairly, ehm, basic language to start with.
But 10 years ago I still wrote programs in it.
Before I learned Python, it was my goto language.
Basic, VB, VBA...
Went through a bit of a Pascal period, but anything I can do in Pascal I can do better in Python.
 
2:02 PM
@Mast Anything I can do in Pascal I can do better in C, C++ or C#. I reserve VBA for when I need to make excel do something. At the university Pascal was my first language (programmed in an assembler when I was 10). Pascal was also the language I learned data structures in. Haven't used Pascal since I got my BS 35 years ago.
I've written in BASIC and Fortran (66 & 77) when I needed to, but that was also at the university, maintained a banner program using a plotter in Fortran.
Learned OOP in my senior year at the university using SIMULA, for a bank simulation.
 
Well, as we all know, Pascal was never intended to be used as a production language.
I think I used Turbo Pascal in the early nineties.
I'm not a fan of interpreted languages, not even the one that I have to use (JavaScript).
 
The only problem is It's too slow [...]. Maybe Code Review is a better place since your code is actually working? — Alex B. 5 secs ago
 
2:23 PM
I don't like interpreted languages for things that have to run a long time without interruption, but most things are simply much easier to do in something like Python than something like C++.
 
possible answer invalidation by hikari on question by hikari: codereview.stackexchange.com/posts/249621/revisions
 
@Duga @pacmaninbw Question is off-topic it's not AI
> i try this code but not work
 
Comment deleted, rollback rolled back, VTC.
 
thanks ^^
 
Down voted answer.
 
2:33 PM
0
Q: Organizing and accessing data in xml database - VB.Net

Anes HamdaniSo I made an XML database for my music player where I store songs data (title,artist,album,genre,year) the code for generating the database is working but slow as heck, the code works as following diagram. |Aritsts Dat...

 
2:50 PM
Yay, finally got my priority tree to work. Seeing it in action is nice after all that grief I had with it. Set up a master/slave situation to CYA. My slave code is normally quick and dirty, so it's nice to see that I didn't lose the tree when it broke yet again.
 
3:23 PM
0
Q: Java Singly-linked List: how to be efficient and clean

Jen Weatherwaxthis is my first time on StackExchange. I am new to writing code. This is a singly-linked list I made in Java using generics with no sentinel nodes (i.e. no empty head and tail nodes). Looking for feedback on how to be more efficient, clean, and generally improve my code writing to include best ...

1
Q: 10 Kinds of People Open Kattis Problem Time Limit Exceeded C++

Filip Voss ÅkerströmI am trying to solve the open kattis problem '10 kinds of people' (https://open.kattis.com/problems/10kindsofpeople) using a best-first search algorithm and c++. The task is to find if there is a path between the start and end points on a map for a given set of problems. I initially tried using j...

 
3:48 PM
0
Q: Using datetime to obtain the time of the next lecture

N3buchadnezzarOften before the lecture starts, and occasionally in the break I like to display a timer with a countdown until the lectures starts/ resumes while playing some lofi-hip hop in the background. While the university students seems to enjoy this, I am ashamed of the code running the timer. So my lect...

 
Monking
 
4:29 PM
@Peilonrayz Does it do anything interesting?
 
@Mast It's scraping websites for me so I can do something that is frankly very boring. Because it's very abstract I can easily change it so I can integrate my review queue notifier into it and not get logged out every day :D Also may be able to get some interesting statistics about certain things, if you catch my drift
But currently not really :(
 
0
Q: Precise timing event dispatching in Java

spiI have coded a tool to produce precise timing events in Java. You set a value in BPM, and you receive events in your listener at the most precise timing it possibly can be with Java. It is basic. A thread, a loop, read the bpm value, invokes the listener (lambda), compute the time to sleep to mat...

 
@Peilonrayz I gave that a shot recently, getting some interesting statistics about things. Considering the things I was interested in are only shown when logged in, that added an extra barrier.
Good to know I'm not the only one that gave it a shot and you actually got somewhere.
 
4:48 PM
@Mast Yeah, nothing is shown when you're logged out. Once I've integrated the notifier I'm thinking of asking people for what data points they think make a *cough* *cough* and then we can hopefully resolve an issue because we're not saying "I have a hunch".
 
@Peilonrayz Sounds great, it would be great to have some actual data.
I have some ideas about time and accuracy.
 
@Mast Yeah that is certainly true. We can get quite a bit of data from the history but it's not complete, and I'd want to be able to show a months worth of full data and then extrapolate the data points.
 
5:15 PM
Questions asking for us to review your code are more suited to Code Review Stack ExchangeFluffyKitten 7 secs ago
 
5:27 PM
0
Q: Scraping websites for presence of particular words

Andris444444444444Im new to Python and Scrapy and Im trying to write a code that would find if a website contains a specific word in it. I need to scrapy many websites with different layouts so the search is a general one. I would appreciate if you could comment do you see a more efficient way on how to perform th...

 
6:16 PM
1
Q: Simple Pizza Ordering Application in Java

King ColdI was inspired by a previous post here that also wrote a pizza ordering application. This is the attempt I have made using OOP in mind as I thought that would be just the way to go. Here is Pizza.java import java.util.ArrayList; public class Pizza { private String size; private ArrayList<...

 
6:38 PM
@Peilonrayz Say I want to cross-examine 6 texts with each other and all are identifiably with an identifier in a dictionary (say, posts['3402234']). I'd better make a list of permutations and hit that list of permutations into the spam-checker we talked about, right?
Then I can use Counter to see how often each match occurs between the set.
 
0
Q: python3 framework feedback

Ax34I wrote a little framework for using sockets in python 3, now it's an alpha and it's not complete. The github link: https://github.com/ExAxee/gpcp-python The Trello link: https://trello.com/b/wzVH18Fd/gpcp I would love to have some feedback from someone that has more experience than me to impro...

0
Q: UI &amp; Global Controller to hide `div` element based on `selected` option?

LV98I have the following HTML + JavaScript code: <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> <div class="container mt-4"> <!...

 
@Mast What is the input and what is the desired output? Do you want to know the inner join of the 6 of them? If you pass in 6 do you want to check how close A and B are alone? I think I need a bit more info. I'm putting dinner on so I'll be back in like ~10-15 mins.
Inner join like you described yesterday with the sets.
 
@CaptainObvious AoC
posts['265169'] = '''<p>So if you're the one who is looking to build an online business or looking to do something online form home so you gonna need versatile ideology and definitely some gas to start a business to stay updated for new business ideas <a href="https://DOMAIN2.com/category/business/" rel="nofollow noreferrer">Click here</a></p>'''

posts['265355'] = '''<p>Technology has improved a lot in the last two decades and when we talk about technology vs technology than we are talking about the improvement in the process because there is no competitors of technology till date <a href=
@Peilonrayz ^ Input
Output is the matches between the posts. I currently do this A vs B and am experimenting with feeding the results of the first check into the next one (results vs C) ugly nesting, for experiments only).
And yes, 245596 & 239186 are exact duplicates. That's exactly what the tool is supposed to notice as well.
I think I should be using permutations.
Say perms = [('265169', '265355'), ('265169', '263444'), ('265355', '263444')] and feed those tuples into the get_matches instead.
It needs some additional filtering, but the basis isn't much harder than that, right? There might be a much simpler approach available though.
No rush :-)
 
6:57 PM
@Mast ty
Yeah if all you want to do is basically set_a & set_b then it seems Counter is probably the best bet. I don't recall if it has the & operator however so that may be a bit finicky.
@Mast Yeah that seems reasonable, may want to use itertools.permutations. Also check the top of the page to see if one of the other functions may be better.
I'm not really sure what your endgame is, but to get what you want you seem to be on the right track
 
I need to get my naming straight, I'm currently calling both a match and the matches in a match a match.
Basically, I have posts, reports and matches. Post A vs B gives a Report with Matches.
I want permutations of all Posts to create Reports with.
What would perhaps be more useful than just counting, is making an Overview of Matches sorted most-often-occurring first and behind each Match in which Reports they are.
Well, in which Posts, really.
Since if they're in 1 and found as a Match it will be in at least 2 Posts. But if it's in 4, I don't need to know the 8 Matches, just the 4 Posts.
 
@Mast After working with someone who put whitespace on the end of lines I've been pretty mad about it ever since. And ofc the first line I click on has whitespace at the end XD (Not intended as a critique just humorous.)
 
Oops.
Yea, missed one.
Normally I run my programs through a linter before putting them into production, but this one isn't ready for production either way.
 
@Mast The current repl doesn't seem like the best approach. If you were to call get_matches again I'd do it after joining the text together, not entirely sure how best to do it with recursive get_matches.
Actually I'm not sure counter would even work here.
 
Ryan Donovan on September 21, 2020
In a move that has significant implications for the tech industry, U.S.-based graphics chip maker Nvidia announced last week that it would purchase U.K.-based Arm Holdings from Japanese investment firm Softbank for $40 billion. For anyone programming for AI, data processing, or embedded systems, this could mean your data intensive applications will soon be running…
 
7:12 PM
I think the best approach is to write or use an ndiff program.
 
Where the n in ndiff is specialised in diffing multiple targets with one another?
 
Maybe I'm just being slow atm, but I'm not seeing a way
@Mast Yeah so SequenceMatche would be 2diff
 
I don't think recursion is a good idea here.
That works for smaller samples, but gets out of hand quickly I guess.
 
Actually I think I've got something. If you compare A to B and A to C, you want to get the subset of the ranges of both outputs. So if you get [0 - 10, 20 - 30] for A to B and [5 - 25] for A to C then you take the subset and get [5 - 10, 20 - 25]
But maybe if the data is different enough this doesn't matter
 
More experimentation is required.
 
7:26 PM
@Mast I'll write something after I've had my nom noms. May help may not, if you think about some tests of what output you'd expect then you can see if it's right for you.
 
Tricky.
I'll get on that, but won't be before tomorrow.
 
I'll just have the interface as get_matches(*args) and it'll output a list of strings like you have now.
Seems like quite the little challenge you've got yourself ;) That's cool I'll give it to you at some point for you to play with
 
Ideally it gives me a bunch of regexes, but that's bloody impossible as far as I know unless some brute-force gets involved. Maybe next year, lets fix this first :-)
I'll think of something.
 
7:42 PM
@Mast I'm somewhat confident in my programming ability. But not that confident XD I'm slowly learning what is and is not possible...
I think I'm fixated on graphs right now so I'm not sure if it's the right tool for the job. But I really think a graph to cluster similar posts together could work. If your data is not clustered then I'm not sure if your solution will work. If your data is clustered then you can use what you have now to help you see the common patterns. To determine the weight between the nodes you can use Gestalt Pattern Matching.
The thing I'd want most is a pattern, and I'm not sure how you'll easily see it with what you have now.
Or AI, but to me AI is some magic that you enter text and it spits out better than regex solutions. Probably not how it works ;)
 
0
Q: CSS Content Flex

XavierI would like to create a table where each column header contains a column name and a sort symbol. To do this, I'm using bootstrap. You can see my code below: .glyphicon-menu-down, .glyphicon-menu-up { display: block!important; font-size: 9px; } th { background-color: #0C69E8; } th { ...

 
8:16 PM
@Mast Just a quick something I whipped up, there may be (probably are) some bugs. repl.it/repls/TastyMistyrosePlan#main.py
 
8:42 PM
@Mast Yeah, at my office they're implementing whole production systems in Python, and it makes no sense.
 
1
Q: ray-tracing in one weekend implementation

user222866In the past I had followed the ray tracing in a weekend books using C++ because that was what the book used. However recently I started thinking about how hard it would be to implemented only using c and if I could do it. As a result I set a goal for implementing it using only c and I was able to...

1
Q: Using Cubature in python

MsTaisI am trying to calculate a seemingly simple integral. Here is the MMA code: In[1]:= rect[x_] = If[x <= 0.5, 1, 0]; In[2]:= N[Integrate[Integrate[rect[(x^2 + y^2)^.5], {x, 0, 100.}], {y, 0., 100.}]] Out[3]= 0.19635 However, when I do that with "cubature" package in Python, I cannot get anything...

 
@CaptainObvious @Mast @Peilonrayz I don't know enough about Python to know if this is broken code, I am skipping for the time being.
 
@pacmaninbw Sounds broken. I'll run it now
Apparently I need to install Cython
 
9:03 PM
OK, I'll check back later need to eat something.
 
I install Cython, it says it's not installed. Try to install from source source no works... I think I need a restart or something cause things seem broke
 
9:30 PM
possible answer invalidation by iSR5 on question by tommy99: codereview.stackexchange.com/posts/249602/revisions
 
@pacmaninbw Yeah looks broken, it works fine in that MMA thing
 
10:11 PM
@Duga Handled, IDK if AI but not an edit inline with site policy. The user was nice about it
 

« first day (2697 days earlier)      last day (40 days later) »