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.
Posts by Peter Taylor
If you remove the align="left" then it works fine. My best guess is that you put those in because you didn't want the image in the text flow, affecting the vertical positioning on the text. The ea...
To whether the tag is useful: no. It's useful for tagging people ("this person does frontend and backend") but not questions. I don't see the point of adding "do not use": just delete the tag, whi...
This can't be done with the standard library. It's quite common for people who want to do this to define their own extension method public static void Foreach<T>(this IEnumerable<T> it...
Interpreters are easier to write than compilers. For this reason esoteric and toy languages are often implemented by interpretation. But the dichotomy between interpreted and compiled languages is...
This is a class from my personal code library, and from a package which deals with integer sequences. It implements an interface package org.cheddarmonk.math.sequence; public interface IntegerSequ...
Wrong operator. To test for NULL, use the IS NULL and IS NOT NULL operators ... You cannot use arithmetic comparison operators such as =, <, or <> to test for NULL.
This should perhaps be a comment rather than an answer, but I want to allow people to vote to indicate agreement or disagreement. "Complete code" doesn't necessarily mean an entire project. It mea...
Is there any disadvantage of doing it this way that I should be aware of? In general whitelisting is the best way to sanitise, but it does create important error classes, especially missing it...
<Window x:Class="Login_App.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns...
C# language version 8.0 introduces limited support for static methods, operators, etc. in interfaces. However, there are still limitations. I was hoping to use the new language features to try a ge...
A cancellation token doesn't inherently do anything. It's up to the code which does the work to call ThrowIfCancellationRequested. If the token isn't passed on and isn't explicitly checked then the...
The short answer is that it can't be done. C# doesn't support type functions. https://github.com/dotnet/csharplang/issues/339 is probably the issue to follow if you want to track their progress. W...
My assumption is that, internally, log4net loads its XML file into some data structure (maybe not a dict, but some equivalent of cfg_dict above) and then passes that structure to whatever code ma...
The date is sent in the form submission in ISO 8601 format (year-month-day). You can reformat it in the form handler as follows: $input_date = $_REQUEST['cf_input_date']; if ($input_date) { ...
Problem I'm trying to update some projects from old-style .csproj: <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.mi...
Overall the structure seems sensible. Style It's Python style to have two blank lines after a function or method, not just one. You seem to be trying to line wrap before 80 characters. Maybe you...
The scope currently lists as on-topic: Best practices, as long as clear "best" criteria are provided. Examples: fastest execution, least memory use, widest tool support for a target, most begi...
echo "Enter Latitude\n"; $handle = fopen("php://stdin", "r"); $lat = deg2rad(trim(fgets($handle))); fclose($handle); echo "Enter Longitude\n"; $handle = fopen("php://stdin", "r"); $long = deg2rad(...
I have a project Anonymised.Theme which contains XAML resource dictionaries for a theme. This is used by about a dozen applications which simply include it by merging <ResourceDictionary Source...
However, the last variant has the advantage (at least in my opinion) that the condition The IV of the encryption is required for decryption is eliminated. It isn't really. It's just generated ...
private readonly int _checkInterval; What are the units? I have to search for usages to find out. I strongly favour using TimeSpan instead of int. private static readonly SemaphoreS...
I decided to tackle this again via the route of creating a new solution project-by-project, and this time the configuration manager actually did something useful. Specifically, it added a property ...
I understand that in object oriented programming, an object is an instance of a class. Not necessarily. JavaScript famously supported object-oriented programming but did not support classes un...
The question seems to show a certain level of confusion about terminology. I shall address what I believe to be the underlying question: How can I store binary data in SQLite? SQLite supports 5 da...
Situation: I have an Azure account which has management permissions for various subscriptions in various directories (tenants). I have a GUI tool to do various management tasks whose details are ir...