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.
Search
I have created this sensational program: #include <stdio.h> int* func (void) { int local=5; return &local; } int main (void) { printf("%d\n", *func()); } This prints 5 even thoug...
SQL Server uses '1900-01-01' as a "zero-point" in DATEDIFF(dd, 0, some_date): select DATEDIFF(dd, 0, '1900-01-01') --> 0 select DATEDIFF(dd, 0, GETDATE()) --> 44066 days since the "zero-d...
Personally, I'd say that it depends on the question. Over on that other site, this ban was instituted to avoid opinion-based questions. For instance, suppose you asked: Is Angular a great framewor...
I found a confusing construction in several stored procs in an MS SQL 2008 R2 database: DATEADD(dd, 0, DATEDIFF(dd, 0, some_date)) As I understand it, these are the relevant function signatures: D...
I would simply turn off foreign key checks: SET FOREIGN_KEY_CHECKS=0; and make all the changes, and then turn foreign key checks back on: SET FOREIGN_KEY_CHECKS=1;
Facts In relational theory, each row in a relation is uniquely identified by a primary key. That's why some purists say that every table should have a primary key. Foreign keys usually reference a ...
I need to rename one column in 170 tables in a MySQL database and its going really slow. [...] Doesn't make much sense. A column name should be easy to rename and somewhat independent of the data...
I need to rename one column in 170 tables in a MySQL database and its going really slow. The columns all have an index plus a foreign key on them, would dropping the index/temporarily removing the...
One could either do a unique constraint on those foreign keys or a composite primary key on those columns. For elegance, canonicity, a primary key is necessary. You would initially have a primary...
Let's say we have two tables A and B and a join table C that has foreign keys to both A and B and the combination of those foreign keys is unique. One could either do a unique constraint or a comp...
One of the fonts available (to me) on Google Docs is Caveat. The following is in 18-point Caveat on Google Docs: I found that Caveat is available at https://github.com/googlefonts/caveat/tree/ma...
I have recently upgraded Angular CLI from version 9 to version 10 and I simply installed it again. npm install -g @angular/cli Existing version λ ng version Angular CLI: 9.1.8 Node: 12.18.0 OS: w...
Angular CLI official page indicated how to install the CLI, but provides no information about how to upgrade it. I am interested in how to upgrade the CLI.
A good start would be the most popular tags from Stack Overflow. Another approach is to start from scratch and search for tags on Stack Overflow whenever needed. Those tags are already curated and ...
Let's start with this perl at https://www.json.org/json-en.html: A number is very much like a C or Java number, except that the octal and hexadecimal formats are not used. That's an extremely imp...
Context Over the years I had a hard time addressing questions about software architecture like these ones . Soon after posting them, they receive a couple of downvotes and close votes which set the...
I am using MediatR in an ASP.NET Core 3.1 application and I want use a generic query and a generic request that deals with getting lists of some standard items I am using in drop-downs and similar:...
I saw at least one compiler (Codewarrior for HC12) warn me if I use a function without using it's return value. [...] Ye, for that's the right choice. [...] Other compilers (clang/gcc) do not is...
Why SDL (the Simple Directmedia Layer) apps are showing in a single quarter of the window, while the other three are blacked out, and what can I do about it? I'm using Xcode. I think this started h...
My team lead, pointed out the issue. As I could not find the issue/solution here, posting it for others. I knew I could not use windows authentication, so I was trying to use SQL Server Authentica...
I just completed my first install of SQL as a server-based, Enterprise Edition. I wanted to check it out using SSMS on PC using my Admin Access. But could not connect. For security reasons my adm...
I'm trying to make a trait method callable on mutable slices of a type implementing that trait (see main). Rust doesn't like me for it. use core::convert::AsMut; trait A { type B; fn f(m: ...
I recently suggested an edit to an answer. Basically, I formatted some code, adding code fences around it: But at the "Review suggested edit" page, the differences are not clearly displayed. I...
JSON is a standard. Performance is implementation specific and dependent on what is being done with the data. The answer really depends on what your environment is. Some languages may have slight p...
Before doing any performance testing, I think you have already noticed that the payload is significantly smaller by missing those double quotes. However, what I think is more important, especially ...