Jump to content

oni-kun

Members
  • Posts

    1,984
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by oni-kun

  1. If you're wanting to get lucrative, Windows 7 is based on MinWin and stripped can take much less than 50MBs of RAM. [battousai@myhost ~]$ free -m total used free shared buffers cached Mem: 3032 2687 344 0 245 1712 -/+ buffers/cache: 729 2303 Swap: 3153 0 3153 This Arch distro obviously takes the beating with PDF editing software, an HTTP server and a few IDE's up along with filezilla to upload required files, It depends more on the software than it does the OS when you're getting into programming and applied engineering and sciences, if you were to say use Autocad alongside other things.
  2. Most linux distributions don't even utilize sections of the RAM unless they are needed. Windows 7 is a decent OS, and it's ran fine on a 3GB RAM setup without ever going over the 1.2GB mark on load. Anything ran on it, be it Microsoft Office or Autocad for computer engineering has run on W95 w/ 512MBs DDR1-233 for decades, I don't think too much more is needed.
  3. Not in for years has my 4GBs of RAM on my PC been eaten up, By heavy games with music and firefox with atleast a hundred tabs. Why would you specifically recommend a student get a notebook with that much in it? It's like telling someone to get an extended magazine size modded on a rifle for a hunting trip, It CAN be useful, less time to reload. But it's pointless. You're hunting animals. EDIT: Daniel0 responded just before I did, He seems to get what I am trying to say, It's pointless to buy someting so expensive if it's simply not used.
  4. Take a look at the following code: function createThumb(){ $thumbSize = 465; $this->thumb = imagecreatetruecolor($thumbSize, $thumbSize); imagecopyresampled($this->thumb, $this->myImage, 0, 0,$this->x, $this->y, $thumbSize, $thumbSize, $this->cropWidth, $this->cropHeight); } Note that $thumbSize will be repeated twice, So try this: function createThumb(){ $thumbSize_x = 465; $thumbSize_y = 275; $this->thumb = imagecreatetruecolor($thumbSize_x, $thumbSize_y); imagecopyresampled($this->thumb, $this->myImage, 0, 0,$this->x, $this->y, $thumbSize_x, $thumbSize_y, $this->cropWidth, $this->cropHeight); }
  5. The previous post has correct code, Although $_POST will never be undefined (try replacing if($_POST) { with if(isset($_POST['ID']) && isset($_POST['pass'])) { And most importantly, escape your data to prevent injection and bad issues down the road: $_SESSION['ID'] = mysql_real_escape_string($_POST["ID"]); $_SESSION['pass'] = mysql_real_escape_string($_POST["pass"]); mysql_real_escape_string
  6. Scripting languages are often apt. to easily integrate into eachother, if they are indeed just PHP code then try to copy->paste and see if it runs. You can go ahead from there and rename variables if needed etc. Remember, you can also include the file; such as include('filename.php'); and it will 'inherit' all its content.
  7. Take a look at the current laptops on bestbuy from around $700-1300 and see what modern laptops look and perform like? You'll get a lot more than 2 hours out of them. The mac book pro may be a good (but albeit expensive) choice as it has an expensive OS where Linux is free, as in beer. I'd personally stick with the Dell or HP line, Asus tends to be dodgy with some of their products. Remember, getting him a monster (like the laptop you listed) is an expense as he is using it for work, it will most likely cost too much to replace if stolen/broken and you don't need to be able to play Crysis when you're needing to work to get a degree.
  8. oni-kun

    IE9

    Glad atleast they self contained WinMin, M$ is always slow on the trends, They take so long to make a 'fancy GUI', 'brandable search engine' and now browser which can compile JS? Took long enough.
  9. $file = fopen("$name.txt","wr"); wr is not a valid option, Look into r/r+ and w/w+
  10. Try using system() Are you sure that program can be run under the command line? And are you sure you have permissions to run it? (administrator)
  11. Ternary and tertiary condensed operators are slow, I wouldn't recommend using them.
  12. <?php $operator = fgets(STDIN); echo var_dump ($operator) . "<br/>\n"; echo ord(trim($operator[0])); ?> Please post the results of this. What you are most likely getting is something encoded, or as mentioned an untrimmed character. This will verify it 'bit by bit' to prove your point.
  13. If a) It can open, b) it can parse. Then doesn't it defy your own logic? Turn error reporting to E_ALL|E_STRICT|E_COMPILE_ERROR and use require(). That should prove your problem.
  14. Is safe mode off? Did you place it in the 'safedir' that php requires exe's to be in for them to be run?
  15. if (isset($_GET['js']) && $_GET['js'] == 0) { header('Refresh: 5; url=enable_javascript.php'); } else { header('Refresh: 5; url=index.php'); } Turn output buffering off please, And tell me: a) What script are you calling this from, the index.php itself? b) Where is the GET value 'JS' defined, and why does it need to be refreshed every 5 seconds? I don't see a point in this, you're just trying useless code for no apprent reason , you may as well not even call this a PHP question.
  16. Well, you can do this which will check the physical existance of the url (again, existance the same as 404, but not 'just' 404) //Returns 1:0, true:false function fsocket_check($url) { $res = (($ftest = @fopen($url, 'r')) === false) ? false : @fclose($ftest); return ($res == TRUE) ? 1:0; } If you wish to go so far as to check the headers.. function fsocket_header_check($url) { $addr=parse_url($url); $host=$addr['host']; $path = $addr['path']; $headtxt = ""; if($sock=fsockopen($host,80, $errno, $errstr, 3)) { fputs($sock, "HEAD $path HTTP/1.0\r\nHost: $host\r\n\r\n"); while(!feof($sock)) { $headtxt .= fgets($sock); } } $pos1 = stripos($headtxt, "200 OK"); return ($pos1 === false) ? 0:1 ; } EDIT: Stupidquotes took over.
  17. If no bytes are on the disk, how can viruses still be there? They can, but i'm not going to get into a discussion about multipartition worms.
  18. Yeah, if you use the recovery disk and do a clean install then it should 'discard' your parition. You may want to delete the NTFS partition, and use the 'long' method (should be fast or long methods when reformatting during install) to get rid of all data for the optimal reformatting.
  19. $code = htmlentities($rbel['mycode'], ENT_QUOTES); Can you not just do that?
  20. Indeed they are. Well, how about formatting your pen drive in case there are any autorun or infected MBR worms still hidden within? Look through your C:\windows\ and \system32 for any out of the ordinary files, which I highly recommend checking online for before touching them. Install an antimalware such as malwarebytes (free: from CNET.com) and update it as necessary, and scan. Go into safemode and scan with your antivir, and make sure there are no startup files which are obviously not what you intended to start up, IE pesky spyware (Start -> Run -> 'msconfig', then go to startup tab and uncheck necessary items) Blah blah. Get linux while you're at it.
  21. The site looks to heavy to me. Invest in image compression and use GZ (like gzip) for faster serving of the files. Can be as simple as adding this one line at the top of your code: <?php ob_start('gz_handler'); Your forms "reggie -> Uzer" and "search" are suseptable to XSS, I'd recommend nullifying the following characters of which are at risk: ; \ / < > =
  22. Use regular expressions, or ever is_numeric , is_float, is_double ..How hard can this be?
  23. * Additional Info.doc (0 kB - downloaded 2 times.) Took me half an hour on a T1 to download that baby.
  24. Nonsensitive: preg_match('/999$/', $entry) Insensitive: preg_match('/999$/i', $entry)
×
×
  • 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.