Jump to content
xisto Community

galexcd

Members
  • Content Count

    1,313
  • Joined

  • Last visited

Everything posted by galexcd

  1. Wow it has been 2 months since I've posted one of these. Anyway on to my rantings err i mean thoughts... PARALLEL UNIVERSES- Ok so the theory of an exact world such as ours has been brought up before. Many believe that it is very possible. If the universe is truly infinite (and there are infinite numbers of galaxies), then it is a fact that there is an exact world living just as we are this very minute, and there is another alex7h3pr0gr4m3r writing this thread on another Xisto.com talking about us. In fact if the universe is truly infinite, then there would be infinite alex7h3pr0gr4m3r's writing this thread. The reason for this is if there are infinite galaxies then it is truly impossible that another galaxy is not living as we are, and it would be impossible that there is another galaxy where alex decided to get up and make himself a nice bacon lettuce tomato sandwich instead of writing a post on some forums. In fact there would be infinite universes where Xisto.com didn't even exist in the first place. Wow imagine that. So this brings me to my ultimate question for this thread.... What if the universe is really infinite, meaning that there are other galaxies living just as we are. Now let's progress millions of years into the future, and assume we still exist and have the technology to travel far enough to reach half way between our galaxy and our parallel one. And let's assume that seeing as the universe is infinite, we just happen to be in a location that mirrors the other universe, so as we travel both of our journeys are exactly the same, and we were to meet with our parallel, what would be the conversation that would ensue? We wouldn't be able to make any kind of conversation at all, because if we have truly lived the same life, we would be the same person.
  2. Every time I edit one of my posts with a url bbcode tag in it that has a carriage return in it it turns into html form while editing. For example right now i'm going to type [url=http://Xisto.com]click here[/url] Then I'm going to click edit, and then submit modified post: <a href="http://Xisto.com" target="_blank">click here</a> This is a very annoying part to keep fixing every time I edit my posts.
  3. This is the main reason I don't use session in php. I write it myself, come up with a random string and make my own cookie this way I have more control over it. I check the IP address that was logged in with, with the one trying to get the request.
  4. Ahhhhh lame. I remember spending most of the week trying to come up with what the heck that monster could possibly be and it turns out to be some random made up fairy tale thing? And also I never really liked those all-action no-story movies that you said this was. I like extremely complicated story lines that you have to figure out, not wanna be ones that they just seem to throw together and don't tell you anything.
  5. Well I guess since the code is already written out that way it won't be harder but it sure is a waist of code. Here is how I would do it: function getposts($id,$nick,$pass,$page){slogin($nick,$pass);global $banned;// $letssee=false;if (!$banned) {$page=$page-1;if (!$page==0) $page=$page*10; else $page=0;$pagemore=$page+10;$userposts=mysql_query("SELECT id, name FROM posts WHERE forum='".$id."' AND thread='1' ORDER BY pinned DESC, position ASC LIMIT ".$page.",10");echo "<br/>";while ($rowas = mysql_fetch_array($userposts)){$isclosed=mysql_fetch_array(mysql_query("SELECT closed FROM posts WHERE name='".$rowas[1]."' AND forum='".$id."'"));$ispinned=mysql_fetch_array(mysql_query("SELECT pinned FROM posts WHERE name='".$rowas[1]."' AND forum='".$id."'"));$postu=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM posts WHERE forum='".$id."' AND name='".$rowas[1]."'"));$rowas[1]=htmlspecialchars($rowas[1]);$enc=urlencode($rowas[1]);$enc=htmlspecialchars($enc);//$viewpost_title =convert_cyr_string($rowas[1],"i","w");if($ispinned[0]==1)$image="<img src=\"images/pinned.gif\" alt=\"*\"/>";else if($postu[0]>20) $image="<img src=\"images/hot.gif\" alt=\"*\"/>";else $image="<img src=\"images/normal.gif\" alt=\"*\"/>";if ($isclosed[0]==1)$image="<img src=\"images/closed.gif\" alt=\"*\"/>";echo "<a href=\"index.php?action=viewpost&name=$enc&nick=$nick&pass=$pass&forumas=$id&read=old&page=1\">$image$rowas[1](".$postu[0].")</a>"; echo "<br/>";}echo "<br/>";} else echo "Your Banned!";} Just a quick note I don't have time to read through every single line so there might be something I forgot to do when changing this for you, but if you know enough php to be rewriting forums you should get the gist of what I'm trying to do here. And what's with this code and having a random new line after every line of code?
  6. Well when you were first talking about komposer I thought it would be great because it would let me edit my files via ftp without having to download them, edit them, and then re upload them but it wont connect to my website over ftp... Software that works is always better than software that doesn't work. Sigh....
  7. Alright I'll make this brief. You can fix this by checking how many pinned topics you have and subtracting that from the limit of your regular query but this in my opinion would just make your life harder. This is what I would do: Instead of having 2 sql queries (one for the pinned threads and one without), only have one and order it by pinned, and then position. So instead of this: $pinnedposts=mysql_query("SELECT id, name FROM posts WHERE forum='".$id."' AND thread='1' AND pinned='1' ORDER BY position LIMIT ".$page.",5");[...]$userposts=mysql_query("SELECT id, name FROM posts WHERE forum='".$id."' AND thread='1' AND pinned='0' ORDER BY position LIMIT ".$page.",10"); Do this: $userposts=mysql_query("SELECT id, name FROM posts WHERE forum='".$id."' AND thread='1' ORDER BY pinned DESC, position ASC LIMIT ".$page.",10"); Hope this helps
  8. I wouldn't consider that a con... more of a pro, but as SM said you can dual boot windows on it since its an intel chip. The letter "i" first stood for internet. It came about because way back when the old first gen iMacs were so easy to connect to the internet (trust me that was a big thing at the time) because they were all in one and had a built in modem so you just plugged in the power and the phone line and your set. I think the "i" just kind of stuck, but this isn't the first product without it. None of their new intel laptops have it. Macbook, Macbook Pro, and Macbook Air I'm sure if you can lug that huge printer of yours everywhere you go you can afford to cary one tiny usb hub. Well Like I said this isn't a replacement for a desktop. It's designed to go along with a desktop computer. Plug all those accessories into your desktop! [hr=noshade] [/hr] Also a quick note about it perhaps being a flop: The second Jobs announced it (before we even knew what it was) our apple store was getting tons phone calls asking if we had it.
  9. I'm not quite sure if this is going to be a flop or not. I would bet not. Alot of people just want an ultra-portable for just surfing the net, notetaking, and perhaps some other activities. It may not be for people who are gamers or graphics designers but for an average computer user I think it will be a major success. Oh and that would have nothing to do with the mba seeing as it doesn't even ship out to the apple stores until february.
  10. Once again I shall rain on sombody's over-codyness... You do not need that else statement. The die function will terminate the rest of the code outputed on the page. If you really want to do this in php and not through htaccess all you would need is the if and the die.
  11. As some of you may know the macworld expo was today, and as even less of you know I work at an apple store in california, and it was quite a sight watching all the employees and customers huddled around computers as live updates from bloggers at the expo were flying in. So anyway the biggest new announcement in the keynote was the new laptop: The Macbook Air. The world's thinnest notebook. So anyway some quick numbers for those who care: .76 inches high 12.8 inches wide 3 pounds Ports: Micro-DVI (capable of composite, s-video, VGA, and DVI video out) 1 usb port Headphone/Audio out Here is the ad: You can get it in an 80 gig traditional harddrive or a 64 gig solid state harddrive The Good: It's absolutely amazing. Those who haven't seen the ad I've linked to go back and see it. How they can fit a processor, hard-drive, memory and all that other good stuff in that tiny thing is beyond me, and your not sacrificing anything for it either. It comes with 2 gigs of memory, and you can get up to 1.8 GHz which isn't that great compared to other mac portables like the macbook pro but certainly is better than some other laptops on the market. It comes with a built in iSight too which is great. When they first put them in the iMacs i was amazed that they could put a webcam in that small thing and then when they fit them in the Macbooks and Macbook pros I was even more amazed but this is the thinnest of them all. Another cool feature is the multi-touch trackpad. Apple has had something similar with its other portables, with two-finger scroll, but this lets you zoom and rotate just by using your fingers on the trackpad. The Bad: Now as much as I love sleek ultra-portable laptops I must say this is not for me. For one thing is the lack of a cd drive. I completely understand that it was hard enough putting all of that in the laptop that thin but this just seems like a hassle to me. They have a few solutions but they are not as convenient as having a CD drive. One is an external drive that costs $99, but lugging around extra stuff defeats the purpose of an ultra thin laptop. The other is if you have another computer (mac or pc and I'm not sure about linux) you can put your cd or dvd in that drive and the macbook air can read and install software off of it. Now I besides the fact that they probably couldn't fit it in there I think I see another reason behind this. Apple (as well as almost all computer companies) are going away from physical media. They are trying to make CDs/DVDs a thing of the past. Apple announced that you can now rent movies directly from the iTunes music store. I think they want to have everything soon be streaming off the web instead of a physical copy. Another annoying part is the lack of ports. It has no firewire, no audio in, no ethernet, no sd card expansion slot (or whatever those things are called) which are on the macbook pro's, and only one usb. Now the one usb is OK because if you have something that ultra-portable you don't want all kinds of devices plugged into it, but I would have liked to have seen at least a firewire port to access some firewire external drives. Although you can access one by plugging it into another computer and accessing it wirelessly this makes it much slower than firewire actually is. Also, you can't access the battery. It is built in. Apple has said that batteries will cost $125 and it will be free for the battery to be replaced, but there is still the hassle of bringing it into a mac store and having the battery swapped out. [hr=noshade] [/hr] SO... all in all I think this is an amazing laptop for those who want something portable. Those who are always bringing their laptop around with them and just need a computer to use on the go, even for processor intensive uses, such as some gaming and perhaps some video editing, but if you are looking for a laptop to use as a replacement for a desktop this is not it. If you have any comments go ahead and post them...
  12. That website has access to data you don't. I'm not sure but I think that's the official xbox live website. If that's the case then you're most likely not going to get that data. If it isn't an official site then I would sugest emailing the site developer and ask him/her where that data can be found.
  13. That would result in an error if there were no rows matching that query. mysql_num_rows is the best function to use.
  14. The FBI probably use this website as torture to get terrorists to talk. They glue their eyes open and force them to watch this.
  15. your overflow attribute is canceling out the scrolling no attribute. Set your overflow to hidden not auto. Something like this: <iframe name="Iframe" src="URL1" FRAMEBORDER="0" style="width:100%; border:0; background-color:000000; height:100%; overflow:hidden;"></iframe>
  16. the error would be the semicolon between the function name and the parenthesis. Try this: mysqlpconnect(100ws.Com,margee1,cheese123);Also, it appears that you are missing a semicolon on the very last line. You might want to fix that unless you want more errors.
  17. Yes but did you pay attention to the first line in my post? So yours is no more secure in any way.
  18. galexcd

    Analog Clock

    Yes it isn't very useful but like I said I only did it because I was bored and wanted to do something random in php
  19. Devices that can make copies of itself will end civilization as we know it. Read through this article and you'll know what I mean. I'm sure alot of scientists would argue against what the article says but still it makes a lot of sense.
  20. galexcd

    Analog Clock

    ok so i was bored and was inspired by the php clock topic to make this dynamic image of an analog clock: so anyway here's the source code: <?php/*All images and lines of code were written/drawn from scratch by alex...*/header("Content-type: image/jpeg");function newclockhand($time,$color,$length,$thickness){global $clock;imagefilledpolygon($clock,array(96,89,99-$thickness+cos(deg2rad($time+90))*2,92+$thickness+sin(deg2rad($time+90))*2,$length*cos(deg2rad($time))+165-$length,$length*sin(deg2rad($time))+165-$length),3,$color);}$clock=imagecreatetruecolor(200,200);$back=imagecreatefromjpeg("back.jpg");$dot=imagecreatefromjpeg("dot.jpg");imagecopy($clock,$back,0,0,0,0,200,200);newclockhand(intval(date("i"))/60*360-90,imagecolorallocate($clock,0,0,0),70,3);newclockhand(intval(date("g"))/12*360-80+30*intval(date("i"))/60,imagecolorallocate($clock,10,10,10),55,5);newclockhand(intval(date("s"))/60*360-90,imagecolorallocate($clock,255,0,0),70,1);imagecopy($clock,$dot,97,91,0,0,6,6);imagejpeg($clock);imagedestroy($clock);?>and attached are all the images needed. but if you refresh a bit you can tell there are a few bugs... especially with the thickness of the hands changing. I'm not that great at trig functions, I just know the basic unit circle which I used to make this, but i had to play around with some of the numbers to get it right, but I never got the thickness to work quite right. If any of you math whizzes out there want to improve my code go for it. Also changing the length of the hands affects the time sometimes so make sure you compensate for it by adding degrees within the deg2rad() function. But other than those 2 the clock works pretty good. Have fun!
  21. You could have js do some ajax to get the updated time and format if you wanted to use the php code, but it would just be easier to do the whole thing in js if you want it to update automatically.
  22. Yes but I believe the PHP in PHP does not stand for PHP Hypertext Preprocessor, if I recall it stands for 'Personal Home Page', so the full length acronym would be "Personal Home Page Hypertext Preprocessor".
  23. No you don't understand. It wouldn't translate it at the same time you are speaking. Only one sentence at a time. So you would speak a sentence, or a paragraph, and when you pause for more than 5 seconds it will process what you have said and say it out loud.
  24. Alright it's been a while since i've posted here and if I want to win that mad scientist award (*hint hint* vote for me) I think i'll need some more topics in here, although some of my topics like the earth is flat and circles don't exist topics really brought up some debate... So anyway this isn't a theoretical idea or mathematical quandary like some of my previous topics, its an invention that should be possible in the near future. A box with a microphone and a speaker and when you talk into it, it translates what you say into another language. It uses 3 different technologies that we have had for quite some time but still aren't perfect, and just need some fine tuning. One would be voice recognition, which probably needs the most work, especially after seeing what a terrible job Microsoft did, but I think voice recognition in mac OS is pretty good, and my car also has voice recognition which works pretty good, but still not perfect. So another point would be translation from one language to another. We've had translation software for ages but it still isn't perfect. A bit more fine tuning and it should be decent enough for a prototype of this device. And finally would be electronic speech (i.e. turning words into sound). Once again I think apple's got that down with their new voice in their new operating system: leopard. Their new voice sounds like a real person talking to you, it's amazing. SO anyway first person to put all of these three into one box and sell it will be a millionaire. I would gladly accept a cheque from the first person to use my idea... just make it out to alex
  25. I've always had the idea of putting one of those LED marquee's in the back window of my car. Then I would have a keypad or something on my steering wheel and I would be able to type messages to the people behind me
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.