« first day (2494 days earlier)      last day (1525 days later) » 

12:00 AM
RELOAD! There are 6412 unanswered questions (90.1196% answered)
 
0
Q: A function to split an string of alphabets and numbers into arrays and sort them respectively

Jojiif I have a string AYUKB17053UI903TBC. I want a function to return ABKUY01357IU039BCT. So every alphabetical part of the string is sorted, as well as the numerical part. But they retain their original orders in the string... We can assume that the input only contains number and English letters ...

0
Q: Generic Cache struct

Matias CiceroI've came up with the following implementation of a very simple cache: use std::cmp::Eq; use std::collections::HashMap; use std::hash::Hash; pub struct Cache<I, R, F> where I: Copy + Eq + Hash, F: Fn(I) -> R { calculation: F, values: HashMap<I, R>, } impl<I, R, F> Cache<I, R, F> wh...

 
 
2 hours later…
2:41 AM
0
Q: Database Design for representing category relationships

Suryasis PaulSo I am new to Databases.Recently I was asked this question in an interview where they expected me to come with a schema for storing and retrieving categories for an E-commerce website in an RDBMS. Each category could have many sub-categories. But each sub-category could have just one parent cate...

 
4:03 AM
 
 
1 hour later…
5:04 AM
Monking
 
Monking
@MaartenBodewes Follow-ups are fine, as a separate question. Not as edits on the original. Makes a mess.
 
0
Q: Transfer/Get Videos to a Video Streaming website through API/CURL

nulluserI tried to Transfer/get videos to Fembed.com via API but got error. Please take a look and tell me where is the mistake/modifications should be done? I tried to contact Fembed, they send me a sample API PHP File : https://pastebin.com/6mc5JaWu $data = array( 'data' => 'FILE_ID' ); $links =...

 
5:34 AM
I ask new question about code review if you dont mind here is my link thanks codereview.stackexchange.com/questions/238220/…Ach 53 secs ago
 
0
Q: Is their any better way to set duplicate array data instead of use data[0]

AchWhat is the best way to refactoring code and best performance Here Is what I do In getData function I query get Data from databae using async/await then I got some ugly data I try to map and delete element that duplicate data async getData({req,res}) { let data = await this.getData() ...

 
 
1 hour later…
6:55 AM
-1
Q: Why is my morph code not working stably?

zeni1agentI created this code for deforming SVG files html <div id="svg_opt"></div> <div class="frame_1"> <svg width="580" height="400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 621.69 605.5"><defs><style>.patch1{fill:#ff0;stroke:#000;stroke-miterlimit:10;}</style></defs><title>1</title> <path...

 
7:19 AM
Hello, For code optimization please submit to codereview.stackexchange.comBaptiste Mille-Mathias 49 secs ago
 
7:51 AM
Since there is no actual problem, this is more a question you should ask on Code Review codereview.stackexchange.comSteven 39 secs ago
I'm voting to close this question as off-topic because this is off-topic for stackoverflow, and should be asked in codereview.stackexchange.comU10-Forward 38 secs ago
possible answer invalidation by Mast on question by Somya Agrawal: codereview.stackexchange.com/posts/238186/revisions
I'm voting to close this question as off-topic because it's asking for a code review. — Damien_The_Unbeliever just now
 
8:31 AM
0
Q: Prioritizing one column over the other column of the same table

VrankelaI am creating an API in .net core and I just could not figure out how to put the following Linq expression into a single call: public async Task<ActionResult<IEnumerable<MyClass>>> GetByReference(string reference) { var myClassPkColumn = _context.MyClass .Whe...

0
Q: fix bug 2048 game in java console

Samin Faridanii have some bug for 2048 game this is my method move right public static void right(int[][] mat) { for (int j = 3; j > 0; j--) { for (int i = 0; i < 4; i++) { while ((mat[i][j] == 0) && (mat[i][j - 1] != 0)) { mat[i][j] = mat[i][j - 1]; ma...

 
 
1 hour later…
9:48 AM
0
Q: Reddit Challenge #380 Python

Meerfall the dewottI'm completed the Reddit challenge #380 (source). I done the best I can but wanted a few insights to what I could do that would be better. Code The code is the solution to the Reddit challenge. In the main method, the class is initialised then prints each of the solutions out. Please note that...

 
10:18 AM
Maybe codereview.stackexchange.com is better for such questions... — Dima Tisnek 16 secs ago
 
0
Q: How to simplify loop for PyPDF2 scrape

izzleeeHow can I make a generator or simplify this loop? I am looping through pdf files, appending list type data into dataframe then exporting to excel for end user to easily search info. Below is method breakdown of this script: Find duplicate files from selenium webdriver download Delete duplicate ...

 
10:34 AM
@MarekR OP said it is for learning purposes. As for the question, it is more suited for code review at [codereview.stackexchange.com] (codereview.stackexchange.com) — Hawky 8 secs ago
 
@Vogel612 Hai :3 Yeah I decided to upgrade it. It's more than 4 years old after all :P
 
I've just stuck with mine, though :D
 
Keeping the feather but adding one star for each year of professional experience :P
You're not a creative gemini though
I need change eventually
 
Yea, I'm surprisingly bad with change
 
Not exactly a rare trait in our line of business
I mostly need creative change though
 
10:46 AM
I don't know about a better way but it seems very fine to me. Also you could post this in codeReview instead of stackoverflow it may fit more there. — François Richard 21 secs ago
Please do get a code review! The small amount of working code is perfect for such things. I restricted my answer below to your actual question only, even though there are a few things that could be improved. — Ulrich Eckhardt 16 secs ago
I'm voting to close this question as off-topic because It belongs on CodeReview — Gemtastic 23 secs ago
 
Hm, they removed CodeReview as an option for closing as off topic
 
@Damien_The_Unbeliever oh, then where would be a good place to post such a question/code review? Thanks — Anon Li 12 secs ago
 
11:05 AM
0
Q: Regex for nginx log parser

for_so_onlyI made the following regular expression for parsing ngnix log log_1 = "1.169.137.128 - - [29/jun/2017:07:10:50 +0300] "GET /api/v2/banner/1717161 http/1.1" 200 2116 "-" "Slotovod" "-" "1498709450-2118016444-4709-10027411" "712e90144abee9" 0.199" My test cases (https://regex101.com/r/Eyhxod/1)...

 
@Gemtastic You mean on Stack Overflow?
To my knowledge that never was an option
 
Monking.
@Gemtastic There is a maximum number of specialized off-topic reasons on any site. The fact that CR is not included in the off topic reasons doesn't make a question on topic. It just means more work for you :P
Heh, 4 revival badges in a row.
I'll need 12 for a strike...
 
11:38 AM
Thank you! I have posted on code review: codereview.stackexchange.com/questions/238234/…Andy 34 secs ago
 
0
Q: A simple multithreaded FileLogger in C++

AndyIn order to learn about multithreading programming in C++ I am implementing a basic multithreaded logger. I use a std::deque to store messages inside a FileLogger class. Each time a thread logs a message; that message is pushed to the back of the deque. In a separate thread the FileLogger check...

 
12:35 PM
In fact, if the git/gerrit interoperation had been built properly you wouldn't have to do such foolishness and would simply do "git push origin" (better yet, just "git push") Then git/gerrit would be configured in such a way that it would automatically place your changes in a staging area for code review. Forcing you to push to a different location than the one you intend to change is just dumb, adds confusion, and that leads to mistakes. — SmittyBoy 13 secs ago
 
1:01 PM
0
Q: An array of values. looping many times to calculate mean, closest matching array value, and then finding its index. Can loops be combined?

aNameI have an array of values. (cols) I want to find out which index of cols contains the value closest to the mean of cols. Can I combine these functions so that I'm not repeating loops? let mean = cols.reduce((prev, curr) => prev + curr) / cols.length; let closest = cols.reduce((prev, curr) => (...

 
1:20 PM
0
Q: Generating PNG barcodes through a GUI

CoedRhyfelwrThis is a continuation of my earlier question, now updated to use a basic GUI. This is my first time using tkinter so I suspect there are a fair few things I'm missing! I've also added the ability to generate a single barcode without having to first save it in a CSV. import csv import barcode fr...

0
Q: http router written in Golang

Saeed M.in my jurney to learn Go, I decided to write a simple router which I called it Gouter, which I think it has most of the features in gorilla/mux but in my opinion it's easier to use. Anyway, it consists of two file, router.go and route.go. There are some concerns I have about this. First about the...

0
Q: Simplifying input filtering in tables with multiple selectors using jQuery

SanguinaryCode explained I wrote a few identical functions for each table to filter them with the use of input fields in jQuery. My code is a bit flawed because I have one function for each selector or class, which is messy and can definitely be improved but after countless hours of investigating I'm exha...

 
@Vogel612 Indeed. The only option is by using a moderator flag. Always has been, I think. 2014 2015 2017
 
1:39 PM
0
Q: OOP approach to filter two-dimensional array

Davide ToninSo, after this functional(?) approach and thanks to the great improvement of @CDP1802, I've decided to try an OOP approach to filtering an two-dimensional array. In my opinion, the result is way more elegant and has also performance improvements. Now the user is able to choose the order of the ...

 
2:20 PM
possible answer invalidation by muru on question by Somya Agrawal: codereview.stackexchange.com/posts/238186/revisions
 
2:37 PM
0
Q: Прошу вашей оценки

RkzЯ начинающий разработчик и это мой первый проект,прошу от вас оценки. Суть приложения проста - пользователь выбирает символы которые он хотел бы исключить из текста(пробел,знаки),после проверки отображается количество символов. Приму любую критику. Исходники на github: https://github.com/RomanKaz...

0
Q: Splitting responsibilities out of function

AnjoI have the following code: It works completely as expected, but I feel there is a better way to refactor it out. public async Task<IEnumerable<Invoice>> GetAllInvoicesAsync() { const string endPoint = @"foo/{0}/invoices?pageNum={1}&itemsPerPage={2}"; const int itemsPerPage = xxx; In...

0
Q: Chaining Internal Class Methods in Python

pirateofebayI'm learning object-oriented programming in Python. I've created a class RepositoryMaker that contains all methods required to create a Git repository. The idea is to be able to create a single instance of this class with a constructor that only requires pertinent info to create a new repo. My c...

 
3:00 PM
Ryan Donovan on March 02, 2020
In this article, we’ll look at how to design REST APIs to be easy to understand for anyone consuming them, future-proof, and secure and fast since they serve data to clients that may be confidential.
0
Q: Negative engagement, ganging up, question closing, downvoting

RouninI am relatively new to Code Review, so I don't know if this Stack Exchange site suffers particularly from negative interaction by arrogant and bullying seniors but I'm certainly seeing it with the last question I asked. I asked a question, 3 days ago, about how best to structure PHP arrays: Wha...

 
possible answer invalidation by Rounin on question by Rounin: codereview.stackexchange.com/posts/238066/revisions
 
3:24 PM
I'm voting to close this question because it belongs on codereview.stackexchange.com. — Peter B 11 secs ago
 
3:35 PM
@Feeds well, that one is a bit of a mess :/
 
3:54 PM
0
Q: Chunking strings to binary output

EdwardI have code which takes a text file as input and creates a special binary output form of the input. Specifically, the test input I'm using is the plain text of Samuel Coleridge's poem "Kubla Khan". Processing Each line of the text is turned into a counted string (also sometimes called a "Pas...

 
4:08 PM
@ShadowRanger True. Code like that is stuff I would start flagging in a code review :) — chepner 1 min ago
 
0
Q: Looking for best practice in golang serving an api using just default go http package

user10714010This is what I have so far type Req struct { MyId *string `json:"my_id"` MyBool *bool `json:"my_bool"` } type Resp struct { IsError bool `json:"is_error"` MyMap map[string]*MyObj `json:"my_map"`...

0
Q: Parsing csv tokens as doubles and identifying which threw FormatException

Minh TranProblem Statement I'm reading each line from a .csv file and parsing each comma-delimited value and casting it to the appropriate type: string[] words = filelines[i].Split(delimiter); // "i" is the 0-based line number // Remove double quotes encasing the timestamp DateTime tmStamp = Convert.T...

0
Q: Time complexity in nested for, when inner loop is limited by outer loop

Gustavo BorgesWhich would be the worst time complexity of the following nested for loops, given that the inner one executions is limited by the outer for. It definitely isn't O(N), but I think it cannot be O(N²) as well, since the inner loop is always executed N-i times. I think it lies somewhere in between O...

 
Hi MRDekeijzer, welcome to StackOverflow. This question may be more appropriate for codereview.stackexchange.com. StackOverflow is more focused on answering specific coding questions. — Brydenr 48 secs ago
 
4:32 PM
I'm voting to close this question as off-topic because it is asking to improve working code. ask on code review. — Daniel A. White 18 secs ago
 
4:55 PM
Nibjubg
 
Nmonking
 
Question for you; are you 100% sure that ALL of your json data has a 'text' field. Seeing as this isn't a fully running example, and the amount of code cruft I'm not doing a full code review (there's a SO for that)... you could check out the dictionary .get() method, which allows for defaults when there is missing data. — Jeff Langemeier 32 secs ago
 
5:21 PM
Welcome to SO - there is actually another StackExchange network site for that purpose!: codereview.stackexchange.comti7 just now
possible answer invalidation by Rounin on question by Rounin: codereview.stackexchange.com/posts/238066/revisions
@ti7 this post might be perceived as not on-topic on CR because the author doesn't appear to know whether it works properly. Per the on-topic page: "To the best of my knowledge, does the code work as intended? Code Review aims to help improve working code." — Sᴀᴍ Onᴇᴌᴀ 34 secs ago
 
6:09 PM
-1
Q: Im currently learning about algorithms in one of my CS classes. I am trying to write a code for QuickSort

RogicarMy code is written down bellow and I have attached to files that show the psuedocode. If someone could compare my code to the psuedocode that would be great. It's not sorting correctly, but its compiling, so im assuming something is off. Im just trying to write a basic QuickSort code. My code ...

 
@Vogel612 I like MG's response
Someone may not like being dubbed "clique-identifying bullies with a petty sense of ego-driven ownership ganging up to maintain the conservative norms of "their Stack Exchange site.", when all they're trying to do is help you get your post into shape and conforming to what the site is actually about. I understand your frustration and sympathize with your situation and we can all hash out what happened and why and how to avoid it going forward (FWIW, accepting off-topic questions is not on the table), but bashing on the very people that are trying to help isn't going to get you many upvotes. — Mathieu Guindon ♦ 8 mins ago
 
6:33 PM
@Duga called it...:
Code review is for code that is functionally correct. I know you're coming here after being told to from Stackoverflow, but the reason you were told to come here was because the person who suggested it didn't know if your code was working correctly or not. Since your code is not functionally correct, this is a better candidate for Stackoverflow, PROVIDED that you reduce your problem to a minimal reproducible example, and provide your input, your expected output,and your actual output. Posting a wall of code and expecting US to find the offending input doesn't help. — John 16 mins ago
the dumpster fire just keeps smoldering...
 
7:07 PM
0
Q: Sudoku solver recursive backtrack in Java

John SpringI am implementing recursive backtracking algorithm for sudoku. Below is the code to create board with random filling. I wonder if I can make it better in any terms of readable coding especially validation methods. in Board class. public class Board { private int[][] board; public final static i...

 
yea, the problem is that there's multiple somewhat intertwined issues there that are difficult to untangle in the first place and even more difficult to present in a way that OP could actually learn from the presentation
it's just so much easier to downvote the meta post or not engage at all
 
7:26 PM
0
Q: Make extensions for kotlin arrays

AdamI wanted to make a library thing which provides specific extensions for collections/collection-like containers in kotlin: fun <T> Collection<T>.extendEntries(length: Int) = this.flatMap { x -> List(length) { x } } fun String.extendEntries(length: Int) = this.toList().extendEntries(length) fun <T>...

 
8:05 PM
0
Q: Creating Quantile Cutoffs using SQL Hive

Alpha BravoI have a table in Hadoop that looks like this (with up to hundreds of columns and millions of rows): +--------+-----------+--------+-----+ | field0 | field1 | field2 | ... | +--------+-----------+--------+-----+ | 0.66 | 0.4364153 | 0.31 | | | 0.28 | 0.281724 | -1 | | | 0.4...

 
8:24 PM
0
Q: Where to put the builder() method?

Maria Ines ParnisariI have a class like this: package graph; import com.google.common.graph.ElementOrder; import com.google.common.graph.Graphs; import com.google.common.graph.MutableNetwork; import com.google.common.graph.NetworkBuilder; import java.util.Set; public class WrapperGraph { private MutableNetwork

-1
Q: Best practice to initialize instance variables for a POJO when values are null

user355381I am using Java 8. I haven't found another question that fits mine exactly, and I've come across some conflicting information on best practices with what I'm trying to do. I'm creating a POJO which is essentially a business object - to be returned by my api - that will have its fields initialize...

 
9:14 PM
 
-1
Q: Elegant Method for Sleeping with Selenium Webscraper

Marius GarbowskiMy goal is to scrap the suggestion no. 1 of the suggestion list on https://finance.yahoo.com for any entry. If there is no suggestion the code should write f"nan_{what_ever_the_entry_was}". As basis I used the solution from https://stackoverflow.com/questions/50355120/how-to-scrape-the-yahoo-fin...

 
9:41 PM
-1
Q: O.O. Teacher List

K00lmanAfter the feedback I got on my previous question, I decided to try one more program to see if I understand O.O.P. The idea for this is also based off the project I am working on im my class for this semester which is to make an interactive school tour. This program just has you make a bunch of ...

 
 
2 hours later…
11:14 PM
When you run into actual technical road blocks, you should post here or on one of the other relevant stack exchange sites (codereview, software engineering etc.). — Paul Rooney 8 secs ago
 
11:31 PM
It your code works, it is a better fit for codereview.stackexchange.com — Selcuk 30 secs ago
 
0
Q: Pseudograph Implementation

infinitezeroI needed a special graph structure for my code and thought I'd write a generic one for later reuse. At first I wanted to use pointers instead of indices as map keys but I quickly forfeited that idea once I realized, that changing the vertex vector might invalidate them. I'm especially interested ...

 

« first day (2494 days earlier)      last day (1525 days later) »