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

12:00 AM
RELOAD! There are 5829 unanswered questions (89.8550% answered)
 
 
4 hours later…
3:41 AM
0
Q: Avoiding if else statements and switch statements

user1907849Consider I have a cron expression as "* * */2 * " I have to extract the recurrence on days ,hours and minutes if it is not "" . I have the below function which works as well. public void CronDivision(string cron) { string days, value; string[] cronDiv = cron.split(' '); if(cronDiv[2] != "*") ...

 
3:55 AM
Thanks a lot for the answer! I have very little experience with cmake (used bazel most of my career and now buck). I would love to improve. Would you be able to give me some advice how I can improve my cmake? I posted an old version in codereview (codereview.stackexchange.com/questions/196243/…), which I think was even worse, but didn't get any comments. — gruszczy 46 secs ago
 
4:16 AM
0
Q: Logic error in hangman game, I need it to only add to the counter if its wrong but it adds twice if its wrong and once if its right

Georgia I don't know where its adding to the counter within the code but its screwing everything up because I have a method to add a specific body part according to the counter (1 = head, etc). If anyone could find the error or give me a different way of doing it I'd really appreciate it! //create new C...

 
5:11 AM
You should post an answer, or just delete the question. Either one is fine. For code critiques, post on codereview.stackexchange.com. — John Kugelman 1 min ago
 
6:06 AM
0
Q: Any way to reduce table.unpack reimplementation in Lua 5.3?

CeankoSince my Lua environment does not import table.unpack, I had to recreate its functionality. I spent the last 4 hours writing this function in order to reproduce its behavior on small tables. It works for my own code. Is there any way I could improve it? I think it's the fastest it can be. functi...

 
 
1 hour later…
7:09 AM
0
Q: Change Arithmetic Right Shift to Logical Right Shift

RJMThe following code is a solution to a textbook (Bryant&O'Hallaron: Computer Systems A programmer's Perspective 2nd Ed) problem in bit-level data manipulation (attempted for the challenge, not a class). The function srl is not written necessarily in a practical manner, but within the constraints ...

 
 
2 hours later…
9:38 AM
Welcome to StackOverflow! Be aware that questions about code improvement -- when the code is working -- are more suitable to be asked on CodeReview. — trincot 23 secs ago
 
10:33 AM
-1
Q: What is going on inside the while loop?

Piyush ###For this problem we need to find the savings rate which will be between ## 0 and 1 and that amount will be saved in the current savings in addition to ## return on investement annual_salary = float(input('Enter your annual salary: ')) #The portion of the monthly salary saved portion_s...

 
10:48 AM
-2
Q: RobotSimulation c# wpf project code cleaning and performance optimization

cc24After one year of learning coding by my own I just finished a little mowing robot simulation project. Because I have no one to show my code to (as already mentioned self taught) I'm uploading it here. I would be very happy to get some feedback to improve my skills and write cleaner and bette...

 
11:04 AM
-1
Q: Trigger minimize repetitions in MariaDB

ABOUMOUAYED NHow can I optimise this trigger? It works perfectly, but I think it can be improved with eliminate repetitions. CREATE TRIGGER `update_request_missions_after_insert` BEFORE INSERT ON `request_missions` FOR EACH ROW IF ((SELECT id FROM request_missions ORDER BY id DESC LIMIT 1)+1) > 0 AND ((SEL...

 
11:28 AM
0
Q: Please add the tag Red to codereview.stackexchange.com

Terrence Brannonred is already a tag at stackoverflow. Please add it here.

 
 
2 hours later…
1:08 PM
And Gerrit can not address that problem as well, cause it is yet another code review tool, may be it is awesome, but code review itself means that there is humans involved — BigGinDaHouse 37 secs ago
 
1:44 PM
Monking

 The Nth Monitor

Conversations that don't quite fit in The 2nd Monitor
Noo, someone forgot the anti-freeze
 
1:57 PM
0
Q: java.util.Set extension/implementation

Wojciech KarwackiLately, I was working on some experimental java.util.Set extension, IdSet: package idSet; import java.util.Collection; import java.util.Set; public interface IdSet<E extends Identifiable> extends Set<E> { boolean containsId(Object o); E getByElem(E e); E get(Object id); E r...

 
2:44 PM
0
Q: A header only class for C++ time measurement

shorty_pontonI wrote a header only class (actually there is a second one for data bookkeeping and dumping) to measure the execution time of a C++ scope without worrying too much about boilerplates. The idea being to be able to simply instantiate a class at the begining of the scope you want to measure, and do...

0
Q: Optimizing counting and nested lists for very large datasets

AdrianI want to know if there is something that I can do to speed it up. I tried eliminating as much as I can nested loops, but the problem I have makes it hard or impossible(in my opinion) to eliminate more loops. This metric counts how many times a base firm AND a peer firm have been searched through...

 
2:59 PM
0
Q: c# Maximum sum in circular array such that no two elements are adjacent

Giladhttps://www.geeksforgeeks.org/maximum-sum-in-circular-array-such-that-no-two-elements-are-adjacent/ Maximum sum in circular array such that no two elements are adjacent Given a circular array containing of positive integers value. The task is to find the maximum sum of a subsequence with the con...

 
3:15 PM
If this is in fact functioning the way you want it to, this may be better fit for code review as opposed to SO. — user2366842 41 secs ago
For questions about simplifing working code, you can ask on codereview.stackexchange.com/tourcricket_007 30 secs ago
 
3:46 PM
0
Q: SQL Server - can I replace those cursors with something else for better performance?

YuropoorIt was suggested to move this question here <- https://stackoverflow.com/questions/54277714/sql-server-can-i-replace-those-cursors-with-something-else This is SQL Server 2008r2 First, here are some tables and data for test: CREATE TABLE [dbo].[MyOrders] ( [ID] [int] NOT NULL, [ref_type...

 
4:41 PM
Sorry, mate. This is not a [codereview]site — Fantômas 31 secs ago
If you want feedback and improvement proposals for already working code ask at SE Code Review please. Though post your cod there, not links! — πάντα ῥεῖ 27 secs ago
@Fantômas Code posted on Code Review must be working and error free. This isn't ideal for SO, but it's at least remotely ontopic here. — Carcigenicate 16 secs ago
 
0
Q: Using longer one line statements according to good practice

EthrLately I have learned how to use list comprehensions. I've started to use them often, but I am not sure how complex one line statements should I write. What is good practice? Could you give me some remarks about code below? It checks if list has only two elements and each of them is int. a = [3,...

 
4:57 PM
@Fantômas Well, that's your opinion. It's been helpful for many people. And I would encourage you to read site's tours before sending new users their way. Code Review already gets too many offtopic questions, and we don't want to further confuse new users. — Carcigenicate 54 secs ago
 
5:32 PM
@Fantômas Afaik, the process of code review typically doesn't involve fundamentally broken code. Code review (the process, not just the site) is about improving code. The name seems entirely appropriate and consistent with existing concepts. The Wikipedia page on code review may be a helpful read. — Carcigenicate 30 secs ago
 
-1
Q: Moving through set of values

Old EngineerI started with advent of code 2015 and just stuck with day 3, part two. This part is also described in my repository. I tried to follow TDD rules. Till now it was OK. But with day 3 I am not able to find correct solution. As you can see, I already created test cases for known scenarios (which is...

 
possible answer invalidation by MisterCameron on question by MisterCameron: codereview.stackexchange.com/posts/211831/revisions
 
6:09 PM
-1
Q: Python How to short multiple possibilities

Myzel394I'm creating a python program and I have a code like this: if cond1: if cond2: do_cond1_cond2() if not cond3 else do_cond1_cond2_cond3() else: do_cond1() if not cond3 else do_cond1_cond2() else: if cond2: do_cond2() if not cond3 else do_cond2_cond3() else:...

 
6:25 PM
@Duga That's ok, since the answer didn't mention it. The comments did.
 
6:41 PM
-2
Q: Improvise the code against test cases where code fails

user10753505I wrote below code and i want to identify the test cases where my code fails.I recently participated in contest where my one test case is failed to pass out of 15 test cases, I have one more attempt left and I want to identify the possible test cases where my test case failed. so i will improvise...

 
7:13 PM
-2
Q: Unfair number guessing game

VengeancosMy goal was to program a simple game in which the user is always fooled without his noticing it. Program description You have to guess a number between 1 and 99 and you will lose. Source Code print("You have to guess a number between 1 and 99.") print("You have six tries.") print("If you...

0
Q: Suggestion for reversing a string in C#

AKdeBergTest Case: Input- "I'm hungry!" Output- "!yrgnuh m'I" Approach 1: In this approach, I used a empty string and bind it with the input string reversely. public static class ReverseString { public static string Reverse (string input) { //bind the string to an empty string reversly va...

0
Q: Javascript Call To Action Modal

MoxI created a simple modal that when a user scrolls down a blog post, a modal pops up. If the user wants to sign up for newsletter, then a form pops up. The only external library I used was body-scroll-lock that helps mitigate some issues with modals/forms on iOS. I'm curious about the need to rem...

 
7:35 PM
possible answer invalidation by Reinderien on question by RJM: codereview.stackexchange.com/posts/211847/revisions
 
@Duga Nah, that's fine.
 
8:03 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 28 secs ago
Now that your question has been answered I suggest you submit your corrected code to SO's sister-site, CodeReview. There you will get suggestions on how to improve you code. (There are several problems, the main one being that you should not use recursion here.) That site is tasked with helping you to improve working code, whereas SO is concerned with broken code and algorithmic issues. — Cary Swoveland 42 secs ago
 
8:32 PM
-1
Q: I have to use Inheritance to create this car class

Damion OwensI need help with this code. it is on python 2.7. i cant use super function it has to be basic also i think my Vehicle class is set up correctly so avoid changing it if you can.the output should be: # the vehicle class # a vehicle has a year, make, and model # a vehicle is instantiated with a mak...

 
9:20 PM
Hi Z.Siddiqi - welcome to StackOverflow. Please note that if your code is actually working, then Code Review is probably a better place to post your question: codereview.stackexchange.comSam 9 secs ago
 
10:07 PM
0
Q: Reconcile frequency and and duty cycle in analogWrite for Arduino

Kepoor HampondSo when I use this function to be able to specify both the duty cycle and the frequency on the output of a pin on the Arduino, I found that the higher the frequency, the more time is added onto the total on/off time durations. I have no clue why it is doing that, and for higher frequencies (1000-...

 
I'm voting to close this question as off-topic because question is more suitable for CodeReview — Simonare 11 secs ago
 
 
1 hour later…
11:34 PM
If you are sure that the program works correctly, this would be a fine question for Code Review. — mkrieger1 31 secs ago
@mkrieger1: Yeah it does work correctly. In that case, I'll do some more tweaking, maybe try out numpy double and then post it to Code Review. — Shirish Kulhari 18 secs ago
 
11:58 PM
0
Q: MVVM Databinding, Commands, Async - MVVM.Light

rosi97I'm new to C#, WPF and MVVM and I don't want to make common mistakes right from the beginning and get used to them. Already read some similar questions on best practices for WPF/MVVM but none of them included async/await patterns. I'm also using MahApps.Metro for UI and MVVM.Light Toolkit. Any ...

 

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