« first day (2240 days earlier)      last day (1772 days later) » 

12:00 AM
RELOAD! There are 6130 unanswered questions (89.8414% answered)
 
0
Q: Class structure for object-oriented ruby to copy data from A to B

ChristianI want to write a simple ruby program which copies data from a source to a destination and I wonder how to begin designing the structure or architecture. I have thought about something like this. cfg = Configuration.new cfg.dates = Rule::DateRange.new(Date.today, Date.today + 7) cfg.levels = R...

0
Q: Files manager api in c++

KorelKI'm new to this community, so I'm not sure if it should be a topic here, so just let me know if I'm not in the right place. I wrote a files manager api in c++, to make the read-write operations easier in read/write cases' needing of big structured data to/from multiple files. I want to get a rev...

 
Perhaps this question is better-suited for the Code Review site? — ochi 1 min ago
 
@CaptainObvious Not implemented.
 
12:22 AM
1
Q: How to model hierarchical json in Java

fumengI'm a front end developer who is brand new to backend development. My task is to model json in a Java object. It's just some mock data for now that my controller returns. { "data": { "objectId": 25, "columnName": [ "myCategory", "myCategoryId" ], "columnValues": ...

1
Q: TypeError: normalize() missing 1 required positional argument: 'text'

X-Black...I'm working on a project that takes a file, goes through a specified directory and returns their similarities in %...i have been able to succeed, but the problem is converting it into GUI, the raw code works, but when implemented into the GUI (PyQt5) it raises an TypeError: normalize() missing 1 ...

 
12:54 AM
@CaptainObvious Is this pseudocode-ish?
@CaptainObvious broken
 
1:43 AM
0
Q: Is attempt like this, when using Application class, breaking MVVM pattern?

bakunetIn my application I am using two view models. MainViewModel if fiered when MianWindow is initialized. And UpdateViewModel is fiered when UpdateWindow is initialized. The update VM is supposed to use data from collection that is a property of the main VM and has its instance laready, and I need t...

 
 
2 hours later…
4:05 AM
0
Q: How can i convert my JavaScript code to use classes and objects?

Shefali UpadhyayI am not able to understand how can i implement classes and objects in my code to make it complete ES6 type of code. I am actually used to coding in ES5 format, but I want to know how can I use class and call the functions of the classes on button click. I only want to use javascript. My Github...

 
4:25 AM
0
Q: Sum of primes up to 2 million using the Sieve of Eratosthenes

its_vinayakI've attempted to solve question 10 on Project Euler using the Sieve of Eratosthenes, what can I do to optimize my code? def prime_sum(n): l=[0 for i in range(n+1)] l[0]=1 l[1]=1 for i in range(2,int(n**0.5)+1): if l[i]==0: for j in range(i * i, n+1, i): ...

 
4:55 AM
possible answer invalidation by its_vinayak on question by its_vinayak: codereview.stackexchange.com/posts/222744/revisions
 
5:10 AM
possible answer invalidation by Justin on question by its_vinayak: codereview.stackexchange.com/posts/222744/revisions
 
 
1 hour later…
6:14 AM
I'm voting to close this question as off-topic because you already have a working solution. If you are looking for help reviewing your code in order to improve it, you should post the question on Code Review instead. — Zephyr 25 secs ago
 
6:26 AM
0
Q: Create mosaic task 2

PlajerityThis post is a continuation of post here: Create mosaic task I improved code readability, hopefully it'll be reviewable now. Once again I'm asking for tips to write better code. Task: The point of this task is to create a service, which will generate a mosaic for given images downloaded from pro...

 
7:06 AM
0
Q: Optimize code for the grid of radio buttons

Android DeveloperI want to display multiple radio buttons in multiline in an item of recyclerview. Below is the code I am using- xml <RadioButton android:id="@+id/rb_rad1" style="@style/TextStyle.B.C3.Secondary" android:layout_width="wrap_content" ...

 
7:35 AM
 
7:46 AM
-1
Q: inheritence for 3 types of accounts

amaari've seen this code which is really helpful. i'm facing problems to inherit three diffent type of classes for saving , checking and business account, how can i inherit that, please class SavingAccount(BankAccount): """Class for a bank account""" type = "Saving Account" def __init__(self)...

0
Q: Find element that is identical to it's index in an array

thadeuszlayThe task is taken from LeetCode Given an array A of distinct integers sorted in ascending order, return the smallest index i that satisfies A[i] == i. Return -1 if no such i exists. Example 1: Input: [-10,-5,0,3,7] Output: 3 Explanation: // For the given array, A[0] = -10, A[1] = ...

-1
Q: CSS position Absolute and position Relative clashing with Keyframe Animations (In React Project)

ParsaLook at .h1-div (Parsa Ventures Text) If I make the div position relative, the animation works, but the h1 moves to the bottom of the screen below the content. If I make the div position absolute, its very responsive and is positioned where it needs to be, but animation doesn't work. I need t...

 
 
1 hour later…
8:47 AM
1
Q: Pull-up sequence accumulator counter

Константин ПисаныйI wanted to create a function describing a sport game called "Leader". The idea is that you make as many push-ups as you can, increasing each repetition by 1 and as you reach your maximum, each next repetition is decreased by 1 until you reach 0 push-ups eventually. I managed to do this using di...

 
9:07 AM
1
Q: Find smallest index that is identical to the value in an array

thadeuszlayThe task is taken from LeetCode Given an array A of distinct integers sorted in ascending order, return the smallest index i that satisfies A[i] == i. Return -1 if no such i exists. Example 1: Input: [-10,-5,0,3,7] Output: 3 Explanation: // For the given array, A[0] = -10, A[1] = ...

 
9:36 AM
Yup, I feel more and more like I'm getting undue upvotes everyday
Just enough that I they wouldn't be reverted for mass-upvote
 
10:07 AM
0
Q: Complexity of an Angular's service method to fetch search results from an API

lampshadeI tried the plug in CodeMetrics for Visual Studio Code along with some of my current Angular projects. And I was a little suprised about the outcome. I have a Service in Angular that fetches search results from an API. This method is pretty much boilerplate Angular code. It looks like this: get...

 
 
2 hours later…
12:26 PM
Monking
 
0
Q: Jquery text() doesn't want to work with append();

Aleksei Demochkofor (let i = 0; i < json.length; i ++) { let color = $("td#color"+i).text(); let img = 'img/'; $("td#color"+i).text('').append(`<img src="img/${color}.png" class="p-2">`); ...

 
12:53 PM
@Morwenn soo ... I've taken a look at that and don't see anything indicating that
 
Weird
I've had 3~5 upvotes almost everyday while it was mostly one upvote every few days for months
 
@CaptainObvious Broken code.
 
1:31 PM
This question appears to be off-topic because it is a code review request. This might be better suited to the Code Review Stack Exchange site. Before posting there be sure to read their FAQ to ensure that your question meets their guidelines. In its current form it does not meet their requirements. — John Conde just now
 
1:51 PM
@Morwenn Do you want me to downvote some of your actions? :p
 
@Vogel612 Yeah, UWYA is now just LCC and has been unofficially for over a year now.
 
possible answer invalidation by Константин Писаный on question by Константин Писаный: codereview.stackexchange.com/posts/222756/revisions
 
@dfhwze Ninjad my rollback. You may want the auto-comments script loaded up with some of our comments: codereview.meta.stackexchange.com/q/4952
 
He reedited anyway
So go ahead you may rollback this time =D
 
2:07 PM
@dfhwze No, that'll be an edit war, I've flagged for moderator intervention
 
@Peilonrayz This is an interesting link
 
2:22 PM
I'm voting to close this question as off-topic because code review questions are off-topic on Stack Overflow. — Ross Ridge 10 secs ago
 
-1
Q: Separate sublists in more sublists

user203377I want to separate every sublist of a list (alumnos) in other two lists (rojo and azul), considering if the name is in the next sublist and then I want to to have another two lists with the respective values. I am relativiely new with python and my best try is below, but it's not functioning. If ...

 
@dfhwze nah, that's ok :p
I'm never against more points, I just found it weird
 
2:37 PM
@Morwenn Enjoy the fame while you can. We'll all end up in oblivion.
 
The fame is already behind me, I'm but a ghost here
4
I only pop up once every few months/years to share a new fun sorting algorithm
I do keep fond memories of the time I've spent here :)
 
@Morwenn I get that sometimes. But I've had an additional 200k views in a couple of months and say 10/20 additional upvotes on my old answers. Kinda puts it in perspective for me.
 
Hehe
I was surprised because my upvotes seemed to correspond to questions and answers that were mostly a few days apart
 
0
Q: Keychain unique user

J. DoeI want to be able to store and retrieve a unique user throughout the app. Multiple accounts are not used. The code I have written is stated below. This is my first attempt using KeyChain. The test succeeds. I am wondering if anything if the code can be improved. Security issues perhaps? import ...

 
3:01 PM
@AlexV That's a known problem that they won't fix. It means there's plenty in the queue, but you've reviewed them all already. The queue is not empty, but your queue is.
@Morwenn Famous ghost though, welcome back.
 
@Mast NGL that's dumb. But IMO so is also not showing the number of reviews you can do as a number.
 
@Mast I'm surprised that people still remember me :p
 
3:45 PM
possible answer invalidation by walter nuñez on question by walter nuñez: codereview.stackexchange.com/posts/222485/revisions
 
@Morwenn Doh of course people remember you :P
 
4:53 PM
This is more appropriate for code review stackexchangeRandy Casburn 12 secs ago
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comRandy Casburn 36 secs ago
 
5:12 PM
0
Q: find shortest path in the matrix for multiple objects

lapotsI have the implementation of A* search algorithm that allows to find the shortest path from start to goal. The implementation looks like this public class AStarShortestPathContext { private Vertex[][] matrix; private int rows, columns; private int cost; private PriorityQueue<Ve...

 
5:32 PM
0
Q: Trigger sirens on cameras in remote locations

HunterWeb-app summary: I'm a complete beginner in web development and I made a sample web application that can trigger sirens on security cameras located in remote locations. Here's the functionality seen by the user: Go to website and brought to a landing page with a search bar. Type in the name of...

 
5:52 PM
1
Q: Simple object validator with a new API

t3chb0tQuite some time ago I have created the Simple object validator (see also self-answer). The more I used it the more I thougt its API could be better so I have heavily refactored it and would like to you take another look at the new version. Requirements I'd like my validator to be: intuitive e...

 
6:13 PM
0
Q: A Versatile Algebraic Variable Class Template with full operator support

Francis CuglerI've been working on this concept for the past few days where a variable_t is of any type T; assuming that it is at least arithmetic, and that all of the available C++ language operators that perform arithmetic, comparison, pre&post-increment&decrement, and bitwise operations makes sense. I hav...

 
 
1 hour later…
7:20 PM
possible answer invalidation by t3chb0t on question by t3chb0t: codereview.stackexchange.com/posts/222773/revisions
 
7:34 PM
0
Q: Copy to clipboard function feels verbose and hacky

SeanI have a React component with a copyToClipboard method, which all works fine, but feels extremely verbose and quite hacky (namely, having to create a new select element, hide it, focus/select/copy it and then delete it). From what I've read, there are a couple of different ways to achieve copy-to...

 
possible answer invalidation by Wolf Larson on question by Wolf Larson: codereview.stackexchange.com/posts/222497/revisions
 
Oh right, I guess that I do have a legacy here :')
Hi
 
Hey @Morwenn nice to see you!
 
I dropped by because of suspicious upvotes :p
 
7:41 PM
@Vogel612 @SᴀᴍOnᴇᴌᴀ @Kaz you may be interested in the link I posted above
 
7:51 PM
@Phrancis Are you thinking of getting the wizard on Code Review?
Cause I got blanked when I asked:
Will this also be added to other sites too? I can see this being a good thing for Code Review. — Peilonrayz Apr 3 at 15:23
 
8:12 PM
@Peilonrayz Some were talking about it last night and Vogel suggested I ask her
22 hours ago, by Sᴀᴍ Onᴇᴌᴀ
@Kaz if only the wizard was available for new CR posts... :/
 
8:35 PM
0
Q: TypeScript implicit 'any' type with computed property key

Sean(irrelevant code removed for demo purposes) I am new to using TypeScript and I have this React component which has an object literal inside the component, which I'm then accessing using a computed property key. Everything works as expected but I was getting the following TS error: Element impli...

 
9:09 PM
A recent answer on CR uses generators and yield_from to do recursive padding, codereview.stackexchange.com/questions/222623/…hpaulj 38 secs ago
 
9:41 PM
All numbers n <= 3 are prime, special case that so you can skip even divisors inside your loop. See also Checking if a number is prime in NASM Win64 Assembly/ for a more efficient prime-checking loop which checks the quotient against divisor to stop at about sqrt(n) instead of uselessly going all the way up to n-1. Porting the algorithm to x86-16 for 8-bit integers should be simple. — Peter Cordes 58 secs ago
possible answer invalidation by Razvan Zamfir on question by Razvan Zamfir: codereview.stackexchange.com/posts/203084/revisions
 
 
1 hour later…
11:18 PM
0
Q: Journey Planner - Javascript

EMLHere is my Javascript solution to the following problem Given an un-ordered list of flights taken by someone compute the person's itinerary, given a starting airport. If none valid itinerary, return none. If more than one journey is valid, print any valid solution. Examples Array: [['SFO', '...

 

« first day (2240 days earlier)      last day (1772 days later) »