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

President Obama Caricature On Boston Bomber Miranda Rights

Daily Dose News Roundup

  • The US Army used a laser weapon on American soil, then bought it
  • The European Commission is looking at Oracle’s licensing, two months after settling with SAP
  • The FTC says Amazon charged advertisers the wrong price 80% of the time
  • Europe has ordered a €388M AI supercomputer from its own state-owned champion
  • Hugging Face built a $4.5 billion empire on free AI models. Now Nvidia is buying it for $12.9 billion

Quotable

"You know it's a rare Hanukah when Jews are asking for help from Goyim to put out the flames burning across Israel." ~ 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

Todoist now lets you set location-based reminders for all those important things you need to do

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

Todoist Location Alerts 2
Todoist is introducing an interesting update to its task-management apps for iOS today, one that alerts users of an item on their to-do list when they arrive at a specific location. The Android version will get the same update in the next couple of days. While other apps, including Todo, have previously enabled users to set up location-aware reminders, Todoist claims this is the first time such a feature has been introduced to a task-manager on both iOS and Android. At any rate, rather than waiting for a specific time on a specific day to come around to remind you…

This story continues at The Next Web

└ Tags: syndicated
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
  • Page 13,412 of 14,665
  • « First
  • «
  • 13,410
  • 13,411
  • 13,412
  • 13,413
  • 13,414
  • »
  • 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