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

Themes Memes And Laser Beams

Daily Dose News Roundup

  • OpenAI adopts C2PA standard and Google’s SynthID to make AI-generated images easier to identify
  • OpenClaw creator’s $1.3 million monthly OpenAI bill reveals the real cost of autonomous AI coding at scale
  • Apple’s Siri app in iOS 27 will auto-delete your chats. It may also launch as a beta, again.
  • Faraday Future raised $25 million for its robotics pivot. The fine print tells a different story.
  • Anthropic and the Gates Foundation are betting $200 million that AI can do more than make money

Quotable

"The American sax icon Clarence Clemons has passed away. Once again, Bruce is loose." ~ 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

Human’s new city visualization tool shows you the most popular activities around the world

Jul02
by Sindy Cator on July 2, 2014 at 12:34 pm
Posted In: Apps, Around the Web, Insider, Product Updates

Human, the app that set out with a goal of getting people moving for 30 minutes or more every day, has launched a visualization tool which allows you to see what activities people around the world are doing the most often. Launched today, the company says that it has visualized over 7.5 million miles of activity in cities around the world to produce the stats. So, if you’ve always wondered whether people in Amsterdam were more pedestrian in nature than people in, say, London, now you can check. If you were wondering that, they’re not, though they do take to…

This story continues at The Next Web

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

‘Blocked’, a tool for sharing porn-free sites caught in the UK’s porn filter, gets a revamp

Jul02
by Sindy Cator on July 2, 2014 at 11:47 am
Posted In: Around the Web, Insider, Product Updates, UK

wall2
One year ago, UK Prime Minister David Cameron outlined changes to the way in which ISPs would enact filters for blocking content intended for adults; primarily making the filtering opt-out, rather than opt-in. As a result of the changes, a number of websites have since been identified and blocked as not suitable for minors when in fact they’re unrelated to the adult topics the block is intended to prevent access to. In response to the situation, the Open Rights Group (ORG) launched Blocked, an online tool where users could submit a URL to the team for review to see whether the site…

This story continues at The Next Web

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

Converting Numbers to Words Part V

Jul02
by Sindy Cator on July 2, 2014 at 11:30 am
Posted In: Around the Web, VBA

See Converting Numbers to Words Part IV

No need to bite this one off in small chunks. Just need to make sure the triplets processing works at the next level.

Sub TEST_Millions()
   
    Debug.Assert NumbersToWords(1000000) = "one million"
    Debug.Assert NumbersToWords(1000001) = "one million one"
    Debug.Assert NumbersToWords(20000000) = "twenty million"
    Debug.Assert NumbersToWords(55555000) = "fifty-five million five hundred fifty-five thousand"
    Debug.Assert NumbersToWords(999999999) = "nine hundred ninety-nine million nine hundred ninety-nine thousand nine hundred ninety-nine"
   
End Sub

I’m just going to add a new If block for millions that looks a lot like the thousands If block. Of course I’ll be using exponents so I don’t have to type all those zeros.

Function NumbersToWords(ByVal dNumbers As Double) As String
   
    Dim sReturn As String
    Dim dRemainder As Double
   
    If dNumbers = 0 Then
        sReturn = "zero"
    Else
       
        dRemainder = dNumbers
       
        If dRemainder >= 10 ^ 6 Then
            sReturn = ProcessTriplet(dRemainder \ 10 ^ 6, "million")
            dRemainder = dRemainder – ((dRemainder \ 10 ^ 6) * 10 ^ 6)
        End If
       
        If dRemainder >= 1000 Then
            sReturn = sReturn & Space(1) & ProcessTriplet(dRemainder \ 1000, "thousand")
            dRemainder = dRemainder – ((dRemainder \ 1000) * 1000)
        End If
       
        If dRemainder > 0 Then
            sReturn = sReturn & Space(1) & ProcessTriplet(dRemainder)
        End If
       
    End If
   
    NumbersToWords = Trim$(sReturn)
   
End Function

All tests passed. The rest should be easy. I’m going to go a little sparse on the next tests.

Sub TEST_More()
   
    Debug.Assert NumbersToWords(1 * 10 ^ 9) = "one billion"
    Debug.Assert NumbersToWords(1000000001) = "one billion one"
    Debug.Assert NumbersToWords(999999999999999#) = "nine hundred ninety-nine trillion nine hundred ninety-nine billion nine hundred ninety-nine million nine hundred ninety-nine thousand nine hundred ninety-nine"
   
End Sub

I could create a new If block for each triplet, but I already know I’ll be refactoring, so what’s the point. I need to loop through however many triplets are there and process them.

Function NumbersToWords(ByVal dNumbers As Double) As String
   
    Dim sReturn As String
    Dim dRemainder As Double
    Dim vaTriplets As Variant
    Dim i As Long
   
    vaTriplets = Split(",,,thousand,,,million,,,billion,,,trillion", ",")
   
    If dNumbers = 0 Then
        sReturn = "zero"
    Else
       
        dRemainder = dNumbers
       
        For i = 12 To 0 Step -3
            If dRemainder >= 10 ^ i Then
                sReturn = sReturn & Space(1) & ProcessTriplet(dRemainder \ 10 ^ i, vaTriplets(i))
                dRemainder = dRemainder – ((dRemainder \ 10 ^ i) * 10 ^ i)
            End If
        Next i
       
    End If
   
    NumbersToWords = Trim$(sReturn)
   
End Function

Error: Overflow. I originally passed in a Double so I could do decimals, but never did the decimals. Anyway, it’s the integer division operator (\) that’s causing the problem. When you use a floating point number, like a Double, in an integer division expression, VBA casts it as a Long first. So anything more than 2.4 billion won’t work. Fortunately, MS has a fix.

Function NumbersToWords(ByVal dNumbers As Double) As String
   
    Dim sReturn As String
    Dim dRemainder As Double
    Dim vaTriplets As Variant
    Dim i As Long
    Dim lFixed As Long
   
    vaTriplets = Split(",,,thousand,,,million,,,billion,,,trillion", ",")
   
    If dNumbers = 0 Then
        sReturn = "zero"
    Else
       
        dRemainder = dNumbers
       
        For i = 12 To 0 Step -3
            If dRemainder >= 10 ^ i Then
                lFixed = Fix(Int(dRemainder + 0.5) / 10 ^ i)
                sReturn = sReturn & Space(1) & ProcessTriplet(lFixed, vaTriplets(i))
                dRemainder = dRemainder – (lFixed * 10 ^ i)
            End If
        Next i
       
    End If
   
    NumbersToWords = Trim$(sReturn)
   
End Function

All tests passed. And that’s it. I could add decimals, I suppose. Or even larger numbers.

The test-first methodology was pretty enjoyable, I have to say. This isn’t especially complicated code, but biting it off in small chunks made things flow nicely.

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

Haste for iPhone is like QuizUp meets Boggle

Jul02
by Sindy Cator on July 2, 2014 at 10:56 am
Posted In: Apps, Around the Web, Insider, Product Reviews

Haset
With games such as QuizUp seemingly killing it in the popularity stakes, it’s no surprise that we now see a steady slew of similar-ish games hit the market. Haste is the latest fast-paced, friends vs. friends-style game to hit the App Store, and it certainly lends more than a nod to the aforementioned QuizUp, “they were quite an inspiration for us,” explains co-creator Lockie Potts. But Haste is different – it’s a word game built around real-time, live multiplayer action. It takes the age-old word-search puzzle game ethos, or more specifically Boggle, and gives it the 2014 treatment. How it…

This story continues at The Next Web

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

‘India’s Amazon’ Flipkart teams up with Karbonn to launch Android smartphones from $45

Jul02
by Sindy Cator on July 2, 2014 at 9:58 am
Posted In: Around the Web, flipkart, Gadgets, India, karbonn, Product Launches

A50s White Phone Picture(1)
Indian e-commerce juggernaut Flipkart is getting busy in the mobile device market. Today, it announced that it has teamed up with phone manufacturer Karbonn to launch a series of what it calls “budget smartphones” ranging from a mere Rs 2,699 ($45) to Rs 4,499 ($75). The smartphones are all dual-SIM and run on Android Jelly Bean or KitKat. Last week, the company stepped into the tablet space with the launch of its own Rs 9,999 ($166) seven-inch tablet, branded under Digiflip Pro. There are two 2G phones in the series — the Karbonn Smart A50S and A52+, which both have screen sizes of 3.5…

This story continues at The Next Web

└ Tags: news, syndicated
  • Page 13,391 of 14,644
  • « First
  • «
  • 13,389
  • 13,390
  • 13,391
  • 13,392
  • 13,393
  • »
  • 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