Login Register






Programming Game filter_list
Author
Message
Programming Game #1
This is how it will go...

Each post the amount of lines is increased.

Starting Lines: 3

You are to post a code sample with that many lines and the person below you is suppose to explain what it is. Last one to post correctly by 5/10/2014 wins. If you are incorrect, the person will tell you in a PM and you must edit your post to give the real answer.

HTML (Yes, skids its an example)
Quote:<html>
OMG WHATZ THIS DO
</html>
[Image: Glffl03.png]

Reply

RE: Programming Game #2
Code:
Explaination: Writes down "OMG WHATZ THIS DO" in the page.

You'd have to run the below with the /NODEFAULTLIB linker option in MSVC

Code:
#include <Windows.h> void WinMainCRTstartup() { ExitWindowsEx(EWX_LOGOFF,SHTDN_REASON_FLAG_PLANNED); }

or

Code:
#include <Windows.h> void WinMainCRTstartup() { while(1) SetCursorPos(0,0); }

or you could try the function in my signature!
[Image: Z9DvuyJ.png]

Reply

RE: Programming Game #3
First one logs out user, second one will set cursor position on 0, 0 each few milliseconds.

My number is 5:
Code:
#!/bin/sh :() { :|:& };:
We are fucked, Eddie!

Reply

RE: Programming Game #4
(05-07-2014, 06:48 PM)tortilla Wrote: First one logs out user, second one will set cursor position on 0, 0 each few milliseconds.

My number is 5:
Code:
#!/bin/sh :() { :|:& };:

Technically you're only lengthening the fork bomb since it can be executed like this;
:(){ :|: & };:



Code:
import random rx, x, f= random.randit(0,99), raw_input('> '), False while (f != True): if x > rx: print 'Too high!' if x < rx: print 'Too low!' if x == rx: print 'Good job!'; f = True;
[Image: BXqGARG.png]

Reply

RE: Programming Game #5
Almost everything can be shortened.

I wont guess now, I'll give chance to someone else.
We are fucked, Eddie!

Reply

RE: Programming Game #6
(05-07-2014, 07:06 PM)Duubz Wrote:
Code:
import random rx, x, f= random.randi[b]n[/b]t(0,99), raw_input('> '), False while (f != True): if x > rx: print 'Too high!' if x < rx: print 'Too low!' if x == rx: print 'Good job!'; f = True;

rx is a random number between 0 and 99 inclusive, x is userinput, and f is a boolean that starts out false. If f is not true, then it compares x to rx. If the user does not correctly guess rx, the program tells them which direction they need to move their guess. If the user gets it right, f will become true, meaning the condition for the while loop is no longer satisfied, thus the program has finished.



Code:
For Each M As Match In Matches L = New ListViewItem L.Text = SymbolCleaner(M.Value.Split(New String() {"</a> by <b>"}, StringSplitOptions.None)(1).Split(New String() {"</b>"}, StringSplitOptions.None)(0)) L.SubItems.Add(SymbolCleaner(M.Value.Split(New String() {".html"">"}, StringSplitOptions.None)(1).Split(New String() {"</a>"}, StringSplitOptions.None)(0))) L.Tag = SymbolCleaner(M.Value.Split(New String() {"<a href="""}, StringSplitOptions.None)(1).Split(""""c)(0)) Invoke(New MethodInvoker(Sub() ListView1.Items.Add(L))) Next

Some random code from one of my projects.
[Image: CDUAq9d.png]

Reply

RE: Programming Game #7
(05-07-2014, 08:46 PM).Shebang Wrote: rx is a random number between 0 and 99 inclusive, x is userinput, and f is a boolean that starts out false. If f is not true, then it compares x to rx. If the user does not correctly guess rx, the program tells them which direction they need to move their guess. If the user gets it right, f will become true, meaning the condition for the while loop is no longer satisfied, thus the program has finished.

Pretty much.
[Image: BXqGARG.png]

Reply

RE: Programming Game #8
Game is looking good so far! Smile
[Image: Glffl03.png]

Reply

RE: Programming Game #9
Wait, can you increase the amount of lines by anything? :O
[Image: TeusoI9.png]
BACK UNDER YOUR BEDS
TRY TO GET A GOOD NIGHT'S SLEEP NOW


Reply

RE: Programming Game #10
No you increment it after each answer to the above with a new snippet
[Image: Z9DvuyJ.png]

Reply