#development

1 messages ยท Page 16 of 1

elfin mica
#

does this look right? I am trying to display the generated picture as .webp here:

#

okay, so I implemented the changes and it runs the prompt, but the image doesn't show? I see no errors in the Chrome inspector

#

Only two things I'm getting. The first one is probably a browser plugin

wooden shore
#

That second picture is just a warning, wonโ€™t break anything

elfin mica
modest tartan
#

why is the javascript not in it's own file?

fresh valley
nocturne galleon
#

Anyone like my code?

"Python"
math = int(input("Math equation: "))
if math == "0 + 1":
print("1")
elif math == "0 + 2":
print("2")
elif math == "0 + 3":
print("3")
elif math == "0 + 4":
print("4")
elif math == "0 + 5":
print("5")
elif math == "0 + 6":
print("6")
elif math == "0 + 7":
print("7")
else:
print("idk")
#

๐Ÿ™‚

modest tartan
#

you could also just do it in a loop

nimble sand
#

My local barber asked if something like this can be done so I thought I'd try it in JS

#

Originally used RShiny but it doesn't handle animations very well

modest tartan
#

i barley know how to program myself im just pointing out a more efficient way of doing it with less code

spring cradle
inner wraith
#

I could explain why every line is wrong but I doubt there's any point because it's either a bad joke or you've never actually tried to execute a Python program you've written.

molten oracle
#

I'ma just say eval exists...

nocturne galleon
#

ik its just a joke

#

im learning python at school sooo

frozen flame
cosmic moth
#

hey i don't know if this is the right place to ask, I'm learning the cryptography library in python, and i ran into an issue using padding:
my server receives a padded message from my client, but when i use the unpadder, it returns an empty string.

i have initialized the unpadder like this:
unpadder = padding.PKCS7(HEADER).unpadder()

and call it like this:
msg_length = unpadder.update(msg_length).decode(FORMAT)

hybrid dew
#

Hello guys !
I want to know if anyone here has already or would know how to bios mod a motherboard, because I have some high-quality HP proprietary motherboards, single-socket, and the problem is that if certain proprietary cables are not connected (USB port and other stuff), it asks you to press enter, which is complicated if you're remote. So, I need to bios mod the boards/or try to find a workaround and P.S. I'm too lazy to buy the cables in question, they cost a fortune, thanks.

#

Here, if anyone is up for it or has had a similar problem, I'd appreciate it.

sudden cosmos
cosmic moth
sudden cosmos
cosmic moth
noble plover
keen sorrel
acoustic pine
#

what the fuck is going on youtube's site skull1

solemn solar
#

what in the christ am i looking at

acoustic pine
#

youtube shorts page

solemn solar
#

Interesting

acoustic pine
#

this page

solemn solar
#

Yeah ik which one it is

acoustic pine
#

youtube short's page preload like 5 videos

solemn solar
#

what the

#

why is that a thing, sounds very resource wasting

acoustic pine
#

doesn't unload the one you scrolled past

#

i expected a more... elegant solution for something as big as youtube

frozen flame
#

Idk seems pretty elegant

#

People do go back sometimes, and if you're on a shitty connection then it would take a while to load

acoustic pine
noble plover
frozen flame
#

You need to provide a little more detail than that lol. There's a lot of different types of freelancing. Anyways ads aren't allowed here

dawn dragon
#

is there a easy way for a raspberry pi running openPLC to force a another linux pc to launch a music file, and then force close the file later? They are just 2-3 meters away from eachother

peak acorn
#

Are you restricted in any way on how that communication is dealt with? I Think it makes more sense just to make a lightweight server software on the pc which plays audio via an api

silent gust
silent gust
frozen flame
#

ugh fastapi

#

good starter lib but really sucks for anything beyond starting on a project

peak acorn
silent gust
frozen flame
#

personally i dont like flask

#

but that ones just preference

tame wing
#

the dead pixels are the exact points where they pointed on the screen.

fading osprey
#

think you might be in the wrong channel there buddy

pastel oasis
#

Hey, does anyone know how to edit dlls ?

I'm trying to mod gta4 but I have two different dinput8.dll. One is for a general fix of the game (FusionFix) and the other one is to increase the vram available to gta4 (rockstar messed something up and if you have an amd card you may be limited to 512mb of vram)

wooden shore
keen sorrel
#

attempting some video processing in the PL. 4096x3072 24-bit (max) uses a good chunk of resources

#

just missing a handful of constraints

willow tartan
#

Does anyone know anything about html

spring cradle
#

yes

keen sorrel
#

stream interconnect also wasn't the right IP to use there

keen sorrel
#

maybe something like this?

keen sorrel
#

Updated and marked up. No testbench to validate it's actually correct yet

keen sorrel
#

It at least achieves timing closure now. Still haven't made the testbench to make sure it's even doing what I hope

nocturne galleon
#

oh

modest tartan
#

what programing langureses are the best for each catergory

old flame
molten oracle
#

Even "best" is pretty subjective

silk eagle
#

they all do what u tell them to do

#

unless its machine learning related then they do what u teach them to do

molten oracle
#

Well, not all. Some have their limitations

molten locust
#

Hey Guys My Name Is Matt Im 17 Years Old Learning To Code Ive Tried A Couple Times Before But Failed Due To Having No TIme Currently Im Learning The Basics Of HTML And CSS Then Im Going To Work More With Javascript Then Hopefully Using Javascript As A Base For My Learning If Anyone Wants To Give Me Any Tips Feel Free To Inbox Me

frozen flame
#

tip: for the love of God dont type like that

red mulch
grizzled steeple
#

If ya wanna code logic for the web, you either start learning WASM or JavaScript. One is more powerful and closer to hardware while the other allows you to interact with HTML and whatnot

#

Personally, I'd go JavaScript for the web ๐Ÿ˜‰

old flame
grizzled steeple
#

I was more focusing on the frontend part. For the backend you can go all sorts of languages. Tho if you only want to learn one language and wanna do web, then JS is kinda your best choice. Love it or hate it (and no TS is not it's own language, it's just JS with sprinkles on top)

old flame
#

better learn typescript over javascript any day

#

basically its own superset as to how c++ is to c

frozen flame
#

Cpp is not a superset of c

#

This was true about 25 years ago, it is not anymore

molten oracle
#

Technically, it still is.

#

Although it's not strictly a superset, there's some stuff in C that's invalid in C++, but it does not change the fact that C++ still adds more to C.

peak acorn
#

Im pretty sure that means it's not a superset at all

molten oracle
#

I mean there was a dedicated wikipedia page for the entire debate iirc

#

The C and C++ programming languages are closely related but have many significant differences. C++ began as a fork of an early, pre-standardized C, and was designed to be mostly source-and-link compatible with C compilers of the time. Due to this, development tools for the two languages (such as IDEs and compilers) are often integrated into a s...

frozen flame
#

If the superset doesn't compile the original language then it cannot be a superset

#

Regardless of what the keyboard warriors on Wikipedia think

old flame
#

I mean i can use c++ compilers to compile c

#

depending on what I write ig

#

and which compiler I use

#

(looking at you, msvc)

frozen flame
molten oracle
#

Which leads to newer versions of the original language capable of having more features than the not really but kinda sorta superset

frozen flame
#

You've just described "not a superset"

delicate schooner
#

Heyyy
Quick question:
I'm trying to compile a c programm using a makefile, and it works perfectly when the code is in the same folder as the makefile, but when I move it to a different folder, the makefile being in a parent folder, the dependencies break, even though all files are properly linked
Does anyone know why?

old flame
#

wait no its not

delicate schooner
sour moat
#

Did you installed the gtk development files

delicate schooner
#

yes

old flame
#

since it works when all files are together it appears so

delicate schooner
#

here is the makefile ```
CC=gcc
CFLAGS=--std=c99 --pedantic -Wall -W -Wmissing-prototypes -ggdb3
LD=gcc
LDFLAGS=
DOCS=doxygen
LATEX=pdflatex

Files

EXEC=masterMind
MODULES= source/mainMasterMind.c source/gameplay.c source/display.c source/dataStructure.c source/humanPlayer.c source/computerPlayer.c source/score.c
OBJECTS= source/mainMasterMind.o source/gameplay.o source/display.o source/dataStructure.o source/humanPlayer.o csource/omputerPlayer.o source/ score.o

GTK=pkg-config --cflags --libs gtk+-2.0 -Wno-deprecated-declarations

Rules

all: $(EXEC)

masterMind: $(OBJECTS)
$(LD) -o $@ $(OBJECTS) $(LDFLAGS) $(GTK)

mainMasterMind.o: mainMasterMind.c
$(CC) -c mainMasterMind.c -o $@ $(CFLAGS) $(GTK)

gameplay.o: gameplay.c
$(CC) -c gameplay.c -o $@ $(CFLAGS) $(GTK)

display.o: display.c
$(CC) -c display.c -o $@ $(CFLAGS) $(GTK)

dataStructure.o: dataStructure.c
$(CC) -c dataStructure.c -o $@ $(CFLAGS)

humanPlayer.o: humanPlayer.c
$(CC) -c humanPlayer.c -o $@ $(CFLAGS)

computerPlayer.o: computerPlayer.c
$(CC) -c computerPlayer.c -o $@ $(CFLAGS)

old flame
#

well first thing I notice is that in your screenshot the gtk part of the command isnt present

keen sorrel
delicate schooner
keen sorrel
old flame
#

is this makefile a template you modified, or you wrote it ?

delicate schooner
delicate schooner
keen sorrel
delicate schooner
sour moat
#

How do I learn filesystem of a unmounted device in linux / c ?

delicate schooner
old flame
tired night
#

What's the current state of ESP32 and does the ADC still suck ass?

Coming from Arduino and looking for something simple, cheap and wireless for IoT stuff. From what I seen the 12-bit ADCs on ESP32 WROOM-32 suffer from non-linearity, deadzones of 100mV in the lower and upper range, calibration, Vref accuracy.. worse than the 10-bit on the Uno and Nano. The ESP-S3 supposedly doesn't have the deadzones and has better hardware ADC calibration but can someone confirm that? Also how trustworthy are these devboards on AliExpress? I usually get everything else from there and have no issues so far.

keen sorrel
neon oriole
#

while i still think that test driven desingn (tdd) sucks monkeyballs. i found yet another reason to dislike it ,... im writing some tests atm (after the programming has been done, and the project is sufficiently interlocked with its own components that creating a test basicly means writing mocups for every other part of the program (and thus rewriting the whole program , but to facilitate a single test, and this for every part... now , if the project itself is complicated enough to warrant writing tests , and the mocups for those tests are in fact the program again minus the to test part... wouldnt that make the tests complicated enough to warrant writing tests for... ๐Ÿ˜„ no id like to see some TDD guru try to write tests to the 3 or 4th order of the actual code first before anything else ๐Ÿ˜„

neon oriole
neon oriole
keen sorrel
neon oriole
#

i didn indeed because i wrote the tests afterwards to begin with, but i tought when done well id like to see someone come up with this beforehand ... as i would have tought well actuall these tests need tests ๐Ÿ™‚

keen sorrel
#

speaking of testing, I've finally figured out how to use the MPSoC VIP. Configured the interrupt controller and tested a manual interrupt

neon oriole
#

its like a watch, you can make a test for every gearwheel inside individually but once you want to test if they interact correctly , and see if the solar eclipse indicator is working okay , your mocking up the rest of the watch again to test that functionallity ๐Ÿ™‚

keen sorrel
#

You might need to take a course on testing or something. Unit tests and functional tests are just separate efforts. If you need to mockup the entire rest of your system to do every functional test, you've done something really wrong.

#

The entire point of TDD is to ensure the very design of your product takes testing into account

neon oriole
#

since every small piece depends on one or more outcomes of other packages , and not linearly the easiest way to create the mocup would be to rewrite the original code that would have created the object in the first place... closest thing i can compare it to is to a sysfs subtree parser, you can write tests for each individual small parser, but as soon is you want to test if a node is parsed correctly , there is nothing to compare it against that is less cumbersome and less error prone than to compare it against another parsed version of the same original sysfs subtree

keen sorrel
#

Please just take a course or study someone else's tests ideally relevant to what you're doing. I'm not experienced enough to try to teach you how to properly build tests or correct your misunderstandings. Test methodology is a very wide topic anyways so even if I was more experienced I may still not know the most ideal test method for whatever you're testing.

old flame
#

the point of TDD is that you can write tests for your interfaces/functions/whatever else BEFORE implementing the thing itself, so you already know the outcome your implementation should result in before writing any code

#

You dont always have to follow it, i dont even myself since I like to write code while I have an idea but I usually end up wasting time writing and testing the code if i write the tests after everything

#

Plus thers instances where writing tests after writing code can falsify your results because now the tests are most likely more tailored towards your implementation rather than something more generalised and less biasd towards a specific implementation

keen sorrel
#

finally got it timed perfectly. Now to fuck it up with pblocks so I can use DFX

nocturne galleon
#

can someone help me with neovim on macos

#

it renders my theme properly when within tmux but breaks when not in tmux

fading osprey
#

It could be related to how Terminal handles things

#

try a different terminal application

nocturne galleon
#

sure that is one way to deal with the issue, but i was really hoping to find a fix without switching emulators

#

given i cant uninstall this terminal emulator anyways; can only install a new one in addition to this

fading osprey
pliant ether
twilit elk
#

baby I love it cursed

#

electron terminal, comic mono with nerdpatch

fading osprey
#

There's also Hypr which is suposedly good

#

though my goto is Alacritty on Linux and windows terminal

molten oracle
#

If you're on Mac, I've heard good things about warp but I'm not sure of its compatibility with neovim

thorny lantern
#

Iโ€™ve always used iTerm

pliant ether
#

Yeah I like iterm

#

On Windows I just roll with windows terminal. It gets the job done I guess

thorny lantern
#

Ya, better than command prompt

cloud knot
thorny lantern
#

Yeah, itโ€™s awful. And actually more complicated than that if you want it to be more accurate

peak acorn
#

yeah the answer is do notttt use regex lmfao

#

or more specifically, use someone else's code, if they use regex then its on them

keen sorrel
#

Cleaned top up a bit and split the static and dynamic portions of the design. Nearly ready to export the platform and move over to Vitis. Just need to create v_dfx's pblock now

peak acorn
opaque terrace
#

Hey folks, has anyone tried to build up or use a combo of open source libs/tools for ID/Passport data scanning off images? Does not require to be rock solid as for KYC/legal reasons, i'm looking into it for auto-completion reasons for a form as a UI/UX aid for our users so they don't have to fill it in all by hand.

#

cursory search has not been very encouraging and for now we are using a 3rd party API. but things are getting pretty costly and we are thinking of building out something that we host ourselves.

old flame
#

There is at least 1 open source tool that can do it, however its macos only and hasnt been updated in 9 years. My guess is there are legal problems to making tools like that in the open

old flame
#

btw, if theres any x86-64 nerds in here: i tried to reimplement strcmp in assembly, kinda looks like this

section .text
    global _ft_strcmp

_ft_strcmp:
    mov rax, 0 ; make sure thats reset
    mov rcx, 0 ; make sure thats reset
loop:
    mov al, BYTE [rdi] ; take char at current position into 8 bit register
    mov cl, BYTE [rsi] ; take char at current position into 8 bit register
    cmp al, cl ; compare em
    jne end_loop ; end if they dont compare
    cmp al, 0 ; first char is null ?
    je end_loop
    cmp cl, 0 ; second char is null ?
    je end_loop
    inc rdi ; increment pointers
    inc rsi
    jmp loop

; useful info about movzx, and alignment issues ; https://stackoverflow.com/questions/22621340/why-cant-i-move-directly-a-byte-to-a-64-bit-register
; https://www.felixcloutier.com/x86/movzx
end_loop:
    movzx rax, al ; this moves al (8 bit register) to rax (64 bit register) by setting the rest of the register to 0
    movzx r10, cl ; same thing here cause we cant sub 64 bit reg with 8 bit reg (alignment)
    sub rax, r10
    ret

Is there any way to optimise this and kinda make it look better ? It does behave like the original function so far

opaque terrace
old flame
opaque terrace
#

We are a startup, we have limited resources, but a need for this amd pretty big one

#

So it's a cost/benefit/resource thing for us

old flame
#

right i see

wild delta
keen sorrel
peak acorn
#

Sick

pseudo skiff
#

What would be the best way to e.g. check if something would be due in a PHP program live? Crontab?

ruby pagoda
# keen sorrel FPGA floorplanning

Vivado is the best software in the world and doesnโ€™t need any more bug fixes or optimizations, especially with their installer ๐Ÿ™๐Ÿ™๐Ÿ™๐Ÿ™๐Ÿ™

keen sorrel
#

I love the way text turns into zalgo and/or vanishes if you have it running long enough. I've had no issues with the installer besides being slow as shit though

ruby pagoda
#

Installer pins any cpu to 100% while doing nothing

#

Itโ€™s quite fun to watch lmao

#

But yeah I love vivado bugs ๐Ÿฅฐ๐Ÿฅฐ๐Ÿฅฐ

#

$3k software and you have to use โ€œunofficialโ€ official tools to properly use most features ๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ

#

Has vitis gotten any better with synthesis?

subtle rune
#

i'm working on a AI project and i don't know what error means means

orchid gyro
#

3kb error message lol

keen sorrel
ruby pagoda
orchid gyro
# subtle rune

if i saw this i would just give up
i would call this a "phantom error" because of how complicated it is
you should recode the bits it mentions or take the hard path and debug
i like to call them phantom errors because its either a ghost causing the error (making you recode it) or just really complicated

#

i made little snippets of code to plug into my browser and it had an error I couldnt debug, I recoded it and it worked!
had no i dea what it was, the code is the same as the error-ridden one.
ghosts man, they come when you are stressed

keen sorrel
ruby pagoda
#

I wish it was free for 7 series the most

#

I can understand newer parts but decade+ is still locked

#

Though I guess anything is better than ISE

keen sorrel
ruby pagoda
#

Oh kintex-7 is in the free tier?

#

I totally thought that 325+ or so was paid, that would be super cool if they changed that

keen sorrel
#

Limited kintex-7 support

#

Not sure why anyone would be considering such legacy devices when Alveo exists and is fully supported

ruby pagoda
#

Super cheap on the used market

#

Like $5-15/ea for a 325t

keen sorrel
#

Wow

nocturne galleon
#

is making games in python cursed

fading osprey
#

making anything in python is cursed, so technically yes, but don't let that stop you

nocturne galleon
#

i made 2 games

#

rock paper scissors and black jack, both with betting

#
message = input("what message do you want to print? ")
print(message)
cloud knot
#

i mean mlkit can give you a pretty good description of the actual photographed item, and then you just need to figure out what is what

cloud knot
cloud knot
sour moat
#

what's the word size of flash memory on the ATmega328P in bits?

keen sorrel
sour moat
fringe spade
#

riddle me this batman: why does this code run without any issues

print("Encrypting your username...")
enc_username = rsa.encrypt(_secure_username_c.encode(), _secure_enc_key_publ)
print("Encrypting your password...")
enc_password = rsa.encrypt(_secure_password_c.encode(), _secure_enc_key_publ)
print("Done!")

print("Saving for comms...")
with open("fb.sgres", "w+") as f:
    f.write(str(rsa.encrypt("True".encode(), _secure_enc_key_publ)) + "\n" + str(enc_password) + "\n" + str(enc_username))


_secure_usr_username = rsa.decrypt(enc_username, _secure_enc_key_priv)
_secure_usr_password = rsa.decrypt(enc_password, _secure_enc_key_priv)
#

but

#

this code:
```python
try:
with open("fb.sgres", "rb") as f:
lines = [line.strip() for line in f.readlines()] # Remove newline characters and skip empty lines
print("Lines read from file:", lines)
# Get the content of the file from the lines read
file_content = b'\n'.join(lines)
print("File Content:", file_content)
if len(lines) >= 3: # Ensure there are at least 3 non-empty lines in the file
enc_password = lines[1]
enc_username = lines[2]
else:
print("Error: Insufficient lines in the file.")
except FileNotFoundError:
print("Error: The file does not exist.")
except PermissionError:
print("Error: Permission denied to access the file.")
except Exception as e:
print("An unexpected error occurred:", e)

    print(type(enc_password))
    print(type(enc_username))

    print("Encrypted Username:", enc_username)
    print("Encrypted Password:", enc_password)

    try:
        print("Decrypting...")
        _secure_usr_username = rsa.decrypt(enc_username, _secure_enc_key_priv)
        _secure_usr_password = rsa.decrypt(enc_password, _secure_enc_key_priv)
        print("Decryption successful!")
    except DecryptionError as e:
        print("Decryption failed:", e)
        raise DecryptionError
    except Exception as e:
        print("An unexpected error occurred during decryption:", e)
        raise Exception

    _secure_usr_username = _secure_usr_username.decode("utf-8")
    _secure_usr_password = _secure_usr_password.decode("utf-8")
#

does this:

Loading encrypted data
Lines read from file: [b'G\x8c\x1f\xe0y,Qq\xd2^\xe1\x9dD!I\xef7\x0b]6\x97J<\xf9\xf2i{\x8b\xd4\xa1\x050\x84\xec\x90\xd8\xf7\x1b\xbd\x92\x8d\x0eHg\x86\xd9\xb4\xb2\x13\x1f\x0e\xbdE\xf4+\xaa+\xd4\xeb\xcf\xfbM6\xbe\xbe\x11H-\x1fA\xbbp\xecNo\x8d\x84\xf3\\rM0|x\x13q!\xb3r\xea\xc7u\xa2N\xe2\xfb\xd9.|]\xf4\x01', b'\x8c\xb6\xca}\xa2}\xd4;\xcb\xe0\xbdlu!Fm?\x80"\xbd\xc1\t\xb8\x1bd', b'\xae\xbd{\x02$\x13\xf5\x01\x86\xca9\xf3=\x97\xd2\x08m\x86\xc4\xe8U\xc1\xe8\x10\x19\x12\xdb"ow@c\t3\xc65\x07\xb1\xc4\xcft\xfc\x90\xdc\xb5cy\xd06z\xfd\xfc\xbc\xb8\xeb\xe9\xeea6q&\xe7h\x85!\xdfH)\xdc\x16\xb0\xf9\xf1\x18?\xc1`\xeb\xa7L\x9bL\x12\xd3\xc6\xea\xf2\xe4\x10\x8f\x08rE/p\x89\xb0\x06\t\x14\xcevM\xf76)\x024\xb4\x05\xe1S\x07\xad\xa7\x05=I-26g\x84c\xe4Z\x9a\x84', b'\xb1R\x8e\x1d\xb5n\xed\x9c\x98\xe5\x1af\xca\xc6\x02\x9a\xd0\x0e\xb0AZ\xe7xs\x12\x8c\x05\xc5\xd0pf\xc8(\\`\x84\x06\x85u\xb9XE\xef\xc0\xa8KBr\xfc\x13\xe7T\x93\xee\x07\xbe\xde\xb9N\x102\r\x90\x8d\x0f\xd4\x80\xb5\x8f\x82\x17\xc2\x05\x9e\x1a\xe0\x0c\x9dlg\x14`\x99', b'\x10b\x92\xb5hr\xa5HF\x0f\xfa\xc6M\x80\xe7u\x9ea\xb5&\xce\xe5\x7f\xff\xc7\x8d\xd9\xffR`\xa3\xb4 \xa1\x91D6}\xef\xf0\x83\xb91q']
File Content: b'G\x8c\x1f\xe0y,Qq\xd2^\xe1\x9dD!I\xef7\.....
<class 'bytes'>
<class 'bytes'>
Encrypted Username: b'\xae\xbd{\x02$\x13\xf5\x01\x86\xca9\xf3=\x97\xd2\x08m\x86\xc4\xe8U\xc1\xe8\x10\x19\x12\xdb"ow@c\t3\xc65\x07\xb1\xc4\xcft\xfc\x90\xdc\xb5cy\xd06z\xfd\xfc\xbc\xb8\xeb\xe9\xeea6q&\xe7h\x85!\xdfH)\xdc\x16\xb0\xf9\xf1\x18?\xc1`\xeb\xa7L\x9bL\x12\xd3\xc6\xea\xf2\xe4\x10\x8f\x08rE/p\x89\xb0\x06\t\x14\xcevM\xf76)\x024\xb4\x05\xe1S\x07\xad\xa7\x05=I-26g\x84c\xe4Z\x9a\x84'
Encrypted Password: b'\x8c\xb6\xca}\xa2}\xd4;\xcb\xe0\xbdlu!Fm?\x80"\xbd\xc1\t\xb8\x1bd'
Decrypting...
Decryption failed: Decryption failed``` (i shortened some of the output, so it can fit into 1 message)
keen sorrel
sour moat
keen sorrel
#

Please use the up to date datasheet from the manufacturer if you're going to discuss it

sudden cosmos
#

like if you want the file to remain ascii, you should encode it with something like base64. unless python has some way to decode the string representation back idk if it does

#

ah i guess there is ast.literal_eval(bytes_string) if you want to convert back from what you've written to the file into a bytes object

neon oriole
# nocturne galleon is making games in python cursed

depends on the type of game , and what you are willing to ofload to faster langs... like imagine a (whats the genre collecting things in the 3d world that is persistent with a million items and combinations) where every item is having to be programmed in c , it would bump the price to new hights (all them c programmers arent cheap) while with python doing alle the items would be really fast to develop comparitively , the modding community would love it , and you can still do the core engine and network code in c ..

#

but if its as good as it promisces to be maybe mojo is fast enough to also do that part ?

#

mojo is the name for python++ except that it makes things faster not slower :P\

frozen flame
#

Lol mojo

#

you're writing in UTF8 and reading as bytes, should probably sync those up

#

I'm not sure how literal eval factors into this though?

neon oriole
# fringe spade this code: ```python try: with open("fb.sgres", "rb...

just because my eye fel on it , but did you know f.readlines() is the default so py lines = [line.strip() for line in f.readlines()] is identical to : py with open(file,'rb') as f: lines=[l.strip() for l in f] and that this wont remove empty lines as far as i know. but this will: ```py
with open('main.py','rb') as f:
lines=[l.strip() for l in f if l.strip() != b'']

sudden cosmos
#

because str(bytes) destructively converts bytes to a string repr of it

frozen flame
#

It's the same as str.decode / bytes.encode

sudden cosmos
#

but it would be more proper to do it like e.g.

with open("fb.sgres", "w+b") as f:
    f.write(base64.b64encode(rsa.encrypt("True".encode(), _secure_enc_key_publ)) + b'\n' + base64.b64encode(enc_password) + b'\n' + base64.b64encode(enc_username))

with open("fb.sgres", "rb") as f:
    lines = [line.strip() for line in f.readlines()] 
    dec_password = base64.b64decode(lines[1])
    dec_username = base64.b64decode(lines[2])

frozen flame
#

I'm on mobile so reading code is an awful experience but it seems to me that you're writing an encrypted blob and then trying to read it as though individual sections are encrypted rather than the whole thing

neon oriole
#

not that using it is wrong, but les to type less to read is easiier to plow trough code

sudden cosmos
# frozen flame I'm not sure how literal eval factors into this though?
>>> pw = "mypw"
>>> bytes(pw, 'utf-8')
b'mypw'
>>> str(bytes(pw, 'utf-8'))
"b'mypw'"
>>> savedpw = str(bytes(pw, 'utf-8'))
>>> import ast
>>> ast.literal_eval(savedpw)
b'mypw'
>>> savedpw == bytes(pw, 'utf-8')
False
>>> ast.literal_eval(savedpw) == bytes(pw, 'utf-8')
True

he's saving string literal bytes to the file I think

#

instead of just the bytes

frozen flame
#

literal eval has no place here

sudden cosmos
#

is there another way to convert the string "b'mypw'" back to the bytestring b'mypw' ?

neon oriole
#

yeah python3 and bytes ,... some things were easier to grasp with python2

sudden cosmos
#

but yes using eval is janky which is why i suggested b64 encoding it before saving it to the file instead

#

so it remains ascii but doesn't need eval to decode

frozen flame
sudden cosmos
#

yes that's what i said, "the issue is the conversion to string before writing to file"

frozen flame
#

right, but like i said thats one of many issues

#

the biggest one is that he's trying to read an encrypted blob as if it were unencrypted

#

actually i just took a look on my laptop and i might be wrong on that

#

curses on mobile formatting

#

(honestly id just do the one blob instead of multiple, but whatever floats his goat i guess)

#
with open("fb.sgres", "wb") as f:
    f.write(rsa.encrypt(password + '\n' + username, _secure_enc_key_publ)

with open("fb.sgres", "rb") as f:
    password, username = rsa.decrypt(f.read(), _secure_enc_key_priv).split("\n")
sudden cosmos
#

i just like ascii files so you can see what you did without hexdump lol

neon oriole
#

not that its that important but that way if you know the username you halfway there of decrtypting it ,.. ?

frozen flame
#

doggo_shrug i wouldnt encrypt a username myself but that seems to be what theyre going for

sudden cosmos
#

looks like they're hacking together some kind of credential manager

#

better than just keeping them plaintext like i do lol

#

marginally, if the key is right there

frozen flame
#

fwiw those tend to leave things like usernames/websites unencrypted too, to provide them to the OS for tooltips lol (not always usernames, but certainly other metadata)

sudden cosmos
#

huh didn't know about this encoding this is kinda handy

>>> b'\x35\xe5\xFF'.decode('iso-8859-1')
'5รฅรฟ'
>>> b'\x35\xe5\xFF'.decode('iso-8859-1').encode('iso-8859-1')
b'5\xe5\xff'
#

oh that's just latin1. but yeah apparently it can encode all of 0-255 as characters that can be decoded back

fringe spade
#

ty guys

fringe spade
#

I just needed to modify the code a bit

#
  with open("fb.sgres", "wb") as f:
            f.write(rsa.encrypt(_secure_password_c.encode("utf-8") + b'\n' + _secure_username_c.encode("utf-8"), _secure_enc_key_publ))
  with open("fb.sgres", "rb") as f:
            _secure_password, _secure_username = rsa.decrypt(f.read(), _secure_enc_key_priv).split(b"\n")
deft vine
#

Would this be an appropriate channel to chat about REGEX?

brittle orbit
#

Probably, what you wanna know? I have very limited knowledge about it though

acoustic pine
#

Why is it that every html template that uses bootstrap that i saw so far end up looking like a clusterfuck

#

The code itself that is

#

The website looks like well... A bootstrap website

keen sorrel
#

Did they not just days ago deprioritize flutter's multiplatform goals?

#

Maybe mobile and web is close enough to some. RIP desktop apps

cloud knot
#

Flutter is more rapid, Kotlin multiplatform is more native (if you want to go that way)

keen sorrel
#

Or rather two weeks ago

cloud knot
fading osprey
#

if anything, the EU counterparts are usually just as expensive, think further east or south

cloud knot
fading osprey
#

i guess that depends on the company

#

and the position

cloud knot
#

Python team was asked to move to Germany, Flutter is going to Mexico team etc.

#

And in the end, for same position in US vs EU, you can usually expect salary drop of 30-50% for literally same job, before taxes even come into play

silk eagle
#

I think if its the same people on the team they'll also need to pay US taxes

#

I forget exactly how that works

restive ore
#

since when can websites block inspect element and right clicking?

cloud knot
cloud knot
silk eagle
#

I mean the employee would have to pay US taxes if they're a US citizen even if they live and work in another country I think (unless they renounce their US citizenship/plan on never going back to the US)

restive ore
#

i found a way around, control shift i didn't work but control shift j did

cloud knot
restive ore
cloud knot
#

yeah, they literally just override oncontextmenu for right click

#

and this for onmkeydown:

            document.onkeydown = function(event) {
                event = (event || window.event);
                //alert(event.keyCode);   return false;
                if (event.keyCode === 123 || event.ctrlKey && event.shiftKey && event.keyCode === 73 || event.ctrlKey && event.shiftKey && event.keyCode === 75) {
                    if (show_msg !== '0') {
                        show_toast('inspect_elem');
                    }
                    return false;
                }
                if (event.ctrlKey && event.keyCode === 85) {
                    if (show_msg !== '0') {
                        show_toast('view_src');
                    }
                    return false;
                }
            }
#

a completely idiotic naive approach, as if one can't call those functions via the browser menu through mouse

neon oriole
#

Havving used quite a bit of langs and of course they are subdividable in many ways , but the one im curiouse about is this split where one is way more common and popular then the other, yet i dont see the benefit for it, so : { } or no {} there are only 4 languages that i know of thta dont use the {} as a code block designator : python, VHDL,COBOL,BASIC. and 3 of that are not really applicable to computer programming today.
Weird thing is : Other than opening up allot of discussions for where they should go , i dont see the benefit of using them. Okay the other option is forced indenting like python does so you cant do: ```
def function(){
verry='verry'
flat='structure'
}

so since every other lang uses them (while they could be used for something else (thers never enough symbols to use) they must geve a huge benefit some how or enable you to do stuff theat not using them prohibits. problem is that i cant seem to find any. nowim defenetly not the lifetime hardcore programmer that some of us are , so what are the benefits for using {} ?
cloud knot
#

using indentation for such task is a bad idea in a world where we can't even agree if we use tabs, 2 spaces, 4 spaces or 8 spaces ๐Ÿ˜„

#

plus using {} allows you to do crazy oneliners, of course at expense of readability

neon oriole
#

i more often forget to open the { then i forget to indent ๐Ÿ™‚ (closing the } is fine (as i automaticly // blockname behind it to indicate what im closing

sudden cosmos
#

you can't arbitrary create a scope in python can you? everything is just function scope?

#

although i rarely use that even in C++, usually scope my variables to the function anyway

#

some ideas just catch on and nothing else provides enough of a benefit to justify switching to it i suppose

#

javascript has to have them though since it's sent over the wire as text

neon oriole
# cloud knot using indentation for such task is a bad idea in a world where we can't even agr...

i think i've have the final sane answer on that but i wouldnt force anyone to change his or hers habits on that since there is a way currently in use that all of them are vallid as long as you dont mix them.. (ps: the only sane way i found is ๐Ÿ˜› it makes sence to use a diffferent char for indent and for allignment , and the only guarantee allignment keeps alligned is by using spaces for that , so tabs left for indentation) (there are more reasons but...)
also how is indentation more prone to errors ?

cloud knot
neon oriole
cloud knot
#

with {} you do:

code line 1 {
  code line 2
  code line 3
  code line 4
}

you delete the indentation, code executes still same:

code line 1 {
  code line 2
code line 3
  code line 4
}
#

and i mean unintentional change in code which changes the execution, because you went from one valid code to other valid, but functionally different code, just because you deleted some indentation by mistake

neon oriole
sudden cosmos
#

that and it's at least 3 extra bytes per line (or does it accept tabs?) to transmit, idk with javascript they always remove all whitespace before sending it

neon oriole
#

seems equally prone to errors there

#

tab is just a single character just like (any/most) others

sudden cosmos
#

whitespace would probably compress out pretty well if you like gzipped it though maybe that's not a big deal

neon oriole
#

that is why you can havve your editor pick how many space to use for a tab

cloud knot
#

in the end, it is down to personal preference, you can always just use python if you like indentation block languages ๐Ÿคทโ€โ™‚๏ธ

neon oriole
#

okay : c will fail to compile, javascript wil just deal with the invalid code and run with it

#

yeah my point was also more like if we'd have {} availeble for other syntax stuff we would not have to doe the weird constructions we now sometimes do

sudden cosmos
#

been a minute since i worked with javascript but i thought it crashes if a document is invalid

#

cause it has to parse the whole document first even if it doesn't run

neon oriole
#

with the amount of javascript used today,.. that would have made the web unusable

cloud knot
#

why would C fail ?

#include <stdio.h>
int main() {
    double a, b, product;
    printf("Enter two numbers: ");
    scanf("%lf %lf", &a, &b);  
 
    // Calculating product
    product = a * b;

    // %.2lf displays number up to 2 decimal point
    printf("Product = %.2lf", product);
    
    return 0;
}

and

#include <stdio.h>
int main() {
    double a, b, product;
printf("Enter two numbers: ");
    scanf("%lf %lf", &a, &b);  
 
    // Calculating product
    product = a * b;

    // %.2lf displays number up to 2 decimal point
    printf("Product = %.2lf", product);
    
    return 0;
}

are functionally identical programs

def multiply_numbers():
    num_1 = float(input("Enter the first number: "))
    num_2 = float(input("Enter the second number: "))

    product = num_1 * num_2

    print(f"Product of {num_1} and {num_2} is {product}")

and

def multiply_numbers():
    num_1 = float(input("Enter the first number: "))
    num_2 = float(input("Enter the second number: "))

    product = num_1 * num_2

print(f"Product of {num_1} and {num_2} is {product}")

are not (not sure if the print statement would crash or not, i did very limited python coding in my life)

cloud knot
#

code could fail if it expects some elements to be present and they aren't, but that is another story ๐Ÿ™‚

sudden cosmos
#

i mean in his example where he had unbalanced braces

halcyon lintel
#

hi there, so ive been working on php lately and right now, im encountering this error
Fatal error: Uncaught ValueError: Path cannot be empty in E:\5thSemesterWebDevProject\imgUpload.php:26 Stack trace: #0 E:\5thSemesterWebDevProject\imgUpload.php(26): getimagesize('') #1 E:\5thSemesterWebDevProject\myassignments.php(2): include('E:\\UniversitySt...') #2 {main} thrown in E:\5thSemesterWebDevProject\imgUpload.php on line 26
where i change the file name in query selector in this
let input = document.querySelector('.imageFile');
the code on that line 26 in pfp is this
$check = getimagesize($_FILES["image"]["tmp_name"]);
does anyone know what the issue could be here?

cloud knot
#

unbalanced braces would fail in JS too

sudden cosmos
#

idk about in the browser i would think you'd get a console error about the script tag being invalid, i was just thinking about in the nodejs interpreter

#

browsers are obscenely fault tolerant with bad documents though yeah

cloud knot
halcyon lintel
#

yeah thats what seems to be happening. without the file name change, it works fine. but changing the name generates that error.

the reason i need to change that name is because of the input form i already generated

#

that "browse" and dragover function relies on that name alteration.

cloud knot
#

that must be some weird library

halcyon lintel
#

oh btw, the original name of that element is ".uploadForm input" and im changing it to a specified name mentioned above

sudden cosmos
#

is it just a transient state while user is editing things? don't call the function until interaction stops and catch and handle the error so it doesn't bubble up

cloud knot
#

https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/File_drag_and_drop this is how you do it, you process the obtained file and submit it yourself, for example by converting it to base64 or uploading the blob ?

MDN Web Docs

HTML Drag and Drop interfaces enable web applications to drag and drop files on a web page. This document describes how an application can accept one or more files that are dragged from the underlying platform's file manager and dropped on a web page.

neon oriole
#

it will make the second part a floating piece of text not in tags , because a <h1> tag may not be inside a <p> tag so it will close it for you ๐Ÿ™‚

#

srry was wrong it will also reopen the ptag right be fore the other one so : ```html
<p>some text<br>
</p><h1> my title</h1>
some more text
<p></p>

halcyon lintel
#

ig i will have to redo it

neon oriole
#

and people wonder why their css doesnt work for the second part of the text ... ๐Ÿ™‚

#

(and most teacher arent aware either

#

(i even remember the primeagen being baffled lol )

keen sorrel
#

after more iterations than I care to admit, got the video top level architecture done and achieved timing closure

peak acorn
#

dont understand a single thing here but it hurts my brain

keen sorrel
#

FPGA video processing, with a static and dynamic parts. Though until I can figure out how to setup the Vitis platform, the dynamic part is just a loopback

peak acorn
#

righte... hehe

#

What type of video processing and what does static/dynamic mean?

keen sorrel
#

Static is fixed at platform creation and consequently at boot in the device. It has scaling, chroma resampling, color conversion, and change detection. Along with the video read and write DMA to the system's DDR4.
Dynamic can be reconfigured live after boot.

#

the static:

#

dynamic:

primal yew
#

Hey everyone, anyone good at typescript, nodeJS and SSE? I got an issue with that and i just can't figure out the issue.. going crazy :D

acoustic pine
#

Where statements become nested to oblivion you very much rely on indentation anyway

#

I've seen some really crappy java codes with no attention to indentation be absolutely unreadable

cloud knot
sour moat
#

Does attiny85 use SPI for programming or it's a custom communication?

keen sorrel
#

Yes, the ISP is SPI. page 5

sour moat
#

But it uses 2 input pins?
SII(Serial Instruction Input)
SDI(Serial Data Input)

#

I was looking at different programming named High Voltage Serial Programming. You are right it's SPI.

acoustic pine
#

i finally deployed my first dynamic website.

#

But fuck i focused on the backend so much while learning i neglected the mobile front-end

#

at this point i'll need a complete CSS re-write

#

Also still need to set up a CDN for the large file size data

#

Can't be storing vids in an SQL database

spark temple
#

Not trying to be rude, just trying to shift how you ask questions because of the article.

primal yew
spark temple
leaden gorge
limpid reef
#

My all-time favorite has got to be this article from 20+ years ago.
http://www.catb.org/esr/faqs/smart-questions.html

Before You Ask

Before asking a technical question, do the following:

  1. Try to find an answer by searching the archives of the forum or mailing list you plan to post to.
  2. Try to find an answer by searching the Web.
  3. Try to find an answer by reading the manual.
  4. Try to find an answer by reading a FAQ.
  5. Try to find an answer by inspection or experimentation.
  6. Try to find an answer by asking a skilled friend.
  7. If you're a programmer, try to find an answer by reading the source code.

When you ask your question, display the fact that you have done these things first; this will help establish that you're not being a lazy sponge and wasting people's time.

Use meaningful, specific subject headers

On mailing lists, newsgroups or Web forums, the subject header is your golden opportunity to attract qualified experts' attention in around 50 characters or fewer.

  • Don't waste it on babble like โ€œPlease help meโ€ (let alone โ€œPLEASE HELP ME!!!!โ€; messages with subjects like that get discarded by reflex).
  • Don't try to impress us with the depth of your anguish; use the space for a super-concise problem description instead.

One good convention for subject headers, used by many tech support organizations, is โ€œobject - deviationโ€. The โ€œobjectโ€ part specifies what thing or group of things is having a problem, and the โ€œdeviationโ€ part describes the deviation from expected behavior.

  • Stupid: HELP! Video doesn't work properly on my laptop!
  • Smart: X.org 6.8.1 misshapen mouse cursor, Fooware MV1005 vid. chipset
  • Smarter: X.org 6.8.1 mouse cursor on Fooware MV1005 vid. chipset - is misshapen
leaden gorge
#

oh cool , I know about all 3 above those ๐Ÿ˜ฎ but not the catb one thats a new one ๐Ÿ™‚ Thanks!
it sounds a bit harsh these sites, but its for the good of learning and quick answering.

leaden gorge
spark temple
spark temple
fading osprey
forest hemlock
#

Are vim keybinds worth learning even without using vim itself?

fading osprey
#

in my personal opinion, not really

unborn imp
#

I've been using Vim keybindings in other editors for years. Use 'em if you like 'em.

cloud knot
#

it is always morning when person comes into a channel, and it is always late night when person leaves. Local time of any member of channel is irrelevant. Resistance is futile.

steady wren
#

Anyone know where I can buy a compact ultra sonic fingerprint sensor for hardware design for consumers

molten flicker
#

Any time I cite DAtAJA or NoHello or XYP or any of the others people get passive aggressive ๐Ÿ˜ญ

#

"Well, I'm sorry. I'll be sure to never express tentativeness in this chat going forward!"
(This was an actual message sent in response to me posting the don't-ask-to-ask link)

fading osprey
#

sucks to suck for them tbh

leaden gorge
grizzled steeple
#

Man... if only there was an easier way. Always having to call the compiler and faxing it code is quite tedious ๐Ÿ˜”
https://youtu.be/pJ-25-pRhpY

Hi, I'm Lex (they/them)
I made a very silly fax service.
In the video it is running on York Hackspace's internal phone system.
It will hopefully also be running at EMFCamp very soon, on the copper telephone network.

Source code is here: https://github.com/lexbailey/compilerfax

Enjoy :)

โ–ถ Play video
haughty oyster
#

I just saw that exact thing on a different server haha

lethal pike
#

Does someone know how to host a website on a own server and make the website public?

keen sorrel
lethal pike
#

How I should host it so have a Proxmox Server, I could run a virtual machine or a container. And how I can connect my website to my domain

midnight wind
#

as for domain, you just create a DNS record pointing to your IP

#

you can use cloudflare to hide your IP and use their proxy

lethal pike
#

Itโ€˜s just a porfolio of my projects

midnight wind
#

ok? but still what type of site is it

#

does it neeed databases? a bunch of html, css (static), etc?

midnight wind
lethal pike
#

Yeah

midnight wind
#

fyi you can host it for free on cloudflare pages without having to mess with hosting it on your own server

molten flicker
leaden gorge
spark temple
# midnight wind as for domain, you just create a DNS record pointing to your IP

It also depends on where they host it too. If itโ€™s in an ISP the IP address will roll at some point.

Theres a cron job script that will update the IP address if it changes.

Also, the database really shouldnโ€™t matter as you arenโ€™t exposing that to the internet. Iโ€™d only make it accessible locally and just do a vpn / ssh tunnel back to my network and then connect to the database that way if I needed to do remote work.

molten flicker
midnight wind
#

I was asking about database since that still would need to get setup on the server

#

instead of just spin up nginx/apache

spark temple
midnight wind
#

There's a bunch of free ones. I used a script for cloudflare dns

cloud knot
#

just found out one of the weirdest workflows for creating projects, ever ๐Ÿ˜„

#

reading about Kotlin multiplatform, i started searching for the wizard inside Android Studio ๐Ÿ˜„

#

"fill out a web form and download a ZIP with your project"... what a way to do this

wild delta
#

Uhhhh guys git isn't working anymore for me and I have no idea why :( I'm a programming noob so I've been trying to learn about git, and I changed some of the default settings, then I tried changing the default directory and I think that might've fucked something up. Github desktop doesn't recognize any of my repos anymore and I can't use git commands in git bash. Pls I need help :(

#

I even reinstalled git

#

I get "fatal : unable to access 'filepath' : invalid argument" as the error. The filepath seems to be the git config but idk it doesn't seem like the right one actually

#

Ok nvm I got it working ๐Ÿ˜Œ I had to change my environment variable because it had a really scuffed path because I definitely misunderstood a git command

clear sonnet
cloud knot
clear sonnet
# cloud knot those are coding standaards if you want to contribute to the engine. It is their...

It clearly says here at Epic Games they follow these guidelines. Meaning anyone wanting a job there won't unless u follow these guidelines and doubt any plugins or scripts you submit for the asset store will be accepted if it's not adhere to their coding standards.

To ignores these as simple "eh it's just epics thing" isn't great for anyone wanting to be part of the industry or anyone who is in the industry that might eventually have to adhere to the guidelines if the company decides to use their engine.

It's saying u either write pseudo code that won't offend anyone or just don't have a future in the industry

fading osprey
#

that is literally not what it is saying, it is not that deep, those are their coding standards. in fact, the first two sentences in the document are literally

"At Epic Games, we have a few simple coding standards and conventions. This document reflects the state of Epic Games' current coding standards. Following the coding standards is mandatory."

Now, the way I interpret this, is very much "following the standards (at Epic Games) is mandatory, and this documentation clearly lays those standards out for you to prevent confusion.

you do not have to follow them, if you do not work for Epic Games, though it will help you get better support if you do because they follow the internal guidelines everyone is beholden to at the company, meaning all the people who actually follow them are more likely to be understood....

#

I am just before writing this right now refactoring old code of mine that used slave, master, blacklist and whitelist to use more modern terminology, I agree that some of the things they wrote in there are slightly on the wilder side of "why though", like abort, execute, or native, but for the most part it seems to be entirely fine

frozen flame
#

Your fbi agent when you search "how to execute a slave" on google: Susge

nocturne galleon
#

Hey i just made one of my first real websites that wasent just a test, can yall check it out and give me some tips?
http://ashare.mooo.com/

fringe spade
#
  1. The connection isn't encrypted
#
  1. There doesn't seem to be a filesize limit
fringe spade
#

and when I try to upload a different file it just seems to throw an error

hollow mural
#

c#

gritty mirage
#

could someone help me with fixing this?

#

Commit -> GitLab CI/CD docker image build -> GitLab container registry -> Openshift

#

the problem is that locally the image from gitlab registry is running with no problems

#

but deployment fails with this error

nocturne galleon
#

also did a very, very bad command and had to reset the whole thing, was able to save the project folder from that burning building of a OS

#

*made everything be owned by a user that wasent root, had no ssh access, and the only connetion i did have was a SFTP connection i forgot to close. Used that to download my project and let the os burn down

old flame
cloud knot
#

And locally it runs because i guess you run it under Docker and not Openshift ?

fading osprey
#

I have a feeling I might have broken something ๐Ÿคฆ

cloud knot
fading osprey
#

Yes, however said JSON object was instead supposed to be a simple 0-0, which does actually get parsed by the utility method properly

foggy turtle
#

Hi, I'm looking for some insight into program permissions, if anyone is available of course to chat about it for five minutes.

old dragon
#

does anyone know gnuplot here? id want to load a column from sql, evenly space all the points (or the last 125) from that column along the x axis, and then have te columns values be the Y axis.. i have made a little bash script, but its very broken, and im really struggling to understand gnuplot and its requirements.
this is my script tha ti have glued together:

#!/bin/bash

# Set up variables
graph_title="Luftfeuchtigkeit"
output_file="LuftFeucht.png"

# Query the database and format the output as space-separated values
data=$(mysql -u root -ppasswordhereiguess -e 'Select LuftFeucht from Sensoren' Mars | tr '\n' ' ')

# Write the data to a file
echo "$data" > temp.dat

num_rows=$(wc -l < temp.dat)

# Generate the Gnuplot command file
cat << EOF > plot.cmd
set title "$graph_title"
set xrange [-0.5:{NUMROWS}-0.5]
set yrange [*:*]
unset key
plot "temp.dat" using 1:2 with linespoints title "$column_name"
EOF

sed -i "s/{NUMROWS}/${num_rows}/g" plot.cmd

# Plot the data using Gnuplot
gnuplot -persist plot.cmd

# Convert the graph to PNG format (optional)
convert -density 300 plot.ps $output_file

# Clean up temporary files
rm temp.dat plot.cmd plot.ps

this complains about undefined Y values.
Yes, this script is partially AI Generated, as the examples that i have found online seem too complex. id appreciate if anyone could bother fixing this, or atleast tell me why and what doesnt work-

glad girder
#

does anyone have tips for setting up mediawiki? i fucking suck ass at php since ive never learned it (always thought it was insecure or something)

#

i do have it set up since softaculous saved me but i dont rly know how to do anything else

nocturne galleon
#

can anyone help?

chrome saffron
#

My guess is that you didn't download all the necessary libs/deps

nocturne galleon
chrome saffron
#

Maybe because you're actually editing build output

#

Don't edit stuff under this directory

nocturne galleon
chrome saffron
acoustic pine
#

absolutely fumbled my java exam today and i'm pissed

#

because i misunderstood the question

#

Now that i understood the question 5 mins after, i am able to make the intended program in like 20 minutes with proper OOP arch.

native helm
#

We're using Azure DevOps Server 2020 Update 1.1, with 2 projects, our project, and the org shared project with package feeds, and one of the pipelines in our project is using the DownloadPackage@1 task to download a package from our maven feed in the shared project, and it successfully downloads it, or so it thinks, but it is a 1kb file. Does anyone have any idea what could be wrong? I can successfully get that package from the feed when depending on it in a maven project.

silver furnace
#

YAML is trash change my mind

#

On a related note anybody know how to stack multiple x-field-extra-annotation in OpenAPI generator without having to do \n (which works but is ugly):

          type: integer
          format: int64
          example: 10
          x-field-extra-annotation: "@jakarta.persistence.Id\n@jakarta.persistence.GeneratedValue(strategy = jakarta.persistence.GenerationType.IDENTITY)\n@jakarta.persistence.Column(name = \"id\")"```
#
  - making
  - a
  - list
``` results in buggy crap so that's not the answer
#

The prior gives me this at least

@jakarta.persistence.GeneratedValue(strategy = jakarta.persistence.GenerationType.IDENTITY)
@jakarta.persistence.Column(name = "id")
  private Long id;```
but that's expected
#

Note the missing tabulation though

silver furnace
#

I can also make them on one line but thats uggo. Can't manually format the java file since it gets auto-generated -.-

cloud knot
silver furnace
#

Yeah and a bit of an openAPI gen question too. Because technically should be separate additional annotations.

#

I just space delimited them for now. I mean it's not the end of the world. It's an autogenerated schema class that looks messy on its own

#

I was told I shouldn't directly use schemas it as Spring JPA entity classes anyways. This is temporary measure.

cloud knot
#

unfortunately what happens with x- items is literally up to the tool which uses the OpenAPI spec, as anything x- is a non-standard extension

cloud knot
silver furnace
# cloud knot have you tried what these guys did ?

Same effect as \n but this is honestly what I'll do for now, thanks. It gets rid of outer quotes so I don't have to escape ones in the annotations. Also makes the REST API yaml look way cleaner so that's something

#
    Student:
      type: object
      x-class-extra-annotation: |-
        @jakarta.persistence.Entity
        @jakarta.persistence.Table(name = "student")
      properties:
        id:
          type: integer
          format: int64
          example: 10
          x-field-extra-annotation: |-
            @jakarta.persistence.Id
            @jakarta.persistence.GeneratedValue(strategy = jakarta.persistence.GenerationType.IDENTITY)
            @jakarta.persistence.Column(name = "id")
        username:
          type: string
          example: abominableCider69
          x-field-extra-annotation: |-
            @jakarta.persistence.Column(name = "username")
        firstName:
          type: string
          example: John
          x-field-extra-annotation: |-
            @jakarta.persistence.Column(name = "first_name")
cloud knot
nocturne galleon
#

it may have no css, and no javascript, and was made in 2m, but im proud

frozen flame
nocturne galleon
#

yes.

pliant dove
late plank
#

Hi yall, I need to do a system migration for which the database is the main issue rn. The current db has about 350 tables, which needs to come down to 30. Quite some data can be truncated but what would be the best strategy for converting/transferring the data? Both dbs are mysql. Do you have some recommended tools or strategies for this?

nocturne galleon
#

are there any plugins that automatically input an ';' at the end of every c# line?

#

for vs code

raw plume
#

Could try to find a linter?

vagrant bramble
#

ok random "challenge", i'm looking for amusing examples of spaghetti code

#

preferably something not too high level

#

i could look it up myself, but im curious what you guys found over the years

spring cradle
#

ioccc

fair latch
#

I'm making a Mastodon bot/framework. Any suggestions for the name?

uneven star
#

man i love multi threading

#

still take quite a long time though

peak acorn
#

for whut

hybrid palm
#

or something that involves calculations

uneven star
#

genorating millions of increasingly longer sin waves is pretty computationally expensive

#

the length of the sin wave increases so it can fit more sin waves in the spectrogram

peak acorn
#

awsom

limpid knoll
#

if it works in windows 98/95 its good

#

(that is actually not a joke. i have a 98 VM and test out the website and see if it runs. ill take a screenshot when i can)

silver furnace
cloud knot
fading osprey
#

lmao, this is golden

cloud knot
#

so i have an idea of a project to do (export Plex library metadata into Kodi compatible NFO files), but can't decide on development itself.

Should i use it an excuse to learn a new language (Rust, Go or Python?) or do it in something i am fluent in.
Should i do it as CLI, desktop or web based UI ?

Hate making design decisions LOL

forest hemlock
cloud knot
# forest hemlock What languages are you fluent in?

lately i did mostly frontend, thus JS/TS & other web technologies. Also did a bunch of Java/J2EE, PHP. I wouldn't count my use of Pascal from 2 decades ago as a relevant skill these days. Also did some of the Android & iOS native technologies, so light Android Java/Kotlin & iOS Objective C/Swift skills (but only very light, to get me by to create Cordova plugin interfaces between the native code and JS)

#

also dipped my toes a little bit into Dart/Flutter

#

also probably forgot random small technologies we used/tested at work along the way

normal pond
#

I'm Stefano, I'm the Founder of Kaizen Media. I'm offering my custom web design & web development services for free. Experience in this space 4+ yrs Shoot me a DM and Let's Build

-Fully Coded
-No Templates used
-Mobile Friendly

forest hemlock
cloud knot
forest hemlock
fading osprey
#

It's always handy to learn a new language, never know when it might come in useful

cloud knot
#

i guess i could still do Kotlin multiplatform, even if i don't want to make mobile platforms, thus allows me to learn the Kotlin language & Compose multiplatform functionality before i might need to use it at work. Not sure it is ideal toolkit for this use case, but oh well, not my problem /s

forest hemlock
#

Well if you did a bunch of java and just want to get a working program out the door you could just use that

fading osprey
#

If they already have to learn Kotlin MP for work at some point anyway, why not learn it now, and be more productive at work later when they are more experienced? Seems like a reasonable time investment

cloud knot
limpid reef
cloud knot
fading osprey
#

Rip

cloud knot
#

i mean it was throwing me an error inside the squareup codeblock generator, but with no context, so couldn't really figure out what was wrong

fading osprey
#

Looks like it is time for hand crafting

cloud knot
#

i mean sure i can do requests by hand and parsing XML, but i would prefer not to

modest tartan
#

i want to learn programming how ever the only issue is that i won't focus long enough to learn it

cloud knot
cloud knot
#

had to make the package name to start with in_. instead of in. ๐Ÿ˜„

fading osprey
solid walrus
#

Hey guys,

This is Arsalan from CAMB AI -- we've spent the last month building and training the 5th iteration of MARS, which we've now open sourced in English on GitHub https://github.com/camb-ai/mars5-tts

We've have also been featured on VentureBeat: Check it out here.
We'd really love if you guys could check it out and let us know your feedback. Thank you!

GitHub

MARS5 speech model (TTS) from CAMB.AI. Contribute to Camb-ai/MARS5-TTS development by creating an account on GitHub.

opaque terrace
#

Need the collective brain on a problem. We are recording an mp3 voice message in the webapp via the https://github.com/samhirtarif/react-audio-recorder , that works just fine. We get the file to the server, mime type is correct ( audio/mpeg ), file name has .mp3 extension. I upload it to whatsapp media endpoint, it accepts it. Then I send audio type message ```Array
(
[messaging_product] => whatsapp
[to] => 1234546566
[type] => audio
[audio] => Array
(
[id] => 306114195907326
)

)

GitHub

An audio recording helper for React. Provides a component and a hook to help with audio recording. - samhirtarif/react-audio-recorder

cloud knot
# opaque terrace Need the collective brain on a problem. We are recording an mp3 voice message in...

is this PHP ? have you checked the exact message you are sending as JSON ? Because https://developers.facebook.com/docs/whatsapp/api/messages/media/ specifies it as:
"audio": {
"id": "your-media-id"
}

So it does matter if your PHP to JSON conversion makes:

"audio": {"id":"xxxx"}

or

"audio": [{"id":"xxxx"}]

from it

opaque terrace
#

hmm

#

i mean other files are sending fine, but yeah gimme a sec

cloud knot
#

The official documentation indicates that in order to send such messages, the conversation must be initiated by the user.

#

could it be that your media file is the first message in the conversation ?

opaque terrace
#

no that part is handled

#

wall other messages work just fine, only audio has this stupid issue and Guzzle client makes it hard to debug...

cloud knot
#

you could try temporarily to upload it to a server and send link instead of id, at least to test if there is some issue with the uploaded media:

opaque terrace
#

{"messaging_product":"whatsapp","to":"+xxxxxxx","type":"audio","audio":{"id":"1507724556813303"}}

#

@cloud knot it does send out correct JSON format

cloud knot
#

do you have webhook set up ? Some errors are aparently only communicated via webhook

opaque terrace
#

we have, but i've not been checking what arrives for it

#

okay, we gonna need to update some code for our gateway to process some system messages, maybe it's been sending it, but we never knew that some errors are webhook only

cloud knot
# fading osprey Damn, that's kinda lel

on positive note, the annoying part (Gradle configuration of openapi, automatic building, fetching of the OpenAPI schema etc) is done, so now i can actually start coding in Kotlin and figure out how the hell does Kotlin & Kotlin/Compose Multiplatform even works. Even if i only do a desktop app for now

sand lily
#

ive been thinking about building my own pokedex with the pokeApi in java. And as a beginning to my java script journey of course. ive bern coding backend for almost 10 months now with java. would you say building a pokedex is a good intermediate project to learn some things in frontend dev and improve my backend dev skills even more?

cloud knot
#

backend is mostly whatever you want to use. You want to have a well defined "contract" for frontend, that is the REST API and the structures in it; then you can play around with backend technologies as you progress through the skills

#

if you do your REST API definition well, you can replace a Java J2EE or Spring backend with Quarkus microserves running on Kubernetes, then replace them with whatever next ๐Ÿ˜„

urban mulch
#

so, I have a very specific problem with HTML
I have several audio tags in a page
I click to open the options to one of them and it always opens the last one, no matter which one I clicked
Any ideas to fix it?

cloud knot
#

what do you mean by click to open the options ? Native browser menu or some JS functionality ?

#

if JS functionality, how do you initiate those opening of "options"?

urban mulch
#

Native browser menu

#

I made this codepen to demonstrate

#

ok, so I just checked it. It's a visual bug, the menu opens only on the last one, but the "context" is for the one I clicked

chrome saffron
urban mulch
#

I only tested in chromium-based browsers

fading osprey
#

works fine for me in floorp/firefox

prime fable
#

Hello @everyone , i am Chablis a full stack developer. I am available for any project

#

i am new in this server

fading osprey
#

Pro tip, you won't make friends by pinging everyone (even if you could do that)

cloud knot
#

this is a duplicate of crbug.com/341741271 which has been fixed starting with Chrome version 127.

#

we are at Chrome 126 now i think, so next version ๐Ÿ™‚

noble plover
acoustic pine
#
@echo off
echo starting

REM Add ngrok authtoken
ngrok config add-authtoken YOUR_NGROK_AUTHTOKEN

REM Start ngrok
start /b ngrok tcp 192.168.1.195:3100 --log=stdout > NUL
echo ngrok complete

REM Wait for ngrok to initialize
timeout /t 5 /nobreak > NUL

REM Get public URL from ngrok
for /f "tokens=2 delims=:" %%a in ('curl -sS http://localhost:4040/api/tunnels ^| jq -r ".tunnels[0].public_url"') do (
    set PUBLIC_URL=%%a
)
echo ngrok curl complete

REM Split URL into components
for /f "tokens=1,2 delims=:" %%a in ("%PUBLIC_URL%") do (
    set PORT=%%b
    set URL=%%a
)

REM Remove leading "//" from URL
set URL=%URL:~2%
echo %URL%

echo cloudflare
REM Update Cloudflare DNS record
set JSON_DATA={\"data\":{\"port\":%PORT%,\"target\":\"%URL%\"}}
curl -X PATCH "https://api.cloudflare.com/client/v4/zones/YOUR_ZONE_ID/dns_records/YOUR_DNS_RECORD_ID" ^
    -H "Authorization: Bearer YOUR_API_TOKEN" ^
    -H "Content-Type: application/json" ^
    -d "%JSON_DATA%"

REM Wait for the DNS update to complete
timeout /t 1 /nobreak > NUL

REM Change directory to Minecraft server location
cd /d C:\Users\DELL\Desktop\paper-1.20-17

REM Start the Minecraft server
java -Xmx8G -jar paper-1.20-17.jar -nogui

can anyone help me witht this
the cloudflare section is not working
{"result":null,"success":false,"errors":[{"code":9207,"message":"Request body is invalid."}],"messages":[]}

#

it automatically starts an ngrok tunnel
then tries to update a cloudflare dns record

#

before finally starting the minecraft server

cloud knot
runic drum
#

What programming lang should I learn today?

chrome saffron
runic drum
chrome saffron
runic drum
#

What can I do with it?

chrome saffron
#

Random stuff, your imagination is the limit

forest spindle
#

hi guyss!!
i have learned MERN stack, want to learn nextjs can anyone suggest some good free resources

noble plover
#

both annoying and useless at the same time !

peak acorn
#

And if you want something useful learn go if you havent already

green matrix
acoustic pine
#

Both ends up at the same spot

#

If it works it works

#

Though then there's that third cat who jumped

nocturne galleon
#

Hello! Do any1 here know about llm and python integration ?

peak acorn
green matrix
#

Yeah, LangChain is quite popular in the LLM space

nocturne galleon
tardy sluice
#

Hello guys, I built a native app in Unity that runs on a meta quest3 and a react app that will be hosted somewhere else.
Now I want the native app and the react app (the instance that will be opened on the browser) to talk to send messages to each other.
I do not want an external server to be involved for every transaction.
I tried WS but the HTTPS protocol (on which the react will run) will not talk to WS, and I am getting errors with the certificates hashings.
I tried WEBRTC but it seems too complex and there are not many resources out there for Unity WEBRTC with React for text.
I tried running a local server within Unity app and this approach works but the messages can only go from the native app to the quest but not the other way around.

Can someone please help me out with this problem?

peak acorn
#

webrtc needs a STUN server or something im pretty sure

tardy sluice
tardy sluice
noble plover
#

for a start if you want websocket communication you almost definitely need to be using it in an insecure context, as much as that sucks

peak acorn
#

If ur on lan you can just expose a port and be done with it

sand lily
#

hey guys, im playing around with js rn (relatively new to programming, only did backend stuff like java and c#). Im trying to build a pokedex and have tried the following code. the first fetch returns an url to the Kanto region endpoint. is it possible to fetch the returned url like i did? what is my mistake here? :PepeHmm:

peak acorn
#

I dont fully understand what you are trying to do/what the api does, but fetch() and then() are both parts of async promises, so keep in mind that the program will continue while the code in those are processed in the background.
The final .then() doesn't return anything, so it's a promise<void>. If you change it to (y => {log...; return results}) you'd get closer to what I think you want. However, that is still just a promise to eventually resolve a result, if you want to use that url in the let kantoDex part, you'd need to make that piece of code asynchronous so that the code can actually pause and wait for pokedex to resolve to a result

cloud knot
spark rune
#

Things have gone horribly wrong when you start vectorizing your Golang for performance gains

peak acorn
#

Like making use of SIMD functions in cpu? How do u even do that in go

worldly musk
spark rune
worldly musk
#

Fair

modern pelican
#

is it trying to access unalocated memory?

fresh rampart
limpid reef
# fresh rampart @here i recently changed my personal site's color scheme, criticism? deusvult.n...

At first glance, not enough color contrast. I don't personally follow WCAG myself and I have 20/15 vision, but even I have a hard time reading the text because there's not enough contrast. https://accessibe.com/accessscan?website=deusvult.neocities.org

fresh rampart
fading osprey
#

Coming in here with 20/20 vision, on a best case scenario dark room with bright screen.

There is no way anyone is reading that without straining their eyes, needs much higher contrast on the text. If you want light text, you can try a darker outline on the text with maybe 1px thickness and keep the existing text colour, but for anyone with any level of reading issue, the site as it stands is as good as incomprehensible

modest tartan
#

i want to learn python, c++ and c# but i can't do it by myself unless someone is there

mighty patrol
#

It's funny cuz I actually did end up making a website for a biology assignment

nocturne galleon
#

I couldn't find an app for android that can log the value of battery temperature and current consumption in a file. Is it possible to use qpython to write a logger instead?

cloud knot
nocturne galleon
cloud knot
#

as i said, if you want it yourself, an android app with background service which reads that data and reports it is an option

chrome saffron
#

Max update frequency is 1 minute for HA App

round jolt
#

College: here's the instruction set for a extremely specific education-specific subset of ARM assembly that has to be run in a simulated environment
Also college: we won't tell you how to use it

peak acorn
#

your quad word is misaligned bro!

nocturne galleon
fossil lion
#

Somone assist me

fading osprey
#

well it is pretty easy to read, but, node cannot find index.js, so, where is index.js located? because it isnt in the current directory

cloud knot
#

isn't the inedx.js in the Chatgpt folder ?

cloud knot
tardy sluice
#

I have a native unity app running in the background of my quest and this app will launch the browser onto this device and run in the background, and now this app is not listening to the user speech in background, and is not playing audio, how can I solve this

jovial garden
#

I got this really weird C++ error

modest tartan
heavy dew
jovial garden
#

it asked me then to add a semicolon

keen sorrel
#

That's just not valid C++. There's no way to fix it. What is your intention?

modest tartan
keen sorrel
#

That's assuming their intention is to return 0

modest tartan
keen sorrel
#

That style of return syntax is widely used across languages, not even just those that are C-like

spring cradle
modest tartan
spring cradle
modest tartan
spring cradle
#

oof

modest tartan
#

But I regret nothing

keen sorrel
jovial garden
#

to end the program if the variables inputted are below the minimums in a conditional

keen sorrel
# jovial garden to end the program if the variables inputted are below the minimums in a conditi...

convention is to return a non-zero number for errors and zero for success. You can define your error numbers with an enum or just directly return an integer literal.

enum Error {
  NONE = 0,
  INVALID_INPUT = 1
};
int main(int argc, char** argv) {
  if (error_condition)
  {
    return Error::INVALID_INPUT;
  }

  return Error::NONE;
}

or

int main(int argc, char** argv) {
  if (error_condition)
  {
    return 1;
  }

  return 0;
}
keen sorrel
#

if you're trying to end the program from outside of main, you can't really. Not without it being a crash anyways.

peak acorn
#

So we have this 11k loc go file. Will break that up into a smaller file later. But anyway -- my coworker uses a mac and his vscode autocomplete and stuff is almost instant, mine takes over a second on windows. Anyone know if this is a configuration difference or mac is just magically instant at it?

keen sorrel
peak acorn
#

my C drive is a p31 gold 1tb. Almost completely full, might be harming speed.
Project itself is stored on a second drive, crucial p3 4tb
maybe the two drives?

keen sorrel
#

Performance degrades a lot beyond 80-85% capacity. You can benchmark your drives and ask your coworker to do the same if you want to see how substantial the difference is. However, if you have sufficient RAM the impact of storage should lessen as things get cached. If they have apple silicon, their RAM is also potentially higher performance than yours.

peak acorn
#

They have a high end mac, m2 ultra 192gb and some huge ssd. And of course their SSDs and ram are crazy fast -- but my pc isnt a slouch either, 12600k 64gb ram. Not crazy fast, but im surprised that a file that big just turns intellisence into mush on my machine

keen sorrel
#

What speed is your RAM?

peak acorn
#

just ddr4 3600

keen sorrel
#

To put that M2's RAM into some perspective, it has 27.7x your RAM's bandwidth. It's CPU is also substantially faster. Even if your machine has no potential issues, it's still gonna be noticeably slower

peak acorn
#

Yeah im aware of the speed difference. There doesn't really seem to be a middleground though. Either its instant or its ~3+ seconds. So I figure it might just be a system config thing

#

Either way. Looks like it's just system speed and obviously the solution is to break that huge file into multiple

#

unfortunately pc will never get fast ram ๐Ÿ˜” time to buy an epyc cpu

keen sorrel
peak acorn
#

Its just fact of the matter m2 ultra gets 12 channels of ddr5 (or is it 4 idk) where you can only get that speed on epyc

keen sorrel
#

EPYC doesn't officially support 6400MT/s DDR5 and the M2 ultra has 16 channels of that. Apple silicon is pretty crazy

peak acorn
#

๐Ÿคก

#

yeah 16 mb. insane

modest crystal
#

i tried installing pip 2 times it still isint recognized as a command pls help

eternal scarab
modest crystal
chrome saffron
modest crystal
jovial garden
#

here is the full code:

using namespace std;

int Milk = 0; // ml
int Flour = 0; // g
float Egg = 0; // whole
int Butter = 0; // ml
int Salt = 0; // mg
const int minMilk = 24;
const int minFlour = 13;
const float minEgg = 1;
const float EggPerBlin = 0.4;
const int minButter = 15;
const int minSalt = 284;
int main() {
    cout << "Hello!" << "\n\t";
    cout << "blinmaker starting up! \n";
    cout << "How much milk do you have?";
    cin >> Milk;
    cout << "How much flour do you have?";
    cin >> Flour;
    cout << "How many eggs do you have?";
    cin >> Egg;
    cout << "How much butter do you have?";
    cin >> Butter;
    cout << "How much salt do you have?";
    cin >> Salt;
    return 0;
    if (Milk < minMilk || Flour < minFlour || Egg < minEgg || Butter < minButter || Salt < minSalt){
    cout ;"no blin today";
    return(main;);int());
    }
}```
cloud knot
#

not sure about others, but that whole return statement makes no sense. you are returning main (what is main here? the entry point function) from main and whatever is behind it ?

you return a number; and everything else starting with ( and ending with ) after that return is syntactical nonsense (imo)

#

you literally just return 1; (or any other valid int) there, not return (main;);int());

#

also the whoile last section is unreachable code

#

the first return 0; literally stops the execution, so the if and anything after is not executed

keen sorrel
#

This was already explained the other day, not sure why they didn't follow the advice

forest hemlock
#

How do you change the font that every part of VSCode uses? I can only change the font of the editor portion, not other parts like the explorer

dim vale
# jovial garden here is the full code: ```#include <iostream> using namespace std; int Milk = ...
#include <iostream>
using namespace std;

int Milk = 0; // ml
int Flour = 0; // g
float Egg = 0; // whole
int Butter = 0; // ml
int Salt = 0; // mg
const int minMilk = 24;
const int minFlour = 13;
const float minEgg = 1;
const float EggPerBlin = 0.4;
const int minButter = 15;
const int minSalt = 284;

int main() {
    cout << "Hello!" << "\n\t";
    cout << "blinmaker starting up! \n";
    
    cout << "How much milk do you have? ";
    cin >> Milk;
    
    cout << "How much flour do you have? ";
    cin >> Flour;
    
    cout << "How many eggs do you have? ";
    cin >> Egg;
    
    cout << "How much butter do you have? ";
    cin >> Butter;
    
    cout << "How much salt do you have? ";
    cin >> Salt;
    
    if (Milk < minMilk || Flour < minFlour || Egg < minEgg || Butter < minButter || Salt < minSalt) {
        cout << "No blin today" << endl;
    } else {
        cout << "You have enough ingredients to make blins!" << endl;
    }
    
    return 0;
}
#

@jovial garden try this

south frost
#

Async Javascript, AJAX, APIs and Classes OOPs in Javascript neccessary to start ReactJS ?

chrome saffron
haughty oyster
#

I'm working an a react native app with EXPO and I can't get notifications to work. They do arrive but they don't play any sound or vibration even though I set these things. They also don't appear as banners, they just land in the notification center

const notification = {
    content: {
    title: 'Low Charge!',
    body: `Hey there! You only have ${batteryLevel}% battery remaining! Please charge your phone!`,
    sound: 'notification.wav'
    },
    trigger: {
        seconds: 2,
        channelId: 'lowBattery'
    }
};
if(batteryLevel < threshold) {
    Notifications.scheduleNotificationAsync(notification);
}
async function registerForPushNotificationsAsync() {
    let token;
    
    await Notifications.setNotificationChannelAsync('lowBattery', {
        name: 'Low Battery notification',
        importance: Notifications.AndroidImportance.MAX,
        vibrationPattern: [250, 0, 250, 0],
        sound: 'notification.wav'
    });
//rest of stuff that's required (permissions, token &stuff)

I'm making the app for Android

jovial garden
# dim vale ```C++ #include <iostream> using namespace std; int Milk = 0; // ml int Flour =...

Did, I added maths to say how many blins you can make: here's the full code, now there's an error about a missing semicolon:

using namespace std;

int Milk = 0; // ml
int Flour = 0; // g
float Egg = 0; // whole
int Butter = 0; // g
float Salt = 0; // g
const int minMilk = 24;
const int minFlour = 13;
const float minEgg = 1;
const float EggPerBlin = 0.4;
const int minButter = 15;
const float minSalt = 0.284;

int main() {
    cout << "Hello!" << "\n\t";
    cout << "blinmaker starting up! \n";
    cout << "How much milk do you have? ";
    cin >> Milk;
    cout << "How much flour do you have? ";
    cin >> Flour;
    cout << "How many eggs do you have? ";
    cin >> Egg;
    cout << "How much butter do you have? ";
    cin >> Butter;
    cout << "How much salt do you have? ";
    cin >> Salt;

    if (Milk < minMilk || Flour < minFlour || Egg < minEgg || Butter < minButter || Salt < minSalt) {
        cout << "No blin today" << endl;
    } else {
        float FlourBlins = Flour / minFlour;
        float MilkBlins = Milk / minMilk;
        float EggBlins = Egg / EggPerBlin;
        float ButterBlins = Butter / minButter;
        float SaltBlins = Salt / minSalt;

        cout << "You have enough ingredients to make" min(FlourBlins, MilkBlins, EggBlins, ButterBlins, SaltBlins) " blins!"<< endl;
    }

    return 0;
}
cloud knot
cloud knot
haughty oyster
#

yeah, I did set a vibration pattern (it's in the original message) and have these lines in app.json

#

Also, I'm trying to make it on-device only, it doesn't need to connect to the internet, it shouldn't actually since it's just a small tool

#

this is correct, right? I did build it with EAS and tested the APK on my phone but it didn't work

cloud knot
#

i haven't done expo, so i can't help you with their specific functionality, i was talking in general from Android notifications experience

cloud knot
# haughty oyster yeah, I did set a vibration pattern (it's in the original message) and have thes...

check if the file exists in res/raw in Android app structure. Also i found this ? https://github.com/expo/expo/issues/16447#issuecomment-1935664116

GitHub

Summary I am trying to play custom sound when receiving notification. I am using eas build. I have added a wav sound in the following location: "./assets/sounds/notification_message.wav"....

deep lodge
#

i made a game engine

chrome saffron
prisma violet
#

whats your guys thoughts on this question for my assignment
Write a method checkCharacter() which has 2 parameters: A String, and a specified index (an int). Method checkCharacter() checks the character at the specified index of the String parameter, and returns a String based on the type of character at that location indicating if the character is a letter, digit, whitespace, or unknown character.


public class FunWithCharacters {

   public String checkCharacter(String word, int index) {
      
   
   public static void main(String[] args) {
      
      FunWithCharacters labObject = new FunWithCharacters();
      String word = "happy birthday"; // Set string
      int index = 2; // Set specified index to 2
      System.out.println(labObject.checkCharacter(word, index));
      
      index = 5; // Set specified index to 5
      System.out.println(labObject.checkCharacter(word, index));
      
      word = "happy birthday 2 you"; 
      index = 15; // Set specified index to 15
      System.out.println(labObject.checkCharacter(word, index));
      
      word = "happy birthday!"; 
      index = 14; // Set specified index to 14
      System.out.println(labObject.checkCharacter(word, index));
   }
}

is what I have so far, the only thing written by me is the public String

silk eagle
#

the entirety of my thoughts are: weird wording on what its asking u to return (unless there was some markdown where the question was presented), my first instinct is that it wants you to return a string like "letter" or "digit" but that's not immediately obvious just vaguely implied

#

but also you can do it we all believe in you widepeepohappy

modest tartan
#

Is it bad that I use f strings in python?

peak acorn
#

I think they are fine

modest crystal
#

Anyone have experience creating datasets for machine learning? Pls DM me i have a project im trying to do but i dont know how to do it

burnt grotto
#

If someone has knoweldge in coding in c# pleasd dm me. Working kn a gta project and could use help:)

soft fern
#

Ffs if people have questions just ask them why does everyone want a personal tutor to DM them. Public discussion leads to more people learning from the convos and less time wasted. Yes I know how to program in languages...

jovial garden
# chrome saffron You forgot to add `<<` on line 39

current codebase:

using namespace std;

int Milk = 0; // ml
int Flour = 0; // g
float Egg = 0; // whole
int Butter = 0; // g
float Salt = 0; // g
const int minMilk = 24;
const int minFlour = 13;
const float minEgg = 1;
const float EggPerBlin = 0.4;
const int minButter = 15;
const float minSalt = 0.284;

int main() {
    cout << "Hello!" << "\n\t";
    cout << "blinmaker starting up! \n";
    cout << "How much milk do you have? ";
    cin >> Milk;
    cout << "How much flour do you have? ";
    cin >> Flour;
    cout << "How many eggs do you have? ";
    cin >> Egg;
    cout << "How much butter do you have? ";
    cin >> Butter;
    cout << "How much salt do you have? ";
    cin >> Salt;

    if (Milk < minMilk || Flour < minFlour || Egg < minEgg || Butter < minButter || Salt < minSalt) {
        cout << "No blin today" << endl;
    } else {
        float FlourBlins = Flour / minFlour;
        float MilkBlins = Milk / minMilk;
        float EggBlins = Egg / EggPerBlin;
        float ButterBlins = Butter / minButter;
        float SaltBlins = Salt / minSalt;

        cout << "You have enough ingredients to make" << min(FlourBlins, MilkBlins, EggBlins, ButterBlins, SaltBlins) << " blins!"<< endl;
    }

    return 0;
}```
And I'm getting this error:  C:\Users\SubSpruce\Code\blinmaker.cpp|39|error: no matching function for call to 'min(float&, float&, float&, float&, float&)'|
modest crystal
soft fern
# jovial garden current codebase: ```#include <iostream> using namespace std; int Milk = 0; // ...

Where do you expect to get this min function from? The built in static function on the math lib only takes two params and returns the minimum between the two https://www.geeksforgeeks.org/c-sharp-math-min-method/

jovial garden
#

current codebase, refactor with nested mins:

using namespace std;

int Milk = 0; // ml
int Flour = 0; // g
float Egg = 0; // whole
int Butter = 0; // g
float Salt = 0; // g
const int minMilk = 24;
const int minFlour = 13;
const float minEgg = 1;
const float EggPerBlin = 0.4;
const int minButter = 15;
const float minSalt = 0.284;

int main() {
    cout << "Hello!" << "\n\t";
    cout << "blinmaker starting up! \n";
    cout << "How much milk do you have? ";
    cin >> Milk;
    cout << "How much flour do you have? ";
    cin >> Flour;
    cout << "How many eggs do you have? ";
    cin >> Egg;
    cout << "How much butter do you have? ";
    cin >> Butter;
    cout << "How much salt do you have? ";
    cin >> Salt;

    if (Milk < minMilk || Flour < minFlour || Egg < minEgg || Butter < minButter || Salt < minSalt) {
        cout << "No blin today" << endl;
    } else {
        float FlourBlins = Flour / minFlour;
        float MilkBlins = Milk / minMilk;
        float EggBlins = Egg / EggPerBlin;
        float ButterBlins = Butter / minButter;
        float SaltBlins = Salt / minSalt;

        cout << "You have enough ingredients to make" << min(min(min(min(FlourBlins, MilkBlins), EggBlins), ButterBlins), SaltBlins) << " blins!"<< endl;
    }

    return 0;
}```
soft fern
#

https://www.scrapehero.com/open-source-web-scraping-frameworks-and-tools/ I would lean towards apache nutch if you don't need the GUI for anything and can get it all done through http requests and parsing pages/responses. If need a GUI for some reason would look more towards puppeteer or selenium based stuff like cypress (used for integration and e2e testing but is a general browser automation tool) @modest crystal

Using web scraping frameworks and tools are great ways to extract data from web pages. In this post, we will share with you the most popular open source frameworks for web scraping and tools to extract data for your web scraping projects in different programming languages like Python, JavaScript, browser-based, etc.

#

With regard to stock prediction it is a thing that high speed trading bots programmed by physicists have basically "won" but there may be some "space" for employing llms or other AI systems to analyze trends and whatnot and help to make longer term choices (as is most llms pretty bad at the long term planning and "true understanding" of dynamics in the world and spatial reasoning and whatnot but lots of room for training specialized ais for now still)

#

Also somewhat funny all the crypto hype over like the last decade and people probably would have been better off just dumping the money into Nvidia stock instead of buying up cards and/or crypto for the most part

#

Generally speaking the "problem" with scraping the public web (legal details aside) is typically lots of garbage info copy pasted between lots of servers and higher quality data is usually gonna be behind paywall of some sort and usually with throttling and policy that stops you from taking the data and running (or at least let's them chase you)

modest crystal
soft fern
#

Yeah wasn't really sayin you should do that just sayin it's one of those places computing and statistical analysis and whatnot has been applied a bunch already and hard space to find a niche I think (not financial advice but personally just keep basically majority of stuff in "safeish" slow growth mutual funds and mess around with mess around money in stonks and other things)

modest crystal
soft fern
#

All good, you see Michael Reeves goldfish investment thing? Pretty hilarious

modest crystal
#

yea its somehow better than some investment bankers lol

modest crystal
#

im tryna get the revenue and profit stats from yahoo finance

#

but it is not fetching anything

soft fern
#

Yeah a lot of those sites have like paid API access too so do what they can to block out the scrapers, if you put in "enough effort" can usually work around things but some sites put in more or less effort to try and "protect" their data ultimately anything sent to your client and decrypted is readable though

#

Network tab in chrome and save as har and can parse through whatever you've been browsing while the network panel open.

modest crystal
#

i tried selenium too but it just doesnt grab anything it just comes as blank

soft fern
#

Lots of little make a http request and process the response are written in python since the string processing/parsing is pretty simple and you don't usually need like multi threading or other stuff to just batch process text

#

Yeah selenium is made as a testing tool so it isn't like geared towards scraping but can be used to generically interact with a browser

#

Yah that's one option for sure

#

You might want to just see what pricing is like for the different apis if they have a dev console (Google basically will give you anything for a price and a lot of free usage for sake of development)

modest crystal
#

i dont want to pay tho thats why im just tryna scrape

soft fern
#

Right but I'm saying you should see what you can get "free tier" and/or what the cost is since time is money

modest crystal
#

ok

#

where could i get the pricing details for like yahoo finance

soft fern
#

Google it ๐Ÿ˜‰ hehe but really I dunno off hand

silk eagle
modest crystal
#

alr

soft fern
#

I know like Google maps gives you a good amount of "free tier" stuff but they make you get an API key at least to track requests coming from your services and to throttle things eventually or make you pay but takes a while to hit those limits

silk eagle
#

well thats requests not selenium

modest crystal
#

shit i deleted the selenuim one

silk eagle
#

chances are just using selenium will magically fix any parsing you do because the data is loaded dynamically and selenium will actually run the javascript on pages required to load that data.

modest crystal
#

ok let me just ask gpt to write me a selenuim script lol

#

@pep\

cloud knot
#

for example live updates clearly come through a binary data from
wss://streamer.finance.yahoo.com/ ๐Ÿ˜„

modest crystal
cloud knot
#

if you can reverse engineer how the data received via web socket is processed, it is much more usable

cloud knot
modest crystal
cloud knot
#

if i understand it correctly, the basic idea is that you connect to wss://streamer.finance.yahoo.com/, send a {"subscribe":["ticker1","ticker2"]} message to server and you are then receiving binary data.
this.connection.addEventListener("message", this.handleWebSocketUpdate))

And then message received from backend is sent in to that block of code above. What exactly that code does is a good question. Atob does base64 decoding, so the first few lines creates an instance of quotefeeder object from that binary data, and then the data is processed. now what is the quotefeeder ? good question

cloud knot
#

someone made a python implementation of it, use convert it to whatever platform you want to use it in

modest crystal
#

ok thanks

modest crystal
#

yliveticker is good but yfinance is for historical data, which is what i need

cloud knot
#

ok, so you want it for the table shown on the page ?

modest crystal
#

i got it to work

cloud knot
#

recommend rate limiting yourself tho, otherwise they might put your IP on block list

modest crystal
#

i think yfinance is just a databast

#

but how would i do that

cloud knot
#

"rate limiting" - not requesting everything in rapid fire succession, but give some pauses between requests

#

i mean if you are interested in 1000 tickers - you don't send 1000 requests right one after another, but add let's say a 1 second pause between each call

modest crystal
#

alright

cloud knot
#

yes, it will take 15 minutes to download stuff like that, but server might give you a pass because you do reasonable amount of requests, not all at once.

modest crystal
#

ok i set it to 2 seconds

cloud knot
#

so it depends on the service, but it is good to not overwhelm the target when you do scraping, so you don't put a target on yourself

modest crystal
#

ok

#

there is also a library called yahooquery which does exactly that if anyone wants

stone mirage
#

Hey guys I need advice.
I want to build a simple application that has a ui, a database and can plot the data.
I know a bit of sql and also python and matplotlib.
I already did a small and easy project where I had to get data from an excel table and plot it, and I used python with matplotlib and tkinter, and I did not really like tkinter, but i don't know how i would create the ui without it.
I know I am really picky, in fact i also hate VB (at school we used MAUI and i hated it).
Also i'd prefer to not have to use JS as I'd like to wait to start learning at school in september.
If you have any ideas please share.

tldr: need a way to create an application with database, ui and data visualization, preferably without js or .net
p.s.: I do not speak english as a first language, and excuse me for any technical error

nocturne galleon
#

Since WHEN did typing HTML in vscode got so easy??????

soft fern
#

pretty sure since vs-code existed, it's always really been geared towards web dev, some things still require extensions to get completion or compilation for but has always been pretty web friendly/focused out of the box

#

maybe you're confusing it with visual studio or something,visual studio is more geared towards C# or desktop application development out of the box, sometimes used in combination with Unreal engine or other things

soft fern
# stone mirage Hey guys I need advice. I want to build a simple application that has a ui, a da...

tkinter is definitely a popular option for UI development in python another alternative for desktop UIs you might want to look at is PyQt. UI libraries in general are not that great to work with hence a lot of things just using a web based UI (wide compatibility and lots of folks who know HTML/JS well enough to hack things together relatively quickly, CSS is a nightmare but it gets the job done). If you wanted to make a web API in python and have a web UI you could use FastAPI, SQLAlchemy for ORM so you don't need to write much SQL by hand just dealing with objects in python and mapping them to tables, Alembic is good for migrations if you want to go the extra mile and make it more "real world". It is also typical to architect things in a way that you have a REST API with JSON requests/response bodies and then build your client UI as a separate application that consumes the API but for classwork with limited time (or POCs) is typical to skip on things and take short cuts to get things done.

#

Also, if you wanted to have the python layer just like output preprocessed web pages might be worth taking a look at Django or Flask, both allow for making web APIs, Django includes ORM as well so would not need SQLAlchemy if using that, Flask is a bit more "lightweight" than Django but still lets you handle setting up "route handlers" easily and has some html templating I believe.

drowsy elbow
#

Fucking end me

#

I already have one collegue who is writing pyramids of doom, but appearantly I also have another collegue who can't code at all. wtf is this crap

brittle orbit
chrome saffron
#

At this point just start watching some begginer C++ tutorials

jovial garden
#

oh I know now, it has to be part of the main loop.

#

fixed, so deleted OG message

drowsy elbow
modest crystal
#

I want to get news data for a certain company for the last year. NewsAPI only allows you to go back a month. Any help?

modest crystal
#

Or perhaps just grab market sentiment

drowsy elbow
#

@modest crystal

#

I guess you need to pay if you want articles older than 1 month

drowsy elbow
modest crystal
#

I should have specified this before, but i need it for the top 500 companies

prisma wagon
#

theres exactly 1 comment. good luck

modest tartan
prisma wagon
#

didnt rly care when coding, its an abomination now

modest tartan
prisma wagon
#

fiiine

#

if only i knew where stuff is

modest tartan
#

use chatgpt to make your code easy to read

prisma wagon
#

here u go

#

if founfd what u meant

modest tartan
lament gulch
#

May I ask an absurd question of curiosity,

#

What if we made a system/program to use the graphics card of a thunderbolt connected device

#

In theory something like that would be doable on a phone with adb and BlueStacks

#

But on the scale of 2 windows machines, i should expect that there would be more room for possibility given the connection strength and so forth

spring cradle
#

like, an eGPU?

nocturne galleon
#

which versions of python supports cryptography.fernet?

#

I have 3.12 but I imported cryptography.fernet and

#

its saying it doesnt exist

#

wait nvm forgot to install it

haughty oyster
#

How can I make it so that Docker doesn't keep my GPU awake on my laptop? I've tried setting the desktop dashboard to only use integrated graphics but that didn't help. Going to the file path of WSL through Task Manager doesn't even open anything

spring compass
#

If I recall correctly there is a setting in docker desktop that will basically put containers to sleep if they're not in use. You can try that. If it doesn't help, you may actually need to stop the container that is using that GPU device. If it's an Nvidia card, I believe there is also an option in the Nvidia setting somewhere to disable staying awake when the GPUs in use. Don't quote me on that but I swear I saw one in there.

prisma spruce
#

Does anyone here understand in meta all-in-one SDK in Unity?

keen sorrel
#

thermally modeled mosfets in ltspice using many cores. 35min to get 306us, avg 146ns/s. I wonder if only more cores will help or if 3d v-cache affects performance too

acoustic pine
#

If the workload involves moving a lot of data between ram and cpu yes

#

Though I'm unaware of anything that benefits from cache outside of games

keen sorrel
# acoustic pine If the workload involves moving a lot of data between ram and cpu yes

That's not quite what extra cache is for. It's specifically for repeatedly accessed data, typically code. Being able to keep more code in caches is great for games since they're usually big pieces of software. Moving lots of data is what bandwidth and raw processing performance is for. I have no knowledge of ltspice's implementation, so I don't know whether there's a lot of code or repetitive data accesses in the algorithms it uses.

hallow hazel
#

If you know the size of the plane and the amount of (square) tiles it's divided into, how do you calculate the size of one individual tile?

#

nevermind you just divide it I'm stupid

next igloo
#

I compiled a version of my application for 64bit Windows 10, 32bit Windows Vista, and 64bit Linux.

How would you distribute each version? Should I have all 3 in the same .zip file, have different downloads for Windows and Linux versions, or have a separate download for each of the 3 versions

chrome saffron
lament gulch
cloud knot
near pebble
#

Hey guys! I'm new to coding and just made a Discord bot called Records. Would anyone be open to testing it?

#

It's supposed to stores memories in Discord by letting people save messages others have sent, as well as view anyone's saved messages. people can also delete their own saved messages.

#

I can send the invite link for the bot if anyone's interested!

soft fern
#

Could do the "Uber zip" with all platform versions included but just making people download extra junk and copies of things they'll never use too

soft fern
# acoustic pine Though I'm unaware of anything that benefits from cache outside of games

Literally everything benefits from caching, caching just means keeping copies of data close to where it will be used, prefetch loads nearby memory into caches to basically have the data at the ready so there is no need to request it from ram or request it from disk if it's already in a CPU cache, if the disk has a cache and need to load something that happens to be a cache hit (something in there) then will use that over accessing the disk, cache is just a spot to dump copies of things along the way so you don't need to go back to the source

#

Redis is an "in memory"/ram cache system to basically keep disc contents loaded and ready to reduce access time, the l2arc in zfs is a similar disk to ram type system, caches exist at multiple levels for DNS hence the "it's always DNS" problems, caches in browser, it's caches all the way down ๐Ÿข

left ivy
#

fun facted do you know one of the main reason why cod an games like it are so storage heavy its becuse insted of not downloading all the weapon an skin shit thats all animated in bits an pieces they downloa it all in one go even if you dont have it unlocked in game its there so when you do warzone rememeber this when there is liek 100 of yall there is so much crap on the back end that its not even funny why you have to run a high end pc for high fps there is some other technical aspects to this but the mojority of games run like this
side note we dont need to have loading sreans any mroe the loading screan is jsut a error check and ids check now besides slower inter net checks
a few gaems i do play run a thing that is used when you unlock the skin the loading animation or transfer animation is the game downloading the skin that you need/ unlocked

noble plover
#

productivity apps generally handle too much data for it to make much of a difference while games have certain bits of code, data and assets that are very frequently accessed, which is why 3d v-cache benefits them more than productivity apps

#

(usually)
because of course with that said there are productivity apps that handle the extra cache well

soft fern
#

Sure it varies how often you're going to get cache hits for any given task but it's not "just good for games" it is good for processes that can make use of the caches and end up with hits more than misses

keen sorrel
#

Unless they're used for game servers

drowsy elbow
#

Does anyone if it's possible to auto-archive files in specific folders to my NAS when they aren't accessed for x days, while keeping them accessable in a similar way Onedrive does? (Onedrive downloads it when you try to open it, and then it opens it. All files not physically on the sysem will still be shown in the file explorer)

soft fern
#

Yes it is possible

torpid walrus
#

My code isn't working. ๐Ÿคฌ

austere quest
# modest tartan use chatgpt to make your code easy to read

I'd rather just know how to make good comments than put my entire code into ChatGPT, it doesn't think like me, so I probably won't even properly understand "my own" comments. It's not hard to make understandable comments. I don't have nothing against using AI for coding, but just for minor corrections or questions and stuff. I wouldn't completely overhaul my code by an AI.

torpid walrus
#

You would be correct

austere quest
#

You can ask for help if you don't know how to fix it btw

nocturne galleon
#

We all suffer from a lack of skill

woeful rapids
#

thanks google, now persistent notifications arent persistent anymore

#

it's everything i ever wished for

#

for everything to break for no reason whatsoever

spring cradle
#

what factors should i take into account when deciding what third party libraries (not standard/golang.org) to use in go?

hollow basalt
#
  • Why am i using go
spring cradle
#

good question

#

i don't remember much else

woeful rapids
#

etc

silk eagle
#

isnt the point to make your own portfolio

torpid iron
#

anyone here competing in the Google Gemini Developer Competition

remote forum
#

Hey there. Is there a way to readout every media stream running with codec etc os-wide?

cloud knot
woeful rapids
#

yes

soft fern
# remote forum Hey there. Is there a way to readout every media stream running with codec etc o...

What OS? But probably not, detecting if a program happens to load up some codec at runtime and uses it to decode or encode some stream of data isn't really like an OS level responsibility. You could probably monitor what processes are using the hardware decoding capabilities but not much else about what they are doing with the data inside that process... What's the actual goal and target system though?

soft fern
sturdy elbow
#

anyone wanna source code a cheat for me

frozen flame
graceful drift
#

their is no liking comment or profile function yet

#

its going through cloudflare tunnels so idk if the upload speed is good

livid jungle
#

psa: DO NOT store personal data or api keys on github, private repo or public;

blissful geyser
graceful drift
#

@blissful geyser LOL not mines

#

idk who uploaded that ill check it out

blissful geyser
graceful drift
#

yeah i got none api keys

blissful geyser
graceful drift
#

uhh let me check

#

i forgot to add a file restriction i was working on file size limit

graceful drift
#

see idk what to do i create a docker file of it and host it on my server and to expose it i use cloudflare tunnels its slow tho idk why

#

{'png', 'jpg', 'svg', 'gif', 'mp4', 'webp', 'ogg', 'webm', 'bmp'} is this good?

#

that is all html allows to show in videos and image format

#

@blissful geyser

blissful geyser
#

you dont use DevOps

graceful drift
#

i pushed the fix for the file extention thats allowed

graceful drift
#

how should i

#

i need to fix it to not make multiple of the same files be uploaded

blissful geyser
graceful drift
#

i made my own python system that auto makes the docker image and redeploys with the same data from before like if user uploads images the images are not deleted only the code does

#

i use a ubuntu server in my house running docker and portainer and to expose i use cloudflare tunnels

#

and my python code connects to docker to make it happen

#

im still learning lol

#

i know there is a better way to do that

blissful geyser
blissful geyser
graceful drift
#

im gonna have to delete all user media that was uploaded people are uploading some not so nice things

blissful geyser
graceful drift
#

this is what my folder for the code looks like

#

its simple but i want to make it in another lang

#

i made a big mistake before if you want to know about it i can tell you

#

and my teacher looked at it when i did not know people did that with it

#

its was a V1

#

we got 2 more months for the project

blissful geyser
#

do you have on github

graceful drift
#

idk mostly python i uploaded what i made when im learning

#

i think i had some js on their

#

i had to add hcatcha to my contact form bc i would get stuff from seo company bots

#

i did not pick recatcha bc its only 100,000 request a month on their so i pick hcatcha bc they give 1 million a month

#

i was dumb couple months ago when i started too i have my contact form data gettign saved to a TXT file lol now i got it getting emailed to me

blissful geyser
graceful drift
#

i got it like this now

#

its only 180 lines

blissful geyser
#

do you have it on gitHub

graceful drift
#

i can upload the prod one now

blissful geyser
#

ok can you send me a link

graceful drift
#

ok give me a sec

#

@blissful geyser

#

i also got a web chat i made but its broken

#

@blissful geyser https://chat.rapter.pro the manage profile is broken it does not update the db when users change something on their profile

blissful geyser
graceful drift
#

its named uploads

#

app.config['UPLOAD_FOLDER'] = os.path.join(os.path.dirname(__file__), 'uploads')

#

should i seperate them using diff python files or smt diff

#

this looks fine for one file

blissful geyser
graceful drift
#

i store files thats uploaded in the uploads folder which connects to a docker volume so it stores their

#

and ip address and other cookie data are gonna go in a mysql db that i run once i get it set up

graceful drift
#

thats what the docker file is for

#

i have a stack on docker with a db volumes and every thing thats needed

#

im gonna have to push it to docker hub in a image for my teacher

blissful geyser
cloud knot
fading osprey
#

one of the few acceptable uses for a pre-commit hook imho is scanning for secrets

zealous goblet
#

guess the db use

stiff spoke
cloud knot
#

anyone got experience with Firebase App Distribution (https://firebase.google.com/docs/app-distribution) ? All i need is if it distributes apps separately or through Google Play/App Store test channels. If separately, then it is fine for my use case.

chrome saffron
placid aspen
#

@lavish pollen

lavish pollen
lavish pollen
placid aspen
lavish pollen
#

What's the issue again?

zealous goblet
placid aspen
lavish pollen
placid aspen
#

idk

lavish pollen
#

Find out lmao

placid aspen
#

how-

wheat crescent
placid aspen
wheat crescent
#

Windows?

placid aspen
#

yeah

lavish pollen
zealous goblet
placid aspen
lavish pollen