72,094 questions
0votes
1answer
39views
PostgreSQL Table Field exists in Type Field;
How do I check if fields of a table exist in a user definend Type in PostgeSQL? The Thing is that i want to compare the attributes and create a new Table only with the existing fields of the Type (...
0votes
3answers
126views
VBA For Loop to Create Data, Save to Array, and Display array on Worksheet
I am going slightly crazy on this and I'm not sure if it's because I'm searching for something that isn't possible or I'm just not searching in the right places! I am trying to use a for loop to ...
0votes
1answer
89views
Simple Bash script Nested while and for loops while reading from a text file
I have the following bash script which works fine but only goes through the for loop once! #!/bin/bash csv_file="regime.csv" ratio=(0.2 0.4 0.6 0.8) while IFS=',' read -r col1 col2 col3 ...
1vote
1answer
82views
My for loops are getting skipped (debugger hops over them) [closed]
In my program, my for loops are getting skipped when I try to use the debugger. It hops over the loops, for some reason. I have no idea why. I expected it to print letters in the positions in a chess ...
0votes
1answer
30views
Creating a Map from Flatten in Terraform
Here is my issue - I have a locals code block like the below. I need to create a Map from these values (these values are used in multiple places) locals { object = { 1 = { name = "...
0votes
1answer
42views
Approaches To Optimize Nested For Loops and Dataframe Creation?
I am not very experienced with coding but I am creating a customtkinter application style script where a user can input a specific type of html that contains diagnostic addresses and various ...
0votes
1answer
88views
How can I define an infinite loop condition in the for loop in java?
I was making a program in which user can keep entering numbers till user enters a multiple of 10. So I wanted to created a for loop for that and didn't knew what should be the infinite loop condition ...
-5votes
0answers
58views
Why does modifying a list during iteration with a for loop not work as intended in Python? [duplicate]
I encountered an issue where I intended to limit the invitations to only two people using a for loop. However, the code ends up leaving three people in the list instead of two. Here's the code I'm ...
3votes
1answer
95views
C++23 range-based for loop lifetime fixes interraction with `std::generator` arguments
C++23 was supposed to fix issues around range-based for loops. The C++ standard now has wording that I can trace to p2718r0, including the following example at the end of the section "The range-...
0votes
1answer
96views
Python Selenium Scraping problem (combining multiple occurences into N in for loop, for n in x:
I'm trying to do some scraping for educational purposes, I just started and am fairly noob at python. My problem is, in selenium I am trying to scrape a product page, take the name, price, shipping ...
-2votes
1answer
116views
Can the index name in a `for` loop be pulled from an environment variable? [closed]
Bit of a crazy question, but I'm just wondering. Suppose, I have a for loop inside some function, but I want to specify the index name when I run the function. In this example, I could set idxname &...
0votes
0answers
30views
For loop with 1 repetition removes shader artifacts
I think I'm going to lose it. Here is a snippet of code: vec4 get_color(vec3 pos, vec3 ray) { for (int i = 0; i < 1; i++) { vec3 final_pos, normal; float n_steps; // floating ...
0votes
1answer
55views
Terraform using flatten with nested objects
Here is my situation, I am trying to deploy a legacy Azure Frontdoor instance to the new version of AFD and do it via Terraform. Here is an excerpt from my locals block for the Firewall policy: ...
4votes
2answers
172views
Is it OK to not use the value of the index 'i' inside a for loop? [duplicate]
Would it be frowned upon if the index variable i were not used inside a for loop? I have never come across a code that didn't use the value of the index while it iterates through the loop. def ...
1vote
1answer
116views
Matching Card Game using JS
*{ box-sizing: border-box; } .clear { clear: both; } section { border: 1px solid black; height: 200px; width: 50%; float: left; } <!DOCTYPE html> <html lang="en"> <...