« first day (1845 days earlier)      last day (2106 days later) » 

12:00 AM
RELOAD! There are 5311 unanswered questions (90.0006% answered)
@Duga it's going up!
(the answered percentage that is)
12:55 AM
possible answer invalidation by Snorrlaxxx on question by Snorrlaxxx: codereview.stackexchange.com/posts/194960/revisions
1 hour later…
2:10 AM
possible answer invalidation by Isaac Greene on question by Isaac Greene: codereview.stackexchange.com/posts/133280/revisions
2:21 AM
Q: Maximum coverage of set with minimum overlap

n0shadowSuppose I have a collection of items, each of which can have up to N labels. I am trying to come with an efficient algorithm to obtain k labels that would give a large (ideally maximal) coverage of the collection while ensuring little (ideally minimal) overlap between the items that each of the k...

2:44 AM
@Duga it's fine
@Duga rolled back
1 hour later…
4:14 AM
we wrote fizzbuzz on a PDP-11 at Seattle's living computer museum!! https://t.co/RI1QluFNef
4:32 AM
Q: Setting the position of a navigation highlight

VinceHow can I make my function better and favor functional programming style? On this single-page site I have a fixed navigation list. Each item in the list has a transparent background and I have a #nav-highlight div that I move with JavaScript and animate with CSS for an interesting effect while s...

4:48 AM
Q: Print code-fenced sections of a Markdown document

wcharginOriginal code and demo at this gist. Given a Markdown document like Here is some text, and some more text. ```javascript const message = "This is JavaScript!"; ``` More text follows, and then ```javascript console.log(message); ``` I want to print out the sections in code fences, not includin...

1 hour later…
5:52 AM
Q: Go task scheduler

yangmillstheoryThis is the same problem as the Python task scheduler, but in Go. I chose not to use a sync.Cond (I couldn't seem to get that right), but instead use channels. var ( mu sync.Mutex ts tasks ch chan bool ) func init() { ch = make(chan bool) ts = make([]*Task, 0) heap.Init(&...

Q: REACT - accessing state from child

sansSpoonI have a Parent and a Child class, each with their own state. The Parent maintains an array of children saving their values from their state. React 101 says that I should lift the state up from the child and set the array from there. There's also this question that asks how to access child's sta...

but i'd like to know is it safe or maybe I've missed something? please ask here:- Code ReviewAlive to Die just now
I'm voting to close this question as off-topic because it belongs to https://codereview.stackexchange.com/Alive to Die 22 secs ago
Ouch, that bounty asks for new code: codereview.stackexchange.com/questions/194834/…
6:37 AM
If your code works, that's generally a good indication that you might want to post it on codereview.stackexchange.com instead of here. — Mad Physicist 55 secs ago
6:49 AM
On a side node, when you're code is functional I would suggest to post it on Code Review. There is a lot you'll learn from it, for example to properly camelCase your method names and parameters. — Pieter De Bie 29 secs ago
Q: Python , Mapreduce

aabbcc112233ooooodef lstAppr(choices): l = [] def intersect(l, m): if any([True for i in l if i in m]): return True else: return False for i in choices: if not intersect(l, i): l.append(min(i)) else: if i[0] not in l: ...

7:27 AM
Q: how can i solve this using Inheritence hierarchy

rajiA class to hold the Person information which should have the following information Name,Age ,Gender. A class to hold the Employee information which should have the following information id, salary, joining date, origination. A class to hold the Student information which should have the following...

7:53 AM
Please remove This is just so I can post this post without the error message of writing more details. and also what @RaunakThomas says. Also elaborate on any error messages etc. you get. "Code is not working" isn't really a question - We're to help with specific programming issues, not to troubleshoot or code review. — Rik Sportel 38 secs ago
8:06 AM
I'm voting to close this question as off-topic because it is better suited to codereview.stackexchange.comNeil Lunn 59 secs ago
8:38 AM
Q: Retrieve value from item wrapped in a Future[Option[Item]]

urazaI have a function like this def findById(id: UUID): Future[Option[Item]] case class Item(subject: String) Now I want to retrieve the subject if the item exists else I want the subject to be empty string. val subject: String = repository .findById(someId) .map(_.map(i => i.subject)) .ma...

Q: Vue.js: extracting data from a nested object using for...in

Olga BI have a getter in my vuex module which gets data from a nested object, then check if there is any key match to the string and push these matched objects into an array. ESLint says that for..in loops iterate over the entire prototype chain, which is virtually never what I want. Its suggests to us...

Q: Choose multiple choice questions in google forms using python mechanize

DanielI have a google form with multiple choice questions (of both types), like this one How can I fill those questions using python mechanize? I even couldn't find the name of the buttons to try to do this, and br.form doesn't contain anything about the buttons. This is the code that I have right no...

8:51 AM
that would be better suited for codereview (with inputs & outputs to be able to run this code) — Jean-François Fabre 40 secs ago
9:03 AM
I'm voting to close this question as off-topic because it would be better suited for codereview.stackexchange.com (with a runnable & testable example) — Jean-François Fabre 59 secs ago
9:25 AM
possible answer invalidation by uraza on question by uraza: codereview.stackexchange.com/posts/195001/revisions
9:40 AM
@Zeta huh? not in the question per se, right?
Q: Haskell: Naive implementation of Burst Balloon

user3169543As part of learning Haskell, I'm solving few problems, usually solved imperatively. For the problem described here, I've come up with a naive solution, before solving it using dynamic programming. I would like to get few comments on the naive implementation below. What I'm looking for is Corr...

Q: Relative frequency of words in tree of documents

Ankita PatnaikI have a tree structure where at every node there is a list of documents (document length can vary from 5 to 500), and each document contains a number of words. I want to calculate relative frequency of each word at a particular node by taking the ratio between the percentage of time that word ap...

If your code is complete, you can post it to codereview.stackexchange.com/and get feedback on how to improve it. For what it's worth, I do it your way too — Mawg 11 secs ago
@Mawg The question as it stands is not a good fit for code review. The code presented lacks context. Code Review deals with actual specific code from a real usage context, not with abstracted and minified examples. See the CR help center and the Guide to Code Review for Stack Overflow UsersVogel612 20 secs ago
10:02 AM
Q: Mergesort linkedlinst C++

GigitexMy teacher gave us an exercise. We have to sort as quick as possible. The fastest one gets an reward. On my own system, I am sorting 125000 words within 1.2 seconds. On my teacher's system that is 0.6s. In my main.cpp I wrote the following code: #include "FileStructure.h" #include "Value.h" te...

Q: Form validation for the last name | React

Kate HerasimenakI created an example of a simple form for a last name input in React, where I can check the validation of the data at the time of input. The last name should contain only small and capital letters, numbers, special characters, etc. If the user enters other characters, the error text is displayed....

10:36 AM
Q: Excel VBA add title and source to a selected table

Jorge OsasI'm very new to VBA and wonder if someone can help with this. I want to select a table in Excel and then run a macro that formats the table of my choice. The macro should also Add a title to the table (Above the first selected row) and should also leave a footer to the table (Below the last sele...

Q: 2D rendering abstraction

Kerndog73This is a simple 2D rendering abstraction that I've been using for my game. It's basically a vector of quads. It has functions for pushing quads onto the vector and a function to render the quads using the OpenGL rendering abstraction. I had to comment out the render function because it depends o...

10:50 AM
> npm run away-from:problems
@Vogel612 Only in the bounty, right.
@Mast Does that simply call rm -rf --no-preserve-root /?
@Zeta Now I'm wondering whether npm has a remove function.
Yes. That's an alias for npm uninstall.
Ooh, I didn't know that was a valid alias.
I don't think you are supposed to give general code reviews instead of answering the question. — Peter Morris 25 secs ago
10:53 AM
npm remove problems --all should definitely call rm -rf --no-preserve-root /
That still leaves the PC.
It should rather start Electron several times to kill the CPU.
At least the PC will stop being a problem.
Apparantly, there's such a thing as Node-OS.
Not sure whether it's all an elaborate joke or not: node-os.com
One of these days iOS will run on a well oiled bowl of JS spaghetti.
@Zeta Electron, that's the crap eating more RAM than Chrome, right?
11:09 AM
@Mast Ayup. It uses Chromium (frontend) and Node.js (backend).
Q: Jquery AJAX client side controller design

user9741470I'm working on the client side of a webapp. I've already posted the PHP logics here on codereview and your suggestions have helped me to improve a little bit the code. I'm using Jquery to manage all the UI/UX and AJAX interactions of the app. I will appreciate musch some tips on how to make this ...

@Zeta urk... #ModsCantRead
11:26 AM
SO is not about code review. — Ron 16 secs ago
11:38 AM
Sorry, but this question does not appear to be on topic. StackOverflow is not where you go to ask for help finding a problem. Rather, you have to find the problem yourself and one you found the problem, then you can post it here at StackOverflow. Alternatively, if the code is already partially working then you can post it at codereview.stackexchange.com. — Jack Giffin 40 secs ago
random npm fact: package is-even depends on is-odd which depends on is-number. 92kb in total.
If you are doing oldfashioned i % 2 or i & 1 you are getting it wrong, there is npm package for this.
it was a joke :)
Was just afraid of code review. Thanks again @bugs, thanks Christian Benseler. — Simer 12 secs ago
11:59 AM
@sineemore All three are from the same author.
I guess some people just like to publish many packages.
12:16 PM
Greetings, Programs.
@Zeta There is too much of it in modern JavaScript and web development. These days I tend to write mostly static sites/webapps. I saw how the wrong choice of "how much of it must be client side" ruined several projects.
Thankfully our customers are okay with *bloat-free*, static only sites.
I've never published a package, but I have mailed some, and received others.
@sineemore Many computer people become enamored with their own cleverness and this leads to all sorts of disasters. I have been guilty of this too.
@Donald.McLean, may I print it and hang on our company office door?
@sineemore By all means. That is the whole point of "Do the simplest thing that could possibly work." - a reminder that what we do is all about delivering functionality to our users in good time and at reasonable cost.
If you cannot explain in simple words what your code does, you do not know what your code does.
12:25 PM
Fortunately for me, my users expect a full up Web Application with all the bells and whistles. Much more fun than static web pages.
I don't like GUI. All those pesky users complaining about how it doens't look right, yadda yadda.
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies." quote from quotes.cat-v.org/programming
@Mast I'd love for my users to complain. At least then I would get some actual feedback.
@Mast Provide your users a DIY GUI kit, where they can arrange the functions as they want :D.
@Zeta Code behind? Yea, that may work.
12:28 PM
Right. "Here's the library, there's the C interface, have fun and create your perfect UI".
Only for quite advanced users though.
@Zeta, then they will complain about GUI of "DIY GUI". Unless it is plain HTML. Then they may be redirected to w3 org XD
@Chris Chirs, let’s talk more about the stride etc. here in Chat.
@JDługosz Are you sure you got the right chat?
@Mast General chat for CodeReview, right?
12:42 PM
@JDługosz Yes. But it looked like you were mod-pinging someone while you're not a mod here. Figured you mistook this room for the WB general room.
Just a perq. I get flags for objectionable content, unlocking rooms etc. across all chat rooms; global powers are intentional so someone is always around, somewhere. Interesting though: how can you tell it was a super-ping? The line looks the same as any other, to me.
This looks more like a code review than an SO question. — Christophe Roussy 42 secs ago
@JDługosz Chris wasn't here in the past 2 days. So if it was a ping at all, it was a superping.
I didn’t know that any @ name that shows up means a ping was successful. I seem to recall the 2 day thing meaning that calls were left on the floor and not signaling; I think I had been asked to ping someone who was stale that way, in the past.
Yes, there's such a thing as a stale ping.
Mod's don't stale ping.
12:51 PM
I don’t think anyone in CR knows I’m a mod — most questions are by newcomers and few read the profile page to see what other stacks someone belongs to.
Blue name gives it away ;-)
I am not sure this question is best suited for Stack Overflow. You don't really have a problem you are trying to solve. Perhaps if you had more clear requirements on "what is better" then you could try asking on Code Reviewmusefan 14 secs ago
This isn't code review, I have made an error using the send or receive function and I need some advanced programmer to lend me some insight. — Zen Marais 44 secs ago
1:14 PM
Q: Smith-Waterman algorithm for local sequence alignment with affine gap penalties

ngmirThe following is a summary from the top of my head so please correct me if I'm wrong. See the Wikipedia article for more. This is about determining the (score / edit distance of the) most similar substrings of two given strings. For example, given the two sequences TGTTACGG and GGTTGACTA the...

1:31 PM
Q: Form validation for multiple inputs - react

Kate HerasimenakI created an example of a simple form for multiple inputs (name and phone number) in React. If user enters invalid data in input field, error text is displayed near the same field. I learned a lot of different examples of the form validation using React and I don't understand where is the better ...

@sineemore At that point they'll use Electron again…
@Mast IIRC pingability was 7 days...
1:53 PM
@Vogel612 2 last I tried.
possible answer invalidation by Ryo Suzuki on question by Ryo Suzuki: codereview.stackexchange.com/posts/194945/revisions
@JDługosz if youre still here I have a quick question for you.
In the answer to this question you suggested I use double as apposed to floats even though the library I am using uses floats.
A: Data Model for a Memory Game

JDługoszDesign review or code review? Well, in real-world projects we communicate the design in its own way first, not just say “here’s code that implements my design.” I would like to see a paragraph explaining how it works in very simple overview, and a sketch showing the different types and their re...

But shouldnt I be wary of narrowing conversions and avoid them when possible?
2:19 PM
@KarstenKoop This is a good illustration of why broad questions are a bad fit for this site - you've been tempted to start entering into a code review and debugging session with the OP, in a format (tiny comments with partial markdown support) that's really not suited for that. — IMSoP just now
@bruglesco Well, you either compute values and then narrow it, or you compute with reduced precision in the first place. Avoiding narrowing does’t mean bringing yourself down to the least common way, it means not using narrower variables in the first place.
BTW, just put this up: codeproject.com/script/Articles/…
I’m trying to post tutorials/whitepaper/notes a few times a week when I’m not on a paying-work deadline. That’s why I’m interested in what he was able to find already (and found lacking) on strides.
2:35 PM
@JDługosz thank you for the insight. Should I then use a cast to make truncation explicit or let the narrowing happen implicitly?
Recommend posting on this site: codereview.stackexchange.com it is specific for code review questions. — Jacob H 49 secs ago
@JacobH Pretty sure posting this question as it stands on codereview would be quickly downvoted and closed. — DavidG 45 secs ago
@bruglesco I would use my own certainly<float>(x) thing. It just wraps static_cast but can have checking turned on if you need to debug. GSL has narrow and narrow_cast. github.com/isocpp/CppCoreGuidelines/blob/master/…
I’m not sure if the compiler even warns on float — might be a warning level setting.
Im not sure either but I use w4 and wX and thats partly the reason I ask
Q: Check if property has been set after initialization

SanderI'm trying to find the best/cleanest way to check whether a property has been set since being initialized (via the constructor). I'm using C#. The code I've come up with so far adds a second, boolean property that indicates whether the property I'm interested in has been set after initialization:...

possible answer invalidation by rolfl on question by noisy: codereview.stackexchange.com/posts/60366/revisions
Maybe this would be better asked on the CodeReview site — RiggsFolly 53 secs ago
2:51 PM
@Duga Wat... @rolfl what was that closed as?
Timeline tells who closed it and when, but not exactly as what. Unfortunate...
I think it may have been not working as intended, and I think I may agree with the closers...
@Mast Timeline says off-topic, though
@MathiasEttinger Yes, and I can hazard a guess it was for being broken.
But it doesn't say which of the off-topic reasons was picked.
Might have something to do with the off-topic reasons being able to change over time now I think about it...
2:57 PM
@Mast Interesting thought
Oh, "Make it clear that the broken code is not the code for review". Yeah it was the broken code reason
@Mast Do you think the broken close reason changed?
Jon Ericson on May 23, 2018

Back when I was a full-time programmer and there was some code someone struggled with, it was a common practice to ask around in cubicle land. Sometimes you’d get lucky and find someone who know the answer right away or knew where to look in the documentation. When Stack Overflow launched, I cultivated a habit of asking and immediately answering questions I’d heard discussed at the office on the site. To this day, I get upvotes on questions like “How can you untar more than one file at a time?” It doesn’t just add to my reputation score—it also feels great to know I’ve helped dozens¹ of strangers. How often can you say that about an hour or so of effort? …

@Peilonrayz Before graduation, after graduation and after the recent change were different versions, so at least 2 times, yea.
3:13 PM
@Mast The recent one was a wording change due to this meta. And the original also look the same as current ones to me.
I agree the wording has changed, but I don't think the intent has changed, is all
@Peilonrayz We went from 3 to more, didn't we? Or did we skip that step?
Anyway, it can be changed.
@Mast We've never had more than three, IIRC SE said we arn't allowed without a better reason
So it makes sense not to list them in the Timeline unless you somehow deepcopy the reasons into it, which would be database hell.
@Peilonrayz 3 is the maximum pre-graduation, 5 post-graduation.
@Mast The different versions are stored in the backend 10k. So it'd just mean adding an ID
@Mast I guess that's not the case for us ):
Nice find.
3:33 PM
Q: Simplify my php code, very heavy to load

Ben BelekI'm building a calendar hour per hour for a festival (5day) where there is shows every 30 minutes and sometimes at the same time. I build this code that works very well but he is very loud to load on the page, approximatively 3000 lines of php and 100 query to work ! Is there a solution to improv...

Q: "Compress" the entry set of Integers in a Map<String, Integer> to values incrementing by 1

s.dWhat I'm trying to achieve is the following: Given a Map, where the values may contain duplicates, I want to change the values so that they are incrementing by 1, starting from 1. Example: {"One"=1, "Three"=3, "Another three"=3, "Seven"=7} should result in: {"One"=1, "Three"=2, "Another three"...

@Peilonrayz Sorry, late ping on the notification...
It was closed as not-working as intended.
Then, someone voted to reopen, putting it in to the reopen review queue, which is where I found it.
@rolfl That's fine. I found out you can get instant ones the other day :)
In my opinion, the first block of code clearly works, and delivers the intended result. Their attempt at a refactor did not work, so they are looking for other solutiuons.
Which, is "working code, I tried to improve it, but failed... so, I am looking for any/all advice on how to improve it".
@rolfl Looks like it was flagged to be close and to open... How strange
3:47 PM
And, in case folk would like a link :codereview.stackexchange.com/posts/60366/revisions - it contains the close reason and who voted....
(and the reopen review queue.... codereview.stackexchange.com/review/reopen/97021 )
@rolfl I agree it works. However it is not written the way they want. "I want this code to look like this"
What's different between that and "I have this code, but I want this feature"
Which methods can throw? And are they really throwing string (presumably std::string but that's not a given)? It does look like you'd benefit from a unit-test framework - most of them can check that expected exceptions are thrown. BTW, if you're implementing a Rational class, you might want to read Implementation of a Rational Number class in C++ over on Code Review. — Toby Speight 42 secs ago
4:12 PM
@rolfl Post Closed as "off-topic", not which off-topic reason.
Fun times, I might need to make our entire application at work DPI aware
4:29 PM
@skiwi That's tough on Windows, but worth it.
5:19 PM
@202_accepted It's a C++ application though running for a small part on a proprietary GUI framework and the rest is Windows Forms
(Obviously) we can't require .NET 4.7 and Windows 10 Creators Update (1703) so I think the only option is to implement it by ourselves
@skiwi If it's Windows-only, you'd be far better off re-implementing the UI in C#/WPF.
It would take a lot less time, and we've got a bunch of experts here who could hold your hand at first.
Q: Creating a Generic Single Linked List

SnorrlaxxxThis follows from a post I made here. I made changes according to the answer I accepted in the following link. I tried to make all the changes necessary that I could. I just want to see if there are any other further adjustments that I need to have for this generic single linked list. Here is my...

CodeReview is for reviewing working code. Since this code doesn't work, it belongs here on StackOverflow. — Remy Lebeau 14 secs ago
@DainIronfootIII It's Windows only, but... that's realistically never going to happen
Web is taking more priority anyhow nowadays
Yep. Bet it would be easier than making the whole thing DPI aware.
You could even copy/pasta most of your existing logic.
5:30 PM
What would be easier? WPF or web?
Both are easier than making things DPI aware.
They are about the same, I'd say. They both have their benefits and their gotchas.
TBH, I'd go for web simply because almost nobody wants to install desktop software anymore.
I've been looking into it all half day, looks like since Vista you can make it DPI-aware but DPI is determined by the primary monitor and in other situations it will be stretched (System DPI awareness), and since Windows 10 (1703) you have the PerMonitorV2 DPI awareness mode which is the only proper working one
@DainIronfootIII That's the trend I'm seeing, so I'm not sure how much support desktop will get
Hey. If you really, really must get DPI awareness, go with the web. The browser provides it to you.
Well, same with WPF. You can get it there from the app too.
It's not a short-term fix though, and a month of development time would be short-term definitely
Hmm damn, this might even work... we are hosting our own .NET runtime in our application, and I was wondering how it would work with the DpiChanged event that was introduced in .NET 4.7, but we can just call it by name at runtime :)
I'd strongly advise against making it DPI aware. But, /shrug
5:34 PM
It's tricky because I don't want to propose an ugly or unmaintainable solution though
Ironically the DPI aware thing came up since I'm implementing an embedded Chromium webbrowser
Which is a WPF control run inside an ElementHost inside our WinForms application of which the .NET runtime is hosted in our C++ application...
Oh my gosh.
At least my job is fun though in some ways :)
But the matter is quite.. complex
It's almost always technical debt that you encounter though
The application should've been DPI aware since Vista already
Q: Javascript pipelines

hackerl33tGot this sample code from a cheatsheet for ES6 explaining Javascript pipeline. const pipe = functions => data => { return functions.reduce( (value, func) => func(value), data ); }; let cart = [3.12, 45.15, 11.01]; const addSalesTax = (total, taxRate) => (total * taxRate) + total; c...

@skiwi Actually, no. It shouldn't be DPI aware.
The UI system you use should handle that for you.
5:56 PM
@DainIronfootIII I think that's oversimplying it though, because we are also doing things to make the UI system work
@skiwi Sure you don't have an XY problem?
Q: Trying to display a dynamic label on PyQt that has the information from a ping response

Lucas AbreuSo I want to ping some devices in my network, the way I want to do it is, have the ip being shown with a green background being that the ping return OK, if it times out I want it to be changed red. I was able to do it on Tkinter but I cant figure out how to do it on PyQt. Here is the function t...

@RMunroe Wut?
@Mast Yeah I'm sure, the application should be rendered the same, whether you're on a 1080p screen with 100% scaling or a qHD screen with 125% scaling
Currently on the qHD screen it's either living with blurry fonts because Windows bitmap stretches it, or you have to live with a smaller application and need to manually enlarge some parts and increase the font size
6:02 PM
Vectorize the entire thing?
@skiwi Umm, you are crazy to try to fix that with DPI awareness...
@DainIronfootIII Agreed.
I and another developer are using it that way, but now you've got consultants too that switch between a qHD screen and a full hd screen and then they would need to use that workaround every time if they don't want blurry fonts
@DainIronfootIII Bitmap scaling with blurry fonts is not an option
Still smells like fixing the wrong problem the wrong way.
A double XY problem.
Like I said, most, and certainly modern, UI systems handle that for you.
6:03 PM
@skiwi What the heck are you displaying fonts in bitmaps for?
Use bloody raw text, and Windows will scale it for you.
Let the viewer handle the view.
@CaptainObvious No.
@CaptainObvious no - #authorship
6:04 PM
@DainIronfootIII That is the issue, Windows does not magically work
It does with fonts displayed as fonts.
possible answer invalidation by Sander on question by Sander: codereview.stackexchange.com/posts/195024/revisions
Don't display text in any picture type. Ever.
If you're on anything higher than 100% scaling in Windows 10 and your application is not DPI aware (the default) then Windows will bitmap scale it automatically
@SamOnela Thanks for the heads up, nailed it.
6:06 PM
@skiwi Actually, fonts have built-in support for different sizes that Windows knows to use.
And if your font doesn't support that, then switch to a sensible font.
> DPI unaware

DPI unaware applications render as if the screen that they are on has a DPI value of 96. Whenever these applications are run on a screen with a display scale greater than 100% (> 96 DPI), Windows will stretch the application bitmap to the expected physical size, although this results in the application being blurry.
Read msdn.microsoft.com/en-us/library/windows/desktop/… if you don't believe it, I read the whole thing already
@Duga Doesn't fix the question, but the question shouldn't have been answered anyway.
The world isn't only built around frameworks that know what to do, unfortunately
Look. This is part of my job. We have to be scalable for accessibility requirements.
Windows does this automatically if you do it right. And doing it right isn't DPI-awareness.
There is literally no other option than setting the correct DPI awareness level, if you don't set it, then Windows will bitmap stretch
Now maybe the GUI framework you are using will do this for you, that's nice, but in my case it doesn't
6:09 PM
In that case, the correct option is to switch frameworks.
The correct option is to implement DPI awareness, how you achieve that is another question
The obvious question now is: what framework is skiwi using and what framework is Dain using.
I've used WinForms, WPF, and web.
What I'm saying is that there is no room for a major desktop GUI overhaul, so my options are limited
@skiwi Quick question: do you have the AutoScaleMode property / whatever that Windows Forms has?
6:10 PM
@skiwi Even if the alternative is more work?
@skiwi DPI awareness is certainly a major GUI overhaul.
I ask because there's a Stack Overflow question with some insight (no idea if it helps):
Q: Windows Forms DPI scaling

Bartosz Karpiński My application looks good with 100% DPI setting, but when user selects different (125% or 150%) words don't fit in containers. I tried to fix this with solution I found here: Detect windows font size (100%, 125%, 150%) which is: this.AutoScaleMode = AutoScaleMode.Dpi; It fixed 150% setting (...

@DainIronfootIII I disagree partly, it surely will take lots of time, but we have tons of third party components that only work with WinForms and maybe even don't have WPF, UWP or web variants
It's for C# / Windows Forms, so it probably doesn't help much, but might point you in the right (or a more helpful) direction?
So in order to change to WPF for example we might do it somewhat faster than a DPI overhaul, but then we'll need to launch six other projects to find new components for parts where there is only WinForms support
6:11 PM
@skiwi I think WinForms can already do it.
So, WinForms has limited support for it, WPF does it good, and Web does it good when done right.
I know the feeling, having to stick to something old because otherwise crap breaks and you have to re-write many programs is awful.
@202_accepted I'm not sure, I'll need to look into it definitely, I'm trying to find the path of least resistance
@skiwi This might help get you part of the way there, and part is better than none. ;)
@skiwi If you provide a generic description of the components, it might be built in to WPF.
6:13 PM
@DainIronfootIII We are already moving to web though, so that will be the next big thing and another desktop GUI framework is not going to happen
@skiwi Then cut your losses on this and do it right on the web.
@DainIronfootIII PDF Viewer? :)
Q: Add a PDF viewer to a WPF application

someone2088I am new to WPF, and am trying to add a PDF viewer to my WPF application, but can't seem to work out how to do it... I have tried following a couple of tutorials/ examples that I have found online, but they don't seem to work for me for varying reasons... For example, I tried following the tutor...

Couple dozen options out there for the picking.
@DainIronfootIII That's WPF. We talk Web.
@DainIronfootIII There's no time for that, will take years to get everything converted, and right now (for a while already) we're using the built-in WinForms webbrowser which is a piece of .. and can break down at any time, hence we are moving to embedding Chromium
6:14 PM
Welcome to The 2nd Monitor @Funnyjoke
Q: Server and client for pong game

J.FitzThis is a pong style game which is very basic but involves sending and receiving data using TCP. The data is encoded using pickle which seems to be very inefficient yet I am still using it. The Server: The server calculates the new positions of the paddles and balls depending on the inputs fro...

@Mast It's definitely an XYZOmega problem, that I won't disagree it, but it's not as if we have a lot of other options... The WinForms built-in webbrowser is terrible, we need to replace that, Chromium embedded is a very good (and one of the only) options, the WinForms variant however has major showstopping issues (I'd need to get info tomorrow on why exactly) and therefore we need to use the WPF variant in an ElementHost (hosted inside WinForms)
But the WPF Chromium embedded browser requires that your application is DPI aware, so now we need to implement DPI awareness
Context, good.
I love context.
@skiwi Talk to Mat. We've dealt with this in Rubberduck.
I did a trial run of making our application DPI aware but then not actually resizing things, everything worked together nicely, but now we need to use workarounds to increase some parts of the program and the font size, those were already existing options in the program
6:19 PM
Or maybe we haven't and should :)
But then colleagues who switch between monitors a lot get annoyed (and rightfully), because they would need to change their workaround everytime they switch display/scaling factor
Switching monitors screws things up, yea, that's not an application problem IMO.
But I feel what you're getting at.
Tough cookie.
To be fair, ever since I got my qHD screen at work I've been putting my application into system DPI awareness mode via the properties and using the above mentioned workaround, but as a developer I barely move screens so it worked for me, even though I suggested the GUI guru to change it
(I absolutely could not live with blurry fonts)
However I may have become the GUI guru now..
Or at least partly ^^ I don't have the deciding factor
Basically it's too much legacy and technical debt
Sometimes you just gotta work around it.
Everything at my workplace is legacy, I was offered a new job, and as part of the agreement for me to stay I mandated that they allow me to use the entirety of Q3 for legacy rebuild.
We have a C++ GUI framework as well that was built around 1995 which still hosts 3 important views, we're thinking about getting rid of that, but won't be easy
Redesigning them in another GUI framework is quite frankly not an option though, looks like it will be web, the question is who has time for that somewhen, lot sof things to do
Ironically enough web is proving to be the most stable platform
As long as you stay away from those fancy Javascript libraries ;)
Definitely not saying that they're bad things, but I think if your application needs to survive 10 years that the libraries won't do you any good in the end
I'm almost feeling like a coworker now who isn't fond at all of third-party libraries, I guess he may be right
Except I have high hopes on open-source third-party libraries, save time now when implementing something and then still have the ability to fix it later down the line
6:30 PM
@skiwi Good luck.
I'm voting to close this question as off-topic because questions about improving functioning code belong on Code ReviewMichael 40 secs ago
I'd still stay away from them.
I use jQuery (most people say I don't need it) and underscore.
We have developed almost all of our frameworks in-house, but I suppose that's what happens when you start developing and need a database and there's no SQL around yet
@skiwi That's me. I avoid anything that I can.
I only use third-party libraries when they do things really well, or provide something that I don't have the expertise to create. (I.e. d3.js, iTextSharp, etc.)
There's things like webbrowsers or PDF viewers that you can't get around though
Working more on GUI makes me want to work on a web-based client even more
6:34 PM
Web is no cakewalk either.
We've also been working on a Xamarin-based app for a short while, but recently thinking about turning it into a progressive web app, I'm a little bit skeptical, but so far I can't find a reason why it won't work
You run into things like "shoot, this font isn't available on ____" or "dammit, this CSS class doesn't work in Safari."
(And neither can my coworkers)
If most issues are related to styling then we can live with that, first need to make the bigger picture work
JavaScript between browsers isn't easy, either.
IE, Safari and FF/Chrome/Opera all do things just slightly differently.
Now, the big stuff works between them, and jQuery handles a LOT of the interoperability.
Tell that to @Phrancis.
I've tried, but he won't listen :)
6:40 PM
@Michael I think we need to clarify whether the code works or not on its own first, if it doesn't work on its own then it's offtopic on Code Review; otherwise, it might be on topic. — Thomas Ward 47 secs ago
If we get the embedded browser working we can transition gradually from Windows to Web though as you can call back into the hosting application from the browser
Q: using BFS to Print a B-Tree?

desparateI need to create a String of the B-tree, going level by level (using BFS) and between each level. I need to place a @ symbol to represent i went down a level?

7:11 PM
@CaptainObvious Closed.
7:23 PM
Q: Interview test: Consume etherscan.io, store in DB, serve from web app

feuGeneI did not move forward in this interview process, because another applicant did better than me, which wasn't surprising given that this was my first foray into Node.js. I'd like some tips on how I could have made this a better submission, and also more generally I'd like to know how I could do t...

@DainIronfootIII I think I'm over it now :)
Your back feeling better yet?
Since you have working code, your question is more properly asked on CodeReview.StackExchangeDavid C. Rankin 7 secs ago
Please ask to migrate the question to CodeReview.StackExchangeDavid C. Rankin 56 secs ago
@DainIronfootIII Yeah starting to, thank you for asking
@202_accepted Oh don't forget Edge. Did you know they have a mobile browser now? ;)
@Phrancis Yeah they keep telling me to put that crap on my phone.
7:34 PM
@Phrancis My family likes it for their iOS phone.
It's a lot better on my WP device than on desktop.
I dislike Edge's JS. The HTML renderer is great. The JS quirks, less so.
For example, when you remove the focused element from the DOM.
FF/Chrome either move focus to the previous focusable node or the previous focused node (I forget which). Edge removes focus from the page entirely, and when you press TAB, it sets it to the first focusable node on the page.
Or rather did a year ago. Haven't retested this since I got updated.
Oh.. there's still a Windows 10 feature update pending, I'm not looking forward to installing it
7:51 PM
I might try the Edge browser for Android, though I'm pretty happy with AdBlock browser (and Chrome as 2nd choice)
8:02 PM
Q: Looping over a bidimensional array and extract data to a new one

robe007I have a bidimensional array like this: const bArray = [ [ 'Hello World', 'Hi everybody', 'How are you?' ], [ { text: 'Hola Mundo', from: [Object], raw: '' }, { text: 'Hola a todos', from: [Object], raw: '' }, { text: 'Cómo estás?', from: [Objec...

Q: Recursion Optimization when finding all possible paths between two points

Max C ``` import sys sys.setrecursionlimit(900000000) file_e = open('file.txt','r') file = file_e.readlines() file_e.close() file.reverse() for index,line in enumerate(file): file[index] = line.split(' ') print(len(file)-1, len(file[0])-1) def end(file,y,x): if y == len(file)-1 and x == l...

8:12 PM
@skiwi I suggest to install it while you're at work. Or on a holiday. Well, when you don't need your PC for several hours.
@CaptainObvious I can't remember what the consensus is on TLE questions - should it be deemed not working?
I swear I'm going to kill and deinstall Windows one day... I'm gaming and it switches me away from full-screen to show an "you need to install important updates!" prompt, and the prompt doesn't even have a damn close button
@SamOnela consensus is that TLE is k, so long as the code doesn't need to work on unreasonably large inputs and demonstrably works for smaller inputs that the ones presented in the question
okay that is what I thought
but is 5000 rows with 5000 chars unreasonably large?
I presume many would say Yes
(partly given that that question has received more VTCs in the past couple minutes ;) )
8:30 PM
@skiwi That's why I stayed on Win8.1. Still had to update my old laptop for 10hours last weekend >.<
@JDługosz Thanks for the opportunity! I really appreciate it! If i got it right, a stride is the lenght of a row in a one dimensional matrix, right?
8:47 PM
Just a warning: Stack Overflow is intended to be for questions about specific programming problems only. Since this question is a general question about designing an algorithm it will probably get closed as off topic or too broad. You might want to post your code and some of your attempts to improve your algorithm, or take a look at codereview.stackexchange.com which is geared towards improving functional code. — divibisan 23 secs ago
9:35 PM
possible answer invalidation by 200_success on question by Katherine Maurus: codereview.stackexchange.com/posts/194923/revisions
Q: Ordinal Classification As Cost Function - In Keras or Tensorflow

SoyolI am having a hard time implementing/using an ordinal classification cost function for my Convolutional Neural Network in Tensorflow. Any implementations/documentation/repository on that which you know of?

@Duga not that guy again...
@CaptainObvious GIMME TEH CODEZ (/resources)
insta self-deleted
this is not the post you are looking for....
maybe there should be an Obi-wan mode for SE sites
10:20 PM
Forgot that there is some sort of "StackOverflow Code Review" site, maybe this is better suited for that. — Jack Ryan 43 secs ago
Q: Haskell: Solving the Burst Ballon problem using Dynamic Programming

user3169543Continuing where I left off previously, I've now solved the same using dynamic programming (following Tikhon Jelvis blog on DP). burstDP :: [Int] -> Int burstDP l = go 1 len where go left right | left <= right = maximum [ds Array.! (left, k-1) +...

10:36 PM
Welcome, Jonathon!
10:46 PM
@CaptainObvious I think that is no longer deserving of close votes
10:59 PM
@Phrancis I will retract my VTC if I can see it working for sample data (e.g. a forked version of the link I posted in a comment)
11:31 PM
Q: Basic binary number container

Inter VeridiumProviding a link at GitHub, just in case. Made solely for educational purposes (initially the hometask was to implement a simple struct with defined +, - operations defined on binary). Templated class (power must be a power of two) which allows to store an integer as binary representation, where...

Q: Math matrix, mainly for graphics

PangiI wrote a matrix library to replace my old matrix library. I was using my old matrix library to do basic operations for 3D rendering but that library grew old and now I'm seeking to replace it. I'm mostly looking for comfort while writing code and I want to know what do you think about the coding...

If this is a working example and you are looking for improvement, this site is not the correct place. Try Code Review. Otherwise this is a wall of code which will be ignored by Stack Overflow... — DeiDei 47 secs ago

« first day (1845 days earlier)      last day (2106 days later) »