« first day (2864 days earlier)      last day (1136 days later) » 

12:00 AM
RELOAD! There are 7382 unanswered questions (89.5695% answered)
 
12:35 AM
I’m voting to close this question because Per @James_D, This question is really off-topic for this forum. It's too opinion-based. Maybe consider codereview.stackexchange.com (though you should check the site first for what is considered on-topic there). That said: The model should not have any references to UI elements, such as labels. The view should observe the model and react to changes, instead of the model directly updating the view. — Sedrick 38 secs ago
 
 
3 hours later…
3:12 AM
0
Q: Why is my IsBiggerThanHalf stuck in in infinite loop?

BroomHildaWhen I run this code through the debugger I noticed that after I push mpr in the function it gets a value of 0x10 and that it infinitely loops, never triggering the sbrs instruction. Why is this happening? .include "m128def.inc" ; Include definition file ;*******************************...

 
 
3 hours later…
5:44 AM
0
Q: Binary to hex in ARM64 SIMD assembly

Nate EldredgeAs an exercise in learning ARM64 assembly (aka AArch64), I wrote this function to convert 64-bit binary to hexadecimal with SIMD instructions. I'm most interested in feedback on the algorithm, instruction selection, and micro-optimizations for size or speed. This was inspired by x86 SIMD impleme...

 
 
2 hours later…
7:27 AM
0
Q: Which looks cleaner in Swift Syntax for Array Empty Check?

MochiI have code that checks for an optional array. I'm wondering which syntax is cleaner to check array emptiness. if array?.count ?? 0 > 0 { } or if let arrayCount = array?.count, arrayCount > 0 { }

 
8:14 AM
I downvoted your question. What you seem to have done is a code review. But code reviews are not a service we offer here, they can be request at our sibling site Code Review. — Klaus D. 1 min ago
 
8:43 AM
0
Q: How to pass a range?

Jonathan Woollett-lightI need to calculate the average value of points around a given point in a wider field. For this I have a function: fn local_average((x,y):(i32,i32),n:i32,(width,height):(i32,i32),space:&[i32]) -> i32 { let y_range = cmp::max(y-n,0-y)..cmp::min(y+n,height); let x_range = cmp::max(x-n,0-x)....

 
Poor title.
@CaptainObvious RBA
 
9:23 AM
Monking
@Mast Still better received than my Rust question yesterday. I'm wondering if there's too much text in my question.
 
9:36 AM
@Zeta I don't think it's a matter of too much text, more a problem with how it's presented. The structure goes all over the place.
If there's only a small amount of text, that's not as much a problem as when the text is longer.
Sometimes you simply shoot a question under the radar.
Life ain't fair.
Votes indicate popularity, not quality.
Just like elections.
 
9:50 AM
possible answer invalidation by Jonathan Woollett-light on question by Jonathan Woollett-light: codereview.stackexchange.com/posts/256832/revisions
 
@Duga It's fine, I adjusted my answer. (Was an index error I didn't review either way)
@Mast Fair enough. Thanks for the review request review :)
 
Not a problem.
 
 
1 hour later…
@Zeta IIRC ~2PM UTC+0 on a weekday is the best time to post a question on Code Review. For example Americans and Europeans (the majority of our site) are awake. Note: Tags are little ecosystems Rust may diverge greatly from the site's average.
However, looks like your edit has brought in more views and votes :)
 
11:42 AM
Authorship problem; check your votes... codereview.stackexchange.com/questions/256797/…
 
@CharlieChap Well you are doing an async request so it looks fine. You might want to post in codereview.stackexchange.com for opinions on your code. — FluxedScript 48 secs ago
 
Oh, no, wrong order: Monking!
 
@MaartenBodewes Thanks! (Out of curiosity) how'd you find the code was taken from the docs?
 
12:11 PM
Note that there is also codereview.stackexchange.com , which may be more appropriate for your question. — 0 0 55 secs ago
 
12:39 PM
@Peilonrayz Found it when checking the parameters of openssl_encrypt, and since you cannot trust PHP documentation you have to browse through the comment section as well (password / key confusion).
Normally I find these things by simply looking at a distinctive line of code and inputting it into Google :)
 
There is codereview.stackexchange.com , which may be more appropriate for your question. — 0 0 59 secs ago
 
12:57 PM
@MaartenBodewes Aaahh. I think you've explained what I've been doing wrong all along! I'd normally try the entire file. Nice, thanks! :D
 
Great, something good has come out of this after all.
BTW, that code example forgets to authenticate the IV.
You can try to compensate by using HMAC-SHA3-512 of course, but just choosing "the best" algorithms won't get you secure.
 
The question is unclear for me. Are you asking for a code review? — Thomas Sablik 1 min ago
 
1:14 PM
(by the way, I've just got my UHK back after I messed up a firmware update, or at least an intermediate switch did, so if I don't seem to shut up, I'm just happy to be typing again at normal speed)
 
Stackoverflow is the wrong platform for code reviews. Please ask your question on Code ReviewThomas Sablik 7 secs ago
 
@MaartenBodewes I've always known I know very little about cryptography, but hearing a subject matter expert always makes me certain about how little I know...
@MaartenBodewes I recall you have a few cool keyboards. What causes you to be so fast with the UHK, layout, familiarity or something?
 
1:47 PM
0
Q: Did I implement the MVC pattern correctly with JavaFX?

user238716I made a simple JavaFX app. It is just a Pomodoro timer, it works as expected. I did not use a fxml file for the view. I am just wondering if I implemented the MVC pattern correctly. The Main class seems a bit redundant to me. Are there any other improvements I could make to the code? Thanks publ...

 
2:05 PM
possible answer invalidation by Zujis Karolis on question by Zujis Karolis: codereview.stackexchange.com/posts/256803/revisions
 
2:16 PM
@Peilonrayz I guess it is mainly the brown switches and the fact that I can really relax my hands.
I use it in an ergonomic tent setup. I also learned Dvorak once, but that was too confusing because I could not use Dvorak everywhere.
Obviously you start by learning how to blind type with 10 fingers.
I'd probably be faster if it had "Choc" blues. I don't like the amount of key travel especially. I put heavy O-rings on mine, which helps both with the travel and the typing sound.
(the UHK sucks a bit when it comes to the missing function keys for development, hitting F1 is not such a problem with only Mod-1 to hit, but hitting Control-F1...
 
@MaartenBodewes Oh what switches were you using? I have an MX blue and MX brown keyboard, where I personally use the browns as my primary.
 
possible answer invalidation by Zujis Karolis on question by Zujis Karolis: codereview.stackexchange.com/posts/256803/revisions
 
What is an "ergonomic tent setup"? I searched and get tents, I'm thinking you're talking about something else. Yeah, having a non-QWERTY keyboard can be annoying at times. I use Dvorak (wanted to learn to touch type and kept cheating with QWERTY) but never learnt QWERTY afterwards. Installing Arch is a pain now as I got black caps on my keyboard...
I hear O-rings are nice, would you recommend people to use O-rings? Or at the least give O-rings a try? But I guess to really know what you like you have to try everything
 
2:34 PM
I think Code Review would be a better fit because of the code review nature of the OP. — markspace 27 secs ago
 
@Peilonrayz A tent setup is where you lift up the middle part of the keyboard, tilting the halves of the keyboard to the left and right, creating some kind of tent (although, with the parts separated from each other you'd have to know this beforehand). This helps against pronation of the lower arms.
O-rings can make your keyboard more "squishy" so it depends. They make your keyboard reasonably silent, but they won't dampen the upstroke so their utility is limited. Personally I don't like the hard bottoming out that many mechs have.
So O-rings are fine as long as you don't overdo it.
If you would order the UHK now you could choose silent browns instead.
 
0
Q: Calculate the sum of a series with a given accuracy

Andrij Matviiv#include <iostream> #include <cstring> using namespace std; int main() { system("chcp 1251>nul"); int i = 1; int x; cin >> x; if (abs(x) >= 1) { cout << "The series is divergent"; } else { double eps = 0.000001; double sum = 0; double lastElementOfSequence=1; ...

0
Q: Fastapi with Aiohttp not providing expected results

Charlie ChapI am new to asynchronous programming in python. Below are two scripts(which perform the same operation) one in Fastapi + aiohttp while other is basic Flask + requests library: ## Flask def fetch1(url): x = requests.get(url) # First hit to the url data = x.json() ...

 
The v2 is a much better keyboard than v1, basically the same idea, but with everything removable and backlit PBT key caps. I've worn down the E on the v1 already.
 
@MaartenBodewes Ahh yes, I can see where the name "tent" came from. Thanks. Yeah moving my hands to where I'd expect the outcome to be I can see the benefit.
Oh, I hadn't thought of the upstroke. Hmm I may have to take the plunge and get me some to see which I like. As I'm not sure if I like the hard bottoming out or not. I know I bottom out my keyboard a lot.
I heard about a keyboard with removable switches, but I can't recall if it was the UHK. Removable keys sounds like such a cool idea though. Can you make your own keyboard layout with the UHK? I recently setup VS Code to have key binds for for movement through lines and windows. Now I kinda wanna be able to just have a special layer for movement for everything
 
3:03 PM
0
Q: C++ TcpServer class

BogdasarI have a class Tcp_Server that implements a TCP server. This is the base class for the other types of servers available in my program. For example Tcp_Chat_Server. Packet is a struct that we send/receive. Here's the implementation: packet.hpp #ifndef PACKET #define PACKET #define MAX_NAME_LEN 24 ...

 
@MaartenBodewes O-rings on a keyboard? Are we talking the same kind of rings you put on bolts and washers?
 
@Mast Yeah, something like this: amazon.com/-/en/dp/B01N75JL0F
@Peilonrayz IIUC: yes. While UHK doesn't use QMK, it has "Agent", see ultimatehackingkeyboard.github.io/agent
 
@Zeta To reduce how far you press the button down?
 
@Mast And to soften the sound. If you press a key with full force, the sound of the key bottoming out might be rather loud.
However, if the travel either gets stopped or damped by an o-ring, the overall noise of the keyboard can be reduced.
 
Fair enough. I usually have my WH-1000XM3 on, so I don't hear my keyboard as much.
 
3:17 PM
I don't mind the sound of my own keyboard. However, I've used a Cherry MX 3.0 with blue switches at work, and most co-workers were delighted when I finally changed it for a brown one.
 
@Mast I hear some people with arthritis, and such, use O-rings to dampen the "blow". If you're bottoming out you're effectively punching the keyboard which can be bad for joints. Where an O-ring acts like a seatbelt
 
This kind of questions are off topic on SO. Maybe try on another StackExchange site (ex: review). — Syscall 59 secs ago
 
@Zeta Oh nice, thanks!
 
@Zeta The colour changed the tone?
confused
 
@Mast Cherry MX Blue switches have a clicky sound. Cherry MX Brown switches only have a tactile feeling.
I'm currently pondering whether I should get a Erdodox or Ergodox Redox (prebuilt). The design seems nice, I'm used to brown switches, and the QMK firmware seems tinkerable. The Plank on the other hand seems too small (and isn't a split design).
 
3:29 PM
0
Q: Is this community the right place for sharing custom library implementations?

Çağlayan DÖKMEI just implemented one of the C++ STL's containers and looking for some code review. My code has, naturally, more than 1300+ lines. I'm not sure if it is the right place to share my library for a good review. The code, hopefully, doesn't contain any bugs. I just need somebody to say that it is we...

 
3:39 PM
@Mast The switches have specific color stems that indicate the type. Normally you won't of course see the stem as the key cap is on them. Almost all mech keyboards have replaceable key caps (if you can find the right type, anyway).
 
I recently acquired a Dell KB522 and thought that was pretty neat already.
 
The most common ones are Blues, Browns and Reds. Blue = Clicky, Brown = tactile / non-clicky and Red (light linear types mainly for gaming). And then there are now a lot of variations.
@Mast Well, I've typed most of my live on "rubber domes" as we call them. You've got some decent ones, I think the Dell's are OK, but nothing out of the way special.
I definitely prefer an ergonomic rubber dome over a normal mechanical keyboard.
It's also some 330 euro's cheaper than the UHK... you can do nice things with that amount of money.
 
I know the difference between membrane and rubber, but mechanicals are a third category?
 
Mechanicals typically use separate key switches for each key. They generally have a lot of travel, but the main difference is that they actuate before bottoming out. And because they use metal springs instead of rubber domes they are much less mushy.
A well balanced switch of course actuates directly after the click or tactile bump.
 
Ok
 
3:50 PM
They are much more expensive to build than rubber domes though, so they almost died when PC's got cheaper. Having a 300 dollar keyboard makes sense for a 3000 dollar PC, now PC's are much cheaper and are all directly competing, you want a cheap keyboard by default.
Basically on Cherry was left standing, so most switches are now Cherry clones.
They have resurfaced now that there is a keyboard community and because people now spend more on actual ergonomics - finally.
 
0
Q: Find - Get - Process - Replace

ShabanI'll show you sample code and explain what I want to do. Actually I did it. But I'm sure there will be a better way. What I want is a way that can use less resources and has a higher performance. // langRender is a method of translate class. And it gets HTML page contents. public function langRen...

 
@MaartenBodewes Heh, my keyboard at home is of higher quality than the ones I've had at my jobs. So I'm not sure about that.
 
@Mast You also have scissor switches in laptops, buckle springs in old mainframe keyboards, lasers (which is still emerging AFAIK) but seem futuristic, and some others. Mechanicals are the main enthusiast one. en.wikipedia.org/wiki/Keyboard_technology
@MaartenBodewes "Mechanicals typically use separate key switches for each key." Are you talking about diodes, to get n-key roll over?
 
4:19 PM
0
Q: var carTest = new Car(20); carTest.getSpeed() be 0 carTest.accelerate(); carTest.getSpeed() be 20 carTest.decelerate(); carTest.getSpeed() be 0

Joe Canningvar Car = function (acceleration) { var speed = 0; this.getSpeed = function () { enter code here } this.accelerate = function () { // Implement your code below } this.decelerate = function () { // Implement your code below } } var honda = new Car(10...

 
@CaptainObvious var isQuestion = noIdea; var isReviewRequest = noIdea; // enter Close Vote here
 
4:45 PM
0
Q: ATM java code how can I make that code more "effective\readable"

stuss07I am new here and also new in development ! I am trying to improve my java skill so I wrote a simple ATM code, I would like if someone can review it and help me get that code more effective ! I hope my question meets the requirments . the code - Main: public static void main(String[] args) { ...

 
Ok , just for you I added some more code. But it is not a code review forum . All this code out of the scope of the question. There much more improvement that can be done. But I have to answer the question only. All another stuff is just a waste of time. — Sergey 45 secs ago
 
@CaptainObvious @Zeta UWYA
 
possible answer invalidation by Zujis Karolis on question by Zujis Karolis: codereview.stackexchange.com/posts/256803/revisions
 
@Duga I commented on the answer
 
I rolled back the edit.
Now further.
If comments are invalidated, that's nobody's problem.
 
4:53 PM
If the code works as intended, it might be better suited for codereview.stackexchange.com. — Turing85 16 secs ago
 
@Duga @Peilonrayz Apparently OP disagrees with the rollback.
 
@Peilonrayz Do you want to take a shot or do we go straight to the mod flag for edit-war?
 
@Mast Give me like 5 minutes to decide, the answerer may respond to my comment
 
Sure.
 
5:12 PM
@Mast I think the answerer is fine with the AI. I'm personally fine with AI if the answerer is. So I'll not be taking a shot / flagging. But please feel free to flag
 
@Peilonrayz Considering the verdict hasn't changed and the code should still be thrown out, it doesn't really matter much either way, does it?
 
Unfortunately I don't know PHP so I'm not 100%. But yeah that sounds right
 
M nking
 
6:08 PM
@Peilonrayz Scissor switches have domes underneath. All the other ones are mechanicals. You've got optical switches and even analogue opticals (my Wooting One has those). No, mechanical keyboards do not all have N-key rollover or anti-ghosting.
 
possible answer invalidation by Linny on question by Teodor Dyakov: codereview.stackexchange.com/posts/256483/revisions
 
@MaartenBodewes I'm not sure I'd call a laser keyboard mechanical - the keyboard is just light.
 
6:29 PM
This question is probably better for codereview.stackexchange.com — Russ J 55 secs ago
Its unlikely the compiler updated itself, but it's possible something got corrupted. Competitive programming is a joke, and does not teach C++. All it does is teach you horrible habits that would fail even the most cursory of code reviews at a company. — ChrisMM 36 secs ago
 
@Peilonrayz Thomas (chyrosran22) has a fun "review" of that keyboard on youtube.
 
@MaartenBodewes Didn't know one had been released yet, what's the keyboard called?
 
6:47 PM
There has been one made ages ago, that one just has a number, and for a good reason because their number is up :P It didn't make any dent in the keyboard space, that's for sure.
 
If a keyboard is too light, I'd need to have it weighted.
Bloody thing should stay where it's supposed to be.
 
Ah I just found the video, looked through all the uploads twice... I guess third time is the charm
@Mast lol
 
0
Q: Batch Insert Figures Into Powerpoint Slides with VBA

JimmyHuI have a series of images ("1.bmp", "2.bmp", "3.bmp",... ,"30.bmp" in "F:\Images" folder) and I am trying to insert these images one by one into Microsoft PowerPoint with VBA program. The base slide (as template) has been set down in page 2. The image object which is named Image1 in that template...

0
Q: Method which is creating a conversation and adding a new member based on some conditions to DB avoinding duplicates

JakubIn a Node app where there is a messaging service, I've added a method to add a conversation and a member. The method functionality is that when a new request hit an API for messaging, that calls a method called JoinConversation. In the request there are some inputs from a client and based on thos...

 
@Mast With a solid 1 mm metal backplate the UHK is relatively stable and a good weapon of choice.
 
Good, I like my tools to be multi-purpose.
 
6:56 PM
And the Wooting One as as much flex as an H-beam :)
 
Maybe I'm the weird one here, but I've never tried to flex my keyboards.
There's a first thing for everything.
Apparently there's a bit of flex to my Dell.
 
Yeah, sometimes I wonder a bit about that too, but the mechs are generally build to last. Generally we don't like flex when typing on it, so they come with steel or alu back plates. Problem with those: when they're bent they stay bent.
 
It will still break your nose, but not as good as a steel plate.
 
Took that photo when the E was still there.
 
That doesn't have enough keys for me.
I type a lot of numbers and my muscle-memory knows the numpad.
 
7:06 PM
@MaartenBodewes Sounds like a microwave... Yeah, I'm surprised anyone would release something that bad.
 
7:22 PM
I think something similar was released almost 25 years ago, this is probably the cheap chinese knockoff after the initial one failed.
 
The video talked about a patent for one around 25 or so years ago. Yeah I think some serious AI is needed for the keyboard to function properly. Both on key recognition and autocorrect.
 
8:14 PM
0
Q: Password reset functionality in Codeigniter 3

Razvan ZamfirI am working on an online newspaper/blogging application with CodeIgniter 3.1.8 and Twig. (I use the Twig template engine only for the front-end views). The application, of course, has a registration and login system, which includes the password reset functionality. The Passwordreset controller: ...

 
Too many PSUs still have coil whine.
 
I recommend that you post your calc function to codereview.stackexchange.com; make sure you check their posting standards. — Prune 50 secs ago
 
 
1 hour later…
9:28 PM
I see that you use int 15h Ah=86h in DOSBox. In the past I have had nothing but troubles with it. Read about that here. Just maybe your problem is related? — Sep Roland 55 secs ago
 
0
Q: Function "retorno" inside nested loops takes too long. Is it possible to reduce the execution's time?

Remo Everyone this is my code based on AlgoVibes youtube Channel. it takes about 15 minutes to compute. i think it's because it runs approximately 102.000 times on my dataset 159 rows × 135 columns there is any chance to reduce this time? I'm asking for tips thanks. # -*- coding: utf-8 -*- """AlgoVibe...

 
 
1 hour later…
10:47 PM
0
Q: Console TicTacToe in C

Steffan Clent Davieswould you be so kind as to review my TicTacToe implementation I wrote in C? I wrote this blind (not looking up other implementations). Any input and/or suggestions would be appreciated. You can find it on Github here. I have used fflush(stdin); to clear input buffer between prompts (it was sugges...

0
Q: (Haskell) Two player random number guessing game

cgoatesI've created a two-player number guessing game in Haskell. My main objective was to practice dealing with "state" in a purely functional language (such as player scores, whose turn it is, etc.) Here are the rules: Gameplay: Two players will take turns guessing a random number between 1 and 10. An...

 
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. — John Conde 54 secs ago
Didn't we ALREADY tell you to post on Code Review? Oh, yeah, I did on your last deleted question. — mickmackusa 53 secs ago
 

« first day (2864 days earlier)      last day (1136 days later) »