Bitcoin Forum
June 16, 2024, 07:41:34 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3]  All
  Print  
Author Topic: The Coding Thread  (Read 2716 times)
Lethn (OP)
Legendary
*
Offline Offline

Activity: 1540
Merit: 1000



View Profile WWW
June 03, 2013, 08:56:35 AM
 #41

Code:
print "Hello, world!"

Phew, I need to take a break.

Pussy! Tongue
Mike Christ
aka snapsunny
Legendary
*
Offline Offline

Activity: 1078
Merit: 1003



View Profile
June 03, 2013, 09:02:12 AM
 #42

Pussy! Tongue

Okay okay.  I'll keep trying.

Code:
def conjunctionJunction():
    print "What's your function?"

conjunctionJunction()

r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
June 03, 2013, 09:19:21 AM
 #43

Pussy! Tongue

Okay okay.  I'll keep trying.

Code:
def conjunctionJunction():
    print "What's your function?"

conjunctionJunction()

uAWR s0 l33t

My negative trust rating is reflective of a personal vendetta by someone on default trust.
Lethn (OP)
Legendary
*
Offline Offline

Activity: 1540
Merit: 1000



View Profile WWW
June 03, 2013, 10:37:19 AM
 #44

Quote


#include <Iostream>
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>

int main()
{

    sf::RenderWindow window(sf::VideoMode(800, 600), "test");

sf::CircleShape shape ( 50 );
shape.setFillColor( sf::Color::White );

    while (window.isOpen())
    {

    sf::Event event;
    while (window.pollEvent(event))

        {
           if (sf::Mouse::isButtonPressed ( sf::Mouse::Left ) )

           shape.setPosition ( sf::Mouse::getPosition( window ).x , sf::Mouse::getPosition( window ).y  );

        }



{
 if (event.type == sf::Event::Closed)
 window.close();
}

        window.clear();
        window.draw ( shape );
        window.display();

    }

    return 0;


I managed to partially fix my code yet again to make it almost functional, turns out, keeping mouse events outside of the brackets where you're having your objects interact with the mouse/keyboard royally fucks things up if you're not careful, now I just need to figure out why my shape is terrified of my mouse cursor and get this code working with the move command.

Oh and never forget, x and y always, never y and x Cheesy
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
June 03, 2013, 10:50:43 AM
 #45

Quote


#include <Iostream>
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>

int main()
{

    sf::RenderWindow window(sf::VideoMode(800, 600), "test");

sf::CircleShape shape ( 50 );
shape.setFillColor( sf::Color::White );

    while (window.isOpen())
    {

    sf::Event event;
    while (window.pollEvent(event))

        {
           if (sf::Mouse::isButtonPressed ( sf::Mouse::Left ) )

           shape.setPosition ( sf::Mouse::getPosition( window ).x , sf::Mouse::getPosition( window ).y  );

        }



{
 if (event.type == sf::Event::Closed)
 window.close();
}

        window.clear();
        window.draw ( shape );
        window.display();

    }

    return 0;


I managed to partially fix my code yet again to make it almost functional, turns out, keeping mouse events outside of the brackets where you're having your objects interact with the mouse/keyboard royally fucks things up if you're not careful, now I just need to figure out why my shape is terrified of my mouse cursor and get this code working with the move command.

Oh and never forget, x and y always, never y and x Cheesy

Hell yeah bro! i fixed my php script to. turned out i did need to fclose the file like jackjack said. for some strange reason notepad++ doesn't highlight the syntax of fclose so i thought i was doing something wrong. showing zero errors on E_ALL i can sleep soundly now.

My negative trust rating is reflective of a personal vendetta by someone on default trust.
Mike Christ
aka snapsunny
Legendary
*
Offline Offline

Activity: 1078
Merit: 1003



View Profile
June 04, 2013, 04:24:22 AM
 #46

uAWR s0 l33t

People, please, hold your applause.

Code:
def myNewFunction(x):
    if x > 1:
        return x + 1
    else:
        return 0

print myNewFunction(int(raw_input()))

It took me three weeks to figure out how many parenthesis should go on the end of the last statement, but due to my unwavering perseverance, I've made a program that...probably cures computer cancer or something.  But anyway, I think I'm ready to make the next World of Warcraft clone.

Lethn (OP)
Legendary
*
Offline Offline

Activity: 1540
Merit: 1000



View Profile WWW
June 11, 2013, 12:07:20 PM
 #47

You guys who are into game programming may like this, did some digging around and found this website http://code.google.com/p/gqe/, a lot of the sites are completely outdated but it looks this one at least has some 2.0 code, I downloaded pong to get me going! Smiley
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
June 12, 2013, 01:25:15 PM
 #48

You guys who are into game programming may like this, did some digging around and found this website http://code.google.com/p/gqe/, a lot of the sites are completely outdated but it looks this one at least has some 2.0 code, I downloaded pong to get me going! Smiley

someone should make a bit arcade. instead of depositing 50 cents per play, you deposit .005 bitcoins or something

My negative trust rating is reflective of a personal vendetta by someone on default trust.
Lethn (OP)
Legendary
*
Offline Offline

Activity: 1540
Merit: 1000



View Profile WWW
June 12, 2013, 02:28:57 PM
 #49

lolz well I'll be selling my games for Bitcoin but I don't really approve of arcades, it's basically like purchasing a game with a hard coded time limit and that sucks Sad

Quote


    while (window.isOpen())
    {

    sf::Event event;
    while (window.pollEvent(event))

if ( event.type == sf::Event::MouseMoved );

{
    spritebutton.delete ( MouseMoved.x, MouseMoved.y );
}


{
 if (event.type == sf::Event::Closed)
 window.close();
}


I WILL CODE A WORKING BUTTON OR DIE TRYING!
Lethn (OP)
Legendary
*
Offline Offline

Activity: 1540
Merit: 1000



View Profile WWW
November 27, 2013, 07:53:40 AM
 #50

I'm bumping the coding thread Tongue I want to post up some more code here soon Cheesy
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
November 27, 2013, 09:31:35 AM
 #51

I'm bumping the coding thread Tongue I want to post up some more code here soon Cheesy

can you debug an sql query? i can't get my form to work for some odd strange reason.

Code:
<b>Ban A user</b>
<form action="" method="POST">
<input type="hidden" name="banby" value="<?php  echo $account?>" />
<input type="text" name="to_ban" class="shadowfield" />
<input type="submit" value="ban" class="blues" />
</form>
<?php

if (isset($_POST["to_ban"]))
{
$banby mysql_real_escape_string(strip_tags($_POST["banby"]));
$to_ban mysql_real_escape_string(strip_tags($_POST["to_ban"]));
$sqly mysql_query("UPDATE userCake_Users SET `Banned`='1' WHERE `Username`='$to_ban'");
$sqlz mysql_query("UPDATE userCake_Users SET `BannedBy`='$banby' WHERE `Username`='$to_ban'");
}



My negative trust rating is reflective of a personal vendetta by someone on default trust.
Lethn (OP)
Legendary
*
Offline Offline

Activity: 1540
Merit: 1000



View Profile WWW
November 27, 2013, 09:37:58 AM
 #52

Fuck no lol Cheesy but if we keep bumping this thread maybe someone else will take a look, I'm learning C++ and SFML currently.
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
December 08, 2013, 08:58:10 AM
 #53

Fuck no lol Cheesy but if we keep bumping this thread maybe someone else will take a look, I'm learning C++ and SFML currently.

SFML? SAD FUCK MY LIFE LANGUAGE ? lol

My negative trust rating is reflective of a personal vendetta by someone on default trust.
Pages: « 1 2 [3]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!