« first day (2610 days earlier)      last day (1705 days later) » 

00:00
RELOAD! There are 6790 unanswered questions (89.8669% answered)
00:29
If this code works, it's off-topic here. For code review, try our sister site Code Review. — Chris just now
-1
Q: How to access std::queue between three threads using std::promise and std::future?

Naveen KumarCreate a multi-threaded program to calculate sum of odd and even numbers in C++ 14. Upon completion print the value of odd and even sum and count of numbers processed by each of the odd and even processor thread. ... #include <iostream> #include <queue> #include <thread> #include <memory> #incl...

0
Q: get Exposed data of var_dump function and parse this highlight for human legible

Walter NuñezI have this class that exposes var_dump data in order to get better human readable layout. I have done it with a lot of preg_replace and a series of regular expressions that run one after another on the result of the var_dump to have a more readable and highlighted output. I would like them to re...

It seems to be more appropriate for codereview.stackexchange.com. — Guru Stron 13 secs ago
01:12
are you hosting someone elses html? if so code reviews might be the best way. — Daniel A. White 26 secs ago
0
Q: Use PHP to encode into JSON

cheeseexpertCan someone help me encode this PHP: private static function buildRequestBody() { return array( 'intent' => 'AUTHORIZE', 'purchase_units' => array( 0 => array( 'amount' => array( 'currency_code' => 'USD', ...

01:30
This might be more suitable for Code Review, as it's asking for peer review for improvement of working code. That's the reason the site was created. — Ken White 41 secs ago
01:42
If your code works, but your issue is about performance, then your question belongs in Code Review instead — braX 43 secs ago
0
Q: Is there a better way to organize this hairy collision code?

dylanI have a lot of nested for loops is there a better way to organize this code? require "..libs.vector" require "..libs.utility" require "player" require "enemy" players = {} joysticks = love.joystick.getJoysticks() enemies = {} function love.load( ... ) love.window.setFullscreen(true) w...

0
Q: Optimizing malloc and free

Lev KnoblockI'm looking for help speeding up some code I'm tinkering with. #ifndef LALLOC_H #define LALLOC_H #define PAGESIZE (1048576) #include <stdbool.h> #include <stdlib.h> #include <sys/mman.h> #include <errno.h> typedef struct bblk bblock; typedef bblock* bb; struct bblk { size_t ind; bb n...

0
Q: C# Reflection-based CSV Parser

Richard RobinsonI've been trying to make a C# version of my Java CSV Parser using C# specific idioms. Here is the full code: using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; namespace CSV { /// <inheritdoc /> public se...

02:34
@pacmaninbw I don’t often hear that song except when I listen to a Halloween playlist but I happened to be driving this afternoon and flipped to the local classic rock station, which I don’t typically listen to - coincidentally I heard it on there...
@SᴀᴍOnᴇᴌᴀ I finally got it out of my head, and you gave me the ear worm again. :)
03:07
@pacmaninbw sorry - at least I didn’t suggest a song by Rick Ashley or Rebecca Black...
03:18
I'm not sure Ken. There are plenty of other questions relating to benchmarks. As it turns out, it was a compiler option and not the code. I'll have a look at Code Review for future reference. — Brian Oh 20 secs ago
1
Q: Set default value for remaining size of list by use of Java 8 and Stream

user3789184I have written a method which will return the size 16 List every time. If the input List has size less than 16, the remaining list object will be filled with default values.  Is there any way to remove the if and for condition from the enrichCardAddress method? Please try to ignore the class name...

03:38
@SᴀᴍOnᴇᴌᴀ And I'm sorry, but I don't know who Rick Ashley or Rebecca Black are.
If they are 90's or later than I probably haven't heard of them.
04:29
0
Q: broadcasting error in numpy arrays while implementing gradient descent algorithm

Yogesh PandeyI am trying to implement Multivariate Linear Regression (without using sklearn). While working with numpy arrays, I oftenly get one or more broadcasting error, as in the following code : import numpy as np import pandas as pd import matplotlib.pyplot as plt data = pd.read_excel("PsychologyExamMa...

Monking
04:39
@DerKommissar Starting to look like an API
04:57
Ben Popper on June 26, 2020
Never doubt the dialog when two dads go head to head.
 
2 hours later…
06:32
This question is probably more suited to the Code Review Stack ExchangeDarkWiiPlayer 56 secs ago
How is this question related to java-8 or java-stream? If its up for review, codereview.stackexchange.com might be a better place to post it, — Naman 46 secs ago
 
2 hours later…
08:24
0
Q: Query related to combing static factory and singleton pattern

Ardent Java LearnerI have a class which I created which contains static factory methods for retrieving and filtering DB entities.. but could you give me some tips on how this can be converted to a singleton class .. so It returns an existing instance for a particular PensionHandlerParty / ListOfPaymentPlans OR crea...

08:48
0
Q: product inventory database with attributes and variants

SerenityI have design a model for product apps. This is the first time I am trying to create a product's database schema and then model it into django. The use case of what i am trying is 1) A product type(clothings, accessories, bags) can have multiple products (e.g clothing product type can have multip...

If your script works, your question may be more suitable for codereview.stackexchange.com . — 0 0 33 secs ago
09:05
If you are looking for a code review, there is codereview.stackexchange.com. — DevSolar 17 secs ago
0
Q: Boost.Spirit transform expression to AST

Vladyslav MozhvyloWhat is the right way to transform some expression to AST using Boost.Spirit? I tried to build it, but I think its messy and can be simplified a lot. https://godbolt.org/z/VXHXLY Full code: #include <boost/spirit/include/qi.hpp> #include <boost/spirit/include/phoenix.hpp> namespace ast { struc...

09:35
0
Q: The script works very poorly and very slowly

BashenI am not good at programming, but I heard that the if function is in Python. In terms of performance, the script works very poorly and very slowly. I found a script in GitHub that generates points in an elliptic curve Secp256k1 and this script is very slow. Please tell me what needs to be changed...

0
Q: React using local WebP images

Sebastian GrazI've been doing some research around how to best make use of the WebP images (with fallback) in React. But most solutions points to something similar like I wrote up below. That means if I have a lot of images I have to export the same image twice in assets.js (png and webp), and importing twice ...

0
Q: React custom hooks using refs as index counters

HenrikSNMy custom hook useTyper.js ended up a bit of a mess to read. It's mimicking a nested for-loop but using "React.useRef"s to hold on to index values between renders. With index values I mean current positions of the outer and inner loop (those often named i and j in a classic nested for loop). Here...

@CaptainObvious AoC
10:02
Might be more suitable for codereview.stackexchange.comStefan 57 secs ago
This, unfortunately, is not a question that fits StackOverflow very well (which is probably why it was down-voted). It is an important question though. Try posting it to some other forum - maybe Code Review or Quora? — Branko Dimitrijevic 11 secs ago
@BrankoDimitrijevic How could this be on-topic for Code Review? The OP has no code to review. — underscore_d 29 secs ago
@GuruStron The question as is would be off-topic on Code Review as it's missing context. It's clearly stub code. — Peilonrayz 26 secs ago
@BrankoDimitrijevic It may be hard to see but this is not on-topic on Code Review. "I am trying to read source code in C ... and I am asking myself where to start reading the code to understand how the files work together" shows that it is clearly not the OPs code, and it's asking for help reading code not for a code review. There is no chance of this staying open if it's posted on Code Review. — Peilonrayz 14 secs ago
10:41
This is a question for codereviewCid 45 secs ago
1
Q: Finding the lowest perfect square that can be added to a number to make another perfect square

Martin The code below returns the smallest perfect square that can be added to a number n to result in a perfect square. It works perfectly fine but I need it to run faster. def solve n (1..n).each do |i| i = i**2 + n return i -= n if (Math.sqrt(i) % 1).zero? end -1 end p solve(13) #36 #...

0
Q: 2 Issues with chess piece in Java

user226793I have an issue : I can't select a black piece The source (Because it will take me too long for copy paste all the code here ) The main class : package com.chess; import com.chess.engine.board.Board; import com.chess.gui.Table; public class JChess { public static void main(String[] args) { ...

11:06
This question is likely more on-topic at codereview.stackexchange.comHolger Just 33 secs ago
11:35
0
Q: Chain operations on raster data

diegusI am developing a workflow to perform a variety of operations on raster dataset using rasterio. My previous workflow involved lots of I/O when performing such operations on raster files. I would like to change the workflow so to process raster data in-memory. I am using rasterio.MemoryFile() clas...

@Mast That's all the stuff provided by the API I'm using
11:59
0
Q: My C# command file seems to be incorrect, am I using the repository correctly?

TruthSeeker2000I am using C# to create functions that connect my api to a web repository. I want the user to input information 'payment reference' and 'payment amount limit' and that info gets sent to the api. I have added properties to the controller, repository and command. It throws no errors at the moment, ...

0
Q: Longest Duplicate Substring with rsut

lighterI'm rust newbie, I tried to finish this problem. But I can't find the problem reason. I need your help thank. use std::collections::HashMap; fn main() { let input: String = String::from("abcabc"); let result = Solution::longest_dup_substring(input); println!("ans: {}", result); } s...

12:35
@Naman The poster is asking for a feature request, how to make this into a singleton pattern on code review which makes the question off-topic. When you refer someone to Code Review please point them at the help center. I point them to the stackoverflow help center when I recommend they post their questions here. — pacmaninbw 9 secs ago
@Duga @pacmaninbw IIRC Meta says that's fine.
@Peilonrayz Can you explain in more depth?
12:51
@DerKommissar round(number, 1).
@Zeta Haha I googled it and got that lol
Usually I ask here if anyone is around, then I just Google it and try and figure it out lol
@CaptainObvious Broken code, 2 more VTC
@pacmaninbw I'm not sure what to explain. IIRC we have a Meta that says "how to make this into a singleton pattern" is fine
13:10
0
Q: An attempt at a toy Vm

SomeDudeI usually use c++ so it may not be best practice for c. This is a stack based toy vm and as a result it is very primitive, and it has no bitwise instructions 64k might be a bit overkill for a toy vm. coding is hard #include <stdio.h> #include "vm.h" int main() { Vm *vm = new_vm(); i32 bu...

0
Q: SQL database implementation - statement execution

George BarwoodThis is another class from my implementation of SQL in C#. It handles the execution of SQL statements, with the core method looking like this: void ExecuteStatements( ResultSet rs ) // Statement execution loop. { ResultSet = rs; NextStatement = 0; while ( NextStatement < Statement...

0
Q: Reset password implementation using JWT for easier code invalidation/expiration?

Gjergj KadriuThis is the first time I had to implement forget password meant for real-use so I had to cover code expiration. Validations are done by validateRequest middleware and yup schema as an argument ( Code for sending email is not shown here to show only what's necessary ) app.post("/users/send_verific...

13:28
@Peilonrayz Yes, and that's crap but we never contested it.
13:40
@Mast @Peilonrayz The commentator on SO agreed that pointing the users to the help section was a good idea, maybe we can finally get the message across. I know @SᴀᴍOnᴇᴌᴀ is working on that.
@Mast Sorry I'm being a bit slow atm. Is the subject of the sentence the comment or "a Meta"?
@pacmaninbw I've not had to post many comments on SO because most of the recommendations are getting much better
13:58
-1
Q: How to use 'while' loop and list slicing effectively in this algorithm of Guess The Number Game where lies allowed?

Rishabh SemwalI am making an Algorithm, which can solve the guess the number game with high, low hints where wrong hints are allowed but not in two consecutive guesses (for the game you can see my first posted question in this site, just click on my profile). As I have solved the problem on paper but I have so...

I’m voting to close this question because it belongs on another site in the Stack Exchange network. Please try Code ReviewnilsK 31 secs ago
@nilsK This is at best a best practice in general question, and at worst missing context for a review. This is not on-topic on Code Review. — Peilonrayz just now
14:19
@HninWaiMarSoe Although you say that the corrected program doesn't work as intended, I think that Dan K has answered your question (use of appending instead of into). I suggest that you vote and mark Dan K answer as Accepted if it answers the actual question. For the rest, it's worth a new question or if you want some general help about your code, I suggest that you go to sites like SCN or Code Review. — Sandra Rossi 30 secs ago
@Duga Looks okish
This type of "Here is working code, how can I make it better" question is really a matter of opinion and so unsuited to SO. You might try codereview.stackexchange.com (but do read their question asking guidance first) — Quentin 50 secs ago
0
Q: Iter 2: Reusable, robust c++ std::hash<mpz_class> for GMP's big integer type

Daniel S.This is the 2nd iteration of a code review. The 1st iteration (completed) is at Iter 1: Reusable, robust c++ std::hash<mpz_class> for GMP's big integer type 1. Goal My intention is to provide a fast hashing algorithm to hash GMP's big integer type mpz_class and mpz_t so I can use these types as k...

Ryan Donovan on June 26, 2020
June 2020 Welcome to ISSUE #27 of the Overflow! This newsletter is by developers, for developers, written and curated by the Stack Overflow team and Cassidy Williams at Netlify. Hot town, summer in the city. TypeScript past and future, shopping for sweaters for absolute zero, and the security implications of copy and paste. From the…
14:38
@muescha You would change the line: value = data[key], to use recursion and search your entire data object and nested objects until you found the property. Examples: codereview.stackexchange.com/questions/73714/…, and mikedoesweb.com/2016/es6-depth-first-object-tree-searchGen1-1 23 secs ago
15:00
One of the things I don't like about the new interface is the explanations for up votes for questions and answers. I never thought of the questions or answers as useful on code review, that would increase the importance of duplicates.
IIRC we get to pick our friends but not our vote hover reasons.
:)
How did Phrancis become #4 for the week?
Probably folks upvoting older posts.
0
Q: Make django, weasyprint code object oriented

Vishesh ManglaUse django engine to fill in a .html file on storage (no template) and use weasyPrint to convert it to PDF I followed the instructions and refactored my code but recently the client said to me that on the "Website form" there are three IDS and 3 different PDF's are to be returned based on which I...

Monking
15:12
Monking
Monking
15:37
Monking
It Depends™. Is there a more concrete case you can ask about? (That concrete case might also be more suited to Code Review.) — Ry- ♦ 26 secs ago
possible answer invalidation by Linny on question by SomeDude: codereview.stackexchange.com/posts/244566/revisions
16:03
"i solved the task..." + "Maybe someone has a better solution?" = Not how SO works. This might be suitable for codereview.stackexchange.comAndreas 23 secs ago
16:14
@Duga that's okay - code fence moved to not be in code block
@pacmaninbw I left the message on my iPad last night and it autocorrected "Astley" to "Ashley" .... and Rebecca black has been mentioned a few times in this room .e.g.
@SᴀᴍOnᴇᴌᴀ I thought everyone knew of "Friday"
apparently not...
I was just about to link this 2nd meme answer:
14
A: What's a Zombie? And what are the many other memes of Code Review?

PhrancisMeme: Friday Originators: rolfl, SimonAndréForsberg & Jamal Cultural Height: The 2nd Monitor Background: On Jan 10 2014, the following remark was made in the chat room: Simon André Forsberg: It's Friday, Friday. Gotta write code on Friday. singing And then this happened: Since then, ...

Simon did used to spam it. It's quite apt that it's Friday today too ;)
16:27
@SᴀᴍOnᴇᴌᴀ interesting... I see "6 revs, 4 users 83% \ Phrancis' DROP TABLE Users--" .... yet Phrancis's name on the profile doesn't appear to have changed...
It's because CWs don't update the name. So Phrancis username was Phrancis' DROP TABLE Users-- at the time of posting
Kinda strange IMO but meh
My initial thought was that somebody changed that recently after he passed...
@Peilonrayz That we decided it's on-topic.
I mean, requests for a rewrite are specific questions, not requests for review.
16:37
@SᴀᴍOnᴇᴌᴀ Well now I know about Rebecca Black and Friday.
TTQW. See you in ~2h again.
@SᴀᴍOnᴇᴌᴀ I had high hopes that joke would've been dead by now.
@SᴀᴍOnᴇᴌᴀ He'd used that name for a while.
@Mast I'm not a fan of the rule. From the sounds of it, it seems like most here aren't. I think we can change it if you want to take it to meta. The only problem I see is making our already messy rules even more messy. I'd be all for a clean simple solution :)
16:50
Question: can everyone ask clarification on a specifi topic? I mean codereview.stackexchange.com/a/244577/179851 is not a correct answer, but can I say that he should comment if he wants clarification, or isn't that possible without reputation?
@tieskedh IIRC you need 50 reputation to comment. But that's neither a comment nor an answer.
You really shouldn't use your own salts on password hashes and you really should use PHP's built-in functions to handle password security. Make sure you don't escape passwords or use any other cleansing mechanism on them before hashing. Doing so changes the password and causes unnecessary additional coding. — Jay Blanchard 43 secs ago
I'll wait to see if they respond that whether they think it is an answer before VTD etc
it almost sounds like this could be "an insightful observation about the code":
> Current script will fail because picture is saved on the server and the html.src will end up with error: Can't reach this page?
I agree - that's why I've decided to wait
17:00
@SᴀᴍOnᴇᴌᴀ @Peilonrayz, thx! I might indeed be incorrect...
thanks for being cautious and asking!
^ 100% agree with Sam. Thanks for posting this here :D
Hmm, nope, I wasn't cautious.
I was only asking if I could tell him he should comment...
I understand it, as you could get a lot of spam otherwise, but if a beginner needs some clarification before he could answer, what is the way he should do it?
So, what is the advice I could give him if it wasn't an answer
17:09
0
Q: convert call to preg_replace_callback to preg_replace_callback_array with dynamic return

Walter NuñezI have calls to the preg_replace_callback function in a class file. like this: $var_dump = preg_replace_callback( '/(\s*=>\s*)(NULL)/', function ($m) { return $m[1] . $this->GetType($m[2]) . ": {$m[2]},"; }, $var_dump ); this repeatedly (6), but which ...

@tieskedh If it was a genuine comment but the user didn't have rep I'd flag for moderator intervention to convert the 'answer' to a comment. I might comment along the lines of "I have flagged your answer to be a comment since you don't have the reputation to comment."
@Peilonrayz, thx again!
he removed his post...
310
Q: Why do I need 50 reputation to comment? What can I do instead?

PekkaUsers with less than 50 reputation points cannot write comments on questions and answers that they don't own. Why does this limit exist? But I want to contribute now. What should I do instead? But I can't write a good answer without more information! Shouldn't I be allowed to post comments if I ...

17:14
@tieskedh It wasn't him, it was handled by the site
Ah, OK. I hope we were correct, then...
And thx for the meta!
17:40
If this works, and you just want to improve it, it's probably a better question for CodeReviewGrumpyCrouton 6 secs ago
I'm not trying to improve it. I just need it in recursive form. should i then still go to code review? @GrumpyCrouton — Samatar Mohamed 35 secs ago
17:57
0
Q: A Firebase Uploader CLI

Shaun StoneI built this code as part of a test project that was given to me by a company. They had given me a .csv file that contained over 9000 records and wanted me to build a program that would upload it to Firebase. Firebase has limits on how much data can be uploaded at one time, so uploading a large ....

-1
Q: Recursively displaying json data on website

Samatar MohamedI am displaying the data from a json file onto a website, with recursive and iterative tables side by side. i have the iterative code working, but I have no idea on how to make it recursive. Here is the code: $dataArray = json_decode($data, true); if(is_array($dataArray)){ //first...

@Peilonrayz ~whistles
18:20
-1
Q: User Input Positive Integer Error Message Not Displaying

ktsdef number(chips) loop = True while loop: bet = input('Make a bet: ') try: val = int(bet) if val <= credits: print(val) break if val < 0: ...

19:08
0
Q: C - Division from scratch

XilpexI wrote this code where division can be done without using C's builtin operator: #include <stdio.h> #include <math.h> int idiv(int a, int b) { return a * (pow(b, -1)); } int main(void) { /* 15/3 is 5 */ printf("%d\n", idiv(15, 3)); return 0; } Is there anything I could do to m...

19:29
@Peilonrayz Agreed.
I'll think about it. Do some research.
0
Q: Small Automatic Differentiation Library

malphax Introduction As a programming exercise I recently wrote this automatic differentiation library based on forward accumulation. It should offer a simple way to create mathematical functions whose directional derivatives can be computed. For example: #include <iostream> #include "autodiff.h" int ...

@Mast Nice. I wish you the best of luck, I can't imagine it'll be easy :)
19:47
This question is probably better suited for codereview.stackexchange.comd4nyll 16 secs ago
If you have working code you want to improve, then you probably have a good question for CodeReview. You will probably find more people willing to do an in-depth code review of your code there. — Unatiel 1 min ago
0
Q: LeetCode 753: Cracking the Safe

EmmaI'm posting my code for a LeetCode problem copied here. If you have time and would like to review, please do so. Thank you! Problem There is a box protected by a password. The password is a sequence of n digits where each digit can be one of the first k digits 0, 1, ..., k-1. While entering a ...

20:04
0
Q: moderators useless, downvoting abuse on new users

Walter NuñezFor any reason moderator are declining flags from me i have send it 2 time. about donwvoting my question, and donwvoting user not give any type o feedback/comment/edit. https://codereview.stackexchange.com/users/flag-summary/204507?showDeclined=true I have proof that they are doing a bad job: Cl...

20:40
@Feeds I smell trouble.
I agree with one of the core points. But boy they should have waited until they were calm before writing it up and posting...
@Peilonrayz Which of the core points do you agree with?
Downvoting without there being a comment is unconstructive.
on that particular question I do understand the sentiment, though...
that question is ... a mess
@Peilonrayz Very true and it happens too often, when I see a down vote or a VTC and there is no comment I generally leave a comment explaining to the user.
20:53
@Vogel612 is 8 days without any updates from the CM team grounds for a poke?
It seems that the implementation for that needs a dev.
the pipeline for CM and Dev stuff is ... long
yea, I don't think I can quite put into words how long it is..
'cuz every single CM does like 15 different things at the same time and there's only a handful of them
20:55
Ok, I'm not engaging with that user at all. I'm don't want to be unjustly labled a racist. And I can't see their comment doing anything but that.
reload the page...
^^
must...resist...urge...to...flag...post...as...abusive...
Did anyone view his profile, he has a Peer Pressure Badge dating back to December, no answers and 2 questions in the last 2 days. The one he flagged included at least one feature request.
The VTC on the question is code not written.
@Vogel612 Thanks
@Peilonrayz TBF I deleted that comment before writing my first response...
I wonder how glorfindel came to answer that quickly though...
maybe the question was asked on MSE and then basically insta-closed?
21:02
Makes sense. But I don't have the will to fight against those tactics.
@Vogel612 how many moderators were there a year ago, I know Simon and the money stepped down.
Also 200_success
uhhh... I honestly don't know off the top of my head
Money?
you could try reconstructing from the election overview
Monkey stepped down around the Monica controversy, Mat got reinstated during that time.
I'd need to check for when Simon stepped down
@Peilonrayz Monkey
I know we only have 4 now.
And I don't know how active they are.
it is true, I must blindly believe in what you say because this is not a democracy; you are the all powerful moderator who says and decides what you can and cannot do based on the privileges you have; I think this would not be management if it is a paid service, in conclusion: either the moderators lack more options or the negative feedback tool says a lot and at the same time says nothing ... — Walter Nuñez 2 mins ago
I ... uh. what? I don't.... huh?
2
@pacmaninbw Site activity has also decreased. When writing a SEDE query the other day I noticed we had, IIRC, half the amount of Q&A then the year before 2017/2018. Maybe a bit over half.
That's meant to be 2018/2019...
@Peilonrayz What is the trend across SE?
21:16
I didn't look. I'd assume SO is up up up.
@Vogel612 wow. He wants you to behave as an autocrat in his defense and since you won't (can't) he claims that this is not a democratic process (of people's private votes being counted without interrogation.)
I can imagine SE and HNQ sites (workplace, academia, ...) are going up up up too
> I am not the one to say that the "moderators are useless"
Hmm
Yes, I saw that, he edited the title of his question.
Yeah, IDK this just is starting to seem like bait now.
It's been bait from the beginning.
21:33
This probably belongs on the Code Review exchange. — Christian Gibbons 56 secs ago
It sounds like you might already be checking out CR... See "Which Site?" and "Code Review or not?"Sᴀᴍ Onᴇᴌᴀ 45 secs ago
@Vogel612 @SᴀᴍOnᴇᴌᴀ @Peilonrayz I wish I could add an answer "Just grow up and stop being a spoiled child."
@pacmaninbw If it's bait don't get baited.
I said I wish I could, didn't say I would.
21:46
@RMunroe Thanks, I needed that.
I think this question belongs to codereview.stackexchange.com. — TeWu 1 min ago
This question probably belongs to [codereview.stackexchange.com]. — MC Emperor 39 secs ago
1
Q: Passing Objects and Proper Program Architecture - Python

Tim51I am creating a python script that executes a series of tests that writes and reads information to and from a CAN bus network. I'm using python-can and cantools packages. I've managed to transmit and receive data with small functions individually without issue. The problem I am having is creating...

22:43
0
Q: 3D Direct Convolution Implementation in C

lxiangyun93For my project, I've written a naive C implementation of direct 3D convolution with periodic padding on the input. Unfortunately, since I'm new to C, the performance isn't so good... here's the code: int mod(int a, int b) { // calculate mod to get the correct index with periodic padding i...

23:09
1. I suggest to not use Calendar and to switch to modern classes like ZonedDateTime from java.time. 2. Is the given code working? I don't see problems after scrolling through it. 3. The question may fit better in Code Review if your solution works and you just want some tipps to improve on. — akuzminykh 33 secs ago
23:54
1
Q: Webscraping application that collects metal prices and converts them from USD to MXN real-time using BeautifulSoup

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*"


« first day (2610 days earlier)      last day (1705 days later) »