Details
Joined devRant on 6/30/2018
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
If I make a character oscillate on my screen, and match its time period to my camera's fps, it should seem still on my camera in theory right? I tried to implement it like this: https://www.paste.org/115774 but I can't figure out what could be going wrong, my guesses are either I'm expecting too much precision, or my camera's fps fluctuates a little, either way, please let me know what you think could be going wrong.18
-
Time complexity doubt
How can you say T(n) ≤ 3T(floor(n/4)) + cn²
Given that T(n) =3T(floor(n/4)) +Θ(n²)
Won't it imply Θ(n²) ≤ cn², which seems incorrect (or am i wrong to think its incorrect?)4 -
I think I'm overthinking this sigh
But its bothering me a lot so pls help, the two paragraphs I've marked, are they both saying the same thing in different ways?
I don't understand them saying there will be a f(n), when runtime is O(n²), upper bounding the runtime and on the other hand saying for runtime Ω(g(n)), g(n) directly lower bounds the runtime.
(The book is CLRS btw)7 -
Help with C code
int main()
{
int x =10;
void *p = &x;
printf("%d", ((int*)p)* );
return 0;
}
I'm trying to cast p to and int, for dereferencing it and printing the value of x, but Im getting an "expected expression before ) token" in the line for printf.8 -
Is learning a low level langauge essential for understanding high level stuff?
Say I'm using Python/some framework in it(for data science/machine learning), I don't see how knowing C would help me do it better. A lot of results on "benefits of learning C" argue that it helps understand/use high level stuff better.15 -
A v dumb C language question....
Consider this code snippet:
{
while( getchar() != EOF )
printf("a");
while( getchar() != EOF )
printf("b");
}
Is there some way to get inside the second loop? After I input some text, ctrl+D sends in the text stream and loop 1 executes, then the control waits at the test for loop 1 again, pressing ctrl+D again triggers EOF, but it ends up skipping all loops after24 -
Does anyone here know how to set up windows 10 bootloader files?
So I wiped my laptop clean, installed windows, installed manjaro, and deleted window's ESP for shits and giggles. Then I tried using bcdboot to restore bootloader files in the ESP I put GRUB in, which got windows 10 on the GRUB but selecting it loops me back to it. Whatdoido.6 -
I have to download 500 images from bookreads to help a friend out. Thought I'd use this opportunity to learn about web scraping rather than downloading the images which'd be a plain and long waste of time. I've got a list of books and author names, the process I wanna automate is putting the book name and author name into the search bar, clicking it, and downloading the first image the appears on the new webpage. I'm planning to use selenium, BeautifulSoup and requests for this project. Is that the right way to go?9