« first day (2490 days earlier)      last day (39 days later) » 

12:00 AM
RELOAD! There are 6407 unanswered questions (90.1203% answered)
 
12:55 AM
Brilliant, thanks Dawood! I'm unable to profile my work DB right now. Was going to try this at home, but you have been a gent, and done it for me. Thanks. Answered what I thought. Now I can complete my code review with more confidence. :) — Craig 29 secs ago
 
1:05 AM
0
Q: speed up a function with matrices python

mghahplease help me speed this function up. it's a pretty simple function and I have ran out of ideas on speeding it up. def compute_something(X, theta, temp_parameter): """ Args: X - (n, d) NumPy array theta - (k, d) NumPy array temp_parameter - scalar Returns: ...

 
1:43 AM
0
Q: Programmatically getting the GUID of an application

Jesse C. SlicerIntrigued by the events chronicled here (also here and here), I saw the inherent utility in having a program-specific GUID available. The SO answers that were correct seemed a bit tightly-coupled and verbose. So I set out to make my own for use. Looking for a critique on the idea itself as well a...

 
There's a whole other site for code review: codereview.stackexchange.comSammitch 42 secs ago
 
2:21 AM
0
Q: Dict as a local variable in a class

Juan Sebastian Garcia PerezI have the next code: class PythagoreanProof(Scene): CONFIG={ "color_triangulos":YELLOW, "color_rect_c":RED, "color_rect_b":ORANGE, "color_rect_a":ORANGE, "color_cuadrado_c":ORANGE, "opacidad_triangulos":0.6, "opacidad_cuadradro_a":0.6, "opacidad_cuadradro_b":...

 
Not entirely sure of this sentence "All in all, you should try and minimize the variables that make up the state and thus number & complexity of the fields for a particular class." is it sufficiently clear or do you have remarks on it?
2
Q: O.O. Style Palindrome Checker

K00lmanI am beginning to learn about object oriented programming in my programming class, and to make sure I had all the ideas down, I made a small palindrome checker program. It works by checking if the letter on the opposite side is the same. from time import sleep # To add readability delays clas...

 
If your looking for general feedback and critique on a piece of working code, you may wish to consider asking on CodeReview instead. — Brian 1 min ago
Once you have working code I suggest you post it at SO's sister-site Code Review. There you will get useful advice on how to improve your code. — Cary Swoveland 8 secs ago
 
2:40 AM
0
Q: Correctly releasing allocated memory in C++

Arthur Henrique Della Fraga Let me check if I could understand how to use delete operator typedef list<Node*> Instructions; class Block{ private: Instructions instructions = {}; public: Block(){} ~Block(){ Instructions::iterator it; for (it = instructio...

 
2:59 AM
-1
Q: i need help asap

anas I need help and its due in 2 hours. please help guys I am stuck printf("Input principal:"); printf("Input Principal: "); printf("Input Principal: ");

 
 
2 hours later…
5:14 AM
0
Q: I just finished a basic computer science program for class and wanted feedback on simplifications

TravelerThe program was to turn an integer into exact change and uses a bunch of if statements. Are there steps a simpleton like me can do to remove some or is it just how it will be? I can't find anything on it, at least I'm not sure, still in the basic course. The program is turned in and was fine, and...

 
Monking
 
5:48 AM
Thanks, @CarySwoveland, I was unaware of Code Review. Looks like an excellent resource. — whalelegs 39 secs ago
 
0
Q: Reverse each word in the string. All spaces in the string should be retained

MilliornThis was part of a code challenge. I use them to help me learn c++/c# along with tutorials and guides. Basically I was taking a string... The quick brown fox jumps over the lazy dog. ...and reversing the words in the string like this. ehT kciuq nworb xof spmuj revo eht yzal .god The...

 
 
2 hours later…
7:45 AM
0
Q: Minimal Property system in c++17

bluedragonSo I needed to represent by objects in terms in ini format and change their values from the ini as well, so I thought why don't implement a property system for this. I want it to be bit fast so I would really like if anyone can remove the std::function if possible but its not necessary. The targe...

 
Monking
> FINAL ATTEMPT.cpp
 
8:02 AM
Monkin'!
 
0
Q: First python code

Slow Keys GTThis is my first code and im pretty proud it's a coin flip but instead of tail it's T and CT. I have been coding for 2 weeks now and i think it's exremely fun. But if anybody want to build on it please do.PS thanks for reading. And if it's the wrong place i will take it down just say it:) import...

 
8:16 AM
@CaptainObvious Interesting one. Too bad I don't have time to answer it rn :(
 
@avazula Good, please wait till it's fixed. The current indentation is all over the place and I'm not going to fix it.
 
@Mast Yeah, I didn't want to do it either. Chances are it's part of the previous if loop but I wouldn't want to mess things in case they thought you could do an elif after a while
 
8:49 AM
Generally, your question lacks a minimal reproducible example. However, how many bytes did you write? Is the reading or the writing the problem? As a new user here, please also take the tour and read How to Ask. I'd also suggest you submit the minimal example to codereview.stackexchange.com, there are a few bad habits. — Ulrich Eckhardt 46 secs ago
 
9:20 AM
0
Q: How to write less if statements in a for loop

Lee const app = (() => { let race1 = document.querySelector('.race1'); let race2 = document.querySelector('.race2'); let race3 = document.querySelector('.race3'); let race4 = document.querySelector('.race4'); let race5 = document.querySelector('.race5'); ...

 
I'm voting to close this question as off-topic because it belongs to codereview.stackexchange.comYury Tarabanko just now
Marker interfaces are both good and bad depending on who you are, how you are using them, what your code reviewers like, and what day if the week it is on SO. — Michael Randall 16 secs ago
 
9:39 AM
0
Q: how to refactor the following method

user2004I have a method that I use to find out what role has the current user. I have used 3 if's, but I am wondering if it can be written in other way. Here is my method checkUserRole() { if (this.currentUserService.isCurrentUserProp65()) { this.userRole = UserRoles.Prop65; } if (t...

 
9:58 AM
-1
Q: how to detach/attach presenter/service in android kotlin MVP architecture

MaChee NeraidI am new in Kotlin and MVP Architecture, currently I encounter this flaw on my code, here is my code SplashActivity.kt class SplashActivity : BaseActivity(), Splash.ViewInterface { private val splashPresentation = SplashPresentation(this) override fun onCreate(savedInstanceState: Bundle?) {...

 
A single nested for loop doesn't look excessive to me. if your code works as expected, post it on CodeReview instead. If it's broken, describe the expected and actual behaviour. — jsheeran 7 secs ago
 
 
1 hour later…
11:22 AM
codereview.stackexchange.com - is a better place for a working code — Noob just now
 
11:48 AM
-4
Q: looking for a web browser that doesn't use up a lot of memory when hundreds of tabs are open

RebroadI often have hundreds of tabs open in my web browser, but I'm looking for a web browser that can handle this in a more intelligent way such that it doesn't use up more memory than it needs for the currently visible tab, and ideally has some sort of hierarchy for the tabs based on when they were o...

@skiwi ^^
 
I would love such a browser as well. Currently I kill firefox daily and then restore the session :-(
 
I have a browser extension that just writes info for tabs I haven't used in a while to disk to save RAM
 
12:06 PM
As you predicted, register_printf_function() has been deprecated. However, a newer function has been added: register_printf_specifier(). It's usage is very similar to the old one. I wrote an example to register the %b specifier for printing unsigned integral types in binary, which you can see on CodeReview: codereview.stackexchange.com/q/219994/200418. — Cacahuete Frito 37 secs ago
 
@Vogel612 Does that fix the problem for you, or is it still unsatisfactory?
 
it's working well enough.
needed a bit to get a whitelist going that doesn't exclude every tab I open for work from getting pushed to disk
 
@Vogel612 What extension is this?
 
it's called "Tab Suspender", but I don't know whether it's available beyond Chrome
 
12:38 PM
Looks like it is (1) (2)
 
Firefox works perfectly with 2400 tabs open
6
They're not really open though, it needs to load tabs if I go to an older one
 
True. Still looking for a solution to save an instance.
Crashing it on purpose feels like the wrong solution.
 
1:28 PM
Maybe buying some more memory is an option :P
(6000 tabs seem to be the limit, for shy of 200 GB of memory. Not said if that's GiB or actual GB)
 
@MaartenBodewes Only 6000 tabs? Pffft.
That's 30 tabs a GB.
Firefox is going to beat that, hard.
 
Probably, the system quit at 6000 tabs because of other limitations though. And mind you, that processor they used? 64 core Epyc.
So actually their test failed. They should have tried something different to test the sponsored RAM.
 
1:45 PM
Is there a standardized test for the amount of tabs on a browser on a specific setup? See what my home set-up is going to achieve. Interested in what @skiwi system would maximally hold as well.
 
1:58 PM
You might want to ask this question at CodeReviewAioros 46 secs ago
 
2:08 PM
@Mast I'd rather not have it crash and lose all my tabs :D
I think my Firefox normally uses about 5 GB RAM but I've seen it use 10 GB sometimes too
 
2:26 PM
@skiwi I tend to stay under 200 tabs nowadays, so I haven't reached numbers close to that in a long while.
I recall 4 GB being a lot of tabs.
 
possible answer invalidation by Jeff Vdovjak on question by Jeff Vdovjak: codereview.stackexchange.com/posts/238011/revisions
 
Oh no! Not the tab monster again!
Since I shut down my computer every night and shut down FireFox before I shut down my computer I never have more than about 12 tabs.
Of course I also run Edge with up to 10 tabs as well, so make that 22 tabs total.
 
Maybe a good question for Code Review. — Klaus D. 11 secs ago
 
@Mast @skiwi @MaartenBodewes ^^
 
3:01 PM
If it works, what do you expect? Please consider posting at Code Review. — Wiktor Stribiżew 59 secs ago
 
3:23 PM
This is not the right place to ask this question, there's another meta more suitable for these kind of questions called codereview.stackexchange.comIslam Elshobokshy 48 secs ago
 
3:39 PM
0
Q: intersection observer multiple animation

Taste of LeavingI want to achieve different animation for many elements on scroll, so instead of using window.scroll i'm using intersection observer api, but i want to know if my approach is effective and won't cause performance drop, basically what i did is make a single function to hold the entire animation of...

 
Ryan Donovan on February 27, 2020
I recently came across this sketchnote by Tanmay Vora, and it really resonated with me. As a developer it got me thinking about how this might translate into the life of a developer and our happiness. Based on this sketchnote here are the eight factors of happiness applied to developer life. 1. Resentment Harboring resentment…
 
3:58 PM
0
Q: VBA: Calling one sub repeatedly and scope of variables

AlexMy code as a whole works for me without issues, but what I want to improve is a small part right out of the middle of it. I hope it's ok to post a simplified snippet here that just shows the structure (it's not something you can copy paste and it works), but I'll try to explain what it is about. ...

 
4:13 PM
Probably a better question for codereview.stackexchange.comJNevill 40 secs ago
 
4:36 PM
You might get a better response at codereview.stackexchange.comKyleL 22 secs ago
possible answer invalidation by Alex on question by Alex: codereview.stackexchange.com/posts/238041/revisions
 
4:55 PM
1
Q: Pythonic solution to display multi-dimensional tuple as a tree

sciroccoricsI would like to show the tree-like structure contained in a multi-dimensional tuple by using the set of graphical glyphs that exist in Unicode fonts (e.g. \u2500, \u2502, \u2514 and others). Here is an example of the kind of output, I'm talking about: >>> tree('(01, (02, 03, 04), 05, ((06, 07),...

-1
Q: Worksheet change and worksheet selection change slowing down my file

RodrigoI have a file that i use as database. It has the records and in the row 1 several cells used as buttons, (open folder, copy text, send mail, ecc.) At any change on any column of any record the file register the time in one column in order to have the last change of that record. It also change the...

 
Monking
 
5:33 PM
1
Q: Raspberry PI switching from Soft Access Point to WIFI client

RyxMontarI am relatively new to C language and Linux systems I would like some feedback/review. The main function of the code is to read the dhcpcd file looking for the 3 lines and then either adding/removing to the new file. It works and the Pi can switch from AP to client without a reboot, but I feel li...

-1
Q: Dictionary of names and birthdays. Ask if you want to add

anhanyoungthis code is to have a dictionary of names and birthdays. It will ask who's birthday it is that you're looking for. Then if it is in the dictionary, it will print back what that birthday is. If not, it will ask if you want to add it then have you insert the birthday as the value and use the name ...

 
Have a look at thisMatt.G 58 secs ago
I have explained more and add an image and more code on code review: codereview.stackexchange.com/questions/238044/…Rodrigo 58 secs ago
Sure. Will try CodeReview. Thanks. — Sachin S 46 secs ago
 
6:30 PM
-1
Q: Simplifying a Binomial Expander

MahdeenSkySo i made a python program to find solve some of my a level binomial questions or just let me check my answer overall, and i need advice on how to make it more compact and simplify it. This python code is meant for the fx-cg50 calculator's micropython, where there are a lot of functions that don...

0
Q: Generate a video of typing the contents of a file

RiceI wrote a Python script to generate a video file of typing the contents of any program file. It works, but I'm really not very happy with how it works. I have several issues with it. In order to generate the video file I had to generate an image for every character in the file. As you can imagi...

 
6:49 PM
0
Q: Player Ship Update function in an Asteroids-like game

AaySquareIn a Asteroids game, I have a player ship. In the code below, I have an Update function for Ship which will handle things like controls, collision and movement. What are your thoughts on this code? For example, is there a lot going on in the Update so would it be better if I put checking for co...

 
I agree with the_lotus' suggestion. Get your code working. Work on making it graceful or pretty later. The Code Review site can help with prettifying working code. I don't think we can provide a meaningful answer here. — Amy 20 secs ago
 
7:27 PM
0
Q: Statistics Library with Sample, SampleBuilder and Tests

Hungry Blue DevIntroduction I'm working on a Statistics Library that can record observations and produce a Summary of the statistics when there's enough observations. Right now, it's at its early stages and is expected to change a lot as I develop it gradually. Minimal Example Suppose I want to record the r...

 
7:46 PM
-1
Q: Copy a C# list into an out Parameter for better encapsulation

user3776749I have a class that needs to provide access to an internal List<int> member. The functions that use this class need to be able to work with that list, mutating the contents and sorting/filtering the list etc, without changing the internal list in the class object. Having a method that provides a ...

 
Please focus this question to a specific programming problem. If the code is working and you just want a review, try posting to codereview.stackexchange.com. — Rufus L 52 secs ago
 
8:15 PM
 
8:30 PM
Hi, please check codereview.stackexchange.com that is the right site for "constructive criticism", Stack Overflow is strictly reserved for practical questions — sinanspd 5 secs ago
codereview.stackexchange.com <- if code works, a question belongs there — Noob 1 min ago
 
 
1 hour later…
9:40 PM
0
Q: Looking for specific words in a string and noting the order

JinxThe problem: I have some text that I go through line-by-line, if I find a line containing the keyword DATA_TYPE_1 and/or DATA_TYPE_2, I know all the following values are that data type. What I do right now is keep track of if the last keyword I saw was DATA_TYPE_1 or DATA_TYPE_2 (or in the case ...

 
9:59 PM
0
Q: What's the best way to straighten out a PHP array with both indexed entries and associative entries?

RouninI have two closely related questions: 1) I have a mixed PHP array. Not mixed in that it contains strings, floats, booleans etc. but mixed in that it is a hybrid indexed / associative array. Most of its entries look like they are from an indexed array while the very last entry looks like it's fro...

 
possible answer invalidation by Jeff Vdovjak on question by Jeff Vdovjak: codereview.stackexchange.com/posts/238011/revisions
possible answer invalidation by Sᴀᴍ Onᴇᴌᴀ on question by Tobi Alafin: codereview.stackexchange.com/posts/234519/revisions
 
10:18 PM
0
Q: How to reduce complexity of method

Alex GolubenkoI prepared a method to make possible to select elements of the array except for some indexes. def array_except(array, *indexes) indexes = indexes .flat_map { |e| e.is_a?(Range) ? e.to_a : e } .map { |e| e.negative? ? e + array.length : e } array.values_at(*((0...array.lengt...

 
10:35 PM
possible answer invalidation by Jeff Vdovjak on question by Jeff Vdovjak: codereview.stackexchange.com/posts/238011/revisions
 
10:47 PM
@Duga rolled back
 
11:05 PM
@Duga rolled back - I almost ignored it because it was in code comments but the answer specifically mentioned that point
 
@SubliminalHash So because your question got downvoted and closed the only possible explanation is "pathetic" people seeking "status"? I think you're overthinking it and the reality is this is just a poor question — broad, lacking details, asking for "correct" usage when that's both debatable and left undefined, and possibly just posted on the wrong site (Software Engineering or Code Review might have been more accepting of this) — rather than people voting the way they did because...that somehow gains them "status" (however that was imagined to work). — BACON 15 secs ago
 
@Duga not exactly stub code but doesn't look exactly reviewable...
 
11:33 PM
0
Q: JS Object In --> HTML Out (from a Noob)

Jeff VdovjakI would appreciate feedback especially if you would be embarrassed by this code, or if I was on your team and you would expect better and/or you would mention something. If there are things that could improve performance definitely suggest them (as this code will be called frequently and there w...

 

« first day (2490 days earlier)      last day (39 days later) »