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 Peter Taylor‭

Type On... Excerpt Status Date
Comment Post #281095 @JohnDoea , I saw the proposed edit before the change to the question and it seemed to make the answer worse rather than better. I can apply the changes again though, fixing the typo.
(more)
over 3 years ago
Edit Post #281095 Initial revision over 3 years ago
Answer A: Running remote scripts (cloud scripts) locally --- valid and securely as possible
> An example for a current problem; the file downloaded can have a trivial name such as install.sh and collide with similar files (the rm is especially problematic here I think). This is why `tempfile` exists. FILENAME=`tempfile` cd DESTINATION && wget -O ${FILENAME} https://raw.g...
(more)
over 3 years ago
Comment Post #278907 `while(arr[index++] != 0);` does *not* accomplish the same thing, because it increments `index` one more time than `while(arr[index] != 0) index++;`
(more)
almost 4 years ago
Edit Post #280924 Initial revision almost 4 years ago
Answer A: Update list based on presence of identifier in a second list
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(this IEnumerable items, Action action) { foreach (var item in items) action(item); } which would allow the one-li...
(more)
almost 4 years ago
Comment Post #280755 @elgonzo, that's pretty much what I suspected. For my immediate purposes it's not strictly necessary to use an interface, but using an abstract class instead eliminates some interesting future directions. E.g. an orderable subtype and a field subtype couldn't be combined to an orderable field subtype...
(more)
almost 4 years ago
Edit Post #280755 Initial revision almost 4 years ago
Question F-bounded polymorphism, interface operators, and type inference in C#
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 generic approach to abstract algebra with proper operator overloading, but I'm running into the limitation...
(more)
almost 4 years ago
Comment Post #280658 @ghost-in-the-zsh, not CPython, [Cython](https://cython.org/).
(more)
almost 4 years ago
Comment Post #280670 @Marc.2377, your example looks like it will compile. I don't know whether the example signature is the best one for your situation, because I'm very short on context. This may be a situation where you should iterate two or three steps of asking "Why do I want to do that?" and then formulate a new que...
(more)
almost 4 years ago
Edit Post #280670 Initial revision almost 4 years ago
Answer A: Declaring interface members with generic return types: "The type parameter [generic type] cannot be used with type arguments"
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. Workarounds are going to require another type parameter and probably a factory method: e.g. ...
(more)
almost 4 years ago
Comment Post #280665 I'm confused. https://docs.microsoft.com/en-us/dotnet/api/system.data.entity.dbcontext?view=entity-framework-6.2.0 doesn't list any `Add` method. Is that the wrong `DbContext`?
(more)
almost 4 years ago
Edit Post #280658 Initial revision almost 4 years ago
Answer A: Interpreted language: What is its benefit for being written in that way ?
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 a false one: a sufficiently popular language which initially has only an interpreter may well lat...
(more)
almost 4 years ago
Edit Post #280527 Initial revision almost 4 years ago
Answer A: C# MVVM Login Project
> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > xmlns:d="http://schemas.microsoft.com/expression/blend/2008" > xmlns:mc="http://schemas.openxmlformats.org/markup-comp...
(more)
almost 4 years ago
Edit Post #280473 Initial revision almost 4 years ago
Question How to define custom configurations in new-style .csproj?
Problem I'm trying to update some projects from old-style .csproj: >  > > etc. to new-style: >  > etc. One group of projects has a custom configuration, in addition to the standard `Debug` and `Release`. After I convert a project from this group, VS gives ...
(more)
almost 4 years ago
Edit Post #280397 Initial revision almost 4 years ago
Answer A: Do we need the fullstack tag?
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, which is only on one question.
(more)
almost 4 years ago
Comment Post #279597 @Martin, I know: that was the assumption which seemed reasonable, and I don't think that "requiring that both are present" was in the question when I wrote the answer - but I can't check, because the [history has gone missing](https://meta.codidact.com/posts/279687).
(more)
almost 4 years ago
Answer A: How can I write an egrep (grep -E) regexp that matches lines containing two stanzas in arbitrary order?
This doesn't answer the question in full generality, but the assumption made seems reasonable to me: match lines containing `(x1=y2;|c5=c6;)` twice. I.e. ^(([^;]+; )(x1=y2;|c5=c6;) ?){2}
(more)
about 4 years ago
Edit Post #279115 Initial revision about 4 years ago
Answer A: How to make Microsoft.Build.Evaluation.Project use same base properties as Visual Studio?
By forking MSBuildLocator and basically just removing the `#ifdef` it's straightforward to list the available VS instances. It even works to register one, although if you want the same application to properly support both .Net Core and .Net Framework projects then you have to process them in differen...
(more)
about 4 years ago
Comment Post #279087 Having tracked things through to https://github.com/microsoft/MSBuildLocator/blob/master/src/MSBuildLocator/MSBuildLocator.cs I'm rather pessimistic: it seems that `Microsoft.Build` is specifically set up to be unable to simultaneously be aware of the existence of .Net Framework and .Net Core, so tha...
(more)
about 4 years ago
Edit Post #279087 Initial revision about 4 years ago
Question How to make Microsoft.Build.Evaluation.Project use same base properties as Visual Studio?
`Microsoft.Build.Evaluation.Project` seems to have some rather odd ideas of what values to use when loading projects. In particular, I have a number of projects with the following dependency: Visual Studio consumes these projects without any problems, but if I try to load one of them with ...
(more)
about 4 years ago
Edit Post #279027 Initial revision about 4 years ago
Answer A: What is the point of tagging a question with both a parent and a child tag?
Tags also serve for someone who stumbles across the question directly from a third party link to find related content. Perhaps the child tag would suffice if the parent tag is automatically inserted in the page.
(more)
about 4 years ago
Edit Post #278862 Initial revision about 4 years ago
Answer A: PHP script to create a KML square centred on a point.
> 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(trim(fgets($handle))); > fclose($handle); > ech...
(more)
about 4 years ago
Comment Post #278791 @Moshi, for people who mainly work close to the hardware, memory will probably be the salient meaning; for people who mainly work in high-level algorithm design, the abstract data structure also known as a priority queue will probably be the salient meaning; and there's probably a large number for wh...
(more)
about 4 years ago
Comment Post #278832 Possibly [spreadsheet-formula] would work, with extra tags ([excel] and [google-sheets] already exist) where the question is about something specific to one engine.
(more)
about 4 years ago
Comment Post #278751 @President, the sieve of Eratosthenes is faster for calculating all the primes from 2 up to N for reasonably sized N, but if you just want the first prime after 2^50 then Atkin-Bernstein should be faster. `LRUCache` is only a performance tweak: for simply running the code, it would suffice to comment...
(more)
about 4 years ago
Edit Post #278751 Initial revision about 4 years ago
Question Improved Atkin-Bernstein sieve for generating primes
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 IntegerSequence extends Iterable { public int offset(); public int size(); public java.math.BigIn...
(more)
about 4 years ago
Comment Post #278265 +1 but I'm wary of the point about best practices. Real praxis is rarely about optimising one factor at the cost of all else: it's about finding a compromise which isn't unnecessarily slow *or* unnecessarily hard to read *or* non-portable without documented reasoning, etc.
(more)
about 4 years ago
Comment Post #278061 I had the same thought as aCVn. The question seems to be about using human-readable class names vs cargo-cult application of atomic styling.
(more)
over 4 years ago
Edit Post #277999 Initial revision over 4 years ago
Answer A: Is it recommended for ASP.NET Web API actions to always include a CancellationToken?
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 there's no point passing it in. If the real question is whether to call `ThrowIfCancellationRequested`...
(more)
over 4 years ago
Comment Post #277896 @EJP, regular expression != regex. Regex languages vary in power from Chomsky level 1 to 4.
(more)
over 4 years ago
Comment Post #277885 Not an answer because I don't have a test environment to see whether it works, but have you tried (a) `javax.xml.accessExternalSchema = http` in `jaxp.properties`; (b) searching all files for other references to `javax.xml.accessExternalSchema` which might have priority; (c) logging `System.getProper...
(more)
over 4 years ago
Edit Post #277235 Post edited over 4 years ago
Comment Post #277263 Speaking as someone who has a *lot* of experience on codegolf.SE: writing a good spec for a challenge is *hard*. There's a reason that PPCG has a sandbox in meta and strongly encourages everyone to use it. And while there's obviously "real world" professional value in learning how to write a watertig...
(more)
over 4 years ago
Suggested Edit Post #277235 Suggested edit:
sp
(more)
helpful over 4 years ago
Comment Post #277183 In what way is writing a sed script *not* software development? The only grey issue I can see with the quoted subtitle is firmware programming.
(more)
over 4 years ago