« first day (2161 days earlier)      last day (2152 days later) » 

00:00
RELOAD! There are 5952 unanswered questions (89.8677% answered)
00:28
0
Q: VBA Performance Deficiency in Nested Loops

Josh TThe below code works however it takes several minutes to run. Is there a way to optimise performance so that it can be completed in a shorter amount of time? All suggestions and improvements will be highly appreciated. Code: Sub FillStandardHours() ' ' FillStandardHours Macro ' Application.Sc...

0
Q: Sass styling with React components

DanielI have put together a piece of what can be a much larger frontend in Reactjs. I just put together the component that renders to the user a list of airports and hotels as well as a header component. I feel confident about the JavaScript implementation, but what I would like some feedback is on m...

00:47
0
Q: Scipy basinhopping custom step update and constrained looping

SuperKogitoI am searching for the global minimum of a certain function and trying to use its gradient (here same as Jacobin) to guide the step counter. However, my x is fix and so is my gradient. I am also trying to retrieve the fastest way possible the first x for which f(x)<1, therefore I am using a const...

 
1 hour later…
02:05
0
Q: C++ Banking Class

David WhiteI'm currently self-teaching myself C++, using a C++ For Dummies book that I bought a couple months ago. To practice, I've created a Bank class that holds usernames and passwords, and that has a login/logout system. IT also implements a failsafe if there are too many failed login attempts. I'm loo...

 
2 hours later…
04:12
Monking
04:45
0
Q: Two solution to leetcode 127.wordLadder

AliceI am working on Word Ladder - LeetCode Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, such that: Only one letter can be changed at a time. Each transformed word must exist in the w...

05:27
Welcome to stackoveflow! Here we dealing with code (with not working code, mostly). If your code is actually working as expected and you what to just enhance it a little - there is another stackexchange site for this. — vasily.sib 34 secs ago
06:12
Well the issue is not exactly in the Good/bad opinion based. I will recommend reading How to Ask and on topic. Here you have some external GitHub, but question must be self containt. no one will go to you github and review your code. Either you have a question and isolate an Minimal, Complete, and Verifiable example or you want a code review but you will also need an MCVE but you are on the wrong site. — xdtTransform 35 secs ago
@xdtTransform where can I ask for a code review? — NovaBG03 34 secs ago
0
Q: Long loading query

Ingusi have a query that loads ~1600 lines. I use in HeidiSQL to run querys (but they are coming from php/mysqli app). On my test base it takes ~12 seconds to load and on client ~40 seconds (In php id doesnt even compleate). My question is is my query bad? What coul be otimized? P.S. I will not po...

1
Q: Simple exchange calculator in Java - structure and tests

MarcinI am trying to learn how to correctly structure my projects and write a good, clean code. I would also like to learn how to write good tests. Can you please review it and give me some tips and tricks how to make that better? The application is calculating the exchange from the bill for lemonade....

I will first isolate what you want to be review. And be sure to at least know the rules codereview.meta.stackexchange.com/questions/5777/…. I'm sure this question is not eligible. — xdtTransform 39 secs ago
I'm voting to close this question as off-topic because it belongs on Code Review. When you ask there, be sure to include the code inside the question and not as a link. — Zohar Peled 42 secs ago
the rules are simple : codereview.stackexchange.com/help/on-topic You need to have code in the question. and only thing in the question will be read. you need to be the author of this code. It need to work and have a purpuse. This is not soup nazi. I know places where droping a GitHub in a 2 lines "Is it gud?" question, will make your life worst that you can imagine. — xdtTransform 50 secs ago
07:07
If you are looking for a code review for this code (which compiles just fine), please go to codereview.stackexchange.com . Otherwise, please clarify your problem. — Sebastian Mach 14 secs ago
07:20
Monking
07:44
I'm voting to close this question as off-topic because code review questions should be asked on codereview.stackexchange.comadiga 14 secs ago
Stack Overflow is for help with fixing code. As mentioned above, Code Review is the appropriate place to ask for style advice on working code. — Barmar 27 secs ago
07:59
0
Q: Simple join between 2 tables with unusual structure

styxI have two tables ACCOUNTS: +--------------+----------------+----------------------+-----------+ | BANK_ID (PK) | BRANCH_ID (PK) | ACCOUNT_NUM (PK) | CURRENCY | +--------------+----------------+----------------------+-----------+ | 20 | 621 | 1001 | ...

08:38
0
Q: Javascript array_count_values function

HasenI am using an array_count_values function since I have translated the code from php to javascript and javascript does not have this function, but not sure on the performance of it. I'm sure it can be faster. It currently takes 50ms for 32000 iterations each time it is called. I have one that ret...

09:16
You might not do code reviews in the IDE, though. So for team members or others reviewing your code, any special highlighting or annotating done by the IDE may not be of much help. — Michael 5 secs ago
0
Q: Exceeded time limited to solve super pow

AliceI tried to solve the Super Pow - LeetCode Super Pow Medium Your task is to calculate *a**b* mod 1337 where a is a positive integer and b is an extremely large positive integer given in the form of an array. Example 1: Input: a = 2, b = [3] Output: 8 Example 2: Inp...

09:37
0
Q: Implementation of Strategy Pattern (photo gallery example)

NovaBG03I'm learning design patterns and I thought that it would be a good idea to make my examples of each pattern. This is my example of the Strategy Pattern. Can you tell me is it good and what to improve? This is the Gallery class public class PhotoGallery { private ICollection<string> phot...

09:56
0
Q: Multi-thread Matrix Multiplication's algorithms problem solving

Umais Hasan public void mmm(int[] x,int[] y){ int n=A.rows; y=new int[n]; for(int i=0;i<n;i++){ y[i]=0;} for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ y[i]+=A[i][j]*x[j];}} } How can i solve which is in red border in java programming.?

10:35
0
Q: Roman to decimal python

OfeksHey , i'm a beginner as you can see and i would like to know how i can improve my code. Studying for 6 months now. Thank you. roman_dict = {1: 'I', 4: 'IV', 5: 'V', 9: 'IX', 10: 'X', 40: 'XL', 50: 'L', 90: 'XC', 100: 'C', 400: 'CD', 500: 'D', 900: 'CM', 1000: 'M'} divide_list...

10:54
0
Q: Encode string of digits

IrbisInput data: string of digits, for example "123456" Output data string of encoded digits, for the above example "\x0c\x22\x38" std::string getEncodedStringOfDigits(const std::string& data) { if(!std::all_of(data.begin(), data.end(), ::isdigit)) { throw std::runtime_error("String...

0
Q: FileInfo.Length show 0 and not the real size

Sofia RodriguesI'm trying to add the name and the size of a file on a ListView. The name is ok, but the size is always 0, independent of the file. Can someone check where I'm doing wrong? Or what should I try different? Thank you in advance! Here is my code (it split a PDF and adds each page and page size o...

11:04
@CaptainObvious broken
11:34
0
Q: 4 solutions to leetcode 202. Happy Number have almost same performance

AliceI am working on an easy math question Happy number Happy Number - LeetCode Happy Number Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the...

@CaptainObvious RBA
@CaptainObvious UWYA, lack of details.
@CaptainObvious Borked beyond doubt.
The arguments don't even match.
11:53
0
Q: Knowledge-based authentication using Domain-driven Design in C# Part 2

datahandlerThis is a follow question to this one. In the previous question I marked @DerKommisar's answer as accepted, not only because it provided a good solution, but also because it forced me to think differently about how to approach my design. Since then I have attempted to put my own slant on the de...

0
Q: Managing complex state, anything wrong with this approach?

myleftshoeMy app UI state started to get somewhat complex with many useStates so I created a useStateMate hook (sorry for the cheesy name) as below. Any gotchas with this approach? import { useState } from 'react'; const stateUpdater = (state, updater) => (property, value) => updater({ ...state, [propert...

This will be too broad. It takes time to learn. Start again from scratch, and keep a diary noting what you found hardest, and where you have improved. What are you doing to learn? Do you have someone to do pairing with? Code reviews? Are you a beginner at pyGame, Python or AI? — doctorlove 38 secs ago
12:13
0
Q: design a service layer

JahanI'd Like to design a service layer based on my Repository. Should I dependent BaseRepository from ViewModel? and put it on service layer? How? Should I move ConvertReportToPDF method to service layer? Please suggest me a service layer based on it. public class BaseReportRepository<TModel, TVi...

Stupid question: Are "No longer needed" comment flags auto-approved under some circumstances? Just took way less than a second to get a comment removed and the flag marked as helpful. (I had previously deleted my comment pointing out something, to which this comment was the response along the lines of "fixed". There were no other comments on the question)
@Graipher That happens sometimes, made me jump the first time too.
@Mast KK. Felt very spooky. At least I'm not alone :)
I think it works similar to spam flags, that if a comment has enough flags, it gets auto-removed. But I'm trying to find the explanation (I'm sure it has been provided in this chat before, just not when) and haven't found it so far.
Be assured everything works as intended and moderators still don't respond in less than a second.
I've seen some seriously fast moderator action here, but not that fast.
#OurModeratorsAreAllBots
12:27
Duga is running everything.
As long as it leaves the answering to us, I won't object
12:43
Haha
0
Q: intersection of two sorted vectors in C++

Rickintersection of two sorted vectors in C++, can this be written any better. vector<int> intersection(vector<int>& nums1, vector<int>& nums2) { vector<int> result; int l = 0, r = 0; while(l < nums1.size() && r < nums2.size()){ int left = nums1[l], right = nums...

0
Q: Integration test naming conventions

AndersI'm working on a async test suite for our CQS backend. Consider this test [TestInitialize] public async Task Context() { Result = await Given_payout_response_CustomerInvoice1ProviderInvoice2() .When(() => new NewInvoicesCommand { Invoic...

13:42
If the code works and you're only trying to refine it, this question may be better suited for Code Review. — Ctrl S 15 secs ago
0
Q: Reduce the nested logic from my Angular firebase subscriptions and avoid unnecessary additional queries

Jon SmoothI could use some help refactoring my component and service. I have a lot of nested logic and wasn't sure what I could do to improve this. I'm new to Angular 7 and their piping syntax. I suspect this is what I could use in this example to improve my code? Also, I have an issue where the drawPoll()...

14:28
Code review is for working code only. — dfeuer 6 secs ago
14:42
Since the code works as intended this question would be better in CodeReview which is for optimizing and improving working code. — Emily Alden 7 secs ago
15:09
0
Q: VBA Function Error Bubbling

SmolarWhat will be the best practice to create an efficient error handler in object class in VBA? Creating some for Outlook (used later in both, Excel and Access) and trying to get the most efficient and well-built handler. My concern here is that I have multiple Functions returning an object which ma...

15:28
0
Q: RecyclerView: No adapter attached; skipping layout fragment

Diaa Elsaighim trying to retrieve data from database to fragment using recyclerview but i get error RecyclerView: No adapter attached; skipping layout search.java package com.example.lifetravel40; public class Search { private int search_id; private String activity; private String description; priva...

0
Q: How to return cell values of a non-sequential set of cells from multiple closed spreadsheets? Code condensing/simplification

Alex HThe code below does what I need it too but it is ugly and clunky. If I could set the list of cells I want to retreive data from as an array that is declared somewhere, then I could loop through that array rather than declaring each individual cell. As you can see below, I have had to declare eac...

15:48
0
Q: Good Vs. Evil - Battle For Middle Earth - CodeWars

HappyHands31This is the code that I'm submitting for the "Good vs Evil" Kata on CodeWars: https://www.codewars.com/kata/good-vs-evil/train/javascript function goodVsEvil(good, evil) { good = good.split(' '); evil = evil.split(' '); //hobbits, men, elves, etc let goodWorth = [1, 2, 3, 3, 4, 10]; ...

16:23
Monking
16:53
Greetings, Programs.
18:18
Okay. This isn't really the right forum for opinion-based questions like "is this a good way to do things". If your code is working the way you want it to, you could try the code review StackExchange instead, where that is exactly the kind of question they're looking for. — Daniel Wagner 58 secs ago
18:44
0
Q: Deleting the stop words

eulerisgodSuppose a textfile named story.txt contain two lines The house whirled around two or three times and rose slowly through the air. Dorothy felt as if she were going up in a balloon. The north and south winds met where the house stood, and made it the exact center of the cyclone. And a file name...

0
Q: Write a program that prints the longest substring in which the letters occur in alphabetical order by ascii

Sergei BykovskiyWrite a program that prints the longest substring of s in which the letters occur in alphabetical order. And the output has to be: Longest substring in alphabetical order is: beggh here is my code. I know that it is awful to ask somebody to write code for someone, but I have no idea how to conti...

19:32
Questions on StackOverflow are usually about specific problems with code. If you're looking for general advice, ask on Code Review. — 4castle just now
 
1 hour later…
20:50
If you don't have a specific problem and just want some feedback, you may want to try codereview.stackexchange.com instead. — nofinator 17 secs ago
21:01
2
Q: C++11 min-heap with configurable arity

Gregory NisbetHere is a simple heap implementation that allows the heap arity to be chosen at compile time, including the degenerate case where n=1 and the heap is effectively a sorted array with a terrible repair strategy. The heap implementation class, broadly speaking, has two repair strategies: making swa...

Your problem is a good candiate at Code Review. Make sure to read their How to Ask page and post your question there. — R Sahu 35 secs ago
 
1 hour later…
22:19
-1
Q: Python code issues

SwiftyMcBlamI have been trying to adapt some python code for a project and need some help as i cant get it to work. Im still technically new to python and have been trying to learn. Your help is appreciated. import random def WelcomeScreen (): print ("-----------------------------------------------...

I am well aware. The hasConfig() method is actually defined public function hasConfig(string $key): bool. However, I get chewed out by my less experienced colleagues in code review if I am not overly specific like this. It is unrelated to the problem I'm describing. — JRL 14 secs ago
22:38
0
Q: Indenting and Dedenting ASP code with Python

tisaconundrumI've created a Python script that tries to properly indent and dedent ASP code. Similar to http://www.aspindent.com/ Since I've began using it I've noticed some edge cases that I hadn't anticipated. The reason these edge-cases appear is because of the fact that I'm not parsing straight ASP code...

23:37
0
Q: Removing Bootstrap (CDN) from asset assets.precompile

JakeI was trying to segregate my CSS to specific controllers by compiling my assets and rendering them in my layouts via <%= stylesheet_link_tag "application", params[:controller] %> I am using the Bootstrap (4.3.1) CDN and have this in my application.scss file: @import "bootstrap-sprockets"; @impo...

23:47
0
Q: Can we have a guide to wonderland?

PeilonrayzRequest Can we have a 'guide to wonderland' meta. 'Wonderland' is all our rules which mostly consists of lots of different rabbit holes. Rational When I started on Code Review I spent a good couple of months looking up and exploring various rabbit holes. Whilst it was nice to don the name Al...

1
Q: Modeling an IP Address

Developer PaulI've recently picked up a book that gives various "modern" C++ challenges/solutions. One of the first ones I did was on modeling an IPv4 address in C++. Below is the full implementation; it's also on Github. Any suggestions? My goal is to make this as modern as possible and I'm not sure if there ...


« first day (2161 days earlier)      last day (2152 days later) »