!bjVkyJwFJhjipCRZCH:matrix.org

Programming General

2404 Members
For all things programming25 Servers

Load older messages


SenderMessageTime
21 Feb 2024
@yabobay:tchncs.delydia 🧇
In reply to @raptag:matrix.org
can i see?
i just haven't installed cpr yet
11:07:31
@raptag:matrix.orgGeorge Raptis
In reply to @yabobay:tchncs.de
i just haven't installed cpr yet
Ah yeah
11:10:21
@raptag:matrix.orgGeorge RaptisYou also need jsoncpp11:10:26
@yabobay:tchncs.delydia 🧇that happens to already be on my system11:10:36
@raptag:matrix.orgGeorge RaptisRedacted or Malformed Event11:10:44
@raptag:matrix.orgGeorge RaptisCool11:10:46
@raptag:matrix.orgGeorge Raptis
In reply to @yabobay:tchncs.de
i will do so but first i wanna be able to run the project haha
Also, dont compile the internet folder and requestTime.cpp
11:11:42
@raptag:matrix.orgGeorge RaptisThey do nothing for now11:11:53
@yabobay:tchncs.delydia 🧇but they're used by main?..11:12:36
@raptag:matrix.orgGeorge RaptisNo they are not only the header is included11:13:49
@raptag:matrix.orgGeorge RaptisComment that line out to avoid error11:14:07
@raptag:matrix.orgGeorge Raptis* Comment that line out to avoid errors11:16:15
22 Feb 2024
@jotabele:matrix.orgjotabele joined the room.03:27:56
@+tommy_plug:matrix.org@+tommy_plug:matrix.org left the room.12:26:04
24 Feb 2024
@sharkhat:ihazurinter.netsharkhat removed their profile picture.01:24:39
@sharkhat:ihazurinter.netsharkhat set a profile picture.01:32:01
@flybot:matrix.orgflybot joined the room.15:26:50
25 Feb 2024
@intercepted:matrix.org@intercepted:matrix.org joined the room.03:36:44
@intercepted:matrix.org@intercepted:matrix.org joined the room.03:36:48
@intercepted:matrix.org@intercepted:matrix.org left the room.03:37:01
26 Feb 2024
@henderythmix:matrix.orghenderythmix set a profile picture.17:46:40
@hashborgir:mozilla.org🍄 HB|B.CS,BSCSIA,A+,Net+,Sec+,CySA+,Pentest+,Project+,ECES,ITILv4,SSCP,MCP,MCSE|🌿 joined the room.18:57:57
@hashborgir:mozilla.org🍄 HB|B.CS,BSCSIA,A+,Net+,Sec+,CySA+,Pentest+,Project+,ECES,ITILv4,SSCP,MCP,MCSE|🌿Screenshot_20240226_113858.png
Download Screenshot_20240226_113858.png
18:59:42
@hashborgir:mozilla.org🍄 HB|B.CS,BSCSIA,A+,Net+,Sec+,CySA+,Pentest+,Project+,ECES,ITILv4,SSCP,MCP,MCSE|🌿

I keep getting this error: Failed to generate code: "[object Object]" is not valid JSON. I console.log response and I'm not sure why it's not parsable. What am I missing?

Here is equivalent python code which works. In python I get valid JSON, in Js I get error.

            response = requests.post(url, headers=headers, json=data, verify=False)
            response.raise_for_status()  # Raise HTTPError for bad responses
            payload = response.json()
            new_text = payload['choices'][0]['text']

Based on the screenshot, how do I parse the response?

18:59:53
@hashborgir:mozilla.org🍄 HB|B.CS,BSCSIA,A+,Net+,Sec+,CySA+,Pentest+,Project+,ECES,ITILv4,SSCP,MCP,MCSE|🌿 *

I keep getting this error: Failed to generate code: "[object Object]" is not valid JSON. I console.log response and I'm not sure why it's not parsable. What am I missing?

Here is equivalent python code which works. In python I get valid JSON, in Js I get error.

            response = requests.post(url, headers=headers, json=data, verify=False)
            response.raise_for_status()  # Raise HTTPError for bad responses
            payload = response.json()
            new_text = payload['choices'][0]['text']

Based on the screenshot, how do I parse the response? Why in Js it's not a parsable JSON object, but in python, it has no problem?

19:00:29
@hashborgir:mozilla.org🍄 HB|B.CS,BSCSIA,A+,Net+,Sec+,CySA+,Pentest+,Project+,ECES,ITILv4,SSCP,MCP,MCSE|🌿I got it. Switched to the Fetch API instead19:32:29
@gregwhite:matrix.orgGreg White changed their display name from Greg to Greg White.21:19:08
27 Feb 2024
@imarki360:mozilla.orgimarki360 joined the room.12:01:34
@terrancebanh1:matrix.orgTerrance Banh 彭孝慈 joined the room.15:55:10
@terrancebanh1:matrix.orgTerrance Banh 彭孝慈 `E = MC²` 👌🏻👀 I am a programmer now 16:02:10

There are no newer messages yet.


Back to Room ListRoom Version: 9