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

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

80%
+6 −0
Proper way of sending large amount of data from View to ViewModel

The problem I am working on a simple drawing app for Android. I have a custom view on which the user can draw. This means that a lot of data (a list of points) is generated in this View. I want t...

1 answer  ·  posted 2y ago by FractionalRadix‭  ·  last activity 1y ago by nnlei‭

80%
+6 −0
How to parse a date with more than 3 decimal digits in the fractions of second?

I'm using SimpleDateFormat to parse a string containing a date/time, but the result has a different date, hour, minute, second and millisecond: SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM...

1 answer  ·  posted 1y ago by hkotsubo‭  ·  last activity 1y ago by hkotsubo‭

62%
+3 −1
What is the difference between a hook and a code injection?

I would define a hook as: A piece of code which changes the response to a certain event, without changing the original code that caused the event How is that different than "code injection", if a...

2 answers  ·  posted 2y ago by deleted user  ·  last activity 1y ago by BobJarvis‭

66%
+2 −0
Unable to use pyttx3 (libespeak.so.1: cannot open shared object file: No such file or directory)

from tkinter import * from tkinter import messagebox, filedialog import pyttsx3 import PyPDF2 import os import webbrowser root = Tk() # root.geometry("500x500") root.title("Audio Book") ...

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

71%
+3 −0
How do I redact values when Save()ing a yaml structure with YamlDotNet?

I handle several projects that use yaml files for configuration, and load them with YamlDotNet. It is sometimes useful to log the effective configuration when the program starts, to aid future debu...

0 answers  ·  posted 1y ago by ajv‭  ·  edited 1y ago by Troy‭

40%
+0 −1
Migrating a MediaWiki website to Drupal

I consider to migrate a large MediaWiki website to Drupal 9. All the webpages include MediaWiki syntax, just one example is the link syntax: [[ARTICLE NAME|LINK_TEXT]] for internal links [URL ...

0 answers  ·  posted 1y ago by deleted user

66%
+4 −1
How to get string length in D?

I'm new to D and am planning to use it for golfing. I want to make a ROT13 converter and I want to determine the length of an inputted string. Is there a function for this? If not, what ways can I...

3 answers  ·  posted 1y ago by General Sebast1an‭  ·  last activity 1y ago by hkotsubo‭

37%
+1 −3
theme always not changing [closed]

const body = document.body; const light = evt =&gt; { body.setAttribute('data-theme', 'light'); localStorage.setItem("theme", "light"); console.log("light"); } const dark = ...

0 answers  ·  posted 1y ago by Anonymous‭  ·  closed 1y ago by Alexei‭

83%
+8 −0
Why does Firefox block based on a restrictive default-src directive, when more specific, more permissive *-src exist?

I am working on a website which unfortunately uses a mix of linked and inline CSS and Javascript (and, even more unfortunately, I can't do a lot about the use of inline CSS and Javascript), and am ...

1 answer  ·  posted 1y ago by Canina‭  ·  last activity 1y ago by Moshi‭

25%
+0 −4
Why storing variables inside a variable?

In the past I have read about the fact that some programmers use a variable to hold two or more variables (instead holding a mere value or an array). There might also be cases when programmers use...

1 answer  ·  posted 1y ago by deleted user  ·  edited 1y ago by Derek Elkins‭

80%
+6 −0
error[E0507]: cannot move out of X which is behind a shared reference.

Making a Nannou App that draws a line to the screen. My model only contains the window itself and a vector of tuples describing the points and color. Similar to this example(under Drawing Lines) ...

1 answer  ·  posted 1y ago by telefza‭  ·  last activity 1y ago by telefza‭

77%
+5 −0
What's the difference between =, == and === operators in JavaScript?

While learning JavaScript, I started to see =, == and === operators. What's the difference between them?

3 answers  ·  posted 1y ago by Kevin M. Mansour‭  ·  last activity 1y ago by hkotsubo‭

81%
+7 −0
What's the difference between placing <script> in the <head> and placing in the <body>?

While learning JavaScript, I started to see sometimes the &lt;script&gt; is placed in the &lt;head&gt; and sometimes it is placed in the &lt;body&gt;, What's difference between placing the &lt;scri...

1 answer  ·  posted 1y ago by Kevin M. Mansour‭  ·  last activity 1y ago by Kevin M. Mansour‭

22%
+0 −5
Are the terms "property" and "method" practical in programming languages other than JavaScript? [closed]

I would say that the terms "property" and "method" are basic in JavaScript programming (at least in the context of web/front), but are they basic or common in other programming languages such as C,...

0 answers  ·  posted 1y ago by deleted user  ·  closed 1y ago by Alexei‭

55%
+3 −2
constructor in C

#include&lt;stdio.h&gt; struct Book { char title[20]; char author[20]; int pages; }; void init_Book_types(struct Book* aTitle,struct Book* aAuthor,struct Book* aPages){ aTitle-&gt;ti...

2 answers  ·  posted 1y ago by deleted user  ·  last activity 1y ago by Lorenzo Donati‭

50%
+0 −0
A standard about content types when creating a web shop with Drupal

I would assume the following content types would be standard when creating a web shop with Drupal but maybe I am wrong: Home page Article page Product page Service page Another page Are t...

0 answers  ·  posted 1y ago by deleted user

75%
+4 −0
How do I communicate with a subproject in qmake?

When working with a qmake subdirs project you may want to share configuration between multiple projects. In a less common case you may including a external project within your own as code and want ...

1 answer  ·  posted 1y ago by dmckee‭  ·  last activity 1y ago by dmckee‭

77%
+5 −0
updating a function within a struct

What I want: An object that contains a function that I can update after creation. I created a struct that contains a parameter b and a function(closure?) named Internal_Fn. struct MyThing { ...

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

80%
+6 −0
Strange change of object lightness and colour in Nannou application

Building a Nannou App from their template. I want a circle to slowly fade in color and randomly change color when hitting the boundary of the window. But there is something strange going on when ...

1 answer  ·  posted 1y ago by telefza‭  ·  last activity 1y ago by telefza‭

37%
+1 −3
Why does this code that uses a pointer-to-pointer-to-int segfault?

Hello folks, can someone resolve this seg fault with me please, i can't find the error where it occur. Thank you. #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; int ft_ultimate_range(int *...

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

77%
+5 −0
How to find out which packages target .NET 3.1 in a .NET 5 application?

After upgrading a Web application from ASP.NET Core 3.1 to ASP.NET Core 5.0, it worked fine on an existing server. However, when deployed on a server that had only .NET 5.0 installed, the applicat...

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

83%
+8 −0
Path separator for Atom / JavaScript on Windows

I have developed an Atom package which calls SyncTeX (a utility for reverse lookup for LaTeX), and then opens in Atom the file specified in the SyncTeX response. I'm developing on Linux, but now a ...

0 answers  ·  posted 2y ago by A. Donda‭  ·  last activity 1y ago by Kevin M. Mansour‭

33%
+1 −4
How to call a function from ruby-on-rails (HTML)?

Let I have a button &lt;button type="button" onclick = "myfunction()" class="collapsible"&gt;Expand content&lt;/button&gt; And, I have a JS function. function collapse() { var coll = docu...

1 answer  ·  posted 1y ago by deleted user  ·  last activity 1y ago by Kevin M. Mansour‭

28%
+0 −3
Storing input from different frontend webpages of a multi page contact form

I consider to create a multi page contact form in which there is one backend page but about 5 front-end pages (stage 1-5). Pages 1-4 are input pages and page 5 is for a submit button and a success ...

1 answer  ·  posted 1y ago by deleted user  ·  last activity 1y ago by elgonzo‭

81%
+7 −0
What is a good modern language to use for a Business Rules project?

This is a rather vague question, but I'm trying to solve a specific problem and I'm inexperienced in most of the potential solutions, so please forgive the inherent ambiguity. I have access to a d...

2 answers  ·  posted 1y ago by Sigma‭  ·  last activity 1y ago by meriton‭

37%
+1 −3
Separation of password cookies from all other types of cookies

When I clear my Google Chrome browser history I can clear both "Cookies and other site data" AND "passwords and other sign-in data". Clearing just one of the two would require me to re-login t...

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

62%
+3 −1
Reading contents of XML node

I'm writing some functions in C that parses a part of a XML file (using libxml), but instead of extracting the content of the XML node that has a specific name, it outputs a string that's not in UT...

0 answers  ·  posted 1y ago by southernisles‭  ·  edited 1y ago by Alexei‭

31%
+3 −9
Find the name of the student with the top mark, display their name and mark

I have a CSV file like this: name,surname,score Moon,Walko,148 Jerald,Gryder,150 I need to find the highest score. My attempt: namespace test { class Program { string[...

1 answer  ·  posted 1y ago by InPut‭  ·  last activity 1y ago by FoggyFinder‭

50%
+2 −2
Splitting a large HTML file into two or more HTML files without JavaScript

I am developing a modular HTML-PHP-CSS no-JavaScript (JavaScriptless) contact form and the HTML is becoming increasingly large, around 80 lines (and could easily grow to be significantly larger as ...

1 answer  ·  posted 1y ago by deleted user  ·  edited 1y ago by deleted user

22%
+0 −5
What are the types of contact forms?

I get the impression that there are two general types of contact forms: A regular contact form where all fields are in one webpage ; such form might be very long for a potential customer ("too m...

1 answer  ·  posted 1y ago by deleted user  ·  last activity 1y ago by manassehkatz‭

37%
+1 −3
An HTML form in Hebrew is Right to Left in general but a select list inside it is Left to Right

My HTML form got dir="rtl" attribute and value and in desktop computer systems it appears Right to Left (RTL) but in my mobile device (OnePLus 6) with Android and DuckDuckGo browser, the form's HTM...

0 answers  ·  posted 1y ago by deleted user  ·  edited 1y ago by deleted user

42%
+1 −2
redirect to "main" code in Ruby using Ctrl

In Android Studio, when I click on a variable. It redirects me to where the variable was declared. Even, when coder writes lot of code than, it becomes hard to find "main" object by scrolling. Rub...

2 answers  ·  posted 1y ago by deleted user  ·  last activity 1y ago by ArtOfCode‭

71%
+3 −0
Why use an asterisk after a type?

#include&lt;stdio.h&gt; struct Node{ int data; struct Node* next; }; Here I used an asterisk after Node. What is it used for? What if I don't put any asterisk after Node (both Node...

2 answers  ·  posted 1y ago by deleted user  ·  edited 1y ago by hkotsubo‭

50%
+2 −2
Print value from constructor

#include&lt;iostream&gt; using namespace std; class Book{ public: string title; string author; int pages; Book(string aTitle, string aAuthor, int aPages){ aTitle = title; ...

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

60%
+1 −0
Saving modified data in gridview on clicking SaveButton

I am struggling to do a save button in C# Windows Form Application where I have a GridView and I want to save all modifications I do in GridView Table(I connected it to SQL). This is the data sourc...

1 answer  ·  posted 1y ago by Cri‭  ·  edited 1y ago by Alexei‭

50%
+1 −1
Input taking only first character of a string

I wrote a program named Kernel.c 2 months into my life in programming and created 4 functions at the time, and now there are 7 functions. Recently, I updated the program completely onto an online ...

1 answer  ·  posted 1y ago by General Sebast1an‭  ·  last activity 1y ago by elgonzo‭

80%
+6 −0
How to do "out-of-source" build properly with cmake?

There are two broad types of build environments - in-source and out-of-source. "In-source" means the compiled files will appear in the same directory as source files. "Out-of-source" means there is...

2 answers  ·  posted 2y ago by anatolyg‭  ·  last activity 1y ago by alex‭

66%
+2 −0
Mixing "operational" database models with archiving ones in the database context

Context Our product owner has realized that some entities are duplicated from time to time and that a merge is required. This should clean up existing duplicates and also allow special users to me...

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

50%
+2 −2
Accessibility standard/s for multilined <input type="text"> fields

I have a simple HTML contact form and I wish to create a text area in it with &lt;input type="text"&gt; but without a &lt;textarea&gt; tag. The end product should be an &lt;input type="text"&gt; f...

1 answer  ·  posted 1y ago by deleted user  ·  last activity 1y ago by hkotsubo‭

70%
+5 −1
Where did my proper divisor sum program went wrong?

Here in Python, I created a program for this challenge and I'm having trouble debugging it. I already fixed most errors I have on my program but here's what I have left: x=y=z=[];i=0.0;a=int(input...

1 answer  ·  posted 1y ago by General Sebast1an‭  ·  last activity 1y ago by hkotsubo‭

71%
+3 −0
How to create a MySQL generated column that uses a join in a concat?

I have a column that is a concatenation of 5 other columns plus a join to a different table. UPDATE db.a JOIN db.b ON fk_b = b.pk SET concat_field = CONCAT(field1,field2,field3,b.field,field4,fi...

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

77%
+5 −0
Validate All Object Properties with JSON Schema

I'm writing a JSON schema to validate asset files for a program. The JSON I need to parse is structured so: { "jobs": { "software-developer": { "job-description": "sw-dev.md:0", "pay": 800...

1 answer  ·  posted 1y ago by Josh Hyatt‭  ·  last activity 1y ago by elgonzo‭

83%
+8 −0
How can I emulate regular expression's branch reset in Java?

I've got this sample regex: Pattern p = Pattern.compile("(?:([aeiou]+)[0-9]+|([123]+)[a-z]+)\\W+"); It basically has the following parts: one or more lowercase vowels ([aeiou]+), followed by one ...

2 answers  ·  posted 2y ago by hkotsubo‭  ·  last activity 1y ago by hkotsubo‭

77%
+5 −0
Freeing sub-process resources?

I'm using Python to invoke another program in a sub-process. I've noticed my memory sometimes gets so large as to crash the system, and I'm wondering if I'm not correctly cleaning up the memory som...

0 answers  ·  posted 1y ago by Hyperlynx‭  ·  edited 1y ago by Patol75‭

50%
+0 −0
Can Drupal be used to develop native (non web) applications?

I have used Drupal since 2010 to create websites and I recall a few years back reading that it can be used to create smartphone applications (or something similar). Is this only the "web-integrate...

1 answer  ·  posted 1y ago by deleted user  ·  last activity 1y ago by corporat‭

66%
+2 −0
Why content delivery networks often require a www. redirect?

Why do Content Delivery Networks are often developed in such a way that they would require adding a Cname value such as www. before example.com? I ask this after switching from one CDN (Cloudflare...

2 answers  ·  posted 1y ago by deleted user  ·  last activity 1y ago by corporat‭

33%
+0 −2
Is there a problem in making Captcha an HTML builtin with an attribute setting which type of Captcha

Many web login and contact form features could be set as standard HTML builtins without the need to develop and backend and/or (non HTML) frontend for them, for example: Select field Input Date...

2 answers  ·  posted 1y ago by deleted user  ·  last activity 1y ago by corporat‭

83%
+8 −0
How to set text-align for whole column of HTML table?

To start off, here is the complete HTML of a simple example table: &lt;html lang="en-US"&gt; &lt;head&gt; &lt;title&gt;Title&lt;/title&gt; &lt;style&gt; table { width: 20em; ...

2 answers  ·  posted 1y ago by Olin Lathrop‭  ·  edited 1y ago by Alexei‭

71%
+3 −0
How to retain a service's data between components in Angular 8 ?

I would like to maintain a log that is available to several modules in my Angular 8 system. So I created the following service: @Injectable({ providedIn: 'root' }) export class LogService { ...

1 answer  ·  posted 1y ago by nelson777‭  ·  last activity 1y ago by nelson777‭

77%
+5 −0
Modern CSS for splitting form sections into columns

I have a mobile-only HTML contact form divided in source code into three sections; each section should contain fields by a different context. &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; ...

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