Jump to content

Aeternus

Senior Members
  • Posts

    349
  • Joined

  • Last visited

Everything posted by Aeternus

  1. I agree with dave, much gouging will occur :\
  2. Klaynos mentioned it on one of the network IRC channels and dragged me into #sfn and then I found the site from the channel (bit of a backwards way of doing things heh).
  3. ...no... I was referring to system files, ie C:\WINDOWS\??? (system32 etc).
  4. Heh :\ I'm pretty sure you can just click "Show Files" or turn off the features that causes it to make you do that :S. I'm using XP Home on my laptop, I've never had any trouble getting at the system files :S.
  5. http://uk.php.net/mail Read that along with the links and comments and you should be all set as long as everything is setup nicely with your host.
  6. Nope, .htaccess files are used by Apache to allow users to do per directory or minor changes without overwriting the main configuration files as Admin. You are limited in what you can actually set and these are only things that the user should be able to set for their personal sites. More information here. It's not as bad as it sounds as, as you can see in one of the PHP links below there is an Option in the main global configuration file that allows you to turn on and off the ability to override already set options and there are also further options to limit or expand the usability of .htaccess files. php.ini is a global configuration file for the php interpreter. It is editable by the server admin and is stored in different places on different installations (mine is stored in the apache config directory /etc/apache2/conf/, i think this is for the php module (mod_php) for apache and there is another one in /etc/php/ for php in general (ie CLI etc)). More information here and here . As for a webserver configuration primer, I'm no expert, Klaynos might be able to help a little more, and perhaps someone with IIS experience or other webservers might be able to help with those (perhaps Pangloss) but here is a link for the beginnings of the Apache config information and googleing Apache and what you wish to know will generally turn up what you wish to know.
  7. php_value upload_max_filesize 10000000 Put that in a .htaccess file in the same directory where 10000000 is the size in bytes that youd like the maximum filesize to be. You can also apparently use K for Kb, M for Mb etc as mentioned here. You might think you could use ini_set() to set that value but as the file has already been uploaded this isnt possible as it has already been handled and setting in the php script would be setting it after the fact. Edit - Forgot to mention this is Apache specific. There are other ways to do it with IIS etc probably.
  8. Theres sample code on the first page
  9. He means if they advertised your site on theirs, so that there was a link to your site from theirs.
  10. Well as far as number (2) goes, yes they seem to be all in the same group by default (that was what the code snippet i posted was for, to check whether this was the case). As for (1), as I said - not a clue other than simple logical grouping of them to aid thought patterns and ease of access. Sorry I can't be more helpful .
  11. Indeed - As "I'm Feeling Lucky" works by taking you to the first result found' date=' you will always be taken to those websites (unless the pagerankings change significantly on google). http://www.mozilla.org/products/firefox/search
  12. Aeternus

    maya

    You should be able to get it to work. When I went for the open day at Bristol University their Graphics Lab used it on Redhat and there is an ebuild for it in portage on Gentoo so I don't see why Ubuntu wouldnt work (could always just use the package from either of those two (yes the package management systems might be different but you can extract the content and still use it)). I think they offer the Linux version to download but it still requires some of the files from the Windows version that you buy and the CD Key/ Serial so you will still need an authentic copy. I'm sure someone else who is more acquainted with Maya will be able to tell you a little bit more.
  13. Not a clue . Im assuming they're just a way to group threads together nicely and manage them in a certain way. Here is some more info. I'm not really up to date on using threads in Java (or much at all) to any real extent so.... Perhaps if you find some more info you could post it here
  14. It seems as long as they don't set themselves into specific Thread Groups that you can use the activeCount() method to find out how many threads there are (as by default they are all put into the first thread group along with the main thread of execution (the one main() etc is running under, the parent etc). This small section of code ive been playing with just now seems to suggest that - /** * Class that tests the use of activeCount() across * multiple threads and whether or not the default * Thread Group remains constant. */ class ThreadTest extends Thread implements Runnable { static int count = 0; static int killVar = 0; ThreadTest tempThread; public void run() { waitForDeath(); System.out.println("WOOOG"); return; } public void checkCount () { count++; if (count < 8) { tempThread = new ThreadTest(); tempThread.start(); tempThread.checkCount(); } else { System.out.println("Count - " + Integer.toString(count) + " Active Count - " + Integer.toString(activeCount())); } return; } public synchronized void waitForDeath () { while (killVar == 0) { try { wait(); } catch (InterruptedException e) { } } if (tempThread != null ) { tempThread.kill(); } return; } public synchronized void kill () { killVar = 1; notifyAll(); } public static void main ( String Args[] ) { ThreadTest testThread = new ThreadTest(); testThread.start(); testThread.checkCount(); System.out.println("Active Count in Main Thread - " + Integer.toString(activeCount())); testThread.kill(); } } Returns - Z:\>java ThreadTest Count - 8 Active Count - 9 Active Count in Main Thread - 9 WOOOG WOOOG WOOOG WOOOG WOOOG WOOOG WOOOG WOOOG So just using activeCount() in the main thread at a certain time will tell you how many threads are running but that will include the main thread and also will include all extended thread objects you have created (as far as i can work out). May want to play around with it a bit or look for an alternative.
  15. While this is for the most part true, especially if alot of your functionality is built as kernel modules rather than into the kernel itself, sometimes a full kernel upgrade is necessary which does require a restart. Ok.. ok.. there are things like kexec which can swap two kernels on the fly so to speak but you still have to shut all running processes etc down and for all intents and purposes might as well be restarting. In response to the thread, I have to agree with the general sentiment.. if you want an OS for gaming then XP is perfect. If you aren't used to Linux aren't particularly bothered about using it, use XP. If you wish to give Linux a try, you may find some things you like about it, and if you use your pc mostly for web browsing and perhaps like to customise things a little or do a little scripting or coding on the side then Linux offers the perfect opportunity (not saying you HAVE to do any scripting or coding, just that it can be alot easier on linux due to the "everything is a file" and powerful shells etc).
  16. As far as I know, as PFF stores all its data on the flash drive etc and the ram will lose any trace once turned off (although you could in theory end up with some remnants in virtual memory, doubtful anyone is going to look for something there :S), there is the problem that if this is a University or Organisation's network they may monitor network traffic and log packet information / data transfered. If you wish to prevent this, there is always the use of SSL/https on some sites which will encrypt via Public/private key methods the communications with you and the webserver, although alot of sites don't offer this. If you are trying to access sites you shouldn't be accessing in school/college/work, the advice we should probably be giving is ... don't .
  17. The URLConnection class seems to work it out and set it anyway, I noticed that when watching what packets the java program sent. It sets most of the headers, just you can alter them or add additional headers as you see fit.
  18. Ok, heres an example of multiple fields being sent - You'll note that the boundaries seperate each of these fields in the body. This is the way data is represented when the Content-Type is multipart/form-data. Normally if you weren't using this Content Type/ Enctype' date=' the data is sent as Content-Type - application/x-www-form-urlencoded which lays out the Post fields differently as it isnt expecting things such as large files and multiple different data types (usually just talking text fields etc). This is shown below - That was just to clarify what was happening. You ask about what can be contained in the body' date=' well pretty much anything you want really, but the specifications for each Content-Type will probably expect the body to provide data in different forms and with different headers etc within the body itself. From what I can see, with the multipart/form-data Content-Type, it expects at least a Content-Disposition header for each field/file (between the boundaries) explaining what the data is and how it is referred to (ie what you called it (name="???" in the html), so you can reference it in CGI's etc like $_POST['cheese''] or $_FILES['fileOne'] in php). It seems you can or must also provide a per file Content-Length declaration telling how long the file data is for any file fields sent. There is probably alot more to it, you might be able to find some links here - http://en.wikipedia.org/wiki/MIME as multipart/form-data is sent as a MIME format. Lastly, when checking ethereal you may not see all of this within one packet as the data is split across multiple TCP/IP packets and so you will have to go through the HTTP packets and pick them out. I did this in these examples and simply spliced the data back together so it can be seen all as one example.
  19. ?? The boundaries wouldnt be placed within one files content but the point is you could send multiple files and multiple post fields in one HTTP Request and so the boundary is placed between each of these to seperate them. Try setting up a form with multiple fields and multiple files and check it out on ethereal.
  20. Uh... not sure whether you meant that you would decompile the binary to an assembly language but you can't simply open it up and be presented with assembly language, you'll simply be presented with strings of random characters depending on the editor as it comprises of binary data. Yes each set of bits will make up one processor command and the data being passed to it etc but it won't be easily readable like assembly language until you decompile those commands into the pneumonics that assembly languages use. http://en.wikipedia.org/wiki/Assembly_language
  21. I suppose there is no reason it couldn't (just have the number as the boundary value with a few random characters afterwards) but I don't think it is actually in the spec or actually used that way. If you simply mean, can you use the boundaries to tell how many parts there are, then sure, that's the point, the boundary as you say is the delimiter, it sections each post field up so they can be seen as seperate and you know where one begins and one ends, you can simply go from boundary to boundary to boundary and count how many data segments there are. As far as I am aware there is no way of recording in the http headers (within the spec), how many post fields there are, but dont quote me on that, if I find out there is, I'll mention it and would ask you to do the same
  22. ... Its just some random string/data set. Don't know if theres a limit but I don't think its a set amount. Usually its specified in text form so several bytes ?? (ie --3333 would be 6 bytes --33334343 would be 10 bytes etc). I don't think it's anything specific. Maybe I'm misunderstanding what you mean? (its a bit late here heh (01:35)).
  23. http://en.wikipedia.org/wiki/Octet#Computers_and_networking An octet is 8 bits or one byte. Therefore it wants the number represented in decimal or base ten form of octets (sets of 8 bits) that the data takes up. For instance if it were a text file, as you are most likely representing the letters in Ascii (or extended Ascii as basic Ascii is only 7 bits) that takes up 8 bits or 1 byte/octet per character and so the content-length would be the number of characters (including boundary characters etc). The wording sounds a bit complicated but I think it's just saying that the client (web browser or any form of http client (your java app for instance)) must pic a boundary that doesn't occur naturally in the data it is sending. It wouldn't really work as a boundary otherwise as the server would think there was a boundary WITHIN one of the data fields/files and so would assume it was 2 data fields/files and this is what you would want. Therefore a boundary that isn't found in the data you are sending must be used. This is all as far as I know / can work out.I'm not an expert by any means, I'm sure someone else might be able to clarify or provide more information .
  24. As far as I know its simply a string of characters that can be used to mark the boundary between fields/files in post data when dealing with multipart form data content type. Not sure exactly why it changes but I would assume it changes to try to ensure that the boundary string doesnt appear in the file and isnt some constant that might appear in some of the fields. Link to some Info
  25. As for what I did in A Level Computing, the specification is here. We used Turbo Pascal for the projects. We don't learn any Java or any other languages in Computing at A Level, I've learnt a little bit in my free time along with some other languages and ideas etc. AS Level is basically half of an A Level, A Levels take 2 years, after the end of the first year you take an AS Level exam and then can choose to stop there or continue to complete the A level. It is basically so people who dont finish the 2 years still get something or so you can take less modules for certain things if you want a bit extra (like I did with Further Maths). As for your question on responses, all of that is a HTTP Request. I didn't include the response. The Response would be of the form - The stuff from "Files-" onwards is the actual text being sent that you would see in your browser whereas the stuff above that is the HTTP Response Headers. In this case it is simply a var_dump() in PHP of $_FILES and $_POST that I was using so I'd know what was going on. You can play about with this quite easily using telnet although I have had varying degrees of success using the windows telnet software (I use the FreeBSD implementation on Linux). This is available from Ethereal if you just look for the HTTP Packets coming from the servers IP to your own (instead of the other way around) and would probably include \r\n's instead of just new lines as I got this output straight from telnet as I was in a hurry. You might find this link or this link useful.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.