Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. Hardly one step... It seems impossible to me.
  2. Okay then, I just tried myself. I seemed to be able to enter one wrong and one correct each time as well. One time I even only entered one word and it still accepted it. I still don't think a computer would be able to figure out which one is the known and which isn't though.
  3. 1: You are just lazy. 2: The words are randomly distorted and will have random lines over it. It doesn't take the one it knows and and distorts it less. Besides, I think the two words above are equally difficult/easy to read. If you are able to solve it using only one correct word using your above display method, then I believe that it is luck. Out of how many attempts? It's when talking about poll results that 100 people answered yes. It doesn't make sense without information about how many people were asked. If 110 people were asked, then a lot of people answered yes, but if 2000 people were asked, then few people answered yes.
  4. Orio is right. You need to check a box each time when sending a pm for it to show up in your outbox.
  5. Ctrl + PageDown ? Switches to the next tab in FF
  6. Try $parent_supplier = $this->parent_group->get_parent_supplier(); $this->parent_supplier = new supplier($parent_supplier->supplier_id);
  7. Why not just let them use something like Google Analytics?
  8. Words can both carry different meanings and change meanings over time. The computer community did, according to Wikipedia, use both meanings. It was after the media started to use the word "hacker" exclusively about a person committing computer crimes the computer community started to change their usage. Terms such as "cracker" and "black hat (hacker)" were coined as a result of that.
  9. This tool might be of use to you: http://www.sitescore.org/report?url=www.xclusivedesigners.com
  10. Why not just this? exec("chown -R {$user_name} {$path}"); -R is for recursive. man chown: CHOWN(1) User Commands CHOWN(1) NAME chown - change file owner and group SYNOPSIS chown [OPTION]... [OWNER][:[GROUP]] FILE... chown [OPTION]... --reference=RFILE FILE... DESCRIPTION This manual page documents the GNU version of chown. chown changes the user and/or group ownership of each given file. If only an owner (a user name or numeric user ID) is given, that user is made the owner of each given file, and the files’ group is not changed. If the owner is followed by a colon and a group name (or numeric group ID), with no spaces between them, the group ownership of the files is changed as well. If a colon but no group name follows the user name, that user is made the owner of the files and the group of the files is changed to that user’s login group. If the colon and group are given, but the owner is omitted, only the group of the files is changed; in this case, chown performs the same function as chgrp. If only a colon is given, or if the entire operand is empty, neither the owner nor the group is changed. OPTIONS Change the owner and/or group of each FILE to OWNER and/or GROUP. With --reference, change the owner and group of each FILE to those of RFILE. -c, --changes like verbose but report only when a change is made --dereference affect the referent of each symbolic link, rather than the sym‐ bolic link itself (this is the default) -h, --no-dereference affect each symbolic link instead of any referenced file (useful only on systems that can change the ownership of a symlink) --from=CURRENT_OWNER:CURRENT_GROUP change the owner and/or group of each file only if its current owner and/or group match those specified here. Either may be omitted, in which case a match is not required for the omitted attribute. --no-preserve-root do not treat ‘/’ specially (the default) --preserve-root fail to operate recursively on ‘/’ -f, --silent, --quiet suppress most error messages --reference=RFILE use RFILE’s owner and group rather than the specifying OWNER:GROUP values -R, --recursive operate on files and directories recursively -v, --verbose output a diagnostic for every file processed The following options modify how a hierarchy is traversed when the -R option is also specified. If more than one is specified, only the final one takes effect. -H if a command line argument is a symbolic link to a directory, traverse it -L traverse every symbolic link to a directory encountered -P do not traverse any symbolic links (default) --help display this help and exit --version output version information and exit Owner is unchanged if missing. Group is unchanged if missing, but changed to login group if implied by a ‘:’ following a symbolic OWNER. OWNER and GROUP may be numeric as well as symbolic. EXAMPLES chown root /u Change the owner of /u to "root". chown root:staff /u Likewise, but also change its group to "staff". chown -hR root /u Change the owner of /u and subfiles to "root". AUTHOR Written by David MacKenzie and Jim Meyering. REPORTING BUGS Report bugs to <[email protected]>. COPYRIGHT Copyright © 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law. SEE ALSO The full documentation for chown is maintained as a Texinfo manual. If the info and chown programs are properly installed at your site, the command info chown should give you access to the complete manual. chown 5.97 March 2007 CHOWN(1)
  11. I know a little Java. It is like this you mean then, right?: import java.text.*; public class FormatNumber { public static void main(String[] args) { int number = 1000000000; DecimalFormat formatter = new DecimalFormat("#,###,###,###"); String formatted = formatter.format(number); System.out.format("Unformatted: %d%n", number); System.out.println("Formatted: "+formatted); } } Wouldn't a combination of PHP's number_format() and the function I posted before do the same?
  12. Why not just use one of the options people have posted?
  13. The number must be formatted accordingly to PHP's syntax. I.e. no thousand separator and . (dot) as decimal separator.
  14. Not a table, a field.
  15. Then do this from the shell: gunzip -c <package name> | tar xf - ./install-tty Then follow the instructions.
  16. Just use userID since the latest user will have the highest id if it is auto incrementing. SELECT * FROM users ORDER BY userID DESC LIMIT 1; I'd just increment a field called something like num_comments in the users database each time a user comments. Decrement it if you delete a comment. Then just do this: SELECT * FROM users ORDER BY num_comments DESC LIMIT 1;
  17. Thanks for the information. Perhaps you should move it to the FAQ/Code Snippet Repository, but then again, nobody seems to look there before posting. Also, why do you send two Content-Types? The second one will override the first unless the $replace parameter (second parameter) is set to false (it's true by default).
  18. Having root privileges means that you are able to log in as the user "root".
  19. From the FAQ/Code Snippet Repository: http://www.phpfreaks.com/forums/index.php/topic,95433.0.html
  20. The user guide says that installing Zend Optimizer requires root privileges (see p. 7).
  21. This works for me: <?php $path = substr($_SERVER['DOCUMENT_ROOT'],-1)=='/' ? $_SERVER['DOCUMENT_ROOT'] : $_SERVER['DOCUMENT_ROOT']."/"; require_once "{$path}config.php"; $error = null; $user = $_GET['user']; $filename = $user.$_GET['file']; if(ini_get('zlib.output_compression')) { ini_set('zlib.output_compresion',0); } $file_parts = pathinfo($filename); $file_extension = $file_parts['extension']; if(empty($filename)) { die('Error: No file path passed to script.'); } $mime = array( 'pdf' => 'application/pdf', 'exe' => 'application/octet-stream', 'zip' => 'application/zip', 'doc' => 'application/msword', 'xls' => 'application/vnd.ms-excel', 'ppt' => 'application/vnd.ms-powerpoint', 'gif' => 'image/gif', 'png' => 'image/png', 'mp3' => 'audio/mp3', 'mpg' => 'video/mpeg', 'mpeg'=> 'video/mpeg', 'mp4' => 'video/mp4', 'jpg' => 'image/jpg', 'jpeg'=> 'image/jpg', ); if(key_exists($file_extension,$mime)) { $ctype = $mime[$file_extension]; } else { die(); } header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: {$ctype}"); header("Content-Disposition: attachment; filename={$file_parts['basename']}"); header("Content-Description: File Transfer"); header("Content-Transfer-Encoding: binary"); header("Accept-Ranges: bytes"); header("Content-Length: ".filesize($filename)); readfile($filename); ?>
  22. Daniel0

    html emails

    Check the source on that email
  23. Well, your site doesn't work without Javascript. It just says I don't know what that means. It's a little hard navigating your site because I don't speak Romanian (well, I suppose it is Romanian since your site has the .ro TLD).
  24. There is no need to decrypt again. Use a one-way hashing algorithm such as SHA-1 or MD5. Then when the user enter their password to login again they you would just encrypt the entered password and compare it with the already encrypted password stored in the database.
×
×
  • 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.