« first day (1485 days earlier)      last day (2829 days later) » 

00:00
RELOAD! There are 3901 unanswered questions (91.2351% answered)
01:04
Your question might be better suited for Code Review or similar. Please note that cross-posting is frown upon. — Raw N 53 secs ago
01:47
Thanks for pointing to Code Review. I will take a look at that. And regarding broad questions, I was mainly asking about the two specific points I outlined above, so if preferred, I can edit my question to remove ask for broader feedback. — lancery 8 secs ago
Thanks for pointing to Code Review. I will take a look at that. And regarding broad questions, I was mainly asking about the two specific points I outlined above (which I have current solutions for), so if preferred, I can edit my question to remove asking for broader feedback. — lancery 48 secs ago
02:50
@Mast I'm probably restating this, but you need a Book {BookID} table and an Author {AuthorID} table.
Then you have a third table BookAuthor_Map {BookID, AuthorID}.
(Naming convention borrowed from work. Not sure how hot it is.)
03:21
0
Q: Text Adventure Game in Python

EnriqueI'm currently working on a text adventure game for my first project. I am a beginner so I am seeking help with my code. Please comment any tips and general help regarding with making my code better, faster or more organised! I only started Python two weeks ago so any help would be greatly appreci...

03:49
0
Q: Checking if command line input is an integer

iridescentThe code below accepts 1 command line argument from the user. The expected input is an integer. Hence, the code checks if the input is purely an integer. Any feedback is appreciated. atoi() does not provide error-checking, thus the idea is to verify the input before passing the input to atoi()...

04:08
0
Q: Keyword-value pairs in JavaScript

Kevin CrosbyIt seems that after I set out to create a Map object, someone came along and did it while I wasn't watching. I created my HashCompactor algorithm to read through strings character by character like I might stream through a strand of DNA, but I fear .charAt() might put a dampener on the linear dat...

04:28
If you're going to do code review, there's also abuse of match. — Fyodor Soikin 32 secs ago
04:54
0
Q: Java Word Frequency Counter

gommbThis is a simple word frequency counter in Java. I am just wondering if I can improve or compact this code better. You choose a file to be counted with a JFileChooser, and the results get outputted into a file. The biggest struggle I had was sorting the HashMap by values. I got it to work but I...

05:12
0
Q: Kubernetes and Docker compatibility for Flask/Angular/Postgres app

JacobIRRI'm attempting to reduce the amount of steps in getting my app to the cloud and potentially moving it around various cloud service providers as I try them out. Containerization appears to be the central principle here, but I need some advice on best practices: I've got a webapp that I'm serving ...

 
2 hours later…
06:53
0
Q: What is wrong in my solutionof ZCO Video Game?

Aniket ChaudharyYou are playing a video game in which several stacks of boxes are lined up on the floor, with a crane on top to rearrange the boxes, as shown in the picture below. The crane supports the following commands: • Move one position left (does nothing if already at the leftmost position) • Move one ...

 
1 hour later…
07:59
Gotcha. I got caught up with code review style answers. — Svek 31 secs ago
0
Q: C++ Deleting an new object passed to constructor

alexsfxIs it a good practice(or bad?) to do things like this ( deleting an object passed by pointer in destructor): class Widget { public: Widget(Context* ctx) : _ctx(ctx); { } ~Widget() { if (_ctx) delete _ctx; } ...

08:41
Do you have a question for us? This looks more like a code review request, which is probably best made on the code review stack exchange site. — Rook 38 secs ago
09:24
I'm voting to close this question as reviews for code should be posted at codereview.stackexchange.com. — Oliver Charlesworth 52 secs ago
0
Q: matplotlib get_legend_handles_labels always return empty

YochaiI have a problem when adding elements to the same figure. The problem is with the legend. At each iteration I add elements and the corresponding legend. But I want the legend to include all the different elements from all iterations. The problem is that the function get_legend_handles_labels() r...

0
Q: Compressed static file serving in flask

R3turnzFlask comes with built-in static file serving, but compression support is completely missing. I think the way whitenoise implements it and compress files during builds. The following should serve the compressed static files. import os from flask import current_app, request, safe_join def send...

10:14
0
Q: Linked List Stack

Ömer Faruk KurularI have no trouble with my code on working part but I still have some worries if there is something missing so I want a review for my code. Also, I wonder if the exceptions are true type for these methods. public class ArrayListStack<E> implements Stack<E> { private ArrayList<E> list; p...

11:07
0
Q: A unix timestamp microservice.

Dream_CapI have made a small timestamp microservice that converts from unix time to a natural language date, and vice versa. Please let me know of anything I could do better. Here is a demo: https://timestampmsfcc1.herokuapp.com/ Here is the time.js file that holds the class that controls converting th...

11:21
0
Q: Optimization Ideas: HackerRank Similar String

user3833308Problem Statement: https://www.hackerrank.com/challenges/similar-strings I got the logic correct. However it times out for testcase 8 onwards I would like some suggestions on optimizing this code import java.util.ArrayList; import java.util.List; import java.util.Scanner; import java.util.stre...

@Phrancis There's a difference between where not exists and if not exists?
Ah, could well be the MySQL flavour of the same thing.
11:43
Oh, the order of things might be important here.
12:00
0
Q: JWT script that generates token for admin, and validate Token string in Node.js

kidkkrI intended to write this code in ES6. My purpose of this script is when the blog admin has logged in, server will send token with getToken() and when if someone request blog admin operations, then server will validate token with validateToken(jwt_token_string). (sorry for my litle english, thanks...

This isn't really a question about a specific problem, so it isn't really a good fit for stack overflow. You may find a better receiption here: codereview.stackexchange.comRook 16 secs ago
I believe your question better fits for SE Code Review. — πάντα ῥεῖ 25 secs ago
12:26
string interpolations ($ syntax) mixed with new operators (nameof) and the basics of classes/objects/statics can be quite confusing for a beginner. try to master one after the other, not everything at once. asking questions about working code is either off-topic or should be asked at code review. — dlatikay 22 secs ago
0
Q: Generic Parallel Task Queue Returning an Observable Sequence of Return Value

Jasper H BojsenThis is a continuation of Parallel Task Queue that runs in sequence. Using Reactive Extensions I want to create class that can take a task, execute in on a specific queue and return any type TReturnValue as a observable stream. I specify which queue to be used for the task by using a queue id. ...

12:43
No it is not. At the very least you need to be using prepared statements instead of injecting variables into your SQL. Also consider checking out codereview.se instead, as stackoverflow is not generally a place to ask about code that is currently working. — CollinD 26 secs ago
Thanks for the star, @Vogel612
De rien btw, the Resource Patch thingy has been made superfluous with the .15 update..
0
Q: C random walk the alphabet on a small grid

Richard LawI'm teaching myself C, with an older edition of K. N. King's C Programming: A Modern Approach. I come from a Python and JavaScript background as far as programming goes, but not a strong foundation in theoretical CS concepts. I'm currently up to Chapter 8 of the book, which introduces one- and mu...

13:07
@Vogel612 I know. I've removed it and I just updated the README.md file
Only two of those mods are updated for 0.15 though.
Doesn't this post belong to code review? — Nuageux 49 secs ago
13:36
Ok, switching databases is a lot of work after all and bloody confusing. Not going to do that today...
0
Q: Array even and odd indexes sorting and printing its values

Flynn84I'm looking for a more elegant solutions of this task. Task: Given a string, print its even-indexed and odd-indexed characters as space-separated strings on a single line. Input Format: The first line contains an integer (the number of test cases). Each line of the subsequent lines contain a st...

13:53
For working code, codereview.stackexchange.com would be a better place to ask. To a certain degree :-) — GhostCat 36 secs ago
14:03
Whoa, Github has introduced topics!
This seems to be an interesting repo github.com/gervaisb/stackexchange-codereview
14:24
I'm voting to close this question as off-topic because this belongs in codereview stackexchange — suraj 12 secs ago
0
Q: A simple Python graphing tool

Coal_I've written a primitive Python script which "draws graphs" based on a list. It works, but it's a lot of lines for what I am trying to reach. The idea of the script is to function as a module that can be imported for a quick visual representation of data. Here's nextgraph.py: from time import sl...

@SimonForsberg So you and @EBrown are both doing separate Monopoly games?
I think I'll make a logic library and if anyone is interested, they can make a UI around it.
4
The UI is what takes a long time anyway.
@Hosch250 @SimonForsberg is doing a server, I'm doing a client.
14:39
@Mast Murphy was an optimist.
0
Q: Interleaving List w / IO (print's)

Kevin MeredithLooking at conduit's README, I used its magic function to try to achieve the following interleaved output: I'm doing magic with 1 2 I'm doing magic with 2 4 ... Here's what I wrote: import Conduit import Control.Monad.Trans.List -- author, conduit magic :: Int -> IO Int magic x = do putS...

15:01
@Hosch250 As @EBrown said, I'm making the server only. It's supposed to be using REST-like communication for performing actions and informing about status.
-2
Q: How can I make the following code better using PHP?

Tarik AssagaiI was asked in an interview to improve the code below. I felt it had too many nested loops and reduced the 'ifs' and 'elses' but couldn't make the cut. What exactly does the code do and how could it be improved? I'm only asking for learning purposes. function mystery($a, $b, $c) { $result = ...

You're asking how to improve working code, and so this is perhaps better posted on the code review site. — Hovercraft Full Of Eels 30 secs ago
15:46
0
Q: Portable type_traits and unmangled name

MaliafoI am building a p2p networking library that allows users to directly send instantiated objects. As such, I need a way to uniquely identify classes. I did a piece of code to do that, using the preprocessor. It works quite well but is extremely slow to compile. Do you have any ideas on how I could...

@rolfl @Vogel612 @EBrown @all-factorio-players I just uploaded my first official mod to Factorio
4
16:28
@SimonForsberg Looking forward to trying it.
(It beats out the speaker alarm systems, I guess.... for tracking running out of resources, etc.)
@rolfl Let me know what you think of it
@rolfl The speaker alarms have their use as well, but I'm slightly annoyed that you can't get them without sound
It's the alert I want, not an annoying sound
You can localize the sound such that you only hear it when you are standing close to it.
(I think).
Yeah I've realized that. That helped :)
ANyway, I have to get back to rewiring my basement.
16:31
About to power-down the whole house.
Broadcast message from root: System is going down for reboot ?
4
I think I could live without electricity, but not in a house that completely relied on electricity.
3
@rolfl What about your server's uptime?
3
The servers and my full internet system is on UPS, I am hoping I can do the integration on the main breaker board in less than 20 minutes of UPS power, but we will see.
Good luck.
My laptop will survive as well, so I will probably not even lose my connection here on chat.... ;-)
16:44
0
Q: Parser for a lazyloading yellowpage

SMth80I've written a script to harvest Name and Phone number from yellowpage Canada under pizza category. The web page doesn't show its full content until scrawled downmost. In my crawler's every cycle, it fetches 40 records. I twitched a little in my loop which I've learnt lately to get the full conte...

17:18
1
Q: Scraping a whole site using vba

SMth80I've created a parser which is able to parse the full content of houzz.com. After going to the given address, it parses the sub-category links from the left sided bar. Each sub-category links spreads across several pages with pagination. Then it goes to the main page of each sub category links an...

 
1 hour later…
18:23
0
Q: Generic Numerical Systems Conversion

Kamal ZidanThis program is a start point to a more comprehensive program that deals with different numerical systems from binary until 35 base. That includes the traditional decimal, octal and hex. It is until 35 only, because no more digits other than the number 0-9 and the letters A-Z to represent digits...

0
Q: Why is this code implementing Mini-max Algorithm for Tic Tac Toe does not work?

Sourabh KhandelwalI have written this code. In this game the player(human) always makes the first move(the opening move). For some of the opening move made by the player the game runs completely fine, while for other moves the game behaves in a strange manner. For example - If the opening move is 2 2(this is a c...

possible answer invalidation by gommb on question by gommb: codereview.stackexchange.com/posts/164368/revisions
@Duga seems ok
@rolfl Two hours later.... still no sign of @rolfl...
Fzzzzttt - ouch!
Actually, I did it in about 5 minutes ....and it's all working.
Yay!
So now you can play Factorio? :P
18:38
In a while, got kid duties to attend to.
If there were an on and off button on kids, maybe I would have wanted kids a long time ago.
7
@rolfl I like that you also explicitly mention that it's all working :)
This is not the place to ask for code reviewkhelwood 1 min ago
Since your question is asking for improvements and suggestions, try asking at Code Review after reading their tour. Stack Overflow is for specific programming problems and solutions, and questions like this will be closed as 'too broad' here. Good luck! — Aurora0001 1 min ago
19:00
possible answer invalidation by Arrow on question by Arrow: codereview.stackexchange.com/posts/164264/revisions
2
Q: Kernel Convolution in Python 2.7

markThe code I wrote performs a mean blur on an image (I hardcoded it as zebra.jpg for testing purposes). My problem is that for an image of 39KB image it take minutes to perform, is there any way of making this code more efficient? Preferably using built in python modules. Also is there any way of i...

 
1 hour later…
20:08
-1
Q: BMI Calculator Java

AmyI'm writing my first program for a BMI calculator but I'm having problems with it. Can someone tell me what I'm doing wrong please? public class Person { private String firstName; private double heightInches; private double weightPounds; private double bmi; public Person (String aFirstName, ...

20:27
Why does it need to be more compact? If you have working code you think could be improved (more than just a single function), see Code Review. — jonrsharpe 59 secs ago
@Mast Just a quirk, it mostly works the same, just has a weird syntax
20:43
0
Q: Iterating a string only once?

Kevin CrosbyI want to read through a "string" once and only once, and charAt doesn't do that, does it? If there was some sort of optimized nextChar feature, I'd be thrilled. What I'm picturing in my head resembles the jet speed velocity of DNA replication, all six feet of it per cell. And don't forget RNA an...

possible answer invalidation by Ömer Faruk Kurular on question by Ömer Faruk Kurular: codereview.stackexchange.com/posts/164387/revisions
21:27
0
Q: Optimizing a Text-To-Speech program with a lot of repetition

Gameskiller01I have a Text-To-Speech program that will ask the user to input text, convert it to speech and then output that speech from within Pygame by loading the file into memory, getting Pygame to play the file, closing Pygame, closing the file and then deleting the file, ready for the next input. It wil...

21:52
0
Q: Optimizing Recursion in Knight's Tour

Alexander IvanovI'm trying to write a program for a university project. It should count all possible open tours (i.e. the start and end fields are not the same) recursively on a chessboard depending on board size and starting field (as per assignment). If the size is less than 6x6, all of the solutions should be...

0
Q: How best to iterate a string character by character (in JavaScript)?

Kevin Crosby[Edit: second draft] I want to read through a "string" once and only once, and charAt doesn't do that, does it? If there was some sort of optimized nextChar feature, I'd be thrilled. What I'm picturing in my head resembles the jet speed velocity of DNA replication, all six feet of it per cell. A...

22:20
possible answer invalidation by Kevin Crosby on question by Kevin Crosby: codereview.stackexchange.com/posts/164430/revisions
22:45
possible answer invalidation by Kevin Crosby on question by Kevin Crosby: codereview.stackexchange.com/posts/164430/revisions
23:25
possible answer invalidation by Kevin Crosby on question by Kevin Crosby: codereview.stackexchange.com/posts/164430/revisions

« first day (1485 days earlier)      last day (2829 days later) »