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

Steve Jobs iMourn

Daily Dose News Roundup

  • 10 best third-party risk management software platforms for 2026
  • OpenAI is putting ads inside ChatGPT’s image generation
  • Zelensky asked Trump to block Russia’s Starlink rival, FT reports
  • AI can’t fix a business system with broken processes
  • EU set to name AWS and Azure DMA gatekeepers in November

Quotable

"While a great attitude may not fix your whole problem, it will bug enough folks that it's worthwhile." ~ 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

Google and Mattel reimagine the View-Master for 2015 with virtual reality support

Feb13
by Sindy Cator on February 13, 2015 at 2:23 pm
Posted In: Around the Web, Insider

View Master
Remember the View-Master? A few weeks ago, rumors started circulating that Google and Mattel might be bringing an updated version of the stereoscopic toy to market, and now it’s finally arrived. The new View-Master supports Google’s Cardboard virtual reality platform virtual reality platform, which provides a 3D view of various sights around the world – even outer space! The toy utilizes 360 degree photospheres, similar to what Google does with Street View. What makes the View-Master different from other VR products, however, is its “experience reel”. Similar to how older versions of the toys had a carousel of photos covering a…

This story continues at The Next Web

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

Google and Bing square off to bring Cricket World Cup 2015 updates to your phone

Feb13
by Sindy Cator on February 13, 2015 at 1:05 pm
Posted In: Around the Web, cricket, Cricket World Cup 2015, Insider

Cricket
As the planet’s best cricket teams gear up for the 2015 World Cup, Google and Bing are also duking it out to be your source of updates on your mobile device during the tournament. While both search engines offer information on teams, match schedules, standings and live scores when you look them up in your mobile browser, Microsoft’s Cortana can be set up on Windows Phone devices to alert you about upcoming matches you’ll want to watch, based on the teams you add to your ‘interests’. You can also ask Cortana for predictions on the outcome of a match. It…

This story continues at The Next Web

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

Last chance for 84% off lifetime access to over 5,000 Adobe training videos – ends Sunday

Feb13
by Sindy Cator on February 13, 2015 at 12:36 pm
Posted In: Around the Web, Offers, TNWDeals

If you’re looking to get into graphic design or front-end Web development, you’d be hard-pressed to find a better online training course to round out your skill set. But you should act fast, because this deal is ending on Sunday 2/12 at 11:59PM PST. Train Simple, an Adobe-authorized training partner, has over 5,000 tutorial videos featuring experts to teach you everything from premium software like Photoshop, Illustrator and Lightroom, to essential languages for the Web like HTML5, CSS3, JavaScript and jQuery. And it’s not just for beginners – you’ll find a wide range of courses for every skill level, with new…

This story continues at The Next Web

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

Converting an Excel Range to HTML the Hard Way

Feb13
by Sindy Cator on February 13, 2015 at 12:30 pm
Posted In: Around the Web

Every time I write a RangeToHTML function, it’s different. I don’t re-use my old functions because the HTML elements that I care about change from project to project. I could make a generic RangeToHTML function that attempts to capture every possible cell property, but I don’t. I don’t want a bunch of code in my project that doesn’t do anything. I figure out which cell properties matter to the project and code those.

In this example, I not only did not want fidelity with the spreadsheet, I was using bold and italics to trigger completely different HTML elements. But usually I’m trying to make the cells look like they do in the spreadsheet for those characteristics that I’ve deemed important. Below is another example where I’m converting a range to HTML to put into an Outlook email. The things that are important to me are bold, italics, font size, cell alignment, merged cells, and bottom borders. That’s a lot of stuff, but it’s not every formatting element that could be applied to a cell.

Public Function RangeToHTML(ByRef rRng As Range) As String
   
    Dim rRow As Range, rCell As Range
    Dim sTable As String, sTd As String, sHead As String
    Dim aCells() As String, aRows() As String, aAttr() As String, aHead(1 To 2) As String
    Dim lCellCnt As Long, lRowCnt As Long
    Dim lFontSize As Long
   
    ‘1. Get the font size of the last cell
    lFontSize = rRng.Cells(rRng.Cells.Count).Font.Size
    ReDim aRows(1 To rRng.Rows.Count)
   
    ‘2 create the style in the header
    aHead(1) = "td {font-family:" & rRng.Cells(1).Font.Name & "; font-size: " & lFontSize & "pt}"
    aHead(2) = ".bb {border-bottom: 1px solid black}"
    sHead = Tag(Tag(Join(aHead, vbNewLine), "style", , True), "head", , True)
   
    ‘3. Load up a ‘cells’ array and a ‘rows’ array FOR joining.
    For Each rRow In rRng.Rows
        lRowCnt = lRowCnt + 1: lCellCnt = 0
        ReDim aCells(1 To rRng.Columns.Count)
        For Each rCell In rRow.Cells
            lCellCnt = lCellCnt + 1
           
            ‘4. Deal with empty cells and multi-line cells
            If IsEmpty(rCell.Value) Then
                sTd = " "
            Else
                sTd = Replace(rCell.Text, Chr$(10), "<br />")
            End If
           
            ‘5. Bold and italic
            If rCell.Font.Bold Then sTd = Tag(sTd, "strong")
            If rCell.Font.Italic Then sTd = Tag(sTd, "em")
           
            ‘6. Font size
            If rCell.Font.Size <> lFontSize Then
                sTd = Tag(sTd, "div", "style=font-size:" & rCell.Font.Size & "pt")
            End If
           
            ‘7. Setting the cell alignment
            ReDim aAttr(1 To 3)
            aAttr(1) = AlignmentAttr(rCell)
           
            ‘8. Span rows and columns for merged  cells
            If rCell.MergeArea.Address <> rCell.Address Then
                aAttr(2) = "COLSPAN=""" & rCell.MergeArea.Columns.Count & """ ROWSPAN=""" & rCell.MergeArea.Rows.Count & """"
            End If
           
            ‘9. Bottom border
            If rCell.Borders(xlEdgeBottom).LineStyle <> xlLineStyleNone Then
                aAttr(3) = "class=""bb"""
            End If
           
            ’10. Make string
            If rCell.MergeArea.Cells(1).Address = rCell.Address Then
                aCells(lCellCnt) = Tag(sTd, "td", Join(aAttr, Space(1)))
            End If
        Next rCell
        aRows(lRowCnt) = Tag(Join(aCells, vbNewLine), "tr", , True)
    Next rRow
   
    sTable = Tag(Join(aRows, vbNewLine), "table", "cellpadding=""2px""", True)
   
    RangeToHTML = Tag(sHead & vbNewLine & sTable, "html", , True)
   
End Function

Here’s a breakdown of code:

  1. It’s a bit arbitrary, but I’m pulling the font size from the last cell in the range. For my data, I know that the header may have a different font size, but there is no footer. Whatever the last cell in the range is, that’s my default font size.
  2. I create two styles in the header: one for the default td element and one for the “bb” class (bottom border). The font name is pulled from the first cell of the range (because I know there’s o change in font family within the range. The font size I get from above. My Tag function is nested here so that my styles are in a ‘style’ tag and then the whole thing is wrapped in a ‘head’ tag.
  3. Inside the loop, I fill the aCells array with each cell. Before I go to the next row, I Join that array into an element of the aRows array. Later I’ll be Joining that array into a big string.
  4. If the cell is empty, I need a non-breaking space in my td tags. If the cell has more than one line, I insert the br HTML tag to replicate that.
  5. At this point, I’m just checking out the cell properties and converting them to HTML. These two lines wrap the value in ‘strong’ or ‘em’ if the cell is bold or italic, respectively.
  6. I got the default font size up in step 1. If this cells font size is different than the default, then I set it explicitly. I’d considered trying to make everything a relative font size, but ultimately it was a pain and unnecessary.
  7. There are three cell properties that will turn into attributes in the td tag. The first is the cell alignment. I have left, right, and center cells and set the align property using the AlignmentAttr function shown below.
  8. Next, I look for merged cells and set the COLSPAN and ROWSPAN attributes accordingly. Yes, I hate merged cells too, but sometimes they’re necessary.
  9. The I look for a bottom border, which I implement in a css class. I don’t look for every border because I only care about bottom borders.
  10. Finally, I make the string by Joining my Attr array. If I’m in the first cell of a merged area (which also is true if there is no merge area), then I make the string. If I’m not in the first cell, I don’t do anything because I’ve already done it back when I was in the first cell.

To wrap it all I up, I tag and join everything into one glorious string. The Tag function looks like this:

Function Tag(sValue As String, sTag As String, Optional sAttr As String = "", Optional bIndent As Boolean = False) As String
   
    Dim sReturn As String
   
    If Len(sAttr) > 0 Then
        sAttr = Space(1) & sAttr
    End If
   
    If bIndent Then
        sValue = vbTab & Replace(sValue, vbNewLine, vbNewLine & vbTab)
        sReturn = "<" & sTag & sAttr & ">" & vbNewLine & sValue & vbNewLine & "</" & sTag & ">"
    Else
        sReturn = "<" & sTag & sAttr & ">" & sValue & "</" & sTag & ">"
    End If
   
    Tag = sReturn
   
End Function

The AlignmentAttr function from #7 above. I put this in its own function to keep the close a little cleaner, not because it does anything special.

Public Function AlignmentAttr(ByRef rCell As Range) As String
   
    Dim sReturn As String
   
    Select Case True
        Case rCell.HorizontalAlignment = xlLeft, (rCell.HorizontalAlignment = 1 And Not IsNumeric(rCell.Value))
            sReturn = "align=""left"""
        Case rCell.HorizontalAlignment = xlRight, (rCell.HorizontalAlignment = 1 And IsNumeric(rCell.Value))
            sReturn = "align=""right"""
        Case rCell.HorizontalAlignment = xlCenter
            sReturn = "align=""center"""
    End Select
   
    AlignmentAttr = sReturn
   
End Function
└ Tags: syndicated
a couple of laughzillas on a blue diamond background

Virgin Media to spend £3bn on connecting 4 million UK homes to 152Mbps broadband

Feb13
by Sindy Cator on February 13, 2015 at 11:24 am
Posted In: Around the Web, Insider, UK

VirginMediaFeat
Virgin Media will spend around £3 billion on increasing the footprint of its broadband network in the UK and increasing the overall speeds for users. Announced today, the plan will see Virgin’s 152Mbps service extended to areas not within its reach – consumers and small businesses are being encouraged to register demand for services at virginmedia.com/cablemystreet and the rollout will then proceed in the areas of most demand, “with a focus on areas closest to Virgin Media’s existing network,” the company said. In addition to improving broadband access for residents and businesses, Virgin Media said the expansion would create 6,000 direct new…

This story continues at The Next Web

└ Tags: news, syndicated
  • Page 11,738 of 14,671
  • « First
  • «
  • 11,736
  • 11,737
  • 11,738
  • 11,739
  • 11,740
  • »
  • 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