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 »
Q&A

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.

General Q&A about programming, scripting, software design & architecture, process, tools, testing, and more.

Filters (None)
81%
+7 −0
Function call; `this` gets bound to unexpected value

I recently encountered a strange situation in javascript; if I have: let obj = { a: function() { return (this === obj) ? this.b : 'bye'; }, b: 'hello' }; I can call obj.a with this bound...

2 answers  ·  posted 3y ago by Gershy‭  ·  last activity 3y ago by Alexei‭

77%
+12 −2
What gets allocated on the stack and the heap?

I was told by my professor/book that computer programs use two kinds of memory and that all variables get allocated either on the stack or on the heap. Is this true? How can I tell where a variable...

2 answers  ·  posted 3y ago by Lundin‭  ·  edited 3y ago by Alexei‭

80%
+6 −0
How are integers interpreted in contexts that expect a date?

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...

1 answer  ·  posted 3y ago by ajv‭  ·  edited 3y ago by Alexei‭

66%
+2 −0
Xcode, SDL app showing in a single quarter of the window.

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...

0 answers  ·  posted 3y ago by .                                                .‭  ·  edited 3y ago by .                                                .‭

77%
+5 −0
How does Caveat work?

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...

0 answers  ·  posted 3y ago by msh210‭  ·  edited 3y ago by Alexei‭

60%
+1 −0
How to use LazyCache library with Unity Container?

I want to use LazyCache and UnityContainer together in an ASP.NET classic application (.NET framework 4.6.1+). Namely, to be able to inject IAppCache in various services. For ASP.NET Core and its d...

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Alexei‭

77%
+5 −0
What would the pros and cons of storing the compiled CSS output of SASS in version control?

If one is using SASS to build a websites CSS and using version control one can either, Keep both the SASS and the resulting CSS files in version control. Only storing the SASS files in version con...

4 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by ben‭

71%
+3 −0
How to calculate how much data is stored in a MySQL column?

I am considering either removing some columns or changing the datatypes if I could significantly reduce the amount of storage that is currently used by those columns. Some of the columns are ints a...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by Alexei‭

75%
+4 −0
Would a MySQL database run more efficiently with smaller varchar lengths?

I have a database with quite a few VARCHAR fields. When the database was first built the lengths of the columns were set a bit larger than absolutely necessary. Now after, having used the DB for a ...

3 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by manassehkatz‭

71%
+3 −0
Error: 18456, Severity: 14, State: 5; SSMS > Network sever from PC

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...

1 answer  ·  posted 3y ago by James Jenkins‭  ·  edited 3y ago by Alexei‭

80%
+6 −0
Is there a naming convention for table aliases?

Sometimes, either to reduce the amount of typing big table names or when joining a table to itself one will need to alias a table. Personally I find SQL statements with aliases harder to read and a...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Alexei‭

75%
+4 −0
What is a standard definition (or a CS theory based formal definition) for Escaping?

I personally would define "escaping" in software development in general and coding in particular as follows: Making an exception to match data which otherwise would not be allowed to be matched: I...

1 answer  ·  posted 3y ago by deleted user  ·  edited 3y ago by Alexei‭

66%
+2 −0
pod 0.1.0-dev not accepted for required version 0.1.0 (without -dev suffix)

I have following setup: flutter plugin with an example app the plugin depends on a native library (flutter_plugin.podspec contains s.dependency 'native-lib', '0.1.0') for local development I pull ...

0 answers  ·  posted 3y ago by Someone‭  ·  edited 3y ago by Someone‭

75%
+4 −0
How can I generate documentation from comments in SQL DDL?

I have some SQL scripts that contain DDL to create tables and schemas for a database. I'd like to be able to comment this SQL and then use those comments to generate output documentation (in HTML)...

0 answers  ·  posted 3y ago by Monica Cellio‭  ·  edited 3y ago by Monica Cellio‭

81%
+11 −1
Why would excluding records by creating a temporary table of their primary keys be faster than simply excluding by value?

I have two tables with millions of records. Every so often I need to join them and exclude just a handful of records where a bit(1) column is set to 1 instead of 0. I can do it with either, WHERE ...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Alexei‭

75%
+4 −0
How do I get IIS UrlRewrite to handle CSS-delivered woff files appropriately?

Context: Azure; Windows Server 2012; IIS 8 First up, here's the (redacted) web.config for reference <rewrite> <rules> <rule name="ReverseProxyInboundRule1" stopProcessing="false"&...

0 answers  ·  posted 3y ago by bugmagnet‭  ·  edited 3y ago by Alexei‭

77%
+5 −0
Handling JSON files in Rust without manually creating mapping classes

I have JSON that looks something like this: {"id":"n-fsdf-6b6", "name":"JohnSmith", "revisionDate":1591072274000} The JSON data is named CharacterInfo. It comes from a static external URL. The str...

1 answer  ·  posted 3y ago by dustytrash‭  ·  last activity 3y ago by r~~‭

71%
+3 −0
How do I configure Jenkins to strip the leading “origin/” in git branch parameter?

I'm using Jenkins with a branch parameter to specify the branch to build from. Other stuff downstream needs the branch name to not have the leading "origin/" -- just "feature/blahblah" or "bugfix/1...

1 answer  ·  posted 3y ago by Monica Cellio‭  ·  last activity 3y ago by Monica Cellio‭

60%
+1 −0
What is the rationale of having Cascade as a DeleteAction in EntityFramework.Core?

I have noticed some time ago that Entity Framework assumes a CASCADE behaviour (implicit value, if not specified) for referential constraints (FKs) when deleting items. This means that by default, ...

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Alexei‭

66%
+2 −0
Will my implementation of a Spring Boot app work after being deployed on the Internet?

Say I want to implement a very basic group chat application. I use the H2 database, a user class, a controller, and a text file in the Resources folder that stores the chat texts. All texts would b...

1 answer  ·  posted 3y ago by sonofel‭  ·  last activity 3y ago by Moshi‭

81%
+7 −0
Why can't we mix increment operators like i++ with other operators?

I'm experimenting with different operators and have a hard time understanding the outcome of certain expressions. I try to combine the ++ operators with other operators such as assignment in the sa...

1 answer  ·  posted 3y ago by Lundin‭  ·  last activity 3y ago by Lundin‭

75%
+4 −0
Implementing impersonation in an ASP.NET Core Web application

I am working at a proof-of-concept for porting an ASP.NET MVC application to an ASP.NET Core API + Angular SPA. One of the features of the existing application is the ability of an admin (typically...

0 answers  ·  posted 3y ago by Alexei‭

71%
+3 −0
Keras model evaluate returns triggered tf.function retracing warning

I am training the following model using Keras as shown: model = tf.keras.models.Sequential([tf.keras.layers.Conv2D(64, (3,3), activation='relu', input_shape=(256, 256, 3)), tf.keras.layers.MaxPooli...

0 answers  ·  posted 3y ago by Guilherme Costa‭

77%
+5 −0
Search tree supporting efficient bulk sequential insert

For holding ordered sets of keys, there are well-known data structures (the red-black tree, for example) that support O(log(n)) lookup and insertion algorithms. Of course this means that there triv...

0 answers  ·  posted 3y ago by r~~‭  ·  edited 3y ago by r~~‭

75%
+4 −0
dig -6 works but dig -4 does not

I can't get a response from IPv4 dig on my server but I can get one from IPv6 dig. See the below output: $ dig +short myip.opendns.com a @resolver1.opendns.com # Doesn't return anything, this used ...

1 answer  ·  posted 3y ago by cobertos‭  ·  last activity 3y ago by Canina‭

70%
+5 −1
What do the number entries mean in the sympy poly.diff(...) tuple syntax?

I am looking to take a partial derivative of a sympy polynomial with respect to a symbol in the polynomial. In the sympy documentation for poly.diff(...) it gives sample code like this: from sympy ...

2 answers  ·  posted 3y ago by jrh‭  ·  last activity 3y ago by Derek Elkins‭

80%
+6 −0
Are generic enums completely abstract?

When using Result or Option to get a value, the value is wrapped in a Ok or Some. For example, with pattern matching to get a Result: let var: Json = match serde_json::from_str(&my_string) { ...

1 answer  ·  posted 3y ago by jla‭  ·  last activity 3y ago by Derek Elkins‭

75%
+4 −0
Is there an equivalent way of returning early in a MySQL stored procedure?

In programming instead of arrowcode where one has many layers of indented if statements, you can return a result as soon as possible. So instead of, if if end if end if It looks like if ret...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Moshi‭

50%
+2 −2
Having trouble adding include directories

I'm trying to set up a simple test project, to unit test a change I'm working on. The change is to a file inside some existing project. I've tried to set up the includes as the original has it, but...

1 answer  ·  posted 3y ago by Hyperlynx‭  ·  last activity 3y ago by Hyperlynx‭

15%
+1 −14
What is the worst code you ever saw? [closed]

In the interest of learning from the mistakes of other people: What is the worst code you ever saw? What made it so bad?

1 answer  ·  posted 3y ago by meriton‭  ·  closed 3y ago by Mithical‭

60%
+1 −0
What is happening under the hood to the selected data in a MySQL cursor?

I have a number of MySQL stored procedures that use a cursor to go through a select and then pass the results to other stored procedures one row at a time. This can take a while to run, what is hap...

0 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Charlie Brumbaugh‭

83%
+8 −0
Is there a way to estimate the execution time of a statement in MySQL?

From time to time I will have large structural changes to make on my MySQL DB, things like adding columns, changing datatypes, adding indexes etc. These types of changes result in downtime and what...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by meriton‭

86%
+11 −0
Can regex be used to check if input conforms to a very strict subset of HTML?

Tldr; I don't need to parse HTML, but I need to check if user submitted input conforms to a very strict subset of HTML. Can regex be a suitable tool for this? Details I have a frontend sanitiser th...

4 answers  ·  posted 3y ago by jla‭  ·  last activity 3y ago by Stephen C‭

83%
+8 −0
How can I define a method on [&mut T] where T: MyTrait?

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: ...

1 answer  ·  posted 3y ago by wizzwizz4‭  ·  last activity 3y ago by r~~‭

60%
+1 −0
In a stored procedure, is it possible to get the total number or rows updated by different statements?

I have a bunch of stored procedures that look like something this CREATE PROCEDURE example() BEGIN UPDATE STATEMENT A; UPDATE STATEMENT B; UPDATE STATEMENT C; END// When I run them thr...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by Alexei‭

57%
+2 −1
How can I reduce the size of .svn folder?

Note: This question and its answer are an aggregate of the most up to date information about this topic from here. I have noticed that .svn folder has grown a lot and I want to reduce it. How can ...

1 answer  ·  posted 3y ago by Alexei‭  ·  edited 3y ago by r~~‭

66%
+2 −0
How to perform LINQ joins with multiple fields in a single join?

Note: this is an aggregate of the answer provided for this question. I want to get the LINQ equivalent of the following from SQL: SELECT .. FROM entity1 e1 JOIN entity2 e2 ON e1.field1 = e2.fie...

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Alexei‭

50%
+4 −4
Is concatenation a logical AND?

As a person with no significant background in mathematics and computer science I thought that concatenation and AND are logically identical if not very similar because both add something to somethi...

3 answers  ·  posted 3y ago by deleted user  ·  edited 3y ago by deleted user

71%
+3 −0
How long in days is a MONTH in MySQL?

If one finds where the past number of months equals the past number of days like this, select distinct DATE_SUB(now(), INTERVAL 92 DAY),DATE_SUB(now(), INTERVAL 3 MONTH) The numbers that are curre...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by r~~‭

71%
+3 −0
connect with SLOT/SIGNAL: QPushButton clicked signal not received by main window

I added a QPushButton to my ui file named pushButton, and manually connected it using connect. There are no errors or warnings emitted at any point in the compilation stage The button does show up...

1 answer  ·  posted 3y ago by jrh‭  ·  last activity 3y ago by jrh‭

76%
+8 −1
Styling with classes vs styling with CSS

I've noticed that a lot of sites have something like this going on: <div class="has-margin-0 has-padding-4"> <div>...</div> <div>...</div> ... </div>...

1 answer  ·  posted 3y ago by Moshi‭  ·  last activity 3y ago by luap42‭

33%
+0 −2
How do I find all the tables in a database that don't have a specific column?

I need to add one column with the same name to all of the tables in my database, how can I find which tables don't currently have a column with that name?

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by Charlie Brumbaugh‭

80%
+6 −0
Is it recommended for ASP.NET Web API actions to always include a CancellationToken?

Note: This is basically a question from Stack Overflow that was closed for a very long period of time and I fear it might get closed again as primarily opinion based. I am wondering if my ASP.NET C...

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Peter Taylor‭

71%
+3 −0
Include a Blazor Webassembly project into an existing ASP.NET Core project

When creating a new Blazor Webassembly project, there is a checkbox ASP.NET Core hosted where if selected will create three projects at once, a blazor webassembly project, an ASP.NET Core project, ...

1 answer  ·  posted 3y ago by ndc‭  ·  last activity 3y ago by ndc‭

71%
+3 −0
What options can be set via swing.properties?

The default Swing look and feel can be set in $JAVA_HOME/conf/swing.properties What else can be set in this file? I can't find any other documentation of it.

1 answer  ·  posted 3y ago by ajv‭  ·  last activity 3y ago by Stephen C‭

66%
+2 −0
Nodejs wrap async function in synchronous function

I am writing a spoof of the fs module; the actual storage mechanism is not the the filesystem but rather a database. Overall, however, the api will function exactly like fs. So far my code is compa...

1 answer  ·  posted 3y ago by Gershy‭  ·  last activity 3y ago by Moshi‭

66%
+2 −0
How to protect the git respository for a public_html folder on a Linux server?

On a Linux server, if you leave the .git folder unprotected in the public_html folder, its possible that someone could download the folder and then gain access to your files. There are two ways I h...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by .                                                .‭

66%
+2 −0
Validating xsd schema that contains import from external http source in Java 11

In the example.xsd file I have an import to an external xsd file that looks like this: <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://test.example.com" ...

0 answers  ·  posted 3y ago by Janar‭  ·  edited 3y ago by Monica Cellio‭

83%
+8 −0
Should I cast to (void) when I do not use the return value

I saw at least one compiler (Codewarrior for HC12) warn me if I use a function without using it's return value. Other compilers (clang/gcc) do not issue a warning though, even when using the std=90...

3 answers  ·  posted 3y ago by Kami‭  ·  edited 3y ago by Monica Cellio‭

50%
+1 −1
How to temporarily disable a MySQL user?

Sometimes I will need to temporarily lock out other MySQL users when I am making large structure changes and want to make sure that nobody else is inputting or changing the data. The other use case...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Charlie Brumbaugh‭