Pages

Wednesday, December 30, 2015

Meteor

I played around with meteor yesterday and I have mixed feelings. First of all, I was impressed that the whole plaform (it is not just a framework but an end-to-end development platform for all devices and browsers that matter because of the power of JavaScript). It worked out of the box on my Windows machine and it deployed out of the box to the site (http://happy2016.meteor.com/). I watched some videos about meteor and I like their bottom line of bringing to the world what Facebook and Google have been hiding from us for their revenue. Fast interactive (reactive) web technologies. There are a few things that make me skeptical as to whether meteor is the future. First of all, do we really want to code in Javascript? I have found debugging a minor application to be a nightmare,...

Tuesday, December 22, 2015

jQuery UI style hack

Some of us still use jQuery UI In fact, it wasn’t too bad, is still supported by all modern browsers, and performs reasonably well on mobile. There is one issue: the graphics look horribly 2010. jQuery UI offers a user interface to cherrypick your own CSS (it’s great and kind of works: look at their themeroller here. Still, it doesn’t let you replace the .png icons with font icons (fontawesome, dashicons). I didn’t feel like overhauling the thing so I came up with a simple hack that works for me (on this site): .ui-corner-all { border-radius:0!important} .ui-state-hover {border:0!important;background:transparent!important} .ui-widget-header...

Sunday, December 20, 2015

Bob the Builder likes women with brick tits. ...

Tuesday, December 8, 2015

Weekly changing random number

Simple task: How do we generate a random number that automatically changes every certain period of time. Of course, we use the week number when calculating the random number. Also, we have to cache a “large integer” that will not change until the end of the week to get a deterministic random-enough number. The result can look something like this when we integrate it in a WordPress menu and we only take into account the tags with a minimum number of posts. $the_tags = get_tags(); foreach ($the_tags as $t) { if ($t->count>INFOCUS_MIN) $ft[] = $t; } $tag = $ft[abs(SOME_LARGE_INTEGER * date(“W”) % sizeof($ft))]; $link = get_tag_link($tag->term_id); $infocus = ‘<li id=”menu-item-featured-tag” class=”menu-item”><a href=”‘.$link.'”>’ . __(‘In focus: ‘) . $tag->name.'</a></li>’;...
Page 1 of 1412345Next

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Lady Gaga, Salman Khan