« first day (2262 days earlier)      last day (2051 days later) » 

00:00
RELOAD! There are 6242 unanswered questions (89.7347% answered)
00:35
0
Q: Project Euler Problem # 8 maximum product of sequences

emadboctorIs there any room for improvement? Your feedback would be helpful. Problem Statement: The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = 5832. Find the thirteen adjacent digits in the 1000-digit number that have the greatest product. What is the...

 
1 hour later…
01:54
0
Q: Configuration parsing and verification utility for bioinformatics tools

LukeI've been working on my first Python library which provides different utilities for a set of bioinformatics tools. I am looking for feedback on this module I made for parsing configurations needed for each tool run. To give a little more context, users are prompted with a text box to edit the d...

 
1 hour later…
03:14
0
Q: Random password generator (Java)

ChrisI wrote this program recently to generate random passwords for myself. It works well but it's been a long time since I wrote any java and am just looking on ways to clean up the code. I'm also not sure how truly "random" the password generation is or if it is too excessive. import java.util.Rand...

03:53
0
Q: Project Euler, problem # 9, Pythagorean triplet

emadboctorA Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a ** 2 + b ** 2 = c ** 2 For example, 3 ** 2 + 4 ** 2 = 9 + 16 = 25 = 52. There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc. Here is my implementation in Python, awaiting ...

 
1 hour later…
05:22
@user207421 per the section What you should not do in this answer to A guide to Code Review for Stack Overflow users I VTC’d with the reason too broadSᴀᴍ Onᴇᴌᴀ 16 secs ago
05:35
-1
Q: Why does printing to STDOUT seem to stop the program?

A__I have been trying to make a wildcard matcher using GCC, and this is my code: #include <stdio.h> #include <string.h> int wildcard(char wc[], char str[]) { int cur=0, wccur=0; for(;wc[wccur]!='\0';++wccur,++cur) { if(wc[wccur]=='{'||wc[wccur]==',') { int i; ...

06:14
0
Q: Pycharm plugin for hotimports

Lokesh AgrawalI have written Pycharm plugin for integrating pycharm with tidyimports https://github.com/pyflyby/pyflyby. I have followed steps mentioned in Simple Pycharm Plugin Example. Below is the code that I have written, it works but I need this to be reviewed. 1.Tidy Import import com.intellij.openap...

06:37
I don't see an actual problem statement here. If your code be already working completely, then consider moving this question to Code Review Stack Exchange. — Tim Biegeleisen 35 secs ago
07:34
-1
Q: Connection Between Struct Data Type to a Function

Rainzerostruct Player { int healthPoints; int strength; int basicAttack; int manaSpell; }; void StartingStats(struct Player); int main() { StartingStats(); return 0; } void StartingStats(struct Player) { healthPoints = 5; strength = 5; ...

08:13
0
Q: Console-based BlackJack in C#

Steve NgaiI have done some code-refactoring of my console-based BlackJack in C#. Finally found a better solution to solve Ace problems (double Aces should be value 22 and third Ace should be value 1). I still find it hard to split the UI and the program logic although I have created a static Screen class ...

08:26
I'm voting to close this question as off-topic because it is working code and rather belongs to Code Review. — jay.sf 18 secs ago
08:50
0
Q: Is there something wrong with this question?

ChrisWIs there something wrong with this question ... Emulation of SE's text input control for tags ... that might make it difficult or unpleasant to answer? Can you suggest what I should do to improve it, or explain why it's not a good fit for this site? Or should I just add a Bounty now to draw a...

possible answer invalidation by Webbarr on question by Webbarr: codereview.stackexchange.com/posts/224100/revisions
@Ashok Sorry I didn't really mean to close the question (text automatically created) rather to migrate to Code Review, where the guys are specialized to optimize your code. Did you peek in yet? — jay.sf 20 secs ago
 
3 hours later…
11:32
0
Q: While loop is not looping

xxxRxxxI have a while loop which I would like to keep prompting a user to enter a number until the user types "exit". Unfortunately when the user enters anything, they aren't prompted to enter another number, and the procedure doesn't end. I'm using Pycharm as my IDE. Here is my code: a = [] num = "" n...

11:55
Interesting to see we can't flag an answer to redirect to "Code Review". This site is not in the list of sites to redirect to. — dfhwze 48 secs ago
12:17
Monking
13:11
0
Q: Upload image with GD library

Derp Dee DerpFirst of all i just started learning OOP. My priority is to make a safe code, i think my code is safe because i use GD to make a copy of the uploaded image and i use a image proxy to make sure nobody can access the uploaded file directly and it's uploaded outside of the webroot, but if was 100% ...

13:31
0
Q: Evaluating π using Monte Carlo methods - Serial vs OMP

Ilmionome456I wrote this simple code for evaluating the π using Monte Carlo method. This is the serial version: long double compute_pi_serial(const long interval) { srand(time(NULL)); double x, y; int i, circle = 0; for (i = 0; i < interval; i ++) { x = (double)(rand() / (double) RAND_MAX); ...

14:30
-1
Q: Project Euler Problem # compare 2 approaches (sum of primes)

emadboctorYou will find below 2 functions calculating primes up to 2 million. I wrote the 1st one (the one with comprehension syntax) and it is very slow, takes like 10 secs. The second approach I found it somewhere else here and I want to understand why the first function is running very slowly and how ca...

 
2 hours later…
16:10
-1
Q: Trying to convert struct with hashmap member

MatthiasConsider a struct: struct RawData{ pub a: HashMap<String, String>, pub b: HashMap<String, String>, } which should be converted in a struct with more concrete members: struct EncodedData{ pub a: HashMap<String, MyStruct>, pub b: HashMap<String, MyStruct>, } and there is a function wh...

0
Q: Google Foobar: Prepare the bunnies escape

Nathaniel St. ElmeI'm currently doing the Google Foobar challenge and am stuck on the "Prepare The Bunnies Escape" problem. My solution passes test cases 1,2, and 5 but fail on 3 and 4. The code can probably use further optimization(and clean up), however I am not getting a time out error so optimization is not ca...

16:29
0
Q: Rename and move images to a destination directory based on a text file

KiskaAs a followup to this question, I removed the Repository class and do the copy in the Folder class. Suppose I have the following image directories under the Pictures directory of a Windows user profile: C:\Users\Kiska\Pictures\Computers - comp-amd-21343.jpg - 12345.jpg C:\Users\Kiska\Pi...

16:49
-1
Q: Runtime Error with Check Balanced Brackets Problem [Java 8]

bubble rainI am struggling with a HackerRank problem. Here is the problem statement: Given strings of brackets, determine whether each sequence of brackets is balanced. If a string is balanced, return YES. Otherwise, return NO. This is my solution: static boolean isOpeningBracket(char c) { re...

17:09
0
Q: VB6 XML Shredder speedup

BRWI'm working with a legacy VB6 XML shredder that extracts information from proprietary XML files and loads the information into a SQL Server database. It's working, but it's slow. I'm looking for suggestions to speed it up. There are 3 main reasons why it's slow. First, it has to process hundreds...

17:29
-1
Q: Javascript constructor and init pattern

Steven Summary: I am learning patterns in javascript and I wanted to get peoples ideas on this code I wrote with the help of some tutorials I am doing. I use snake notation because I feel like the variables are easier to read as well as include a new line between code. Questions: 1) One thing I ...

17:59
Questions like this regarding working code are better asked on codereview.stackexchange.com. This site is for code that isn't working — charlietfl 17 secs ago
This looks more like a question for Code Review. — Dharman 28 secs ago
0
Q: PHP recreate array if it contains certain values

CyberJI have $fruits_arr: Array ( [0] => Array ( [id] => 213 [fruit] => banana ) [1] => Array ( [id] => 438 [fruit] => apple ) [2] => Array ( [id] => 154 [fruit] => peach ...

18:58
In my opinion, it's a great functional solution and you can't really make it more functional :) I would also claim, that your choice to use recursion was the right one because reduce or fold solutions would probably look messier. That said your question would fit better to Code Review Stack Exchange and you would probably get more attention there. — Krzysztof Atłasik 55 secs ago
19:48
-2
Q: How to fill up a function args with lines of text from a file in python?

Sa99haI need help in python I have a function that contains multiple args And i have file that contains lines with the same number of args in the function The question is how can i put the lines in the args of the function without rewriting every arg with its line ? For example: Def zy(qa1, qa2, qa3):...

20:28
0
Q: throttle implementation using pure java script adding and removing event listener

Waterfr VillaI am trying to implement throttle function in vanilla java script. I have seen other implementations on the web, but the way I have implemented it is more understandable for myself. I was wondering if any of you experts can take a look and let me know if I am missing some thing. It seems to be wo...

20:47
0
Q: Custom Hook implementations in react

ngrI am fooling around with hooks in react and i'm stumbling against decisions that i need to make regarding implementation. Below is the code for the custom useForm hook which can be used to hook up forms to validation using Yub schema's. Currently you can pass a callback function to the useForm t...

21:27
0
Q: Showing a unique result based on options selected

kumikanI created a simple quiz in HTML/CSS and plain Javascript. There are three questions with two options each, so there are eight possible combinations of answers, and therefore results. You can only pick one option per question. This is how I am currently assigning a result to each combination in J...

0
Q: Boolean class using shared referenced memory

DaniloTo improve my knowledge i am trying to make a bool class from scratch, or derivative of. I am using MinGW g++ compiler on a Windows 7 laptop. #include <iostream> #include <bitset> class Zeroth{ uint8_t* MEM = nullptr; public: const static uint8_t NullSet; // if data is declar...

21:47
0
Q: Python function to count syllables in a word

PittoI wrote this function to count the syllables in a word using Python to complete an exercise. The exercise's text is: Return the number of syllables in the given word, according to this rule: Each contiguous sequence of one or more vowels is a syllable, with the following exception: a lon...

21:58
If it works fine, post it on Code Review. — Vince Emigh 11 secs ago
22:13
I think this question is more appropriate for Code Review: codereview.stackexchange.com. — chipit24 10 secs ago
22:28
@vadian I have updated my question! If it looks to you code review! please let me know how can I share my original code in code review? — KkMIW 29 secs ago
23:06
0
Q: Grid layout component for VueJS

user204713I'm working on a vue.js / nuxt.js project, applying the Atomic Design methodology, I need to do one to set the grid layout and using CSS Grid Layout. I already did the component, but I think I did not do it the best way ... the code is great and not very smart, lots of manual work, I would like ...

possible answer invalidation by Tex Andersen on question by emadboctor: codereview.stackexchange.com/posts/224132/revisions
23:46
0
Q: Why is my Python web scraper taking so long?

F22RaptorI am trying to create a program to download a long list of websites using Python 3.7. By using multiprocessing for each request, my code runs much faster than when it's run synchronously. I've added a timer to my script so I can know the execution time for the script. The one I wrote below take...


« first day (2262 days earlier)      last day (2051 days later) »