Explore Threads

Noteworthy / Threads / Pages

Nin10doh   -   7 hours 44 mins ago

wondering if someone could help me with something, I would like my bot to make one of my commands be randomized instead of it responding to the one who activates. What I mean is I have a command that is registered when entering !slap. When that command is entered the bot goes "/me slaps $nick" is there anyway in getting it to be randomized and attack anyone in the chat

More
 Respond  
Hawkee   -  3 days ago

I just made a minor change to the site. Now when threads are too tall they will be collapsed and include a "More" button to expand them. I think this will help make the activity stream easier to view at a glance.

More
Sorasyn   -  4 days ago

Alright, so I've been working on a Checkers game in my free time using HTML 5 and JS. While I've not made a lot of progress just yet, I have hit somewhat of a brick wall. I'm not all that proficient in JS just yet, but I've done a fair amount of research concerning it, to little avail.

My problem is I can create and load images just fine, but when it comes to drawing them properly onto the canvas is when I get problems. When using drawImage(...); calls outside a loop, they will draw correctly, and more importantly, at the correct coordinates. Conversely, if I were to place a drawImage(...); call inside a loop, the images will display correctly, but at the coordinates of the last image to be drawn.

document.addEventListener('DOMContentLoaded',onLoad,false)

/* Holds information about a game piece on the board */
function onLoad() {
    /* Grab the canvas element & context drawer */
    var canv = document.getElementById("board");
    var ctxt = canv.getContext("2d");

    /*Initialize Board & Game Values*/
    var rows      = 8;
    var cols      = 8;
    var evenTiles = "#CCC";
    var oddTiles  = "#444";
    var board     = [];
    var red       = new Image();
    red.src       = "Images/Red.png";
    var black     = new Image();
    black.src     = "Images/Black.png";

    /* Initialize the underlying array "pieces" to default values */
    for (a = 0; a < rows; a++) {
        row = [];
        for (b = 0; b < cols; b++) {
            if (a < 2) {
                if ((a % 2) == 0)
                    if ((b % 2) != 0)
                        row.push(new Piece(Piece.Color.RED, Piece.Status.NORMAL, b, a));
                    else
                        row.push(null);
                else
                    if ((b % 2) == 0)
                        row.push(new Piece(Piece.Color.RED, Piece.Status.NORMAL, b, a));
                    else
                        row.push(null);
            }
            else if (a > (rows - 3)) {
                if ((a % 2) == 0)
                    if ((b % 2) != 0)
                        row.push(new Piece(Piece.Color.BLACK, Piece.Status.NORMAL, b, a));
                    else
                        row.push(null);
                else
                    if ((b % 2) == 0)
                        row.push(new Piece(Piece.Color.BLACK, Piece.Status.NORMAL, b, a));
                    else
                        row.push(null);
            }
            else
                row.push(null);
        }
        board.push(row);
    }

    /* Draw the game board to the canvas */
    for (a = 0; a < rows; a++) {
        var row = (canv.height / rows) * a;
        for (b = 0; b < cols; b++) {
            var col = (canv.width / cols) * b;

            if ((a % 2) == 0)
                if ((b % 2) == 0)
                    ctxt.fillStyle = evenTiles;
                else
                    ctxt.fillStyle = oddTiles;
            else
                if ((b % 2) == 0)
                    ctxt.fillStyle = oddTiles;
                else
                    ctxt.fillStyle = evenTiles;

            ctxt.fillRect(row, col, (canv.height / rows), (canv.width / cols));

            //# PROBLEMATIC CODE #
            if (board[a][b] != null) {
                var piece = board[a][b];

                if (piece.Color == Piece.Color.RED)
                    red.addEventListener("load", function () { ctxt.drawImage(red, piece.X * 100, piece.Y * 100) }, false);
                else
                    black.addEventListener("load", function () { ctxt.drawImage(black, piece.X * 100, piece.Y * 100) }, false);
            }
            //# END PROBLEMATIC CODE #
        }
    }
}

The above code produces the following which draws all the pieces on top of one another at the last image's coordinates.

result

I'm thinking that the coordinates are changing, before the image is fully drawn, thus prompting the renderer to keep re-drawing it each time the variable changes. However, on the other hand, one would think that it has ample time to fully draw an image before it's called upon a second time.

Any suggestions?

More
Hawkee   -  4 days ago

I've been considering what to do about the Projects/Scripts section and I believe the best course of action is to convert them to the new page format. Files currently hosted on Hawkee will be grandfathered in with no future support for file storage. Sites like GitHub are better suited for hosting. This will allow me to permanently shut that section down and reduce the need to keep those themes and styles up to date. Let me know if you have any thoughts of concerns on this matter.

More
 Respond  
Buggsy   -  5 days ago

I have created a .mrc file that uses a .txt file for the popups of it and would like to set a command that, when typed, will play one of the various .txt files at random. If anyone could help me out with this, please get in touch with me on here and let me know. All help is appreciated.

More
 Respond  
afp_romania   -  5 days ago

Please, make your site to work on Mozilla Firefox from mobile. I cant navigate anymore.

More
nutty   -  5 days ago

Site looks good .. Love the new lay out :)

More
 Respond  
Hawkee   -  6 days ago

material ui - A CSS Framework and a Set of React Components that Implement Google's Material Design.

More
Hawkee   -  7 days ago

Evil Icons - While I'm not a fan of the name, I like the thin style of these icons. This is definitely becoming a trend lately.

More
Hawkee   -  8 days ago

WOW.js - Reveal Animations When You Scroll

More
Hawkee   -  9 days ago

I've been considering how to structure our permission system. My goal is to encourage well thought out posts while limiting spammy activity. For one I want to limit voting so as to avoid point manipulation. I'm considering requiring a certain point total in order to unlock voting in the first place. Then after that I may limit each individual to X number of votes depending on their level. For example: 1 vote per day with more than 15 points, 3 votes per day with more than 100 points, etc. I'm also considering restricting new threads. I may limit new users to one thread per day with incremental unlocking as well. What are your thoughts?

More
Dillie-O   -  9 days ago

Not quite a bug, more of maybe a suggestion. When I receive a notice that you like my comment, it looks like this (see attachment). I'm always confused if that second "Hawkee" is a link to you or not. What about changing the linked text to "your Comment" instead? I've noticed in other notifications, like if my thread is liked, the "thread" text is capitalized, which makes sense.

More
Hawkee   -  9 days ago

Looks like the redesign got us on to Product Hunt today. We're getting quite an influx of traffic as a result.

More
Sorasyn   -  9 days ago

Something happened to my wonderful avatar picture. I'm now a blue circle with a white power button.

More
Dillie-O   -  10 days ago

Just in case you haven't seen it yet, Zurb just released a "Foundation for Apps" framework. Its the same Zurb you know and love, but they've tweaked out even more to be more mobile app friendly and are using AngularJS on the backend to get things going. I'm working on rebuilding a project of mine now to use it. Their CLI tool seems a little buggy for the moment, but if you use the standard node/bower/bundler install route, you should be okay.

http://foundation.zurb.com/apps/

More
Jordy19   -  10 days ago

@Hawkee will you make a dark theme? This theme is so bright when I view it at night. ._.

More
sean   -  10 days ago

@Hawkee The link to Account from within the right off canvas nav doesn't work :) http://hawkee.com/account is a white (blank) page. Just an FYI

More
illhawkthat   -  10 days ago

Hey @Hawkee great job on the redesign! Looks very clean.

Quick bug report, looks like something went wrong for looking up "snippet"?

More
F*U*R*B*Y*   -  11 days ago

I've been out of PHP too long, and can't get a simple preg_match to work for me. Perhaps I'm going at this the wrong way, can anyone give me some help? hahaha!!!

<?php

$url="http://dtkbans.com/index.php?p=banlist&searchText=".$_GET['STEAMID']."&Submit=";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec ($ch);
curl_close ($ch);

preg_match('/<i>Total Bans: |\d|</i>/igm', $data, $matches);

print_r($matches);

?>

I basically want it to return the amount of Total Bans. but its not outputting anything :(

More
Jordy19   -  11 days ago

Damn, this new layout of Hawkee.com is SEXY!

How can I see a list of the most visited pages?

Bug: When you have the sidebar open and click previous page and then forward page at the browser the sidebar is still open.

More
Hawkee   -  12 days ago

Welcome to the newly redesigned Hawkee.com! We've made extensive changes to the design in order to make it more readable and modern. There may be bugs, so please report anything you find. Here's a brief changelog:

  • New logo!
  • New font for headings: Bree Serif
  • New navbar with left and right off-canvas menus.
  • New posting mechanism.
  • More whitespace and larger fonts.
  • Page liking now happens at the bottom of pages.
  • Modal dialogs use new grow and fade animations.
  • Centered text in page titles.
  • No more footer (links are now in left off-canvas menu)
  • Simplified registraton/login system.
  • New Google noCAPTCHA with hopefully fewer spam accounts.
  • Almost every page has been tweaked in one way or another.
More
Hawkee   -  13 days ago

Has anybody tried polymer before? I found it while I was looking into Google's "Material Design". It looks like a very interesting application design framework.

More
 Respond  
Hawkee   -  14 days ago

I've completely redone the navigation system replacing most of it with offcanvas menus. I decided to go with a sliding animation to make it appear like the menus are being uncovered by the site. I've also decided to go with centered headings, even larger fonts and more whitespace.

More
Hawkee   -  15 days ago

Google introduced a no CAPTCHA reCAPTCHA, https://developers.google.com/recaptcha/

More
sanamx   -  15 days ago

anyone can help me how to halt this command for some channels ?

State ( $+ $group(#state) $+ ) .ON:.enable #state .OFF:.disable #state

More
 Respond  
Hawkee   -  16 days ago

So when I was considering the terminology for "Pages" the idea to use "Stories" crossed my mind, but I nixed it because it doesn't necessarily imply something instructional. I'm starting to reconsider that. What do you think about using the term "Story" to represent a page?

More
BlueThen   -  16 days ago

Finally published my newest portfolio: http://jaredcounts.com/

No more Java applets!

More
Dillie-O   -  17 days ago

Anybody work with Firefox Developer Edition yet? So far I've enjoyed it, though the Mac version has issues quitting from time to time. Not a lot different from Chrome, but I find it a little bit easier to navigate around with.

More
BlueThen   -  17 days ago

I've been spending my spare time for the past couple of months redoing my portfolio.

I'm not very experienced with design, but this is turning into something that I'm feeling pretty good about.

Any feedback/opinions appreciated!

Edit: You can view the website live at http://bluethen.com/portfolio4/

More
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.