Write something in code game

Started by PITT_HAPPENS2 pagesPoll

?

Write something in code game

OK, for the coders out there write something in code. ๐Ÿ˜‰

[php]
$n = 0;
while ($n < 1) {
if (date("d"๐Ÿ˜‰ == date("d"๐Ÿ˜‰) {
echo "I want a beer";
} else {
echo "I need a beer";
}
$n--;
}
[/php]

I want a cookie!!!๐Ÿ˜ 

Originally posted by TRH
I want a cookie!!!๐Ÿ˜ 

Originally posted by TRH
I want a cookie!!!๐Ÿ˜ 
pitt_cookie

Now I'm hungry so I'm off to lunch and I expect to see some code soon ๐Ÿ˜›

[php]<cfset bottles = 99>
<cfloop from="99" to="1" step="-1" index="countdown">
<cfoutput>
#countdown# bottles of beer on the wall,<BR> #countdown# bottles of beer...
<cfset countdown = #countdown#-1>
<p> take one down...<br> pass it around...<br> #countdown# bottles of beer on the wall! <br>
<br></cfoutput>
</cfloop>[/php]

[code] Nah. 13 [/code]

Your what?

[code] PKMN.[/code]

Originally posted by Tattoo
[php]<cfset bottles = 99>
<cfloop from="99" to="1" step="-1" index="countdown">
<cfoutput>
#countdown# bottles of beer on the wall,<BR> #countdown# bottles of beer...
<cfset countdown = #countdown#-1>
<p> take one down...<br> pass it around...<br> #countdown# bottles of beer on the wall! <br>
<br></cfoutput>
</cfloop>[/php]
Damn Cold Fusion pitt_fist

[php]
echo "<div style='font-size:150000px;'>SPOON!!!</div>";
[/php]

[php]Later...[/php]

[code]
function addDash(theValue) {
if (theValue == 3) {
var theirNum = document.contactForm.phone.value
document.contactForm.phone.value = theirNum + '-';
} else if (theValue < 8) {
return true;
} else {
document.contactForm.phoneExt.focus();
}
}
[/code]

[code]
function updateDIM(){
var month = document.events.monthStart.value;
var year = document.events.yearStart.value;
var days = getDaysInMonth(month,year);
document.events.dayStart.options.length = 1;

//alert(document.events.dd.length);
var i = 0;
var n = 1;
var lead = "0";
while (i < days) {
if (n < 10) {
lead = "0";
} else {
lead = "";
}
document.events.dayStart.options[i] = new Option(n,(lead + n),true,true);
//alert(lead);
n++;
i++;
}
now = new Date;
cd = now.getDate();
document.events.dayStart.options[cd-1].selected = true;
}

function updateDIM2(){
var month = document.events.monthEnd.value;
var year = document.events.yearEnd.value;
var days = getDaysInMonth(month,year);
document.events.dayEnd.options.length = 1;

//alert(document.events.dd.length);
var i = 0;
var n = 1;
while (i < days) {
if (n < 10) {
lead = "0";
} else {
lead = "";
}
document.events.dayEnd.options[i] = new Option(n,(lead + n),true,true);
n++;
i++;
}
now = new Date;
cd = now.getDate();
document.events.dayEnd.options[cd-1].selected = true;
}

function getDaysInMonth(month,year) {
var d = new Date();
d.setYear(year);
d.setMonth(month-1);
d.setDate(month-1)
d.setDate(32);
return 32 - d.getDate();
}
[/code]

I hate JAVASCRIPT

Originally posted by Rรถland
I hate JAVASCRIPT
I do too but something you just have to do it when dealing with client side applications. ๐Ÿ™

Originally posted by PITT_HAPPENS
I do too but something you just have to do it when dealing with client side applications. ๐Ÿ™

In my Beginning HTML class I took last semester I had HTML down perfectly then we did one chapter of JAVA at the end and I was lost. ๐Ÿ˜‚

I steal code when I can and then modify it to make it do what I want, I normally write simple JavaScript the complex stuff like AJAX is still beyond me.

Originally posted by PITT_HAPPENS
I steal code when I can and then modify it to make it do what I want, I normally write simple JavaScript the complex stuff like AJAX is still beyond me.

All we had to do was modify a fake Fair website that would count down the number of days left till the Fair and I failed at it. ๐Ÿ˜›

I was able to get the right code down for copyright info you can put at the bottom of pages. 131

Originally posted by Rรถland
All we had to do was modify a fake Fair website that would count down the number of days left till the Fair and I failed at it. ๐Ÿ˜›

I was able to get the right code down for copyright info you can put at the bottom of pages. 131

Dealing with time in any language is a tuff one to do, the one I posted above will update a drop box with the current days of the month depending on the dates they select. That was a pain in the arse.

Originally posted by PITT_HAPPENS
Dealing with time in any language is a tuff one to do, the one I posted above will update a drop box with the current days of the month depending on the dates they select. That was a pain in the arse.

HTML = Fun. 131

JAVASCRIPT = Not even close to the fun department. ๐Ÿ™