« first day (2611 days earlier)      last day (1704 days later) » 

00:00
RELOAD! There are 6799 unanswered questions (89.8574% answered)
 
1 hour later…
01:11
this is not the place for code reviews. — Vishal Singh 57 secs ago
 
1 hour later…
02:35
possible answer invalidation by Ethan Hetrick on question by Ethan Hetrick: codereview.stackexchange.com/posts/244592/revisions
03:05
1
Q: Using get_dummies to create a Simple Recommender System - Cold Start

JohnTQuestion: was using get_dummies a good choice for converting categorical strings? I used get_dummies to convert categorical variables into dummy/indicator variables for a cold start recommender system using only category type information and some basic limited choices. The code works and the outp...

0
Q: Real time metal prices and conversion fro USD to MXN using BeautifulSoup updated version

Ethan Hetrickfrom bs4 import BeautifulSoup import requests import re import datetime metal_translation = {"Aluminium": "Aluminio", "Copper": "Cobre", "Zinc": "Zinc", "Nickel": "Níquel", "Lead": "Plomo", "Tin": "Estaño", "Aluminium Alloy": "Aleación de Aluminio", "Cobalt": "Cobalto", "Gold*"

0
Q: C++, sort integers using knowledge of entire vector

YuJin KimI am solving the "Sort" problem on Kattis. Basically, the problem is as follows. Let xs be a nonempty vector of positive integers. There are only few integers in this vector, but they have a big range. (The maximum value c is given in the problem, but my code does not use the information.) Sort t...

 
2 hours later…
05:05
0
Q: Algorithm to determine if binary tree is a Binary Search Tree (BST)

IvenBachContinuing with algorithms I've implemented a binary search tree validator. I don't like the two boolean variables within NodeFollowsBSTContract as it feels too complicated. I feel like it should be cleaned up but don't see how, yet. Also, before each recursive step down, to check child nodes, a ...

05:45
This question may be better suited for the Code Review StackExchange. — metatoaster 18 secs ago
 
1 hour later…
07:03
Monking
07:53
0
Q: Double LinkedList Deep Copy in Kotlin

Adam HurwitzIs this the optimal approach for a Kotlin implementation? Goal Return a deep copy of a double LinkedList. Each node also contains an additional random pointer, potentially to any node or null. Implement Steps Create Node data class with generic data type and null argument constructors provided f...

 
1 hour later…
09:17
Good monking
09:42
Monking
Spoilered codeblocks are a royal pain now..
I don't recall them being such a mess before the markdown changes..
Could you use >! \n > before? Because I thought you could rather than >! \n >!
Oh I see what you mean. Yeah that's really dumb. Why not just allow code blocks in spoilers...
But I don't think it's anything new
I actually think it is...
I recall something of using a code spoiler using 8 spaces instead of 4
huh...
that's kinda ugly, but hey :)
at least it's not a regression. NIce find
I've been going through meta a little lately :)
 
1 hour later…
11:15
Monking
11:30
Monking
11:54
0
Q: Calculator console app in Java

ShoeMakerHere is my source code for my very first app in Java, I am completely new to the language, so any help and criticism is welcomed! package com.company; import java.util.*; public class Main { public static float multiply(float a, float b) { return a*b; } public static f...

12:07
@Feeds Post a crappy question and you get downvotes. It's quite simple really.
@Vogel612 I think your sense of humor got the better of you with this spoiler codereview.stackexchange.com/questions/244598/…
@Vogel612 Do you ever need them on CR?
@Mast yea, to enable me to add "intended solutions"
but without directly telling people what the solution is without them explicitly deciding they want to know
@Vogel612 wouldn't a Github style "pre" be useful there ?
I expand all required blocks and read them without moving the mouse
Does the new markdown support it ?
expandable codeblocks are only a thing with code snippets.
12:14
Yes, not in markdown on SE.
@Vogel612 nah, plain text can be done too
yea, plaintext spoilers are okay, but I needed some code in there for this case..
and the markdown support for fenced codeblocks 8or just normal codeblocks) was basically nonexistant so I had to use html elements
dunno why GitHub isn't responding..
@Vogel612 gist.github.com/joyrexus/16041f2426450e73f5df9391f7f7ae5f just to make sure we're talking about the same thing
"pre" was wrong.. idk why I thought of that. "details" with "summary" is the right thing
12:40
@ankii Kinda not really, in Vogel's answer you can see the spoiler that takes up quite a lot of space with a code block inside. Where as details hides it without showing an empty blockquote.
Ok cool, its definetly worth looking into both for maintainability and speed. If you would like to have feedback on your working code than the question is probably better addressed at Code Review, see: meta.stackexchange.com/questions/90362/…ScootCork 43 secs ago
@Feeds The user isn't a native English speaker. I'd usually try to salvage their post, but there's nothing to salvage (yet) in their CR question...
@Peilonrayz I just wish that multiple answers or same answerer in the same answer isn't using several spoilers. I can't read, let alone compare, them easily.
You can click on the spoiler if you need to compare.
WOW
TIL
clicks fanatically
13:01
lol
13:55
0
Q: A python script to perform a basic arithmetic on a datetime

PythonIsBaeI have a csv like so: Category,Position,Name,Time A,1,Tom Smith,00:45:01.23 there are multiple rows in the same format. I am getting the time of the first place rider in category 'A', and calculating the time which is 15% above, i.e. if they take 1 minute 40 seconds then time to calculate is 1 m...

14:30
possible answer invalidation by PythonIsBae on question by PythonIsBae: codereview.stackexchange.com/posts/244611/revisions
14:43
-1
Q: Printing how many pair that exist in an array in java

PeteGuys please am new to java, still using terminal to code. Here is my code public static void main(String [] args) { int arr[] = { 1, 3, 55, 89, 2, 1, 9, 10, 55, 89, 1, 3, 1, 3}; int totalMarks = 0; for (int i = 0; i < marks.legth; i++){ if(marks[i] == marks[i]){ ...

15:10
possible answer invalidation by PythonIsBae on question by PythonIsBae: codereview.stackexchange.com/posts/244611/revisions
@Duga I was wondering why my rollback failed. Thanks @Zeta
You're welcome. Was just about to ping you about the duplicate comment :) (I've removed mine)
No problem. I'm glad people are paying attention to the invalidations.
problem is not the class, that is to find the cat's fifth leg, it has several functions and if it is part of a project, as it is explained that the context is around the initial code piece of the post which it is repeated 6 times; to which any text string is passed to be processed whether or not it has results, I must imagine that people who are interested in supporting this topic at least know how to instantiate a class and call a function, what if you want is to know the way to nest the normal callbacks in the version with callback array in such case that there are different or dynamic resul — Walter Nuñez 47 mins ago
@Zeta That makes no sense whatsoever.
15:15
I'm not sure what to make of that comment. "The class [..] is to find the cat's fifth leg" indicates that it's just there to bend the rules far enough.
@Zeta I think it's an ill translation of a saying in their native tongue, possibly Spanish.
Or that's an actual English saying and I just learned something.
50/50
Is this related to that quote that age-old joke?
How many legs does a dog have if you call his tail a leg?
It's a Spanish idiom: "buscarle la quinta pata al gato", which literally translates to the phrase above. "Looking for a problem/issue/defect that does not exist".
Because cats don't have five legs.
4. You can call that tail all you want, saying it's a leg doesn't make it a leg.
@Zeta Ah, thank you.
People think of all kind of weird things with 5 legs.
We had a series called 't Schaep met de 5 pooten.
Which is basically a sheep with 5 legs.
However, according to a 10 year old blog post, the idiom may also get used as "looking for ways to bend the rules". Not sure how credible that is, though.
@Zeta I noticed that, but since it's the only source for that story...
Classic case of a user thinking they know the rules better than we do, I guess.
15:25
*shrug* 🤷
0
Q: Improving run time of getting a list of prime numbers

Martins MichealI tried printing the first pair of prime number in between a list of numbers with a particular difference. But my run time is still too high(for large range of numbers). I want to reduce the run time by using any method from standard library like itertools. def prime(x): """To generate prime ...

@Zeta Uh oh, I think I put it in the reopen queue... :(
@Peilonrayz That's fixable by the people in this room.
15:42
Yeah should be
@Peilonrayz You might want to read my last comment on the post.
@Peilonrayz You improved a question :)
@Zeta Among other problems I think we may be dealing with an language/culture problem.
Indeed.
That will always be a problem.
In my country several ****** type words are spoken casually.
15:54
I can't read lol
@VisheshMangla I speak a different English on SE then in 'real life' because of this.
Right, I too try to but 'm often unable to .
Sorry, leaving that too, my English is not that good.
I've tried to salvage it, after I finally got what the code is actually about and why OP wants to rewrite it.
Funny enough, the preg_replace_callback_array documentation already answers all questions OP has.
Hi @VisheshMangla welcome to the 2nd monitor :)
@Vogel612 How would you feel about reopening it now that @Zeta has fixed it?
wow, that's an actually understandable question ...
16:09
"Fixed" is a strong word. I completely ripped out the author's original intend and instead mangled the post into a format suitable for Code Review.
They might not be happy, but their post is now (probably) on-topic.
I was about to say something like that, yea...
I'm not sure I like that change...
Yeah, same here.
Well, "how can I use foo_array instead of foo" isn't really a suitable question for CR. The concerns are still in the text. If I hadn't manage to keep them in, I'd probably just thrown away my edit/draft.
Given the language barrier, OP might be offended by that edit, though.
Given their history OP might be offended by literally anything, soo ... no use thinking about that
But I strive for strife :(
Okay, I think I'm going to nominate it for reopen. But you have 5 minutes to dissuade me.
16:18
@pacmaninbw Eh, I already voted to reopen it. Not sure why it didn't end up in the queue.
It doesn't seem to be in the queue, but it options below the question include reopen
I can't believe this got a down vote. codereview.stackexchange.com/questions/244566/… (not my answer, the question).
Hello, @Vogel612
@pacmaninbw it's a bit ... sparse on the explanation
Yeah ^
16:25
possible answer invalidation by PythonIsBae on question by PythonIsBae: codereview.stackexchange.com/posts/244611/revisions
@Duga rolled back and added a comment recommending a new question
@Zeta @Vogel612 @Peilonrayz RBA apparently.
@pacmaninbw you should make clear which post you're talking about 😉
I was confused for a bit until I realized you were talking about the php preg_replace trainwreck thing
16:42
The trainwreck exactly.
0
Q: C++ library for parsing csv data

arcomberPlease review my C++ csv parsing class. Some specific questions: Should get_next_record be a static function? CsvParser implies comma separated, so is a field separator constructor over the top? record.clear() at beginning of get_next_record. Any other ways of solving the problem of removing ...

For advice on working code, go to codereview.stackexchange.com. See help center. — AMC 23 secs ago
16:58
I'm getting random MSE downvotes. Must be the stance of the moon or something.
Should πάντα ῥεῖ arrive, this question should absolutely not have been migrated. Don't migrate crap. Ever.
@Mast I was really confused. Now I get it, was there only one migration CV?
@Peilonrayz At least 1, I suspect 2.
It was already a PITA to figure that out, made worse by the UI updates.
Ah, that's strange :(
And now the system is !@#$
This states it's returned to CR, but trying to access it on CR will direct you to SO.
0
Q: Variables exporter

Walter NuñezI've implemented a variables exporter that extracts the arguments' types and data: define('PRES', '<pre>'); define('PREE', '</pre>'); define('EOL_SYS', "\n"); define('VERSYSTEM', 'web'); $runVarManager = new ClassVarsManager; $hello = "Hello, world!"; $foo = 2; $bar = 1.337; echo $runVarMa...

0
Q: Updating a dictionary of trajectories after a step has been made

3sm1rI use a dictionary to save possible trajectories in a game. A "trajectory" is defined as a list of numbers separated by '_', for example '3_7_2_5' is a trajectory of 4 steps. The dictionary is needed because to each trajectory I assign a value, whose meaning does not matter for the purpose of my ...

17:08
Perhaps that's just caching, but it sucks for everyone.
@Mast Repoed. Wat...
This might better fit on codereview.stackexchange.com, this is not a code review site. — kerbh0lz just now
So you just want a code review right? — Nikko Khresna 54 secs ago
@kerbh0lz One of the rules of Code Review is that the code must work to the best of OP's knowledge. That doesn't work here. — Mast 32 secs ago
@CaptainObvious Look who's back @Peilonrayz @pacmaninbw @Vogel612 @Zeta
@Mast Right...
After this:
thanks friend; It really seems to me that you are the only person in this community with a professional attitude and according to what one person expects to receive from another. I think I will be migrating to a new site that has a more consistent collaboration environment. — Walter Nuñez 32 mins ago
Hi @πάνταῥεῖ
17 mins ago, by Mast
Should πάντα ῥεῖ arrive, this question should absolutely not have been migrated. Don't migrate crap. Ever.
I suspect you voted to migrate?
Nope- I rareäy do so anywas.
Oh?
Sorry about that, it's unnecessarily hard to figure out who missed a button nowadays.
Sorry about the typos? I actually voted to close that crap. It's not appropriate for any site.
@Mast From CR regulars that leaves @pacmaninbw and @Zeta
17:23
I did suggest that it be migrated.
Ah, why @pacmaninbw
Maybe because I believe crap should go to SO.
@πάνταῥεῖ Sorry for suspecting you, pinging you.
@πάνταῥεῖ I believe Mast means VT migrate rather than VTC, not your typos. :)
17:25
@pacmaninbw Just because SO is crap doesn't mean we should sent more crap towards it.
Sorry, LOL. will just VTC next time, I believe my comment was to check to see if it met their rules first.
The first thing that bothered me was the image. Since it wasn't compiling it really didn't belong on CR.
@πάνταῥεῖ And I accept that.
@pacmaninbw It didn't belong anywhere.
@pacmaninbw Just, don't do it again and all is well :-)
We don't like it if they pull this crap on us either and they're with a lot more.
Besides, it takes 2 votes for migration IIRC. So you weren't the only one.
@Mast I could say a lot about this statement, but I won't.
Would someone like to explain to Walter Nunez why you don't delete a question and the repost it?
@pacmaninbw I won't mind. Nothing personal, eh?
No, more like a website is full of it.
17:39
They're definitely full of it, agreed.
@Mast I would have spewed my coffee all over my laptop if I had stlll been drinking coffee.
@Mast ~sigh
@pacmaninbw Ordinarily, I would. Don't think it would do much good here though.
@Mast agreed.
I'm going to log out for a few hours until I cool down about Walter Nunez deleting the post and then posting it as his own.
TTYL
18:05
possible answer invalidation by Adam Hurwitz on question by Adam Hurwitz: codereview.stackexchange.com/posts/244600/revisions
@Duga Wat
18:44
-2
Q: Questions on how to use functions to write cleaner code

sammanI want to preface this by saying I didn't quite know where to put this because this isn't quite a stack overflow question. So if this is the wrong place to post, please let me know. I recently wrote a program with various functions doing a different thing, however each function was ~100-200 lines...

I think this belongs somewhere on codereview. — 10 Rep 29 secs ago
19:08
0
Q: Traversing a binary tree using a Node interface and an abstract Traverser class using a strategy pattern for order

nylanderdevThe gist of it Hi CodeReview. I've written this boilerplate code for depth first tree traversals. I aim to refactor it, but as I haven't done a lot of refactoring before, I don't really know where to start. The code consists mainly of 3 interfaces, 1 enum and 1 abstract class with a private stati...

0
Q: Is this code is safe or not (img upload) ? [PHP]

Elk DelfI'd like to know if this code is usable, because I'm not sure, thank you. The code is used to upload images to a predefined folder for users. if(isset($_FILES['avatar']) AND !empty($_FILES['avatar']['name'])) { $tailleMax = 6844685465456456; $extensionsValides = array('jpg', 'jpeg', 'gif', 'png')...

19:28
-1
Q: How to get code for this output for coding of receipt

Jaycoffee=4 tea=3 cola=2 Discount:$10 or more 5%off Membership: 15% off (after purchase discount) GST=0.07 print(Receipt) print(============================) Drink: Coffee Quantity: 5 Member: Y Amount: $20.00 Purchase Disc. $ 1.00 M...

@πάνταῥεῖ don't forget to comment
-1
Q: How to get code for this output for coding of receipt

Jaycoffee=4 tea=3 cola=2 Discount:$10 or more 5%off Membership: 15% off (after purchase discount) GST=0.07 print(Receipt) print(============================) Drink: Coffee Quantity: 5 Member: Y Amount: $20.00 Purchase Disc. $ 1.00 M...

20:09
Check this medium blog by Ted Petrou check Identifying chained indexing and heading making examples idiomatic. While contributing to pandas v1.1.0 pandas core dev jef reback and tom Augspurger were my code reviewers and they explicitly mentioned not to use chained indexing even when you are not assigning( just because it's a safer way of doing things and less calls to __getitem__). — Ch3steR 35 secs ago
20:36
This would be a better question for codereview.stackexchange.com. Also, I don't think your line @responsibility_answers = ResponsibilityAnswerMap.where(application_id: applications_array[i]).pluck(:responsibility_map_id, :answer) will work. You'd need to pluck just the responsibility_map_id here. I will try and make a refactor with that assumption — max pleaner 6 secs ago
0
Q: Genetic sequence analyzer that reads FASTA and GenBank file formats and outputs all possible gene products

Ethan Hetrickimport random import re from collections import defaultdict nucleotides = ("A", "C", "G", "T") rnanucleotides = ("A", "C", "G", "U") rev_compliment = {'A': 'T', 'T': 'A', 'G': 'C', 'C': 'G'} RNA_codon_table = {"UUU": "F", "CUU": "L", "AUU": "I", "GUU": "V", "UUC": "F", "CUC": "L", "AUC": "I", "

This is not the place for feedback on working code, try codereview.stackexchange.com. Also, it's best to keep questions as self-contained as possible. See How to Ask, help center. — AMC 7 secs ago
 
1 hour later…
21:57
0
Q: QTableView implementation

19172281I've put together my first table using Qt's QTableView and a custom data model. Currently, some data is populated on initialisation, and the user has the option of deleting an entry by selecting the row and pressing "delete". #include "mainwindow.h" #include "ui_mainwindow.h" #include <iostream> ...

22:21
0
Q: Get the character and its count which has highest occurrence

Steve NgaiI have this C# method which get the character and its count which has highest occurrence public KeyValuePair<char, int> CountCharMax_Dictionary_LINQ(string s) { char[] chars = s.ToCharArray(); var result = chars.GroupBy(x => x) .OrderByDescending(x => x.Count(...

22:46
1
Q: Follow up to "C simple hashcons data structure"

Node.JSThis is a follow-up question to my previous question I have modified the code according to the feedback I got from here and my Professor. However, my Professor is still not happy with the final code. More specifically he is not a fan searching once to see if the item exists in the table and searc...

23:30
possible answer invalidation by YuJin Kim on question by YuJin Kim: codereview.stackexchange.com/posts/244597/revisions

« first day (2611 days earlier)      last day (1704 days later) »