Irhad Babić

My personal website and blog

  • Wrong night to be wearing scarlet color t-shirt in Seattle.

    Tonight was a game night here in Seattle. I new that even though I came to Seattle on business (and I'm not American, nor I know American football very well). My friend picked me up in the afternoon and we went to some local restaurant for a lunch and to ...

  • Samsung announced Galaxy Round, (not so much) ground braking new curved display phone/phablet.

    Samsung Galaxy Round is now officially announced and I must say right away, from what I've read this morning about it, I'm pretty disappointed. Here's why... First of all, it'll be waaaaaaaaaaaaaaay too expensive (1000USD) although it's somewhat inferior to it's cheaper brother, Note 3 (smaller capacity battery for example). I can ...

  • Enter the Sarajevo photowalk and get a chance for winning photo equipment worth more than 13000 USD

    On Saturday, October 5, 2013, the world will walk again with Scott Kelby, president of Kelby Training and #1 bestselling photography and technology book author, in the 6th Annual Worldwide Photo Walk™. Scott Kelby’s  Worldwide Photo Walk is the world’s largest global social photography event in the history of photography itself. ...

  • Bad photo – good story. Failing to properly recapture an image I made before.

    Last year I went with my friend, Nihad, on an old medieval fortress above downtown Sarajevo, in a neighborhood called Jekovac. We stayed for some time waiting for a nice light, hoping we'll capture a good landscape photo. We took some OK pictures, but I wanted to capture a nightscape ...

  • 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 * ...

Tonight was a game night here in Seattle. I new that even though I came to Seattle on business (and I'm not American, nor I know American football very well). My friend picked me up in the afternoon and we went to some local restaurant for a lunch and to ...

Continue

Samsung Galaxy Round is now officially announced and I must say right away, from what I've read this morning about it, I'm pretty disappointed. Here's why... First of all, it'll be waaaaaaaaaaaaaaay too expensive (1000USD) although it's somewhat inferior to it's cheaper brother, Note 3 (smaller capacity battery for example). I can ...

Continue

On Saturday, October 5, 2013, the world will walk again with Scott Kelby, president of Kelby Training and #1 bestselling photography and technology book author, in the 6th Annual Worldwide Photo Walk™. Scott Kelby’s  Worldwide Photo Walk is the world’s largest global social photography event in the history of photography itself. ...

Continue

Each Thursday, Scott Kelby gives stuff away on his blog. He calls it "Free Stuff Thursday". I've started with digital photography because of Scott (when I read his first book on digital photography, and later on the rest of them, 4 in total) and I've been following him around on ...

Continue

Last year I went with my friend, Nihad, on an old medieval fortress above downtown Sarajevo, in a neighborhood called Jekovac. We stayed for some time waiting for a nice light, hoping we'll capture a good landscape photo. We took some OK pictures, but I wanted to capture a nightscape ...

Continue

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

Random DateTime in the range

Posted by Irhad Babic 0 Comment

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
  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

Popular Posts

Removing comments fr

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

Samsung announced Ga

Samsung Galaxy Round is now officially announced and I must ...

Enter the Sarajevo p

On Saturday, October 5, 2013, the world will walk again ...

WooHoooo I won James

Each Thursday, Scott Kelby gives stuff away on his blog. ...

Bad photo - good sto

Last year I went with my friend, Nihad, on an ...