« first day (1678 days earlier)      last day (705 days later) » 

12:00 AM
RELOAD! There are 4817 unanswered questions (90.2585% answered)
If your code works but you'd like to optimize it, perhaps CodeReview would be a better suited audience. — mickmackusa 32 secs ago
12:31 AM
Q: What is this "No Hand Hold" thing in the P-51 Mustang cockpit?

Jonathan IronsDoes Anybody remember Combat Flight Simulator WW2 Europe Series ? In the P-51, there is a "something" with "No hand hold" text on top of it What is that ? Image source

It's because it's a military aircraft and the crew are supposed to be focused on the mission and not doing romantic things like holding hands. In planes with one seat behind the other, there's also a "NO NOOKIE" sign in the back seat. — David Richerby 11 hours ago
@DavidRicherby I just nearly laughed chips out my nose. — yshavit 5 hours ago
@Phrancis I wonder why AJ123 said "Oh. This is bad" - perhaps just reading about what it does after it makes the dirs... or else the print statement :)
1:02 AM
@SamOnela Oh wow that's hilarious
This question would be better asked on codereview.stackexchange.com. — Mark Thomas 58 secs ago
1:27 AM
Q: Shell script to create a boilerplate proyect

bukindThis is actually my first shell script and I just by looking at it I can have a better look. I use Elixir and Phoenix for most of my projects and I started using Zurb Foundation 6, changing from Bootstrap to Foundation is kinda tiresome sometimes so I decided to make a script to automate this pr...

1:45 AM
Q: Excel VBA code needed

GKohlI have an Excel spreadsheet with 1000 rows. Each row contains a customer name in column 1 then in column 2-13 is even amount. I need to create a new spreadsheet that has only 3 columns...Customer...Month...Amount. The kicker is that if the month is blank it needs to be ignored unless there is an...

2:06 AM
@CaptainObvious You could just hire someone to do it for you in exchange for, well, money.
2:34 AM
It's gone.
3:06 AM
@Phrancis Part 1 of my database application is up for review. Even though it's not tagged as , because part 1 doesn't actually care about the database.
Part 2 should be finished quite soon.
Only took me a year to get 1/3 finished.
This is off-topic for StackOverflow, as it's broad and opinion-soliciting. That said: This might fit at the CodeReview StackExchange. — David Makogon 50 secs ago
@DavidMakogon Nope, example code is not welcome at Code Review. — Mast 49 secs ago
3:22 AM
Captain Slowpoke.
Q: A database of books, part 1

MastBackstory I collect books. A lot of books. Whitepapers, (programming) cookbooks, transcripts, important letters, overviews, you name it. Usually in PDF, otherwise my house would be too small. To keep track of those books, I use an arcane collection system based on notes referring to notes. This...

Q: Read stock files, gets the candles sequence and makes a report - follow-up

DiDiMy first question: Read, calculate, write The only thing I kept is the function try-block. This is still a work in progress, that's what I have done so far. Source: // this program read stock files, gets the candles sequence and makes a report // about the patterns it founds and how many tim...

Interesting solution but far from the one liner I was looking for. This will never pass code review ;) — klugjo 7 secs ago
3:41 AM
Q: f-string vs format

Jose TroncoI am reading a tutotial, in which all example apply f-string that introduced newly in Python3.6 An example as follow. class Car: def __init__(self, color, mileage): self.color = color self.mileage = mileage def __repr__(self): return (f'{self.__class__.__name__}('...

Q: Recursive Ruby merge sort

Dmitry KudriavtsevI have implemented a merge sort in Ruby. (Yes, I know, there's Array#sort) I would like to get feedback on code quality and optimization. def merge(a, b) result = [] while !a.empty? && !b.empty? if a[0] <= b[0] result << a.shift else result << b.shift end end re...

Q: Combine JSON Articles into singular CSV (Node/JS)

DNorthrupSo I have a few brands that send me several thousand JSON documents a day - 2 types. 'CREATE' and 'REDEEM'. I originally created a massive script to dynamically pull, but once we agreed upon specific headers(They were random before), I decided to re-write it. Kind of simplified, but curious about...

Q: java code that searches for records in a text file

Cosa RamirezHello can anyone please help me to find the problem with my code? The program basically searches records in a text file by Country [c], organization [o] and by both [o,c]. you can also type any arbitrary string of an organisation (eg. technology) and find records which have that specified string....

4:02 AM
Q: Need to learn how the scanner import works

Sj JohnsonWorthless website I already figured the code out on my own.For new members don't use this website it has all types of bs principles.

@CaptainObvious Please make that go away.
Q: A 3D Force Directed Graph Visualization Algorithm... would you take a look at it?

Joshua MooreAm I missing anything important? https://github.com/thwee-alchemist/fourd.js

Q: Clean up exception handling of html parsing code

Oscar SmithI am currently working on a program that will scrape data from a psych database of various article metadata. Since not every piece is formatted perfectly, I have accepted that some of the info may not be found. That said, I still want to fill in whatever I do find. As a result I've wrapped basica...

4:56 AM
7 badges on a site I never answered a question or posted one. Sometimes I wonder whether I'm doing it all wrong...
5:30 AM
@aneeshjose I think I worked out the problems I was facing with the wild pointers you were talking about, and now that I sort of fixed the problem(and since the code is working), I have submitted it here codereview.stackexchange.com/questions/182136/… for review. If you could check it out, that would be of great. — Devanshu Misra 14 secs ago
5:43 AM
Q: Cannot find issue that arises from hidden test cases (python word boggle)

Alexander KhazatskyI'm having a huge amount of trouble passing the hidden test cases. I pass the 5 I can see, but not the last 2 hidden cases. below is my code, and the instructions: Boggle is a popular word game in which players attempt to find words in sequences of adjacent letters on a rectangular board. Give...

6:31 AM
@Heslacher Monking
6:58 AM
I think it is more suitable for codereview.stackexchange.comsheldonzy 53 secs ago
7:33 AM
This may be more suited to codereview.stackexchange.com. — John Moon just now
I'm voting to close this question as off-topic because Stack Overflow is not a site for code reviews. Try our sister site codereview.stackexchange.comtripleee 21 secs ago
7:55 AM
@sinisake "Better place for this type of questions:" Is it possible to move the question to codereview? Or is it necessary to delete here and submit there? — Mark Messa 15 secs ago
8:11 AM
@Rajesh Since there are already some answers here, I guess it is not interesting to move to code review any more ... — Mark Messa 8 secs ago
8:26 AM
If you are looking for a review of your code - or to make it more elegant you could ask on Code Review Stack ExchangeMichael Hancock 19 secs ago
@robinCTS yes that will be ideal, but the content is huge and its not worth it. This quention will also be moved to codereview.stackexchange.com soon — Jeba Prince 51 secs ago
Q: Elliptic curve point multiplication with libgcrypt

gcryptI want to implement an elliptic curve point multiplication (Q=dG) operation with libgcrypt (gcrypt). I write the following code: #include <stdio.h> #include <string.h> #include <stdlib.h> #include <gcrypt.h> //select and insert key and curve parameters char *key521 = "(key-data\n" ...

8:47 AM
9:00 AM
Sounds like it has the makings of a question for the code review site (can’t post link at mo but part of Stack) where questions on efficiency /structuring of working code may be accepted. — QHarr 39 secs ago
9:22 AM
My ( point) ( is) ( that) ( this) sort of style may bring up a lot of discussions in code review. A one space can stand out as much as many, believe me. — StoryTeller 19 secs ago
Q: Randomly generate a Hex Colour code and it's contrasting colour using Python

FendecI am attempting to generate a new colour and it's contrasting colour with this python script. I plan to try to make a web app that is different every time it is loaded (i.e. background and text colour) I am wondering if there is a better and more efficient way to do this? Here is my code: imp...

I can get ( this ) or (this), but I'm afraid ( this) is always gonna be an issue with me in code review. But YMMV :) — StoryTeller 57 secs ago
1 hour later…
10:32 AM
this question is suitable for the plateform:- google.co.in/…Alive to Die--Anant singh just now
I'm voting to close this question as off-topic because it is suitable for :-Code Review siteAlive to Die--Anant singh 28 secs ago
10:51 AM
Q: Listener repeat fire issue

dhineshhtml file within iframes in my application , when make click action in that video.html at that time added one post message window.parent.postMessage(status, '*'); In parent page using this listener to get that post meassage is working fine var listenMessage = function(msg) {var processCallMsg = ...

Technically it's all right, it should be just 3 times shorter and without that awful "die" stuff. For the full review post it on the codereview.stackexchange.comYour Common Sense 27 secs ago
codereview - Will do. Thank you everybody! — natanelg97 10 secs ago
If the code works, then I think this question is more suited for Code ReviewFCin 29 secs ago
11:18 AM
@MrGrj Don't know if you found out Python 3.7.0a3 is an alpha release.
@Ludisposed Monking.
Q: PDO Stmt: Is this how it should be done?

natanelg97Originally Posted on Stack Overflow First of all I want to say that I'm new to PDO. I did tried it once but since I found the oop solution complicated and even impossible (SELECT * FROM table_name) I decided to use PDO. But I'm not sure if I do it right, so I'd like to take criticism about what...

@Ludisposed Keep in mind bashing a language's version in a review is usually not productive. There are lots of reasons people can be stuck with it or have an otherwise valid reason to use it and when people have been around using the language for a while, like me, they know there is a major difference.
@Mast actually it's pretty productive for stuff like Java 6 (or even 7 nowadays)
11:28 AM
You can point out how it would've looked a heck-of-a-lot nicer in another version, but that's about it.
because Java 6 doesn't support SSL certs with key lengths beyond 1024bits (which is below the minimum required for all modern browsers)
@Vogel612 Not for languages where backwards compatibility is a problem.
even then. because security fixes are a real thing
And yes, web dev should go with it's time.
This wasn't web dev.
No servers, no connections.
But you have a good point, the moment security is involved, it is indeed productive to bash the flaws in old versions.
@Mast I need to use Python2 for some things as well, (Scapy). For newcomers, I always refer them to Python3. And since you didn't import any Python2 specific libraries, I was wondering what the reason for using this specific version was.
11:34 AM
@Ludisposed Right, it's been a while since I explained that. I'm considering putting a notice on future questions.
@Mast IMO bashing a language's version can be productive, I needlessly used Python 2. However they shouldn't be the only points, because some users can't upgrade.
11:58 AM
Q: Java Parking Charges

SioPao916Can you help me with my problem? I'm just a beginner in programming Create a Program that will accept the following as input: Number of hours parked Parking Level (A,B,C) Compute and display the parking fee based on the following: First 2 hours = 30 pesos Succeeding hours = 20 pesos / hour...

@200_success @Jamal @janos @Mat'sMug @SimonForsberg Could one of you rename [python-2.7] to [python-2.x] as there was a majority in favour when I requested this. I however can't re-name tags. Or should I make the tag, and add the others as synonyms?
12:12 PM
Q: Given a big file containing billions of numbers. How to sort the file?

lahariI think by using external merge sort is possible but my task is to give a java function. Can any body explain how to get it?

12:31 PM
sounds useful
since we want the synonymization anyways...
12:54 PM
Greetings, Programs.
1:08 PM
Greetings, User
1:32 PM
Q: Preventing code duplication in Django

kambiI have these 2 functions that are almost the same: def handle_keywords(self, scan_id): keywords = Keyword.objects.all() for kwrd in keywords: self.process_rss_url(kwrd.rss, SourceType.GOOGLE_ALERTS, kwrd.id, kwrd.last_scan_time, scan_id) kwrd.last_scan_time = timezone.now...

1:46 PM
Q: Input a word and return the corresponding number using strings

marieWrite a C++ program that begins by giving the user three options: 1) Enter a word and convert it to a sequence of numbers (this should be easy!) Example: User input: Buffalo Output: 2833256 2) Enter a sequence of numbers and display a list of all possible words in USDiction...

1:57 PM
CodeReview SE is the place to go in this case. — Piinthesky 11 secs ago
Q: Code that copies files with parameters

Ev. KounisI often find myself wanting to copy directories around with either: having to copy only specific extensions, or having to exclude specific extensions. For this task, I wrote some Python which I am calling from the cmd. The Python script is humbly called copy_master.py and I have also set an ...

Q: JS - longest common prefix

LeffI am made a function for finding the longest common prefix for the challenge on the leetcode site. This is the code: var longestCommonPrefix = function(strs) { let longestPrefix = ''; if (strs.length > 0) { longestPrefix = strs[0]; for (let i = 1; i < strs.length; i++) { ...

The is a question for CodeReview. — Yves Daoust 20 secs ago
3:00 PM
How did you measure the speed? I guess, that everything from this answer applies to C#, too. Note, that you result may be off by orders of magnitude. +++ You don't need a perfect solutions and you've got tons of addresses to validate. What's easier than running both the slow and the fast versions and to compare the results? +++ Nobody here's going to analyse the lengthy code. Maybe on the Code Review sibling site, someone could do it, but I'm rather skeptical. Parsing is just too boring. — maaartinus just now
Q: Vectorizing a sequence "x+1 = f(x)" with NumPy

DelganI would like to populate a NumPy array with "accumulated" results from a custom function. Currently, my code is: def f(x, mu): return mu * x * (1 - x) def populate(x0, mu, n): s = np.zeros(n) x = x0 for i in range(n): s[i], x = x, f(x, mu) return s It does not tak...

3:17 PM
StackOverflow is for specific programming questions. If you want people to review your code, such requests should be asked at Code Review. Not everyone will agree what "poorly written" means. It all depends on what the goal of the code is. — MrFlick 8 secs ago
3:41 PM
Q: JS - Range Sum Query - Immutable

LeffI was solving this challenge on the leetcode site. And my runtime is horrible, it beats only 4% of the other solutions. How can I make this better? /** * @param {number[]} nums */ var NumArray = function(nums) { this.nums = nums; }; /** * @param {number} i * @param {number} j * @return...

4:05 PM
this should be in code review or voted as opinion-based — Fred -ii- 29 secs ago
possible answer invalidation by Ev. Kounis on question by Ev. Kounis: codereview.stackexchange.com/posts/182216/revisions
Hi Fred, Thanks for your feedback. I didn't know there was a code review section, so apologies. I've now removed the escape string functions, I kept them in just in case. I've also read about $_SERVER['HTTP_REFERER'] and I have read a little bit about it, im happy to use it for the time being. I've also removed the password from being stored in sessions. Appreciate the feedback. — Stan Howe just now
welcome, check out codereview.stackexchange.com yet, they're probably going to respond back with pretty much everything that I've written out here. — Fred -ii- 12 secs ago
possible answer invalidation by Ev. Kounis on question by Ev. Kounis: codereview.stackexchange.com/posts/182216/revisions
4:27 PM
Q: Share object between projct packages golang

Jenny HiltonIm kinda new to golong and Im created application which is working as expected My application structure is like following myproj Gopkg.toml Gopkg.lock src server main.go utils file1.go logger.go handler handler1.go han...

Stack overflow isn't for these questions. This should be asked in CodeReview codereview.stackexchange.comEli Richardson 27 secs ago
4:42 PM
Q: Make some inputs inside functions instead of main

PhilipIm very new to OOP, and im trying to do it correctly! I have been doing a simple friendbook where you can add, remove and show the friends you have. However, I dont know if i should be satisfied or not with my code. class Friendbook: listOfFriends = {} def __init__(self, name, lastname...

How do I submit a draft question for code review? I'll need to send question and new code. — Chris 31 secs ago
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.com — mmichael 12 secs ago
Q: c++ MVC delete copy constructor and assignment

Raffaele RossiI am writing a program with C++ and since it is going to be big and a lot of people will edit this, I am going to use the MVC pattern. The question is very easy. There is a controller that is the intermediate between the model (cpp and h files) and the view (made with Qt). Since the controller i...

Q: Golang: Improving communication between workers

user3017869Came back to the software side of my night vision security camera project after taking some time to learn about electronics and I found it a bit hard to retrace the logic of my program. I have a bunch of sensors that communicate their state to different workers and I think I fudged the design bi...

4:59 PM
For a draft I was more thinking just share a paste bin link comment here and I could have a look. Especially if this thread gets moved to chat. Code review you would post your working code for review mentioning the issues about speed and asking for suggestions on improving the code and the speed of execution. — QHarr 43 secs ago
5:11 PM
Since the code works, perhaps question is best suited for codereview.stackexchange.comPaulo Scardine 26 secs ago
5:28 PM
Q: Investigating the behaviour of recursively defined sequence

Naveen GabrielProblem Description: Given is the function f(x) = ⌊230.403243784-x2⌋ × 10-9 ( ⌊ ⌋ is the floor-function), the sequence un is defined by u0 = -1 and un+1 = f(un). Find un + un+1 for n = 1012. Give your answer with 9 digits after the decimal point. Solution: def u(n): f = lambda x: int(2 ** ...

possible answer invalidation by 13ros27 on question by Delgan: codereview.stackexchange.com/posts/182223/revisions
Consider posting this on [code review](codereview.stackexchange.com). — nwp 7 secs ago
5:43 PM
Q: it is skipping past the second if statement and returning to the start of the while loop. why?

b.cliftonwhile money_left != 0: round = round + 1 print(roulettelist) time.sleep(3) print("black or red cost from £5 - £100") print("choosing a number costs a minumum of £100") time.sleep(3) num = input("do you want to choose black, red or a number? ") if num == "black": ...

Q: Rest - can payload contain data from resource uri?

mawekImagine having REST endpoint /users/{userId}/notifications/{notificationId}. When performing post on /users/{userId}/notifications resource, is it OK if notificationpayload contains also userId attribute? { "id":"123", "type":"sms", "userId":"123", "content":"something" } It is a bit redundant ...

6:00 PM
You should only have to randomize it once then just iterate thru the array so each thing comes up once. However, there are some issues: a class would be better than a structure, the Net Random class would be better than the legacy Rnd/Randomize functions and your randomizer method is flawed. There isnt a question, so not sure what you want other than maybe a code review — Plutonix 22 secs ago
@EliRichardson No. Codereview is for judging production-ready code, not about hypothetical example snippets. This question might fit on Software Engineering, but it's on-topic here as well. — Bergi 51 secs ago
posted on December 07, 2017 by CommitStrip

Q: assistance needed tomax up code

TocogirlHow can i get this code to calculate the marks and give the average and percentage? The program just keep asking for students info over and over!!! public class JavaAplication9 { private static int result; private static int percentage; /** * @param args the command line arguments */ public ...

6:29 PM
Q: Which code solution is preferable?

ManelicusI'm implementing an auxiliar global function which has to check whether a given string has correct format (i.e., it begins with a letter and only contains letters, numbers or the "_" character). This function, named ok_tret, will be used in the methods of a couple classes and will help ensure th...

@CaptainObvious Not that I haven't ever done it myself, but ironically "misspells" was misspelled...
If your code works (even if slowly), and you're just looking for ways to improve it, you should ask on Code Review instead. — Ken White 33 secs ago
6:45 PM
Q: Winsock Chat server and client application

VedantI have made a c++ command line chat server and client, its a hobby project, guys can you please try it and find bugs, review it, and tell me if there are any improvements required, maybe even say that "you are amazing, did a good job". The github link is (please read the readme.md carefully) ht...

Q: Vector erase causing 11db output in xCode

Edwardwhile (shapes.size()>1){ for (int x = 0; x < shapes.size()-1; x++){ for (int y = x+1; y < shapes.size(); y++){ if (shapes[x]->overlap(shapes[y])){ std::cout << "Shapes Overlap\n"; std::cout << "Shape " << x << " and " << y; ...

6:59 PM
Q: Code that generates four powerpoints from an excel document

dwironyMy code generates 4 powerpoints from an excel document where I've aggrogated data from my main file. One by one, it cuts and pastes a section of the excel sheet onto an individual slide, replaces some filler words with the appropriate date, saves and closes. My code works, however it SOMETIMES g...

7:11 PM
Hi @Zorkind, this may be a better question for Code Review on Stack Exchange: codereview.stackexchange.com Good luck! — Trevor.Screws 26 secs ago
7:29 PM
Q: Downloading pictures from network cameras

ZorkindI have some URLs saved in my database, to download pictures from network cameras. Because each camera has it's own URL and parameters, we have to store the entire URL in a field in the database. My code gets this URL from the database, creates a WebClient to make the call and downloads the byte ...

7:48 PM
@Ludisposed the optimization part sounds like CR goals so that is fine to remove
OP says the code queries the database but does the supplied code actually do that? Looks like just URL parsing...
@Ludisposed "Query URL parameters" is not that bad of a title. It does say what the code is doing, but not why
@SimonForsberg I guess it's better now, thank you. :)
its more like a code review post — Muhammad Omer Aslam 22 secs ago
8:10 PM
possible answer invalidation by Zorkind on question by Zorkind: codereview.stackexchange.com/posts/182254/revisions
8:20 PM
Q: Finding dupliacte char from string

YsurfI have written a code to find a duplicate char from string Can the code be improved Input: Hello World output : l = 3 its a dup o = 2 its a dup My approach is step 1: sort the string step 2: remove all the whitespace step 3: copy std::string to char [] ...

8:47 PM
This seems like a good question/discussion with your code reviewer. A good code reviewer acts as a mentor and coach and can provide direction and reasoning. Now as a matter of personal opinion, while there are cases where extracting a functionality into its own class/interface is necessary or desirable, I'm not sure this is one of those cases, or I would do it this way. But again, engage in a discussion with your teammate/architect/code-reviewer. And good luck! — Arash Motamedi 24 secs ago
9:06 PM
It's an interesting question, but also its hard to envision that this is a real requirement. If you're all that worried about the state of a thread, I think only a core dump will actually reveal the full state. Exceptions don't show heap memory, and that's going to be part of your state. Personally, I think the requirement is bogus and testing and code reviews should be adequate. If you really need to dig into a JVM's guts, only a full memory dump will do. — markspace 19 secs ago
@markspace "testing and code reviews should be adequate": This is part of testing. Code reviews check for style and basic bugs and in no way substitute for testing. I want this code to be bullet proof but I don't need to dig into the JVM or dump the heap. Unit and integration tests don't do those things and they are still useful. — Solomonoff's Secret 13 secs ago
9:54 PM
Q: Lexer with a parser combinator

CAD97A follow up to my previous question which was on the token library that this lexer produces a stream of. View the full project, the tokens library, the parser combinator library, or this lexer library on GitHub (pinned to the relevant commit). Documentation is available (built from master) for n...

10:30 PM
If this code works fine, then this question is off topic on Stack Overflow, but may be good for our sister site Code Review. — Joe C 45 secs ago
10:59 PM
@CommitStrip FFS, if you do that often, write a wrapper doing the entire thing for you so you only have to wait till the final thing is finished...
@SimonForsberg & others, do you know if moderators can always be pung? As only Simon came up above when I used the @username
@Peilonrayz No, but since half of them are lurking anyway...
Moderators can super-ping users. Users can't super-ping moderators.
pung sounds weirdly painful
@Mast Maybe I however havn't seen a few of them lurk in a while
@Mast or use a decent shell that allows you to do npm install && npm run build
11:12 PM
@Vogel612 Which is just about every shell around, I figure.
I can imagine you want something else to run instead if for some reason the install fails though.
What most shells even support, is sending the next command while the first isn't even finished.
11:48 PM
Q: Create pairs of items with similarity constraints

Seanny123I want to create N pairs of items with no repeat pairs, where each item is only used twice. For example, given the minimal amount of integers greater than 0, one possible set of 4 items would be: [(0, 1), (0, 2), (3, 1), (3, 2)] Another valid example would be: [(0, 1), (1, 2), (2, 3), (3, 1)] ...


« first day (1678 days earlier)      last day (705 days later) »