Author Topic: CTRL+V Game v5  (Read 85012 times)


intentionally shrunken

Blockland   Hey, Blockaium, you have 68 messages, 0 are new.
November 30, 2014, 08:39:58 PM

Home  Help  Search  Profile  Logout
+  Blockland Forum
|-+  Off Topic
| |-+  Off Topic
| | |-+  Modify message ( Re: CTRL+V Game v5 )
Modify message
Subject:   
Add BBC tags:   BoldItalicizedUnderlineStrike throughPreformatted TextLeft AlignCenteredRight AlignHorizontal RuleFont SizeFont Face
Insert ImageInsert HyperlinkInsert EmailInsert FTP LinkInsert TableInsert Table RowInsert Table ColumnSuperscriptSubscriptTel etypeInsert CodeInsert QuoteInsert List  
Praise  Thanks  Sad    
Message:   
+ Additional Options...

shortcuts: hit alt+s to submit/post or alt+p to preview
  


Topic Summary
Posted by: Bomberguy   Posted on: Today at 08:33:42 PM
Insert Quote
http://www.youhaveautism.com/
Posted by: Plethora   Posted on: Today at 08:31:07 PM
Insert Quote


   /* Loop until Goldbach is right */
   do
   {
      /* If both numbers are prime */
      if (prime(num1, 2) + prime(num2, 2) == 2)
        {
         /* If the number add up to the target number */
           if (num1 + num2 == max)
         {
              printf("%d = %d + %d\n", max, num1, num2);
            check = 1;
            break;
         }
       }
      /* otherwise change the numbers, +/- 2 to keep them odd*/
        else
        {
           num1 += 2;
         num2 -= 2;
        }
   }
   while(check != 1);
Posted by: ButlerBlockhead125   Posted on: Today at 08:16:50 PM
Insert Quote
http://forum.blockland.us/avatarUpload/avatar_135823.png
Posted by: Awesomebread²   Posted on: Today at 08:15:23 PM
Insert Quote
https://forums.pokemmo.eu/index.php?/topic/16157-ips-moemon-emerald-patch-20th-march-2013/
Posted by: the hacker   Posted on: Today at 08:09:02 PM
Insert Quote
https://www.youtube.com/watch?v=KGhDMpdHMgc
Posted by: Nonnel   Posted on: Today at 08:06:55 PM
Insert Quote
tribal
Posted by: Silleb²   Posted on: Today at 08:05:47 PM
Insert Quote
Licking Doorknobs is illegal on other planets
Posted by: Dino5678   Posted on: Today at 07:57:08 PM
Insert Quote
139578207
Posted by: WaterOre   Posted on: Today at 07:55:50 PM
Insert Quote

Posted by: Mr Queeba   Posted on: Today at 07:53:20 PM
Insert Quote
http://adam487.us.to/blLogoGen_Generator.php?text=Bump&fontSize=64
Posted by: Daswiruch   Posted on: Today at 12:56:42 PM
Insert Quote
1:53 PM - Daswiruch - #PCMR: if you went to an ugly contest, what do you think you would place?
1:53 PM - Forty People: first :(
1:54 PM - Daswiruch - #PCMR: correct in one way, but you would be disqualified because you won last year
1:54 PM - Daswiruch - #PCMR: >:)
1:54 PM - Forty People: good job on stealing my spot in first place then
1:54 PM - Daswiruch - #PCMR: oh stuff i fired some shots and they richocheted back at me
Posted by: Kohoutek   Posted on: Today at 12:52:11 PM
Insert Quote
http://i.imgur.com/8GBlnOG.png STIF JAPS, PIL GEYTS, LENIS TORFLELS
Posted by: ßlöükfáce   Posted on: Today at 12:50:14 PM
Insert Quote

Posted by: MTrRxx   Posted on: Today at 12:33:39 PM
Insert Quote
http://forum.blockland.us/index.php?topic=270142.0

Hoooleeee forgetin shiiiit it'sa dinooooosaaaur
Posted by: dkamm65   Posted on: Today at 11:49:14 AM
Insert Quote
Code:
// ==UserScript==
// @name        Reddit comment vote history
// @namespace   https://github.com/Farow/userscripts
// @description Saves the comments you vote on
// @include     /^https?:\/\/[a-z]+\.reddit\.com\/(?:(?:r\/[\da-z_:+-]+\/)?comments|user\/[\da-z_]+)/
// @version     1.00
// @grant       GM_getValue
// @grant       GM_setValue
// @grant       GM_deleteValue
// @grant       GM_listValues
// ==/UserScript==

/*
   Changelog:

      2014-08-31 - 1.00 - Initial release
*/

'use strict';

init();

function init() {
   /* create a history button on user profiles */
   if (/^https?:\/\/[a-z]+\.reddit\.com\/user\/[\da-zA-Z_]/.exec(document.URL)) {
      create_history_button();
   }

   let comments = document.getElementsByClassNa me('comment');
   if (comments.length === 0) {
      return;
   }


   /* register events for upvoting and downvoting comments */
   for (let i = 0; i < comments.length; i++) {
      comments.children[1].children[0].addEventListener('click', comment_vote); /* upvote */
      comments.children[1].children[1].addEventListener('click', comment_vote); /* downvote */
   }
}

function comment_vote() {
   let comment      = { };
   let comment_node = this.parentNode.parentNode;
   comment.id       = comment_node.dataset.fullname;

   /* upvoted */
   if (this.classList.contains('upmod')) {
      comment.direction = 'up';
   }
   /* downvoted */
   else if (this.classList.contains('downmod')) {
      comment.direction = 'down';
   }
   /* no vote */
   else {
      remove_comment(comment.id);
      return;
   }

   comment.author = comment_node.getElementsByCla ssName('tagline')[0].getElementsByClassName('author')[0].textContent;
   comment.time   = comment_node.getElementsByCla ssName('tagline')[0].getElementsByTagName('time')[0].dateTime;
   comment.text   = comment_node.getElementsByCla ssName('md')[0].innerHTML;
   comment.link   = comment_node.getElementsByCla ssName('buttons')[0].getElementsByTagName('a')[0].href;

   save_comment(comment);
}

function create_history_button() {
   let tabmenu = document.getElementsByClassNa me('tabmenu')[0];

   if (tabmenu === undefined) {
      return;
   }


   let button = document.createElement('li');
   let link  = document.createElement('a');

   link.classList.add('choice');
   link.href = '#';
   link.textContent = 'comment vote history';

   button.classList.add('comment-vote-history');
   button.appendChild(link);
   tabmenu.appendChild(button);

   link.addEventListener('click', function (){ fix_sorting_menu(); display_comments('new'); });
}

function fix_sorting_menu() {
   /* make the sort menu work for the saved comments */
   let dropdown = document.getElementsByClassNa me('dropdown')[0];

   if (dropdown === undefined) {
      return;
   }

   dropdown.children[0].textContent = 'new';
   dropdown = dropdown.nextSibling;

   /* remove all links */
   while (dropdown.hasChildNodes()){
      dropdown.removeChild(dropdown.lastChild);
   }

   /* create our own */
   let sort_by_new = document.createElement('a'),
      sort_by_old = document.createElement('a');

   sort_by_new.classList.add('choice');
   sort_by_new.textContent = 'new';
   sort_by_new.href = '#';
   sort_by_new.addEventListener('click', function () { set_sort_text(dropdown, 'new'); display_comments('new'); });

   sort_by_old.classList.add('choice');
   sort_by_old.textContent = 'old';
   sort_by_old.href = '#';
   sort_by_old.addEventListener('click', function () { set_sort_text(dropdown, 'old'); display_comments('old'); });

   dropdown.appendChild(sort_by_new);
   dropdown.appendChild(sort_by_old);
}

function set_sort_text(dropdown, sort) {
   dropdown.previousSibling.chil dren[0].textContent = sort;
}

function display_comments(sort_by) {
   let tabmenu    = document.getElementsByClassNa me('tabmenu')[0];
   let site_table = document.getElementById('siteTable');

   tabmenu.getElementsByClassNam e('selected')[0].classList.remove('selected');
   tabmenu.getElementsByClassNam e('comment-vote-history')[0].classList.add('selected');

   /* remove all comments */
   for (let i = site_table.children.length - 1; i > -1; i--) {
      site_table.removeChild(site_table.children);
   }

   let saved_comments = get_all_comments();

   /* sort */
   saved_comments.sort(function (a, b) {
      if (sort_by == 'new') {
         return Date.parse(b.time) - Date.parse(a.time);
      }

      return Date.parse(a.time) - Date.parse(b.time);
   });

   for (let i = 0; i < saved_comments.length; i++) {
      append_comment(site_table, saved_comments);
   }
}

function append_comment(where, comment) {
   let comment_div = document.createElement('div'),
      entry       = document.createElement('div'),
      date        = new Date(comment.time);

   /* create time tooltip string, similar to reddit's */
   let date_str = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][date.getUTCDay()] + ' ' +
      ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'][date.getUTCMonth()] + ' ' +
      date.getUTCDate() + ' ' + date.getUTCHours() + ':' + date.getUTCMinutes() + ':' + date.getUTCSeconds() + ' ' +
      date.getUTCFullYear() + ' UTC';

   /* markup for a comment */
   comment_div.innerHTML =
      '<div class="midcol">\n' +
      '   <div class="arrow up' + (comment.direction == 'up' ? 'mod' : '') + '"></div>\n' +
      '   <div class="arrow down' + (comment.direction == 'down' ? 'mod' : '') + '"></div>\n' +
      '</div>\n' +
      '<div class="entry">\n' +
      '   <p class="tagline">\n' +
      '      <a href="/user/' + comment.author + '" class="author">' + comment.author + '</a>\n' +
      '      <time datetime="' + comment.time +'" title="' + date_str + '">' + time_ago(comment.time) + '</time>\n' +
      '   </p>\n' +
      '   <div class="usertext-body">\n' +
      '      <div class="md">\n' +
      '         ' + comment.text + '\n' +
      '      </div>\n' +
      '   </div>\n' +
      '   <ul class="flat-list buttons">\n' +
      '      <li><a href="' + comment.link +'">permalink</a></li>\n' +
      '      <li><a href="' + comment.link +'?context=3">context</a></li>\n' +
      '      <li><a href="' + comment.link.substr(0, comment.link.lastIndexOf('/') + 1) +'">comments</a></li>\n' +
      '      <li><a href="#" class="remove" data-fullname="' + comment.id + '">remove</a></li>\n' +
      '   </ul>\n' +
      '</div>\n'
   ;

   comment_div.getElementsByClas sName('remove')[0].addEventListener('click', function () {
      remove_comment(this.dataset.fullname);
      this.textContent = 'removed';
   });

   comment_div.classList.add('thing', 'comment', 'id-' + comment.id);
   comment_div.style.setProperty('margin-bottom', '10px');

   where.appendChild(comment_div);
}

function get_comment(comment_id) {
   return JSON.parse(GM_getValue(comment_id));
}

function get_all_comments() {
   /* convert JSON strings to objects */
   return GM_listValues().map(function (comment_id) {
      return get_comment(comment_id);
   });
}

function save_comment(comment) {
   GM_setValue(comment.id, JSON.stringify(comment));
}

function remove_comment(comment_id) {
   GM_deleteValue(comment_id);
}

/* authored by TheBrain, at http://stackoverflow.com/a/12475270 */
function time_ago(time) {
   switch (typeof time) {
      case 'number': break;
      case 'string': time = +new Date(time); break;
      case 'object': if (time.constructor === Date) time = time.getTime(); break;
      default: time = +new Date();
   }

   let time_formats = [
      [         60,      'seconds',                   1], // 60
      [        120, '1 minute ago', '1 minute from now'], // 60*2
      [       3600,      'minutes',                  60], // 60*60, 60
      [       7200,   '1 hour ago',   '1 hour from now'], // 60*60*2
      [      86400,        'hours',                3600], // 60*60*24, 60*60
      [     172800,    '1 day ago',          'Tomorrow'], // 60*60*24*2
      [     604800,         'days',               86400], // 60*60*24*7, 60*60*24
      [    1209600,   '1 week ago',         'Next week'], // 60*60*24*7*4*2
      [    2419200,        'weeks',              604800], // 60*60*24*7*4, 60*60*24*7
      [    4838400,  '1 month ago',        'Next month'], // 60*60*24*7*4*2
      [   29030400,       'months',             2419200], // 60*60*24*7*4*12, 60*60*24*7*4
      [   58060800,   '1 year ago',         'Next year'], // 60*60*24*7*4*12*2
      [ 2903040000,        'years',            29030400], // 60*60*24*7*4*12*100, 60*60*24*7*4*12
   ];
   let seconds = (+new Date() - time) / 1000;

   if (seconds < 2) {
      return 'just now';
   }

   let i = 0,
      format;

   while (format = time_formats[i++]) {
      if (seconds < format[0]) {
         if (typeof format[2] == 'string') {
            return format[1];
         }
         else {
            return Math.floor(seconds / format[2]) + ' ' + format[1] + ' ago';
         }
      }
   }

   return time;
}


Powered by SMF 1.1.20 | SMF © 2013, Simple Machines
Page created in 0.057 seconds with 12 queries.





I was lying in bed, when I felt something go up my starfish. I flinched and turned around quickly, I saw Cthulhu. At that moment, my life changed. He informed me of my destiny, to defeat the great god Spongebob and save the universe from the great cleansing. I grabbed the Katana that had been passed down in my family through generations and set off on my quest to smack a bitch.

smokey and the bandit

I'm boring :c

Fixed a client crash related to the main menu
Fixed players not creating gibs when they are killed
Fixed player glow effects not drawing correctly
Fixed the Rescue Ranger being able pick-up buildings through walls
Fixed map-placed buildings being removed from the map during a round restart
Fixed sentry guns having ammo if they finished building after a Merasmus curse had started
Fixed Engineers being able to pick-up buildings during Merasmus's third-person curses
Updated the string used to display the kill stat for the Strange Horseless Headless Horseman's Headtaker

Uh okay