« first day (2541 days earlier)      last day (1483 days later) » 

12:00 AM
RELOAD! There are 6513 unanswered questions (90.0874% answered)
 
12:32 AM
2
Q: Looping through a string of floats/int

DutchEchoI'm new to programming and started with some tutorials about C++ on YouTube. Now i was wondering how i should solve below. It does work but it is like a lot of code to write. And I have more lintypes to define. So hope someone can point out a better way std::string filepath = "path/to/file.ext";...

 
 
3 hours later…
3:12 AM
1
Q: Finding Possible Strings from Series of Numbers

Sakamoto KazumaGiven a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to letters is done just like they are arranged on a telephone keypad. Looking for ways of making the code more consise and easily readable. Want to le...

 
3:35 AM
1
Q: Python. Refactoring a function to increase its capabilities

Давид ШикоI'm writing a bot, it turns out pretty big (1000 lines). In code, I often use the "show profile" function. I noticed that I greatly complicate it by adding functionality with kwargs. I am a newbie, I don’t know if I should create a class instead of a function, break it into different functions or...

 
3:58 AM
0
Q: Knight vs Monster Java code

Luthfii am a newbie programmer and want to tryng develop a Knight vs Monster Game using java and i am having trouble as to how to make it so fighting between monster and kngiht. Which classes and method should i be using in order to approach this problem ? public class Monster { private int health...

 
 
3 hours later…
6:31 AM
That would be a question for codereview perhaps? — mplungjan 52 secs ago
@mplungjan Sorry, what is "codereview"? — Srdjan Milic 59 secs ago
 
7:03 AM
0
Q: App that track amazon product price

Vivian Mascarenhasmain.cs using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; using System.Net; using System.Net.Http; using System.Net.Mail; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; n...

 
 
1 hour later…
8:10 AM
@SmileyFtW SO is for solving a specific error that' is only one of the things SO is for. Moving this Q to Code Review is unnecessary, and the migration would possibly be rejected — chris neilsen 18 secs ago
 
8:57 AM
0
Q: How to apply DRY principles to this code logic

Srdjan MilicI had a project with repetitive HTML, JS code blocks. There should be 10 fields with certain functionality that is somewhere repetitive. The two table fields with logic is already implemented, but I don't want to copy and paste code blocks. Some repetitions I was able to solve, but majority of th...

 
9:43 AM
-2
Q: SEARCH A 2-D MATRIX FRO MINIMUM COST PATH USING JAVA-SCRIPT

Premjeet PrasadGiven a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. **Note: You can only move either down or right at any point in time.** Example: **Input:** [ [1,3,1], [1,5,1], [4,2,1] ] **Output**: 7 *...

 
10:06 AM
0
Q: K&R 1-14 - Histogram

link23This is the K&R Exercise 1-14 of C. The exercise ask you to print a histogram of the frequencies of different characters in input. How can I improve my code? The main doubt is the part when I have to increase letters in the array. #include <stdio.h> #include <ctype.h> int main() { int ch, ...

 
 
1 hour later…
11:15 AM
-1
Q: SLEEPING SCHEDULE.quest giving crct ans if done using recurrsion but if i store results in array i.e use dp it gives wrong ans

AasthaI am new to dp. //this question is quite similar to coin exchange problem just a little change. Vova had a pretty weird sleeping schedule. There are h hours in a day. Vova will sleep exactly n times. The i-th time he will sleep exactly after a[i] or a[i]-1 hours from the time he woke up. ...

 
11:38 AM
0
Q: Large number stored as vector, increase performance

JohnI made a code to initialize char vectors with random numbers representing very large numbers with more than 20.000 digits. The additions and multiplications are correct but my code is too slow (1 minute). I know that I can change char by 64 int to make operations with 19 numbers at a time, instea...

 
If the code does what it intends to do, this is not a question for Stackoverflow but for Code Review. — Jan Christoph Terasa 50 secs ago
 
12:17 PM
Monking
 
12:46 PM
-1
Q: How to do lambda search in list<list[]> in c#

user3319756I have a list<string[]>, and each string[] has 13 items. I want to do a search in the 13th item of all of string[] and select rows that the 13th item contains "(" character. I want to do this with a lambda expression. something like below (I know this line won't work). How should I do this? var ...

-1
Q: Von Neumann Random Bytes Debiasing in Python

Andika WasistoI need to create a method to debias biased bytes from the method get_raw_bytes(length) using von Neumann debiasing method. Here's my current code: def get_debiased_bytes(length): arr_debiased_bytes = [] debiased_byte = 0 bit_counter = 0 while len(arr_debiased_bytes) < length: ...

 
Code Review might be a better place than here to post the question. — John Coleman 20 secs ago
 
1:16 PM
Code Review is for code that is complete. The OP's code is not complete, as it doesn't do what they want. — snakecharmerb 29 secs ago
You cam first set up your candidates list like you mention ['a'..'z'] ++ ['0' .. '9'] and then shuffle the list and take as many characters as you like. As a bonus you will get unique random characters at each go. — Redu 32 secs ago
 
 
2 hours later…
3:04 PM
0
Q: Preserving principle of locality while performing memory allocation

jackbIn order to implement an efficient AST visitor preserving the principle of locality, I implemented some reference counting mechanism in C++ with the following set of features: All the newly allocated memory shall be stored in a contiguous allocation memory, so to preserve the principle of local...

 
3:21 PM
Ask your question in Code Review Stack Exchange, not here. — Peter O. 31 secs ago
 
0
Q: Should I use the visitor pattern to map an object tree to another object tree?

annemartijnProgramming to an interface is a design principle that enhances the flexibility of software by hiding implementation details. Consider an object tree that only exposes an interface, but you want to add additional behaviour that operates on implementation details. A compositional object structure ...

 
4:03 PM
this might be a better fit for codereview.stackexchange.com . — Dan O 9 secs ago
If you do post this on code review, please take the tour and read their on topic page. — ggorlen 27 secs ago
Code review !! honestly this first time hearing of that !! sounds cool , will check upon it — user10366078 23 secs ago
 
0
Q: Scala - Implement Object Factory

Gaurang ShahI am trying to add an functionality to existing code, and it seems like for this particular use case I should use Object Factory design pattern. However, would love to see your comments and may be better solution. Current Problem We have to move file from local machine to hdfs (different file ...

 
4:21 PM
Monking
 
5:15 PM
Moderators, can we move this to code review? — Michael Litchard 29 secs ago
 
5:44 PM
1
Q: type erased pointer to member function callable and SFINAE

LucaI'm implementing a std::function like class that uses type erasure. So far it can be used with function objects (functions/function pointers, functors, lamdas) and pointer to member function. But to support pointer to member function I used a C++17 feature, namely constexpr if, to choose at comp...

0
Q: My first battle simulator (updated)

shane solomonI am new and trying to learn programming and have been working on a battle simulator that I hope to eventually develop into a RPG game with characters, areas to explore, etc. I have been working on the battle between you and an enemy and have most of the base mechanics done however I would like t...

 
5:54 PM
Monking
 
sorry @ДавидШико but I am not going to browse that whole Code Review question to revise this in order to align with that question. best of luck on Code Review. — gold_cy 56 secs ago
 
6:12 PM
You can ask it on this platform specifically for code improvements and suggestions codereview.stackexchange.comAnurag Srivastava 30 secs ago
 
6:27 PM
@Mat thank you very much but can I also do that on StackOverflow or It is only allowed on codereview.stackexchange.com — Sannan 28 secs ago
 
0
Q: suggestion for improving this code to be much readable and easy for beginners?

user222441I'm javascript beginner trying to learn by doing, here i have a table with different values, i have used two 'for loops' is there some easier way for doing this? for example having just one 'for loop' or instead it use something else for this ? better if you could suggest to improve whole code to...

 
7:15 PM
0
Q: Best way to avoid users to cancel my routine halfway through while managing other errors

MagnusNovakI'm struggling to find the best way to prevent users from cancelling a routine halfway through (by pressing ESC, break, etc) without making sure the sheet is being locked again. On top of that, I also want to manage potential other errors that this routine could generate. My code is : Private Su...

0
Q: Replacing letters in Strings (vowels and consonants issue)

AdamKI need a code review because I have got no idea why this code is not working as it should. Goals: 1)Require from user two strings until the first is not going to have equal number of vowels as second consonants. 2)Take the second word and replace every vowel in it with consecutive consonants from...

0
Q: Addition of long numbers stored as vectors

leverI made a code that adds 2 vectors that represent very large numbers (30k digits) but it is too slow. I am not sure how to make compiler vectorizes it or how to improve it. Thanks! char Addition(char* Vin1, char* Vin2, char* Vout, unsigned N) { char CARRY = 0; for (int i = 0; i < N; i++) ...

 
7:27 PM
I’m voting to close this question because this question belongs on CodeReview. — HABO 26 secs ago
 
7:38 PM
0
Q: AIPlaylist: Adaptive media player using VLCJ and Swing

Al G JohnstonI created a project using VLCJ and a probability function to create a media player that plays your favorite media more often than the others, because I wanted to hear my favorite music and videos more than my least favorite. This involved a lot of event listeners that were all at the bottom of my...

 
8:24 PM
-1
Q: How to alter function variable from within nested While Loop

Jcode94I'm writing a text-based adventure game(it's turning into more of a reading game, alas) and I found a bit of code that I'm looking to implement but am not sure how to effect(the source wasn't clear on this specific point/the question was about something else). I've tried messing around in the c...

 
8:54 PM
Code review questions should be asked at Code ReviewJens 18 secs ago
 
9:09 PM
Hello, I just edited the post-now there is information about specific problem-substitution letters in array. My question cannot be posted on Code Review-because its not optimization or security problem/review of working code (My answer is based on "What topics can I ask about here?" from Codereview site) I want to say sorry about the wrong words I used in my post and now it should be proper. — AdamK 46 secs ago
Are you looking for a code review? — jaco0646 53 secs ago
 
9:33 PM
-2
Q: Add a 'click' addEventListener for each Button action (since they are inside a table, they don't have an attr ID)?

ComentaristaI want to be able to perform an action on each element (BtnAction), changing the popup from 'display: none;' for 'display: flex;' . I manage to do a part that shows the popup, but there is a failure to show, namely, the error is that when it is time to hide using the siblings method to hide the o...

 
Thank you for checking Code Review's rules AdamK. You are correct, this would be off-topic there. — Peilonrayz 54 secs ago
 
9:55 PM
-1
Q: Moving a bot through a maze with Depth First Search

TravelsbyfireSo I don't know if it's actually depth first search, but was wondering if anyone could see if it is. I just took the idea of what it does and made my own version of it. The bot works it's way through the maze, when it finds a dead end, it moves back to original spot, and continues in a different ...

 
10:18 PM
0
Q: Readable/Clearer Design: Extension method or IoC/DI

mythAbout Project: I'm working on a library that transform/convert entity(object) & expression to SQL commands/statements and then to make the library open source. My Problem:There are two approaches the user can call the library functions: (1) Extension Method, (2) IoC/DI. Sample code: public cl...

 
11:04 PM
0
Q: Numerical Double Integration using numba and scipy

Shankar_DuttPlease see the following code. I am using it to calculate the double integration. Please help me to improve the code. import numpy as np from scipy import integrate from scipy.special import j1 from scipy.special import j0 from numpy import sin from numpy import cos from numpy import pi import ...

 

« first day (2541 days earlier)      last day (1483 days later) »