The Daily Dose

laugh every day with cartoons jokes and humor
  • Home
  • About
    • Press
      • Press Release – Announcing Laughzilla the Third ebook
      • Press Release – The Daily Dose Kicks Off Its 16th Year with New Books and More Irreverent Laughter
      • Press Release – Themes Memes and Laser Beams Now Available in Paperback
      • Press Release – Announcing Themes Memes and Laser Beams
      • In The News
    • Privacy
  • Archive
  • Books
  • Shop
  • Collections
    • Galleries
      • Gallery
      • Captions
      • Flash Cartoons & Greeting Cards
        • Laughzilla’s Oska Flash Animation Cartoon Greeting Cards
        • Oska Cupid Love Humor
    • #OccupyWallStreet
    • cats
    • China
    • Food
      • Hors d’oeuvres
        • Ball of Cream Cheese
      • Entrees / Main Courses
        • Meatballs with Baked Beans and Celery
    • Gadaffy
    • Google
  • Links
  • Video
  • Submit a joke
DeviantART Facebook Twitter Flickr pinterest YouTube RSS

Subscribe for Free Laughs!


 

Latest Comics

  • This Memorial Day, Trump Meme Coin Congratulates Profit Takers
  • 25 Years of The Daily Dose
  • The Best Cartoons
  • Bitcoin sings “Fly Me To The Moon”
  • 22 years of The Daily Dose

Comic Archive

Why World Wide Web Servers Crash

Daily Dose News Roundup

  • Smack Technologies raises $61m as the Pentagon’s hurry becomes a battlefield-AI business model
  • Alibaba sells its Lingxi games arm to fund an all-in bet on AI
  • Altman says four years of college may be more than the world now needs
  • EV prices rose for the first time in 2026, and the discounts are why
  • Pony.ai and Uber to put more than 2,000 Chinese robotaxis on European streets

Quotable

"iMac, iPhone, iBook, iPod. iThink Apple is the clear choice of Generation Ego." ~ Yasha Harari

Fresh Baked Goods

Get The Daily Dose's ebook: Laughzilla the Third - A Funny Stuff Collection of 101 Cartoons from TheDailyDose. Click here to get the e-book on Amazon kdp. Laughzilla the Third (2012) The Third Volume in the Funny Stuff Cartoon Book Collection Available Now.

Click here for the Paperback edition


Support independent publishing: Buy The Daily Dose's book: Themes Memes and Laser Beams - A Funny Stuff Collection of 101 Cartoons by Laughzilla from TheDailyDose. Click here to get the book on Amazon. Themes Memes and Laser Beams - The Second Volume in the Funny Stuff Cartoon Book Collection.

Click Here to get the book in Paperback While Available on Amazon

Themes Memes and Laser Beams - 101 Cartoons by Laughzilla. Get the e-book on Lulu.

Click Here to get The Daily Dose Cartoon ebook on amazon kindle

Funny Stuff :
The First Cartoon Book
from The Daily Dose.
Available on Lulu.

a couple of laughzillas on a blue diamond background

Yahoo launches Games Network platform for developers, new Classic Games site for Android, iOS, and the Web

Mar19
by Sindy Cator on March 19, 2014 at 10:33 pm
Posted In: Around the Web, Insider, Mobile

Microsoft Makes $44.6 Billion Bid For Yahoo
Yahoo today announced a renewed push into games with the launch of its Yahoo Games Network platform and its Yahoo Classic Games site. The company says it already has more improvements and new features on the way, but for now it is happy to show off its cross-platform network for developers and “a great experience for our millions of users.” The Yahoo Games Network is a new platform for third-party game developers who want to take advantage of Yahoo’s large userbase for distributing their games. It includes onboarding services that help them authenticate players, monetize their games, provide social sharing,…

This story continues at The Next Web

└ Tags: syndicated
a couple of laughzillas on a blue diamond background

Daylight Saving Time Error

Mar19
by Sindy Cator on March 19, 2014 at 10:23 pm
Posted In: Around the Web, Windows API

It’s DST here in the US and I couldn’t be happier. I don’t care if my drive to work is pitch black, but the drive home? That’s another story.

One thing I learned since the clocks sprung forward is that the GetTimeZoneInformation API doesn’t work the way I thought. The TIME_ZONE_INFORMATION return type has a Bias property. Bias tells you how many minutes you are away from GMT. Or so I thought. It actually tells you how many minutes you are from GMT in standard time. The TIME_ZONE return value tells you if it’s daylight saving time or standard time. So you have to take both into account to get the correct time.

Here’s the API declaration

Private Type SYSTEMTIME
    wYear As Integer
    wMonth As Integer
    wDayOfWeek As Integer
    wDay As Integer
    wHour As Integer
    wMinute As Integer
    wSecond As Integer
    wMilliseconds As Integer
End Type

Private Type TIME_ZONE_INFORMATION
    Bias As Long
    StandardName(0 To 31) As Integer
    StandardDate As SYSTEMTIME
    StandardBias As Long
    DaylightName(0 To 31) As Integer
    DaylightDate As SYSTEMTIME
    DaylightBias As Long
End Type

”””””””””””””””””””””””
‘ These give symbolic names to the time zone
‘ values returned by GetTimeZoneInformation .
”””””””””””””””””””””””

Private Enum TIME_ZONE
    TIME_ZONE_ID_INVALID = 0        ‘ Cannot determine DST
    TIME_ZONE_STANDARD = 1          ‘ Standard Time, not Daylight
    TIME_ZONE_DAYLIGHT = 2          ‘ Daylight Time, not Standard
End Enum

Private Declare Function GetTimeZoneInformation Lib "kernel32" _
    (lpTimeZoneInformation As TIME_ZONE_INFORMATION) As Long

Private Declare Sub GetSystemTime Lib "kernel32" _
    (lpSystemTime As SYSTEMTIME)

And the updated procedure:

Public Function ConvertTimeToLocal(ByVal dtTime As Date, ByVal sZone As String) As Date
   
    Dim tzi As TIME_ZONE_INFORMATION
    Dim tz As TIME_ZONE
    Dim lGmtOff As Long
   
    tz = GetTimeZoneInformation(tzi)
   
    Select Case UCase(sZone)
        Case "EDT"
            lGmtOff = -4
        Case "EST", "CDT"
            lGmtOff = -5
        Case "CST", "MDT"
            lGmtOff = -6
        Case "MST", "PDT"
            lGmtOff = -7
        Case "PST"
            lGmtOff = -8
        Case vbNullString
            lGmtOff = -tzi.Bias / 60
    End Select
   
    If tz = TIME_ZONE_DAYLIGHT Then lGmtOff = lGmtOff – 1
   
    ConvertTimeToLocal = dtTime – (TimeSerial(0, tzi.Bias, 0) + TimeSerial(lGmtOff, 0, 0))
   
End Function

I also added a UCase around the zone because it’s just stupid not to have that. Enjoy saving the daylight, but remember you’ll owe it back this fall.

Update:

That’s why we write tests people.

Public Function ConvertTimeToLocal(ByVal dtTime As Date, ByVal sZone As String) As Date
   
    Dim tzi As TIME_ZONE_INFORMATION
    Dim tz As TIME_ZONE
    Dim lGmtOff As Long
    Dim lBias As Long
   
    tz = GetTimeZoneInformation(tzi)
   
    lBias = tzi.Bias
    If tz = TIME_ZONE_DAYLIGHT Then lBias = lBias – 60
   
    Select Case UCase(sZone)
        Case "EDT"
            lGmtOff = -4
        Case "EST", "CDT"
            lGmtOff = -5
        Case "CST", "MDT"
            lGmtOff = -6
        Case "MST", "PDT"
            lGmtOff = -7
        Case "PST"
            lGmtOff = -8
        Case vbNullString
            lGmtOff = -tzi.Bias / 60
            If tz = TIME_ZONE_DAYLIGHT Then lGmtOff = lGmtOff + 1
    End Select
   
    ConvertTimeToLocal = dtTime + (TimeSerial(0, lBias, 0) + TimeSerial(lGmtOff, 0, 0))
   
End Function

Public Sub Test_ConvertTimeToLocal()
   
    Dim dtTestTime As Date
   
    dtTestTime = TimeSerial(9, 46, 13)
   
    Debug.Assert (ConvertTimeToLocal(dtTestTime, vbNullString) – dtTestTime) < TimeSerial(0, 0, 1)
    Debug.Assert (ConvertTimeToLocal(dtTestTime, "CDT") – dtTestTime) < TimeSerial(0, 0, 1)
    Debug.Assert (ConvertTimeToLocal(dtTestTime, "EST") – dtTestTime) < TimeSerial(0, 0, 1)
    Debug.Assert (ConvertTimeToLocal(dtTestTime, "EDT") – (dtTestTime + TimeSerial(1, 0, 0))) < TimeSerial(0, 0, 1)
    Debug.Assert (ConvertTimeToLocal(dtTestTime, "CST") – (dtTestTime – TimeSerial(1, 0, 0))) < TimeSerial(0, 0, 1)
    Debug.Assert (ConvertTimeToLocal(dtTestTime, "MDT") – (dtTestTime – TimeSerial(1, 0, 0))) < TimeSerial(0, 0, 1)
    Debug.Assert (ConvertTimeToLocal(dtTestTime, "MST") – (dtTestTime – TimeSerial(2, 0, 0))) < TimeSerial(0, 0, 1)
    Debug.Assert (ConvertTimeToLocal(dtTestTime, "PDT") – (dtTestTime – TimeSerial(2, 0, 0))) < TimeSerial(0, 0, 1)
    Debug.Assert (ConvertTimeToLocal(dtTestTime, "PST") – (dtTestTime – TimeSerial(3, 0, 0))) < TimeSerial(0, 0, 1)

End Sub

└ Tags: syndicated
a couple of laughzillas on a blue diamond background

UK mobile operator EE is down for many users due to network issues [Updated]

Mar19
by Sindy Cator on March 19, 2014 at 9:34 pm
Posted In: Around the Web, Insider, Mobile, UK

Update March 20 09:25 GMT: A spokesperson for the company sent an update to let us know the problem has been fixed. If you’re still not seeing any signal, try switching your device off and on again.  Last night’s technical issue that caused a small proportion of our customers to experience problems with their signal has been resolved and all customers are now receiving a normal service. We apologise for the inconvenience caused to those customers affected. UK mobile operator EE is currently experiencing problems, preventing some people from using their phones for calls, texts or data. The problem appears to…

This story continues at The Next Web

└ Tags: news, syndicated
a couple of laughzillas on a blue diamond background

Facebook is testing a new persistent notification bar on Android, featuring your profile picture

Mar19
by Sindy Cator on March 19, 2014 at 9:22 pm
Posted In: Apps, Around the Web

Since the middle of last year, we’ve seen occasional mentions of the Facebook app for Android placing a persistent notification bar in the OS’ notification tray, one that stays in place whether it has anything to tell you or not. A new version being tested as of this week takes things a step further, adding your profile picture. While it certainly looks prettier than the previous version we’ve seen reported, I’m not sure many people will be comfortable with seeing their face appear every time they pull down their notification tray. I’m certainly not sure that I’ll keep it active, although…

This story continues at The Next Web

└ Tags: facebook, syndicated
a couple of laughzillas on a blue diamond background

Technology companies knew about data collection, NSA general counsel says

Mar19
by Sindy Cator on March 19, 2014 at 8:57 pm
Posted In: Around the Web, Insider

56667803-786x305
Technology companies targeted by the National Security Agency (NSA) were aware of the data being collected from them, NSA General Counsel Rajesh De said today. At a Privacy and Civil Liberties Oversight Board hearing, board member James Dempsey quizzed De for a few moments about the extent to which service providers were aware of their efforts. Without identifying any specific companies, De confirmed that those targeted under Section 702 knew about the NSA’s data collection and assisted in accordance with the law. What follows is a full transcript of the exchange. A video of the hearing can be found here. The…

This story continues at The Next Web

└ Tags: news, syndicated, united states
  • Page 14,259 of 14,662
  • « First
  • «
  • 14,257
  • 14,258
  • 14,259
  • 14,260
  • 14,261
  • »
  • Last »
The Daily Dose, The Daily Dose © 1996 - Present. All Rights Reserved.
  • Home
  • About
  • Archive
  • Books
  • Collections
  • Links
  • Shop
  • Submit a joke
  • Video
  • Privacy Policy