« first day (2539 days earlier)      last day (1775 days later) » 

00:00
RELOAD! There are 6506 unanswered questions (90.0926% answered)
 
2 hours later…
02:00
There is only one JSON object. Your data is formatted as JSON, it's parsed essentially as an object literal. This seems more like a code review question, do you have a specific issue you want help with? — RobG 45 secs ago
02:12
Hey chat bot, tell the people at codereview that we got a candidate here. Somebody check out if it is up to the right level, cause I have trouble reading the code. — Maarten Bodewes 33 secs ago
Yep, that worked.
02:32
0
Q: Mail Crypt Library for encrypted email [REVISION]

Joe SmithThis is a revised copy of the Mail Crypt library based on the recommendations from the last post, as well as reviewing recommendations from the first post that I misunderstood. [Last post] Mail Crypt Library for encrypted email [First Post] Mail Crypt CLI encrypted email wrapper for Gmail Chan...

03:17
0
Q: FizzBuzz encapsulation In Ruby (identifying and separating concerns)

Sean GregoryI'm working on an article about encapsulation in OOP, and I'm using the FizzBuzz problem to demonstrate what I think is so great about it. I'm hoping to share this with developers that might also be intermediate, as a way to start building a bridge for understanding common OO principles. To this...

03:45
@MaartenBodewes FWIW question isn't a good fit in current form because the OP doesn't sound confident that it works.
The code itself doesn't seem to be an issue, but because the OP doesn't know if it's "true" (which, based on context I think they meant "works") it isn't a particularly good fit here.
 
1 hour later…
05:06
go to code review website for these types of problems — classicdude7 18 secs ago
05:42
 
1 hour later…
06:50
possible answer invalidation by Mantykora 7 on question by Mantykora 7: codereview.stackexchange.com/posts/240560/revisions
07:29
There is a special "code review" stack exchange site for questions like this, but I'm not convinced that "please evaluate my entire program" would be in scope there. — Tomalak 48 secs ago
07:50
0
Q: Parametrize pytest test suite to work for mutiple classes

dudenr33Context: I am working on a package which lets users access credentials (stored with a defined structure) from a database. The "database" can be a real KeePass database or other text based formats like json. The logic for reading from the database is encapsulated in Provider classes, one for each ...

08:13
Legal or not, that code would fail a code review. — john just now
possible answer invalidation by greybeard on question by ASAD: codereview.stackexchange.com/posts/240570/revisions
08:32
how can i shared to code review website — seerwan 41 secs ago
09:20
0
Q: Determine if a String has a mirroring head and tail

AnirudhProblem statement: Given a string, look for a mirror image (backwards) string at both the beginning and end of the given string. In other words, zero or more characters at the very begining of the given string, and at the very end of the string in reverse order (possibly overlapping). For exampl...

09:42
0
Q: Convert LaTeX document to HTML

ErichFor a web application, I have to transform a LaTeX document on the fly into an HTML string, that is delivered to connected clients via websockets. Thus I installed a filewatcher that waits for file updates and whenever the file is modified, I run transformToHTML to parse the LaTeX code with regul...

codereview.stackexchange.com might be better suited for this question. — Matt Watson 26 secs ago
10:05
-1
Q: A code for a vehicle routing problem model

SabreenI am new to Gurobi/python interface. I am writing a code for solving a dial-a-ride problem (vehicle routing problem). Something is not going well, but I don't know what is it. This part of my code , the error appears in constraint #6. from gurobipy import GRB,quicksum,Model m = Model ('Sab') #...

0
Q: Guide me please how to make better my code in my simple project API

Bunyod[This is a link to google drive. I'm a beginner software engineer. I believe it will take a few minutes of your time. Please, review my code and guide to some improvements like adding classes]. [One sample line of code in this project: def present_students_names(): students = database.present_s...

@CaptainObvious Not like that.
@CaptainObvious Not like that either.
Should anyone wonder why my amount of reviews isn't higher, it's because I pick half the off-topic questions straight from chat.
10:27
0
Q: Function decorator for static local variables

Angew is no longer proud of SOI'm primarily a C++ developer, but I find myself writing significant amounts of Python these days. One C++ feature I miss in Python are function-scope static variables (variables which are initialised once, but retain their value across calls to the function). So I wrote a decorator for adding st...

10:50
-2
Q: Longest substring repeating tleast k times

Shrey TripathiI have been given a binary string (having alpha numeric values) of length 100,000 and an integer k, and I have to implement an efficient algorithm to compute the length of the largest sub-string which repeats at least k times. Here is a code for the same: #include<stdio.h> #include<stdlib.h> #i...

11:02
I don't know why did you decide to post here, but without the library it seems completely alien. If you wanted to post for a review, there is a site for that, codereview.stackexchange.comYour Common Sense 26 secs ago
11:13
-1
Q: Unable to print anything from the class

Caleb jonesfrom mrjob.job import MRJob from mrjob.step import MRStep class RatingBreakdown(MRJob): def steps(self): return [MRStep (mapper=self.mapper_get_rating, reducer=self.reducer_count_ratings)] def mapper_get_rating(self, _, line): #line is line of data (userID, m...

11:35
-1
Q: Accessing elements of dictionary and concatenating them with String to print

DurgaI have started learning python newly and taking up some online code assignments. Currently, I am trying to access the elements of multiple dictionaries within a single dictionary. taking user input as a name. If else condition will check the name present in the dictionary if present the Expec...

11:48
The downvotes are because you are not asking about a specific issue (I didn't downvote). This question is better suited for a code review exchange. There is no real issue with your code, but I am not sure how you are going to use it going forward. — James 51 secs ago
12:30
3
Q: Are there any advantages to using rigid RF coaxial cables?

HatimBWhile watching this Signal Path video, I came across this shot: I saw few rigid coaxial cables there and so I started wondering what might their advantages be. I could only find disadvantages: They're expensive Limited in available angles 45° or 90°. Otherwise they're not easy to bend compar...

@Mast ^^^
12:46
@DerKommissar I agree, it's unclear if it works and so I'd vtc it until op explains if it is or not.
I would agree with that VTC.
@JonathanSánchez I suspect you best approach to write a test harness that exercises this code as used. That harness would report the time and others could run it. Perhaps this all better on codereview? IAC, this kind of optimization (micro-optimization) is often not as efficient (measured in you code development time) as higher level work . Good luck. — chux - Reinstate Monica 25 secs ago
13:05
0
Q: Decision making inside a for loop and taking certain path based on output from gathered results

JonBI would love to simplify my code, with better utilisation of for loop indexes. The goal is to change out all UP once for new UP once, which means take down each UP one and bring it up again. There should always be one in UP state while this process takes place, so I need to cover the following sc...

0
Q: File System - OOP

Neslihan BozerI have added an object oriented way file system. I am lookign for the sugeestions for how could I improve it further ? Thanks. package oopdesign.fileSystem; public abstract class Entry { protected Directory parent; protected long created; protected long lastUpdated; protected...

13:17
@DerKommissar what do you think about the imac in https://chat.stackexchange.com/transcript/message/54100516#54100516 ?
for Xcode + some 3D rendering/ animating/ baking tasks
I'd go with the 1T SSD but the rest looks good.
If you can spring for it the iMac Pro looks really good, spec and aesthetics.
To be honest, I don't have any issues with mine and it's the Late 2015 i5, came with 8GB of RAM but I upgraded to 32GB, and all the rest is relative low on the spec sheet, and it runs Xcode, Logic, Blender, and all the JetBrains tooling quite fine.
And it's the 1TB Fusion drive.
This is likely more suited to codereview — mplungjan 50 secs ago
0
Q: Histogram of Maxwell-Boltzmann distribution

user366312The following C# source code creates a histogram of Maxwell-Boltzmann's distribution: using System; using System.Drawing; using ZedGraph; public class CommonDistributions { public static double Uniform(Random random) { return random.NextDouble(); } static double Gau...

0
Q: Async Events & Entity Framework

JsonDorkSo I've got these three types of code, one with return async, one with just await and one with Task.Run wrapped around it. The worst one feels like the third one (Task.Run), second best is my working async await but the second one that is return await I thought that was gonna be the best approach...

@DerKommissar can Fusion drive use APFS, required for Catalina.. since by the time I buy it, it's going to be the default OS. It still is I guess
@DerKommissar I feel I won't be needing that, I saw the specs, look awesome but just not for me. Plus the extra dollars might not be there
possible answer invalidation by Philip Paetz on question by chapati: codereview.stackexchange.com/posts/111789/revisions
13:30
@DerKommissar external disk ftw :)
@ankii No idea, honestly. I'm not on Catalina yet.
@ankii I haven't played with one so I can't speak to it.
@ankii I don't disagree, but having a large on-board is nice for updates.
@DerKommissar yeah, we talked about that :)
I love how the update says "null" on it, though.
Freaking technology.
@DerKommissar haha.. you can clean it though in /Library/Updates, after disabling SIP
@DerKommissar Hadn't seen those in a while.
Then again, I tend to keep the equipment that's in in one piece.
Bloody expensive.
13:44
This question may be more appropriate for codereview instead of stackoverflow. Note that it's not really clear what you are doing – e.g. what are internal_dia_b, system_length_b, and normal_liquid_level_b, why do you convert everything to float al the time, how this relates to tkinter – and what you would consider as better – e.g. more idiomatic, faster, ... — MisterMiyagi 20 secs ago
I’m voting to close this question because questions about working code, that are asking for help on improving said code, are off topic for Stack Overflow and belong on codereview.stackexchange.comTaplar 17 secs ago
Yeah, I always liked them because interference was WAY low, but it's been a minute since I've worked one.
> acoording to me , the program should be working just fine
[sic]
Not how it works.
@DerKommissar Yea, think I saw them in a multispectral EM logger last.
The size of 2 desktop towers, built to last.
Magnificent piece of hardware.
Used for checking new products for EMC requirements before sending it to the notified body.
@Mast [one of] the worst last words of a programmer
@ankii I thought those would've been "I wrote it myself, so it should be perfectly safe"
@Mast Yeah, last I worked them they were being used to transfer data out of a plastic-injection molding machine, we actually routed them outside of the equipment so we could get 2Ghz signal across the facility. Almost zero noise because the solid shielding was extremely efficient.
And that facility had a crazy SNR for standard coax. You had to send signals 3 or 4 time to get them even recognizable. We had huge boosters on the original coax.
13:51
0
Q: Codingbat Subset sum problem with a tweak

AnirudhThe question is about finding if there exists a subset in an array of ints that sums to a target with following tweaks All the multiples of 5 must be included. If there is a 1 followed by a multiple of 5 then it mustn't be included. There is a Standard solution /* * Given an arr...

Oh, and ours were double-shielded. We ran a shielded conduit across the facility then ran solid-coax through the conduit. The original setup was flex coax in the shielded conduit.
Of course, part of the problem was that ground-potential varied hugely through the plant. Should have been using Fiber to be honest.
@Mast Haha. I can imagine a dramatized version of that text:
> My code is fine, but the evil C compiler is conspiring against me! How can I foil C's evil plots?
@DerKommissar What length?
Pulling 2GHz through coax over an entire facility wouldn't be my first choice, but you got to do what you got to do.
Putting the working area that needed the data next to the other area wasn't an option?
@DerKommissar for a noob like me: why was the ground-potential varying through the plant? Shouldn't all ground potentials for a building be the same circuit?
14:07
@Vogel612 Oh absolutely not. You'd be surprised how much ground-potential varies just among a few hundred square meters of land. We grounded every machine at it's location, separated by ~60 to 300ft depending (like 15 to 90 meters), and ground potential was sometimes tens-of-volts between the two. It has to do with how plastic-injection-molding works, and the amount of static-electricity generated by the machines that we sent into the earth.
@Mast Longest was about 1500ft.
@DerKommissar so you don't have a grounding circuit
@Mast Absolutely not. We tried putting a computer there and it ended up fried within a week because of the electromagnetic interference.
well, it would probably have quite some power flowing through it if there was one, huh?
@Vogel612 Ehh, that's not something you do in plastic-injection molding.
@Vogel612 Exactly. It's a safety hazard.
It's no longer a ground circuit, because whatever you reference it to will have power flowing.
@DerKommissar Darn.
@DerKommissar Yea, beware of ground loops.
14:10
could you put the data-handling electronics on a separate grounding circuit to avoid the different ground potentials?
We did, but the problem is the coax signals are sent in reference to ground.
welp, so much for that idea I guess
So when the machine (which might be Ground +10V) sends the signals to the processing centre (which might be Ground +0V), the signals are read much stronger than normal. So we had to treat them like a cable provider, and create our own references and do all sorts of trickery.
-1
Q: jQuery "floating bubble" effect?

AndrasI made a floating bubble via jQuery that scrolls a bit faster than the user: https://imgur.com/dd1VOfD This is the code: if ($('#bubble').isInViewport()){ var where = ($('#bubble').offset().top - $(window).scrollTop()) / $(window).height(); var multiplyBy = 180; if ($(window).heig...

It was a mess. I wish I had fiber signaling instead, because that would have eliminated SO many problems.
And likewise, when the processing centre sends signals to the machine they're lower than normal. So, we put DOCSIS signaling units in, ran shielded solid coax, and finally got stable throughput.
We also tried shielded Cat5e and Cat6, neither worked at all...lol
14:26
Yea, that's for different problems.
Must be fun working on that though.
It was enjoyable for a time, but extremely challenging.
0
Q: What is the appropriate way to pass different dbcontext to different concrete strategy for strategy pattern

berkayI just want to clear some legacy code in Controller that is get query string parameters and do bussiness logic and database operation with a lot of switch case and if/else with no other service no other abstraction so i decided to use "Strategy Pattern" each business logic can be separated by typ...

Sara Chipps on April 16, 2020
After speaking with subject matter experts, we decided to take a step back and list and organize our methods of feedback into this matrix to help with both a clear framework to follow as well as identify any areas that could use bolstering with alternative methods. Some of these feedback types belong in a few of the quadrants, what we did in that case was to include it with the research types it resembled the most.
14:46
The risk of SQL injection is extraordinarily high. Yes, this is just a method that returns a string, but it does ZERO checking on the validity of its arguments, uses pure string concatenation and no formal parameter definition ... it would never pass code review where I work. — Ross Presser 54 secs ago
You're likely to get a better response at codereview.stackexchange.comIan Kemp 40 secs ago
I’m voting to close this question because it belongs on english language / somewhere else (perhaps code review). Definitely not here. — webnoob 38 secs ago
15:00
Depends on what you want to achieve here. Generally you should be catching specific exceptions, not use bare except: statements. There are many things which could go wrong in those few lines of code, if you're suppressing any and all exceptions you're just making your own life more difficult. But apart from that, again, is it useful to catch exceptions here at all? We don't know, depends on what the responsibility of this function is. This may be more something for codereview.stackexchange.com. — deceze ♦ 1 min ago
15:15
@deceze To me this looks off-topic, as is, for Code Review. Please don't make suggestions when even you doubt whether this would or would not be on-topic on Code Review. Not only does this have the normal problems that a bad recommendation ensues, it also shows to other users that shafting Code Review with terrible recommendations is acceptable. — Peilonrayz 35 secs ago
15:26
Nibjubg
@CaptainObvious as I scanned through the posts here my eyes noticed "dingbat"
posted on April 16, 2020 by CommitStrip

15:44
-3
Q: Keep getting added key already exist while using IDictionary c#

eduDevI keep getting an error "System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: An entry with the same key already exists" looks like it breaks in the second foreach loop. This is the code I am working with ...

16:07
0
Q: Change layout in Gridlayout runtime

BiscuitI'm trying to change the GridLayout of my application in runtime, the user can select 1, 2 or 3 columns for his display. To do that I've used a ItemDecoration and I update the display if certains condition are met. I'm wondering if I'm not overdoing it and if there isn't a simpler or better way ...

I’m voting to close this question because it is better suited for codereview.stackexchange.com. — Karl Knechtel 34 secs ago
That's better to ask at codereview.stackexchange.com . An one more observation though, e.changedTouches[0] gives you the first changed event in the stack, you might want the last event instead. — Teemu 37 secs ago
16:25
possible answer invalidation by Rtimeseries on question by Rtimeseries: codereview.stackexchange.com/posts/240585/revisions
16:49
@Duga rolled back
You should probably ask in [code review](codereview.stackexchange.com) — Falla Coulibaly 20 secs ago
0
Q: Optimizing runtime on finding the nth perfect power number

David Lubomirskyi was given a task to write a code to find the nth perfect power number. i wrote the following function to find that number but the runtime is long at high number (above 30). you can assume that the input number is within the range of 1-100. here's the code: def perfect(n: int) -> int: """ :pa...

0
Q: Create Graph With Eulerian Tour in Rust

RedDree Eulerian Tour is a list of nodes that has a specific way to traverse the graph: it starts at one node, traverses along every edge in the graph exactly once and returns to the starting node. Here is my implementation of such a graph, please be so kind and destroy it with some constructive c...

17:05
Is it worth commenting on the answers to this closed question? I am considering using an auto-comment - the one that mentions only answering on-topic questions
Also, I'm surprised this post got closed as a duplicate
0
Q: Selecting minimal sum of two distinct entries of two dicts with common keys

user3680510Can this function simplified? The goal is return one key from each dictionary (both contain the identical keys), so that the sum of the values that belong to the selected keys are minimal (and also the two keys cannot be identical). a = {1:50, 2:60, 3:30} b = {1:50, 2:70, 3:40} def get_double_mi...

17:32
If you're looking for a code review, the place is Code ReviewAsteroids With Wings just now
For the love of whatever you consider holy, STOP UPVOTING OFF-TOPIC QUESTIONS PEOPLE!
@SᴀᴍOnᴇᴌᴀ Feel free to do so.
But there is already a link to the help center, so, if OP dares reading the rules it shouldn't be that hard.
@Duga @Peilonrayz He does that every so often when he thinks we're not looking.
-1
Q: Code - move down to close, its performance and correctness

testI wrote a code that adds a show class to div.cards-briefly after pressing a button. This causes div.cards-briefly to slide out. I added a function to close this div by sliding down. Is it possible to change something so that e.g. if the user touches it in the middle and starts moving it down, it ...

@CaptainObvious Code, in the title. On Code Review. As a stand-alone piece, like it's a sentence. On Code Review.
I'm going for a walk.
@Mast I've not noticed that until now. But there's always someone looking ;P
17:43
Aug 28 '19 at 13:46, by Duga
@deceze Whilst this could indeed make a good question on Code Review, your comment as it stands will attract the wrong attention to our site. In the future, please at least acknowledge that we have a help center that the user should look over before posting their question to our site. This is as half the above question "Can somebody write his version of this program?" is off topic, and the rest of the post is very low quality. Thank you. — Peilonrayz 45 secs ago
So, you have noticed that :-)
@Mast Preedit, I was starting to think,after all that time where you didn't have 10k on CR did your account mutate to being able to see all deleted posts?! :O
@Peilonrayz It's a kind of magic.
Oh wow, I guess I just have short term memory...
@skiwi I'll forgive you the lack of round numbers on your plasma and gauss, but the rest is atrocious.
17:48
@Mast Haha
Do I sound like I have a plan?
Spend more on small lasers.
@Peilonrayz I think most people do... oh do you mean you only have short-term memory?
lol
I don't think he means that.
I'm confused, I can't tell if joke or not joke...
Who, Sam?
Probably.
18:00
Yes, ahh. Boy I'm bad at some jokes :(
18:20
@Mast 128 mentions, probably around half of that actual recommendations over 5 years...
looks like background noise to me, TBF
1
Q: Grocery list with Python tkinter

Bob JeansI wrote a small program that generates a GUI for a grocery list (any list honestly). The GUI has the capacity to open a file, save a file, and save then exit the GUI from a file menu. The grocery items are added one at a time to a listbox using a popup window. The added items can be deleted as...

0
Q: Utilising pymongo to scrape over 4 million urls using multiprocessing to examine the impact of coronavirus

JackSo I want to do some research on the impact covid 19 is having on businesses. I've managed to generate a database with the company name and the website urls associated with it. Now I want to scrape them all as fast as possible so I can do some analysis on it. I am new to using parallel programmin...

18:35
speaking of memory, before I forget...
@Peilonrayz I would VTD if I had 20k but alas I don't yet...
maybe I should switch to reviewing python instead of javascript...
Ah, I've just become accustomed to 20k+ life ;P
Yeah, Python gives some good rep. I also seem to have a knack with finding HNQ posts
@Vogel612 I never said it was a long list or that it occurred a lot. Every so often, I said. Iedere zoveel tijd.
true :)
@Mast I Google translated that, and the translation is close, but really odd. "Every so much time"
@Peilonrayz I think a better translation would be 'every once in a while', but it's all close enough I think.
18:51
Yeah, both your translations make complete sense
19:11
0
Q: Flatten 2d-array at compiletime

mutableVoidIn my code, I need to flatten a two-dimensional std::array into a one-dimensional one at compile time. While writing the code I realized, that I am unsure about several aspects of my implementation (as far as readability is concerned). Therefore I would really appreciate your input! I am especia...

19:34
0
Q: Abbreviating and expanding IP v6 addresses with APL

RGSRecently I solved a challenge on abbreviating and expanding IP v6 addresses. For that matter, I had to write two functions, AbbreviateIPv6 and ExpandIPv6. The first function ought to take a character vector of a v6 IP address and abbreviate it like this online tool. The second function ought to u...

20:08
If your code works but you want to improve it, it may be a better candidate for Code ReviewG. Anderson 23 secs ago
20:33
If your code works and you're looking to make it "more idiomatic" (which is a highly subjective measure), this question is off-topic for Stack Overflow. You might have better luck on codereview.stackexchange.comAdrian 30 secs ago
There is a lot wrong with your code, perhaps codereview.stackexchange.com would be a good place to post this — Martin 40 secs ago
0
Q: Python: is __init__(self): { config_module.load(self) } bad practice?

Coop MI wrote a few separate classes that all read from the same json config file. To minimize redundant code there's a separate module that contains a load(object) method to read from the config file and sets obj.x and obj.y and so on from that info For at least one class though there are no other va...

21:27
"I would like to know if my script is good or not"—that's not what we do here. Please take the tour and read about what's on-topic in the help center. If you clean this up, it might be on-topic on Code Review. — Chris 33 secs ago
21:56
Not in a sane, useful way that promotes code-reuse and modularization. Instead, you've added more cognitive load, needless overhead, and it isn't re-usable. This would never pass a good code review. — juanpa.arrivillaga 5 secs ago
22:35
1
Q: PropertySet implementation

VertexwahnProblem Statement: Store properties with a certain name (key), type and value. The key is always a character literal and the value can be of type bool, int, float, double, char, std::string, Vector2f, Vector2d, Color3f. It should be possible to add new properties and to retrieve the value of alr...

22:58
0
Q: Python: Dynamically loading API connections

CoupcoupThe code below reads a json config file listing a series of apis and the base urls, loads a handler script that extends a parent Handler class for each, and then passes a list of the loaded Handler objects back to an Aggregator that goes on to do database stuff with them The goal (which works cu...

0
Q: Return new thymeleaf page from controller

ILR0 I have a web app built using Spring boot and thymeleaf. I have used only the index page so far which has different models in it and it work just fine. Now I want to add a new page. By new page I mean in the url it says http://localhost:8081/app/index Now I have added a dropdown on the page L...

23:20
@user1271772 I'm suspending you for five days for unsolicited advertising across the chat. Don't do that.
-1
Q: 2020 How to validate users login with PDO and PHP Working Example

TD00Goal is to obtain working log in code for 2020. PHP version 7.0 or Higher. The user is already register in the database and verified by active = 5. The password will be using a hash PASSWORD_ARGON2ID. PDO /PHP Code error_reporting(E_ALL); ini_set('display_errors', 1); ini_set('display_startup...

0
Q: Matlab Linear Programming, 'No point satisfies the constraints'

Hasan IqbalI am trying to minimize the following simplest of functions: minimize 3x subject to: [x, x]' = [2, 5]' x >= 0 I have written the following matlab code to use with linprog. f = [3]; Aeq = [1; 1]; beq = [2; 5]; lb = [0]; [x, fval] = linprog(f, [], [], Aeq, beq, lb) I think the resulting '...

23:46
I'm not sure what your question is. Can you provide sample input and output? Is there a correctness issue or are you looking for a code review? Thanks for clarifying! — ggorlen 31 secs ago

« first day (2539 days earlier)      last day (1775 days later) »