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

Cat Walk Fashion Photo

Daily Dose News Roundup

  • Jeff Bezos’s representative just left the board of a startup that raised $1.4 billion on his name. The first truck has not been built.
  • Snap lost a 400 million dollar AI deal, 20 million dollars a month to the Iran war, and 24 per cent of its stock price. The AR glasses had better work.
  • Volkswagen just became Rivian’s biggest investor. It is not buying trucks. It is buying the software its own engineers could not build.
  • Pinterest just crossed $1 billion in quarterly revenue. The bet that made it work was not social media. It was search.
  • Tesla is selling Chinese-made cars in Canada to escape the tariffs that both China and America imposed on it

Quotable

"Germany has decided to close all of its nuclear power plants by 2022, and seeks to replace them mostly with wind power. As it was a political decision, they will actually use windbag power." ~ 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

Chat app Tango raises a $280m mega round led by Alibaba, as it reaches 70m active users

Mar20
by Sindy Cator on March 20, 2014 at 4:00 am
Posted In: Alibaba, Around the Web, Asia, messaging, Mobile, Tango

Alibaba logistics
It seems that 2014 is shaping up to be the year of mobile messaging. Hot on the heels of Facebook’s $19 billion deal to acquire WhatsApp and Rakuten’s $900 million acquisition of Viber, Tango — a free messaging and calling app for iOS and Android — has announced a $280 million funding round led by Chinese e-commerce giant Alibaba. Alibaba — which generates more revenue than Amazon and eBay combined — is providing $215 million towards the round in exchange for an undisclosed, “minority” stake and board seat — existing investors are covering the rest of the round. The fresh…

This story continues at The Next Web

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

Xiaomi confirms its Redmi Note phablet will start at $129, go on sale outside of China from May

Mar20
by Sindy Cator on March 20, 2014 at 3:54 am
Posted In: Around the Web, Asia, Mobile, xiaomi

Redmi-1
Xiaomi last week took the wraps off its upcoming first phablet — the interestingly named Redmi Note — and now the company has revealed that the device will cost upwards of $129 and go on sale outside of its native China — initially in Taiwan, Hong Kong and Singapore — in May. It will be available in China first, launching on March 26. The new details were communicated via a Google+ post from Xiaomi’s Hugo Barra, who says the device will retail at $129 for a 1.4GHz/1GB version, and $159 for a higher-specc’ed 1.7Ghz/2GB model. That pricing is line with the cost of its…

This story continues at The Next Web

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

Twitter’s latest experiment hints that it will remove @ replies from its service

Mar20
by Sindy Cator on March 20, 2014 at 2:43 am
Posted In: Around the Web

FRANCE-US-INTERNET-IT-IPO-TWITTER
This won’t go down well with Twitter lovers. Everyone’s favorite microblogging service is experimenting with a new version of its Android app that removes @ replies entirely, hinting at the possibility that it will phase out the communications feature it has become synonymous with. BuzzFeed reports that Twitter’s Head Of News Vivian Schiller recently told an audience at a media event that hashtags and @ replies are “arcane,” and hinted that they would be reworked to provide a more ‘streamlined’ approach to the service to help new users understand the concept of Twitter. Schiller has since played down her comments, but…

This story continues at The Next Web

└ Tags: news, syndicated, twitter
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
  • Page 14,238 of 14,641
  • « First
  • «
  • 14,236
  • 14,237
  • 14,238
  • 14,239
  • 14,240
  • »
  • 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