Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Munchor

Pages: 1 ... 17 18 [19] 20 21 ... 424
271
Computer Projects and Ideas / Re: Nightmare
« on: September 12, 2011, 05:25:04 am »
Builderboy, after the Earthquake and the monster attack I got stuck. I was just doing some heavy testing to the program to try and trick it. However, during the Earthquake I got stuck on the right of the table :P

Also, it's supposed to be open-source, but where is it? Thanks!

272
Quote
Can you port this from Prizm to the Nspire CX because they're both color?

Ashbad, first of all, nice article, although I have to think... Where did you see somebody saying that? Thanks.

forgot, someone asked that specifically on IRC once, but a lot of questions very similar to that have arisen, not just that one in particular.

Yeah... I have to say, I highly doubt that happened more than once, hence I don't understand the "stop asking us to make ports".

273
Yes, I managed to do it in another way, but er, thanks everyone!

274
Web Programming and Design / Re: [PHP] Checking if file was submitted
« on: September 11, 2011, 04:50:31 pm »
Thanks everybody, I managed to do it, and I understood how it works ;)

275
Web Programming and Design / Re: [PHP] Checking if file was submitted
« on: September 11, 2011, 03:39:45 pm »
http://www.php.net/manual/en/function.is-uploaded-file.php

Is that what you're looking for? is_uploaded_file($_FILES['file']['tmp_name']), in your case.

Great, that worked. But that doesn't work in all servers does it? I am thinking it may only work in Linux servers, but I might be wrong. Thanks! I am saying this because you said "in your case".

276
Actually, a more fail-proof method to do that (without Javascript) would be to use an <input type="hidden" name="url" value="CURRENT_URL" /> or something similar.
Yes, but I don't really like to trust Javascript this things, because the user could delete it to make my php script fail. I like to think about anything that can happen.
Exactly, that's why I suggested using a hidden input. No JavaScript needed.

When I said "Javascript", I meant the HTML Code. The user can change it I think, right?

277
Web Programming and Design / [PHP] Checking if file was submitted
« on: September 11, 2011, 03:24:49 pm »
Code: [Select]
<form action="upload.php" method="POST" enctype="multipart/form-data">
  <input type="file" name="file" id="file"><br>
  <input type="submit" name="submit" value="Submit">
</form>

I have this form and I would like to know, in the upload.php file if anything was submitted in the type="file".

This tells me nothing was submitted, even when I submitted a file:
Code: [Select]
<?php
  
if (empty($_FILES["file"]["file"]))
  {
    echo 
"No file was submitted, try again.";
  }
?>


This also tells me nothing was submitted, even when I submitted a file:
Code: [Select]
<?php
  
if (empty($_POST["file"])
  {
    echo 
"No file was submitted, try again.";
  }
?>


Thanks in advance!

278
TI Z80 / Re: Real gravity in pure TI-BASIC
« on: September 11, 2011, 03:17:16 pm »
Awesome, I always love to see you guys making cool programs in TI-Basic!

279
Minecraft Discussion / Re: Minecraft 1.8 pre release!!
« on: September 11, 2011, 03:06:41 pm »
so, adventure fully support town, big dungeon, and everything?

Yes, monsters, caves, rivers, villages with NPC's, achievements, etc.

280
Quote
Can you port this from Prizm to the Nspire CX because they're both color?

Ashbad, first of all, nice article, although I have to think... Where did you see somebody saying that? Thanks.

281
Actually, a more fail-proof method to do that (without Javascript) would be to use an <input type="hidden" name="url" value="CURRENT_URL" /> or something similar.

Yes, but I don't really like to trust Javascript this things, because the user could delete it to make my php script fail. I like to think about anything that can happen.

Either way, if that's the only way of achieving, I'll have to go for it.

282
Let's say I have this HTML file:

Code: [Select]
<!doctype html><html>
  <head>
    <title>My Page</title>
  </head>

  <body>
    <form action="handler.php" method="post">
      <p><input type="text" name="text" id="text" /></p>
      <p><input type="submit" value="Go" /></p>
    </form>
  <body>

</html>

And then I have this file (handler.php):

Code: [Select]
<?php
  $text 
$_POST["text"]; //gets the text from the text field
?>


Basically, it's a very simple form. How can I know the name of the file that called the .php file?

I want to get it's URL, is there a way I can do this? Thanks!

283
Minecraft Discussion / Re: Minecraft 1.8 pre release!!
« on: September 11, 2011, 08:54:25 am »
Best update yet. Brilliant stuff

I couldn't agree more. I don't play Minecraft, but the "Adventure Mode/Creative Mode" seems brilliant to me.

284
Axe / Re: I need help with a code!
« on: September 10, 2011, 08:47:40 am »
so I cant write {Str1+18}???
(Str1 because your older post...)

Yes you can, that's the way to do it ;)

285
Axe / Re: I need help with a code!
« on: September 10, 2011, 06:16:45 am »
How can I tell the program to write a number in a new line?

And a second question:
I have such a code:
Code: [Select]
:001
:102
:202
:202
:210
How can I load the X-th number  in line Y??

I think this is how you do it:

1. You save the original file in a variable, let's say H.
Code: [Select]
.Change "NAME" to the name of your program
"prgmNAME"→Str1
Unarchive Str1
GetCalc(Str1)→H

2. If every line has 3 numbers, then each line has 3 bytes, so you do like this:

Line 1: Byte $0, $1 and $2
Line 2: Byte $3, $4, and $5
Line 3, Byte $6, $7, and $8
Line 4, Byte $9, $A, and $B

Then it's easy. You make a loop that loops all lines. Thus, you can access each of the 3 bytes in each line, to get the first, the second and the third number and save it into a variable ;)

Pages: 1 ... 17 18 [19] 20 21 ... 424