<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2" -->
<rss version="2.0">
    <channel>
        <title>Lowyat.NET: Latest topics by soggie</title>
        <description></description>
        <link>http://forum.lowyat.net/</link>
        <lastBuildDate>Wed, 03 Jun 2026 11:06:58 +0800</lastBuildDate>
        <generator>FeedCreator 1.7.2</generator>
        <item>
            <title>A quick Javascript test</title>
            <link>http://forum.lowyat.net/topic/2277672</link>
            <description>&lt;span style='font-size:14pt;line-height:100%'&gt;&lt;span style='color:red'&gt;NOTE: CODE SAMPLE IS NOT PRODUCTION QUALITY CODE. IT IS USED TO HIGHLIGHT JS CONCEPTS.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hi guys, I&amp;#39;m preparing for my OSDC.tw presentation and I want to do a quick experiment of the general understanding of Javascript of our LYN codemansters here.&lt;br /&gt;&lt;br /&gt;Here&amp;#39;s how it works. Below is a code sample, and wrapped in the spoiler tag is the answer. Feel free to answer the question in a reply, but &lt;b&gt;WRAP YOUR ANSWER IN A SPOILER TAG&amp;#33;&lt;/b&gt; so that other posters won&amp;#39;t be influenced by your answer.&lt;br /&gt;&lt;br /&gt;I hope to keep this thread a running thread so that I can get a better idea of the concepts in javascript that confuses people.&lt;br /&gt;&lt;br /&gt;----------------------&lt;br /&gt;&lt;br /&gt;Here&amp;#39;s the first question (very simple one):&lt;br /&gt;&lt;br /&gt;Without using a compiler of any kind, or testing this piece of code out, tell me the value of &lt;b&gt;A&lt;/b&gt; and &lt;b&gt;B&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;&lt;br /&gt;var a, b, arr;&lt;br /&gt;&lt;br /&gt;arr = &amp;#91;1, 2, 3&amp;#93;;&lt;br /&gt;a = &amp;#39;I am A&amp;#39;;&lt;br /&gt;b = &amp;#39;I am B&amp;#39;;&lt;br /&gt;&lt;br /&gt;for &amp;#40;var i in arr&amp;#41; {&lt;br /&gt;  var a = arr&amp;#91;i&amp;#93;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;arr.forEach&amp;#40;function &amp;#40;value, index&amp;#41; {&lt;br /&gt;    var b = value;&lt;br /&gt;}&amp;#41;;&lt;br /&gt;&lt;br /&gt;console.log&amp;#40;a&amp;#41;;&lt;br /&gt;console.log&amp;#40;b&amp;#41;;&lt;br /&gt;&lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;br /&gt;&lt;br /&gt;&lt;!--SPOILER BEGIN--&gt;&lt;div class=&quot;spoilertop&quot; onClick=&quot;openClose('3e27f1c80ccd5a4a02b88bceae84c870')&quot; style=&quot;font-weight: bold&quot;&gt;&lt;u&gt;&amp;raquo; Click to show Spoiler - click again to hide... &amp;laquo;&lt;/u&gt;&lt;/div&gt;&lt;div class=&quot;spoilermain&quot; id=&quot;3e27f1c80ccd5a4a02b88bceae84c870&quot; style=&quot;display:none&quot;&gt;&lt;!--SPOILER END--&gt;&lt;br /&gt;a = 3&lt;br /&gt;b = &amp;#39;I am B&amp;#39;&lt;br /&gt;&lt;br /&gt;This question is a rather simple test on the understanding of scope. Javascript, unlike C or Java, scopes by functions, not blocks. This is why even when a is redeclared in the for...in loop, the value still bubbles up to the a variable outside the loop (read up on javascript closures). But in the forEach() function, when b is redeclared and assigned the value of the array element, it does not affect the b variable on the main level. Hence the answers where a&amp;#39;s value is mutated while b&amp;#39;s value stays the same.&lt;br /&gt;&lt;!--SPOILER DIV--&gt;&lt;/div&gt;&lt;!--SPOILER DIV--&gt;</description>
            <author>soggie</author>
            <category>Codemasters</category>
            <pubDate>Fri, 23 Mar 2012 11:42:35 +0800</pubDate>
        </item>
        <item>
            <title>NodeHack #2</title>
            <link>http://forum.lowyat.net/topic/1967813</link>
            <description>NodeHack #2 is coming....&lt;br /&gt;&lt;br /&gt;&lt;a href='https://www.facebook.com/event.php?eid=223561841014787' target='_blank'&gt;https://www.facebook.com/event.php?eid=223561841014787&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Time : 9am - 9pm&lt;br /&gt;Date : 6th August 2011 (Saturday)&lt;br /&gt;Venue : Mindvalley HQ, Menara UOA Bangsar&lt;br /&gt;&lt;br /&gt;In case of those who don&amp;#39;t know, NodeJS is one of the rising stars in the web development world, which allows you to write Javascript on the server side. It&amp;#39;s powered by Google&amp;#39;s super-fast V8, comforms to the open standards common.js, and kicks ass 7 ways to sunday with its async model.&lt;br /&gt;&lt;br /&gt;Come join us... learn how to code in NodeJS, setup on your machine (good news for windows users), and hack away&amp;#33;</description>
            <author>soggie</author>
            <category>Codemasters</category>
            <pubDate>Fri, 22 Jul 2011 10:45:28 +0800</pubDate>
        </item>
        <item>
            <title>NodeHack - a NodeJS hackfest/workshop</title>
            <link>http://forum.lowyat.net/topic/1880245</link>
            <description>Hi guys, my company &lt;a href='http://40square.com' target='_blank'&gt;40 Square Software&lt;/a&gt; is organizing &lt;a href='http://nodehack.40square.com' target='_blank'&gt;NodeHack&lt;/a&gt; on the 21st of May 2011, in Menara UOA Bangsar. Basically, it&amp;#39;s an event where we come together (no pun intended) and learn some server-side javascript, and hack out a nice little app to demonstrate the power of NodeJS.&lt;br /&gt;&lt;br /&gt;If you join in this workshop, I guaranty that you won&amp;#39;t leave empty handed. Heck, at least lunch is provided &lt;!--emo&amp;:P--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/tongue.gif' border='0' style='vertical-align:middle' alt='tongue.gif' /&gt;&lt;!--endemo--&gt;&lt;br /&gt;&lt;br /&gt;I&amp;#39;m speaking on the issue of &lt;b&gt;Moving from PHP to NodeJS&lt;/b&gt;, which will touch on the common caveats when transitioning from PHP to NodeJS. At the same time, we&amp;#39;ll be holding a recruitment drive for Javascript and PHP Ninjas in that event too, so please come and have some SSJS fun&amp;#33;  &lt;!--emo&amp;:thumbs:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/thumbup.gif' border='0' style='vertical-align:middle' alt='thumbup.gif' /&gt;&lt;!--endemo--&gt; &lt;br /&gt;&lt;br /&gt;Check out the &lt;a href='http://nodehack.40square.com' target='_blank'&gt;website&lt;/a&gt; for more details.</description>
            <author>soggie</author>
            <category>Codemasters</category>
            <pubDate>Mon, 16 May 2011 18:52:14 +0800</pubDate>
        </item>
        <item>
            <title>What to look for in a kick-ass PHP programmer?</title>
            <link>http://forum.lowyat.net/topic/1684398</link>
            <description>Hi guys, I&amp;#39;m currently helping my boss search for kick ass programmers in PHP.&lt;br /&gt;&lt;br /&gt;We have a metrics of sorts on our hands, which lists these priorities:&lt;br /&gt;&lt;br /&gt;1) Good Application Architectural Sense&lt;br /&gt;2) Understanding of basic design patterns and paradigm (factory, MVC, adapter, etc)&lt;br /&gt;3) Equally good in PHP, HTML 5 and CSS 3&lt;br /&gt;4) Good personality and a team player&lt;br /&gt;&lt;br /&gt;We have a bunch of interview questions, but I&amp;#39;m always the kind that knowing how to write code is just part of the equation. What do you guys think should I ask in interviews? I usually try to talk to the candidate as much as possible, sprinkling in some technical questions here and there, rather than asking the person to spend hours on &amp;quot;test sheets&amp;quot;. Have you guys interviewed people before? Any effective way of weeding out &amp;quot;talk big, code like a donkey&amp;quot; kind of people?</description>
            <author>soggie</author>
            <category>Codemasters</category>
            <pubDate>Mon, 20 Dec 2010 15:55:00 +0800</pubDate>
        </item>
        <item>
            <title>EXTREME Probability Challenge&amp;#33;</title>
            <link>http://forum.lowyat.net/topic/1450441</link>
            <description>Ok, I have an advanced statistics/probability challenge here. From my previous post at the &lt;a href='http://forum.lowyat.net/index.php?showtopic=1447487&amp;st=0&amp;p=34231372&amp;#entry34231372' target='_blank'&gt;Probability Calculation Thread&lt;/a&gt;, I&amp;#39;ve revised the ruleset into something far more complex but easy to calculate at the same time (at least for PnP RPGs).&lt;br /&gt;&lt;br /&gt;Here&amp;#39;s the premise:&lt;br /&gt;&lt;br /&gt;A is trying to perform a task at Y difficulty level. What is the probability of A succeeding?&lt;br /&gt;&lt;br /&gt;Here&amp;#39;re the variables:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SL&lt;/b&gt; = Stat Level, ranges from 1 to 10&lt;br /&gt;&lt;b&gt;SR&lt;/b&gt; = Success Requirements, ranges from 1 to 5&lt;br /&gt;&lt;b&gt;MR&lt;/b&gt; = Modifier Roll, ranges from -3 to 3&lt;br /&gt;&lt;b&gt;MS&lt;/b&gt; = Mastery Substitution, ranges from 0 to 3&lt;br /&gt;&lt;br /&gt;Here&amp;#39;s the ruleset:&lt;br /&gt;&lt;br /&gt;&lt;!--QuoteBegin--&gt;&lt;div class='quotetop'&gt;QUOTE&lt;/div&gt;&lt;div class='quotemain'&gt;&lt;!--QuoteEBegin--&gt;I&amp;#39;m using a dice pool mechanism similar to White Wolf&amp;#39;s Storytelling system, where a player rolls a number of D10 dice (ten-sided dice) and count the number of successes (any result that is more than 5) to determine the level of success.&lt;br /&gt;&lt;br /&gt;Here&amp;#39;s how it works:&lt;br /&gt;&lt;br /&gt;&lt;span style='font-size:14pt;line-height:100%'&gt;&lt;b&gt;Basic Rule&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The initiator of the task first rolls x number of D10, where x is equal to the initiator&amp;#39;s SL. In this case, it is the skill that is related to the task, but for simplicity&amp;#39;s sake let&amp;#39;s just assume that x can be any number between 1 and 10.&lt;br /&gt;&lt;br /&gt;From x, the initiator needs y number of successes where y is equal to the tasks&amp;#39; SR (success requirements) that denotes HOW MANY results above 5 that the initiator needs to roll for.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;SL = 5, SR = 3&lt;br /&gt;&lt;br /&gt;This would mean the initiator needs to roll 5 D10 dice and out of the 5, at least 3 of them must display the value of 6 or higher in order to count as a success.&lt;br /&gt;&lt;br /&gt;SL = 2, SR = 3&lt;br /&gt;&lt;br /&gt;Now from the above variables, it can be assumed that the initiator has 0% of succeeding, because SL is less than SR and there is no way to fulfill the success requirements with a smaller dice pool. This is where the concept &lt;b&gt;Exploding Dice&lt;/b&gt; comes in.&lt;br /&gt;&lt;br /&gt;&lt;span style='font-size:12pt;line-height:100%'&gt;&lt;b&gt;Exploding Dice&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Whenever the initiator rolls a 10 on a D10 dice, the initiator gets an &lt;b&gt;extra roll&lt;/b&gt;. Meaning, on the previous example, if he rolls a 3 on the first roll and then a 10 on the second roll, he gets a third roll. If he manages another 10 on the third roll, he gets a forth roll. This goes on until he rolls a non-10 result.&lt;br /&gt;&lt;br /&gt;&lt;span style='font-size:14pt;line-height:100%'&gt;&lt;b&gt;Modifier Pool Rule&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After rolling the &lt;b&gt;initial dice pool&lt;/b&gt;, the initiator now need to roll the modifier pool. Modifiers go from -3 to +3, and here&amp;#39;s how it works. If the modifier is a negative number, it is called the &lt;b&gt;penalty modifier pool[&lt;!--emo&amp;B]--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/cool.gif' border='0' style='vertical-align:middle' alt='cool.gif' /&gt;&lt;!--endemo--&gt;. If it is a positive number, it is called the [b]bonus modifier pool&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;The initiator needs to roll z number of D6s where z is equal to the modifier number (ignore the positive/negative sign). For example, on a -3 mod, the player needs to roll 3 D6 dice. On a +2 mod, the player needs to roll 2 D6 dice. This is called the &lt;b&gt;modifier pool&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style='font-size:12pt;line-height:100%'&gt;&lt;b&gt;Bonus Modifier Pool&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For the bonus modifier pool, &lt;b&gt;take the highest result and add it to the lowest score in the initial dice pool&lt;/b&gt;. For example:&lt;br /&gt;&lt;br /&gt;I roll 4 D10 for the initial dice pool and end up with:&lt;br /&gt;&lt;br /&gt;2, 5, 3, 8&lt;br /&gt;&lt;br /&gt;I roll 2 D6 for the bonus modifier pool and end up with:&lt;br /&gt;&lt;br /&gt;3, 4&lt;br /&gt;&lt;br /&gt;Thus, from my modifier pool, 4 (the highest) is added to the initial dice pool&amp;#39;s 2 (the lowest), while 3 is added to 3:&lt;br /&gt;&lt;br /&gt;&lt;span style='color:red'&gt;2 + 4&lt;/span&gt;, 5, &lt;span style='color:red'&gt;3 + 3&lt;/span&gt;, 8 ending up with:&lt;br /&gt;6, 5, 6, 8&lt;br /&gt;&lt;br /&gt;&lt;span style='font-size:12pt;line-height:100%'&gt;&lt;b&gt;Penalty Modifier Pool&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For the penalty modifier pool, &lt;b&gt;take the highest result and subtract it from the highest score in the initial dice pool&lt;/b&gt;. Example:&lt;br /&gt;&lt;br /&gt;I roll 4 D10 for the initial dice pool:&lt;br /&gt;&lt;br /&gt;2, 5, 3, 8&lt;br /&gt;&lt;br /&gt;I roll 2 D6 for the penalty modifier pool:&lt;br /&gt;&lt;br /&gt;3, 4&lt;br /&gt;&lt;br /&gt;Thus from the mod pool, 4 is subtracted from 8 and 3 is subtracted from 5:&lt;br /&gt;&lt;br /&gt;2, &lt;span style='color:red'&gt;5 - 3&lt;/span&gt;, 3, &lt;span style='color:red'&gt;8 - 4&lt;/span&gt; ending up with:&lt;br /&gt;&lt;br /&gt;2, 2, 3, 4&lt;br /&gt;&lt;br /&gt;&lt;span style='font-size:14pt;line-height:100%'&gt;&lt;b&gt;Mastery Substitution Rolls&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hang in there, we&amp;#39;re in the last part of the ruleset&amp;#33; &lt;!--emo&amp;:D--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /&gt;&lt;!--endemo--&gt; Anyway, the final component is called the &lt;b&gt;Mastery Substitution Pool&lt;/b&gt;. How it works is simple.&lt;br /&gt;&lt;br /&gt;The initiator rolls z D10s where z is equal to ( 2 x mastery levels ). So if ML = 2, the initiator will roll 4 D10s. If ML = 3, the initiator will roll 6 D10s.&lt;br /&gt;&lt;br /&gt;The pool that results is called a &lt;b&gt;mastery substitution pool&lt;/b&gt;, and the &lt;b&gt;highest&lt;/b&gt; score in the pool is substituted with the &lt;b&gt;lowest&lt;/b&gt; score in the initial dice pool. The substitution only happens if the score in the substitution pool is &lt;b&gt;higher&lt;/b&gt; than the score to be replaced in the initial dice pool.&lt;br /&gt;&lt;br /&gt;For example, the initiator has 2 mastery levels, and thus rolls 4 D10s:&lt;br /&gt;&lt;br /&gt;4, 4, 6, 5&lt;br /&gt;&lt;br /&gt;Applying this to the previous initial dice pool of 2, 2, 3, 4:&lt;br /&gt;&lt;br /&gt;&lt;span style='color:blue'&gt;2 (6)&lt;/span&gt;, &lt;span style='color:blue'&gt;2 (5)&lt;/span&gt;, &lt;span style='color:blue'&gt;3 (4)&lt;/span&gt;, 4 ending up with:&lt;br /&gt;&lt;br /&gt;6, 5, 3, 4&lt;br /&gt;&lt;br /&gt;&lt;span style='font-size:14pt;line-height:100%'&gt;&lt;b&gt;Calculating Success&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Finally, from the final dice pool after the mod pool and sub pool changes, the initiator &lt;b&gt;discards&lt;/b&gt; all dice score lower than 6. If the number of remaining dice is equal to or greater than the success requirements (which range from 1 to 5), then the task had been considered successful.&lt;br /&gt;&lt;!--QuoteEnd--&gt;&lt;/div&gt;&lt;!--QuoteEEnd--&gt;&lt;br /&gt;&lt;br /&gt;Phew, that&amp;#39;s a lot right? Here&amp;#39;s the summarized version:&lt;br /&gt;&lt;br /&gt;&lt;!--QuoteBegin--&gt;&lt;div class='quotetop'&gt;QUOTE&lt;/div&gt;&lt;div class='quotemain'&gt;&lt;!--QuoteEBegin--&gt;&lt;ol type='1'&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Roll x D10 where x = stat level. If get a score of 10 on any roll, get an extra roll.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Roll y D6 where y = mod level&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; If Mod level is a negative number, subtract the &lt;b&gt;highest&lt;/b&gt; in the mod pool from the &lt;b&gt;highest&lt;/b&gt; in the initial pool. Repeat for all scores in the mod pool&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; If Mod level is a positive number, add the &lt;b&gt;highest&lt;/b&gt; in the mod pool to the &lt;b&gt;lowest&lt;/b&gt; in the initial pool. Repeat for all scores in the mod pool&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Roll z D10 where z = mastery level x 2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Substitute the &lt;b&gt;highest&lt;/b&gt; of the sub pool with the &lt;b&gt;lowest&lt;/b&gt; of the initial pool if the score in the sub pool is higher&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Discard all scores less than 6 and count the number of dice left&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; If dice left is more than SR, task is successful. Failed if otherwise.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;!--QuoteEnd--&gt;&lt;/div&gt;&lt;!--QuoteEEnd--&gt;&lt;br /&gt;&lt;br /&gt;To make it even easier, Here&amp;#39;s the code:&lt;br /&gt;&lt;!--SPOILER BEGIN--&gt;&lt;div class=&quot;spoilertop&quot; onClick=&quot;openClose('810d24d7c3e1728e55f31ac7011fd9f4')&quot; style=&quot;font-weight: bold&quot;&gt;&lt;u&gt;&amp;raquo; Click to show Spoiler - click again to hide... &amp;laquo;&lt;/u&gt;&lt;/div&gt;&lt;div class=&quot;spoilermain&quot; id=&quot;810d24d7c3e1728e55f31ac7011fd9f4&quot; style=&quot;display:none&quot;&gt;&lt;!--SPOILER END--&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;&amp;#60;?php&lt;br /&gt;//&amp;#036;a = 10000;&lt;br /&gt;&amp;#036;a = 500; &amp;nbsp; &amp;nbsp; &amp;nbsp; // number of iterations in the brute force. Higher will give better averages&lt;br /&gt;&amp;#036;minSL = 1; &amp;nbsp; &amp;nbsp; // minimum stat level&lt;br /&gt;&amp;#036;maxSL = 10; &amp;nbsp; &amp;nbsp;// maximum stat level&lt;br /&gt;&amp;#036;minSR = 1; &amp;nbsp; &amp;nbsp; // minimum success requirement&lt;br /&gt;&amp;#036;maxSR = 5; &amp;nbsp; &amp;nbsp; // maximum success requirement&lt;br /&gt;&amp;#036;d = 0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// difficulty level. Range from -3 to 3.&lt;br /&gt;&amp;#036;mastery = 0; &amp;nbsp; // mastery level. Range from 0 to 3.&lt;br /&gt;&lt;br /&gt;function diceRoll&amp;#40; &amp;#036;times = 1, &amp;#036;sides = 6 &amp;#41;&lt;br /&gt;{&lt;br /&gt; &amp;nbsp;&amp;#036;total = 0;&lt;br /&gt;&lt;br /&gt; &amp;nbsp;for&amp;#40; &amp;#036;i = 1; &amp;#036;i &amp;#60;= &amp;#036;times; &amp;#036;i++ &amp;#41;&lt;br /&gt; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp;&amp;#036;total += mt_rand&amp;#40; 1, &amp;#036;sides &amp;#41;;&lt;br /&gt; &amp;nbsp;}&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;return &amp;#036;total;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function stenSystem&amp;#40; &amp;#036;stat_level, &amp;#036;dl, &amp;#036;mr = -3, &amp;#036;mastery_level = 0 &amp;#41;&lt;br /&gt;{&lt;br /&gt; &amp;nbsp;// STEN is supposed to refer to the D6 and D10 system, which is a watered down RPG mechanic building&lt;br /&gt; &amp;nbsp;// on top of the storytelling system. The system uses D10 as basic resolution dice and D6 as modifier&lt;br /&gt; &amp;nbsp;// dice. Notation in the game is as follows&amp;#58; xD for number of D10 to roll, and xM for number of D6 to&lt;br /&gt; &amp;nbsp;// roll. Note that xM must be prefixed with a positive or negative sign to signify the nature of the&lt;br /&gt; &amp;nbsp;// modifier - as a bonus or penalty.&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;// SL = stat level&lt;br /&gt; &amp;nbsp;// DL = difficulty level&lt;br /&gt; &amp;nbsp;// MR = mod roll&lt;br /&gt; &amp;nbsp;// MRR = mastery re-reroll&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;/*&lt;br /&gt; &amp;nbsp;Difficulty level in unopposed checks refer to the complexity of the task at hand&amp;#58;&lt;br /&gt; &amp;nbsp;1 - simple&lt;br /&gt; &amp;nbsp;2 - challenging&lt;br /&gt; &amp;nbsp;3 - difficult&lt;br /&gt; &amp;nbsp;4 - very difficult&lt;br /&gt; &amp;nbsp;5 - impossible&lt;br /&gt;&lt;br /&gt; &amp;nbsp;In an opposed check, it refers to the opponent&amp;#39;s stat / 2&amp;#58;&lt;br /&gt; &amp;nbsp;1 - 1-2&lt;br /&gt; &amp;nbsp;2 - 3-4&lt;br /&gt; &amp;nbsp;3 - 5-6&lt;br /&gt; &amp;nbsp;4 - 7-8&lt;br /&gt; &amp;nbsp;5 - 9-10&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;Alternatively we can use the difference between the initiator and the opposer&amp;#39;s stats&lt;br /&gt; &amp;nbsp;1 - -9 to -6&lt;br /&gt; &amp;nbsp;2 - -5 to -2&lt;br /&gt; &amp;nbsp;3 - -1 to 2&lt;br /&gt; &amp;nbsp;4 - 3 to 6&lt;br /&gt; &amp;nbsp;5 - 7 to 9&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;A tries to arm wrestle with B&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;A has 1 strength, is a novice to arm wrestling&lt;br /&gt; &amp;nbsp;B has 10 strength, is an arm wrestling champion&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;A&amp;#58; SL&amp;#40;1&amp;#41;, DL&amp;#40;5&amp;#41;, MR&amp;#40;-3&amp;#41;, MRR&amp;#40;0&amp;#41;&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;DL is 5 because B has 10 strength, and MR is -3 because A is a novice to arm wrestling while&lt;br /&gt; &amp;nbsp;B is a champion.&lt;br /&gt; &amp;nbsp;*/&lt;br /&gt;&lt;br /&gt; &amp;nbsp;&amp;#036;pool = array&amp;#40; &amp;#41;;&lt;br /&gt; &amp;nbsp;&amp;#036;mod_pool = array&amp;#40; &amp;#41;;&lt;br /&gt; &amp;nbsp;&amp;#036;sub_pool = array&amp;#40; &amp;#41;;&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;// Roll the initial pool&lt;br /&gt; &amp;nbsp;for&amp;#40; &amp;#036;i = 0; &amp;#036;i &amp;#60; &amp;#036;stat_level; &amp;#036;i++ &amp;#41;&lt;br /&gt; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp;&amp;#036;pool&amp;#91;&amp;#036;i&amp;#93; = diceRoll&amp;#40; 1, 10 &amp;#41;;&lt;br /&gt; &amp;nbsp; &amp;nbsp;&lt;br /&gt; &amp;nbsp; &amp;nbsp;// Re-roll if you get a 10&lt;br /&gt; &amp;nbsp; &amp;nbsp;if &amp;#40; &amp;#036;pool&amp;#91;&amp;#036;i&amp;#93; == 10 &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#036;stat_level++;&lt;br /&gt; &amp;nbsp; &amp;nbsp;}&lt;br /&gt; &amp;nbsp;}&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;// Sort the array&lt;br /&gt; &amp;nbsp;sort&amp;#40; &amp;#036;pool &amp;#41;;&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;// Roll the modifiers&lt;br /&gt; &amp;nbsp;&amp;#036;type = &amp;#40; &amp;#036;mr &amp;#62;= 0 &amp;#41; ? &amp;#39;bonus&amp;#39; &amp;#58; &amp;#39;penalty&amp;#39;;&lt;br /&gt; &amp;nbsp;for&amp;#40; &amp;#036;m = 0; &amp;#036;m &amp;#60; abs&amp;#40; &amp;#036;mr &amp;#41;; &amp;#036;m++ &amp;#41;&lt;br /&gt; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp;&amp;#036;mod_pool&amp;#91;&amp;#036;m&amp;#93; = diceRoll&amp;#40; 1, 6 &amp;#41;;&lt;br /&gt; &amp;nbsp;}&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;if &amp;#40; count&amp;#40; &amp;#036;mod_pool &amp;#41; &amp;#62; 0 &amp;#41;&lt;br /&gt; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp;// Sort the mod pool with highest first&lt;br /&gt; &amp;nbsp; &amp;nbsp;rsort&amp;#40; &amp;#036;mod_pool &amp;#41;;&lt;br /&gt; &amp;nbsp; &amp;nbsp;&lt;br /&gt; &amp;nbsp; &amp;nbsp;// Apply the modifier&lt;br /&gt; &amp;nbsp; &amp;nbsp;if &amp;#40; &amp;#036;type == &amp;#39;bonus&amp;#39; &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;// If its a bonus, add the highest to the lowest&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;for &amp;#40; &amp;#036;a = 0; &amp;#036;a &amp;#60; count&amp;#40; &amp;#036;mod_pool &amp;#41;; &amp;#036;a++ &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if&amp;#40; &amp;#036;a &amp;#60; count&amp;#40; &amp;#036;pool &amp;#41; &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#036;pool&amp;#91;&amp;#036;a&amp;#93; += &amp;#036;mod_pool&amp;#91;&amp;#036;a&amp;#93;;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Do not let it go above 10&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if &amp;#40; &amp;#036;pool&amp;#91;&amp;#036;a&amp;#93; &amp;#62; 10 &amp;#41; &amp;#036;pool&amp;#91;&amp;#036;a&amp;#93; = 10;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt; &amp;nbsp; &amp;nbsp;}&lt;br /&gt; &amp;nbsp; &amp;nbsp;else&lt;br /&gt; &amp;nbsp; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;// If its a penalty, subtract the highest from the highest &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;for&amp;#40; &amp;#036;a = 0; &amp;#036;a &amp;#60; count&amp;#40; &amp;#036;mod_pool &amp;#41;; &amp;#036;a++ &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if &amp;#40; &amp;#036;a &amp;#60; count&amp;#40; &amp;#036;pool &amp;#41; &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#036;mod_index = count&amp;#40; &amp;#036;pool &amp;#41; - &amp;#036;a - 1;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#036;pool_roll = &amp;#036;pool&amp;#91;&amp;#036;mod_index&amp;#93;;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#036;pool_roll -= &amp;#036;mod_pool&amp;#91;&amp;#036;a&amp;#93;;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Do not let it fall below 1&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if &amp;#40; &amp;#036;pool_roll &amp;#60; 1 &amp;#41; &amp;#036;pool&amp;#91;&amp;#036;mod_index&amp;#93; = 1;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else &amp;#036;pool&amp;#91;&amp;#036;mod_index&amp;#93; = &amp;#036;pool_roll;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt; &amp;nbsp; &amp;nbsp;}&lt;br /&gt; &amp;nbsp;}&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;// Apply the mastery re-rolls&lt;br /&gt; &amp;nbsp;for &amp;#40; &amp;#036;ma = 0; &amp;#036;ma &amp;#60; &amp;#036;mastery_level * 2; &amp;#036;ma++ &amp;#41;&lt;br /&gt; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp;&amp;#036;sub_pool&amp;#91;&amp;#036;ma&amp;#93; = diceRoll&amp;#40; 1, 10 &amp;#41;;&lt;br /&gt; &amp;nbsp;}&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;// Sort the mastery levels from highest to lowest&lt;br /&gt; &amp;nbsp;rsort&amp;#40; &amp;#036;sub_pool &amp;#41;;&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;// Apply the substitution&lt;br /&gt; &amp;nbsp;for &amp;#40; &amp;#036;p = 0; &amp;#036;p &amp;#60; count&amp;#40; &amp;#036;sub_pool &amp;#41;; &amp;#036;p++ &amp;#41;&lt;br /&gt; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp;if &amp;#40; &amp;#036;sub_pool&amp;#91;&amp;#036;p&amp;#93; &amp;#62; &amp;#036;pool&amp;#91;&amp;#036;p&amp;#93; &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#036;pool&amp;#91;&amp;#036;p&amp;#93; = &amp;#036;sub_pool&amp;#91;&amp;#036;p&amp;#93;;&lt;br /&gt; &amp;nbsp; &amp;nbsp;}&lt;br /&gt; &amp;nbsp;}&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;&amp;#036;successes = 0;&lt;br /&gt; &amp;nbsp;// Count successes&lt;br /&gt; &amp;nbsp;for &amp;#40; &amp;#036;i = 0; &amp;#036;i &amp;#60; count&amp;#40; &amp;#036;pool &amp;#41;; &amp;#036;i++ &amp;#41;&lt;br /&gt; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp;if &amp;#40; &amp;#036;pool&amp;#91;&amp;#036;i&amp;#93; &amp;#62;= 6 &amp;#41; &amp;#036;successes++;&lt;br /&gt; &amp;nbsp;}&lt;br /&gt;&lt;br /&gt; &amp;nbsp;if &amp;#40; &amp;#036;successes &amp;#62;= &amp;#036;dl &amp;#41; return TRUE;&lt;br /&gt; &amp;nbsp;return FALSE;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Brute force method to find the probability % of each roll&lt;br /&gt;function bruteForce&amp;#40; &amp;#036;attempts = 100 &amp;#41;&lt;br /&gt;{&lt;br /&gt; &amp;nbsp;global &amp;#036;minSL, &amp;#036;maxSL, &amp;#036;minSR, &amp;#036;maxSR, &amp;#036;d, &amp;#036;mastery;&lt;br /&gt;&lt;br /&gt; &amp;nbsp;&amp;#036;brute = array&amp;#40; &amp;#41;;&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;&amp;#036;x = 0;&lt;br /&gt; &amp;nbsp;&amp;#036;y = 0;&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;for&amp;#40; &amp;#036;sl = &amp;#036;minSL, &amp;#036;y = 0; &amp;#036;sl &amp;#60;= &amp;#036;maxSL; &amp;#036;sl++, &amp;#036;y++ &amp;#41;&lt;br /&gt; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp;&amp;#036;brute&amp;#91;&amp;#036;y&amp;#93; = array&amp;#40; &amp;#41;;&lt;br /&gt; &amp;nbsp; &amp;nbsp;&lt;br /&gt; &amp;nbsp; &amp;nbsp;for&amp;#40; &amp;#036;sr = &amp;#036;minSR, &amp;#036;x = 0; &amp;#036;sr &amp;#60;= &amp;#036;maxSR; &amp;#036;sr++, &amp;#036;x++ &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#036;result = 0;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;for&amp;#40; &amp;#036;a = 0; &amp;#036;a &amp;#60; &amp;#036;attempts; &amp;#036;a++ &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#036;result += stenSystem&amp;#40; &amp;#036;sl, &amp;#036;sr, &amp;#036;d, &amp;#036;mastery &amp;#41;;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#036;result = round&amp;#40; &amp;#036;result / &amp;#036;attempts * 100 &amp;#41;;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#036;brute&amp;#91;&amp;#036;y&amp;#93;&amp;#91;&amp;#036;x&amp;#93; = &amp;#036;result;&lt;br /&gt; &amp;nbsp; &amp;nbsp;}&lt;br /&gt; &amp;nbsp;}&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;return &amp;#036;brute;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function renderBruteForce&amp;#40; &amp;#41;&lt;br /&gt;{&lt;br /&gt; &amp;nbsp;global &amp;#036;minSL, &amp;#036;maxSL, &amp;#036;minSR, &amp;#036;maxSR, &amp;#036;a;&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;&amp;#036;brute = bruteForce&amp;#40; &amp;#036;a &amp;#41;;&lt;br /&gt;&lt;br /&gt; &amp;nbsp;echo &amp;#39;&amp;#60;style&amp;#62;td { border&amp;#58; 1px solid #ccc; }&amp;#60;/style&amp;#62;&amp;#39;;&lt;br /&gt; &amp;nbsp;echo &amp;#39;&amp;#60;table style=&amp;#34;font-family&amp;#58; Courier New; font-size&amp;#58; 0.85em&amp;#34;&amp;#62;&amp;#60;thead&amp;#62;&amp;#60;tr&amp;#62;&amp;#39;;&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;echo &amp;#39;&amp;#60;td&amp;#62;Skill Level &amp;#092; Difficulty&amp;#60;/td&amp;#62;&amp;#39;;&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;for&amp;#40; &amp;#036;sr = &amp;#036;minSR; &amp;#036;sr &amp;#60;= &amp;#036;maxSR; &amp;#036;sr++ &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp;echo &amp;#39;&amp;#60;td style=&amp;#34;width&amp;#58; 50px; text-align&amp;#58; right&amp;#34;&amp;#62;&amp;#39; . &amp;#036;sr . &amp;#39;&amp;#60;/td&amp;#62;&amp;#39;;&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;echo &amp;#39;&amp;#60;/tr&amp;#62;&amp;#60;/thead&amp;#62;&amp;#39;;&lt;br /&gt; &amp;nbsp;&lt;br /&gt; &amp;nbsp;echo &amp;#39;&amp;#60;tbody&amp;#62;&amp;#39;;&lt;br /&gt; &amp;nbsp;for &amp;#40; &amp;#036;sl = 0; &amp;#036;sl &amp;#60; count&amp;#40; &amp;#036;brute &amp;#41;; &amp;#036;sl++ &amp;#41;&lt;br /&gt; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp;echo &amp;#39;&amp;#60;tr&amp;#62;&amp;#39;;&lt;br /&gt; &amp;nbsp; &amp;nbsp;echo &amp;#39;&amp;#60;td&amp;#62;&amp;#39; . &amp;#40; &amp;#036;sl + 1 &amp;#41; . &amp;#39;&amp;#60;/td&amp;#62;&amp;#39;;&lt;br /&gt; &amp;nbsp; &amp;nbsp;&lt;br /&gt; &amp;nbsp; &amp;nbsp;for &amp;#40; &amp;#036;sr = 0; &amp;#036;sr &amp;#60; count&amp;#40; &amp;#036;brute&amp;#91;&amp;#036;sl&amp;#93; &amp;#41;; &amp;#036;sr++ &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;echo &amp;#39;&amp;#60;td style=&amp;#34;text-align&amp;#58; right&amp;#34;&amp;#62;&amp;#39; . &amp;#036;brute&amp;#91;&amp;#036;sl&amp;#93;&amp;#91;&amp;#036;sr&amp;#93; . &amp;#39;&amp;#60;/td&amp;#62;&amp;#39;;&lt;br /&gt; &amp;nbsp; &amp;nbsp;}&lt;br /&gt; &amp;nbsp; &amp;nbsp;echo &amp;#39;&amp;#60;/tr&amp;#62;&amp;#39;;&lt;br /&gt; &amp;nbsp;}&lt;br /&gt; &amp;nbsp;echo &amp;#39;&amp;#60;/tbody&amp;#62;&amp;#39;;&lt;br /&gt; &amp;nbsp;echo &amp;#39;&amp;#60;/table&amp;#62;&amp;#39;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;renderBruteForce&amp;#40; &amp;#41;;&lt;br /&gt;&lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;!--SPOILER DIV--&gt;&lt;/div&gt;&lt;!--SPOILER DIV--&gt;&lt;br /&gt;&lt;br /&gt;Run the PHP code and adjust the &amp;#036;d and &amp;#036;mastery to get the different probability distribution tables. Use that as a reference for your formula.&lt;br /&gt;&lt;br /&gt;&lt;span style='color:red'&gt;&lt;span style='font-size:16pt;line-height:100%'&gt;The deliverable&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here&amp;#39;s the part where I tell you what I want. I want a &lt;b&gt;Mathematical Formula&lt;/b&gt; with the following variables:&lt;br /&gt;&lt;br /&gt;SL = stat level (1 to 10)&lt;br /&gt;SR = success requirements (1 to 5)&lt;br /&gt;MR = modifier (-3 to +3)&lt;br /&gt;MS = mastery level (0 to 3)&lt;br /&gt;&lt;br /&gt;where I can substitute each variable with a number within the range stated respectively, and it will calculate a % of probability of succeeding in that task. Like,&lt;br /&gt;&lt;br /&gt;SL = 6&lt;br /&gt;SR = 3&lt;br /&gt;MR = -3&lt;br /&gt;MS = 1&lt;br /&gt;&lt;br /&gt;Result = 46%&lt;br /&gt;&lt;br /&gt;&lt;b&gt;POST YOUR FORMULA HERE&lt;/b&gt;. Don&amp;#39;t worry to share. Don&amp;#39;t worry to improve upon the previous person&amp;#39;s formula, or correct it if you think it&amp;#39;s wrong.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ll collect the algorithms and run a test to see which one is the most [a]accurate[/b] and &lt;b&gt;optimized&lt;/b&gt; and the prize will be given out to the winner based on that two criteria.&lt;br /&gt;&lt;br /&gt;&lt;span style='color:red'&gt;&lt;span style='font-size:16pt;line-height:100%'&gt;THE PRIZE&amp;#33;&amp;#33;&amp;#33;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, the prize. First, you get a good slap on the shoulder for being a super math wiz. And that&amp;#39;s all.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m kidding.&lt;br /&gt;&lt;br /&gt;For the winner, you&amp;#39;ll get:&lt;br /&gt;&lt;br /&gt;&lt;span style='color:red'&gt;&lt;ul&gt;&lt;li&gt; A 100% cotten premium quality, limited edition Genesis Culture T-shirt [&lt;a href='http://www.genesisculture.com/v2/files/dreamwalker-gc-1101.jpg' target='_blank'&gt;design1&lt;/a&gt;][&lt;a href='http://www.genesisculture.com/v2/files/dreamwalker-gc-1105.jpg' target='_blank'&gt;design2&lt;/a&gt;][&lt;a href='http://www.genesisculture.com/v2/files/dreamwalker-gc-1103.jpg' target='_blank'&gt;design3&lt;/a&gt;]&lt;/li&gt;&lt;li&gt; A discount voucher to &lt;b&gt;Modestarr&lt;/b&gt;, a new and upcoming fashion boutique in bangsar&lt;/li&gt;&lt;li&gt; ORIGINAL COPIES of Final Fantasy: Crisis Core and Patapon 1 for PSP (bought in US)&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So what are you waiting for? Fire away&amp;#33; &lt;!--emo&amp;:D--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /&gt;&lt;!--endemo--&gt; &lt;!--emo&amp;:D--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /&gt;&lt;!--endemo--&gt; &lt;!--emo&amp;:D--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /&gt;&lt;!--endemo--&gt;</description>
            <author>soggie</author>
            <category>Codemasters</category>
            <pubDate>Tue, 08 Jun 2010 12:30:06 +0800</pubDate>
        </item>
        <item>
            <title>Complex Probability Calculation</title>
            <link>http://forum.lowyat.net/topic/1447487</link>
            <description>Help, I have trouble figuring out how to convert this ruleset into an algorithm. Can anybody here figure it out?&lt;br /&gt;&lt;br /&gt;The rule goes like this: A person with X skill rank attempts a task at Y difficulty level.&lt;br /&gt;&lt;br /&gt;Thus, A must roll X number of 10-sided die and for each roll, if the result is:&lt;br /&gt;&lt;br /&gt;- HIGHER than Y, its a success&lt;br /&gt;- LOWER than Y, it&amp;#39;s a failure&lt;br /&gt;- EQUAL to Y, a &amp;quot;coin-flip&amp;quot; is done to determine if its a success or failure (each 50% probability)&lt;br /&gt;&lt;br /&gt;In order for the task to be successful, there must be EQUAL OR MORE successes than failures. &lt;br /&gt;&lt;br /&gt;I know how to implement this in code:&lt;br /&gt;&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;&lt;br /&gt;function perform_task&amp;#40; A_stat_rank, task_difficulty_level &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp;success = 0&lt;br /&gt; &amp;nbsp; &amp;nbsp;failure = 0&lt;br /&gt; &amp;nbsp; &amp;nbsp;draw = 0&lt;br /&gt;&lt;br /&gt; &amp;nbsp; &amp;nbsp;for &amp;#40; i = 1; i &amp;#60;= A_stat_rank; i++ &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;roll = rand&amp;#40; 1, 10 &amp;#41; &amp;nbsp; &amp;nbsp; // rolls a D10 die &amp;#40;10-sided die&amp;#41;, getting a result between 1 to 10&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if &amp;#40; roll &amp;#62; task_difficulty_level &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;success += 1&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if &amp;#40; roll &amp;#60; task_difficulty_level &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;failure += 1&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;draw += 1&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;coin_flip = rand&amp;#40; 0, 1 &amp;#41; &amp;nbsp;// do a coin flip, getting a result between 0 and 1&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if &amp;#40; coin_flip == 0 &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;success += 1&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;failure += 1&lt;br /&gt;&lt;br /&gt; &amp;nbsp; &amp;nbsp;if &amp;#40; success &amp;#62;= failure &amp;#41;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return TRUE&lt;br /&gt; &amp;nbsp; &amp;nbsp;else&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return FALSE&lt;br /&gt;&lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;br /&gt;&lt;br /&gt;But I don&amp;#39;t know how to calculate the probability of it with a mathematical formula. I can always brute force it by running it 10,000 times with the same parameters and get the statistics, but that&amp;#39;s unfeasible when all I want is a formula to calculate it so that I can display it to the player before they attempt the task.&lt;br /&gt;&lt;br /&gt;Can anybody help me convert the above algorithm into a mathematical formula please? Thanks&amp;#33;</description>
            <author>soggie</author>
            <category>Codemasters</category>
            <pubDate>Sat, 05 Jun 2010 18:25:06 +0800</pubDate>
        </item>
        <item>
            <title>Anybody here good with low poly + UVW?</title>
            <link>http://forum.lowyat.net/topic/1423249</link>
            <description>I&amp;#39;ve made a &lt;a href='http://forum.lowyat.net/index.php?showtopic=1423243' target='_blank'&gt;link here&lt;/a&gt; but decided to put it here too to gain more exposure for this job.&lt;br /&gt;&lt;br /&gt;I need somebody who&amp;#39;s good at UVW mapping and can use either Blender or 3D Studio Max. Anybody who manages to recommend a friend that gets hired by me will get RM300 referral fee.&lt;br /&gt;&lt;br /&gt;I hope this doesn&amp;#39;t offend the mods or break any rules here.</description>
            <author>soggie</author>
            <category>Arts &amp;amp; Designs</category>
            <pubDate>Fri, 14 May 2010 17:49:16 +0800</pubDate>
        </item>
        <item>
            <title>Who&amp;#39;s the game developer here?</title>
            <link>http://forum.lowyat.net/topic/1130807</link>
            <description>I remember there was one dude in this forum that won top 10 in some international flash game development competition. Who&amp;#39;s it again? Anybody here remember him?&lt;br /&gt;&lt;br /&gt;Sorry if this is out of topic&amp;#33;</description>
            <author>soggie</author>
            <category>Arts &amp;amp; Designs</category>
            <pubDate>Sat, 15 Aug 2009 02:41:56 +0800</pubDate>
        </item>
        <item>
            <title>htaccess mod_rewrite rules</title>
            <link>http://forum.lowyat.net/topic/1059121</link>
            <description>Ok here&amp;#39;s what I&amp;#39;ve been trying to achieve:&lt;br /&gt;&lt;br /&gt;Use Case 1: redirect all directory access (subdirectories also) to ./index.php&lt;br /&gt;Use Case 2: redirect all direct PHP file access (all files, even in subdirectories) to ./index.php&lt;br /&gt;Use Case 3: allow direct access of all other files (jpg,png,css,js, etc)&lt;br /&gt;&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;&lt;br /&gt;Options -Indexes&lt;br /&gt;Options +FollowSymLinks&lt;br /&gt;DirectoryIndex index.php&lt;br /&gt;&lt;br /&gt;&amp;#60;IfModule mod_rewrite.c&amp;#62;&lt;br /&gt; &amp;nbsp;RewriteEngine On&lt;br /&gt; &amp;nbsp;RewriteCond %{REQUEST_FILENAME} -s &amp;nbsp;&amp;#91;OR&amp;#93;&lt;br /&gt; &amp;nbsp;RewriteCond %{REQUEST_FILENAME} -l &amp;nbsp;&amp;#91;OR&amp;#93;&lt;br /&gt; &amp;nbsp;RewriteCond %{REQUEST_FILENAME} -f &amp;nbsp;&amp;#91;OR&amp;#93;&lt;br /&gt; &amp;nbsp;RewriteCond %{REQUEST_FILENAME} -d &amp;nbsp;&lt;br /&gt; &amp;nbsp;RewriteCond %{REQUEST_FILENAME} &amp;#33;&amp;#092;.&amp;#40;png|gif|ico|css|js|info|install|php|html&amp;#41; &lt;br /&gt; &amp;nbsp;&lt;br /&gt;	RewriteCond &amp;#036;1 &amp;#33;^&amp;#40;index&amp;#092;.php|images|robots&amp;#092;.txt&amp;#41;&lt;br /&gt;	RewriteRule ^&amp;#40;.*&amp;#41;&amp;#036; index.php/&amp;#036;1 &amp;#91;NC,L&amp;#93;&lt;br /&gt;&amp;#60;/IfModule&amp;#62;&lt;br /&gt;&lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;br /&gt;&lt;br /&gt;In the above example, it successfully show the front page (http://localhost/myproject/) with everything loaded. It also redirected an attempted directory access (http://localhost/myproject/library/) to index.php.&lt;br /&gt;&lt;br /&gt;HOWEVER, it failed to redirect &lt;a href='http://localhost/myproject/story/' target='_blank'&gt;http://localhost/myproject/story/&lt;/a&gt; to index.php when there is no &amp;quot;story&amp;quot; folder in my webapp.&lt;br /&gt;&lt;br /&gt;I can only satisfy max two of the above mentioned 3 conditions and unable to satisfy them all. Is there a way to fulfill all these 3 conditions?&lt;br /&gt;&lt;br /&gt;[addedon]June 11, 2009, 2:09 am[/addedon]Nevermind. I found the fix.&lt;br /&gt;&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;&lt;br /&gt;Options -Indexes&lt;br /&gt;Options +FollowSymLinks&lt;br /&gt;DirectoryIndex index.php&lt;br /&gt;&lt;br /&gt;&amp;#60;IfModule mod_rewrite.c&amp;#62;&lt;br /&gt; &amp;nbsp;RewriteEngine On&lt;br /&gt; &amp;nbsp;#RewriteCond %{REQUEST_FILENAME} -s &amp;nbsp;&amp;#91;OR&amp;#93;&lt;br /&gt; &amp;nbsp;#RewriteCond %{REQUEST_FILENAME} -l &amp;nbsp;&amp;#91;OR&amp;#93;&lt;br /&gt; &amp;nbsp;#RewriteCond %{REQUEST_FILENAME} -f &amp;nbsp;&amp;#91;OR&amp;#93;&lt;br /&gt; &amp;nbsp;#RewriteCond %{REQUEST_FILENAME} -d &amp;nbsp;&lt;br /&gt; &amp;nbsp;RewriteCond %{REQUEST_FILENAME} &amp;#33;&amp;#092;.&amp;#40;png|gif|ico|css|js|info|install&amp;#41; &lt;br /&gt; &amp;nbsp;&lt;br /&gt;	RewriteCond &amp;#036;1 &amp;#33;^&amp;#40;index&amp;#092;.php|images|robots&amp;#092;.txt&amp;#41;&lt;br /&gt;	RewriteRule ^&amp;#40;.*&amp;#41;&amp;#036; index.php/&amp;#036;1 &amp;#91;NC,L&amp;#93;&lt;br /&gt;&amp;#60;/IfModule&amp;#62;&lt;br /&gt;&lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;</description>
            <author>soggie</author>
            <category>Codemasters</category>
            <pubDate>Thu, 11 Jun 2009 02:03:07 +0800</pubDate>
        </item>
        <item>
            <title>How to write a business proposal</title>
            <link>http://forum.lowyat.net/topic/1003706</link>
            <description>Hi guys,&lt;br /&gt;&lt;br /&gt;I know this is a noob question, but what should I include in my business proposal to an investor?&lt;br /&gt;&lt;br /&gt;The objective is to propose stock options of my company to the investor, probably aiming for 500k to 1mil as growth funding.&lt;br /&gt;&lt;br /&gt;The question I am really asking is, what should I focus in on my business proposal? I have never written a proposal before and know nuts about doing ROI, breakeven and sales projections. Are these even necessary in a business proposal?&lt;br /&gt;&lt;br /&gt;I currently have these put into my proposal but kind of got stuck:&lt;br /&gt;&lt;br /&gt;1. executive summary&lt;br /&gt;2. business description&lt;br /&gt;3. SWOT analysis&lt;br /&gt;4. marketing plan (target audiences, prospective customers, marketing campaigns... etc)&lt;br /&gt;5. operations description (team, biography, strategic alliances, etc)&lt;br /&gt;6. financial projections (ROI, breakeven, revenue projections, etc)&lt;br /&gt;&lt;br /&gt;Is this complete?</description>
            <author>soggie</author>
            <category>Finance, Business and Investment House</category>
            <pubDate>Sun, 19 Apr 2009 15:51:49 +0800</pubDate>
        </item>
        <item>
            <title>Splintered Core Series T-shirts... comment away&amp;#33;</title>
            <link>http://forum.lowyat.net/topic/993841</link>
            <description>Hi guys, got more stuff for ya&amp;#39;all.&lt;br /&gt;&lt;br /&gt;View and comment away&amp;#33; This one is done by one of our own LYN members - Azarimy&amp;#33; &lt;!--emo&amp;:lol:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/laugh.gif' border='0' style='vertical-align:middle' alt='laugh.gif' /&gt;&lt;!--endemo--&gt;&lt;br /&gt;&lt;br /&gt;CHARGEEEE&amp;#33;&amp;#33;&amp;#33;&lt;br /&gt;&lt;img src='http://photos-a.ak.fbcdn.net/hphotos-ak-snc1/hs005.snc1/2813_69067751315_701441315_2134520_4967443_n.jpg' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;Trial-and-error? Not on the battlefield&amp;#33;&lt;br /&gt;&lt;img src='http://photos-h.ak.fbcdn.net/hphotos-ak-snc1/hs005.snc1/2813_69067741315_701441315_2134519_1792969_n.jpg' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;Bullets and Glossy Lips... equally fatal?&lt;br /&gt;&lt;img src='http://photos-g.ak.fbcdn.net/hphotos-ak-snc1/hs005.snc1/2813_69067736315_701441315_2134518_4980174_n.jpg' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;Big a&amp;#036;&amp;#036; Viceron... with wrong printing. Had to send back to printer. &lt;!--emo&amp;:(--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /&gt;&lt;!--endemo--&gt;&lt;br /&gt;&lt;img src='http://photos-f.ak.fbcdn.net/hphotos-ak-snc1/hs005.snc1/2813_69067731315_701441315_2134517_992_n.jpg' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;KLCC Nuked &lt;!--emo&amp;:P--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/tongue.gif' border='0' style='vertical-align:middle' alt='tongue.gif' /&gt;&lt;!--endemo--&gt;&lt;br /&gt;&lt;img src='http://photos-e.ak.fbcdn.net/hphotos-ak-snc1/hs005.snc1/2813_69067726315_701441315_2134516_7553043_n.jpg' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;----------&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ON-SALE NOW:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href='http://forum.lowyat.net/topic/1013666' target='_blank'&gt;http://forum.lowyat.net/topic/1013666&lt;/a&gt;</description>
            <author>soggie</author>
            <category>Arts &amp;amp; Designs</category>
            <pubDate>Fri, 10 Apr 2009 14:49:33 +0800</pubDate>
        </item>
        <item>
            <title>Sinned Series tees</title>
            <link>http://forum.lowyat.net/topic/962372</link>
            <description>It&amp;#39;s Dennis&amp;#39; turn now. Check them out and comment away&amp;#33;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;GC-1201 - Twisted Womb&lt;/b&gt;&lt;br /&gt;&lt;img src='http://www.rendervault.com/wp-content/uploads/2009/03/gc-1201.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;GC-1202 - Machine Inside&lt;/b&gt;&lt;br /&gt;&lt;img src='http://www.rendervault.com/wp-content/uploads/2009/03/gc-1202.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;GC-1203 - Guitar Teddy&lt;/b&gt;&lt;br /&gt;&lt;img src='http://www.rendervault.com/wp-content/uploads/2009/03/gc-1203.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;GC-1204 - Hollow Man&lt;/b&gt;&lt;br /&gt;&lt;img src='http://www.rendervault.com/wp-content/uploads/2009/03/gc-1204.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;GC-1205 - Carousel&lt;/b&gt;&lt;br /&gt;&lt;img src='http://www.rendervault.com/wp-content/uploads/2009/02/dennis01.png' border='0' alt='user posted image' /&gt;</description>
            <author>soggie</author>
            <category>Arts &amp;amp; Designs</category>
            <pubDate>Thu, 12 Mar 2009 17:07:07 +0800</pubDate>
        </item>
        <item>
            <title>Dreamwalker Tees</title>
            <link>http://forum.lowyat.net/topic/960313</link>
            <description>Guys, our designer Daryl has launched his first 5 designs. Let me know what you guys think of them&amp;#33;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;GC-1101 - Brain Food&lt;/b&gt;&lt;br /&gt;&lt;img src='http://www.rendervault.com/wp-content/uploads/2009/03/gc-1101.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;img src='http://www.rendervault.com/wp-content/uploads/2009/03/gc-1101b.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;GC-1102 - Heartless&lt;/b&gt;&lt;br /&gt;&lt;img src='http://www.rendervault.com/wp-content/uploads/2009/03/gc-1102.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;img src='http://www.rendervault.com/wp-content/uploads/2009/03/gc-1102b.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;GC-1103 - Sleeping With The Fishes&lt;/b&gt;&lt;br /&gt;&lt;img src='http://www.rendervault.com/wp-content/uploads/2009/03/gc-1103.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;img src='http://www.rendervault.com/wp-content/uploads/2009/03/gc-1103b.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;GC-1104 - Blind Love&lt;/b&gt;&lt;br /&gt;&lt;img src='http://www.rendervault.com/wp-content/uploads/2009/03/gc-1104.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;img src='http://www.rendervault.com/wp-content/uploads/2009/03/gc-1104b.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;GC-1105 - Eternal Love&lt;/b&gt;&lt;br /&gt;&lt;img src='http://www.rendervault.com/wp-content/uploads/2009/03/gc-1105.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;img src='http://www.rendervault.com/wp-content/uploads/2009/03/gc-1105b.png' border='0' alt='user posted image' /&gt;</description>
            <author>soggie</author>
            <category>Arts &amp;amp; Designs</category>
            <pubDate>Tue, 10 Mar 2009 19:11:38 +0800</pubDate>
        </item>
        <item>
            <title>Static vs Instantiation PHP</title>
            <link>http://forum.lowyat.net/topic/947793</link>
            <description>Ok lemme give you two classes:&lt;br /&gt;&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;&lt;br /&gt;class Logger&lt;br /&gt;{&lt;br /&gt; &amp;nbsp; &amp;nbsp;public function log&amp;#40; &amp;#036;string &amp;#41; { ... }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class LoggerStatic&lt;br /&gt;{&lt;br /&gt; &amp;nbsp; &amp;nbsp;public static function log&amp;#40; &amp;#036;string &amp;#41; { ... }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Example A&amp;#58; Using Logger&lt;br /&gt;&amp;#036;logger = new Logger&amp;#40; &amp;#41;;&lt;br /&gt;&amp;#036;logger-&amp;#62;log&amp;#40; &amp;#39;test&amp;#39; &amp;#41;;&lt;br /&gt;&lt;br /&gt;// Example B&amp;#58; Using LoggerStatic&lt;br /&gt;LoggerStatic&amp;#58;&amp;#58;log&amp;#40; &amp;#39;test &amp;#39; &amp;#41;;&lt;br /&gt;&lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;br /&gt;&lt;br /&gt;Which one is better in terms of memory usage and performance?</description>
            <author>soggie</author>
            <category>Codemasters</category>
            <pubDate>Thu, 26 Feb 2009 16:48:52 +0800</pubDate>
        </item>
        <item>
            <title>Finding a photographer</title>
            <link>http://forum.lowyat.net/topic/932224</link>
            <description>Hi Guys, I&amp;#39;m a newbie in the photography sub-forums so I don&amp;#39;t know what to expect here.&lt;br /&gt;&lt;br /&gt;Hopefully can get some advise from you all.&lt;br /&gt;&lt;br /&gt;Firstly, the background. We are going into KL Design Week by the end of March, and we need to do some last minute photo-shoots. Meaning this friday. We&amp;#39;ve already got the models and venue, but now are fidgeting for a photographer.&lt;br /&gt;&lt;br /&gt;We tried doing our own photoshoots last time with a DSLR and the results were... how to say... horrible. Well that&amp;#39;s what happen when you decide to throw in an amateur monkey (aka me) with an expensive camera, so this time we&amp;#39;re hoping that more experienced people would do it instead.&lt;br /&gt;&lt;br /&gt;I know I might be asking too much, but well here goes... anybody here willing to help us out? Thanks in advance.</description>
            <author>soggie</author>
            <category>Photography, Digital Imaging &amp;amp; Video</category>
            <pubDate>Wed, 11 Feb 2009 01:08:28 +0800</pubDate>
        </item>
        <item>
            <title>htaccess rewrite rules</title>
            <link>http://forum.lowyat.net/topic/925245</link>
            <description>Hi guys, this is my htaccess:&lt;br /&gt;&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;&lt;br /&gt;&amp;#60;IfModule mod_rewrite.c&amp;#62;&lt;br /&gt; &amp;nbsp; &amp;nbsp;RewriteEngine On&lt;br /&gt; &amp;nbsp; &amp;nbsp;RewriteBase /&lt;br /&gt; &amp;nbsp; &amp;nbsp;RewriteCond %{REQUEST_FILENAME} &amp;#33;-f&lt;br /&gt; &amp;nbsp; &amp;nbsp;RewriteCond %{REQUEST_FILENAME} &amp;#33;-d&lt;br /&gt; &amp;nbsp; &amp;nbsp;RewriteRule ^&amp;#40;.*&amp;#41;&amp;#036; projects/ib/index.php/&amp;#036;1 &amp;#91;L&amp;#93;&lt;br /&gt;&amp;#60;/IfModule&amp;#62;&lt;br /&gt;&lt;br /&gt;&amp;#60;IfModule &amp;#33;mod_rewrite.c&amp;#62;&lt;br /&gt; &amp;nbsp; &amp;nbsp;ErrorDocument 404 projects/ib/index.php&lt;br /&gt;&amp;#60;/IfModule&amp;#62; &lt;br /&gt;&lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;br /&gt;&lt;br /&gt;Basically, I want to route everything to index.php, which is located in my project folder. Right now as you can see it, it routes it to the folder projects/ib/, but what if in the future I change the folder name? Like to projects2/ib or something like that? Is there a way to put a variable in the htaccess file to use a server constant like {BASE_PATH}/index.php or something like that? I just need a constant that refers to the directory where the htaccess file resides in.&lt;br /&gt;&lt;br /&gt;Thanks&amp;#33;</description>
            <author>soggie</author>
            <category>Codemasters</category>
            <pubDate>Wed, 04 Feb 2009 13:58:39 +0800</pubDate>
        </item>
        <item>
            <title>Any sprite artists in here?</title>
            <link>http://forum.lowyat.net/topic/898801</link>
            <description>I&amp;#39;m experimenting with building a simple game engine and the only thing I don&amp;#39;t have is artistic skills in sprite drawing. Any of you here good in making 2D sprites?</description>
            <author>soggie</author>
            <category>Arts &amp;amp; Designs</category>
            <pubDate>Tue, 06 Jan 2009 23:35:34 +0800</pubDate>
        </item>
        <item>
            <title>You are a Taliban if...</title>
            <link>http://forum.lowyat.net/topic/894704</link>
            <description>1. You refine heroin for a living, but you have a moral objection to beer.&lt;br /&gt;&lt;br /&gt;   2. You own a &amp;#036;3,000 machine gun and &amp;#036;5,000 rocket launcher, but you can&amp;#39;t afford shoes.&lt;br /&gt;&lt;br /&gt;   3. You have more wives than teeth.&lt;br /&gt;&lt;br /&gt;   4. You wipe your butt with your bare left hand, but consider bacon &amp;#39;unclean.&amp;#39;&lt;br /&gt;&lt;br /&gt;   5. You think vests come in two styles: bullet-proof and suicide.&lt;br /&gt;&lt;br /&gt;   6. You can&amp;#39;t think of anyone you HAVEN&amp;#39;T declared Jihad against.&lt;br /&gt;&lt;br /&gt;   7. You consider television dangerous, but routinely carry explosives in your clothing.&lt;br /&gt;&lt;br /&gt;   8. You were amazed to discover that cell phones have uses other than setting off roadside bombs.&lt;br /&gt;&lt;br /&gt;   9. You&amp;#39;ve often uttered the phrase, &amp;#39;I love what you&amp;#39;ve done with your cave.&amp;#39;&lt;br /&gt;&lt;br /&gt;  10. You have nothing against women and think every man should own at least one.&lt;br /&gt;&lt;br /&gt;  11. You bathe at least monthly whether necessary or not.&lt;br /&gt;&lt;br /&gt;  12. You&amp;#39;ve ever had a crush on your neighbor&amp;#39;s goat.</description>
            <author>soggie</author>
            <category>Jokes Heaven</category>
            <pubDate>Sat, 03 Jan 2009 05:36:06 +0800</pubDate>
        </item>
        <item>
            <title>LYN Art &amp;amp; Design Gathering</title>
            <link>http://forum.lowyat.net/topic/889736</link>
            <description>Yo dudes, how about we meet up on 4th Jan 2009 in Midvalley?&lt;br /&gt;&lt;br /&gt;Get to know each other in person and chill out. &lt;!--emo&amp;:D--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /&gt;&lt;!--endemo--&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Venue&lt;/b&gt;: Midvalley&lt;br /&gt;&lt;b&gt;Time&lt;/b&gt;: Evening 8pm - 10pm&lt;br /&gt;&lt;b&gt;Date&lt;/b&gt;: 4th Jan 2009 (Sunday)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Participants&lt;/b&gt;:&lt;br /&gt;1) soggie&lt;br /&gt;2)&lt;br /&gt;3)&lt;br /&gt;4)&lt;br /&gt;5)&lt;br /&gt;&lt;br /&gt;-----------------&lt;br /&gt;PM me if you want to join up, along with your contact number so that I can contact you and give you updates on the gathering. It&amp;#39;ll be fun &lt;!--emo&amp;:lol:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/laugh.gif' border='0' style='vertical-align:middle' alt='laugh.gif' /&gt;&lt;!--endemo--&gt;</description>
            <author>soggie</author>
            <category>Arts &amp;amp; Designs</category>
            <pubDate>Mon, 29 Dec 2008 14:12:26 +0800</pubDate>
        </item>
        <item>
            <title>Unique or Branded T-shirts?</title>
            <link>http://forum.lowyat.net/topic/885539</link>
            <description>Do you guys prefer branded tees or go for more unique indie designer tees? And why?</description>
            <author>soggie</author>
            <category>Men&amp;#39;s Style &amp;amp; Fashion</category>
            <pubDate>Wed, 24 Dec 2008 15:41:45 +0800</pubDate>
        </item>
    </channel>
</rss>
