« first day (2392 days earlier)      last day (1608 days later) » 

12:00 AM
RELOAD! There are 6252 unanswered questions (90.0902% answered)
 
@SᴀᴍOnᴇᴌᴀ I recently learnt Windows has a builtin and easy to use emoji keyboard. Win+. is a whole new world
 
@Peilonrayz nice- I copied the "dinocat" from my windows machine to my host mac and it pastes as these two - cat and dino: 🐱‍🐉
 
Yeah, I wanted a hacker cat as my Discord status, but it came out as a cat and a missing glyph :(
 
 
2 hours later…
2:01 AM
0
Q: Create one class to perform all type orm functionalities

THpubsI'm trying to create a separate package in a monorepo to handle TypeORM functions. So if I have two APIs (User API, Admin API), both can refer to the same package to talk to the database. I have written a class which takes all the TypeORM entities, create a connection and export them. Please let ...

 
2:49 AM
Hi! You may have more luck on Stack Exchange Code Review. — Unlocked 55 secs ago
 
@SᴀᴍOnᴇᴌᴀ That's actually a super cool side-effect of how Unicode works.
 
possible answer invalidation by greg b on question by greg b: codereview.stackexchange.com/posts/232532/revisions
 
3:10 AM
Monking!
Or monkevening, I suppose.
 
4:05 AM
possible answer invalidation by Jamal on question by vcable: codereview.stackexchange.com/posts/230195/revisions
 
4:56 AM
Monking
@Duga thats ok, post had been closed. Looks fine now.
 
5:14 AM
Monking
 
5:47 AM
0
Q: query optimization and indexing

Steven Choidatabase relations can be found here http://www.tpc.org/tpc_documents_current_versions/pdf/tpc-h_v2.18.0.pdf SELECT l_orderkey, sum(l_extendedpriced * (1 - l_discount)) as revenue, o_orderdate, o_shippriority FROM customer, orders, lineitem WHERE c_mktsegment = 'BUILDING' -- '[SEGMENT]' an...

 
6:24 AM
 
7:19 AM
Monking!
 
 
1 hour later…
8:30 AM
0
Q: Django: App based at PolymorphicModel

MorganFreeFarmI'm building a simple Django app for reviews of different objects (restaurants, car services, car wash etc). I started with the app, but soon I faced first problem. Every object has features (but every type of object has different features). For example: Restaurants have garden, playground, se...

0
Q: React and D3 alignment histogram

SamI'm reasonably new to D3, and I've put together a class based React component which outputs a genomic alignment visually. The result looks like this: The component is as follows: import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import * a...

 
8:51 AM
0
Q: Sending DTMF tones from dialpad

cantona_7I have the following code which works perfectly fine. I am using the dial pad to set the number and also to send the DTMF tones. But I find the code to bit more repitive. Is there any better way to optimize the code or the approach I have is good enough ? Thank you in advance for your valuable su...

 
"more idiomatic" doesn't mean "I found a way to use iterators". If I saw this in a code review, I'd fail it hard. — trentcl 51 secs ago
 
9:52 AM
0
Q: In Pandas Dataframe First sort by subject ID then pick their corresponding values from other columns.How can this be optimized?

Aditya VartakNOTES=[] hadm=[] for i in sorted(list(notes_df.SUBJECT_ID.unique())): #print(i) NOTES.append(list(notes_df[notes_df.SUBJECT_ID == i].TEXT)) hadm.append(list(notes_df[notes_df.SUBJECT_ID == i].HADM_ID.astype(float))) notes_1_df = pd.DataFrame(list(zip(sorted(list(notes_df.SUBJECT_ID.un...

 
 
1 hour later…
10:53 AM
1
Q: How notifty observers when object attributes updated?

ysfcylnI have a Singleton manager class for managing request model and it's attributes. My main aim is update object observers when some of the object attributes changes class FlightSearchManager { private val _flightSearchRequestModelLiveData : MutableLiveData<FlightSearchRequestModel> = Mutable...

 
11:13 AM
I posted an "UNUSED with teeth" on CodeReview SE... for anyone who is interested in the idea of actually corrupting the data. (Not ideal to corrupt it but the toothlessness of unused annotation seems to have been continued even in standard C++ annotations, which puzzlingly went with "maybe_unused" on the parameter definition, instead of letting you mark points in the control flow after which you don't want a variable used and have the compiler catch it.)HostileFork 54 secs ago
You'd better ask this question on code review with a sample of your code. Not on stack overflow. — ALX23z 48 secs ago
 
0
Q: code complexity to make it quick/better

abdoulsnHello I've a code for crawling and scrapping o digit in google results. But it's super slow when i run it. What it dot: read a pandas column, search values in google and take the first result link to grape a siret. Could it be less greedy in complexity or be better? # Function pour recupere la ...

 
I posted an "UNUSED with teeth" on CodeReview SE... for anyone who is interested in the idea of actually corrupting the data. (Not ideal to corrupt it but the toothlessness of unused annotation was continued even in standard C++ annotations, which puzzlingly went with [[maybe_unused]] on the parameter definition, instead of letting you mark points in the control flow after which you don't want a variable used and have the compiler catch it.)HostileFork 47 secs ago
 
 
1 hour later…
12:36 PM
0
Q: Manage independent script component architecture in unity

Muhammad Faizan KhanI have different set of objects where I have to show Name UI and Menu UI using onmousedown and on mouseenter. Remember Both are optional, the one object may contain both option or maybe one. Currently I have manage to write two seperate scripts like this /// <summary> /// It will shown ...

 
12:56 PM
0
Q: Parallel Calling of Function on List of Objects

GrogerI have a list of objects, declared in the following way foos = [Foo(bar) for bar in bars] I declare a few parameters, a and b, and call the following function def func(x, y): z = [] for foo in foos: z += foo.dofoo(x, y, a, b) return z This function behaves as intended, h...

 
 
1 hour later…
2:18 PM
0
Q: Blogging application with Codeigniter back-end and AngularJS front-end

Razvan ZamfirI am working on a blog application with Codeigniter 3.1.8 and AngularJS v1.7.8. The Dashboard of the application is "pure" Codeigniter, with Models, Controllers, and views, while the fronted is made up of JSONs managed and displayed by AngularJS. I operated this clear separation between back-en...

0
Q: Dynamically create ordered list in outlook from Excel

Zack EI have working code for this project, but I am now in need of some help to create a dynamic ordered list within Outlook from Excel. I am trying to format comments that a user will enter into a UserForm in Excel and pass those comments into an ordered list via a collection; the issue I run into i...

 
2:38 PM
0
Q: Only handle the the last created out of many parallel promises

Gabriel SmoljárI am developing a web application in JavaScript that allows for filtering a list. For better UX we do not prevent changing the selected filter option while the list is being refreshed. Problem is that if the filter is changed rapidly multiple times the resulting list may not match the last create...

 
2:58 PM
0
Q: linked list modified

Dark deboI implemented the singly linked list in c and i stuck in the display function it does not work.But i think someone can review my code:: #include <stdio.h> #include<stdlib.h> typedef struct q_9 { int data; struct q_9 *link; }*node; node head=NULL; node newnode(int x); void node_add(int...

 
3:20 PM
possible answer invalidation by Groger on question by Groger: codereview.stackexchange.com/posts/232736/revisions
I wonder if this would be more appropriate on codereview.stackexchange.com? — Jon 34 secs ago
 
JAD
3:32 PM
@Duga probably for the better, since the question is a lot more clear now.
 
0
Q: Sudoku Printer for a Sudoku Solver

K00lmanI have gotten a class project to make a program that solves a game of sudoku. The first thing I was to do was to make something that takes input and prints out the board. import math #To be used later def board_filler(): """Creates the sudoku board from user input""" board = [[], [], [...

0
Q: Dynamic Map Height in React Native

nicholas mitchellI am currently implementing a mobile app which has a map and a sliding drawer at the bottom similar to google maps (see image below). However, I would like the size of the map to change dynamically with respect to the size of the drawer. My current approach is to update the state of the main com...

 
4:20 PM
0
Q: Confused about the proper implementation of MVC design patterns in Java (Swing)

sepalousI'm a beginner in Java, and I am confused about MVC. I understand the theory, but how should actionListeners should be implemented? The classes in question are GameLogic and UserInterface Also, I'm new to Swing. Is my use of classes standard practice? Thanks for the help. FruitMachine Class ...

 
Remonking
 
4:42 PM
Just asking for clarification, @200_success quit because of the licensing issue?
@MathieuGuindon I suspect I may be one of those problem people, I am working on correcting it.
 
@pacmaninbw thanks, and no worries - there are worse offenders :)
also, hi/monking!
 
Oh wait LCC is a problem again? 🤣🤣
3
 
Monking
 
4:57 PM
1
Q: Collection of small unrelated methods

LinnyI have a file that contains a multitude of methods that are solutions to some common interview questions. None of these methods are related in any way, shape or form. I have been debating on the two possible ways of asking for review: Posting the entire contents of the file and asking for revie...

 
@410_Gone LOL
 
5:15 PM
possible answer invalidation by Zack E on question by Zack E: codereview.stackexchange.com/posts/232742/revisions
 
0
Q: board Sudoku Board Printer in Sudoku Solver

K00lmanFor my programming class, we are making a sudoku solver. The first step was to make it print out a board from input. import math #To be used later def board_filler(): """Creates the sudoku board from user input""" board = [[], [], [], [], [], [], [], [], [], [], []] for x in enumer...

 
5:32 PM
@pacmaninbw I wish there was a troll face emoji...
 
5:46 PM
You're talented, make one.
 
I mean one in Unicode...
 
Not sure if I've said this to you before, but products is a bad model name. Class names for Models in Laravel are StudlyCase and singular, so Product. Anyway, you can set validation rules 'minprice' => 'nullable', then handle if($request->input("minprice", null) && !$request->input("maxprice", null), etc etc. But, code reviews/suggestions for better approaches aren't what Stackoverflow is for. Maybe try codereview.stackexchange.com for that. — Tim Lewis 47 secs ago
 
@Duga it's Stack Overflow though
 
6:02 PM
-1
Q: The Most Efficient Way to Calculate an Average?

darkonaito_09I'm working on the most efficient way to calculate the average of n numbers. I came out with this: #include <iostream> using namespace std; int main() { double media = 0, n = 0; int16_t c = 0; do { cin >> n; }while(n && (media += n, ++c)); cout << "Media: " <<...

 
Consider putting your actual code up for peer review on Code Review if you're interested in feedback on any/all aspects of the code, including (but not limited to) performance. — Mathieu Guindon 36 secs ago
 
6:20 PM
@pacmaninbw With SE staff making one bad decision after another, and the community being helpless in stopping them, it just stopped being fun anymore. The licensing issue was, for me, the last straw. They didn't have to do it, and, as far as I can tell, they stand to gain nothing from changing the license. We've told them that it's a violation of trust, and yet they seem to think that they can just make the problem go away by ignoring it.
That basically sums up their attitude these days. Ignore everyone.
What could have been the motive for the license change in the first place? A test to see what they can get away with?
 
0
Q: test REST API connection

John DoeI try to get my head around the unittest.mock module. Please tell me if this is the right way to test for the right response for the following method : class APIManager: def __init__( self, api_token='token', api_url_base='api_url', headers=No...

1
Q: Fibonacci and Lucas sequence generator using Boost and GMP

slepicI implemented this console application that generates Fibonacci and Lucas sequence numbers using boost and GMP for multiprecision. There is an iterator-like class which can do any sequence based on the recursive rule F(n) = F(n-1) + F(n-2). Then there are two functions which can compute Fibonac...

 
Using SE is probably unavoidable for Q&A that is essential for work, but Code Review was mainly for my own fun and education, and once the fun is gone, what's the point?
To give them content that they can relicense at will, to sell more sleazy ads?
 
@200_success I can't even try to be contrarian to that because 70% of my justification for changing jobs right now is that it's no longer enjoyable.
3
 
Sorry, gotta go to a meeting starting in a few minutes.
 
And my entire reason for not participating in SE is that it's not fun anymore.
 
7:26 PM
You can create several tables in a single SQL statement by putting them all in a create schema statement. I have spent a couple of decades working with Oracle at a number of different companies and have not once encountered a situation where anyone has used a create schema. I'd wager that the vast majority of Oracle developers have no idea that such a statement exists which would create issues for things like code reviews/ script generation/ etc. Plus it makes life much harder when you have errors in one of your scripts that need to be debugged. — Justin Cave 28 secs ago
 
8:05 PM
0
Q: Tic-tac-toe vanilla js

makbolI'm trying to improve my interview skills so I wrote one of the typical assignments - tic-tac-toe game. The main goals are: time limit: 30 minutes - 1h use only vanilla js I'll attach source but I created PR in dedicated repo as I think it'd easier to comment for reviewers. Repo: https://git...

 
8:17 PM
Try Code Review SE. — Ellis 42 secs ago
Try Code Review SE. — Ellis 59 secs ago
Does it work as intended? If you're interested in feedback on any/all aspects of the code, Code Review is where it's at. But the code must work as intended. Does it? — Mathieu Guindon 19 secs ago
 
8:39 PM
You should give more details with what the error is and where it happens and what you've done to try and fix it, including the code of any attempts and then maybe someone will point you in a better direction, rather than giving your whole code and saying 'it doesn't work'. If you want to submit working code and want to know how to improve this, then check this out: codereview.stackexchange.comMandingo 15 secs ago
 
-1
Q: TableView only shows the last image loaded in every cell (Swift)

BrandonThe problem I have have at the moment is properly displaying images in a tableView cell. My images are saved to Firebase, and I can easily retrieve both images. When I try to display each image in its own table view cell they quickly load both images and the end result is the last image display...

-1
Q: Is using an external function to modify internal React component methods and state an antipattern?

IanI'm still somewhat new to React and so I'm still getting a handle on the patterns used. I'm trying to do something that feels like it may be a bad idea, but I can't think of a better way. Essentially, I have several React components that I want to be responsive in that they change layout or som...

 
9:01 PM
@200_success Sorry to see you go. I understand completely, I worked in one job for 10 years that I really didn't enjoy, but it paid well.
 
9:24 PM
The question is off-topic for Stack Overflow; requests for improvements belong on codereview.stackexchange.com. Setting images was just some low-hanging fruit to suggest the kind of improvements that can be made. — chepner 1 min ago
 
 
1 hour later…
10:38 PM
@410_Gone ugh, it should be fun....I'm sorry to hear you both say that(@200_success) makes me a sad panda.
 
@MathieuGuindon On this question, I believe the poster is indicating the input loop terminates when the value zero is input. For C and C++ if (n) is equivalent to if (n != 0). What makes the code wrong is the && (media += n, ++c). codereview.stackexchange.com/questions/232755/…
 
I've had to do a lot of things in my life that weren't fun. Trying to keep CR clean is quite relaxing relative to those moments.
 
@MaxB there is enough information in this response for it to satisfy your Q, though I acknowledge that it does not solve your desired output to perfection. Do keep in mind that SO is not a code review or homework guide site. Be mindful of the work you're asking of people – and the work they've provided. — Yaakov Bressler 25 secs ago
 
Also, I laughed way too hard at this.
6
Q: Used WD-40 on headset and now it loosens daily

Eran BetzalelI've used WD-40 on my bike's headset as it produced some cracking noises. The result is a headset that gets loose after every ride. I've tried to use a wrench to tighten it, alas, it went loose after a couple of days. Any recommendation of how I can fix my mistake? UPDATE - image of the bike

Use WD40. Everything comes loose. And you wonder why.
Naturally, the proposed solution is duct tape.
4
I really like both WD40 and duct tape.
 
11:09 PM
0
Q: WPF/C# - Rock, Paper, Scissors Game

Joseph EdwardsI have made my first little project using C#/WPF - a simple rock, paper, scissors game. I am happy with the functionality and look but I would love to know how a more experienced programmer would refactor the code I have to bring the size down and make it more readable. Many thanks. MainWindow.x...

 
@Mast LOL.
 
This should probably be asked on Code Review Stack Exchange instead of SO. — zixuan 8 secs ago
 
11:29 PM
0
Q: MySQL select statement for retrieving user role permissions

andreiy05I have a java project that I'm working on and I'm trying to implement in my application role-based authentication. So for example when a user is logging and he is an admin he will have access to some extra methods then a normal user has access to. In order to do that I've mapped my database in ...

 
There's now tons more code to review, which is off-topic here, but Code Review can accommodate. I'd strongly avoid using global variables in any form in here, especially if using threads. — tadman 56 secs ago
 
11:49 PM
0
Q: Bracketing multiple onEdit functions

McChiefI have multiple onEdit app script functions in my Google Spreadsheet which work individually but I cannot work out where to put the brackets to nest them. This is my code which is a little messy and probably needs a tidy up. // Cut Employees Left from Unit Standards sheet and paste in Unit S...

 

« first day (2392 days earlier)      last day (1608 days later) »