October 23, 2024
Chicago 12, Melborne City, USA
SQL

How to flatten a json array string in Redshift

I have a table like this: id stage(varchar) 1 ["a","b"] 2 ["c"] and I need to retrieve the data as the following format: id stage 1 a 1 b 2 c How should I write my SQL in AWS Redshift? You need to sign in to view this answers

Read More
HTML

Why don't flex items shrink past content size?

The following input shrink with the browser window, but at some point they stop shrinking and the horizontal scroll bar appears. I feel this this is weird because they don’t have any width applied. <div class="flex w-full flex-col items-start justify-start gap-2 md:flex-row"> <div class="relative flex w-full flex-col items-start justify-start gap-2"> <label class="text-sm font-semibold">Foreground Color</label> <div

Read More
Android

Flutter serial connection for hc05 bluetooth module?

I want to build a bluetooth app that connect to ardunio with hc05 bluetooth module. I added some packages for bluetooth from pub.dev to build the application. Like flutter_bluetooth_serial: ^0.4.0. When i run the project, it doesn’t run. Can anyone help to how can i use hc05 module to connect to flutter application? You need

Read More
C#

Read a file with unknown number of lines in C using fscanf

I tried to search for the answer here and elsewhere on the Internet, but didn’t get exactly what I am looking for. I have a data file that looks like this: 0,4 0,6 0,9 0,10 1,5 1,7 1,9 2,6 2,8 2,10 3,4 3,7 I can read this file line by line using fscanf() without any

Read More
java

Why one to many data not go to backend?

I currently creating supplier form that we can add supplier and assign him to different brand and categories.that mean supplier related with one to many relation with supplier_has_brand_category. but i face this issue. frontend supplier obj pass correctly without any other issue. but backend supplier_has_brand_category is null. Supplier Entity import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue;

Read More
python

NiceGUI Table Dynamic Title

I’m using NiceGUI and trying to create a table with a dynamic title. I want to be able to change the title of the table dynamically, just like I can update the columns and rows properties. # Create the table with an initial title existing_table_route = ui.table( columns=[], rows=[], row_key='Route/Variant', title="Existing - Rate / SKU

Read More
javascript

How to dynamically fetch nested json arrays keys and properties without explicitly mentioning the fields?

I have a requirement to create a nested JSON to create an issue in JIRA. The thing is this will work for only content.content.text path. If new keys and values are added in the future, this means it will not work. I’ve tried to automate it by fetching the keys and values in the payload.

Read More
C++

incrementing LATEX fraction recursively in C

i am trying to write a program that gets input step and prints the following in LATEX format .(https://i.sstatic.net/cF4Kc9gY.png)](https://i.sstatic.net/cF4Kc9gY.png) for example for step = 3 , the output is 1+\frac{2+\frac{4}{5}}{3+\frac{6}{7}} this is the code i have write now but i get *** stack smashing detected ***: terminated error for inputs more than 6. any idea

Read More
C#

Error Compiling Binutils for i386-elf on macOS: Malformed Archives

I’m trying to cross-compile binutils for i386-elf on macOS (Sequoia 15.0.1, arm64) but encounter an error when running make. Here are the steps I followed: Installed required dependencies: brew install gmp mpfr libmpc texinfo Downloaded and extracted binutils 2.41: mkdir -p ~/src cd ~/src wget https://ftp.gnu.org/gnu/binutils/binutils-2.41.tar.gz tar -xzf binutils-2.41.tar.gz Created a build directory: mkdir build-binutils

Read More
java

the request was rejected because no multipart boundary was found (java/angular)

i’m trying to build a project in Angular and Java where i upload a file from the frontend interface to a mysql database through the backend built in spring boot. When i upload the file from postman it works. When i upload it from the frontend i get the following error: org.apache.tomcat.util.http.fileupload.FileUploadException: the request was

Read More