Keegan Henry

  • Random
  • Archive
  • RSS
  • Ask
  • Submit
Haswell
Pop-upView Separately

Haswell

    • #haswell
    • #intel
    • #chip
    • #cpu
  • 2 weeks ago
  • 3
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Computer Science Blows My Mind

“Computer science is an interesting discipline. Often, I find myself inadequately trying to communicate why I find it so fascinating. I think I get the closest when describing computer science things that ‘blow my mind’.

This post is… basically just a list of computer science things I think are cool.”

    • #computer science
    • #blows my mind
    • #blog
  • 2 weeks ago
  • 1
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
'\x3ciframe width=\x22500\x22 height=\x22375\x22 src=\x22http://www.youtube.com/embed/wW9CAH9nSLs?wmode=transparent\x26autohide=1\x26egm=0\x26hd=1\x26iv_load_policy=3\x26modestbranding=1\x26rel=0\x26showinfo=0\x26showsearch=0\x22 frameborder=\x220\x22 allowfullscreen\x3e\x3c/iframe\x3e'

At PyCon Solomon Hykes shows docker to the public for the first time

    • #docker
    • #linux
    • #pycon
  • 1 month ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Happy Valentines Day (Math)

  • 3 months ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Ubuntu for Phones

Ubuntu Phone OS

“Web apps are first class citizens on Ubuntu, with APIs that provide deep integration into the interface. HTML5 apps written for other platforms can be adapted to Ubuntu with ease, and we’re targeting standard cross-platform web app development frameworks like PhoneGap to make Ubuntu ‘just work’ for apps that use them.

Our unique web app system lets you quickly adapt any web property for installation as an app on the phone, running independently of the browser, with its own icon and access to system services. This means that all the big names will be available to Ubuntu phone users at launch.

But Ubuntu isn’t limited to HTML5. For rich applications with gorgeous movement and transitions, and graphics-heavy games, Ubuntu provides an amazing native developer environment. It uses QML to give you a really slick, easy development experience for native apps with engines in C or C++, and JavaScript for UI glue that isn’t performance critical. We also give you full native OpenGL, which the top games companies are using to make incredible games. That’s why developers like EA, Valve Software and Unity Technologies are committing to Ubuntu right now.”

    • #ubuntu
    • #linux
    • #phone
  • 4 months ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
“Instagram”
Pop-upView Separately

“Instagram”

Source: xkcd.com

    • #xkcd
    • #comic
    • #instagram
  • 4 months ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
'\x3ciframe width=\x22500\x22 height=\x22375\x22 src=\x22http://www.youtube.com/embed/Jc8M9-LoEuo?wmode=transparent\x26autohide=1\x26egm=0\x26hd=1\x26iv_load_policy=3\x26modestbranding=1\x26rel=0\x26showinfo=0\x26showsearch=0\x22 frameborder=\x220\x22 allowfullscreen\x3e\x3c/iframe\x3e'

Code Comprehension with Eye Tracking

    • #video
    • #code
    • #eye tracking
  • 5 months ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Some Holiday Javascript

Since it’s almost White Anglo Saxon Winter Privilege Night, I thought I would make some falling snow with dynamic “wind” using HTML5, javascript, and a little bit of math, just for fun.

First step, building a canvas

<canvas id="canvas"></canvas>

Then, using CSS, I create my margins and choose a background color. Since I like winter nights, I chose black as the background. This can be easily changed.

* {margin:0; padding: 0;}
body{ background: #000; }
canvas { display: block; }

Now using javascript, I initialize the canvas, create some dimensions, and make some snow.

window.onload = function(){

var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d");

var W = window.innerWidth;
var H = window.innerHeight;
canvas.width = W;
canvas.height = H;

var maxSnow = 25;
var snow = [];

for(car i = 0; i < mp; i++{
    particles.push({
        x: Math.random()*W,
        y: Math.randon()*H,
        r: Math.random()*4+1,
        d: Math.random()*maxSnow
    })
}

Now to draw the snowflakes

function draw(){
    context.clearRect(0, 0, W, H);
    context.fillStyle = "rgba(255,255,255,0.8)";
    context.beginPath();
    for(var i = 0; i < maxSnow; i++){
        var s = snow[i];
        context.moveTo(s.x, s.y);
        context.arc(s.x, s.y, s.r, 0, Math.PI*2, true);
    }
    context.fill();
}

The best part about this script is that the snow flakes not fall in a straight line. Instead, to create the effect of wind pushing the snow back and forth, I will be using sine and cosine waves to create paths for the snow as it falls to the bottom of the page. This gives it a little more polish and more dynamic feel. Also, when the snow reaches the bottom of the page, send it back to the top.

var angle = 0; 
function update(){
    angle += 0.1;
    for(var i=0; i < maxSnow; i++){
        var s = snow[i];
        p.x += Math.sin(angle) * 2;
        p.y += Math.cos(angle+s.d) + 1 + s.r/2;
        if(s.x > W || s.x < 0 || s.y > H){
            snow[i] = {x: Math.random()*W, y: -10, r: s.r, d: s.d}
        }
    }
}

And the final step, animate the whole thing on a loop.

setInterval(draw, 33);

You can view an example page here. Credit to @ruby_on_tails for the help.

Merry Christmas.

    • #javascript
    • #html5
    • #snow
  • 5 months ago
  • 2
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

New Blog

This is now going to be my personal blog. I’ll try to update it semi-frequently.

My less then serious photo/video/music blog can still be found here

    • #first
  • 5 months ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Portrait/Logo

About

Personal blog of CSUS Computer Science student: Keegan Henry

Top

  • RSS
  • Random
  • Archive
  • Ask
  • Submit
  • Mobile
Effector Theme by Pixel Union