Jump to content

javaguy

Members
  • Posts

    370
  • Joined

  • Last visited

Everything posted by javaguy

  1. A lot of decisions get made that way, inside and outside of national politics. Once it's a done deal, it may be hard to reverse, especially when it costs less.
  2. Greg2 requested this in another thread, so here's one way to make a script that displays a random picture. In this case I have installed the Coppermine photo gallery (a nifty little piece of PHP freeware), so the names of all the photo files are stored in a database table called cpg135_pictures. You don't have to have all that set up, though, just some kind of database from which you can select a random file name. In fact, you don't really even need a database--you could use the PHP directory functions to list all the files in the image directory and then pick one at random. Anyway, here it is. Put the following text on your web server in a file called randompic.php or something like that, make sure it has execute permission and that your web server has PHP installed, and when you navigate to http://mydomain.com/randompic.php you'll get a random picture. <?php header("Content-type: image/png"); //Select random thumbnail file. $link = mysql_connect('localhost', 'dbusername', 'myawesomepassword') or die('Could not connect: ' . mysql_error()); mysql_select_db('benjamin_album') or die('Could not select database'); // Performing SQL query $query = "SELECT filepath, filename FROM cpg135_pictures ORDER BY rand() limit 1"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); $line = mysql_fetch_array($result, MYSQL_ASSOC); $filepath = 'album/albums/' . $line['filepath']; $filename = $line['filename']; mysql_free_result($result); mysql_close($link); $thumbnail_img = imagecreatefromjpeg($filepath . '/' . $filename); imagejpeg($thumbnail_img); imagedestroy($thumbnail_img); ?> [moved from Software by spinynorman]
  3. Bingo. Counting the number of "flaws" discovered is meaningless. Security flaws discovered in Linux tend to be fairly minor theoretical problems, while Windows malware makes headlines every time millions of computers around the globe are infected and massive amounts of productivity lost. It is not informative to count the number of the former type of flaw and compare it with the number of the latter type--but it makes sense to Symantec, since they sell Windows software and obviously want everybody to be using Windows.
  4. Like it or not, spam is free speech. Proposed legislation to regulate spam has absolutely nothing to do with regulating spam. It is simply an attempt to establish a legal precedent that the government can dictate what we are and are not allowed to say on the Internet. Once that precedent has been set, the government's feigned interest in spam with vanish as it turns its attention to more vital forms of expression that it would like to quash.
  5. Government control of the Internet would be a far worse problem than spam could ever be. I'm happy with SpamAssassin. I still get about a dozen spams a day, and my Delete key takes care of those.
  6. This kinda jibes with what I've always thought intuitively. Lesson: Backup, backup, backup.
  7. This reminds me of a news article I read some years ago about an 8-year, multimillion dollar study--taxpayer funded, of course--of the causes of cars getting hit by trains. The researchers concluded that cars get hit by trains for two reasons: 1. The driver didn't see the train, or 2. the driver saw the train but thought he could make it across the track in time. Apparently some people need a study to tell them this stuff. Up next: Sun to rise in East tomorrow. [edit: fixed incoherent sentence]
  8. That's true, and will be true if MS continues to derive most of its profits from licensing. The world can change, though.
  9. I suspect you're right, but I have to wonder. I think Bill Gates is primarily motivated by his desire to make money. The public's perception of him is that he simply wants absolute control of the software industry; this is true, but it is a means to an end and not the end itself. His primary end is to maximize his profit. It's possible to make money in the open-source world, and in an ever-changing world I think the day could come when MS has a very different business model--not because Gates will suddenly become sensitive to the feelings of the open-source community, but because he has always been happy to alter his business model to adapt to changing conditions. Not probable, but I don't rule it out.
  10. Does anybody suspect that eventually Microsoft will brand its own Linux distro?
  11. Actually, Beta flopped because of the porn industry. They were looking for a new medium, and video was it. But Sony said it wouldn't put porn on Beta, so the porn industry went to VHS, and the videotape war was over. The porn movie industry consistenly makes more money than the mainstream movie industry. If "simple business competition" is why Mac is not more widely used, that's just another way of saying it isn't liked. The winner of business competition is the one people choose. We can argue all day that people don't like Macs because they make uninformed decisions based on information they get from marketing, but at the end of the day most people don't like Macs. I also think that "better marketing" argument wears thin after about 15 years or so. It's hard to find anybody who hasn't already been told ad nauseum that Mac is better but that Windows just has better marketing. It's very old news. Yet people still stay away from Macs. And no, a set of standards doesn't have to mean everything is the same. I'd love to see a spec for distros to ensure compatibility, and if that's what they mean, great.
  12. http://www.foxnews.com/story/0,2933,246401,00.html I'm inclined to file this one under Wishful Thinking, but I'm encouraged by the strides that Linux has made in ten years. I don't know if this is badly worded. I would hate to see a "standard Linux." I would love to see a Linux Standard, a set of specifications to ensure that the software and hardware whatever that I set up on one distro will work just fine when set up the exact same way on another. I love the open-source community and its experimental free spirit. ...and that's why the Linux Foundation should strive not to emulate it. The article speaks of "ending the fadish nature" of different distros, which sounds to me like shoving everybody into a one-size-fits-all. One size doesn't fit all, but a standard spec to ensure compatibility would sure be nice.
  13. I'd have to dig out my documentation, but when you buy Power Pack there's a toll-free number for customer support in the manual. If you get through to a human being, ask them to return my call from from four years ago. ;)
  14. That has been precisely my experience. When I first tried Linux I shelled out the bucks for the Mandrake "Power Pack" because, although I'm fairly good at figuring things out through tinkering and Googling, I don't always have time to do so and thought that, for my first distro, it would be nice to have access to actual Mandriva tech support. That tech support turned out to be non-existent, but I was able to solve all my problems without it, leaving me wondering for what I paid. I might start trusting them again if they ever answer the voice-mail I left at their customer support number...four years ago.
  15. You can reference individual elements of the array and cast those to type String, but you cannot cast the array object itself to an array of Strings because, well, that's not what it is. It's an array of Objects.
  16. Does this happen on any php page, or just one site in particular?
  17. Update: I burned a CD with the 32-bit 2007.1 Mandriva. When I run it, X won't start. :(
  18. Update: My mediocre lilo skills have saved the day, and system is now at least bootable. I'm DLing the 32-bit 2007.1 version now.
  19. I downloaded and ran the 2007.1 live disc and was able to boot into graphical mode. Hooray! Then I clicked the Live Install icon, and all seemed to be going well until I too got the "ARRAY(0x1dc3490)" message (different numbers, but as soon as I saw it I remembered your post). But the CD drive kept cranking away, although it didn't seem to be making any progress. I let it go for a while to satisfy myself that it had really encountered an unrecoverable error, then rebooted, thinking to boot into my Winbloze partition. No such luck. My disk is now unbootable! :( At this moment I'm running from the Live CD. I tried installing from my old 2006 CDs, but it first complained that it couldn't find a CD drive, then proceeded as though it were going to do a network install, but then said it didn't recognize some other piece of hardware and hung. So I guess my next step is to try to get my system bootable again. I'm going to try with lilo, since that's what I've used before, though I'm hardly an expert at it. God help me.
  20. Is the 2007.1 version one I have to pay for? 'Cause I can't find it. If that's what it takes, I'll shell out the bucks for it. :) I wasn't able to install the 32-bit version of 2007 because it didn't recognize the SATA CD-ROM drive. I might give the 32-bit 2006 version a whirl tonight.
  21. Can the 64-bit Linux not use rpms made for 32-bit? If not I probably have to use the 32-bit version, except that the installer for the 32-bit version (at least for 2007) did not even recognize a SATA drive. I don't think the Asus mobo is a particularly exotic architecture. I got a Windows 2000 partition to boot with it with no problem. Is there another Linux distro that might work? I've grown kind of attached to Mandriva, but I really need to get something working. Thanks again, Sam
  22. I just upgraded my system to an Athlon 3500 on an Asus M2N-MX board, and I have a variety of problems installing. I'm trying to install the 64-bit version of Mandriva, btw. When I ran into troubles I tried just installing the 32-bit version, but the installer didn't recognize my CR-ROM drive (a SATA device)--even though it had booted from it--and would go no further. During the initial installation, it does not recognize the hard drives. It says it sees the CD-rom drive and asks me if I have any others. By selecting ide-generic from the list I was finally able to get it to see my two hard drives, and from there the installation proceeded normally. At the end it said I could reboot and start Linux, but reboot froze. I tried rebooting in "safe" mode, and saw a message that said mount: error 6 mounting ext3 followed later by a kernel panic. I tried booting from the install disc and going into rescue mode. When I tried the option to mount my root under /mnt it said it couldn't find the root. When I went into console and typed fdisk -l it said it didn't find any devices at all. :(
  23. When I click on "Set up printer..." in MCC, it says "Loading...please wait" for a moment, and then the window goes blank and stays that way. It doesn't freeze. I can click the X, and it returns immediately to the Hardware tab of MCC, but absolutely nothing appears in the printer configuration window. :( Any suggestions?
  24. Still the same result. I hear sound, but it's all squeaky and distorted. Other sound applications work fine, incidentally.
  25. Like the topic says, can't get sound to work. Now I do hear sound, e.g. when I play a YouTube movie or whatever, I get audio, but the sound stutters to the point of complete incomprehensibility. The people sound like Alvin and the chipmunks, only much, much worse. Any suggestions? (Yes, I turned off artsd. ;) )
×
×
  • Create New...