« first day (1979 days earlier)      last day (2047 days later) » 

12:00 AM
RELOAD! There are 5670 unanswered questions (89.8164% answered)
 
@Duga on the rebound!
 
0
Q: Whileloopfunction

Avidef ask(formula): def arearectangle(l,w): area = l * w return arearectangle def perimeterrectangle(l,w): perimeter = 2*l + 2*w return perimeterrectangle def volume(l,w,h): volume = lwh return volume def surfacearea(l,w,h): surfacearea = 2*l*w + 2*l*h + 2*w*h retur...

 
12:28 AM
0
Q: Battleship Model

Mr. VixThe following is some code for a Battleship game I'm working on. The plan is to create a multiplayer game using Xamarin Forms. This is just the model code, i.e. what the GUI will be interacting with when playing the game. I'd like some advice on conventions and any other code optimizations that c...

 
12:59 AM
0
Q: Compute the area of a polygon

SGattoneThe question: One of the most important mathematical problems through all times has been to find the area of a polygon. For example, real estate areas often had the shape of polygons, and the tax was proportional to the area. Suppose we have some polygon with vertices ("corners") specified by th...

 
1:15 AM
0
Q: computer science

user181144i got to write a function to print out the seating chart. The function takes a number of rows and a number of seats (e.g. 14 rows, 8 seats per row) and prints out the seating chart like this: 1A 1B 1C 1D 1E 1F 1G 1H 2A 2B 2C 2D 2E 2F 2G 2H 3A 3B 3C 3D 3E 2F 2G 2H... and so on so far i only hav...

 
1:47 AM
0
Q: Checking if a number is prime in x64 Assembly

Mr. VixI'm just learning Assembly. This program is a simple attempt to determine if a given number is prime or not. Any advice and all topical comments on code optimization and conventions is appreciated! bits 64 default rel extern printf extern scanf section .data number: dq 0 isPrime: dq 1...

 
2:03 AM
If your code is already functional, and you just want some pointers to maybe improve it, then consider migrating this question to our sister site, Code Review Stack Exchange. — Tim Biegeleisen 27 secs ago
 
0
Q: Finding a specific bank account number in C++

Micah OsbornI am trying to create a bank account that can create any number of bank accounts then recall the bank account numbers to deposit withdraw and delete the accounts. I don't understand how to get the bank account number to stick to a specific variable to be able to call on it later. #include <iostream

 
2:19 AM
0
Q: The output keeps calculating a fixed number

DavidI keep getting a fixed number for percentage of discount on each room, total cost, and total amount. I have changed the variables in the formulas multiple times and still get a fixed. If there is anything else wrong with my code I would it appreciate it'd be told to me. #<iostream> using nam...

 
2:51 AM
0
Q: URL query-string and connection using try/catch

user1541121I use this code the most things on my website, dynamic link, script, page...etc. And the question here is about Securty, how secure is my code? set.php: <?php $isPost = !empty($_GET['post']); $slug = 'home'; if ($isPost) { $slug = $_GET['post']; } elseif (!empty($_GET['p'])) { $slug =...

 
3:22 AM
0
Q: Remove the second number from every group of three numbers

hodI have this simple loop that prints numbers from 0 to 29 (30 in total). I want to "split" the results in threes and remove the middle number. So the first set is 0,1,2 and I only want 0,2. The second set is 3,4,5 and I only want 3,5. This works as it supposed too, but is there a way to make it mo...

 
3:50 AM
I'm voting to close this question as off-topic because it belongs to codereview.stackexchange.comKiran Shahi 18 secs ago
 
4:26 AM
It is better if you use codereview.stackexchange.com for such questions. — rishabh agarwal 47 secs ago
@rishabhagarwal code review is for improving working ( correct ) code — c0der 8 secs ago
 
4:42 AM
0
Q: How can I print out all possible letter combinations a given phone number can represent?

dragonsI am working on a problem in which given a 7 digit telephone number, we need to print out all possible combinations of letters that each number could represent. I came up with below code and I was wondering if there is any way to optimize it or if there is any better way? As of now complexity is...

 
5:28 AM
Thanks you so much for your quick response.. Your code works for companyAlias only..In my case, some times i need to group by date as well. This below link helped me for multiple grouping.. Thanks again for your effort codereview.stackexchange.com/a/37132Dhivya Delphina 7 secs ago
 
0
Q: python code for iteration in nested json using recursive function

Snehal Lokesh{ "_id": { "id": "5ba24ff" }, "Istid": "4022", "Req": { "NAME": "abed" "class": "12" }, "ackID": "738", "APP": "2327", "CUSID": "232", } Code : import pandas as pd from pandas.io.json import json_normalize data = pd.read_json('Desktop/kaggle/Sample 5 Records.json',lines=True) data...

 
5:46 AM
Monking
 
6:01 AM
0
Q: Space Invader Style Game - Model / Presenter Decoupled From View - Functional Again Too

learnAsWeGoThank you for your patience. The game is fully functional again! I have tried to incorporate all the advice I have received so far. Thank you for taking the time to review and comment. I have now decoupled the Model / Presenter from the View as much as VBA allows (please correct me if wrong). ...

 
 
1 hour later…
7:15 AM
Monking
 
0
Q: React multi-select-like component with filter

Str8WaveDaveI am new to react (and javascript in general) but am enjoying learning it. I have decided to make a little multiselect component which should work as follows: I start with my data in one list, when I select an item from the list it goes into a second list (I can 'unselect' as well). I also can...

 
Monkin Mast!
and all :D
 
7:35 AM
What have you tried? Where are you struggling. Some hints. 1) separate file output from the "algorithm" 2) first, optimize & streamline your serial version - head over to codereview. — Zulan 9 secs ago
Well, this would better suit codereviewRafalon 30 secs ago
 
8:20 AM
Monking
 
8:40 AM
0
Q: Using c++ string ... Loop the program, use float

Rach GutierrezAsk the customer name. Display the school item with price. Ask for the quantity, price, payment, change.

0
Q: Linear Regression code quality with Python

Ahmed Achourthis is the code I built to implement a simple linear regression to check the impact of variable A on B. I am not interested to predicting that's why the statistical approach is important for me to analyze the R squared and P values and other parameters such as comparing RMSE of training set and ...

0
Q: C# math quiz program I need some advice

user10443653I have been studying C#. and I have made simple math quiz program. Is my program reasonable or is there anything i need to improve? any advice would be very appreciate. class Program { static void Main(string[] args) { Console.WriteLine("============== Math Game ===========...

0
Q: Implementation of a class that runs a child process with timeout using boost process in async mode

sankIn the following code, I am trying to implement a program that runs a process and returns its return code,stdoutandstderr`. It also has a concept of timeout after which the child process is killed. This class will be used as a part of a multi threaded application. #ifndef PROCESS_H_ #define PROC...

 
 
2 hours later…
10:12 AM
Utilizing Google search produced a result from Stack Exchange (codereview.stackexchange.com/questions/78295/…) — Daniel Protopopov 5 secs ago
A custom function has to write. Ref1 , Ref2Tamilvanan N 57 secs ago
 
10:32 AM
0
Q: Factory method implementation - is it the right approach

krishna_vI am implementing the factory method approach. Is there any flaw in the implementation? https://stackoverflow.com/questions/52569638/implementing-a-factory-pattern-in-c-sharp-to-make-sure-no-flaws-in-approach

 
10:42 AM
@CaptainObvious No.
 
11:04 AM
0
Q: More readable approach?

suntropThis is a fairly short code snippet, but it made me a little headache, because it is hard to understand, isn't it? $is_in_group = true; $is_in_board = true; $is_superuser = false; // You have to be in both 'group' and 'board' to get access (or be a superuser) if ( ( !$is_in_group || !$is_in_boa...

 
Monking y'all
 
Monking @Vogel
 
11:23 AM
@Mast lol
 
11:40 AM
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 9 secs ago
Thank you for your reply. I am fully aware of the fact that reviewing code before checking in is the better workflow, but that is not an answer to my quetsion. I also know how to request a code review after code has been checked in. My question is clear, I want to know if I can automatically request a review after is has been checked in by Visual Studio. The answer may be 'no' or it may be 'yes, you need to write an extention for that', or whatever else. I'll accept that. — R. Beiboer 24 secs ago
Then stack overflow isn't the correct place for that. Try code review. — Bazingaa 59 secs ago
There is no question in your post. This may be better on code review but you should check to see if you think it meets all of their criteria before posting — roganjosh 1 min ago
I suspect that you could structure your dialog box in a way that's easier to manage. You might want to take your overall design (not this specific error) over to codereview.stackexchange.com. — Roger Lipscombe 30 secs ago
 
0
Q: Find the cheapest order placed out of all of the stores visited REDOUX

Christian ValderramaMade some adjustments to my original program. Here's a link to it: original. Also, here's a link to the problem statement: problem statement. The assignment is past due; The code I turned in is stupid simple. Which is great, but I didn't learn anything, so I am testing the many different ways to...

 
12:07 PM
0
Q: Simple linear regression of two variables

Ahmed AchourThis is the code I built to implement a simple linear regression to check the impact of variable A on B. I am not interested in predicting; that's why the statistical approach is important for me to focus on the descriptive analytics - such as comparing RMSE of training set and test set to see if...

 
12:23 PM
0
Q: Caching Color-Bitmaps as MemoryStreams

HeslacherI am in the need to cache Bitmap's in a memory-optimzed way because the API I am building will need to process many colored Bitmap's in parallel and can be used in x86 or x64 compiled applications. If the API is being used in x86 I can't just store the Bitmap's as they are but need to store the...

0
Q: Java Multipart text file analysis to zip

cinnamonSo I am working on a project that should take .txt file as an input and analyze words in it (assuming all words are English). Final output should be multiple .txt files, each with words and their count, arranged alphabetically. And there should be four files for words starting AG, HN, OU, VZ. I ...

 
12:39 PM
0
Q: Please, how can this code/project (for client-side routing using Knockout and HTML5 History API) be further enhanced?

OlumideThe full question is... "Please, how can this code base or project (for client-side routing using Knockout and HTML5 History API) be further enhanced as regards security, production-readiness, ES6, etc.?". I intend that this eventually stays on somewhere like GitHub where anyone who has been fac...

0
Q: how to create an expanding icon bar in html

daniel careyi cant find any examples online what i am wanting to do is probably easy but i am a beginner so i dont even know what im searching for... I am looking to put an icon in my header.. and when you click the icon it will expand both ways and show more icons (which in essence will be icons that you ...

 
Any thoughts on this question: https://stackoverflow.com/questions/52561107/why-can-you-adjust-font-size-for-messagebox-in-python-2-but-not-in-python-3?
It's been up for a few days but no one seems to be willing to give it a crack yet.
 
12:55 PM
I have worked on the routing. I couldn't post it very much earlier so that I could take some time to verify that all the code work as expected. I am through and have now posted a question about it on coderreview. It is a full ASP.NET MVC 5 project that does client-side routing using Knockout and HTML5 History API and can easily be made to work with any server-side web development framework. Thank you in anticipation of your help over there. — Olumide 34 secs ago
 
1:18 PM
@JackDuane It's a Stack Overflow question, so who knows.
It's not doing so bad on the score.
IMO it's just one of those things that broke down in Python 3 without good reason, although there might be a workaround.
 
@JackDuane Just tried to use root.option_add('*Dialog.msg.font', 'Helvetica 72') as per the first link in your question. Message box is displaying huge letters. Isn't what should happen ?
 
72 should be huge, yes.
 
1:38 PM
It seems to me that you should post this question in Code Reviewmax66 54 secs ago
Have you considered posting on codereview.stackexchange.com ? — Richard Hodges 34 secs ago
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 28 secs ago
 
1:59 PM
0
Q: create static page with vuejs

MHComputechI have a static homagepage with some routes and thought about creating this with VueJs. I am totally new to this and just know NodeJs with Handlebars. So normally I would have something like this #page { margin: 30px 0; } <div id="header"> <a href="#">Page 1</a> <a href="#">Page 2</a>

 
Greetings, Programs.
 
Greetings, Programmer.
 
2:25 PM
Hello
 
Monking
 
0
Q: Secondary Slider

TurtleWolfI've got the first volume slider to work for everything, but I'm trying to separate them so the lower slider controls the back loops (numbers on the right) and the upper volume slider controls the accent beats (letters on the left and across the top) and then hold shift to adjust both with either...

 
I made something, maybe I should sent my new queries on Stackoverflow Code Review ? It seems to work, but honnestly I'm not sure that all is good. I valid your answer too ;) — user10390326 17 secs ago
 
2:47 PM
0
Q: unable to get all the web data because of “Show More” button

learn2learnI am a new python coder, I wanted to scrape all of the data from this website (https://appexchange.salesforce.com/consulting) but I am unable to scrape all because of the Show More button. This is my code please help. from selenium import webdriver from bs4 import BeautifulSoup driver = webdriv...

0
Q: How to achieve constexpr pseudopolymorphism?

SebastianIn a ray tracing project that I'm trying to make compile-time (constexpr) for fun and challenge, I've run into a bit of an issue: I have an object (intersection) that needs to refer to one of a group of other objects (shapes). Now, my understanding is that you cannot use polymorphism / virtual m...

 
3:03 PM
0
Q: Simplify return logic

MeridianIs there a way to condense this return logic in my function down to a one liner? private String GetMyObjectName(MyObject object) { String idPrefix = object.getId().substring(0,3); String objectName = MyObjectIdMap.get(idPrefix); if (objectName != null) { ...

0
Q: How to center the columns of an np.array?

Armando FematI have a for-loop that walks through all the values of an np.array (x,y). For each y-row, it finds the first x-column for which the value is different to zero. Afterwards, it find the last x-column for which value is different to 0. Then all the columns between first x-column and last x-column ...

 
@Vrokipal, as i see your code is working and you are looking for a better and elegant way to do this, i believe you should post it on code review ! You will get it reviewed and will get better possible answer. — pygo 10 secs ago
 
3:19 PM
0
Q: Kotlin microservices app using Spring Cloud Netflix

naXaTo practice development of microservices I've created a multi-module Gradle project and published it on Github: I decided to use Kotlin because this programming language is on fire; I like its neat syntax. Can you please review my code? Tear it apart, criticize it, suggest improvements and em...

 
3:33 PM
@CaptainObvious
 
3:44 PM
pos off-topic here and better for code review SE — ThisGuyHasTwoThumbs 34 secs ago
possible answer invalidation by anonymous on question by anonymous: codereview.stackexchange.com/posts/204889/revisions
 
@MathiasEttinger Mathias, maybe this is a dumb question but you're using python 3 right? I've had zero luck getting it to work in python 3. Just tried again to make sure I wasn't being an idiot and still no luck. Are you doing anything different?
 
@Duga appears to be additional code per request in comments
 
$ python
Python 3.7.0 (default, Sep 15 2018, 19:13:07)
[GCC 8.2.1 20180831] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from tkinter import Tk, Button, messagebox
>>> def Help():
...   messagebox.showinfo('Window title', 'Sample text')
...
>>> root = Tk()
>>> root.option_add('*Dialog.msg.font', 'Helvetica 72')
>>> button = Button(root, text='Test button', font=('Helvetica', 36), command=Help)
>>> button.grid(row=2, column=0)
>>> root.mainloop()
This is not Helvetica as I don't have it installed, but you can clearly see the ×2 increase in font size. I also tried using my usual font, it works the same
 
4:06 PM
0
Q: Is this code pattern good practice?

Pathum LakshanThis is my first asp.net core web api and i did followed the Repository pattern but i don't know whether this approach is good practice. public class TrainerRepo : IRepoTrainer { private readonly IConfiguration _config; public TrainerRepo(IConfiguration config) { _config = c...

 
@MathiasEttinger I wonder if it is an operating system difference. I see that you're running linux while I'm running windows 7. Using your exact same code I get no difference in text size. Weird.
 
Do you want review of working code (in that case, Code Review is the place to go), or do you have some problem with your current code? In the latter case, please clarify what problem is. — Incomputable 27 secs ago
 
@JackDuane Looks like that, Win10.
 
Another way - to write "Flatten Nested" iterator like: codereview.stackexchange.com/questions/32827/…Daniel Z. 25 secs ago
 
4:32 PM
Monking
 
5:22 PM
Monking
One more VTC lacking context
Or example code, or both
 
5:34 PM
Also, if your code works but you're looking for feedback on cleanup and improvement, CodeReview may be a better fit. — ggorlen 18 secs ago
If your code is working without errors, try posting to Code Review. — Thomas Matthews 19 secs ago
 
0
Q: basic php user authentication system for an Elm app

eniac314I made a simple authentication system with php for an elm webapp that will have a small number (1 - 5) of users able to log in. I am planning to send the users their php session-id at login, and keep this in memory while the app is running in order to anthenticate all the requests sent by the a...

 
If your code works then there is no problem. Try asking on codereview.stackexchange.com. — rory.ap 47 secs ago
 
6:14 PM
0
Q: Constant expression issue generating boost::hana::set

Steve RodeenI am trying to create a set of unique types using boost::hana and need to keep everything as constexprs. My attempt is the following: #include <iostream> #include <boost/hana.hpp> namespace hana = boost::hana; template < class ...Xs > constexpr auto get_set( Xs &&...xs) { constexpr auto...

 
@Mast Closed.
 
@SᴀᴍOnᴇᴌᴀ so you take the anchor from the permalink to reply to your own message? interesting
 
@SᴀᴍOnᴇᴌᴀ Yes, snip everything except the last number, behind the hash.
 
@Mast That's :47033196
 
6:16 PM
UI: 0; us: 1
4
 
Everything can be broken.
5
 
6:29 PM
and in a similar vein, SE sites are down for mainenance
We're investigating a database overload and working to resolve it ASAP.
haha
∃ some humorous replies
 
Something tells me it has to do with the 300 line query that Taryn found
Been getting alerts of blocking on one of our servers. Finally track down the full query that is triggering it. The query is about 300 lines of code, I already regret finding it.
2
 
6:51 PM
0
Q: Find Missing Element in integer List

Anonymous3.1415Problem statement: Given an integer list from 0 to 100 find the missing Element. I saw this problem on reddit on a compilation of interview questions, tried it out for fun. Mainly tried to generalize the code for any boundry(not just 100) and multiple missing arguments. Focused on readability an...

 
And we're back!
 
@Vogel612 A 300 line query. Yuck.
 
possible answer invalidation by Ryan M on question by Ryan M: codereview.stackexchange.com/posts/85556/revisions
 
7:08 PM
@Duga He removed his own copyright notice on a very old question.
Odd, yes. But not invalidating.
If he does it to hide his name, it's still used further in the code.
@SᴀᴍOnᴇᴌᴀ It wasn't me.
 
yeah sounds like a "saturating the 20Gb network connection from our SQL Servers but the query generation differences in EF Core were the underlying cause."
We're investigating a database overload and working to resolve it ASAP.
 
7:41 PM
0
Q: Combining common code for multiple cases with specific code for each case

BadCashI'm working on an Android app, and at one point I need to retrieve a request code in a callback method and perform some database operations depending on the request code. It started out ok when there were just 2 request codes, but then I had a need to add two more, and I can't really find a good ...

 
 
1 hour later…
8:45 PM
0
Q: Developing MDB to connect to activiation config

JSRI am writing this MDB which will listen message on IBM MQ queues and onMessage it will make call to ilrsession for running jrules. Activation config is configured on WAS console to link with MQ queues. This code works but sometime while starting it throws this error. So I am checking if someth...

 
9:32 PM
0
Q: Basic ReactJS Components routing

Yash KarankeRecently I've started learning ReactJS and I do not look forward to making one Page website so I learned about react-router and this is my way of doing to it. App.js import React, { Component } from "react"; import "babel-polyfill"; import Navbar from "./Components/MenuNavbar"; import Footer fr...

 
10:04 PM
0
Q: Haskell/Yesod - Butchering use of MaybeT

danbroooksThe following is some code that is used to provide the frontend with certain parameters when rendering a form. The parameters are conditional based around what data is being changed, getNewSaleFormOptions provides a way of quering these options using a GET request and url params (ie /sales/new?de...

0
Q: Battleship Model - follow-up

Mr. VixThis is the revised code from my prior question. Same requests as before! Something I'm doing new here is using the XmlEncoder extension methods to handle serialization and de-serialization. XmlEncoder.cs using System; using System.IO; using System.Text; using System.Xml.Serialization; namespa...

 
10:52 PM
0
Q: Fastest way to determine if a number is perfect square

user5447339I'm looking for the fastest way to determine if a long value is a perfect square (i.e. its square root is another integer). I was asked this in an interview recently. Here is the very simple and straightforward way I'm doing it now: private static boolean isSquare(long n) { int i = 1; ...

 

« first day (1979 days earlier)      last day (2047 days later) »