« first day (2734 days earlier)      last day (1277 days later) » 

12:00 AM
RELOAD! There are 7080 unanswered questions (89.7314% answered)
 
@pacmaninbw hehe:
 
12:18 AM
0
Q: Inserting into Binary Search Tree

Jaan ChoudhriCould anyone help me with this? Whenever I try to insert a node into a binary search tree, I could an error. It's a contract violation in the second use case (< num (root-bst bst)). Here's my code: (define empty-bst? (lambda (bst) (null? bst))) (define empty-bst (lambda () '())) (define make-bst ...

 
@SᴀᴍOnᴇᴌᴀ And she may be a grandmother.
@SᴀᴍOnᴇᴌᴀ Are we talking about array counting here? ;)
@CaptainObvious Broken code.
 
 
2 hours later…
2:45 AM
1
Q: Football Management Program (AMERICAN) C++

Troy CoxI have recently finished my first real C++ program. It is text based, but hey, what d'ya expect out of a student? So, I would like person(s) to review the code I have written. It ain't short, but I wouldn't call it a "long" program either. I couldn't figure if I could attach a file or not, so I p...

 
3:17 AM
What is the actual problem here. This reads more like a code review. — Nkosi 10 secs ago
 
3:35 AM
1
Q: Using a linked list as an error type

Reginald MarrBackground I've been looking into a few different way to implement error reporting for an embedded system in C and there a couple things that I'd like to incorporate: A generic and extensible error type. Backward compatibility with OK and ERROR returns (i.e. can effectively return 0 or 1). Well ...

 
 
1 hour later…
5:04 AM
Monking
 
0
Q: Create a CSV from SQL Data and email as attachment using PHP

SurfboardI put together some functions that allows a PHP script to send the SQL data obtained from user inputs on a website via an email attachment as a CSV file. It works perfectly and I have no issues with the code. Alternatively with the right SQL query it would run every X amount of days with a cron j...

 
5:20 AM
Hi again, can you take a look here and tell me why when creating two instances of my class it makes some weird behaviour while chaning foucs — Cool Cloud 23 secs ago
 
5:54 AM
This kind of question is more suited for codereview.stackexchange.comKraylog 10 secs ago
 
 
2 hours later…
7:43 AM
Use code review process? Github, Gitlab, or in-house Gerrit or reviewboard perhaps — mvp 27 secs ago
 
7:56 AM
Please visit help center, take tour to see what and How to Ask. Do some research, search for related topics on SO; if you get stuck, post a minimal reproducible example of your attempt, noting input and expected output, preferably in a Stacksnippet - Your question might be better suited for the codereview site — mplungjan 33 secs ago
 
8:30 AM
0
Q: search a data from the text file in python

Fatima Jimenez SandovalI am making a program in which it consists of adding, modifying, searching and deleting a user, but I am doing it when I make a record, it saves it in a txt but now that I want to modify, search or delete a data, but what I want to do is search for what I have in my txt to look for a specific dat...

 
8:41 AM
Do you want me to review your code? If so, then I think that Code Review Stack Exchange may be more appropriate. If you have a problem with your code then edit your question and explain what the problem is. — Abra 54 secs ago
 
9:19 AM
0
Q: Optimazing binary algorithm

Aleksander IkleiwI am reading from bitstring import BitArray a = b'\x00\x01' b = BitArray(a).bin c = [x * 3 for x in b] The problem is with variable c. the a variable normally is very big, which makes the program run about few minutes. The goal is to make every binary number(which normally will be read from the ...

 
9:45 AM
0
Q: Mongodb collection query/aggregate locigal problem while elements duplicated

mynameiszsofiaI have a mongodb collection which looks like this: data = [ {number: 1, status: "ERROR", date: "2020-02-02"}, {number: 1, status: "OK", date: "2020-02-03"}, {number: 2, status: "ERROR", date: "2020-03-02"}, {number: 2, status: "OK", date: "2020-03-03"}, {number: 3, status: "OK", date: "2020-04-02"...

 
If the data is in memory, then no, this is probably the cleanest approach. If the code works, questions like Is there a better way are better asked on codereview.stackexchange.com try posting there — Chris Schaller 10 secs ago
 
10:23 AM
It looks like this is more suitable for Code Reviewburan 40 secs ago
 
10:59 AM
0
Q: Simple Sqlite-driven WinForms app in C# 7.0 - database interaction code

Al2110Description This is a simple "demo" app designed to help gain familiarity with interacting with an Sqlite database from C#, particularly storing images as blobs. The database has a single table, Contacts, represented by the following table creation SQL: CREATE TABLE "Contacts" ( "id" INTEG...

 
I didn't say your code is wrong. I assumed that since you are asking on Stack Overflow you don't know how to use transactions. Maybe you have not enabled mysqli error reporting. If the code works, but you are requesting review then you should ask at Code ReviewDharman 39 secs ago
 
11:33 AM
-1
Q: Forcing detail when none is needed

OverLordGoldDragonWhat more is expected of this question? It's not any less detailed than this one, nor is its answer any more thorough than this. It appears some users expect "more text" that only gives appearance of "more detail" but doesn't add any real substance to the question. The only difference in two link...

 
11:48 AM
0
Q: Correct way of doing transactional queries

user190457I am trying to do multiple queries in one call, so I organized my code as below: try{ $query = $this->conn->begin_transaction(); $query = $this->conn->prepare("INSERT INTO table1(xx, xxx, xxxx, xxxxx, xxxxxx, xxxxxxx, xxxxxxxx, xxxxxxxxx, xxxxxxxxxx, xxxxxxxxxxx, xxxxxxxxxxx) VALUES (?, ?, ?, ?,...

 
12:05 PM
Please read "How to create a minimal reproducible example". Then use the edit link to improve your question (do not add more information via comments). Otherwise we are not able to answer your question and help you. Sorry, just dropping such amounts of code on other people without any clear problem statement ... is most likely not going to work. This community helps you with solving problems, it is neither a free code review nor debug service. — GhostCat just now
 
12:46 PM
Premature optimization is the root of all evil. If this code match your perf requirements, than keep it. If not, go to codereview.stackexchange.com since your code is working. — Dorian Turba 25 secs ago
 
1:45 PM
This is a refactoring question not a question for copy paste code (and as such it should be asked in codereview, with additional context). One "solution" could be the decorator pattern, which would indeed be applicable in both languages. But yes, this question is flawed. — Sandro 1 min ago
 
2:41 PM
1
Q: Checking Object keys set with value against another Object keys

NeoveaI'm willing to check an an object's values in typescript, based on another object's keys. The mental model is "the key exists, it's not an object, is the value in obj set, otherwise, it's an object, iterate again". What would be your recommandations about this simple snippet : /** * Returns an a...

1
Q: Basic MDAS Java Swing Calculator

RazerMoonI have recently started learning Java and decided to make a basic MDAS calculator in Swing. I am not completely new to programming but I may be making some common mistakes, or not writing the most efficient code. I wanted to make a calculator that can take multiple numbers and operations before f...

 
I’m voting to close this question because it belongs on codereview.stackexchange.combtilly 38 secs ago
 
@Feeds Not really sure what the poster is seeking on CR. Does not look like they are trying to improve their coding skills.
 
3:11 PM
Prashanth Chandrasekar on October 28, 2020
Our CEO looks back on his first 12 months at Stack Overflow and shares his thoughts on what we’re planning for the future.
 
This might be better suited on CodeReview. Make sure to read their guidelines before posting. — Turamarth 27 secs ago
I’m voting to close this question because this belongs on codereview.stackexchange.comRandy Casburn 5 secs ago
 
3:30 PM
1
Q: Grading script in SCALA

Asjal AhmadThe prompt is as follows: This script will use a text menu to give the user options. The options will include the ability to add grades of different types as well as an option to print the current grades and average. Types of grades are tests, quizzes, and assignments. For the final average, the ...

0
Q: Python code for serving k customers with bounded time window

Mohammad Ali NematollahiAs I asked a question here, I want to write a python code for the following problem: A person provides a service and he/she can serve k clients each minute. Now, client number i comes at the beginning of minute a_{i} and waits w_{i} minutes to receive the service and if they don't receive the ser...

 
3:55 PM
0
Q: How Rusty is my generic union-find implementation?

naiveaiI decided to implement a DisjointSet<T> data structure myself in Rust, with no dependencies except for std, for the challenge and to get better at Rust. I wanted to have as few requirements for T as possible, especially not T: Copy. I also wanted to be able to easily iterate over subsets easily. ...

0
Q: DateTime range splitting algorithm

KonradI have the following algorithm which splits DateTime range into multiple ranges based on night time range. For example: Night start: 22:00, Night end: 06:00 Start time: 2020-10-26 21:00:00 End time: 2020-10-27 07:00:00 Expected output: 2020-10-26 21:00:00 - 2020-10-26 22:00:00 2020-10-26 22:00:0...

0
Q: Number of arithmetic means algorithm

Marcell Monteiro CruzI'm trying to improve my code, I'm certain that there's a better way of doing this, any help is appreciated The algorithm description is as follows: You are given an array A of N integers and an integer S. Your task is to compute how many ways one can choose a contiguous fragment of A that has an...

 
Zbaxvat
 
m0Nk!n@
@CaptainObvious OP wants to know if their code is right. ;)
 
@pacmaninbw is that your interpretation of the prompt?
> Are there perhaps more efficient ways to achieve the same goal?
 
Wrong question, is there another grading question?
 
4:09 PM
> My question: Is my code right? Can it become more efficient?
 
That one!
 
I'd suggest you add links to your comments, e.g. the How do I ask a good question? page... or use auto-comments
I'm surprised that page doesn't contain a link to the on-topic page within the main content - e.g. under the heading Be on-topic
 
@SᴀᴍOnᴇᴌᴀ thanks, I just joined a new community. I need to automate some of my comments.
 
4:28 PM
I'd like to have someone else look on a method of mine, but it's such a tiny thing that I doubt that it's worth a question. Should I still post it?
It's about a method, that does only 3 steps, and I'd like to know how to best approach it, but it's so tiny and beginnerish, that I really don't know if it's worth a question
 
@monamona Posting just a method isn't quite what code review is about, a method by itself is out of context and we can't help improve it without the context. Posting a whole class or program is better.
 
Ofc I'll provide the necessary context, but still, it's only about 5 lines xD
I'm going to post it, if necessary, I'll learn about it in the comments ^^
 
Sad because I can't use AutoReviewComments, I use FireFox and FireFox no longer supports the necessary technology due to security changes.
 
4:42 PM
Monking
 
0
Q: Is there a better way to preview the addition of a new element?

ControlAltDelI am to preview where a new element will be added on button click. I thought about just creating the element and showing that in the preview, but I have several buttons and some of the elements they create require input (via window.prompt) so I decided to just make a placeholder div and use that ...

 
@pacmaninbw interesting... the docs say you could use the [user script](moz-extension://115fa11e-38c2-48f7-b050-d680e5f974de/ask.html?aid=3d8a4d4c-125b-4bc0-9a53-7af59cc83e5e) with Grease Monkey (or tampermonkey)
hiya 🤦 ... apparently that URL wasn't acceptable for a markdown link
 
Any python gurus want to answer this question?
 
@pacmaninbw codereview.stackexchange.com/questions/251260/… Here it is, if you want to have a look at it. I hope the context provided is enough for it to be a valid question :)
 
5:02 PM
@monamona I'm a C/C++ programmer and optimization is always what I seek so I prefer to see whole classes rather than just methods. I'll let others decide if there is enough context to answer the question.
 
Welcome to SO! First, this is a code review and support site, so you'll need to include some code. Also, this question kinda sounds like you're asking us to just write the solution for you, which is not a good strategy. Please post your code and what you've tried to solve your problem. — Chiperific 23 secs ago
 
3
Q: Delete Entry from SQL-Table and confirm the deletion to a CommandSender in a spigot plugin

monamonaI'm working on a spigot plugin, that deals with messages to from players on a server to the admin's. It's the same plugin this question relates to: SQL structure to save coordinates for spigot plugin . I've got a command, which allowes access to the inbox, and does all kinds of operations on the ...

 
5:25 PM
@Duga If that's for me, I'm really sorry, but I don't know what more to include there ^^
 
@monamona No, that's not for you.
 
@monamona don't worry - Duga is a bot that notifies us when somebody mentions Code Review on StackOverflow
 
Duga rarely talks to users directly.
 
Ahhhh, okay xD I'm fairly new to the chatroom's, therefore pretty unexperienced ^^
 
You might be interested in the source code for Duga
 
5:28 PM
Don't worry :-)
 
5:58 PM
1
Q: A 'ThreadSafe' Observable Collection - C#

maxpSeeing as a concurrent collection does not exist in .net that allows specific items to be removed, I have put together the following class. It's important to note that it is only threadsafe until the LockTimeout on a given operation expires. The main goal was to to guard against cheeky 'InvalidOp...

 
6:39 PM
does anybody else think the updated Gmail logo looks like the N64 logo?
 
6:51 PM
Questions to the effect of "Is there a better way to write this?" are better suited to codereview.stackexchange.com. — Allan 10 secs ago
 
I think the updated Google logos make it impossible to tell what my notification is at a glance.
But that's what happens when you #PrioritizeConsistencyOverUsability.
 
7:12 PM
0
Q: python code optimization

Vivekanand JoshiI have written Python code which uses multiple if condition and a for loop. The main objective of code is to produce traffic light system based on certain condition. Red = -1 Yellow = 0 Green = 1 It takes 4 months (m0, m1, m2, m3) and dataframe as an input and run the condition through each rows...

 
7:38 PM
@SᴀᴍOnᴇᴌᴀ Vaguely
It's a disaster...
Should've gone gamecube style
 
7:58 PM
This seems to be a Code Review question in disguise: the code works, but you want it to be nicer. Asking about a particular candidate means of doing so (avoiding decltype) makes it a factual question that we can answer here, but also makes it of almost purely academic interest absent some substantive reason for choosing that approach. (In particular, you’d mind “seeing decltype in code” much less if it were done with the (imperfect) elegance that is possible.) — Davis Herring 1 min ago
 
 
1 hour later…
9:06 PM
"Is this a correctly implemented singly linked list?" Define "correct" here. If your code is functional (that is, works the way you expect with no errors), you might consider posting it on our sister site, CodeReview.SE, for feedback on what you can improve style/implementation-wise. — scohe001 25 secs ago
 
@Duga @pacmaninbw there's one that might come to CR that you might have fun with
> I know that using namespace std; is not optimal, but I figured it would be okay for this little example.
 
Voting to close because this belongs on codereview.stackexchange.comTed Lyngmo 59 secs ago
 
@SᴀᴍOnᴇᴌᴀ ;)
For some definitions of fun.
3
 
@TedLyngmo While this appears to be on-topic on CR, in the future, please don't use the existence of the Code Review site as a reason to close a question. Evaluate the request and use a reason like Needs more Focus (as I have done here), primarily opinion-based, etc. Please see Does being on-topic at another Stack Exchange site automatically make a question off-topic for Stack Overflow?. — Sᴀᴍ Onᴇᴌᴀ 30 secs ago
@Ted What I do when directing an asker to Code review is link to codereview.stackexchange.com/help/asking. Drop someone right on the help pages and they have no excuse not to read. — user4581301 16 secs ago
 
@Duga someone will think of something for an excuse - per the Infinite monkey theorem
hehe
Dec 10 '13 at 15:24, by rolfl
@SimonAndréForsberg - did you see that time me and my cousins got together and wrote shakespeare? ...
@CaptainObvious @pacmaninbw Football Management Program (AMERICAN) C++ went hot earlier today
 
9:25 PM
@SᴀᴍOnᴇᴌᴀ :)
@SᴀᴍOnᴇᴌᴀ It has an answer that is perfectly fine and the fairly new person that answered it needs their moment of glory without me butting in.
 
I could have answered it last night, but it already had an answer and I make mistakes starting aroung 5PM.
Or spelling mistakes earlier.
 
@NathanPierson Oh yes I see, you are right, this way it doesnt work when the list only has one Node. Thanks! Also thank yall for the advice to post this on Code review, I will in about 40mins ;) — Tom Gebel 53 secs ago
 
I passed 15000 yesterday.
 
9:31 PM
You're way ahead of me, but my spectacular day 2 days ago put me ahead of you for the year, you need to catch up.
 
@pacmaninbw I'm doing what I can...
 
We were neck and neck for a couple of weeks.
 
I've pushed some questions that I've answered up to being candidates for HNQ status and they often have gone hot, but it is tough to compete with other tags that have more readers
 
How does one push a question up for candidate for HNQ?
@DerKommissar Welcome.
Are you selling your good car so you can buy a beemer for racing?
 
1
Q: Vim plugin for easy window navigation

EnricoI've been thinking about it for a while and, after asking a question on vi.stackexchange, I decided to write a small plugin myself and put it on GitHub; basically it offers a mapping to activate a kind of "window movement" mode where Vim waits for inputs that it appends to Ctrl+w, so that one doe...

1
Q: How would I go about using a drop down list using a select query to update text fields based on selected option (php/mysql)

dgagnonExample: echo '<select>'; $mysqli = new mysqli( "localhost", "root", "user", "db" ); $con = $mysqli; if( $mysqli->connect_errno ) { die("Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error); } $username = $_SESSION['user']; $selectStatement = "SELECT id FROM pu...

 
9:41 PM
@pacmaninbw vote up question and existing other answers within first hours
 
Aha
Then I have unconsciously done this a few times since I believe in voting up the other answers.
 
@CaptainObvious CNWAI
 
9:53 PM
@SᴀᴍOnᴇᴌᴀ took your word for it.
 
@pacmaninbw its a gimme teh codez question
> I assume its a $_GET or $_POST issue. I'm not sure how to approach this. Please help.
 
@SᴀᴍOnᴇᴌᴀ We don't write your code for you.
 
exactly!
(unless it is a rewrite)
 
0
Q: Is this a correctly implemented singly linked list?

Tom Gebel(Someone told me this would fit better on this site than on Stack Overflow so I am reposting.) I tried to implement a singly linked list myself, sorry it is not commented but I think it should be pretty self-explanatory, if not feel free to comment. I know that using namespace std; is not optimal...

 
10:24 PM
Your code works, codereview might be a better platform for your question. Do read their how to ask before posting! — jibsteroos 50 secs ago
SO is not for optimize my code questions try for code review.. though just looking at just GetUserByEmail function, split it up Get (find), User (table), Email (column).. you could make a model like $db->find('user', 'email = ?', [$email]), which you may recognise as most ORM's or wrappers implement. — Lawrence Cherone 21 secs ago
 
10:52 PM
Agreed, this should be moved to codereview.stackexchange.comCharlie 6 secs ago
 
11:19 PM
0
Q: OOP: The correct use of classes and optimizing code

Chris LunaI am trying to improved my coding skills. I mainly work in web development. I had a "system" that I use in all my projects to fetch data from my DB to the browser. I tried an implementation of OOP, it works fine, but I dont think I did it correctly. How can I optimized this code to make full use ...

 
I'd flag it in a code review for using C-style cast. All your code does is checking whether the pointer is null. — Ulrich Eckhardt 11 secs ago
 
1
Q: Replace tag [parse.com] with [parse-platform]

ManuelThe tag [parse.com] should be replaced with [parse-platform] analogous to a similar renaming that was done on Stack Overflow. This tag request is part of the Parse Community's effort to maintain Parse Platform related tags on Stack Exchange, as described here.

 
11:50 PM
Write a linked list class to manage the links. To the linked list class add an insert method adds nodes to the list for you. Then all Integer needs to do is break up the int according to rules you have not given us and call the insert method with the chunks. Poke around on Stack Overflow and you will find thousands of questions about how to write a decent linked list. Code Review should be an excellent source as well as the linked lists there will have been picked over and corrected by experts. — user4581301 14 secs ago
 

« first day (2734 days earlier)      last day (1277 days later) »