« first day (1934 days earlier)      last day (2076 days later) » 

12:00 AM
RELOAD! There are 5509 unanswered questions (89.9487% answered)
 
-1
Q: Integer not really changing once set inside a function

RoberthI have this function: public int iEngine { get; set; } public int iClient { get; set; } public void OnReady(int c, int e) { Console.WriteLine("Recovered data: " + c + ", " + e); iEngine = e; iClient = c; } That is being called from another class once I set X integers value, what i...

 
12:39 AM
actually, that belongs to a code review, if you don't allow any rule breaking, then how are you gonna tackle when you do need to disable certain rule in some usecase? We have tons of // tslint:disable-next-line:no-submodule-imports, but we still use that rule, and everything gets heavily reviewed before merging :) — Nishchal Gautam 45 secs ago
Better yet, here is a link to a code review. Here is a decent link with explanation to geeksforgeeksJoseph Wood 22 secs ago
 
 
1 hour later…
2:08 AM
1
Q: Integers to English words in C

hjklAs a beginner in C programming, I decided to write a function words that, given an unsigned integer n, puts the English representation in words of n into the character array dest. This code is quite difficult to follow due to its complexity. If I hadn't written this code, it would take me a good...

 
3:08 AM
0
Q: Python dictionary assignment

Royce JamieSo I've been tasked with creating a basic python program that you give a product number, it then searches two seperate text documents for the corresponding ID and gives you either the name or price of the part or product. I've got most of the code down, but I still need to code the part where (if...

 
3:23 AM
0
Q: Dijkstra with on js

AletagroI am writing the solution of Dijkstra's algorithm on js The code below, this is what has happened so far. I need to make it so that the choice of nodes is by recursion. Tell me how to do this better. const size = 6; сonst maxInt = 999999; const graph = [ [null, maxInt, 50, 20, maxInt, 30], [...

 
possible answer invalidation by hjkl on question by hjkl: codereview.stackexchange.com/posts/202007/revisions
 
3:38 AM
1
Q: Reading integers while break condition not met in C++

paperino9This is a drill from the Programming Principles and Practice Using C++. I managed to get it to work but somehow it doesn't feel right to me. I 'd appreciate any pointers on how to simplify/improve the solution. Especially when it comes to best check if '|' was entered. I feel that creating two ...

 
3:53 AM
0
Q: Simple C++ SDL2 Wrapper for small game

JoeI'm in the process of creating a simple SDL2 wrapper for a breakout clone. The real learning objectives for this project are: Learn how to manage resources properly via wrappers Learn more about SDL2 I'm building these wrapper as I step through Lazy Foo's tutorial and wanted to get some feedback...

 
4:12 AM
 
4:41 AM
Monking
@Duga thats ok
 
5:38 AM
Monking
 
 
1 hour later…
6:53 AM
0
Q: split url into segments

Matthias HermsenI try to split urls into segments. These segments got two information, their name and their own url. The last segment in the segments list should not have the url property because it's the current url from the browser. There is no need for it. I created this code which works really fine co...

 
7:08 AM
I'm voting to close this question as off-topic because it belongs on Code Review. — Flimzy 55 secs ago
 
7:23 AM
0
Q: Two tableview with same structure

Prashant TukadiyaI have two view controller which has same listing. One is for post listing and one is for profile which contains post listing too For One Tableview I have following extensions of tableview how to use it with other view controller extension ArrayInspireListVC:UITableViewDataSource,UITableVi...

 
7:40 AM
Hi, sorry but this question is not suited for StackOverflow. On this forum it will be closed either as too broad or oppinion based. You should may be migrate it to code reviewMong Zhu 54 secs ago
 
7:59 AM
@MongZhu As long as no context is provided, this question has no place whatsoever on Code Review. Please take a look at their help center. — Mast 43 secs ago
 
8:30 AM
possible answer invalidation by Vogel612 on question by Rishikesh Tripathy: codereview.stackexchange.com/posts/165192/revisions
 
Monking
@Duga fixed the challenge description
 
I'm voting to close this question as off-topic because it is better suited for code review SE — Fildor 13 secs ago
This Kind of question is better asked at Code ReviewJens 19 secs ago
 
9:08 AM
this kind of questions is better asked at Code ReviewJens 25 secs ago
Have you compiled it with optimiazation? For your CPU architecture (SSE, AVX)? Please note, that SO is not a codereview server, that's what codereview.stackexchange.com is for :) — hellow 19 secs ago
 
9:30 AM
Have you tried to run that script you posted, I couldn't even get it to compile. Also codereview.stackexchange.com might be a better place to post this as that part of stack exchange is dedicated to revueing code. — JGNI 47 secs ago
@JGNI If the code doesn't work, it absolultely does NOT belong on Code Review. Please take a look at their help center. — Mast 8 secs ago
 
9:49 AM
This may be better on Code Review. — Peter Wood 46 secs ago
 
Monking
 
0
Q: A git repo for distilled example code relating to a post

daveyostAfter reading a question, many comments, and more than one answer, it would be nice if we could navigate to an associated github repo where people contribute to a coherent bit of example code that is a synthesis of the above. Here is a classic example of a post that could benefit from this featu...

 
10:23 AM
0
Q: Is there a different way of implementing this program without using nested while loop?

david mathewPresently my program is working properly, but how do i implement this program without using nested while loop(one while loop within another while loop).This is a kids way of programming and my office colleague doesn't want me to write code like this.So is there a different way for implementing th...

0
Q: Is this a good functioning router class?

Harm SmitsI'm building my own application and have just started by building my own router since none seemed to be fulfilling my requests. Also, they seemed to have an overly complicated design. There are ofcourse still things to do, like allowing it to be called by a simple 'GET' parameter and such. First...

 
Is this Stack Overflow question acceptable for Code Review? stackoverflow.com/questions/51922275
 
It seems that your code currently works, and you are looking to improve it. Generally these questions are too opinionated for this site, but you might find better luck at CodeReview.SE. Remember to read their requirements as they are a bit more strict than this site. — kayess 18 secs ago
 
0
Q: C - Argparse (Argument struct)

DeBosI'm trying to make something like "argparse" in python in C and I done Argument struct and I need to know is my code good for that moment. Argument.h: #ifndef ARGUMENT_H #define ARGUMENT_H #include <ctype.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> struc...

 
10:42 AM
@peterSO Looks OK for Code Review, yea.
A bit minimal, but it's Fibonacci. So it doesn't need a whole lot of text.
 
10:53 AM
0
Q: VBA - faster way to list out files in a folder & subfolders

Ivan CI have written a VBA code in excel (basically through combining various codes from others -_-") to list out the path, file name, file size & extension of all files under a folder and the sub-folders there-under. Is it possible to improve the efficiency for collecting the same info? Sub MainList...

0
Q: SI type safe unit calculations

Carsten DI wrote a small type-rich MKS Unit system for the consistent and safe calculation of phsyical units in everyday use. I realized some operators implementation via the Barton-Nackman trick an the crtp while defining types via an unique template parameter fixed upon object construction. this preven...

 
11:06 AM
This question would be just as appropriate (or even more) at StackExchange Code Review. — hotkey 16 secs ago
 
11:16 AM
There are many things I can see wrong with your code, but answering them may be out of scope for Stackoverflow, I can recommend posting it on codereview.stackexchange.com and also reading through the official documentation, specifically the part on 'Thinking in react' — dubes 39 secs ago
 
@CaptainObvious no context about what the code should do.
 
Does your current code work? If so, codereview.stackexchange.com may be more appropriate. If it doesn't work, you need to be explicit about what doesn't work. — mjwills 56 secs ago
 
0
Q: 200K plus rows data should be searchable overall,searchable with individual, sortable with ajax

Ujwal NeupaneI m a learner of MVC and has very limited knowledge. This is working but too slow. Here are my few questions. 1.Does using the controller instead of the API degrade the performance? 2.Are there any cons to implementing an individual search for each column? 3.What is bad practice in this code? ...

 
maybe this can help. — Plopp 48 secs ago
 
11:55 AM
0
Q: crypt kicker problem solution in Java

Maged SaeedProblem Description: Crypt kicker algorithm is a well-known encryption algorithm but less secure. The idea is to consistently permute the alphabets and map letters to other based on a given dictionary of words. It is very important that each letter is only mapped to one another letter. If two le...

0
Q: /var/log/messages shows python logs

ExcaliburGood morning, The python processes redirect the log output to both /var/log/messages and a log file. Is it possible to omit or restrict the log output of the system (/var/log/messages)? Thanks in advance,

 
12:10 PM
It might make sense to reword your question (better description of what you are after) and ask it on Code Review. — npinti 18 secs ago
 
0
Q: Text-based Tic Tac Toe in C

AjeshI have programmed Tic Tac Toe in C. How can I improve the code? I have been told that system("cls") is not secure, but I don't know any other way of clearing the screen. main.c: #include <stdio.h> #include <stdlib.h> #define BOOL short int #define TRUE 1 #define FALSE 0 #define NUMBER_OF_ROWS...

 
12:25 PM
Curious question: do you folks consider upgrading a model ("object") backing a database table to add a new fields that's not (yet) in the DB a breaking change?
So, say the table has Name, Email and we are adding a Phone that's in the model (record, class, what-have-you) but it's not yet in the DB table, do you consider that a breaking change, and why or why not? (Trying to get some opinions around as we're discussing this topic internally.)
 
@202_accepted Adding!= breaking because the former code (if coded right) wouldn't notice the additional column hence the former code would run as expected just ignoring the added column.
 
But let's assume we write new code using that new "property", shouldn't that be considered breaking now? The property doesn't work properly.
 
Well the new property wouldn't work with the old database model but the old code would work with the new databse model. If you add a new property the database model should be updated as well.
 
It should be, but let's assume it wasn't for whatever reason (oversight, etc.).
(I've been trying to justify this in both directions all weekend and now my head hurts.)
 
I think you should formulate your question more clear otherwise its hard to answer.
 
12:38 PM
Hah, it's currently about as clear as it gets. Was looking for discussion on it because I've been contemplating it for a while, trying to make a decision for our BL.
Technically, right now, I can write all our code such that adding a new property to the model is not breaking in the database, but the question is should it be?
 
0
Q: Advice needed on good Python writing

mrgouAs a beginner, I'd like to see if anyone can suggest any better way of coding the below, as I'm duplicating code and nesting identical if statements as part of the following problem. I'm grabbing data from a REST API, which is returned in JSON format. However, the query may fail. One cause of fa...

0
Q: On tkinter: scrolling multiple widgets simultaneously in different frames

Bruno VermeulenBelow is an example on how to scroll two canvasses in two separate frames simultaneously. The trick is on how to pass on *args from the bindings to function onscroll for scrolling and onresize for changing the dimensions of the rectangle using lambda in the commands: Scrollbar(frame3, orient='ver...

 
> but the question is should it be?
Thats for you/your team to define.
 
We've been trying to, hence the question. ;)
 
Well, maybe that would be a good fit for softwareengineering.stackexchange.com
?
 
Been thinking about it.
Might put it over there in a while.
 
12:52 PM
this kind of question should better asked at Code ReviewJens 32 secs ago
I'm voting to close this question as off-topic because it should be posted on codereview.stackexchange.comScriptable 20 secs ago
 
@202_accepted If you want to take oversights into account, every update is breaking.
 
LOL
 
@Mast: If you don't account for oversights, is that an oversight?
 
1:12 PM
This is not codereview.stackexchange.com. This request belongs there. — V0ldek 32 secs ago
You'd be better off asking this on codereview.stackexchange.com, but you need to actually post code, not links to 3rd party sites. Imagine those links don't work one day - your question would have no content. — Archer 36 secs ago
 
@Mast I'm thinking of setting it up the other way: if the database doesn't have property x, then ignore that property on the website.
 
@hoffmale If you account for the oversight of someone else, and it still goes wrong, whose fault is it?
@202_accepted Ask for everything, only show what you get answered?
Good thing about that is it should always work.
 
@Mast Basically.
We're trying to make sure this is 100% stable.
 
Worst case nothing is shown.
 
Typically we do things the other-way-around: upgrade database -> upgrade model.
 
1:14 PM
The only way to guarantee something is 100% stable is by not touching it and not looking at it.
 
But, oversights happen.
 
I've destabilized things that half the company swore were stable.
 
This question is pretty open to opinions and probably belongs on codereview.stackexchange.comAdam 49 secs ago
 
if i declare a variable inside a loop that runs n times, then will the memory required by the varibale increase n times. ?
 
@Phoenix What language?
 
1:23 PM
C
or C++
 
Shouldn't IIRC
 
@Phoenix Same memory will be reused IIRC.
The variable is no longer alive the moment you leave it's scope.
Or are we talking global variables?
 
no not global
Thanks for the help guys.
 
@Mast When I say it's stable, I mean it...lol
 
To expand on @Enigmativity's comment. SO has other communities for other types of activities, such as code reviews, user experience, etc., etc. For software recommendations you can join SO's Software Recommendations forum at: softwarerecs.stackexchange.comnocturns2 21 secs ago
 
1:40 PM
0
Q: Counting dinucletotide fractions & j2 index from a genome fasta file

BiomageI wrote this code to count the dinucletide fractions that appear in a genome (this is a sequence of two nucleotides, 'A','G','C','T', together). My code also calculates the j2 index (this is a very simple index showing the fraction of groups of dinucleotides based on an equation at a glance*). I...

 
@Phoenix unless you are creating a new variable.
 
@bruglesco You mean malloc?
 
No.
IMO we should put an end to this hypothetical discussion about 2 languages at once.
Unless it can be made more concrete of-course.
 
Oops. Code behind the links.
https://codereview.stackexchange.com/questions/202062/asp-net-core-application
 
1:55 PM
0
Q: Simple Kanban Component

TimCodesLooking for some suggestions on how to make my code cleaner and simpler. Or put another away more elegant and idiomatic. Any other comments on quality or anything would be apprecaited. Thanks in advance class App extends Component { constructor(props){ super(props); this.s...

0
Q: Asp net Core application

SlinkI finished my test project and want to get feedback. Unfortunately, i dont have any developers friends who can help me, so im asking you to review it. Please help me. Github/ https://github.com/slink7576/CompanyPortal Website/ https://companyportalslink1.azurewebsites.net/ administrator accoun...

 
@CaptainObvious This one.
 
2:10 PM
0
Q: Is there a recommended design/architecture when developing a JavaScript module?

Alvaro MontoroPracticing some of the ES7 features, I started developing a class to perform some actions on the DOM and use the new features. I used Babel to make it work on the browser, and the code looks something like this: class myModule { constructor() { this.myProperty = 1; } myMethod = () => {...

 
Huh, Duga seems to be slow right now...
 
2:25 PM
0
Q: Median of two Arrays time complexity improvement

PredicateThe task is to find the median of two Arrays. I have an O(n) solution. Can it be written in a better time complexity? def findMedianSortedArrays(self, A, B): combined = [] while len(A) > 0 and len(B) > 0: if (A[0] < B[0]): combined.append(A.pop(0)) else: ...

0
Q: SI type safe unit calculations (revised)

Carsten DThis is the continuation of the questions raised in this thread I did include the improvements that were mentioned but still feel like, I do more copies than I need to. Also I am unsure about the number of copies being made when invoking certain operations on lavlues and rvalues respectively. Is...

 
2:43 PM
@CaptainObvious Generic / hypothetical.
 
2:55 PM
0
Q: Trouble Separating Code Python

ForcystusI am having trouble separating some code into different files in Python 2.7. If you are familiar with the libtcod Rogue-like Python tutorial, I had been reading along and working with that. Pulling out variables has been no trouble, but the problem lies whenever I try to pull out methods and clas...

 
@CaptainObvious appears devoid of code
 
3:25 PM
0
Q: Calculate the heat flow (for radiators)

j0ckI´m a programing rookie with minor javascript skills. So I ask you for a code review since I'm not sure whether my code is ok. Short explanation of my program: I work for the heating industry. Radiators have a different heat output. The standard heat output is calculated with: heat flow = 75...

 
3:38 PM
Hi @avazula - have you been here before?
 
3:58 PM
If this is working code that you think could be improved, see Code Review. If not, please clarify the problem with it. — jonrsharpe 14 secs ago
 
Monking
 
Please check "Which site?" for general issues and "Code Review or not?"Prune just now
 
4:37 PM
If this code works then this question is off-topic on Stack Overflow. You'll need a more general-purpose forum for this sort of code review. — tadman 5 secs ago
 
0
Q: Create table Console C#

ricardoI am new at programming in C# and I was hoping I could read the data from a matrix and output as table just like that: ------------------------------------------------------------------------- | Column 1 | Column 2 | Column 3 | Column 4 | -----------------------------...

 
@CaptainObvious borked
p.s. makes me think of a reference to a band in the song The Monster Mash
 
5:09 PM
@hoffmale maybe she needs some caffeine... or more power...
 
There is a specific site for code review if you want someone to evaluate your code, this is a programming site so unless you have a specific programming question/issue for your code this question is off-topic. — Joakim Danielson 37 secs ago
 
@SamOnela Seems like she got her wakeup call by now
Was just worried at the time since she missed this obvious invalidation: Revision #4 codereview.stackexchange.com/posts/202043/revisions
 
5:33 PM
ah - it happens...
 
Hmm... let's see what I get faster: The fanatic badge (24 days left) or the silver c++ tag badge (89 votes left)
 
0
Q: Find the value of variable r using three different matrices.

An studentCode performs well for small matrices, but gives memory error for large matrices of size 63000x93000, even when I am using server with memory of 64GB, space 100GB, swap 40GB. # -*- coding: utf-8 -*- from numpy import array, argmax, concatenate import csv def uread(Filename): UFILE = open(Fi...

 
@hoffmale If you write an answer each two days, probably C++. Otherwise Fanatic.
roughly
 
^^
Yeah
if I can keep that up (need to move to new appartment and stuff)
 
5:50 PM
Still haven't got my meta Fanatic...
 
0
Q: Best way to Write Model Class for MVVM

MwspencerI am writing Models using MVVM pattern. I am trying to find the best to go about this, and am wondering if my approach would be considered bad practice. Here are my properties for a User model: class User { #region Properties public int UserID { get; set; } public string UserName { ...

0
Q: Python - Simple wrapper class for a bot API

kylemartIs the following in poor taste? This would be contained within a groupme module. Does it make sense to re-define a RequestException class within this module? If I didn't, wouldn't consumers of the module need to be aware of the underlying requests.exceptions.RequestException being thrown: ... ...

 
6:13 PM
@CaptainObvious ugh closed originally for two reasons, but one now addressed... the other seems to still be an issue
 
6:31 PM
You may better aks this kind of questions at codereview.stackexchange.comhelp-info.de 49 secs ago
 
6:41 PM
-1
Q: Index error for a function iterating over a list of lists

AprilI'm rather new to Python so bear with me. I'm trying to write a bit of code that will calculate a sliding slope for each frame of a movie, so I have a list of lists. This code worked with six numbers in each sublist but when I run it with more numbers in each it gives me the list index out of ran...

 
7:11 PM
0
Q: Double Linked-List Implementation

AndyI implemented a Double linked list in c++ to practice. I reviewed the code myself and I would like others perspective about the improvements that could be made. I have also noticed that I don't take fully advantage of many c++ features nor use them in my code. Any comments about significant perfo...

 
@SamOnela Less so though.
Otherwise it wouldn't have been re-opened by an ex-mod and current mod.
 
@Mast okay... so would you expect an answer to suggest how to split up the code into separate files?
I thought about asking what the errors were, but then it might have felt like SO
 
@SamOnela That might be part of a good answer. Splitting up increases reusability for example.
 
8:24 PM
I guess so. I was going to try that, but I don't know if accessing scope that way is a best practice, so I don't know if that will get past code review. — James Drinkard 53 secs ago
 
 
1 hour later…
9:24 PM
ugh.... why in the world would someone introduce an interface for unifying Builder classes`?
this makes little to no sense. You're not going to pass around builders as their interface. And you're not going to use the interface in any useful way
it's just a compile-time enforcement of a naming convention at best
and an unnecessary, ugly and possibly stupid overengineering mistake at worst
ARGH
 
9:45 PM
possible answer invalidation by Boletrone on question by Boletrone: codereview.stackexchange.com/posts/201965/revisions
 
@Duga rolled back
 
 
1 hour later…
10:58 PM
 
11:09 PM
"You have full, creative control over this project, Elliott." "Ok, great." (In my head: "that's a terrible idea and I'm going to show you just how bad it was.")
 
0
Q: Pseudo code for a relational-normalized database

Brandon FinleyI am trying to visually represent how my database is going to be structured, and am looking for feedback normalizing/reorganizing my relational database. A report gets filed. In the report, 1 or more agencies are under investigation. Each of the agencies has 1 or more findings. Each finding requ...

 
@CaptainObvious PSEUDO CODE!!!
 
11:27 PM
0
Q: Simple nodejs cli tool for logic, architecture, coding style

kenpeterhttps://github.com/kenpeter/mb. It is a coding exercise for interview. I am not entirely sure what the code reviewer looking for. Could someone give me a pointer?

 
@CaptainObvious link to code :/
 
11:42 PM
0
Q: C++ - Heap implementation for numeric types

skr_roboI am trying to improve the quality of my code as well as trying to study the Heap data structure. I have implemented a minHeap (Heap in which minimum value nodes have higher priority). Ref: link1, link2, link3. This is the commented code: #include <iostream> #include <vector> #include <limits> ...

 

« first day (1934 days earlier)      last day (2076 days later) »