« first day (2085 days earlier)      last day (1915 days later) » 

12:00 AM
0
Q: Simple local cache that checks by date else get from db

mel3kingsI'm looking for feedback on how this can be improved, basically what I'm trying to do is check if the cache has the object else check from the database. I have list of ids, then I separate them based on if they already exist in the cache or not, based on the date as well. One list fetches from t...

 
RELOAD! There are 5848 unanswered questions (89.8221% answered)
 
12:47 AM
0
Q: Fizzbuzz with dynamic height container

Sᴀᴍ OnᴇᴌᴀHere is a variation on a theme: fizzbuzz. After providing this answer recently, I decided to practice some VueJS skills with outputting the values and conditionally applying styles based on the value. Specifically: red border for Fizz blue border for Buzz purple border for FizzBuzz And then I...

 
 
1 hour later…
1:50 AM
0
Q: Fetching specific records in a RESTful application?

herondaleBasically what I'm trying to achieve here is I need to fetch a set of images based on the selected folder. Is this a correct way to do it? I'm using ZF 2.5, and have the following function in my RESTful Images controller: public function getList() { $folder_id = $this->params()->fromQue...

 
 
1 hour later…
3:09 AM
0
Q: What is the standard for storing template items, tenant items, and instance items in SQL Server?

jwizeLooking for the best database design Suppose I have a database with some companies and employees in it. I also have some entities which have a inheritance relationship. In other words the fields are always going to be the same for any type save for a couple properties. The application is a multi...

 
3:24 AM
0
Q: How do i find a variables such 'S' in the opened string file through ifstream and store it in refrence parameters?

eve_rider#include <iostream> #include <fstream> #include <iomanip> #include <string> #include <cstdlib> using namespace std; // define variables const int ROWS = 20; const int COLUMNS = 60; const unsigned int EMPTY = 0, ROCKY = 1, ROUGH = 2, WALL = 3, PLAYER_START = 4, PLAYER_GOAL = 5, MONSTER_START = ...

 
4:14 AM
0
Q: Break iterations after an exception happens without data loss

Farzad VertigoI have this code that reads a file and after processing a few lines writes the output to a second file: num_reads = 7 with open('data.txt') as read_file: with open('new_data.txt', 'w') as write_file: while (True): lines = [] try: # expect errors if the ...

 
5:01 AM
0
Q: Code refactoring C# tuples / DragonFractal

Shepenkov ValeriyCan anyone suggest how to reduce code, i.e. instead of two tuples below make one method maybe in internal static class DragonFractalTask? using System; using System.Diagnostics; namespace Fractals { internal static class Program { private static void Main() { ...

 
Monking
 
5:17 AM
0
Q: Hangman v2 written in C

FarazThis is a follow up to my previous Code Review, and I have incorporated feedback I received in this revision of the code, along with some other improvements. I would appreciate your feedback on this code, specifically the practice of placing project-wide constants in config.h, the count_missing_...

 
5:31 AM
 
5:48 AM
0
Q: Table th/td absolute positioning: 1px dislocation

PhoenixTable th/td absolute positioning: 1px dislocation when the table is scrolling, the last column is fixed. The last column of cells use absolute positioning. Firefox / Edge / IE, have a 1px misalignment at the top of the last column and adjacent columns. Chrome, and the top of the adjacent col...

0
Q: A better way to call a possibility of mutliple IDs in javascript?

unoI have a stripe payment form and when i use diffferent forms that get hidden, i must use separate ID's for the form to appear. I have found a way to do this but looking to simplify the code if this is possible. I have a page that has listings for purchase. Each listing can have variants. Because...

 
6:00 AM
Monking
 
6:35 AM
0
Q: Python 3 Nameerror with elif statement

JimI have been trying to write a program to tell you which method of transport to use for your next outing using Python 3 but this code keeps returning with a nameerror in line 7. I have tried many times to fix this error, but it just doesn't leave me alone! bike = ("You should ride your bike.") bu...

 
@CaptainObvious Broken code
 
@CaptainObvious I always wonder what an interviewer would say if used puts... Feels some how un-C, even though it is probably the recommended choice.
 
6:51 AM
0
Q: How to convert range of image file path from local folder as comment in the selected destination range?

Karthik KarthikI'm asking for your help. My research ended up in 2 different macros that combined will give a good utility for my work. This VBA code will insert image as comment. This VBA code will fetch Hyperlinks(Local folder path only, not web based URL) and paste them in destination cell. I really trie...

 
 
1 hour later…
7:53 AM
0
Q: Brute force least adjacent swap anagram transform in Java

coderoddeIn this post, we are given two anagrams, and we wish to compute a shortest sequence of adjacent character swaps. For example, DBAC -> BDAC -> BADC -> ABDC -> ABCD, four adjacent swaps. I tried to split the algorithm into logical parts in order to facilitate better readability and would like to he...

 
8:25 AM
0
Q: Making a decorator with arguments in a flat manner

oguretsI know you must've been already tired of Python decorators, but this one seems new! There is a common practice of making decorators with arguments. But Flat is better than nested, so let's flatten it up: def decorator_with_args(arg): def wrapper(*args, **kwargs): print('decorated wi...

 
8:40 AM
0
Q: Improving performance of Excel Converter

JoeltyI'm using C# .NET Core 2.1 and Excel lib DotnetCore.NPOI I'm converting xls file to xlsx by loading xls and copying sheet by sheet, cell by cell to xlsx - How can I improve performance / ram usage here? private string ConvertToXSLX(string path) { using (var fs = File.OpenRead(path)) { ...

-1
Q: How to increase speed of code using data structures rather than for-next loops?

PherdindyAfter doing some bottleneck testing as shown below (code of interest is at row 10): I have already resolved several others using Application.Index with Application.WorksheetFunction.Match and reduced time to perform from about 7-8 seconds to milliseconds. My problem is with the code below as I ...

 
8:56 AM
0
Q: Given an input string and a pattern, implement wildcard pattern matching

PerplexabotI have been trying to solve "Wildcard Matching" on leetcode. I know there are more "manual" ways to solve this without using the RE library. But I would like to know if passing the time limit is possible without having to manually create a pattern finder from scratch. Currently this code fails at...

 
Instead, introduce code review and reject pull-requests that consist of such non-atomic commits? — alfunx 55 secs ago
 
9:22 AM
@JohnJ., now that your code works I would advise to either try it with a debounce implementation, and if you bump into a problem, ask a specific, new question about that. Or, alternatively, you could post your working code on CodeReview and ask how it could be improved. But be sure to add more comments to your code so it is clear what each variable is needed for. Also read what you need to do for a good question there. — trincot 56 secs ago
 
1
Q: Pass Connection object to multiple methods in java

J. AdamI'm trying to increase the speed of my application at the moment. My inserting/updating methods were opening everytime a new connection which took too much time. I read that it's better to create on connection object and pass it to different methods. Well it worked fine but i'm just curious if th...

 
I'm voting to close this question as off-topic because the code is working as is. The question belongs on codereview.stackexchange.comYury Tarabanko 46 secs ago
@YuryTarabanko I am sorry to see your close vote. Unfortunately there no even views in codereview page codereview.stackexchange.com/questions/211710/…Mo. 40 secs ago
 
9:50 AM
This looks like code review to me, probably better to post at codereview.stackexchange.comJoakim Danielson 54 secs ago
 
10:15 AM
@TDK I wouln't say it's exactly "opinion based". I guess it is but rather it actually belongs to CodeReviewvlaz 47 secs ago
I consider a combination of 1 and 2 to be a golden combi. If the issues are as small as possible you may even 'fit' for just one commit. Besides it'll make items get to be done earlier and be tested aswell. Also i'd introduce code reviews to make sure the commits are as atomic as can be. — Baklap4 56 secs ago
I'm voting to close this question as off-topic because it belongs to CodeReviewvlaz 57 secs ago
 
10:33 AM
If you have working code, and your question is about making it look clean, then your question is off-topic. CodeReview might be better suited for your question, although you should check what is on topic there. — trincot 53 secs ago
 
11:17 AM
0
Q: TypeError: can only concatenate tuple (not "str") to tuple

vishnukumar elangovanConvert all CSV files in a given directory to JSON using Python I tried to run the above code for my converting process, everything goes fine but when I tried to change the element position which is - - (csvfile = os.path.splitext(filename)[0]) to (csvfile = os.path.splitext(filename)[1...

0
Q: Simple LinkedList

user297876I guess this has been made a couple of times by now, but i wanted to take my chance on creating a simple generic linked list in c#. What do you think ? This is the main class. public class LinkedList<T>: IEnumerator<T> { private Node<T> head; private Node<T> tail; public T Current...

0
Q: Updating one model field based on the associated model's field

Bibek SharmaI'm wondering if there is any way we can optimize the following code. Scenario is Library's active field should be true if it has any available book. class Book < ApplicationRecord belongs_to :library scope :available, -> { where.not(deleted: true) } after_commit :update_library_active, ...

 
11:54 AM
@CaptainObvious Broken code.
 
 
3 hours later…
2:40 PM
0
Q: Error checking onus on caller or callee? (PHP Example)

ErebusI am using a PHP framework that is heavily array based (CakePHP) and I have some code as follows: // caller. $array is defined elsewhere and *should* have Apple index $apple = new Apple(); $result = $apple->eat($array['Apple']); // callee class Apple { function eat($array) { if(!empty($ar...

 
2:51 PM
If you have working code and are only looking to increase performance, you may want to post the question on codereview.stackexchange.com instead. And please provide a Minimal, Complete, and Verifiable example - no matter if you post here or on StackExchange. — Mike Scotty 43 secs ago
 
0
Q: Tic Tac Toe game in Python 3.X using tkinter UI

Aivaras KazakevičiusI am learning to program in Python and as my first project I decided to create a simple Tic Tac Toe game. The game is working properly now and I am wondering if there is anything I could do to improve my code. Notes: 1) In my original code I am using pictures on buttons that allow to choose pla...

0
Q: Python Plot showing live SQL data on Tkinter Canvas

K-DoeI have written a piece of code where I have a simple GUI with an Tkinter Canvas. On this canvas I draw an Matplot. The Matplot is updated every second with fake sensor data i simulate in an SQLite DB (just for testing at the moment). I reached most of my Goals for this test case. But a few Thing...

 
"our reporting is showing this changeset as not code reviewed" - Well, that is indeed accurate information. Is that stopping anything in the overall process though? Why specifically does this change set need to be code reviewed? (I know I certainly wouldn't review a change set that large.) — David 15 secs ago
 
3:14 PM
David Fullerton on January 18, 2019

A loooong time ago, we used to post an annual “State of the Stack” update on the company and community. Then at some point it became an infographic which was… listen, everyone was doing infographics in 2011. Now it’s 2019, the company has grown and changed in so many ways, so we’re bringing this tradition back and taking a look at how far we’ve come while being open and honest about how much work we have left to do.

2018 was a big year! Some stats:

Across all of Stack Overflow and the Stack Exchange network, we saw 9+ billion pageviews from 100+ million users over the course of the year. …

 
Why do you want to code review a branch operation? — Daniel Mann just now
 
0
Q: Gather list of all IDs ordered by submission date and ID by parsing file path

jasonmadesomethingThis code is to gather a sorted list of IDs (first by ID, then by date) recursively from a directory that submitted a particular type of file (that, as you can tell, includes the word "Magic") and then outputs the IDs paired with the modified date (the closest proxy I have for the submission date...

 
3:44 PM
Hmmm. If the code works then this is probably off-topic. Maybe try over on Code Review SE? — jdv 51 secs ago
Code Review SE would be a better place for a question like this. — Symon 17 secs ago
 
posted on January 18, 2019 by CommitStrip

 
4:05 PM
Nibjubg
 
4:21 PM
The only reason for this is that it is part of our process. My main question though is whether or not there is a way to bypass it and mark it as reviewed. Obviously, we aren't going to do an actual code review on it as all of the code that went into it has been reviewed already. — Jonathan Nixon 12 secs ago
Advices: 1. If ain't broke, don't fix it. 2. This should be posted in codereviewsyorodm just now
@yorodm in its current state, it's off-topic on Code Review. Asking for new features or rewrites in other paradigms is off-topic. The code is fine for a general review, although the description needs to get extended for CR.SE. — Zeta 13 secs ago
 
0
Q: Setting the Owner property on a modal dialog in WPF/MVVM using a Func

epalmI'm looking to solve the problem of setting the Owner property on modal dialogs in WPF, while using IoC and MVVM patterns I've seen (and written) all sorts of hacks. Here's a naive example of a window with a viewmodel containing an ICommand which prompts the user. It works by having the view set...

 
5:02 PM
0
Q: Managing dependencies in Ruby class using injection

Steven AguilarI'm currently working on building a class to create a PDF form application with attacked documents and sending that file to an endpoint in Box Api. I have found extremely difficult managing dependencies in this class. For example, I'm making use of a gem combine_pdf. This gem has the following ...

 
Monking
 
5:21 PM
This question used to be poor, but is much better now. Think it deserves some upvotes.
It's at +2/-2 now.
 
are any of those comments obsolete now?
 
All of them, I suppose.
 
5:46 PM
This question belongs on codereview.stackexchange.com. — jaco0646 just now
@jaco0646 the code here looks too hypothetical for CR and would likely lead to it getting closed as not on-topic. Perhaps "Which Site?" would be helpful in this case. — Sᴀᴍ Onᴇᴌᴀ 10 secs ago
It may be useful to create your solution using foreach, then ask on Code Review to see if there is a more elegant way to do it. — GrumpyCrouton 21 secs ago
 
6:05 PM
0
Q: Laravel Security feature is not secured?

Angkor WatI'm a junior web application developer. I do not know much about Laravel. But I have been building web application using ASP.NET stack. As far as I have understood, MD5 is not recommended by many security experts for securing any application. My senior PHP developer has started a new project wi...

 
6:52 PM
-1
Q: (Python) PUBG API Client: From single file towards OOP

KoehlerI've been lately trying to improve my coding, in particular stop creating single files, but I have a lot of questions about how to organize the code and if what I'm doing makes sense. I wanted to organize the project in the following fashion, keeping in mind I'd like to reuse most of the structu...

-1
Q: New to java - creating a simple class without objects

Dauntless7so I was just required to create a simple class that outputs a student's name, mark and grade. Would this code work as a valid class? (I know it does not compile/run since I did not define any objects) Any way to improve the print functions into one line? package details; /** * @author John...

 
7:08 PM
0
Q: Iterating through combinations

BlackwoodBackground The following describes the real world problem that my code is intended to solve. It is may help you understand what the code is doing and why. I don't think this is strictly necessary in order to review the code, so feel free to skip to the section headed "Problem" I have an applica...

 
 
1 hour later…
8:08 PM
This might be better for codereview.stackexchange.comAdam 36 secs ago
 
0
Q: What is slowing this Haskell code down?

AmozI am trying to learn Haskell doing some contest problems. I have worked a bit with the language but still have a very long way ahead. Right now I am working with a problem called Ants, it is pretty straight forward, some parsing and minor calculation. My program finished running in 0.69 seconds,...

 
8:27 PM
0
Q: Computing Doppler delay on a meshgrid

WooWapDaBugObjective Plot the contour of the iso-doppler and iso-delay lines for a transmitter-receiver reflection on a specular plane. Implementation This Doppler shift can be expressed as follows: where for a given time t_0, m is the reflected unit vector, n is incident unit vector, v_t is the veloci...

 
8:43 PM
0
Q: Error with Python Code

D.oka19I'm trying to follow along with this video: https://youtu.be/dSYJVbj4Eew On the vidoe the code is : raw_data = pd.read.csv('linear.csv') raw_data.head(]) But how do I get python to get the datafile? I keep getting errors. Code: raw_data = pd.read.csv("C:\Users\D\Desktop\linear.csv") SyntaxE...

 
possible answer invalidation by Mike on question by Mike: codereview.stackexchange.com/posts/209384/revisions
 
9:14 PM
@Duga That's ok.
It's specifically requested by the author of the only answer on that question, adding context.
 
^^
This looks like a slippery slope, you should ask him to teach you about the differences between the two security frameworks, benefits and deficits, so that you both can properly code to the strengths of the Framework that he chooses. This is an opinion question in my opinion, and I don't think it is a good fit for our site as it could cause issues between you (junior-dev) and your colleague (Senior-Dev). you should follow his lead in my opinion. — Malachi ♦ 1 hour ago
well stated, @Malachi
 
0
Q: Stackoverflow profile clean reset

Yash KarankeIt looks like there may be a bug on Stackoverflow, my entire profile has been reset, all the questions I asked are gone, all the answers are gone, reputation is set to 101, I don't know why, and this behavior is on Stackoverflow, My other profile on code review seems to be fine.

 
9:35 PM
Short answer: no, not here. But if you have working code it could be on topic for Code Review, if you include it in the actual question. — jonrsharpe 30 secs ago
 
@Feeds why's that post here? Just because it mentions CR?
 
@bruglesco yeah- likely because of the link to his profile
 
Or the tag?
 
¯\_(ツ)_/¯
 
9:55 PM
possible answer invalidation by Samueljh1 on question by Samueljh1: codereview.stackexchange.com/posts/211726/revisions
 
@Duga rolled back
like Sysiphus's rock
 
@SᴀᴍOnᴇᴌᴀ much like Sysiphus, you'll get to do it again soon.
 
~plays sad trombone sound
@bruglesco you mean for that specific post, or for other posts?
 
I hope just in general for others. It's rare when 1 user resists and insists on reediting.
 
@bruglesco I saw it at least once this week
 
10:08 PM
True. I saw that post get locked.
 
10:30 PM
possible answer invalidation by Sᴀᴍ Onᴇᴌᴀ on question by Alessia: codereview.stackexchange.com/posts/127212/revisions
 
@Duga just updated formatting...
trying to defeat a zombie...
 

« first day (2085 days earlier)      last day (1915 days later) »