« first day (2174 days earlier)      last day (2139 days later) » 

00:00
RELOAD! There are 6014 unanswered questions (89.8054% answered)
00:28
0
Q: Using IndexedDB as an in-browser cache. Am I doing it right?

James ChevalierIn my site: Users have many Activities Each Activity has encoded_polyline data I display these encoded_polylines on a map I want to use IndexedDB (via Dexie) as an in-browser cache so that they don't need to re-download their full Activity set every time they view their map. I've never used I...

0
Q: Compare a given version number in the form major.minor.build.patch and see if one is less than the other

the_endian#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> typedef int STATUS; #define ERROR -1 #define OKAY 0 struct version { unsigned char major; unsigned char minor; unsigned char build; unsigned char patch; }; STATUS is_less_than(struct version * origin...

01:13
The wrong format specifier throughout notwithstanding, it was your intent for the first condition to print 4.2 billion IP addresses, the second 16.7 million, the third 64K, and the fourth 255 ? Rly ? Secondly, codereview.stackexchange.com seems more appropriate for this. — WhozCraig 52 secs ago
01:26
0
Q: Golf Physics "Game"

alec_aContinuation of this post I wrote a program in pygame that basically acts as a physics engine for a ball. You can hit the ball around and your strokes are counted, as well as an extra stroke for going out of bounds. Recently, I added a few things like air resistance, and rewrote my movement phys...

0
Q: Simple command-line roulette game

alec_aI developed a simple command-line roulette game. Your only options are betting on color, but you can bet multiple times in one round import copy import distutils.core from time import sleep from random import randint red_slots=(1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36) ...

Besides the issue described in the question I hope you don't mind if I say that your code has several other problems, from the lack of proper update patterns to async code inside the listeners. When you have a final, working code, I suggest you ask for idiomatic solutions at Code Review. — Gerardo Furtado 10 secs ago
02:00
0
Q: Recursive File Search Using the Dir() Function

TinManThere are plenty of examples of using the FileSystemObject to recursively search for a file in subfolders. I thought that it would be interesting to write one using the Dir() function. I was wondering if there is a way to return the found file without using the extra FoundFile parameter? Fu...

02:17
0
Q: Implement Queue using fixed size array

user5447339I came across below interview question and I am working on it: Build a queue class with the enqueue and dequeue methods. The queue can store an UNLIMITED number of elements but you are limited to using arrays that can store up to 5 elements max. Here is what I was able to come up with. ...

0
Q: Compares 2 ios and android versions

VincentPlease review and let me know which version is better? Just trying to find any caveats or better ways to accomplish the a version comparison independent from android and ios. Formats accepted: '1.0.0' or '1' formats and an operator, e.g: compareVersion('1', '1.2.0', '>') export function compare...

 
2 hours later…
04:22
-1
Q: How to efficiently get combinations of array of tuples [int, string] and compare it?

Vandré Dreer BonaiteJust wondering if there is a way to run the piece of code below more efficiently. I just started to get acquainted with parallel program and think this might be an answer? But I have no idea how to do it using imap or processes...any help? This is what the function is doing: it gets two arrays o...

0
Q: Project Euler # 1 python

DjVasuProb.1 Sum of Multiples of 3 and 5 in range 1000. def prob_1(): sum_mult=[] #Create an empty list which will take sum of multiples of 3 and 5 check_sum=0 for i in range(1,1000): #Take numbers till 1000 #if(i) if( (i%3)==0 or (i%35)==0 ): #divisor condition su...

Monking
05:01
Anyway, this is rapidly devolving into an interactive debugging/code review session and I really can't keep doing this, I'm sorry. :-| — Tomalak 49 secs ago
 
2 hours later…
06:41
0
Q: Cleanest functional way to iterate a 2D Grid Co-ordinates in Scala?

Siddharth SinghHere is my code to iterate over a 2D Grid in Scala (1 to N) map { i => (1 to M) map{ j => println(i + " " + j) } } This is a simple alternative to a nested loop for a 2D Grid. How can I make this more cleaner and functional, the Braces don't feel much functional. The Ae...

Monking
06:57
-1
Q: node js correct code giving error about syntex

user2129623I have this working code. But after longtime when I rerun I am getting error. I am not sure Am I making mistake in running or what. const express = require('express'); const bodyParser = require('body-parser'); const url = require('url'); const querystring = require('querystring'); cons...

0
Q: Paste information from program to datagridview

d0m1n1cAt work, we use a program to match certain data. I'm currently working on a solution to take those matches and insert them in a database. But in order to do this, I want the matchresults displayed in a datagridview. So far I've tried to use a code from this awnser. The problem that I'm having, ...

 
1 hour later…
08:05
Stackoverflow is not meant for code review — João Matos 24 secs ago
0
Q: Asking data to a Servlet from jsp and send them back to the jsp

NoProgImage that a user have to book a private lesson by compiling this form. Using MVC pattern I'm building a WebApplication to achieve this goal; I have a jsp wich contains the form and by using Ajax I want to send data to a servlet which is my controller. This servlet comunicate with a DAO and on...

08:25
0
Q: Finding the upper and lower bound using binary search

Karan SinghI am trying to solve this InterviewBit question https://www.interviewbit.com/problems/search-for-a-range/. My code for this seems to be working properly and it does give me the correct answers on my IDE and on all the sample test cases online but it gives me a TLE on the online judge. It runs in...

08:48
09:00
I'm voting to close this question as off-topic because it is asking for a code review (and this thus too broad / opinion based). It could probably be adjusted to be on topic for the code review stackexchange. — Quentin 39 secs ago
This question should probably be posted on code reviewlovelace 45 secs ago
09:16
@j_kubik: I wrote a patch for Qt to make it use wl_proxy_get_listener, reviews welcome ;) — bobbaluba 9 secs ago
This all looks very weird to me. Constructors outside a class, variable method calling, two different languages, several pieces of code. I guess that it all make perfect sense to you, but I can't figure out how it all hangs together. Please don't post it like this on Code Review, read the guide there first. — KIKO Software 41 secs ago
 
1 hour later…
10:34
@CaptainObvious syntex. Well, there's your problem.
@DerKommissar Shiny, but I suspect the post right under the left monitor of your 3-monitor set-up is going to annoy you within weeks.
-1
Q: Factory Pattern using enum vs switch case

saif aliI have been working on implementing the factory pattern to my project, I found I can achieve it in two different ways. 1 Using switch cases and returning the implementations public class Factory { InterfaceName inter = null; public static InterfaceName getInstance(String type) switch (ty...

10:55
@Mast Welcome back(?)!
@Graipher Yes, yes, kind-of.
Made some changes, got a plan, a lot of work ahead of me, but at least I now have time for CR again. Which is the important part, isn't it?
7
Currently walking through the review queues. 20 posts in the CV queue alone, sheeet.
11:13
0
Q: Onclick radio buttons to change background color

vickey colorsWe are displaying two radio buttons in page.... Click on Radio buttons, it will change background color, need review on quality of code, is there any way to improve ? html, body { width: 100%; height: 100%; margin: 0; padding: 0; text-align: center; } body { box-sizing: border...

If you don't actually have problem with your code besides curiosity or willingness to improve, try out the Code Review SE forum. — lucasgcb 50 secs ago
12:05
@Mast Yeah, it feels like it has been piling up slightly, recently. I did 7 today and like 14 yesterday...
12:36
@Mast So far it's not bad, actually. I am going to replace it with something slimmer, though.
I'm also going to pick up a triple monitor mount for that set to get them off the desk.
12:54
-2
Q: Cleanest C++ and best practices

o2640110I'm new to C++ and while learning, I wrote a simple program that ask for a word, shuffle the characters and ask another person to find the original word given the shuffled letters. I would like to know what is right and wrong in this code, what and where can I improve. Code: #include <iostream>...

@Graipher Good! Unfortunately the community needs more than 1 person stepping up daily.
Heh, I noticed I'm close to 2k CV reviews. Just like you @Graipher
13:12
@Mast Hehe, true. Still contemplating whether I should stop at 2000 like Stephen Rauch or just keep on going :D
13:53
0
Q: Function that checks two objects with same fields and assigns old non-null values to new object if new values are empty or null

legoMyEgoI have a function that checks two reference objects. They both have the same properties. The purpose of this method is to ensure that any non-null old values are not overwritten with null or empty values after an API call. I'd appreciate any feedback. evaluateEmptyValues: function(reference, o...

14:17
I just know it right now and I think about you. Here there is a stack plateform for your kind of question. I think and hope you will receive more answers and view. — AvyWam 59 secs ago
14:46
0
Q: Cleanest way to get value from secondary form

Daniel DeesI've written a simple program that reads barcodes from a page and will ask the user to select one to use. I have a few methods that use the results of that form and I was wondering if there is a better/cleaner way to execute the following code: var barcode = ""; if (barcodes.Count > 1) ...

0
Q: How overly-cute and/or heisenbug-laden is this method of adding commas to integers (12345 -> 12,345)?

i336_Beginner/occasional C tinkerer here. (Reasonably comfortable with scripting languages, tend to avoid C due to its terseness, but trying to work past that.) So, I happened to want to insert commas into some integers (a, uh... few hours ago). I got curious about various interesting (non-string-bas...

14:59
Monking
15:17
15:30
@Graipher I thought about it too... but know there are posts that deserve to be closed...
15:50
possible answer invalidation by Emma on question by Emma: codereview.stackexchange.com/posts/215394/revisions
16:05
Monking
16:19
Check out our sister site Code Review. — Code-Apprentice 47 secs ago
@CaptainObvious skeezus- nesting levels!
16:42
0
Q: GUI that searches files using user inputted search strings. Trying to speed up the REGEX search

ace1ericBasically, I've got a GUI where the user can select text files, enter in strings (that may or may not contain wildcards) and search those files for those strings. Currently, I take the user inputted string(s) and divide them into two groups: regularly searchable strings, and strings that have wi...

17:03
If your code isn't working, give a Minimal, Complete, and Verifiable example. If it is, see Code Review. — jonrsharpe 1 min ago
I'm voting to close this question as off-topic because this belongs on Code Review. — Jesper Juhl 22 secs ago
@JesperJuhl afaik codereview is a bit picky about reviewing correct code. This here seems to be a question about finding a bug disguised as a review request ;) — user463035818 8 secs ago
0
Q: Binary genetic programming image classifier's fitness function improvement

GabrieleI am trying to figure out how to improve my binary image genetic programming classifier's fitness. It takes images and classifies them if it has some feature X or not in it. These are the main points: It takes an image and looks at the first 8 x 8 pixel values (called window). It saves thes...

-1
Q: A tale of two while loops

Rafael VergnaudWhich would you use? Is the second even viable? int fit = 0; size_t cap = m_cap; while(cap * m_factor < size) { cap *= m_factor; ++fit; } or... size_t cap = m_cap; while(cap *= m_factor < size && ++fit)

0
Q: Statistical methods using PHP (mean, co/variance, standard deviation, skew, correlation)

EmmaFunctionality This class has a list of basic statistical functions such as mean, variance, standard deviation, skewness and so on and it works okay, running these functions over past 30 days equity charts. It extends a mother class that estimates very close future prices of a list of equities ...

I am not sure that this question belongs on code review even though it asked for a code review because at the end it said that the it doesn't give the correct answer. — drescherjm 14 secs ago
17:55
possible answer invalidation by Emma on question by Emma: codereview.stackexchange.com/posts/215394/revisions
@Duga looks like input/output simplification, not code changes
18:31
I built a dynamic userform based on the example code on Code Review by @Tinman and it worked very well. I think this type of form, where you can add as many rows as needed, would be an easy to use front end for your users. — PeterT 38 secs ago
18:52
Your question is too broad for SO. Maybe try codereview.stackexchange.com. — isherwood 54 secs ago
 
1 hour later…
19:59
0
Q: First Wordpress plugin to create page-specific categories

AlbI would love some feedback about this very simple Wordpress plugin (my first one). It's intended to create page-specific categories (via the creation of a custom taxonomy). It's working on my staging website, would you consider it safe to publish it live? Any feedback appreciated, thanks! <?p...

20:16
0
Q: I have a small Open Source project I'd like reviewed

user949300Is this the proper place? It's a node.js module intended as a possible alternative to Helmet. If this is not the place, any suggestions? Thanks. Hmm, apparently I must include at least three lines of code. Here's how you would use it: // declarative style let kepi = Kepi({ 'X-Powered-By':...

20:33
This might be something for codereview.stackexchange.comPhilipp 22 secs ago
21:29
Hi Moha, Welcome! Would you be so kind and add this question on Code Review. They will review your codes for performance and efficiency. Thank You! — Emma 50 secs ago
21:41
I understand the you're looking for improvements/suggestions but SO is not for code reviews or subjective questions. The question is "primarily opinion-based", which means: "Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise."Zim 25 secs ago
22:12
0
Q: Load content from files (and sometimes parse) in Sapper

DžurisI am making my first Sapper app and the pages are all in routes. I am now extracting the content into a separate directory and unsure if I'm doing anything right. Here is an excrept from my directory structure: content |- index.md |- services.txt |- about |- index.md |- technologies.html ...

 
1 hour later…
23:35
0
Q: When to couple output from one class as the input to another class?

KubiK888I am trying to better plan the class structures of a large code base in python. The project is a data science project involving data cleaning, data analysis, etc. I model all the data cleaning tasks as one class object, and all the data analysis tasks as another class object. Under the Data_Clean...


« first day (2174 days earlier)      last day (2139 days later) »