Search results

  1. marshian

    Three Options

    All those "PGN" files you are talking about... are they png files? Basically, you need raw data (PGN files?) and data that can be deducted from that raw data. I'll enumerate all of the possibilities. t1 and t2 are the time required to extract the data (t1) and to restore the raw data (t2). m1...
  2. marshian

    mySQL error - argument is not a valid MySQL result resource

    This error usually means the query failed. Try adding this to the script (after $r = mysql_query($q)) echo mysql_error(); This will tell you what's wrong about the query, which is probably the problem.
  3. marshian

    Need experts' opinion

    For a simple login page you only need PHP and MySQL. JavaScript can be nice to add an additional dimension (active content on the client's side), but it's not required. If you want to keep it simple, just stick with PHP and MySQL. Actually it can be done without MySQL too, but it's certainly...
  4. marshian

    How can I block the access of directory files?

    If you allow the IP of the site, then the site's server can access the images through http, but no user will be able to do so. You'd have to manually add all users to allow access to your images. Furthermore, if you don't disable directory listing, anyone who is allowed to see any images is...
  5. marshian

    hotkeys

    *attempts to rephrase* Am I correct in assuming you have a number of additional buttons, such as stop, rewind and forward on your computer and you would like to change the commands associated with them? Which operating system are you working on?
  6. marshian

    How can I block the access of directory files?

    Ooh yes, deny from all, that won't do anything bad! I suppose you're talking about directory listing? When you go to a directory that doesn't contain an index file, you get a list of all files in the directory? The solution is easy, put a .htaccess file in the directory (or any parent directory...
  7. marshian

    winAPI java

    You can't, using only pure Java. You can however use the Java Native Interface (JNI), and write a native extension for Java that will allow you to do this. The problem is, you'll have to write it in a native language, Java just doesn't have the option to do it. And of course, if you use the JNI...
  8. marshian

    archive file in image

    Sorry I'm really busy lately, so I won't debug your code for you. (Maybe some other time.) Try finding out where it goes wrong. Put System.out.println's where the boolean can be set to false and find out which part of the algorithm causes valid to be false. Then you can focus on that area and...
  9. marshian

    separating parts of a long, complicated string

    It can be done using preg_match and/or preg_match_all, you should read up on those. (On php.net) Do you have any experience with regex? If not, you should definitely read up on that too. Good luck :)
  10. marshian

    Java Question

    In theory, but the classname is "Circle" too, so the method's name is illegal. Besides that, method names should never start with a capital. Constructors are usually defined as public <classname>(<arguments) { <body> } And as gsonline said, that's equivalent to removing the "void"...
  11. marshian

    php and quotation marks

    Make sure that you check the input if you wish to do such a thing! htmlentities and strip_slashes are very useful! Pay attention to code injections.
  12. marshian

    HTML Table from SQL Data

    $query="SELECT * FROM dedications"; You can do a lot with sql queries. Instead of altering your php you could change that! Just keep showing every entry but edit the query. For example try this: SELECT * FROM dedications LIMIT 10 or SELECT * FROM dedications ORDER BY `name` ASC LIMIT 10 (this...
  13. marshian

    archive file in image

    The file format is like this: <image data><archive data><integer><signature> Both integer and signature are 4 byte long, so to read integer skip to the 8th last byte and read an integer through an ObjectInputStream.
  14. marshian

    archive file in image

    That's not something that you can easily do, but I found this on the internet. http://elliotth.blogspot.com/2004/09/alternating-row-colors-in-jtable.html You can quite easily adapt it to your own needs and use it in your application.
  15. marshian

    Java to exe?

    I give up. Have fun, learn about Java some other time. xav0989, if you want to build native applications try learning C++.
  16. marshian

    URL Question

    I'd stay away of any "general" possibilities, if you mess up the slightest bit a hacker can find an easy way in. Maintaining a list of pages is far better. Why do you want to be able to do this? If you are just curious as to how it's possible I think the answer has been given many times. There...
  17. marshian

    Java to exe?

    AARGH Does anyone even get the most important point of the article? Why would you do such a thing? Java is designed to be portable to many platforms, making it into a Windows executable is usually a waste of time and loss of possibilities...
  18. marshian

    archive file in image

    You're welcome :) *looks confused* What rows?
  19. marshian

    archive file in image

    Continue does that. Break cancels the whole loop. for(int i=0; i<4; i++) { int c = inFile.read(); if(c == filesigrar[i]) { valid = "RAR"; } else if(c == filesigzip[i]) { valid = "ZIP"; } else { //In case any of the 4 bytes fails the check, the file is invalid //and the...
  20. marshian

    Positioning and Arrangement using CSS

    Floating divs are a good approach! I'll give you a very useful tip: <div style="float: left; width: 200px; height: 100px; background: yellow;"></div> <p>This is a paragraph of text.</p> This will show the div next to the text. (Try it!) <div style="float: left; width: 200px; height: 100px...
Top