|
So when you say "client", the part that's failing is when the customer connects to your service from their own machine? The first step would be reproducing the failure, even if you have to do it live. Then instead of just "not trusted" (which could be anything) you can take a look at the failure and see the exact reason it's not trusting the certificate.
|
# ¿ Jul 11, 2014 15:06 |
|
|
# ¿ May 6, 2024 13:21 |
|
epalm posted:Yeah, I was thinking about timeline earlier. Could happen either way, right? On one hand it could be right after installing, on the other a bug could sit there for a week before crippling the software in a way that downgrading to the previous version is better/cheaper/faster than getting a fix out to the client. We write software for an industry that sees "new" things as bad and scary, so "put it back to the way it was" is a frequent sentiment (whether misguided or not). I'm not sure how often this is the case. How much testing do you put into your downgrade scripts to ensure that they don't break things even worse in the hypothetical scenario you're considering? One thing you can do is to have two phases of each release - one release with just the new database version, and then the real release with the actual logic and code changes that depend on those database changes. This gives you an intermediate point (the old version of the program, running against the new database) that you can safely roll back to. And if it turns out you do need to roll back the database migration, you can use that intermediate point to do so without causing any issues in code that relies on the upgraded database.
|
# ¿ Aug 3, 2016 18:29 |
|
Suppose you have a ProtocolEntry x, which represents tcp ports 60-120. And you have another ProtocolEntry y, which represents tcp ports 80-100. The issue is that your HashSet has no way of knowing that y represents a "subset" of x - all it knows is that the ProtocolEntrys are not equal, so neither HashSet is a subset of the other. If you want a slightly-less-kludgy version of your current solution, you can do as Nihil Credo suggests - use a helper method that, instead of returning a port number (that's only meaningful if you already know the protocol), returns a tuple of <protocol, port number>. Then you can stick those in a set and subset it. If you want a cleaner solution ... fundamentally, with your current api, the code doing the comparison has absolutely no way to tell that a particular protocol entry represents a range of ports with defined endpoints. The only way that it can look at a ProtocolEntry is to iterate over all the individual ports that the ProtocolEntry contains. So you're going to have to expand the api with this particular use case in mind.
|
# ¿ Apr 2, 2019 07:42 |
|
I mean, why not just use resources like the analyser suggests? It's easy enough to set up, and once you've done it the usage is basically identical to your constants class anyway.
|
# ¿ Aug 20, 2019 10:50 |
|
I mean, the baseline evidence in favour is that "Microsoft's code analyzer is recommending them", which certainly suggests that they're the generally recommended way to handle UI strings - or at least worthy enough to look into rather than uninstalling the analyzer in a huff.
|
# ¿ Aug 20, 2019 12:26 |
|
What is your goal here? Are you trying to prevent yourself from accidentally breaking the singleton contract by using reflection or serialisation internally? Are you trying to prevent malicious code from deliberately creating multiple singletons for some nefarious purpose? Are you trying to make it easier for benign-yet-incompetent developers to use your singleton the "right way" as opposed to hacking up a seemingly-working-until-it-doesn't solution using reflection?
|
# ¿ Oct 23, 2019 08:25 |
|
You can put your singleton in an assembly with the DisablePrivateReflection attribute. Keep in mind that, like the Java solution, this doesn't stop anyone copying your code and changing it to allow what they want to do.
|
# ¿ Oct 23, 2019 08:44 |
|
Uh, perhaps don't? Users have expectations about how a text field works based on how literally every text field across the entire operating system works. If you do some fuckery that makes your text field work differently, everyone is going to hate it. If the user wants to go back to typing at the end, they will click at the end where they want to type after they're done copying the stuff they want to copy.
|
# ¿ Dec 12, 2019 04:56 |
|
It feels like the best way to do that would be to make the rich text read-only, and have your code track the text caret position within the control and handle text input. That is, assuming you can't find a more appropriate console input control to handle that for you.
|
# ¿ Dec 12, 2019 05:50 |
|
Rocko Bonaparte posted:There's a way to set the rich text box as read-only while still being able to type into it? You don't want users to be able to arbitrarily type into it - you only want their inputs to end up in the command line part. So leave the richtext as read only, and only update it from your code. You could handle key events yourself and figure out what changes they mean, or pass them to an invisible textfield that only has the editable command line.
|
# ¿ Dec 13, 2019 04:30 |
|
If you bisect those commits, you will only need about seven builds to figure out which commit actually introduces the problem.
|
# ¿ Jan 15, 2020 03:38 |
|
Embedding a webview is bad because at that point the user is ultimately typing their third-party credentials into your application and just trusting you to not misuse them. You shouldn't have any firewall issues if you make sure you're only listening on the loopback port.
|
# ¿ Jun 19, 2020 12:23 |
|
Your other options are: - Defensive copying, where your read-only accessors make a deep copy of anything mutable and return that - Immutability, where the objects you're storing in your state cannot ever change, and anything that wants to change the state does so by creating new objects and replacing the existing ones - Annotating the interface return values to suggest that they shouldn't be changed, and writing an annotation processor that fails your build if it detects someone breaking the annotation contract They're all some combination of "a lot of work" and "not so hot for performance". I'm not sure if anyone has already built an annotation system you could use, which would make that a pretty palatable option, but I suspect not. What you really want is something like c++'s const keyword, which unfortunately doesn't exist in c#. (C# const means something different). Having read-only interfaces for everything is honestly not the worst option.
|
# ¿ Jun 21, 2020 17:44 |
|
The key insight to coming up with a recursive solution is to look hard at your incremental step - suppose you have a solution for three different dictionaries. As in, you've run the code, and you've got your solution back out of it. Now someone comes along with a fourth dictionary, and asks you what the solution would be if you had had that fourth dictionary in there from the start. Can you do that? And can you generalize that so you could do exactly the same steps if someone then came along with a fifth dictionary, and a sixth, and so on? Once you know what your incremental step is, the base case is frequently pretty obvious. Then you can write your recursive solution: code:
|
# ¿ Aug 3, 2020 08:19 |
|
Are there individual test cases in those that take an hour to run, or does it just take a long time to run the tests in aggregate because there are so many and you don't have enough machines to run them all in parallel?
|
# ¿ Jun 10, 2021 01:15 |
|
I think the idea is that these comparators are being written in an embedded scripting language by someone using Rocko Bonaparte's software, and while it's okay for the sort to run dogshit slow if the user writes a bad comparator that blocks on something, it's not really okay for it to block a thread and stop other operations from proceeding.
|
# ¿ Dec 17, 2021 09:17 |
|
insta posted:I mean, at some point, some business unit said "we need to let them draw Win32 controls onto a form so they can attach to the events..." in order for WYSIWYG editors like VB6. Yeah, enormous teams have spent millions of dollars on these sort of things and still have not managed to accomplish the dream of "software being meaningfully createable by someone who is not a developer". You're unlikely to succeed where they have failed. My recommendation would be to encourage your clients to accept that, and provide them with library components that a developer on their end can very easily assemble into a dashboard for their specific needs.
|
# ¿ Jan 1, 2022 15:09 |
|
You're looking for the intersection of all the sets of tags. You could do something like: code:
|
# ¿ Jan 22, 2022 15:52 |
|
The right answer is to use a log method that accepts a format string, so it doesn't even need to do the formatting if there's no log sink connected that would receive the message.
|
# ¿ Mar 3, 2022 05:40 |
|
Can you wire up a second log sink that accepts logs at a more verbose level from the paths of interest?
|
# ¿ Mar 17, 2022 01:50 |
|
Rocko Bonaparte posted:Is there a priority queue available for .NET 4.x that has a decent iteration for deletion? I am using one for a scheduler in a Unity project and I just realized I should be canceling out scheduled items on stuff that gets deleted. I saw the implementation did iteration by creating a list of every element and returning it. It spares me invalidating the iterator, but that's still kind of gross. I just had a look at the code in that library and it looks like it's only the slow, safe implementation that makes a copy? If you're looking to optimize this for performance you can switch to the FastPriorityQueue implementation it provides in order to ... be faster, at the expense of not getting all those safety checks and needing to take more care around using it correctly.
|
# ¿ Nov 7, 2022 10:43 |
|
Ugh, I always forget that c# iterators don't just let you remove the current element and keep iterating. That blows, because it's a really natural way to express exactly this sort of thing (and it would be easy to do for the heap - copy the last element over the current one, decrement the heap size, and re-heapify, just like with any other removal - the process of restoring the heap property will only touch either some of the elements that you've already iterated over, or some of the elements that you will iterate over in the future, never both, so you can just pick up the iteration where you left off).
|
# ¿ Nov 8, 2022 13:24 |
|
That article is poorly written, the code it supplies is not how anyone would write it in a modern language, and I'm not sure anyone who learned programming this century would ever call it the "command pattern" anyway. It's literally just like writing an event handler in javascript. When you create your event handler, nothing happens right away - you just get something you can invoke later that will do the thing you've specified. You pass that something to the system, and the system then invokes it at an appropriate time.
|
# ¿ Jan 6, 2023 04:23 |
|
worms butthole guy posted:Yeah sorry I should've said that my interest comes from this book which discusses it: That page does a much better job of motivating it and talking about why you'd use it and why various aspects are there. I'd honestly suggest re-reading that page and mulling over it some more instead of looking for explanations on SEO content mill websites.
|
# ¿ Jan 6, 2023 04:43 |
|
If you're just looking for a single mod, have you considered a binary search? Disable half the mods, launch the game, see if it's slow. If it is, then you know the problem mod is one of the still-enabled ones - if it's faster, the problem mod is one that you've just disabled. Rinse and repeat, looking at a smaller subset each time. Should only take 7 or 8 launches to figure out which mod is responsible.
|
# ¿ May 10, 2023 04:08 |
|
Kyte posted:Why not await the background task? Because then you can't do anything else on the awaiting thread until the background task finishes?
|
# ¿ Jun 2, 2023 10:16 |
|
TheBlackVegetable posted:Is there maybe an open source licence that says "use this for free unless it's for development in an uber corp in which case cough the gently caress up"? if you're using the stallman definition of "open source" then no, any open source license will allow commercial use as long as they abide by the terms of the license, the best you can do is picking something like agpl that's just insanely toxic and that commercial users want to stay away from. if you don't care about stallman or fsf weenies, then creative commons cc-nc forbids commercial use (and you can sell commercial licenses separately under whatever terms you want). so as long as the license's definition of "commercial use" matches what you expect it to be then it'll do what you want.
|
# ¿ Aug 11, 2023 06:31 |
|
|
# ¿ May 6, 2024 13:21 |
|
yea fair, i'm probably getting them confused. my big point was that if you want "open source but without this defining property of open source licences", there's a whole world of "not technically open source by some strict definition, but the source is available for people to look at and use if they want it" which may be a better fit
|
# ¿ Aug 11, 2023 06:41 |