/dpt/ - Daily Programming Thread

prev What are you working on, Any Forums?

Attached: crab.png (482x336, 95.62K)

Other urls found in this thread:

rfc-editor.org/rfc/rfc9112
rfc-editor.org/rfc/rfc9110
github.com/MGWL/QtE5
twitter.com/SFWRedditVideos

>What are you working on, Any Forums?
Finding a job.
Who would have thought that finding a job after getting an MSc would be so fucking hard?

I need to pack as much data as I can into url, should I encode the data as base64 or something else?
Working with really limited memory / processing capacity so I can't run any heavy conversion.

how do i let someone put both string and int in readline with c#? without getting error

Working on a node-based tool to design conversations. I want to add stack nodes, to simplify linear conversations

Attached: file.png (1547x1152, 119.29K)

I can't even tell if this is DP or just a recursive approach. Is it supposed to be a lengthy runtime to compute this?

int getFibOfN(const int n, const int currentN = 0, const int previousFib = 0, const int currentFib = 1)
{
if (n

You don't, you just parse it into an int if you can. Usually that will involve checking for leftover characters in the string afterward which would denote it's some kind of bad input that isn't an integer.

You could try gzip before base64, it's pretty light. Or bit packing.
Is there no way to do that as POST. I think to be portable URLs have a max length of 2K.

That's just the iterative approach turned into recursion.

I realized you could do that via iteration, as I have done something similar before.

It's nfc-tag so it has to be in url.
base64 would be safe because there won't be any special characters like / or .

pic related

Attached: careerbuilder-original-2252.jpg (576x576, 89.34K)

well at least it's actually O(n)

Trying to pass an integer to python serial, but for whatever reason it keeps resolving to '0'. here's my code:

currentvalue=str(x)
commandstring="{3,0,7,"+currentvalue+"rrrr}\n"

ser.write(bytes(commandstring,'ascii'))
ser.write(b'\n')
print(bytes(commandstring,'ascii'))

The print is fine, but the serial shows it's sending 0.

is the whole thing 0 or just the currentvalue string you insert?

Only the string I insert. Checking with serial monitors shows it putting out 0.

how weird. Have you experimented with changing various things around like the rest of commanstring or the contents of currentvalue, to see if there's any pattern to the failures?
Also does it read as an ascii '0' or an actual 0?

Gotta figure out how to map a list of terms having narrow terms and broad terms into a hierarchical form

Yeah, that's why I'm befuddled. Here's the serial output:
b'{3,0,7,10rrrr}\n'
{3,0,7,0rrrr}

ERROR: command has no effect here

Syntax error at char 1

The7 was actually a 0, I figured it might be something like that but it still doesn't go. x is a range() for loop, if that changes anything.

Can I start learning programming at 35? Will I be able to be competitive?

I have succeeded in making a web server in C without any libraries. It's not actually complicated at all, the hardest part is trying to figure out what kind of requests/data can be considered valid or invalid, especially in the case of malicious connections.

Like what if someone sends an incomplete HTTP header and then just stops? Should I wait for more data or what? How long can a non-malicious connection pause for? I just don't know.

Attached: page.png (282x102, 1.53K)

yesss

second interview scheduled

thank God almighty maybe they really do want to hire me for.. something

even if it's just a janitorial position at least I work at a company that has software positions

Attached: hqdefault.jpg (720x387, 107.72K)

This is why PHP was made

>x is a range() for loop, if that changes anything
I don't think it would.
Does it still happen if you just send str(x) on its own, without embedding it in the commandstring?
Just to be sure, did you double check that you're not doing anything to the commandstring between printing it and writing it to the serial?

So you could hate yourself more? I hate my life more and more every day that I have to use PHP servers at work.

check the RFC
rfc-editor.org/rfc/rfc9112
see 8, 9.5 for timeout
also
rfc-editor.org/rfc/rfc9110
>17. Security Considerations

Modern PHP (i.e PHP 8+) is actually pretty good, unfortunately I don't think Enterprise actually uses the latest version of it even though it includes really good features like a JIT/enums/etc

Convince your boss to upgrade to PHP 8.1 and you'll start enjoying it.

any D users here? how is qt5 support with D? I am sick of the long compile times with c++ even if its fun to use qtcreator but waiting ~10s for a single change is really time consuming. Is this the correct wrapper? github.com/MGWL/QtE5