« first day (1514 days earlier)      last day (2506 days later) » 

12:00 AM
RELOAD! There are 4039 unanswered questions (91.0453% answered)
 
@Mast these guys were so funny
anyone know about Crowd testing? I want to check out being a Crowd Tester to make some money on the side
 
12:54 AM
0
Q: Shuffle method should swap two random indexes 30 times

user142036I'm having a bit of an issue getting 2 random indices of an ArrayList and swapping them 30 times within the same array. I'm not sure if there is another approach I can take besides the one I have written here public static <E> void shuffle(ArrayList<E> list){ Random rand = new Random(340L...

 
1:14 AM
0
Q: Javascript Charset Polyfill

3.1415926535897932384626433833I am attempting to, polyfill the broken character encoding system in javascript. For example, characters such as 😒, have a length of 2 and are treated as 2 separate characters in regular expressions when they should have a length of 1 and be treated as a single character in regular expressions. ...

 
2:10 AM
I'm voting to close this question as off-topic because this code is working. If you ask for a review, you must post your question on codereview.stackexchange.com. — Stargateur 58 secs ago
 
2:20 AM
possible answer invalidation by alecxe on question by Alexa yuki: codereview.stackexchange.com/posts/164897/revisions
 
2:35 AM
0
Q: Making a website for practice that searches sites, some embedded, some external

KylethedarknI'm knew to this place and new to web design in general. (I only started yesterday morning) But I have been reading up on various code and using it to make this web page for practice. I've learned a lot so far, but I've got a long way to go. So basically, my wife was sick of having to go to a bun...

 
2:49 AM
-2
Q: Help with rubber duck debugging

AndyHasItA lot of developers swear by a technique called rubber duck debugging, so I decided to try it out for myself but am not seeing the promised results. I just got stuck with a really tricky bug in a large Django app, so I reached for my rubber duck, placed it next to my laptop with the screen unloc...

Absolutely priceless (and I'm sure will be quickly deleted)
 
@RubberDuck You should have played your character better. ;)
 
I'm tired and out of practice.
 
3:36 AM
2
Q: Removing code duplication when working with dynamic classes in C++

ZammbiI have a bit of code duplication and trying to figure a better way to reduce it. I'm looking for any suggestions. If this was in Java I could easily use reflection. The code posted is a basic sample but hopefully, gives the idea of the duplication problem I'm having. The application is made up...

 
3:50 AM
1
Q: React.JS functional paradigm

MikeI have some (minimal) experience with the functional programming paradigm and I'm new to React.js and reactive programming. I'm trying to get a flavour for the React.js philosophy and I keep seeing references to functional programming, which has gotten me very excited. I've been experimenting wi...

 
4:21 AM
Monking
 
4:36 AM
Monking
 
It was like beginner needs help looking over web code. Wouldn't let me post that no matter how I phrased it. Also I did go ahead and post the updated version as a code review. Here it is. — Kylethedarkn 29 secs ago
 
 
1 hour later…
5:57 AM
0
Q: Terminated due to timeout Mapping phone numbers

Herman Andres FigueroaI have a code based on the following problem "Mapping phone numbers to names", the problem is that when they are going to process large data(+100.000) the program ends by timeout. my code and problem is this, how can I optimize my code to consume less time? my code function processData(inpu...

 
6:32 AM
0
Q: Civilization Wars Game

OdepaxI developed a mini game in Java Swing for the University; I'd like to carry it on as a personal project. But before that, I'd like to know if what I've done so far is correct or not. The game itself is a Java implementation of the Civilization Wars Flash game: there is a rectangular map with bui...

 
6:52 AM
So now that all the actual co-workers found that I'll leave the company, they started making fun of me. But I'm also laughing back and say: At least I'll do what I love
 
7:43 AM
2
Q: Comparing almost equal Counters

Dror AtariahI'm using (abusing) collections.Counter to hold non-negative floats. Something like Counter(a=4.5, b=3.4). The problem I faced is that in some case, when comparing two counters, I ran into accuracy issues. Thus, I needed to use something like unittest.TestCase.assertAlmostEqual. However, abs is n...

1
Q: Baconian Cipher Python Implementation

N_PalashI have been trying to implement various substitution ciphers in python. I implemented the Baconian cipher using a dictionary in which the plaintext letters are keys and the ciphertext letters are the corresponding values. Is there a way to make the following code shorter or more efficient or is t...

 
7:57 AM
0
Q: Rust GitHub Repository Downloader

SkyI made a little program that allows users to download a local copy of all their GitHub repositories for backup purposes. I've tried to write idiomatic Rust code, but I'm sure there are ways I could improve my code as a novice: extern crate github_rs; extern crate serde_json; extern crate hyper; ...

 
8:14 AM
 
8:26 AM
If there is no issue with your code, it might be a better idea to post the question at Code Review. — Wiktor Stribiżew 37 secs ago
I'm voting to close this question as off-topic because it is better suited for our sibling site Code Review. — Klaus D. just now
 
Kaz
Monking @all
 
8:58 AM
0
Q: Ideal way of suspending and resuming threads in python

Anurag SharmaI am new to thread programming in python. I am trying to read message from azure service bus, the message may or may not be present in the queue. So this is the logic I come up with bus_service = ServiceBusService( service_namespace='eventservice', shared_access_key_name='key-name', shared_acce...

 
Monkin
 
@skiwi I still got a full rewrite of that thing lying around somewhere ...
 
9:17 AM
0
Q: Am I using re.compile correctly?

Inherited GeekI need to use regex for some stuff (mentioned in code comments) and wrote the following code, which works perfectly fine for my need, but I wanted to know if there was a way to improve this code? Am I using re.compile correctly in this case? import re def regex(utterance): utterance = utt...

 
9:39 AM
I think codereview.stackexchange.com is a better place for this question — Dekel 42 secs ago
 
9:53 AM
You might do better on this question if you post it to the Code Review site - they deal with improving the performance of code whereas Stack Overflow is more for code that doesn't work — Dave 28 secs ago
 
10:11 AM
If you don't have an issue with your code, I suggest you post it on codereview.stackexchange.com not here. — evolutionxbox 1 min ago
 
10:25 AM
0
Q: ndoe.js error handling using merely if else without try catch

alex johansonI'm confused why you need to use try catch. I made a simply utils like this, and use it on my models' callback. in my utils/error.js module.exports.handleError = (err, errMsg, res) => { res.json({ success: false, msg: ${errMsg}. ${err} }) } Then I have this in my router...

 
10:38 AM
@Vogel612 Are you more crazy than me?
 
SO is for fixing code. Best practices appear to belong on softwareengineering.stackexchange.com or codereview.stackexchange.comCees Timmerman 33 secs ago
 
@skiwi you didn't notice that yet??
 
@Vogel612 @skiwi there's a saying: I don't suffer from insanity; I enjoy every minute of it! I think that's true for every single programmer
5
 
11:06 AM
You should consider posting your code for review here: codereview.stackexchange.comColdspeed 19 secs ago
 
0
Q: Error handling in express-like middleware

NazarI have an idea of two ways of handling error. The first one: (req, res, next) => { if (!req.user.isOwnerOfCompany(req.user.currentCompany)) { next(Boom.forbidden('Only company owner can add a bot')) return } next() } The second one: (req, res, next) => { let ...

0
Q: python indexing-code optimization

susduI'm writing a plugin to a text editor that will perform indexing of large code bases. The indexer will retrieve all function calls for a certain function (much like the functionality of full featured IDEs). I know that using regex to parse languages is a terrible idea. However: It should be a...

 
@KyleKhalaf (and upvoters), the question clearly states "* this approach is not giving correct output always*". That means it is not on topic for Code Review. — Peter Taylor just now
 
11:21 AM
ohai @EugeneProut welcome to the 2nd monitor
 
11:32 AM
0
Q: How do I scale my Web API with latest attributes and error handling

SimsonsI have a code challenge and writen following API code but some how it needs improvement. For example I could use IActionResult than using HttpResponseMessage. What are other considerations and why should I use them? Controller 1: public HttpResponseMessage Get(int a, int b, int c) { ...

0
Q: First year CS student hoping to get some refactorization advice

EloteI started coding at the beginning of the year in Java and I am a first year computer science student. I just finished the first trimester of the course and for fun I created the game "Othello." I would like help with refactoring my code as I think it is probably extremely messy. I have no idea ho...

 
12:03 PM
0
Q: Finding a repeated pattern and doing something with the match

Maarten BodewesI have several implementations of finding a repeated pattern and acting on the matching input if it is found. So I want to find this <pattern><pattern><pattern>... or, using regular expression-like syntax: <pattern>* without any additional input before or after the pattern. The additional req...

 
12:29 PM
@pollaris: A lot of this hinges on how good you want to make it. MVVM is considerably better than my suggestion, but it might also take a considerable amount of extra effort; since you are dealing with an existing code base that needs to be refactored. You might get a more in-depth answer on CodeReview.SE; as this is mainly concerned with refactoring (without going overboard) rather than a technical problem or error. — Flater 58 secs ago
 
12:43 PM
0
Q: Objects comparing using es6 syntax

fooI have made a script to compare 2 objects in javascript. My script is using for these types: undefined, null, object (not include an intance of a class), an instance of a class, class, NaN, Infinity. Requirement: es6 let _x = Symbol('x'), _y = Symbol('y'); Object.prototype[_x] = function ...

 
@Olaf after another code review, we infact don't know what is the problem because there is no visible size of dest_buff, therefore my answer is useless. — tilz0R 34 secs ago
 
0
Q: Smallest difference of pair in String-array

Kevin CruijssenLet's say I have the following array of Strings: String[] rows = new String[]{ "", "A", "B C C", "", "B D E", "E F G H" }; As well as the following pairs: String[] pairs = new String[]{ "H F" "A B" "A E" "G B" }; How can I calculate the smallest difference between the tw...

0
Q: c++ qthred For the Oscilloscope LAN cumminikation

user3860708I have written a Class for LAN communication using an Agilent Oscilloscope. I would like you to your opinion what I can change with this code, so it work without problem. I would like to know your opinion, how I write this code better and efficiently. I would like to change this class maybe wi...

 
1:24 PM
0
Q: Pattern matching (like regex)

Coal_This is a much more bascic implementation of Regular Expressions (Python docs). Do note that core functionality is missing and the functions aren't completely fool-proof, but it does a good job of matching basic patterns. Also, filtering 'symmetric' patterns (like quotation marks "" or markdown b...

 
If your code work and you're just looking to improve it and get feedback, consider codereview.stackexchange.com/ instead. — DangerZone 22 secs ago
 
0
Q: Extract html content based on tags, specifically headers

oba2311I want the function to take as an input json file containing html_body with its corresponding url and return list of tuples containing headers and their corresponding url (so could be tuple with one item as a list of the headers). So far I have been able to do so, but I'm missing some headers an...

 
1:45 PM
Thanks, I wasn't aware of the codereview site, I'll try it there — Erik Felde 35 secs ago
 
1:57 PM
Greetings everyone.
 
Greetings :)
 
2:07 PM
Has Stack Exchange changed anything recently?
@SimonForsberg And then it says you need to add more details, I didn't know your UI has gotten so frustrating. I tried to edit this in for Elote but that failed as well. — Maarten Bodewes 8 mins ago
 
@SimonForsberg Yes.
25
Q: Code Review Clippy

Shog9A while back, y'all asked for some warnings for folks asking questions here: What would Clippy say? After thorough review (mostly by animuson & JNat), we've determined that the following warnings can be implemented, based on question title matches: \b((do(ing)?\s+this)|(this\s+(\w+\s)? code)|me...

Yup, this one is possible - there's a ratio check that attempts to mandate a small amount of not-code for every line of code. That's enabled as of right now. — Shog9 ♦ May 23 at 23:08
 
This should probably go into the code review section. And edit your title, because your issue isn't getting colors from images. — Chris G 55 secs ago
 
2:20 PM
0
Q: Calling SpringMVC controllers through JQuery

dannempI have a Spring app. I am new to front end development and to JavaScript, I am learning on the fly. I chose to firstly go with javascript+JQuery instead of any framework, such as Angular or react, because my app doesn't have so many interactive features. My script is mostly making AJAX calls t...

0
Q: First Go application

LucaGood afternoon, can you share with me your opinion on my first go app? It's not complete yet, but I don't see a reason why to go on if it sucks already. https://github.com/LuCavallin/yfirbord-grovepi Let me know. Thank you!

0
Q: using numpy to scale data in 2 out of 3 columns

user7875185The below code takes a csv containing age, weight, height and prints the betas determined through linear regression to an output csv. It runs for 10 iterations using a different alpha for each, and prints the results of each iteration on a separate row of the output csv. In particular, I'm wond...

 
2:35 PM
0
Q: Parallel searching of documents C#

Erik FeldeI'm trying to search a bunch of .docx files but it runs very slow downloading the files into the stream. I'm sure there's a better way to write the search, (perhaps multi processing) but I don't know how to tune it up and speed the search up. bool found = false; Hearing h = new Hearing(); Stre...

0
Q: Assembler-program which reverses the content of EAX

mizechFollowing exercise: "Write a program that takes a number (of size 4 bytes) x as input, and then reverses all the bits of x, and outputs the result. By reversing all bits we mean that the bit with original location i will move to location 31-i. Small example (for the 8 bit case): ...

 
2:49 PM
0
Q: Does this class have too many responsibilities?

w0051977Please see the code below: public class Customer { public int _iD { get; set; } public decimal _salary { get; set; } public List<String>_assignedOffers { get; set; } private AbstractValidator<Customer> _validator; private IRulesOfferCalculator _rulesO...

 
3:03 PM
@CamilleSébastienNiessen That's what a code review is for ;-) — gus27 5 secs ago
 
I was banned from the airliners.net photography forum by concerned moderators after the end of my lens started brushing against planes as they flew by.
5
 
3:18 PM
This is about codereview and should be ask at codereview.stackexchande.comJens just now
 
4:00 PM
Monking
@Vogel612 Well yeah... I should've known
 
1
Q: Nullable<T>; header-only value semantics for forward declared types

TomMotivation: I found myself with class members of forward declared types in a header, such as: struct A; struct B { A* a; } // B.cpp include "A.h" // do stuff with a real A The problem is that this prevented me from using the default move/copy ctors of B while preserving value semantics ...

1
Q: Getting hex colours from a image

Ergun PolatI am trying to get the hex colours from an image. The problem I am having for some reason randomly the code causes high CPU usage, which times out the browser and I am not sure how to optimise the code. I am not sure where the high CPU usage is. I've tried adding set-timeout but with no luck. Th...

 
@Walter, I should probably not have used the word reviewing, as in I'm not doing a formal code review for correctness as an expert...If it helps you sleep better at night. — S. Mason 31 secs ago
possible answer invalidation by w0051977 on question by w0051977: codereview.stackexchange.com/posts/166680/revisions
 
4:55 PM
@Duga Rolled back.
 
0
Q: Sauna experiment

J.Dhaikthis is my program for a sauna, it is supposed to convert fahreheit input into Celsius output for the machine to understand. The program seems very clunky and I would love some tips and help to improve it. I also tried to do a method overload and use the math.random function to have the ability ...

 
Cross-posted to Code Review; the question should probably be deleted on Stack Overflow. — 200_success 14 secs ago
 
5:16 PM
I see nothing wrong with your proposed solution, though I'd prefer static_cast<void>() instead of a C-style cast. And a side note, I suspect this question would be better asked on the code review stack exchange since it's asking for a review of working code. — cdhowie 48 secs ago
 
5:31 PM
Anyone here use React Native at all?
 
5:50 PM
I'm voting to close this question as off-topic because improvement of working code belongs in CodeReview.StackExchange.com — Prune 12 secs ago
 
6:04 PM
"What's the best way of doing this?" Sounds quite opinion based. Did you try anything yourself already? Did you get stuck with that anywhere? If you have something working you probably should better expose your code at SE Code Review to ask for improvement. — πάντα ῥεῖ 41 secs ago
 
6:31 PM
0
Q: Is this code structured/styled properly?

JessieI have been learning webdevelopment at Freecodcamp and have therefore been writing a lot of javascript by myself. They have a code-review chatroom, but the people in that chatroom seem to review the final product and not the code itself. So, I am searching for some constructive criticism about ...

 
7:03 PM
This question isn't really on topic for Stack Overflow. Perhaps you'll have better luck asking the guys over at Code Review S.E.stybl 15 secs ago
 
0
Q: Cannot able to understand a program in python

user85899 What is the use of not return and how is this working? Basically i need explanation of the program. Regards.

0
Q: Is this code PHP resistant against injection?

SoccerlifeIs this code resistant against injection? I already used 'real-escape-string' but I don't know if this good enough. As you see I replaced my personal info. And the code does work. I'm building this site for a family member so it needs to be very protected against 'hackers'. Thank you in advance. ...

 
This might be better asked on Code Review, but please read their How do I ask a good question? first. — Mike McCaughan 45 secs ago
 
7:50 PM
0
Q: Increase speed of cythonized Sutherland-Hogman

jeanI want to cythonise the python implementation of the Sutherland-Hogman algorithm. This algorithm updates a list of vertices according to pretty simple rules (being inside or outside an edge, etc.) but the details are not important. Here is the python version it accepts lists of vertices of polygo...

0
Q: parsing log file and get time difference between two timestamp actions in python

carlottaI am quite a beginner in python, so probably the taks I would like to perform is relative simple. I have log files with first column timestamp and second column describes the action, and I need to get the time difference between two actions. The log file called log.txt looks like: 2017-05-11T12:...

 
8:33 PM
0
Q: Two cases of a switch with similar blocs of code

StudioWorksIs it possible to merge these two cases into one so I don't have what is basically duplicated code except for the cast part? case ScheduleActionsMediator.ACTION_CREATE_RENDITION: final List<CrewMemberVO> crewMembers = new ArrayList<CrewMemberVO>(); CrewMemberRendit...

0
Q: Check for null object before assigning value to property

Ronald McDonaldI was told to convert this to use null coalesce instead of checking for null. In all of the examples I found for null coalesce the "??" were used on the right side of the "=" sign and not on left. I'm not sure how to do that, or if there is a better way to check for null in this situation. if ...

 
8:55 PM
0
Q: Cordova Navigation Bar

DairI am exploring Cordova and made a navigation bar. I created a new Cordova app and changed the following files: www/index.html <!DOCTYPE html> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this ...

 
9:17 PM
@CaptainObvious It's kind of empty, but it does exactly what OP wants it to do, so I guess it's allowed.
 
monking
 
@Prune I closed my question and moved it to codereview but another user told me that SO was more likely to get good answers so I reopened it but I understand your point. — jean 33 secs ago
I don't think something being on-topic for code review automatically makes it off-topic here, and you probably are more likely to get good answers here. I don't think computeIntersections and inside are your real problem right now, but you could make them cdef and add a return type. — DavidW 17 secs ago
 
9:43 PM
0
Q: CLIGL - A library for command line graphics

Ethan BierleinAbout a year ago I wrote a small library for drawing graphics on the windows command line. I mostly used it for small projects, like a raycaster and a raytracer. I just rediscovered it today, at the time of me writing this question, and decided that it needed a review. The library is split into ...

 
10:41 PM
0
Q: Speeding up Leaflet app with GeoJSON data?

O' BieitoI am working on a Leaflet app which will be displaying five layers with about 1k points each. For our purpose (basically in order to locate most of the points near to a road) we don't want to use clustering; instead, we want to filter the amount of points on each zoom level, so there are never ...

 
11:31 PM
0
Q: Improving Driver and Constructor Classes in Java

M NicoI will begin this question with the disclaimer that it is homework but my code is written and working, I just want to know if there any ways in which I can improve what I already have. I want my programs to be as clean and easy to understand as possible. My task is to Build two classes (Fractio...

 
11:46 PM
There's a stackexchange called code review for this kind of thing — Keith Nicholas 41 secs ago
I'm voting to close this question as off-topic because it belongs on CodeReview — Keith Nicholas 43 secs ago
This is the sort of question the Code Review can answer. (And I don't know C#, but this sort of stuff $"{((char)101).ToString()}" is not good whatever the language!) — Ken Y-N 43 secs ago
 
0
Q: (SBCL) ASCII Game of Life

plishplopI'm implementing Conway's Game of Life in lisp to familiarize myself with the language, with the eventual goal of hosting it on a website with a pretty gui. I'm a hobbyist and inexperienced (this is my first project where there isn't a tutorial that can show me how to do everything I want), so an...

 

« first day (1514 days earlier)      last day (2506 days later) »