Jump to content
xisto Community

galexcd

Members
  • Content Count

    1,313
  • Joined

  • Last visited

Everything posted by galexcd

  1. Well its been a long time since I've seen or used punnette squares, and I'm sure they are much more complicated than the simple 4 block ones that I learned, but I'll do a basic one for you. So if I recall correctly you have dominant and recessive traits, such as dark hair or blond hair. And lets say dark is dominant. So we'll have this: DD+bb= 100% to be Db Db+Db= 25% to be DD 50% to be Db 25% to be bb Db+bb= 50% to be Db 50% to be bb Correct? (If I'm wrong tell me because it's been a while) Anyway I would suggest an object oriented approach if you are going to be having different plants (or animals) with different traits. So first make the class life. class life{function __construct($dom,$res){//constructors are new in php 5 so don't do this step if you are working with an older version$this->dom=$dom;$this->res=$res;}//Returns a life object when mating this object and the input objectfunction mate($life){switch(rand(0,3)){case 0:return new life($this->dom,$life->dom);case 1:return new life($this->res,$life->dom);case 2:return new life($this->dom,$life->res);case 3:return new life($this->res,$life->res);}}} And that should do it. This code was not tested yet. Post back with any errors you find.
  2. Most of those excerpts (numbers 8 through 10) do the same thing just written in different ways, and they are not completed. It looks like they want you to replace the comment "// process $cats[$i]" with something.
  3. Well yes, if you used this code then you could make that into a function, but you would need to modify the code I gave you to take multiple paramaters for functions like that, not just single ones.
  4. What formulas are those? Sorry I'm not that familiar with finance.
  5. Aww one of the mods moved this thread so my post isn't witty anymore... well for those of you who were curious to what I was rambling on about, he posted it in the php section
  6. Woah... Thats odd... Last time I checked PHP!=HP... But I may be mistaken... I mean they could be equal... and if P was equal to 1 then P*H*P would equal H*P, and therefore using notation without multiplication symbols PHP would actually equal HP... But lets assume that P was equal to 5... Because PHP is in fact NOT equal to HP... And that not being equal would make this thread in the incorrect board... I'd suggest moving it to... oh lets say hardware?But anyway now that I got that out of the way this is very interesting. And I just bought an HP printer -.-What is the source of this article?
  7. Even though its not good programing practice, defining BufferedReader in the try was not causing any error because it was not being referenced at all outside of the block. And as for the infinite loop, that wont happen unless the file is infinitely long which is impossible.
  8. Well I haven't had very much experience with parallels, but what I've heard from some of my co-workers (I work at the apple store) that it stores its drive data in its own format, sort of like virtual PC works, except instead of emulating the operating system like VPC does, it runs natively because of the intel chip. So because of this I doubt there is any way of using parallels from a pre-installed partition of the OS (I MAY BE WRONG!)... Perhaps instead of trying to do this you should be trying to "deactivate" your windows xp copy that you are using on bootcamp. I'm not sure if this is possible. I am not that familiar with windows activation and how it works. Is it possible to deactivate on one machine so you can install it on another machine? If so, that would be what you had to do unless you wanted to buy another copy of windows xp.
  9. I don't think so, it doesn't seem like something that they would do for a joke, but perhaps... But what if the deer got scared and swam out into the ocean and got lost?
  10. I got this email from a friend of mine:
  11. Well I'm not quite sure if sha1() is an sql function but I may be wrong, but it is a php function. And yes sha1 is a good encryption to use for encrypting passwords. It is similar to md5 but the hash is longer.
  12. Did you use the function I wrote? The function doesn't automatically parse it for you, you actually need to call it instead of something like this: echo mysql_result($result,0,"post"); Try this: echo bbReplace(mysql_result($result,0,"post"));
  13. You are getting that error because it is telling you that fin may not be set since your doing that in the try&catch loop, and then you are doing methods of the FileInputStream class with a variable that possibly may be empty. Put your do-while loop and fin.close(); inside the try, or you could try setting fin to an empty file if you want in the two catches, but I'm not sure if that would work or not. Your best bet is to move the do-while loop and your fin.close();
  14. Oops... no. I saw it at the top of the list and assumed the topic was new. Sorry Perhaps next time I should pay better attention to the time stamps
  15. Like coolguy said, closing the topic doesn't mean you got accepted. I'm assuming it was closed because you didn't use the hosting application. Click here and apply, instead of posting a topic with your own content.
  16. Well if your laptop had it it would have either the firewire symbol: or this i1394 symbol next to it: I don't know what you could do about disabling it, but I'm pretty sure that you would notice if somebody plugged a cable into your port of your laptop.
  17. Thats odd... I've never known that before. I've sometimes used ` but usually I use ' and they both seem to run fine on sql. Are you sure about this?
  18. Arghh yess this is why I hate java. They could have bothered to incorporate strings a little bit more than just add it as a class. Sure some of the string methods are useful, but its not the same.
  19. function url($url,$text=""){$url=str_replace(array("<",">"),"",trim($url));if(preg_match("/javascript(\:|\s)/i", $img) || empty($url)) return'<font size=2><i>Error: "'.$url.'" is invalid.</i></font>';if($text=="")$text=$url;return '<a href='.$url.'>'.$text.'</a>';}function bbReplace($string){$string=preg_replace(array('/\[center\](.*?)\[\/center\]/is','/\[right\](.*?)\[\/right\]/is','/\[youtube\](.*?)\[\/youtube\]/is'),array('<center>$1</center>','<div style="align:right;">$1</div>','<object width="425" height="355"><param name="movie" value="http://forums.xisto.com/no_longer_exists/ name="wmode" value="transparent"></param><embed src="http://forums.xisto.com/no_longer_exists/&%2334; type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>'),$string);$string=preg_replace(array('/\[url\=(.*?)\](.*?)\[\/url\]/ie','/\[email\](.*?)\[\/email\]/ie'),array("url('$1','$2')","url('mailto:'.'$1','$1')"),$string);return $string;} So save this in a file or just add this snippet of code to the beginning of the file you want the bb-code parsing to happen. This was written very quickly and haphazardly and was not tested so if you have any problems, just post them here.
  20. Well perhaps you should nominate yourself for the categories that you think you deserve to be in? I apologize that I forgot to put you in my nominations, I'll add you right now in the categories I think you belong in.
  21. For the actual campaign i'd have to go with starcraft, the melee is just better, but for custom maps I love wc3. Dota, pudge wars, uther party. The maps have much more control over the game in warcraft then they do in starcraft so you get truly amazing custom maps.
  22. For those of you who don't know I play warcraft 3, and pudge wars is a custom map in that game that is gaining popularity. You are in a small grassy area separated by a river, and you have to "hook" people to your side and try to kill them. Now I'm not trying to brag here, but I haven't lost a pudge wars game in about 3 months, and thats even 1 versus 5 games, and I don't think that I'm that good at it, its just that I have found the perfect strategy. And I will share that strategy with you now. Now this strategy will only work with version 1.20, 1.19 has a different way hook upgrades work and they screw up this strategy. So before we begin I will give you an overview of the items. Grappling Hook This thing is great if you get into trouble on the enemies side, just remember not to grapple away if you've been hooked by sombody who has level 5 claws, this will most likely kill you if you are low on health. Tiny's Arm This item lets you throw things! There are a few bugs with this item in 1.20 I have found that if you buy it third, you loose your range, so make sure you follow my strategy. Strygwyr's Claws All the good old claws. These are by far the most effective item in the game. Get them early and upgrade them to the max. Level 5 has rupture which makes these these the best items for early and late game. Barathrum's Lantern The lantern adds damage based on your hooks speed. Techies' Explosive Barrel Many players like to start out with this one, and they just place them all around the place to confuse and annoy the enemy. It is not a bad strategy, but it is not this one. I've tried mixing bombs into my strategy and it isn't as effective. It's best to tell one of your teammates to do it. Lycan's Paws These can be useful when combined with claws, but I have found that they don't help as much especially if you want to go with lantern. If you get them for early game, sell them back soon. Earthshaker's Totem This is a new item in 1.20. It allows you to make walls on the battlefield. This can be good for annoying the enemy, but the walls just waste money if you are going for damage. It's another good item for your teammates to get to annoy the enemy. N'aix's Jaws N'aix is a good item, the only reason I don't recommend it is because it is so expensive. It's better to spend your extra gold on strength or Tomes of Power. Ricochet Turbine Another new item in 1.20. Its good if your team has many walls for you to bounce your hook off of, but otherwise it is just a distraction. You get caught up into trying to bounce your hook off the wall so much you miss many great hooking opportunities. [hr=noshade] Alright so now let's get to the strategy. When you first start out, you want to spend all of your upgrade points on your radius and range. If you have one or two left over you can spend a few on damage, but do not get speed yet. Speed will actually hurt your chances of winning at the beginning of the game because you can't run as far making your claws less effective. It doesn't matter as much later because the distance dragged by the claws isn't as much as the amount of damage rupture causes when thrown across the map. As soon as you can afford it, get Claws, and keep buying them again until you get to level 5. Then get tiny's arm up to level 5 as well. Now I would prefer getting grapple before arm to get yourself out of sticky situations, but there seems to be a bug in 1.20 that causes your tiny's arm range to be significantly less if you buy it third. I'm not sure if this happens if you buy it fourth or fifth, but it is just easier to start out with level 5 claws, then get level 5 tiny's arm, and then get 1 level to your grappling hook. The entire time you are getting these Items you want to be upgrading your range and radius. This makes it very difficult for people to avoid your hook. After you have level 5 arm this is what you want to do. Hook somebody no matter how close they are, but it's better if they are farther away. Then when they are about one inch away from you while being reeled in, use your arm and click in the minimap somewhere that is farthest away from your pudge. Doing this when they are about 1-2 inches away makes your character throw them the second they come to you giving them no opportunity to run away. The rupture is in effect when you throw them so this will most likely kill them, but later in the game you might also want to send a hook in the direction you just threw them incase they live. Then finally once you have level 5 claws, arm, and level 1 grapple, start upgrading your hooks speed and work on getting level 5 lantern. The added speed will not only add bonus damage to your lantern, but it will give your enemies no chance of dodging your hook. By this point in the game you do not need to run anymore so speed is a good thing to get. The added damage of lantern is more than the extra damage you get by dragging them across the map. So by this time almost everyone has left because they can't win. You have everything, and the order you bought it let you get a lot of gold to get it early. [/hr] There are a few little tips I have as well. When the other team puts up a lot of walls wait until a lightning power-up comes down the river and grapple to them. Continually grapple to them even if you are right next to them, and also hook anybody who is nearby. Doing this will cause chain lighting to constantly attack it and anybody near them, getting rid of them soon. Also remember if you hook a bomb you can keep yourself from being hurt if you use tiny's arm to throw it right before it reaches you. It won't do any damage to you, but it will use their own bomb against them. So hopefully this simple strategy works for you in your quest to become the best pudge wars player.
  23. Yes, it is a good idea mostly to have them separate, but remember, in my example, you may not want to escape or delete all quote in a post, just ones within certain tags which would have to be done with preg_replace rather than str_replace, or if you were going to program your own bbcode parser that would pass over and recognize your bbcode and then would modify it on the second pass.
  24. I don't think anyone would ever go for this package. I would much prefer shooting for the 280 and never worry about having to post 1.5 times as hard, or about placing ads on my website. 80 extra credits aren't that hard to get if you are dedicated enough. Besides people who work hard enough for this aren't going to want their domain to disappear if the accidently dip below into negatives.
  25. Also another quick note that I forgot to mention: Using sine for y and cosine for x would make the object move counter-clockwise. If you wanted it to move clockwise, switch x and y.
×
×
  • 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.