« first day (2615 days earlier)      last day (1387 days later) » 

12:00 AM
RELOAD! There are 6789 unanswered questions (89.8806% answered)
 
 
4 hours later…
3:35 AM
0
Q: Particle Swarm Optimization template

kurogane1031I am trying to create a PSO algorithm template for my project. I've decide to make the Swarm as separate type and PSO class that computes the algorithm. For this program, the intention is to minimize the sphere function, as the result is expected to be close to 0. I am seeking advice in how shoul...

 
3:59 AM
0
Q: An extremely slow algorithm

Aaron John SabuHere is a project that I worked on for a few days in June 2020. Since the algorithm is extremely slow, I looked into methods in order to parallelize operations but did not obtain any satisfactory answers. https://github.com/aaronjohnsabu1999/tk2NN Please suggest anything ranging from how to make ...

 
4:12 AM
Monking
 
5:12 AM
if you want to gain feedback on code quality you can post your (complete) code on Code Review StackMartin Frank 11 secs ago
 
5:37 AM
-1
Q: UWP with Sqlite - Is there a race condition or something?

DasEliasIn the following code, I use the Page_Suspended-handler to perform a database insertion when the application is suspended. Unfortunately, in my real application and not this simple MWE, I have some code like this, but in some very rare cases the insertion did not work. Since the bug is not reprod...

 
6:25 AM
Monking
 
6:50 AM
0
Q: Re-implementing a C++ library in Go

user4838962I need to re-implement three features of C++ OpenVDB library in Go language: Mesh to volume template <typename GridType, typename MeshDataAdapter> inline typename GridType::Ptr meshToVolume( const MeshDataAdapter& mesh, const math::Transform& transform, float exteriorBandWidth = 3.0f, f...

0
Q: epubjs reader Rendition spread() one page is not aligned to center

BinaryTieDeveloped epub-reader component and it is working as it should work, but there are cases with some epub files, where first page of book is always aligned on left side, when normally is on center. Those alignments are setup on popup window where you can choose "spread to one page" OR "spread to tw...

 
7:03 AM
Monking
 
Monking
 
 
1 hour later…
8:13 AM
Hmm, that would be a bit like doing a code review and complaining that that the chosen font is ugly ;) — Geert Bellekens 5 secs ago
 
8:51 AM
-1
Q: DDPG Reinforcement Learning algorithm in TensorFlow 2.x

kosaI am trying to implement a Reinforcement Learning algorithm called DDPG in TensorFlow 2.x on a custom gym environment. I am new to TF. So, I started with the DDPG TF 1.x implementation from pemami4911. My TF 2.x implementation can be found in a google-colab document. For some reason, the agent wo...

 
 
2 hours later…
10:27 AM
0
Q: What can I do better in my bash script?

ArthurI've started bash scripting recently and currently I'm working on a program that simplifies backuping using rsync . I'd appreciate any feedback on what I've done wrong / what can be improved. #!/bin/bash # Copyright (C) 2020 ##########, e-mail: ################## # saver comes with NO WARRANTY....

 
10:59 AM
(1) I read your entire post. Did you read my link? (2) To say "I have a solution but I am not sure if it right." doesn't make my comment wrong and also doesn't matter for Stack Overflow. Your question ends with "Do you know any other solution? or tools?" (3) For bad code and best-practice question see codereview.stackexchange.com and be nice to the people there. — Niklas E. 52 secs ago
 
11:16 AM
0
Q: confused about returning a value or not in this simple python function

mister nobodyI'm writing a few python scripts to get started. There is sometimes the assumption that most functions should return a value, but some cases are confusing to me. The next function use *args, an equivalent to the rest operator in javascript, to put all the arguments (any number) into an array name...

 
11:31 AM
Monking
Lurking
 
11:49 AM
Monking
 
Monking
 
12:04 PM
can std::max_element return an out of range index ?
or do its indices start with 1 ?
ah nvm.. I shouldn't be dereferencing it
 
12:28 PM
0
Q: Std::lower_bound not giving expected result

user13948I'm trying to get a method to return the closest value to 0.5, and used std::lower_bound. Why does this return the incorrect value, and a value that isn't even in the array? #include <iostream> #include <algorithm> #include <vector> int test() { float array[] = {0.730453, 0.69921...

0
Q: List comprehension readability - how much nesting is too much?

Luis BatistaHow can I improve the readability of the below function using a list comprehension? Also, is there a way to improve items() performance? pricing = {'prices': [{'product_id': 1, 'price': 599, 'vat_band': 'standard'}, {'product_id': 2, 'price': 250, 'vat_band': 'zero'}, ...

0
Q: Hotel booking with multiple options. Improvement through subclasses?

MarcelThe code below runs perfectly fine as I want it to. I'd like to create more subclasses to get a better overview over the whole code. Can I place the setter and getter as well as the methods into the extended classes? I'd like to create subclasses as in single room, double room etc. extends room. ...

 
1:21 PM
try stackexchange for codereview. SO is for nonfuncitonal code. judging working code without seeing the code is futile (and offtopic here). — Patrick Artner just now
@PatrickArtner This question would be off-topic on Code Review as it is asking us to implement code and does not have the code in the question. In the future please link to the help center when recommending Code Review. Take, "This may be on-topic on Code Review. Please check if it is on-topic and how to post a good question before posting there." — Peilonrayz 53 secs ago
@Peilonraz The question would be ontopic in Codereview if the code was posted and asked for a review? — Patrick Artner 20 secs ago
possible answer invalidation by NotSure on question by NotSure: codereview.stackexchange.com/posts/176487/revisions
 
@Duga Vandalism
@Duga Huh, comments self-cleaned up. Nice.
 
1:40 PM
Greetings, Programs.
 
2:01 PM
@Donald.McLean Welcome Master Control Program.
 
2:17 PM
@Duga @Mast @SᴀᴍOnᴇᴌᴀ I've decided to write my own version of auto comments. It converts short hand to useful comments, for example that was generated with @[ Patrick Artner], SO[R[CNI, I], W[L]]. I want a review for the output of the comments, how do you think I should do that? I can probably post it on CR but I really don't care for the petty responses I'll get about the Python code, and I don't really want to sink tons more hours into it to safeguard against them.
 
2:34 PM
@Peilonrayz CR Meta would probably be a good spot for that, if you're only concerned about the language. We have a comment templates / canned comments meta.
 
@DerKommissar I've covered most of the comments on the FPC Meta. But much of the wording there doesn't fit the 'modular' style of my thing. I'll wait to see if anyone has any disagreement with posting on Meta, before posting there :)
 
3:18 PM
1
Q: Bash Code optimization For ssh login on the remote device

user294110I have below code which works fine as its written in bash, i am just posting it here to see if this can be better optimised as per the BASH way. I am have an intermediate understanding in bash so, looking for any expert advise. Thanks for the reveiw and comments in advanced 🙏 . BASH CODE: #!/bin...

 
@CaptainObvious This question is labeled as belongs on another site, I don't think so, but it is missing context. Before I VTC I'd like others to tell me if I'm correct since python is not my top language.
 
Hi, I got +2 on this codereview.stackexchange.com/questions/177511/… and it's updated now. Is this still off topic?
 
@pacmaninbw label?
@VisheshMangla IMO yes
 
@Peilonrayz Interesting.
If you want a review of the used language instead of the code, you can't put it on the main site. Meta could work, but we can just shoot at it in chat as well.
 
sorry, IMO?
couldnt find anything on google:IMO stackoverflow
 
3:29 PM
@VisheshMangla In My Opinion
 
ooh ok
 
It's not specific to SO
 
@VisheshMangla Why are you asking anyway?
 
@Mast I was thinking of asking in chat, but there's quite a lot of output.
 
It's an old question, not by you.
@Peilonrayz shrug
If nothing more pertinent is going on, why not
 
3:31 PM
That's a fair point
 
@Peilonrayz there isn't any VTC, but the more tab shows that it belongs on another site.
 
The 'more' tab?
 
I might put a short write up in a Gist and then we can discuss it here, without me having to deal with multiline message nonsense
 
I have a lot of tabs, but 'more' ain't one of them.
@Peilonrayz Could put it in an actual repo even.
 
In review close votes
 
3:34 PM
But sure, a gist works.
@pacmaninbw Like, someone else voted to migrate?
 
@Mast Yeah, either way it should work.
 
It does not matter who writes the question. It's just that I think it to be a good question.Kind of supporting.
 
I don't see any VTC on it.
 
@Mast Neither do I.
@Mast Yes
 
I think it's a flag if you don't have CV privileges you can flag to migrate IIRC.
You get all the options we do when closing, but you don't get an actual vote
 
3:36 PM
Sure, probably a flag for migration then. VTC instead.
If you think it should be closed.
But migration is rarely the best option.
 
I think it can be saved if the user adds more code.
 
This might be more suitable on codereview.stackexchange.com if you elaborate a bit on what you want to improve. But you should probably fix a few obvious issues first: 1. indentation 2. English variable names. Other than that, you should start by trying to identify parts of your code that could be extracted to functions — Hulk 59 secs ago
 
@pacmaninbw And without the code?
 
Out of context
 
Close it, leave a comment, if OP comes back with the rest we'll happily re-open it.
Upvote it even if it's any good.
After the edit.
2 more VTC :-)
 
3:40 PM
@Mast @Peilonrayz left the comment, I VTC'ed.
 
It's appeared to me I'm missing UWYA as an option... :/ IMO this is a mix of UWYA and MRC.
 
>
Needs details or clarity

This question should include more details and clarify the problem.
 
This question is better suited to codereview.stackexchange.com. It sounds like you're looking for best practices, and guidance on approach. This forum is not appropriate for that type of question. — idream1nC0de 11 secs ago
 
I liked UWYA better.
 
@Mast Oh, no I mean my script ;) I voted for that
 
3:43 PM
Ah
@pacmaninbw Me too
 
@VisheshMangla Why do you think it's confusing?
 
Few points of the answer were very good but the answer didn't focus on what I wanted
Few points were like spelling mistakes and very basic stuff which obviously I don't require to know
 
@VisheshMangla Well I think it's obvious you do if your code has them ;)
That's just how Code Review works at times, unfortunate but true. If you dislike an answer downvote it.
 
@VisheshMangla Next time, make sure there are no mistakes like that so the answer can focus on the real things. But if the spelling and the basic stuff ain't good, that has to be fixed first.
 
3:50 PM
I cant because @Reinderien is the only one who has answered to my posts and how can I downvote him
 
So it makes sense that was answered first.
@VisheshMangla You can't fix your spelling? Can't fix the small stuff?
 
@VisheshMangla For me that's as easy as pressing a button...
 
Not now, not on this question. But on the first try with your next question.
 
ya sure, thats why I didn't change the comments in the code. That would be vandalizing the answer
 
I don't understand why you're talking about downvotes anyway, looks by the comments you're appreciating the answer...
 
3:52 PM
@Mast <- brought it up
 
Like I said the points leaving the top 1 or 2 are good but they aren't related to SOLID principles
 
Monking
 
or design patterns or object oriented programming. If even someone says classes aren't required that I might also take as a correct answer
 
@VisheshMangla Run black on your code, then run a couple of linters on your code and fix all the output. Then double check you've fixed all of Reinderien's remarks and then post a new question.
 
ok I ll do so, but it you read the chat for the first `question''s answer i.e., the prior of this I still haven't found out a way to fix that creation of temporary file
Can't follow it all than whatever's possible
 
3:59 PM
Yeah, fix it to the best of your abilities
 
sure
thanks for the guidance
 
I'd recommend running; black, flake8, prospector, pydocstyle, mypy (with the --strict flag) and the likelihood of getting the answer you want should increase.
 
@Peilonrayz I did? I was referring to "and how can I downvote him" by Vishesh
 
@Mast I forgot you name goes in-between mine and the arrow.
 
@Peilonrayz Ah, so you brought it up.
 
4:10 PM
Yeah
 
Oooooooooh
 
> <- brought it up
 
Yes.
 
Ah should have just quoted it
 
I now noticed.
 
4:15 PM
Hmm I should probably stick to saying "test" when testing something :(
 
4:26 PM
I used to name things as I saw them.
But then my entire production code ended up riddled with things called 'temp_something' and I gave up.
 
0
Q: In Angular, using Object.keys() in an OR statement to determine key/value pair index

lsietingI need to check if the key of a key/value pair exists in the excel to json data I am reading. I will be reading multiple file and there is not an ability to have the data columns all renamed to match a specific value. I can get the array object element value using Object.keys(this.jsonData[0]).i...

 
4:55 PM
0
Q: How to make this code more organized? (POINTER + DYNAMIC ALLOCATION) The objetive is to get a lista of number and then switch

FrybiiThe objetive is to get a lista of number and then switch the last person surname with the first person surname, when I type '$' it do the changes and finish the program! (POINTERS and DYNAMIC ALLOCATION) -I have to use pointers and dynamic allocation, my code is nice, but I know that it can be be...

 
5:19 PM
0
Q: Selenium web-scraper script, python

MisterButterI have created a small selenium script that checks for available times to write a test for a drivers license. The program runs every minute and takes approx 50 seconds to run. I have noticed that it's quite unstable, and do not preform optimally because the web-page loads elements dynamically. Ev...

-1
Q: LRU Cache with Double Linked List

AbhimanyuI am trying to implement the LRU Cache but getting error at this case. I am following the pseudocode but looks like I am stuck at class Node: def __init__(self, key, val): self.key = key self.val = val self.next = None self.prev = None class DoubleLink...

 
2
Q: Preventing edit wars

ReinderienThere's an edit war going on in Smart Tic Tac Toe, a reinforcement learning approach . Every edit by one high-rep user is being reverted by the OP with no explanation, and he (sigh) offers this: keep editing my post and I'll keep rolling it back and let's see who gives up first. You do not own t...

 
5:43 PM
0
Q: In getting a list of all possible partitions of an integer with restraints, is there a better way?

Abram MoatsI have modified a recursive function designed to print all the integer partitions of a positive integer. I would like def partition(number, interesting): # returns all the partitions of number that are included in the interesting list answer = set() if number in interesting: answe...

 
6:32 PM
Please note the existence of Code Review which exists for the purpose of reviewing code that works. Make sure you read codereview.stackexchange.com/help/how-to-ask and codereview.meta.stackexchange.com/questions/5777/… before asking. — msanford 1 min ago
 
Monking
I suppose by your code that you're a native Spanish speaker (me too), if you like I could give you an answer in Spanish. — Miguel Avila 17 mins ago
Ehh?
 
My point was that if the code works but you want to improve it, it can often go on Code Review; Stack Overflow usually helps people with code that doesn't work. — msanford 23 secs ago
 
@Zeta lol
Nope
This is not spanish.codereview.stackexchange.com
 
6:49 PM
That's a long host name. Imagine meta for it spanish.codereview.meta.stackexchange.com
 
0
Q: Getting Rid of .Find in VBA Code

capnationI have a range of two columns that I want to search for a "key" and then find the corresponding value in the directly adjacent column. The key is stored in a dictionary that I populated earlier in the program. I then store the value with its corresponding key in the dictionary to display later. I...

 
If this is code you've written, and you want a review of all of the code, this question may be better served by checking if it is on topic on Code Review. — Heretic Monkey 12 secs ago
 
7:15 PM
@Mast Right. That said, I've voted that the OP undelete that post. I think it was entirely on-topic; my comment on it is simply that any answer would need to be in English.
 
@Reinderien Voted as well
 
0
Q: Better way to Read /Write Memory<byte> to/from POCO

Mark LazzI am communicating with a machine that sends/received structured binary data to my netcore service. The machine supplier's new library uses Memory in their library's API. I have written the following code for Ser/Des which works, but seems verbose. I know I can wrap some of this in methods/helper...

0
Q: Kindly asking for ideas about improvements/found issues/anti-patters in the small library which works with Jira rest api

Сергей СеребрянскийI was trying to write a small application with modern practices for CMake and C++ which will talk with JIRA rest api and took some info from it for forming a report about person's activities. Kindly asking for code review since we are going to use it as a kind of reference example in a company, s...

 
@Peilonrayz do deleted posts show up on homepage ? as .. slightly transparent ?
 
@ankii I don't know, I use dark reader so they show up bright red.
If they have a yellow tint, they're 'ones you may find interesting'. (again dark reader may be showing me a different colour)
 
7:31 PM
@Peilonrayz I think you misunderstood.. Would this post show up on home page for >10k users ?
 
I have seen deleted posts on the home page. They show up bright red for me.
 
oh, nice
 
0
Q: How to optimize code in a custom wordpress page template?

SnifflesI'm pretty new to php coding, but i know wordpress for a long time. Also experimenting with bootstrap. I created a new Page Template and modified it a bit. What I'm looking for is to optimize this php code: <div class="row"> <div class="col kb_landing_left"> <?php global $post; ...

 
7:51 PM
@ankii IIRC, they don't show up in the list, unless they were a) already shown on the page and b) you've used the "load new questions" (or similar banner) that shows up after some time.
They will then show up with a red background:
(That's taken from my bookmark page for demonstration purposes. The real list looks a little bit different, for obvious reasons ;))
 
8:24 PM
@CaptainObvious Got really excited when I saw the title of this question, but there is only 4 lines of code in the question. Definitely missing context.
 
8:56 PM
I think this question is better suited for codereview.stackexchange.comAnthony 33 secs ago
 
0
Q: My Javascript events countdown OOP app

mohamed saadI wrote a javascript app with allows the user to add events and get countdown for every event. Also the events and there dates are stored in localStorage. I want a general review and I think that every second the browser makes a lot of operations like here: let interval = setInterval(() => { ...

 
9:25 PM
possible answer invalidation by Sniffles on question by Sniffles: codereview.stackexchange.com/posts/244847/revisions
 
9:49 PM
I’m voting to close this question because this belongs on Code Review, another site in the Stack Exchange network. — AndrewL64 29 secs ago
@AndrewL64 - Code review is for improving working code. This doesn't work - it runs out of memory because it's the wrong code for a problem like this. — jfriend00 51 secs ago
@AndrewL64 Don't use the existence of Code Review as a reason to close a question. Evaluate the question and use a reason like; needs focus, primarily opinion-based, etc. — Peilonrayz 1 min ago
 
@Duga rolled back
 
10:47 PM
 
Since your code works and you just want ideas on how to make it more readable, I suggest you post on Code Review Stack Exchange instead. I think your question may be off topic here. — John Wu 25 secs ago
 
1
Q: Getting Graph and Block Animation to Run Smoothly Together

jaredI have been working on some code that produces a live graphic of a graph and blocks moving. It works in theory but does not look like how I want. The animation runs very slow when showing both the graph and the blocks together (a code that has each alone works much better). How can I get them to ...

 
11:22 PM
0
Q: LeetCode 284: Peeking Iterator

EmmaI'm posting my code for a LeetCode problem copied here. If you would like to review, please do so. Thank you for your time! Problem Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the peek() operation -- it essentially pee...

 

« first day (2615 days earlier)      last day (1387 days later) »