Programming Thread

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

previous topic - next topic

0 Members and 2 Guests are viewing this topic.

Go Down

the-pi-guy


Spoiler for Hidden:
The worst is when you run out of monospaced fonts and have to use variable-width variables.

darkknightkryta

So I bought the Real Time Rendering textbook.
I'm a bit worried about it.  The content is supposed to be better than ever, but the actual quality of the printing and binding has had scores of concerns.  Including pages just falling out.  
Off topic, but I remember buying the strategy guide for Final Fantasy XII.  It literally fell apart.

the-pi-guy

I just tested a php program in another program.

Notepad++ informed me that the file was gone.  

So I tried resaving.  Notepad++ informs me that I can't save in this location.

Turns out, I can save any other file name, except the one that just vanished.  

I don't know how to fix this.

Legend

I just tested a php program in another program.

Notepad++ informed me that the file was gone.  

So I tried resaving.  Notepad++ informs me that I can't save in this location.

Turns out, I can save any other file name, except the one that just vanished.  

I don't know how to fix this.
What was the file name? Was it a reserved windows one lol?

the-pi-guy

May 23, 2020, 01:20 AM Last Edit: May 23, 2020, 01:38 AM by the-pi-guy
What was the file name? Was it a reserved windows one lol?
No.  
createUser.php

I resaved the file with a new name.  But every time I try testing it, windows hides it and makes it so that a file can't be saved with that name in that location.

Restarting the computer lets me re-save the file.  

the-pi-guy

It happens when I'm trying to authenticate a token id for Google.  I pretty much just took the lines they had and installed the necessary libraries.

It was giving me an error because I passed in the wrong thing, so I know it's finding the right method.  

But now that I'm passing in the right thing (I think), when I make the method call, it instead deletes the file, and protects it or something.  

Legend

It happens when I'm trying to authenticate a token id for Google.  I pretty much just took the lines they had and installed the necessary libraries.

It was giving me an error because I passed in the wrong thing, so I know it's finding the right method.  

But now that I'm passing in the right thing (I think), when I make the method call, it instead deletes the file, and protects it or something.  
That is really strange. How/why would the file do anything with windows?

the-pi-guy

That is really strange. How/why would the file do anything with windows?
This makes no sense!  
It's like trying the method deletes the file, and then protects the file from being overwritten.  

I feel like I'm in some kind of debugger hell.  

It's been hard to find anything online that even remotely comes close.  

Legend

This makes no sense!  
It's like trying the method deletes the file, and then protects the file from being overwritten.  

I feel like I'm in some kind of debugger hell.  

It's been hard to find anything online that even remotely comes close.  
Maybe antivirus software is thinking it's bad?

the-pi-guy

It sounds an awful lot like php's unlinking call.

PHP: unlink - Manual
Quote
On Windows, it is now possible to unlink() files with handles in use, while formerly that would fail. However, it is still not possible to re-create the unlinked file, until all handles to it have been closed.

I think this seems consistent with what I'm seeing.  

The file gets deleted, but it still has handles pointing to it so it can't be overwritten.

I don't think this helps, because none of my code is using the unlink command.

the-pi-guy

Digging into the Google API, and this is the line that crashes things.  

$response = $this->http->get($url);

Which I'm not sure why.  I'm hoping it's not something stupid like, since I tried it from a command line, the $url is uninitialized.  

Legend

Digging into the Google API, and this is the line that crashes things.  

$response = $this->http->get($url);

Which I'm not sure why.  I'm hoping it's not something stupid like, since I tried it from a command line, the $url is uninitialized.  
Have you been able to ever fetch urls with this project?

the-pi-guy

Have you been able to ever fetch urls with this project?
Yeah.  So it works when I call it from the webpage.  

But then it doesn't give me any helpful error messages.  

Do you know of any helpful ways to basically send a fake url through command line?

Legend

Yeah.  So it works when I call it from the webpage.  

But then it doesn't give me any helpful error messages.  

Do you know of any helpful ways to basically send a fake url through command line?
I don't.

Can you hard code a url just for testing?

the-pi-guy

May 24, 2020, 01:26 AM Last Edit: May 24, 2020, 02:41 AM by the-pi-guy
Ugh.
Now I don't get that error anymore.  I'm not even sure why. Rolled back the code, still don't get that error anymore. 

Instead I have another problem now

The verifyid token isn't returning anything.

I'm trying to use a hardcoded value, and a passed in value.  PHP says they're the same, but for some reason, it works with the hard coded value, but not the passed in value. 



Go Up