# Programming Questions

**URL:** https://forum.codeselfstudy.com/c/programming-questions/15.md

[Latest](https://forum.codeselfstudy.com/latest.md) · [Categories](https://forum.codeselfstudy.com/categories.md) · [Tags](https://forum.codeselfstudy.com/tags.md)

---

## [About the Programming Questions category](https://forum.codeselfstudy.com/t/about-the-programming-questions-category/33)

<div class="topic-metadata">

**Author:** [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Replies:** 0\
**Last updated:** [December 16, 2017, 11:10pm UTC](https://forum.codeselfstudy.com/t/about-the-programming-questions-category/33 "2017-12-16T23:10:04Z")

</div>

This section of the forum is for asking programming questions. Please make your post titles descriptive.

---

## [Loop Invariants](https://forum.codeselfstudy.com/t/loop-invariants/2896)

<div class="topic-metadata">

**Author:** [@andy](https://forum.codeselfstudy.com/u/andy)\
**Replies:** 3\
**Last updated:** [April 23, 2025, 3:46pm UTC](https://forum.codeselfstudy.com/t/loop-invariants/2896 "2025-04-23T15:46:13Z")

</div>

I am reading about loop invariants and I don’t understand one thing: For algorithm r = c while r \> 0: r = 31 \* r % 73 Is r \< 73 loop invariant? Answer in the book says yes, but from what I understand loop invariant…

---

## [How to store arrays in MySQL? (A: Many to many tables)](https://forum.codeselfstudy.com/t/how-to-store-arrays-in-mysql-a-many-to-many-tables/2648)

<div class="topic-metadata">

**Author:** [@PaulH](https://forum.codeselfstudy.com/u/PaulH)\
**Replies:** 0\
**Last updated:** [May 26, 2021, 8:11pm UTC](https://forum.codeselfstudy.com/t/how-to-store-arrays-in-mysql-a-many-to-many-tables/2648 "2021-05-26T20:11:45Z")

</div>

I am trying to create a way for users to select nutrients they are interested in. I want to store this nutrient preference in a MySQL table. The best way I can think to do this is to store the nutrients as an array. So …

---

## [Adding SCSS to a Node Express Parcel and Handlebars project (And possibly gulp?)](https://forum.codeselfstudy.com/t/adding-scss-to-a-node-express-parcel-and-handlebars-project-and-possibly-gulp/2533)

<div class="topic-metadata">

**Author:** [@PaulH](https://forum.codeselfstudy.com/u/PaulH)\
**Replies:** 5\
**Last updated:** [January 5, 2021, 7:23am UTC](https://forum.codeselfstudy.com/t/adding-scss-to-a-node-express-parcel-and-handlebars-project-and-possibly-gulp/2533 "2021-01-05T07:23:36Z")

</div>

Hello, I am trying to add SCSS to a Node/Express project (per this Node/Express Guide) I use parcel as a bundler. Looking at the parcel docs it suggests you can just inline the scss once you install the npm parcel SCS…

---

## [Best way to handle routing with parameters in Express?](https://forum.codeselfstudy.com/t/best-way-to-handle-routing-with-parameters-in-express/2432)

<div class="topic-metadata">

**Author:** [@PaulH](https://forum.codeselfstudy.com/u/PaulH)\
**Replies:** 1\
**Last updated:** [September 21, 2020, 11:38pm UTC](https://forum.codeselfstudy.com/t/best-way-to-handle-routing-with-parameters-in-express/2432 "2020-09-21T23:38:49Z")

</div>

I am following this tutorial on building a Node/Express app. Now the issue I am having is how to route requests with parameters. For example a route will look like this with a pagename and then 3-6 parameters page-nam…

---

## [How to improve a gulp rename and minify recipe?](https://forum.codeselfstudy.com/t/how-to-improve-a-gulp-rename-and-minify-recipe/2411)

<div class="topic-metadata">

**Author:** [@PaulH](https://forum.codeselfstudy.com/u/PaulH)\
**Replies:** 2\
**Last updated:** [August 16, 2020, 1:57am UTC](https://forum.codeselfstudy.com/t/how-to-improve-a-gulp-rename-and-minify-recipe/2411 "2020-08-16T01:57:34Z")

</div>

I am using gulp to minify Javascript, but including it in handlebars. So I have to rename the file to .js then minify it, and then rename it back to .hbs I do this in 3 steps as follows: gulp.task('footer-rename', fu…

---

## [How to Configure Redis for Development?](https://forum.codeselfstudy.com/t/how-to-configure-redis-for-development/2407)

<div class="topic-metadata">

**Author:** [@PaulH](https://forum.codeselfstudy.com/u/PaulH)\
**Replies:** 2\
**Last updated:** [August 14, 2020, 10:41pm UTC](https://forum.codeselfstudy.com/t/how-to-configure-redis-for-development/2407 "2020-08-14T22:41:04Z")

</div>

So I have installed Redis following this guide from digital ocean: I have it running on local server to mirror what will happen in development, however, now the problem is that all pages get cached, and changes I make …

---

## [How to Load Production Files with Express?](https://forum.codeselfstudy.com/t/how-to-load-production-files-with-express/2408)

<div class="topic-metadata">

**Author:** [@PaulH](https://forum.codeselfstudy.com/u/PaulH)\
**Replies:** 7\
**Last updated:** [August 14, 2020, 5:09am UTC](https://forum.codeselfstudy.com/t/how-to-load-production-files-with-express/2408 "2020-08-14T05:09:21Z")

</div>

So I am running into a problem when deploying express to indicate whether I am in production or development. I am using Node/Express/Handlebars per this guide: \[Tutorial\] An Introduction to Node.js Servers (and Express.…

---

## [Watch more than one folder with Parcel and remove console logging](https://forum.codeselfstudy.com/t/watch-more-than-one-folder-with-parcel-and-remove-console-logging/2343)

<div class="topic-metadata">

**Author:** [@PaulH](https://forum.codeselfstudy.com/u/PaulH)\
**Replies:** 3\
**Last updated:** [June 4, 2020, 9:48pm UTC](https://forum.codeselfstudy.com/t/watch-more-than-one-folder-with-parcel-and-remove-console-logging/2343 "2020-06-04T21:48:31Z")

</div>

I am wondering how to configure my package.json with Parcel so it can watch multiple folders, here is the JSON I have so far: { "name": "ProjectName", "private": true, "version": "0.1.0", "description": …

---

## [JSON Questions (How to manage, sort, and change JSON)](https://forum.codeselfstudy.com/t/json-questions-how-to-manage-sort-and-change-json/2276)

<div class="topic-metadata">

**Author:** [@PaulH](https://forum.codeselfstudy.com/u/PaulH)\
**Replies:** 6\
**Last updated:** [May 5, 2020, 3:38am UTC](https://forum.codeselfstudy.com/t/json-questions-how-to-manage-sort-and-change-json/2276 "2020-05-05T03:38:54Z")

</div>

So I have list of serving sizes and their weights in a JSON object: var servingsizes={ oz: \[ 28.35, '1 oz' \], wt1: \[ 125, '1 cup, quartered or chopped' \], wt2: \[ 109, '1 cup slices' \], wt3: \[ 223, '1 large (3-1/4 …

---

## [Node and SQL questions](https://forum.codeselfstudy.com/t/node-and-sql-questions/2273)

<div class="topic-metadata">

**Author:** [@PaulH](https://forum.codeselfstudy.com/u/PaulH)\
**Replies:** 9\
**Last updated:** [May 1, 2020, 9:21pm UTC](https://forum.codeselfstudy.com/t/node-and-sql-questions/2273 "2020-05-01T21:21:48Z")

</div>

SOLVED! :slight\_smile: I am trying to use node to update a MySQL table without using express. What I want to do is query my table. Then loop through every item and then convert several of the serving sizes into a JSON …

---

## [Python Questions](https://forum.codeselfstudy.com/t/python-questions/1734)

<div class="topic-metadata">

**Author:** [@Chung\_Loh](https://forum.codeselfstudy.com/u/Chung_Loh)\
**Replies:** 2\
**Last updated:** [August 2, 2019, 6:25pm UTC](https://forum.codeselfstudy.com/t/python-questions/1734 "2019-08-02T18:25:37Z")

</div>

Hi Josh Thanks for your email. Here i would like to attach some print screen files to check with you about the sample questions that i ran at PyCharm it shows some errors even though i follow the syntax from the tutoria…

---

## [Serverless architecture tips](https://forum.codeselfstudy.com/t/serverless-architecture-tips/1038)

<div class="topic-metadata">

**Author:** [@PaulH](https://forum.codeselfstudy.com/u/PaulH)\
**Replies:** 5\
**Last updated:** [March 23, 2019, 6:58pm UTC](https://forum.codeselfstudy.com/t/serverless-architecture-tips/1038 "2019-03-23T18:58:27Z")

</div>

So I am thinking of going serverless. Is there a recommended database for serverless? Being serverless, does all the webpage need to be rendered on the front end?

---

## [\`Retry-After\` Headers on Netlify?](https://forum.codeselfstudy.com/t/retry-after-headers-on-netlify/1173)

<div class="topic-metadata">

**Author:** [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Replies:** 0\
**Last updated:** [November 9, 2018, 10:45pm UTC](https://forum.codeselfstudy.com/t/retry-after-headers-on-netlify/1173 "2018-11-09T22:45:39Z")

</div>

Does anyone know how to get netlify to return Retry-After headers on a “website under maintenance” page? (reference) My netlify.toml file contains this: \[\[redirects\]\] from = "/\*" to = "index.html" status = 5…

---

## [User authentication and management](https://forum.codeselfstudy.com/t/user-authentication-and-management/973)

<div class="topic-metadata">

**Author:** [@PaulH](https://forum.codeselfstudy.com/u/PaulH)\
**Replies:** 2\
**Last updated:** [August 19, 2018, 12:26am UTC](https://forum.codeselfstudy.com/t/user-authentication-and-management/973 "2018-08-19T00:26:27Z")

</div>

What technologies or services do you recommend for user authentication and management?
