« first day (3309 days earlier)      last day (693 days later) » 

12:03 AM
REFRESH! There are 8072 unanswered questions (89.3179 answered)
 
 
5 hours later…
5:22 AM
0
Q: Rendering primitive 2D shapes

Jimmy YangI am currently creating my own 3D renderer (think something like OpenGL). As a first step, I created a mini program below to render primitive 2D shapes essential to 3D graphics: points, lines, and triangles with z buffering. I'm hoping for code review on three essential methods in the class Displ...

 
 
2 hours later…
7:31 AM
Assuming this does actually work then your question is more suited to code review — Lancelot du Lac 59 secs ago
 
8:08 AM
Monking
@pacmaninbw Computers aren't secure enough. VMs aren't secure enough. Nothing is ever secure enough without context.
That's not a reason to abolish them completely.
Heck, cars aren't secure enough.
Things go wrong. People die.
People tend to get pissed when I ask about threat levels, but not enough people talk about threat levels.
Are you guarding against your neighbours of 85 years old, against a scriptkiddy nephew or against a hostile state agent?
'enough' implies you can guard against a specific threat efficiently.
Not against any and all threats.
Elevators are secure, unless you let me loose on them with a 1000 bucks toolkit.
Is that secure enough?
Usually.
Or if you let me enter the machine room, in which case I can override all safeties with loose wire and a screwdriver.
Older elevators are still in use. They are protected against most methods of failing and when they fail they fail mostly safe. Worst case you get locked up for a couple of hours and it takes a firefighting team to get you out. They are not as secure as new ones against various threats. If the new ones are 'secure enough' as well, does this imply the older ones aren't?
Technology is dangerous.
Humans are dangerous.
Security is relative.
 
9:04 AM
0
Q: C++ Doubly linked list, including benchmark vs std::list

frozencaI wrote a rudimentary implementation of doubly linked list. Feel free to comment anything! #ifndef __CLRS4_LINKED_LIST_H__ #define __CLRS4_LINKED_LIST_H__ #include <common.h> #include <concepts> #include <iterator> namespace frozenca::hard { using namespace std; template <typename T> class Li...

 
 
1 hour later…
10:19 AM
0
Q: The smallest positive number that is evenly divisible by all of the numbers from 1 to 20

Amir MotefakerProblem description: 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? Least Common Multiple(LCM): In arithmetic and number theory, the least...

 
I would like to have reviewed a .java file that is 90+ kB, which is larger than a single post can fit (64 kB as far as I understood). My options are: (1) split it in two posts and request the answers to only one of them; (2) strip away some code. Which way should I proceed?
 
11:43 AM
@coderodde Why is the file so large to begin with? If it's a library of sorts, maybe the first point of review would be to split it up.
You could split it up into multiple questions. Has been done before. Do note how few answers those questions got though.
Just because it's possible (and allowed) to post it like that, doesn't mean it will lead to reviews.
 
11:58 AM
@Mast Not a library, but a single data structure.
 
@coderodde A 90+ kB data structure? Ok. Personally (not from a moderator perspective) I think this wouldn't work well on the site. At that size, you may be better of to have a review of the approach instead of the actual implementation itself. That's not something we can handle though, but approaches is something Software Engineering can work with.
 
I think this site is more suitable for your question codereview.stackexchange.com Anyway, add some comments and give your variables meaningful names to make the code more readable. — Vitalizzare 27 secs ago
 
@coderodde To answer the original question: don't go for (2). (1) could work, but the likelihood of your data-structure actually getting reviewed isn't high.
 
12:13 PM
@Mast I don't use WiFi at home, Cat 6 and Cat 7 cable for security and speed reasons. Don't use public Wifi.
 
12:35 PM
Monking
 
@pacmaninbw I try to avoid using Wi-Fi if I can but where we live the house is all plaster walls and it's a pain in the rear to get cable run through them
 
@DerKommissar Do you know how to remove the hard drive from a Canon multi-function Laser Printer. I can recycle the printer after I remove the hard drive. My SSN is on the hard drive.
 
Nope, can't help with that unfortunately.
 
@pacmaninbw Smashing it into pieces will maybe remove the SSN ;)
 
@skiwi Yes, once I remove the hard drive that is what I intend to do to the hard drive.
 
12:47 PM
0
Q: Is interval overlaps other intervals

Roman MahotskyiI recently started to learn functional programming and wan't to know If I'm doing things right. I use @effect-ts/core lib as well as date-fns to check if interval overlaps other intervals import * as Arr from '@effect-ts/core/Collections/Immutable/Array' import * as B from '@effect-ts/core/Boolea...

 
1:00 PM
Why is it always so hard to pick up a project again
 
1:49 PM
For me it's been a lack of reward on them
I don't like doing .NET work anymore because I don't learn from it
 
2:08 PM
Guest Post on May 26, 2022
Lists are useful data structures, but sometimes you need to show the context between items.
 
@pacmaninbw Considering the printer is useless without the drive, take it apart. Start with the screws, end with a crowbar.
Once you start breaking away plastic, some of the parts can be salvaged if you want to.
But the printer as a whole isn't salvageable.
Once you get into that mindset, it becomes incredibly easy to find the drive.
If you have a column drill, that drive doesn't stand a chance.
 
2:25 PM
0
Q: Any bettter way to achieve this lookup table?

JohnWhat I need: I need a lookup table. Once the keywords are all found, then the value of the std::unordered_map is returned.And I don't care about the sequence of the strings in the std::vector. I think std::unordered_map<std::vector<std::string>, int> could achieve this goal. Any better method to ...

 
2:38 PM
@Mast True.
 
I've done some hardware destruction in the past.
 
How to make my code better type of questions belong to Code Review, not SO — matszwecja 46 secs ago
 
@Mast Was it fun?
 
Clean out a rack of hardware previously used as auxiliary on military hardware.
I was allowed some creativity.
@pacmaninbw Oh yes.
 
LOL
 
2:41 PM
Ever tried putting a 90 degree bend in a drive?
If it can bend 4mm steel, it can bend a drive.
 
I've gotten clean cuts and split hard-drives in half in the past
Walked away with literally two pieces, right down the middle of the disks
 
0
Q: I need help on my 360 image viewer in Modal Box

user3556983I'm trying to make a image with onclick that opens an image with a 360 degree view the works but unfortunatly there are some little problems. When I tried to open, its shows like this: it only shows half of the image, I want the image to be in the center and fit on screen Can anyone help me on ...

 
3:09 PM
Monking
 
3:39 PM
0
Q: hackerrank New Year Chaos interpretation troubles

itacirgabralSimilar to this question in javascript. Full solution in github I'm probably misinterpreting the problem, the result I get diverges from the common solution. For example [2, 5, 1, 3, 4] not being too chaotic. Any person can bribe the person directly in front of them to swap positions so the swa...

0
Q: Python smart Hangman game

adamaI made a smart Hangman game in Python and now want your opinion about the readability and code quality of this script. I want to improve my overall coding style. So I am happy to hear improvements for naming conventions, proper docstrings and logical/runtime enhancements. So lets start with a qui...

 
Would a moderator care to comment on this comment?
I may be part of the problem, but the biggest problem on SE is the users.
@Mast @Malachi @SᴀᴍOnᴇᴌᴀ ^^^
 
4:04 PM
0
Q: This code is meant to insert employees data into a database. Can this code be used in industrial applications or is it unsafe or vulnerable?

chicken nuggetsIve constructed code using prepared statements to try and avoid chances of SQL injections. This code is meant to insert the employees information. It does what I need it to do but I want to know if the php or html used in this is suitable for a proper application or if its vulnerable. <form n...

 
4:22 PM
@pacmaninbw Was there any answer invalidation?
If there wasn't, I can understand the confusion.
 
0
Q: Understanding the use of @() in matlab

AHFI am trying to understand the following code from Matlab: numElements = sizes(ii)/sizeOfDouble; hostData = randi([0 9], numElements, 1); gpuData = randi([0 9], numElements, 1, 'gpuArray'); % Time sending to GPU sendFcn = @() gpuArray(hostData); sendTimes(ii) = gputimeit(sendFcn); % Time gathering...

 
@pacmaninbw The biggest problem is SE has hidden the manual and many of those that can find it either don't read or don't understand it.
If we'd all be forced to take a written test before participating, the quality would skyrocket.
Participation would drop through the floor though.
@pacmaninbw Commented and rolled back. Technically you were both right. The edit can stay.
Actually I'm not sure the question should stay open.
Half the code is missing.
 
4:53 PM
-1
Q: Generating a URL and web scraping the resulting website

Daniel CoronaI am writing a code that generates a URL and attempts to perform a web scraping upon the resulting website. However, since there's too many variables to take into account, I did something like this: try { const url = StarCityController.getSearchURLForCard( card...

 
@Mast I said I could be part of the problem.
 
5:18 PM
0
Q: OSDEV Physical Memory Manager (PMM) in C

RayanSo I ported the PMM from Vinix into C for a little OS I'm working on, I'd love to get some feedback Here's my Code! // PHOTON INTERNEL "Wave" Kernel // CODE PORTED FROM VINIX Copyright (C) 2021-2022 The Vinix authors. #include <stdint.h> #include <stdbool.h> #include <stddef.h> #include "serial.h"

 
5:38 PM
If your code works as intended, and there is no problem, then this question is not really suited for this site. You could consider Code Review, but check out their guidelines first. — trincot just now
 
 
1 hour later…
6:41 PM
Id recommened heading over to codereview.stackexchange.com, as this is working code and usually SO works with non-working or buggy code. — Thornily 37 secs ago
 
 
2 hours later…
8:36 PM
0
Q: implementing malloc with mmap

Maya Cohenso i saw this post and i am thinking if this is a good implementation to malloc using mmap. // https://stackoverflow.com/questions/8475609/implementing-your-own-malloc-free-with-mmap-and-munmap memory.hpp #ifndef MEMORY_HPP #define MEMORY_HPP void *malloc(unsigned int); void *calloc(unsigned int...

 
 
1 hour later…
9:44 PM
@CaptainObvious Authorship!!!
 
9:57 PM
@pacmaninbw we don't know for sure since the OP hasn't replied but the implementation of malloc does look a bit different than the code in the referenced SO post (other than the last two lines) and also drastically different than the code in the other SO post mentioned within the second commented line at the start of memory.cpp
I searched the repos in the linked GH account and see two results but they are quite different and were last updated April 26th
 

« first day (3309 days earlier)      last day (693 days later) »