Irhad Babić

My personal website and blog

  • Random DateTime in the range

    So You need a random DateTime value in some range, and C# Random class does not provide Random.NextDateTime(from, to). Here's my simple solution for this problem... public static DateTime NextDateTime(this Random rnd, DateTime dateTimeFrom, DateTime dateTimeTo) { //Calculate cumulative number of seconds between two DateTimes Int32 Days = (dateTimeTo - dateTimeFrom).Days * 60 * ...

  • Solution to the gcc error: undefined reference to `sqrt’

    The sqrt( ) functions return the square root of the argument x . If the argument is less than zero, a domain error occurs. Here's simple program that uses sqrt() #include <math.h> int main(int argc, char*argv[]){ int x = 144 int retval = sqrt(x); return 0; } Now, if You use this function and get the following gcc ...

  • Solution to the gcc error: undefined reference to `ilogb’

    The ilogb( ) functions return the exponent of their floating-point argument as a signed integer. If the argument is not normalized, ilogb( ) returns the exponent of its normalized value. Here's simple program that uses ilogb() #include <math.h> int main(int argc, char*argv[]){ double x = 1234.5678; int retval = ilogb(x); return 0; } Now, if You use this ...

  • The War between Deveopers, Designers and Project Managers

    I liked this pic a lot, and I just wanted to share it with all the others...

  • Sir Ken Robinson says schools kill creativity

    I'd like to share with You an inspirational video by Sir Ken Robinson. Sir Ken Robinson makes an entertaining and profoundly moving case for creating an education system that nurtures (rather than undermines) creativity. Sir Ken challenges the way we're educating our children. He champions a radical rethink of our ...

Microsoft just presented their new prototype system consisting of projector and a 3d scanner. This system uses Kinect but Microsoft do not want to reveal any more technical details. Here's their teaser video showing how should actual experience look like once the system (eventually) goes into production. Personally, I'm quite skeptical ...

Continue

So You need a random DateTime value in some range, and C# Random class does not provide Random.NextDateTime(from, to). Here's my simple solution for this problem... public static DateTime NextDateTime(this Random rnd, DateTime dateTimeFrom, DateTime dateTimeTo) { //Calculate cumulative number of seconds between two DateTimes Int32 Days = (dateTimeTo - dateTimeFrom).Days * 60 * ...

Continue

The sqrt( ) functions return the square root of the argument x . If the argument is less than zero, a domain error occurs. Here's simple program that uses sqrt() #include <math.h> int main(int argc, char*argv[]){ int x = 144 int retval = sqrt(x); return 0; } Now, if You use this function and get the following gcc ...

Continue

The ilogb( ) functions return the exponent of their floating-point argument as a signed integer. If the argument is not normalized, ilogb( ) returns the exponent of its normalized value. Here's simple program that uses ilogb() #include <math.h> int main(int argc, char*argv[]){ double x = 1234.5678; int retval = ilogb(x); return 0; } Now, if You use this ...

Continue

I liked this pic a lot, and I just wanted to share it with all the others...

Continue

I'd like to share with You an inspirational video by Sir Ken Robinson. Sir Ken Robinson makes an entertaining and profoundly moving case for creating an education system that nurtures (rather than undermines) creativity. Sir Ken challenges the way we're educating our children. He champions a radical rethink of our ...

Continue

You are writing Your first Google Chrome extension with cross-site scripting, and You're getting XMLHttpRequest cannot load http://yourdomain. Origin chrome-extension://[xxx] is not allowed by Access-Control-Allow-Origin. error? This problem held me down today for some time, but solution is actually quite simple (and obvious, I must say, dunno why it took me so long). All ...

Continue

Ironically, my first article is about a wordpress issue, and I was a wordpress virgin until yesterday :). Well, I needed solution to this moments ago, and here is that solution... As I didn't find an option in the wordpress menus to do this, I had to make my hands "dirty". What ...

Continue
  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

Popular Posts

Removing comments fr

Ironically, my first article is about a wordpress issue, and ...

Solution to the gcc

The ilogb( ) functions return the exponent of their floating-point ...

Origin chrome-extens

You are writing Your first Google Chrome extension with cross-site ...

Sir Ken Robinson say

I'd like to share with You an inspirational video by ...

The War between Deve

I liked this pic a lot, and I just wanted ...