Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Activity for toraritteā€­

Type On... Excerpt Status Date
Edit Post #291125 Post edited:
about 2 months ago
Comment Post #291125 Thank you for the encouragement! I thought about that, because those points do sound plausible, but I have just started out with .NET in earnest, so it is just guesswork. I also didn't want to discourage answers. If no-one refutes those points in a day or two, I'll definitely post them as answers...
(more)
about 2 months ago
Edit Post #291125 Post edited:
about 2 months ago
Edit Post #291125 Initial revision about 2 months ago
Question .NET dependency management: `dotnet add package` vs. Paket?
Many older projects (i.e., older than 5 years) provide instructions to the Paket .NET dependency manager (e.g., Suave), so I started digging into it, got confused, then gave up for while because errors kept cropping up and I just wanted to make progress. I reached a point in my project where I hav...
(more)
about 2 months ago
Edit Post #290660 Initial revision 4 months ago
Question How to write a function that only accepts a list of `Error string` `Results` in F# on the level of types?
For example, given a `mergeErrors` function where input is always a list of `Error string`s, ```fsharp let es = [ Error 1; Error 2; Error 3 ] let mergeErrors (errors: Result list) : Result = errors |> List.map (function | Error e -> e) |> Error mergeErrors (es: Result list)...
(more)
4 months ago
Edit Post #290497 Post edited:
4 months ago
Edit Post #290574 Post edited:
4 months ago
Edit Post #290574 Post edited:
4 months ago
Edit Post #290574 Initial revision 4 months ago
Question What is a "sealed" type in F# and why doesn't the type test pattern operator (:?) work on it out of the `box`?
The F# language guide (see Signatures article) has a very sparse definition of what a "sealed" type is: > |Attribute|Description| > |--- |--- | > |`[]`|For a type that has no abstract members, or that should not be extended.| > |`[]`|For a type that is an interface.| I searched the entire PD...
(more)
4 months ago
Edit Post #290558 Post edited:
4 months ago
Edit Post #290557 Post edited:
4 months ago
Edit Post #290556 Post edited:
4 months ago
Edit Post #290558 Initial revision 4 months ago
Answer A: How to change the color of a cell to a user defined value while keeping its existing style using NPOI from F#?
Solved this by writing my own clone function: ```fsharp open System.Reflection let cloneCellStyle (cell: NPOI.XSSF.UserModel.XSSFCell) = let original = cell.CellStyle // printfn "ORIGINAL: %A" original.FontIndex let workbook = cell.Sheet.Workbook let copy = workbook.Create...
(more)
4 months ago
Edit Post #290557 Initial revision 4 months ago
Question How to change the color of a cell to a user defined value while keeping its existing style using NPOI from F#?
The answer provided in the How to set the cell color to a user defined value using NPOI from F#? thread solves the problem of how to set the right properties using F#, but it uses a new `ICellStyle` object and overwrites the existing style with it. Re-writing the function (see below) to setting th...
(more)
4 months ago
Edit Post #290556 Initial revision 4 months ago
Answer A: How to set the cell color to a user defined value using NPOI from F#?
I failed to notice that a cell's `CellStyle` property returns the generic `ICellStyle`, which has to be cast down to `NPOI.XSSF.UserModel.XSSFCellStyle` in order to gain access to the `FillBackgroundXSSFColor` and `FillForegroundXSSFColor` properties. Also, here's a summary of which property does ...
(more)
4 months ago
Edit Post #290555 Initial revision 4 months ago
Question How to set the cell color to a user defined value using NPOI from F#?
As far as I can tell (from F# at least), cell can only be colored using predefined `NPOI.SS.UserModel.IndexedColors`. From the available methods / properties, ``` val it: ICellStyle = NPOI.XSSF.UserModel.XSSFCellStyle { ... FillBackgroundColor = -494s; FillBackgroundColorColor...
(more)
4 months ago
Comment Post #290488 The SE thread [What is your way to create good passwords that can actually be remembered?](https://security.stackexchange.com/questions/662/what-is-your-way-to-create-good-passwords-that-can-actually-be-remembered) ([archived](https://web.archive.org/web/20230601214152/https://security.stackexchange....
(more)
4 months ago
Edit Post #290548 Initial revision 4 months ago
Answer A: What is the difference between `static let` and `static member` in F#?
Paraphrasing the F# language guide's `let` Bindings in Classes article: > A `let` binding in a class creates a private field or function; > to expose data or functions publicly, declare a property or a member > method. > > + An instance `let` binding is a `let` binding that is not preceded by...
(more)
4 months ago
Edit Post #290547 Initial revision 4 months ago
Question What is the difference between `static let` and `static member` in F#?
Taking the example from this Stackoverflow question: ``` type Vector2D(dx : float, dy : float) = static let zero = Vector2D(0.0, 0.0) static let onex = Vector2D(1.0, 0.0) static let oney = Vector2D(0.0, 1.0) /// Get the zero vector static member Zero = zero ///...
(more)
4 months ago
Edit Post #290096 Post edited:
4 months ago
Edit Post #290096 Post edited:
4 months ago
Edit Post #290497 Initial revision 5 months ago
Answer A: What does F#'s `box` keyword do and where is it documented?
`box` and `unbox` are operators documented in the F# Core API Reference; it tersely states that they box / unbox (respectively) a strongly typed value. + `box a` returns value `a` "wrapped" in a .NET `System.Object` instance "wrapped" here simply means that `a` is upcast to `System.Object`: ...
(more)
5 months ago
Edit Post #290496 Initial revision 5 months ago
Question What does F#'s `box` keyword do and where is it documented?
The Null Values article in the F# Language Reference show an example that uses it, but it does not explain what it does exactly. > You can use the following code to check if an arbitrary value is > `null`. > > match box value with > | null -> printf "The value is null." > | -> p...
(more)
5 months ago
Comment Post #290329 It was the latter (i.e., present finding in an answer). How would you clarify the question? The question arose from my ignorance of how a browser makes sure that a website's SSL certificate is valid. (Hm, perhaps I should put "HTTP" in the question.) I also aimed to ask a fairly general question to i...
(more)
6 months ago
Edit Post #290329 Post edited:
6 months ago
Edit Post #290330 Initial revision 6 months ago
Answer A: How does a client verify a server's SSL certificate? What are the specific steps?
Found this old article at the bottom of the search results to be the best explanation to date: (The longer version is here, SSL Handshake (Sun Java System Directory Server Enterprise Edition 6.0 Reference). If it doesn't work, here's the archived version.) > ### Server Authentication During S...
(more)
6 months ago
Edit Post #290329 Initial revision 6 months ago
Question How does a client verify a server's SSL certificate? What are the specific steps?
I have little to no idea what happens after a client obtains the server's certificate. It has to make sure that it (somehow) valid, but how?
(more)
6 months ago
Edit Post #290275 Post edited:
6 months ago
Edit Post #290275 Post edited:
6 months ago
Edit Post #290275 Post edited:
6 months ago
Edit Post #290275 Initial revision 6 months ago
Answer A: How to programmatically evaluate Excel data validations using .NET?
0. State of the art (as 11/22/2023) The `NPOI.SS.Formula.DataValidationEvaluator` class seems to mirror Apache POI's `DataValidationEvaluator` class, but NPOI's version only implemented the `IsType` method thus far. (For reference, here's Apache POI's `isType`.) There also seems to be no .NET E...
(more)
6 months ago
Edit Post #290274 Initial revision 6 months ago
Question How to programmatically evaluate Excel data validations using .NET?
What I would like to do: 1. Set a cell value. 2. Check with a program if cell values conform to data validation rules. I could extract all the information needed to create a validation function, but I don't want to re-invent the wheel. What I have in mind is along the lines of how NPOI allo...
(more)
6 months ago
Edit Post #290255 Post edited:
6 months ago
Edit Post #290256 Post edited:
6 months ago
Edit Post #290255 Post edited:
6 months ago