Loading...
  1. Dismiss Notice
  2. Dismiss Notice
  3. Dismiss Notice
  4. If this is your first visit, you may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Voting suggestion

Discussion in 'Old Threads' started by NubCake, Nov 7, 2010.

  1. NubCake

    NubCake Proficient

    Joined:
    Aug 11, 2010
    Messages:
    219
    Likes Received:
    2
    Trophy Points:
    238
    I saw you did on voting page, when you will be able to vote again, but serious, it types everything in minutes, is it really so hard to do it -> x hours, x minutes? Even i know how to do that and i dont have that much programming knowledge, all you have to do is devide the number with 60 and the rest is minutes, something like 400/60 is hours and 400%60 (whats left when you divide 400 with 60) is minutes if im not wrong? This takes like 1 minute to write.
     
  2. chicotte

    chicotte Well-Known Member Forum Legend

    Joined:
    Jul 9, 2010
    Messages:
    1,522
    Likes Received:
    146
    Trophy Points:
    283
    If you delay 1 min each vote (which I doubt), after the 12 hours from the very first vote, you will spend the same time voting. So you don't really lose any time
     
  3. NubCake

    NubCake Proficient

    Joined:
    Aug 11, 2010
    Messages:
    219
    Likes Received:
    2
    Trophy Points:
    238
    What i was trying to say is, that the cod was written fast and it could look a lot better if someone would take 1 more minute to correct it :D Otherwise i'm happy there is at least something :)
     
  4. Nujabes

    Nujabes Well-Known Member

    Joined:
    Aug 28, 2010
    Messages:
    1,561
    Likes Received:
    501
    Trophy Points:
    0
    If the number reaches to 0, then you know it's time to vote.
     
  5. ildomar

    ildomar Proficient

    Joined:
    May 29, 2010
    Messages:
    360
    Likes Received:
    36
    Trophy Points:
    248
    Location:
    Too busy playing LoL :D
    Lets divide by zer-

    But is this really a problem. Now we just know how long it takes till we can vote again...
     
  6. TheShaikan

    TheShaikan Banned

    Joined:
    Jun 18, 2010
    Messages:
    2,892
    Likes Received:
    615
    Trophy Points:
    0
    Location:
    Romania. Umad?
    *cough* i didnt actually get the ideea of this thread....can some1 explain it better for me? o_O
     
  7. Nujabes

    Nujabes Well-Known Member

    Joined:
    Aug 28, 2010
    Messages:
    1,561
    Likes Received:
    501
    Trophy Points:
    0
    I think he wanted it in a hours and minute count down rather than minutes representing the hours. i.e 3 hours 36 minutes remaining.
     
  8. redkola

    redkola Proficient

    Joined:
    Aug 12, 2010
    Messages:
    370
    Likes Received:
    27
    Trophy Points:
    0
    it is a great idea but a better way to do that watch at clock, vote, after 12 passed vote again:))
     
  9. TheShaikan

    TheShaikan Banned

    Joined:
    Jun 18, 2010
    Messages:
    2,892
    Likes Received:
    615
    Trophy Points:
    0
    Location:
    Romania. Umad?
    now i got it thx

    and btw, i remember there was a thingy on the forum that makes ur computer show u when its time to vote again, try searching for it
     
  10. aptallar

    aptallar Proficient

    Joined:
    Jul 31, 2010
    Messages:
    262
    Likes Received:
    38
    Trophy Points:
    248
    like timer?
     
  11. NubCake

    NubCake Proficient

    Joined:
    Aug 11, 2010
    Messages:
    219
    Likes Received:
    2
    Trophy Points:
    238
    If voting time minutes is 0 and you divide it, it is only 1 more if statement (if timer is 0, type -> you can vote), but i can see you people are complicating it so i dont expect anything from what i typed, i just wanted to have a nicer view of when i would need to vote xD But ok, its nice this way too :)
     
  12. Carl

    Carl Administrator Admin

    Joined:
    Feb 22, 2010
    Messages:
    1,271
    Likes Received:
    9,478
    Trophy Points:
    483
    if its so easy let me see some code :smile:
     
    2 people like this.
  13. Nujabes

    Nujabes Well-Known Member

    Joined:
    Aug 28, 2010
    Messages:
    1,561
    Likes Received:
    501
    Trophy Points:
    0
    Owned by the Carl.
     
  14. 2FAST4U

    2FAST4U Proficient

    Joined:
    Jul 5, 2010
    Messages:
    406
    Likes Received:
    10
    Trophy Points:
    0
    Location:
    Retail/pwning with meh sin
    lol nice one carl
     
  15. tyman

    tyman Well-Known Member

    Joined:
    Jun 3, 2010
    Messages:
    1,645
    Likes Received:
    213
    Trophy Points:
    283
    Location:
    OC MD
    Its easy to output the time, but your forgeting that you need to record the data for everyone, and know when to output on refresh.
     
  16. NubCake

    NubCake Proficient

    Joined:
    Aug 11, 2010
    Messages:
    219
    Likes Received:
    2
    Trophy Points:
    238
    well in c# it would look like this i guess:

    int hours, minutes;

    if (timer == 0)

    {
    Console.Write("You Can Vote Now");
    }
    Else
    {
    hours = timer/60;

    minutes = timer%60;

    }

    Console.WriteLine("You can vote in {0} hours and {1} minutes", hours, minutes);


    I didnt test it, so i might have typed something wrong, but its just the text that comes out that changes, timers are still the same.

    Maybe it could work like this too:

    Console.WriteLine("You can vote in {0}/60 hours and {1}%60 minutes", hours, minutes);

    PS: I'm not sure how this is done in c#, but in c++ you could do that and i have no idea how to do that in php (=
     
  17. kumbaj1612

    kumbaj1612 SPATALOS server elyos

    Joined:
    Aug 3, 2010
    Messages:
    507
    Likes Received:
    136
    Trophy Points:
    0
    Location:
    SRBIJA
    well carl there is your code now lets see it happen hehehehehehhe:)
     
  18. Deathryx

    Deathryx Getting there

    Joined:
    Oct 20, 2010
    Messages:
    95
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    Marosvasarhely
    OWNED:D grats:D
     

Share This Page