« first day (2906 days earlier)      last day (30 days later) » 

12:01 AM
RELOAD! There are 7523 unanswered questions (89.4621% answered)
 
 
3 hours later…
3:10 AM
Code review: there are multiple wasted instructions, e.g. a mov that writes a register you never read again, like setting EDI before a call, but then the function call takes R12D as the arg, instead of the standard calling convention. Also reading argc, argv early instead of just leaving them on the stack until they're needed. You could allocate your buffer on the stack instead of with brk (it's only 64k - 1, and x86-64 Linux allows 8MiB stacks by default), in which case loading early could make sense. Or just BSS. Also, .data is pointless, .set is an assemble-time constant. — Peter Cordes 27 secs ago
 
 
1 hour later…
4:39 AM
This is not a question to ask us: if you want to know whether it slows your program, you need to perform the appropriate timing experiments for a start. If you're still unsure, try profiling your program to see where the slowness occurs. If you're confused about the results you get, or how to work around the time-consuming portions, then post those results to this site or to StackExchange.CodeReview, as appropriate. — Prune 28 secs ago
 
 
1 hour later…
5:43 AM
What is an Armstrong number? Does this code currently work as far as you know? If it does and you're looking for a review then codereview.stackexchange.com may be where ou should ask. Be sure to read their help center first to be sure your question will be on-topic. — Retired Ninja 48 secs ago
 
6:19 AM
0
Q: Sum of fractions

cgoatesObjective: Create a function to sum a list of fractions (represented as pairs) Rules Only Prelude functions allowed Notes I was debating if I should create a Fraction data type. Is it worth "upgrading" from a simple pair? Is the code easy to follow and well-structured? How are my function na...

 
6:42 AM
0
Q: Multiple async wait

storenthI need a review and best practice approach to do something like that: #!/bin/bash screenshots(){ while read line; do ./getscreenshot.sh "$line" & done < subdomains.txt } screenshots & anotherfunc wait Note multiple &. I mean I need screenshots to be done in async way while anot...

 
 
2 hours later…
8:42 AM
Monking
 
9:25 AM
Hi, I don't think you can get code reviewed on stackexchange. You have to check correctness yourself and if you face any issues, then come here. — Aditya Singh Rathore 17 secs ago
 
Monking
 
10:16 AM
0
Q: Handling exceptions

ProtractorNewbieI had a blast to get a awesome code reviewer yesterday who taught me very much and I do hope I have done a pretty good job on improving my knowledge both with exceptions and in general. Currently I have been working on to get a nice exception/more correctly way to do the exceptions as well. For n...

 
 
1 hour later…
11:24 AM
While there is a fair amount of code in this question there unfortunately isn't any declarations or definitions of the class involved. MRC.
 
 
1 hour later…
12:39 PM
If the code works and you're just asking for someone to review it, please post it over at Code Review instead. — Magnus Eriksson 48 secs ago
 
 
1 hour later…
2:04 PM
@iDecode The use of as makes it clear that a typecast is going to happen which makes it easier to spot where runtime errors can happen. I am not a fan of automatically typecasting dynamic to anything. Especially when I am making a code review, I need to know when something happens which can cause a runtime exception. This is also why we use ! with null-safety. It is to make it clear where we are doing stuff where the analyzer does not guarantee anything. — julemand101 11 secs ago
 
 
1 hour later…
3:07 PM
0
Q: Mockingbird c++ mocking framework

muazI have developed Mockingbird a mocking framework for c++, it depends on function injection, and here is an example on how it works: Assume you have the following class Foo and you need to mock: struct MyStruct{ int x, y; }; class Foo{ public: virtual const MyStruct CreateMyStruct(int x, ...

 
 
1 hour later…
4:13 PM
0
Q: Simple bank application java

עמית שוקרוןI wrote a simple java bank application and I would like to get an review! I learned today about exceptions so I tried to apply it on my code but sadly I couldn't made it, I hope someone here could help me with that. Account.java : private final String firstName; private final String lastName; pri...

 
4:38 PM
0
Q: Stacking Classifier Implementation

theProgrammerI was going through the book Hands on Machine Learning With Scikit-Learn & Tensorflow. In one of the chapters, the author mentioned stacking ensemble methods. I tried implementing my own for practice purpose, this is what I have done so far. from sklearn.base import BaseEstimator, TransformerMixi...

 
@CaptainObvious Reads more like a sales brochure or ad than a request for a code review. Examples of usage are included, but the code to be reviewed is not included.
MRC
 
4:57 PM
0
Q: Usage of Factory pattern for maintaing bookshelf having books, magazine and notes

ashofphoenixI have tried to achieve the following task using Factory Pattern with php-7.0. Define the classes and their methods (including parameters and return types) for a system that consist of a bookshelf, books, magazines, and notebooks. The bookshelf should allow store and retrieval of the items as we...

 
5:23 PM
0
Q: How to assign an Integer to a item in list - Python card game

user83671829387I am new to python and I have been having some trouble making this card game In between also known as Acey Duecy. I have made my deck of cards using a list with the code : cardname = ["ACE","TWO","THREE","FOUR","FIVE","SIX","SEVEN","EIGHT","NINE","TEN","JACK","QUEEN","KING"] suit = [ "OF CLUBS","...

 
 
2 hours later…
7:08 PM
Since this code is working, you should ask about the performance in Code Review. — Dorian Turba 20 secs ago
 
7:19 PM
0
Q: Code to Show Groovy is a Statically Scoped Language

Jim GallagherI want to double check that I understand this code correctly as it relates to Groovy and static scoping. Because int b = 5 is declared outside of the int foo( ) method, x.foo( ) will return 10. Since int bar( ) returns int foo( ), x.bar( ) will return 10. If on the other hand, Groovy were dynamic...

 
8:12 PM
"better" how, exactly? Elegance isn't an objective measure. If you have working code that you think could be improved, see Code Review. — jonrsharpe 28 secs ago
My code wasn't working at the time of my post. I got it working after asking. Do you or anyone have any suggestions on how to achieve the result without using a for loop? I wasn't aware of code review, thank you for pointing that out. I can post there as well. — Craig Nathan just now
 
8:34 PM
@CaptainObvious Not asking for a code review, asking for an explanation of code or of dynamic/static scope.
 
8:52 PM
0
Q: William Fractal technical indicator implementation

ValexI'm really new to both Python, data analysis and Panda and for gathering a bit of familiarity with this components and trying to replicate a trading strategy I'm creating a function that give me the Wiliam Fractal technical indicator, which by nature is a lagging indicator to apply at the current...

 
9:04 PM
 
 
1 hour later…
10:28 PM
0
Q: Created a basic User Profile List using an API (React)

chowmein4uI'm relatively new when it comes to programming in React and in JavaScript, but have a surface level understanding of what things do. I've created a basic program that fetches user data from an API that generates random users, and appends the users to a list when you click a button. I was wonderi...

0
Q: Game of Life in C/SDL2

TogiodiMy first project in C/SDL2 after completing a short tutorial coding Pong. These 2 projects are my entire experience with both C and SDL2, although I had some previous basic experience with Python. I also added a "life trail" that shows recently deceased cells in grey. Darker grey = died more rece...

 
10:50 PM
0
Q: Individual bit access in C

QuestionLimitGoBrrrrrIm not that good at C, so go easy on me, but I wanted to be able to have individual bit access in C without using a ton of functions to do bit manipulation on a uint8_t. Tell me where I could improve upon it #include <stdio.h> #pragma pack(1) union bit_array { struct { unsigned char...

 
11:33 PM
0
Q: Paycheck Arrays

Vanessa FantiniI have a program that makes the user enter 5 employee names and their salaries for the week. Then I have to sort the arrays is descending order according to salary. Add a binarySearch() static method. //Vanessa Fantini import java.util.Scanner; import java.util.Arrays; public class PaycheckArray...

 
11:56 PM
0
Q: My code is a login system to be use for any future project. Wondering if the structure and overall code is clean and well done

drakebakincakeMain function will ask what the user wants to do. LoginSystem class will handle the sign up and login process as well with the checking if password is right. passwordHashing will use bcrpyt to salt and hash the password. import bcrypt from loginDbMySQL import insert, logging_in def main(): ...

 

« first day (2906 days earlier)      last day (30 days later) »