Jump to content

keldorn

Members
  • Posts

    340
  • Joined

  • Last visited

    Never

Everything posted by keldorn

  1. Yep were already had our in Sept I think. Turkey is probably the cleanest meat you can buy, Most meat has tons of oils in it. But turkry is pretty dry becuase of that, but if you cook a turkey then cut it up and freeze and take some out, and fry it with vegetable oil + olive oil mixture with some salt, it taste pretty darn good.
  2. Those things dont exist on the image, there overlayed on the image by CSS, or is a object in the flash player. You could do that yourself also, (The css anyways) or Get Asido, then grab the thumbnail from youtube, and overlay a tranparent png image on top of the thumbnail that looks like what you describe, Asido::copy($image,'/path/to/image/', 0, 0); My avatar is actually 2 image combined over with Asido with that command. The black box around it, was transparent and overlayed on the avatar.
  3. You should use Switch statments, what you doing is nightmare to manage.. The elese if statments, try this. Why no just put your "Business logic" in the top of the page? Then assign the variables back to the page with arrays, (You can see this example of what I mean by) Here is a switch statment, // register.php?action=register Switch($_GET['action']){ case 'register': // stuff break; // Completely exits the switch statement case 'thanks': // stuff break; default: // nothing break; }
  4. I dont feel like repeating myself, read this. I already explained this and also gave a good example of ob_start() http://www.phpfreaks.com/forums/index.php/topic,277876.0.html
  5. oh, Okay. What would be the way to store the numbers in the row, serialize() it? Edit: Nevermind, I would normalize the database and make a separate table for the ratings, Then create two indexs called "Count" and "votes", and store each number there rather then storing all the votes like 1,5,8,4,2,1 So you could have id+Vote+Count+ 1 20 5 2 40 9 3 55 12 Then just increment them when needed, and divided when needed.
  6. What the logic behind those 5 Star rating things you seee on youtube, Is it just division? , like if someone votes 5, then store 5 in the DB, then if someone votes 2, divided 5 by 2, so you get 2.5 then round() it to 3, Then show 3 stars, is that all there is too it? Edit; oh what if the rating is 3, now someone votes 5? You can't divided 3 by 5.
  7. What I would do, is tell them to seperate each word a , Then on a post i would take it and check for against a whitelist of characters with a regex to allow only letters and numbers and colons (,) Then I would explode it into a an array value via each colon, then iterate threw each value and apply trim() , utf8_encode() and strtolower(), then ucfirst(), Then strlen() each value to make sure its not longer then set about of characters, and is also longer then 3 characters, else reject it. Then I would iterate over each value again with mysql_real_escape_string() Then next I would place it into a database , each word, would get its own row, but I would set the colume the word is in, as Unique index, so if it return false, after the query, then I would run the mysql_query again on that row, and increment a counter in the table by +1. To generate the tags, I would grab say, 20 row, ORDER BY counter ASC and apply a mathematical formula against all 20 words, and make the words bigger that have a higher value in their counter. EDIT: I probably need to sleep, I thought you wanted a tag cloud.
  8. I assume your tyring to show error message and also set a flag "$success" which tells the script whether or not to process a certain part. This would be a proper way to show error messages and success message. To answer your question, Put $msg into a array, Like You could have $error['invalid_email'] $error['invalid_name'] , $error['invalid_phone_number'] etc.. Then use empty() to check it.. See the example below. <?php //set variables $success = "" $error = array(); if( <invalid email check here>){ $error['invalid_email'] = "Fix this"; } if(empty($error)){ $success = " Thanks "; // Process further... } ?> <!-- html page --> <?php if(!empty($success)) echo $success; ?> <form action="" method="post"> <dl> <dt><label for="Email">Email</label></dt> <dd><input type="text" value="" id="email" name="email"/><?php if(!empty($error)) echo "<span>{$error['invalid_email']}</span>" ?></dd> </dl> </form> btw I did not test that code, but its the general idea. You can also pass many parameters to isset() so you could do this, (which is really bad and lazy, you should use an array for $msg) if( ! isset($msg1,$msg2,$msg3,$msg4,$msg5,$msg6,$msg7,$msg9)){ }
  9. Capital letters matter on Linux server, to map a file to the system, INDEX.html is not the same as index.html, nor is InDex.html. Capital letters do not matter in a Mysql row indice. So you have stored "dvd" in the a row , and you select the row that says DVD it will work. On windows server capital letters make no difference. Which actually causes a bug, if you search for "w3school php" on Google, you'll see its DEfaULT.asP , someone got the page indexed like that as a joke... Most likely. Again Capitcal letters matter in your regex also, yours only currently serearching for A-Z, I think you need, [0-9a-zA-Z]
  10. It looks okay, except that is not centered correctly I think you'll need to move it left 50 pixels or so. But I noticed its all created with tables and the rolls overs are javascript. Thats really like 2003 style, I would mock that up in divs/css. Your rollover images, you can put them into 1 image called a sprite, then put a css style on the div that contains those, that says, Change background image to x,y coordinates on the sprite image on a:hover
  11. I haven't read up string theory but I'll definitely check it out. I love these crazy theories. Did you guys know that matter is 99.9999% empty space? If you compare an atom to a football stadium, its like a football (Nucleus) sitting in the middle of the stadium and a few golf balls moving around the stadium, its mostly vacuum. What that reminds me of, is in video games, you ever find a bug where you slip threw a wall? Whats inside the wall? Nothing... Slip threw the solid you see and you'll find nothing.
  12. There is another theory that the world we see is actually a projected hologram by our senses which is sent to our consciousness to enjoy, but in reality were just a wave of energy. There is also a religion based on this in Hindu, called Maya. The world as illusion. http://www.youtube.com/watch?v=MCLK2WwxIQU Now if the universe is a hologram what is gravity really? It probably just as fake as matter. Whatever matter is, it isn't made of matter.
  13. I wonder if someone take alook at this php code I wrote, I have never shared my code with anyone before, so I would like to know if its sloppy or good? I've tried my best to catch exceptions, xss, and cross site request forgery. http://hidefinder.com/code.htm
  14. I dont use any. :S Just don't download crap you dont trust, and use no-script so that malicious sites can't haxor you with javascript. I have on occasion downloaded the trails and ran them and they found nothing. So I must be doing somethign right. I guess people must be doing really dumb things to get viruses.
  15. Well, my game is actually a web-based, ASP.NET game, so I'm not using XNA. So you can develop sliverlight games from the C# 2008 express IDE? Also Myspace appears to be using Asp and Coldfusion, there search for example say aspx http://browseusers.myspace.com/Browse/Browse.aspx
  16. Well after C there is only Assembly, which actually beyond popular believe, is not binary. If anyone's interested in that check out this site. http://www.masm32.com/ There trying to insult us... I've been checking out the WinAPI myself in my C++ compiler, It is very tedious. Of course writing in console applications doesn't really interest me, so I'm going to straight for the winapi. Yes I'm familiar with the C# 2008 express IDE, How is that game your making work? So it uses xna? I looked and it appears you need xbox or something, But I can't really tell. But its looks like you need pay money for it right?
  17. Looks good. At some point you should use mod_rewrite and create nice urls for the blog posts and the member profiles. I noticed on a profile page, " [iMG]fish.jpg[/img]". You should filter those out from the preview text.
  18. A few reasons: 1. ASP.NET is ridiculously easy for a designer to use. Drag server controls onto the design surface, play with some properties, and voila, you have a site. If my brother - who knows nothing of design, CSS, or even HTML - can create functional pages with it, then someone familiar with Photoshop will be very productive. 2. A lot of companies feel more at ease with having another company they can turn to if things go wrong. Open source is scary to a lot of people, even today. I never really understood that whole visual thing, isn't that dumbing down programmers? Thats why I passed on C#, and rather learning C and C++ in my off time with Dev-C++, I'd rather learn the real Deal and actually understand whats going on. Not have half my code written for me by a visual ide. But you make a good points, I could see Businesses being afraid to use opensource. I've actually noticed some websites that were running PHP gone to ASP. Like NameCheap.com I think was using PHP when I first signed up there, Now I notice its .aspx
  19. PHP will probably be around for the next 30 years along with the other language. Look at Perl, its been around for what 20 years already? People still make websites with that. ALthough its not as popular. I see ASP though taking the spotlight now, but I have no idea why, I dont think any developer worth their spit would actually WANT to use Windows for a server. Why lock yourself into propriety software? The next break threw I would see is language that takes advantage of multi-core CPU's natively, without much effort on the developer's end.
  20. Whats the difference between 1. FTP over SSL implicit 2. FTP Over SSL explicit Are these safe as SFTP? Is the password at any time going over in the clear with the ssl ones? I can't use SFTP becuase the FTP Program I paid for (smartFTP) require me to pay more money for that option. (Great way to treat your customer btw Like how often do I buy software to begin with to have me pay for that extra option.. err)
  21. keldorn

    lol

    function recursion() { print("I heard you like functions so I placed a function inside a function, allowing you to derive while you derive"); recursion(); } recursion(); Okay I'm done.
  22. keldorn

    lol

    Yo Dawgs I heard your down with recursion so I put recursion in yo recursion so you can repeat while you repeat. There this one too. xD [attachment deleted by admin]
  23. keldorn

    lol

    function build_child($oldID) // Recursive function to get all of the children...unlimited depth { global $exclude, $depth; $tempTree = ""; $child_query = mysql_query("SELECT * FROM `categories` WHERE parent='{$oldID}' AND depth <=1") or die(mysql_error()); while( $child = mysql_fetch_array($child_query) ) { if ( $child['id'] != $child['parent'] ){ for ( $c=0;$c<$depth;$c++ ){ $tempTree .= "<li>{$child['name']}"; } $tempTree .= $child['name'] . "</li>\n"; $depth++; /* Greetings, I heard that you like functions, So I have placed this function inside itself, thus allowing you to derive while you derive. */ $tempTree .= build_child($child['id']); $depth--; array_push($exclude, $child['id']); } } return $tempTree; // Return the entire child tree }
  24. Just read that wikipedia article, its makes sense. I think its no brainer. Say you make a forum software and you save the names of the posters in the threads with a hardcoded name, not the ID. So if you want to change your name , it has to modify every single row in the table where your name might appear. It would of been better to save your ID in the row, and match your Id to your name in member table with recursion. Otherwise if you didn't then if you change your name, then previous posts will still have your old name. Thus now you have a Database anomaly. I think Vbulletin made this mistake early on in their design. On some forums they won't allow you to change your name because of the amount of Sql queries it might need to do it. I'm only assuming this by reading this. But he may be full of shit, or maby not, if rigth, then yeah, Vbulletin made a mistake in database design. But the other way it would be simple, you would just have to update one row in the member table of their name and your done. The rest is simple recursion.
  25. Well actually nothing from a video can be convincing, becuase of CG. Question anything you see in a picture or video. If this is indeed real, then you will also have to question anything you see in real life. With this kind of technology it would be possible to even recreate you robbing a store as a survilicance footage then frame you. Imagine in that. But I did look at the other video, it does look more convincing.
×
×
  • 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.