« first day (2321 days earlier)      last day (1714 days later) » 

12:00 AM
RELOAD! There are 6151 unanswered questions (90.0592% answered)
 
12:16 AM
0
Q: eCommerce Mockup App in JS

Steve NgaiI have completed this mockup eCommerce app using Javascript. This version can add product into shopping cart and automatically calculate the order summary in the shopping cart. It can also delete one item and all items in the shopping cart. All known bugs are fixed. Certain functions like paymen...

 
12:36 AM
0
Q: Mean π: Archimedes vs. Gauss - π computation through generalized means

TheHoytI've written this simplified code to compute Pi for educational/demonstration purposes. These methods are based upon the generalized means: see a presentation on Pi and the AGM. Archimedes' method gives linear convergence, which means you get two extra bits of precision per iteration. Gauss's ...

 
 
1 hour later…
1:56 AM
0
Q: Solidity: verifying primality certificates, bounty for large primes

Pr0metheanThis is my first smart contract, and it isn't finished yet, but the remaining bits are complicated enough that I'd like to make sure I'm on the right track first. My concerns are: At line 117, is the missing division an actual division or a modular multiplicative inverse? (BigNumber provides ne...

 
2:46 AM
This sounds like a better fit here: codereview.stackexchange.com Though definitely check that community's guidelines first. — David 51 secs ago
 
3:05 AM
possible answer invalidation by JohnDoea on question by JohnDoea: codereview.stackexchange.com/posts/226734/revisions
 
 
1 hour later…
4:09 AM
Assuming your code already works, your question might fit better on our sister site Code Review Stack Exchange. Off the top of head, you might be able to use a switch statement inside of the many if else blocks. — Tim Biegeleisen 21 secs ago
Should possibly be migrated to the CodeReview site, but I can't flag for that site. — MegaEmailman 26 secs ago
 
Monking
 
4:24 AM
If you have a working code and is looking for a review, you might want to check codereview.stackexchange.comAndreas 35 secs ago
 
5:23 AM
Monking
 
5:57 AM
1
Q: Reference enum values in Angular template without aliasing the enum type

Anthony FaullIs there a way to improve this code. I'd like to use the enum type PaymentMethod directly in the angular template without renaming it to _PaymentMethod. export enum PaymentMethod { CreditCard, EFT } @Component() export class PaymentComponent { _PaymentMethod = PaymentMethod; pay...

 
6:37 AM
0
Q: How to refactor and reduce this complex logic including too many if-else

Zhang Xinthere is a segment codes I wanna to refactor as sonarlint always comments "Refactor this method to reduce its Cognitive Complexity from 32 to the 15 allowed", below as code: for (Map<String, Object> row : rows) { String name = ""; String shopId = ""; String promotionId = ""; Stri...

 
6:54 AM
You might want to post this code on Code Review. — csabinho 47 secs ago
 
0
Q: Graph implementation for solving graph problems (java)

Aashish PawarI've currently started solving some competitive programming Graph questions. But Started using adjacency list as HashMap<Integer,ArrayList<Integer>> list . But in some problems, this doesn't work. so I decided to implement class Graph other than this HashMap. I would like a review of efficiency a...

 
7:29 AM
@Duga Usually I'd roll that back, but answerer is OK with it.
 
0
Q: Inconceivable error in code

Zack JoubertI wrote this piece of code to do Genetic Algorithm optimization of a soft actuator. So it works by feeding a segment orientation vector to the Limb class which then constructs and evaluates the actuator. The orientation vector is 15 long like so ['TOP', 'BOTTOM', 'TOP', 'TOP', ...]. For some re...

0
Q: Refactoring inheritance classes

BigJamesI had a test about refactoring code. And don't know what it's about and how to fix it... Here's the original code. public class BaseScene { public BaseScene(object screenInfo) {} public virtual void Apply() {} } public class GameScene : BaseScene { private double screenRatio; ...

 
7:57 AM
0
Q: Cannot insert data as image(file upload) and date in Spring Boot via Thymleaf

Kevin TomasI have a problem about inserting data as image and date into Oracle11g database. When I click save button as insertion process, it throws an error. How can I fix it? Here is the error shown below. Field error in object 'employee' on field 'registerDate': rejected value [2019-09-11]; codes [t...

 
8:15 AM
This might be more suited for codereview — FlyingTeller 13 secs ago
possible answer invalidation by Dorian Turba on question by Dorian Turba: codereview.stackexchange.com/posts/227778/revisions
 
8:48 AM
I'm voting to close this question as off-topic because I think it's one for codereview.stackexchange.comBrian Agnew 18 secs ago
 
0
Q: A "The answer's author agreed to this edit in question" button which could be used only if code was expanded

JohnDoeaIn this question I added a segment to the code scope only after describing the essential addition before the answerer in comments and getting his consent to make this addition in a reply comment. I didn't delete any existing code or changed any existing code and this is something I would general...

 
9:38 AM
0
Q: Rails initializer to be more clean

mr_muscleI need a little bit of refactor my initialize method because I think it will make initializer more flexible and readable. class LogAdminData DEFAULT_EXCLUDED_PARAMS = %w[ encrypted_password reset_password_token reset_password_sent_at ].freeze def initialize(admin_obj:, action_...

 
9:51 AM
@Feeds That's partly my fault, I can hopefully find the time in an hour or two to properly answer it.
 
10:17 AM
0
Q: How to name property with state of noun and pronunciation c#

DIlshod KI have properties and the name of them should contain two words. For example, I have Payment entity and it should have two properties: a) Cash, which has been received b) Amount, which has been applied So, which names are good and sound good? 1) CashReceived, AmountApplied 2) ReceivedCash, App...

 
10:47 AM
OP posted code that was broken, answer said it was broken, OP fixed the code by commenting out a bit that (kind of obviously but certainly not clearly) was meant to be this-or-that, now there is an edit fixing the output in the answer which is saying the output it wrong.
The edit just makes the answer more confusing (so should be rejected?), but the answer is confusing already because it is using output from 'out-date' code.
(suggested edit is by OP)
 
11:03 AM
Maybe you could ask a question for your preamble at codereview.stackexchange.com/questions/tagged/tex ? — samcarter 35 secs ago
for a code review, this page is better suited: codereview.stackexchange.comStultuske 31 secs ago
 
@VisualMelon Reject, attempt to reply. Should've been a comment.
Considering rolling the question back to rev 3, but not sure what that would accomplish. It's a mess anyway.
 
11:18 AM
Done as you suggest.
 
11:36 AM
0
Q: Project Euler #16 Code

Omar Ahmed 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? BigInteger big = new BigInteger("2"); big = big.pow(1000); String num = big.toString(); System.out.println(num); int result = 0; for(char i : num....

 
12:21 PM
Greetings, Programs.
 
12:33 PM
Consider asking Code Review instead — JETM 44 secs ago
 
Somebody created Civilization in Excel.
Madness.
Coloured.
 
JAD
right
that's something you can do yea
 
It's one of those things that are theoretically possible but so unfeasible you didn't think anyone would even try.
 
JAD
heh, reminds me of the "make tetris in game of life" challenge on PPCG
 
Did that ever get a complete answer?
 
12:43 PM
982
Q: Build a working game of Tetris in Conway's Game of Life

Joe Z.Here is a theoretical question - one that doesn't afford an easy answer in any case, not even the trivial one. In Conway's Game of Life, there exist constructs such as the metapixel which allow the Game of Life to simulate any other Game-of-Life rule system as well. In addition, it is known that...

 
JAD
yep!
982
Q: Build a working game of Tetris in Conway's Game of Life

Joe Z.Here is a theoretical question - one that doesn't afford an easy answer in any case, not even the trivial one. In Conway's Game of Life, there exist constructs such as the metapixel which allow the Game of Life to simulate any other Game-of-Life rule system as well. In addition, it is known that...

read it, it's amazing
 
Oh, I've already upvoted it ;)
Must have just forgotten
 
JAD
XD
 
We got some wacky things in Excel on CR as well.
25
Q: Life is a Game - Play it

KazI haven't made a game in Excel yet, so I decided to Make Conway's Game of Life. If you wish to play along, I've uploaded the workbook here. Right now it's very rudimentary (No user interface, no buttons/controls, no automatic tick-increment), but I would like to, in the future, add all of the a...

Written years ago by @Kaz
 
I forgot about the OTCA Metapixel, kind of a boring (and costly) abstraction if you ask me, not that it's any less of an epic achievement ;)
 
JAD
12:50 PM
I remember following the chat room in the weeks/months before the answers were posted
was pretty hype
 
0
Q: How could I optimize this code for writing from a FileInputStream to a file?

DeutscheBahnI have written a small program that reads input from a text file and then writes this output to a text file. The method contains a switch which decides whether to output to the file as text or as a literal string of the bytes. How could I refactor this code to only include a single if statement b...

 
1:16 PM
-1
Q: Java Programming

CharlieWhen user choose position for Clark or Manager (For manager position, the salary is RM 2500 and Clark position is RM1500), basic salary will appear in in Basic salary TextField as below: https://i.sstatic.net/4znBA.png This is my coding i don't know how to do it.. package Task3; import jav...

 
Possibly a better fit for codereview.stackexchange.com? — jaco0646 17 secs ago
 
2:16 PM
-1
Q: Facing some error in verilog HDL coding of Standard deviation calculation?

DavidThe standard deviation (SD, also represented by the lower case Greek letter sigma σ for the population standard deviation or the Latin letter s for the sample standard deviation) is a measure that is used to quantify the amount of variation or dispersion of a set of data values. A low standard de...

 
2:28 PM
You should ask your question on codereview.stackexchange.com, it seems more appropriate. — Antoine 11 secs ago
 
0
Q: Java Programming coding

CharlieDo you know any coding when we select from the combobox and another output appear in the textbox? https://i.sstatic.net/MX0B0.png like the picture when i choose manager the basic salary become RM2500 public class EmployeeInformation extends JPanel { public EmployeeInformation() { ...

 
oh, that's right, it's September again...
3
 
3:06 PM
Hi Parfait, thanks for your hint to CodeReview. I didn't knew that. Sorry. — bthebread 38 secs ago
 
3:16 PM
0
Q: Primality test in Python

Peđa TerzićHere is a working Python implementation of primality test. Is there something that I could change in code to achieve a better running time? from sympy import * from sympy.abc import x n=int(input("Enter a number : ")) def xmat(r,n): return Matrix([[2*x, -1], [1, 0]])*rem(1,x**r-1)*(1%n...

 
3:55 PM
Monking
 
0
Q: BehaviorSubject directly in the component. Best practise

mightycode NewtonI Have a component what already is being a rather large file And I have two BehaviorSubject objects in this component. But is this the correct way of doing things. Or is there are better approach for? Thank you. And can somebody give some examples? Will be nice So this is the whole file: imp...

0
Q: Raku / Perl6: A module to enable escape codes in the win32 console, naming suggestions

HolliI have this little project i am about to release. https://github.com/holli-holzer/perl6-Win-VT I would be happy about a code review and suggestions for a better name. Discussion in IRC yielded Terminal::Win::VT or Terminal::Win32::VT::Enable as better alternatives. Or even Win32::Console::VT....

 
4:16 PM
0
Q: Extract three letter pattern from a given list

catufThe code takes a list of names and extracts the three letter pattern from the names. Then return the list of names as a value in the dictionary with key as a pattern. The list name has a fixed naming pattern like three letter Spp in the example. It can extent like App, Bpp, Cpp etc.. How can I ...

 
4:28 PM
@Malachi ♫ "Wake me up, when September ends"
4
 
4:39 PM
@SᴀᴍOnᴇᴌᴀ @Malachi "Try to remember the kind of September ..."
 
@pacmaninbw what is that from? did I just date myself?
 
my cursory web search yielded a Josh Groban song from a Musical from the 1960s called The Fantasticks
 
4:58 PM
@SᴀᴍOnᴇᴌᴀ I don't know any of that....lol
before my time
 
@Malachi Frank Sinatra sang it a very long time ago. google.com/…
"Try to Remember" is a song about nostalgia from the musical comedy The Fantasticks. It is the first song performed in the show, encouraging the audience to imagine what the sparse set suggests. Its lyrics, written by Tom Jones, famously rhyme "remember" with "September", "so tender", "ember", and "December," and repeat the sequence -llow throughout the song: verse 1 contains "mellow," "yellow," and "callow fellow"; verse 2 contains "willow," "pillow," "billow"; verse 3 contains "follow," "hollow," "mellow"; and all verses end with "follow." They also feature an interpolated rhyme in "wept" and...
@Malachi @SᴀᴍOnᴇᴌᴀ I dated myself. I doubt many people on this website have heard it.
What does the number under my icon and user name signify. My rep is lower than that by about 210 points.
 
@pacmaninbw I believe it is a summation across your SE profiles
 
Does this code give the correct answer? If so, you should checkout Code Review to get feedback on how you can improve it. This can include how to make your code more understandable and use idiomatic constructs from C# as well as optimizations. — Code-Apprentice 38 secs ago
A better place to ask questions about improvements to working code is Code ReviewBarmar 8 secs ago
 
5:13 PM
SE chat isn't really specific to any one particular site... a room might be though
 
@SᴀᴍOnᴇᴌᴀ thanks.
 
5:36 PM
-1
Q: Decreasing the resolution of enlarged image in face detection

AnanthhokageI tried this simple face detection program with the help of haar-cascades in Opencv. I was able to get the required output successfully by changing the scaleFactor by a small amount.It is finding the faces correctly.But there is a problem with the output.Though the faces are being detected correc...

0
Q: bash script at scale for kubernetes kubectl operations

AhmFMI have my below prototyped script and it runs fine but I need to scale it out at large. So, wanted to get feedback if my script can be improved in terms of performance and if there are any non standard stuff am doing in it. What is does: Script is to delete all the pods under defined namespaces ...

-1
Q: Confirm the Ending of a String

DreamVision2017I would like to compare solutions for this challenge and especially have mine critiqued Challenge: Check if a string (first argument, str) ends with the given target string (second argument, target). This challenge can be solved with the .endsWith() method. But for the purpose of this challen...

 
6:33 PM
 
6:49 PM
@RMunroe Flat earth syndrome?
 
I don't see anything inherently wrong here if this works. If you're looking for improvements, you'll need to be a little more specific about what you want to improve. Note that requests for reviewing working code are more typically handled by codereview.se, but be sure to read their documentation first to verify that your question is on topic. — glibdud 47 secs ago
 
7:16 PM
0
Q: ADODB Wrapper Class

rickmanalexanderI use ADO (specifically for accessing SQL) daily at work. So, I finally decided that I was going to create a class that makes it simple for myself and other programmers on the job to use. Just the other day, I saw @MathieuGuindon's post about creating parameters on the fly, and I really liked hi...

0
Q: Run an external program and extract a pattern match along with the result file

catufThe script takes two input files of protein sequences and runs an external program (installed in linux/MacOS). The result provides a text output file example output.. Identity percentage is extracted from the matched keyword "Identity" in the line. Also, the script returns the result text file. ...

 
7:36 PM
2
Q: Hexadecimal String to Binary String Conversion Rust

sc_rayI am getting started in Rust, and as a part of my first exercise, I decided to write a small program that converts a hexadecimal string to a binary string using a pattern matched lookup. I would appreciate a constructive review. fn main() { let binary_value = convert_to_binary_from_hex("0x39...

0
Q: Structure and Code of Tornado WebAPP

Michail VizarkovycI wrote a test application to familiarize myself with the Tornado with Python framework. The application currently generates a cookie, you can view and delete it. I also created a certain file structure. I would like to know if it will comply with current coding standards. Of course, I am also op...

 
8:36 PM
0
Q: Simple calculator in Python

HumptyDumptyThis is my first ever Python program. I thought I would make a calculator that performs 5 operations: add, subtract, divide, multiply, power. I am aware Python has its own power function, called "pow", but I have defined my own power function for practice. I've taken the input as a single string...

 
8:56 PM
0
Q: Simple Python3 Checkers

Denis  UshakovI'm a beginning "pythonist" my current task is to write a checkers game and I need some suggestions here and there: are the code style and literacy answering the criteria of python? are the modules of my program correlating with each other correctly? are the algorithms of finding possibilities...

 
9:36 PM
0
Q: Callback usage with custom Stack Exchange Flair, is it difficult to follow?

PerpetualJSo today I decided to continue refining my JavaScript skills and utilized the Stack Exchange API (v2.2) to write a "user flair" replica. In case you don't know what the flair that SE provides is: The process was a little tedious in places, but only because I am still learning the concept of c...

 
9:56 PM
0
Q: Looping through a proc sql table from a list SAS and naming those tables from each list value

skatofiaI'm trying to loop through a list and use each of the list values to create a new table. I wrote a macro in order to do so. %macro loop(STlist); %let nwords=%sysfunc(countw(&STlist)); %do i=1 %to &nwords; %put %scan(&STlist, &i); %LET ST_CD = %scan(&STlist, &i); %end; %mend; %loop(&STATE)...

 
10:38 PM
I suspect this question may belong on Code Review, as it is not asking to fix a coding problem (it's asking for the most efficient approach / algorithm) — devlin carnate 44 secs ago
 
11:35 PM
0
Q: Large matrix with lots of repetitive fields (C++)

ConorI have been writing a timetabling program and I have been using a matrix to check for clashes between courses. Index i,j in the matrix tells us how many people are in both courses i and j. My previous Matrix was just using nested vectors: std::vector<std::vector<int>> clashes; This would thro...

 

« first day (2321 days earlier)      last day (1714 days later) »