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

Nimble As A Cat

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

"All politics is local, even if not all locals are political." ~ 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

Converting Numbers To Words Part II

Jun27
by Sindy Cator on June 27, 2014 at 8:14 pm
Posted In: Around the Web, VBA

See Converting Numbers To Words Part I.

The next test will test 20-99. I think in real TDD, you’re supposed to write tests that test just one thing. But I’m not doing real TDD, so I’m testing in groups.

Sub TEST_Tens()

    Debug.Assert NumbersToWords(20) = "twenty"
    Debug.Assert NumbersToWords(21) = "twenty-one"
    Debug.Assert NumbersToWords(30) = "thirty"
    Debug.Assert NumbersToWords(77) = "seventy-seven"
    Debug.Assert NumbersToWords(99) = "ninety-nine"

End Sub

Again, I’m testing the edges and few in between. Now that I have two test procedures, I’ll need to create a procedure to run them both.

Sub TEST_All()

    TEST_Singles
    TEST_Tens

    Debug.Print "tests passed"

End Sub

Now I can run TEST_All and make sure I don’t break any previous tests with the changes I make. Of course, TEST_Tens fails so it’s time to write some code to make it pass. I tried to write the simplest code possible, but it didn’t work out for me.

Function NumbersToWords(ByVal dNumbers As Double) As String
   
    Dim vaSingles As Variant
    Dim vaTens As Variant
    Dim sReturn As String
   
    vaSingles = Split("zero,one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve,thirteen,fourteen,fifteen,sixteen,seventeen,eighteen,nineteen", ",")
    vaTens = Split("NA,NA,twenty,thirty,forty,fifty,sixty,seventy,eighty,ninety", ",")
   
    If dNumbers > 19 Then
        sReturn = vaTens(dNumbers \ 10) & "-" & vaSingles(dNumbers – ((dNumbers \ 10) * 10))
    Else
        sReturn = vaSingles(dNumbers)
    End If
   
    NumbersToWords = Trim$(sReturn)
   
End Function

That fails because NumbersToWords(20) returns twenty-zero. So there’s a special case that needs to be handled.

Function NumbersToWords(ByVal dNumbers As Double) As String
   
    Dim vaSingles As Variant
    Dim vaTens As Variant
    Dim sReturn As String
   
    vaSingles = Split("zero,one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve,thirteen,fourteen,fifteen,sixteen,seventeen,eighteen,nineteen", ",")
    vaTens = Split("NA,NA,twenty,thirty,forty,fifty,sixty,seventy,eighty,ninety", ",")
   
    If dNumbers > 19 Then
        sReturn = vaTens(dNumbers \ 10)
        If dNumbers Mod 10 <> 0 Then
            sReturn = sReturn & "-" & vaSingles(dNumbers – ((dNumbers \ 10) * 10))
        End If
    Else
        sReturn = vaSingles(dNumbers)
    End If
   
   
    NumbersToWords = Trim$(sReturn)
   
End Function

That works. But I can see this special case handling becoming a problem. Maybe. We’ll see what happens when we test in the hundreds.

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

9 ways virtual reality will affect the startup scene

Jun27
by Sindy Cator on June 27, 2014 at 7:45 pm
Posted In: Analysis and Opinion, Around the Web, Design & Dev, Entrepreneur, Entrepreneurship, Insider, startup, YEC, yec.co, Young Entrepreneur Council

VR
It sounds like science fiction, but virtual reality technology is taking off. Not even the sky’s the limit for imagining what could be done with this technology. Just ask Google I/O 2014 attendees and their cardboard VR systems. With applications ranging across the board, the potential for startups to capitalize is huge. With this in mind, I asked 12 entrepreneurs from YEC the following question: Facebook recently acquired Oculus VR. Practically speaking, how do you think that virtual reality technology will affect the startup space in the next five years? Here are the responses: 1. Induce a VC Feeding Frenzy In 2007, Facebook began allowing third-party developers to…

This story continues at The Next Web

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

Google Hangouts video calls no longer require a Chrome plugin

Jun27
by Sindy Cator on June 27, 2014 at 7:38 pm
Posted In: Around the Web, Google, Product Updates

Google Hangouts video calls will soon be just a tad simpler in Chrome. In a Google+ post, software engineer Victoria Kirst announced that in Chrome you’ll no longer need to download and install a plugin. “Just click to start the Hangout, allow Hangouts to use your camera and microphone, and you’ll be good to go,” she said. The update should be available now for users of the Chrome Dev and Canary channels; the public Chome release should follow “over the next few weeks,” according to Kirst. It’s a small improvement, but one that should make Hangouts just a little easier to use…

This story continues at The Next Web

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

Google+ wants to paint your face with your favorite World Cup team in the knockout round

Jun27
by Sindy Cator on June 27, 2014 at 7:13 pm
Posted In: Around the Web, Google, Insider

Wow, that soccer thing is still going? Well, ok then. As an American with almost zero knowledge about the most popular sport in the world, it can be a little hard to get excited. But the United States advanced to the next round, so I’m ready to support my country’s team and Google+ has a fun way to do it. Beginning today you can upload a photo of yourself and up to four friends to Google+ and the service will paint your faces with any team in the knockout round. Just upload your photo and tag it with your team…

This story continues at The Next Web

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

US government publishes its first ever NSA transparency report via Tumblr

Jun27
by Sindy Cator on June 27, 2014 at 6:46 pm
Posted In: Around the Web, Insider

US-POLITICS-INAUGURATION-WHITE HOUSE
The Office of the Director of National Intelligence (DNI) released a document today giving some crucial insights into the National Security Agency’s widespread surveillance operations in 2013. The transparency report, published via Tumblr, lists the number of National Security Letters, Foreign Intelligence Surveillance Act (FISA) orders, and use of the FISA Business Records provision over the 12-month period. The report lists 1,767 FISA orders, 178 applications for business records – of which 423 “selectors” were queried under the NSA’s telephony metadata program – and 19,212 National Security Letters. Richard Salgado, Director of Law Enforcement and Information Security at Google, said the…

This story continues at The Next Web

└ Tags: news, syndicated, united states
  • Page 13,446 of 14,665
  • « First
  • «
  • 13,444
  • 13,445
  • 13,446
  • 13,447
  • 13,448
  • »
  • 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