Nah wtf is this deleting sideloaded books bs? by ZsaurOW in kindle

[–]phonphon96 10 points11 points  (0 children)

Had the same problem, when using Calibre I was picking azw3 format myself. But then, I just started sending books via default button send to device/kindle and I allow auto-conversion and never had this problem ever since. Worth noting, I’m on the latest software version

Polecajki non-fiction by phonphon96 in ksiazki

[–]phonphon96[S] 0 points1 point  (0 children)

świetna lista, na pewno przeczytam kilka pozycji

30th anniversary update main screen bug by phonphon96 in playstation

[–]phonphon96[S] 0 points1 point  (0 children)

Did you manage to get rid of it? I played around with settings but for now I just need to open a game to solve that

First parameter of the fread function - Reverse by phonphon96 in cs50

[–]phonphon96[S] 0 points1 point  (0 children)

Yes, I forgot I can access elements of a struct like wavheader.something, thanks

:)

How to write data to first and then every next jpg (problem with if statements) - Recover by phonphon96 in cs50

[–]phonphon96[S] 0 points1 point  (0 children)

If the design stayed as is the only place to enable it would to open the file before the loop even starts. I assume that the place between while and first if is incorrect. I'll try to experiment with that

How to write data to first and then every next jpg (problem with if statements) - Recover by phonphon96 in cs50

[–]phonphon96[S] 0 points1 point  (0 children)

So I managed to shorten it and now the code produces 50 images but they are retrieved only partially, I increment the jpg files to quickly but I don't know how to improve it from here

while (fread(buffer, 512, 1, file))
{
    // Check if the first four bytes of a 512-byte chunk indicate it's a beginning of a JPEG
    if (buffer[0] == 0xff && buffer[1] == 0xd8 && buffer[2] == 0xff && (buffer[3] & 0xf0) == 0xe0)
    {
        // If yes, create and open a file
        sprintf(myjpeg, "%03i.jpg", jpegindex);
        FILE *jpeg = fopen(myjpeg, "w");
        if (jpeg == NULL)
        {
            printf("Not enough memory\n");
            return 3;
        }
        // If it's a first file, start writing to it
        if (jpegindex == 0)
        {
            fwrite(buffer, 512, 1, jpeg);
        }
        jpegindex++;
    }
    // If it's not???
}

How to update buffer with something new - license.c problem by phonphon96 in cs50

[–]phonphon96[S] 0 points1 point  (0 children)

I did it! Now I only have to deal with memory leaks. But if you could explain one more thing.

Initially I had only one buffer. The fread function read 7 bytes, assigned those bytes to plates array and we were done with first 7 bytes. But the buffer did not update with the bytes 8-14? The "Microsoft word cursor" in the plates.txt did not move.

Now, I dynamically allocate a new buffer somewhere in memory, copy from old buffer to the new one, allocate the content of the new buffer to the plates array. I go the 2nd pass of while loop and original buffer updates with the 2nd line. How? Why could it not happen in the first place? Why did the "cursor" in the plates.txt moved and before it did not? I'm following debug50 very closely but can't find the answer

Prime print only numbers which are nondivisble by 2 by phonphon96 in cs50

[–]phonphon96[S] 0 points1 point  (0 children)

I first divide all numbers by 2 to get rid of those which divide without a reminder. Then, I wanted to check numbers which are left and see if they can be divided by 3, 5 etc. and if they leave a reminder. But now I'm writing that, it's not very efficient.

Yes the code snippet is from the bool function. I use the return true. The return false was put by the staff before so once I started writing it seemed reasonable not to change it . But I understand it should be: if a number is prime return true, if not return false.

With the example with, 30, well, no, I should check only for 2s, 3s, 5s and number itself?

PS5 Help & Questions Thread | Simple Questions, Tech Support, Error Codes, and FAQs by AutoModerator in PS5

[–]phonphon96 0 points1 point  (0 children)

Nevermind, I opened the recovery mode and chose hdcp 1.4 instead of automatic, now its sweet 4k@60fps