How to Create Featured Images That Draw More Readers to Your Blog

Fotolia Subscription Monthly 4685447 Xl Stock

This post is originally published on Designmodo: How to Create Featured Images That Draw More Readers to Your Blog

How to Create Featured Images That Draw More Readers to Your Blog

You’re familiar with how valuable images are on a website. They can: Break up otherwise long stretches of text. Visually complement the content on a page. Reinforce a brand’s visual identity and style. Simplify how many words are used to …

For more information please contact Designmodo

can someone help me with this code.

558fe5180e0e8fc922d31c23ef84d240

Write a program simulator that will compute for the average waiting time of each customer in a bank. Also the program will indicate the number of the teller who accomodates the customer.

Assume that the bank has 3 teller that may be accomodate the customers. The first customer to arrive will be served by teller 1 and the arrival time is zero(0). The second customer will be served by teller 2, the third customer by teller 3, the fourth customer will be served by the any teller who is already free and so on. The bank is using FIFO in serving their customers.

The length of service depends on the type of service the customer will avail. Services available in the bank are:
Deposit - 5 minutes
New accounts - 8 minutes
Withdrawal - 3 minutes
Check encash - 4 minutes

The program should reord the arrival time of each customer. For simplicity, assumed that the arrival time is in minutes. Again, the first customer will always have an arrival time of 0. Eliminate the concept of several clients that will arrive at exact;y the same time.

The program should be abale to determine the number of customers each teller accommodated.

The waiting time is computed as the time the service is started minus arrival time of the customer. For example, the first customer arrives at 0 and the service also started at time 0 since there is no queque yet. So, the waiting time for customer 1 is 0. If customer 2 arrives at time 5, he will be the first customer for teller 2. The service time will also start at time 5 thus, the waiting time of customer 2 is also 0.

Assume that the bank can serve 20 customers at the most.

Optimizing Image Depth

Featured Imgs 23

Something I learned (or, I guess, re-learned) this year is how important it is to pay close attention to the bit depth of images. Way back in the day, we used to obsessively choose between 2-, 4-, or 8-bit color depth on our GIFs, because when lots of users were using dialup modems to surf the web, every kilobyte counted.

Now that a huge number of us access the web via broadband, guess what? Every kilobyte still counts. Because not everyone has access to broadband, particularly in the mobile space; and also, any time we can shave off page rendering is worth pursuing. I’d assumed that optimization tools handled things as trivial as color depth optimization that for us, but discovered I was wrong there.

This is particularly true for PNGs.  By default, lots of image editing tools save PNGs with 2^24 color depth, just in case.

For a photograph, that makes some sense (though if it’s a photograph, you should probably save it as JPG or WebP) but for things like logos and icons, that’s approximately 2^24 more colors than you’re going to be using.

So in Acorn, my image editor of choice, I’ve been taking special care to crank down the bit depth on PNGs in the export dialog. In many cases, I’ve cut image weight 80% or more by indexing colors to a palette of 256 or fewer values, with no loss of visual fidelity.  (Again, these aren’t photographs I’m talking about.)

Here’s an example:

PNG export from Acorn

That PNG at full-color depth is about 379KB. Restricted to a palette of 32 colors, it’s 61KB. And that’s just at the export time: once I run them through ImageOptim, the optimized sizes are 359KB and 48KB. That’s a weight savings of about 85%, just by lowering the color depth. And if I deployed the image and discovered it needs a few more colors, I could re-run the process to use 64 colors: the final size, in that case, is 73KB, still enormous savings.

Image run through ImageOptim, reducing size by another 22%

Reducing color depth by eye is clearly more onerous than throwing an optimization script at a directory of images, but in my experience, the results are much more efficient in terms of image weight and therefore user experience. And that’s really what all this is about, isn’t it?


The post Optimizing Image Depth appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

What Makes CSS Hard To Master

Featured Imgs 23

Tim Severien:

I feel we, the community, have to acknowledge that CSS is easy to get started with and hard to master. Let’s reflect on the language and find out what makes it hard.

Tim’s reasons CSS is hard (in my own words):

  • You can look at a matching Ruleset, and still not have the whole styling story. There might be multiple matching rulesets in disparate places, including in places that only apply conditionally, like within @media queries.
  • Even if you think you’ve got a complete handle on the styling information in the CSS, you still may not, because styling is DOM-dependent. You need information from both places to know how something will be styled.
  • You have no control over the device, browser, version, resolution, input mode, etc., all of which can be CSS concerns.
  • Making changes to CSS can be scary because it’s hard to understand everywhere it applies.

I’m not sure people making sweeping generalizations about CSS either being too hard or too easy is helpful for anyone. It’s much more interesting to look at what can be straightforward about CSS and what can be tricky, like Tim has done here.

Direct Link to ArticlePermalink


The post What Makes CSS Hard To Master appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

Contact Form 7 Version 5.3.2 Patches Critical Vulnerability, Immediate Update Recommended

Category Image 091

Contact Form 7 has patched a critical file upload vulnerability in version 5.3.2, released today by plugin author Takayuki Miyoshi. The plugin is installed on more than five million WordPress sites.

“An unrestricted file upload vulnerability has been found in Contact Form 7 5.3.1 and older versions,” Miyoshi said. “Utilizing this vulnerability, a form submitter can bypass Contact Form 7’s filename sanitization, and upload a file which can be executed as a script file on the host server.”

The vulnerability was discovered by Jinson Varghese Behanan from Astra Security on December 16, 2020, and Miyoshi released a fix less than 24 hours later. Behanan highlighted a few ways this vulnerability might be exploited:

  1. Possible to upload a web shell and inject malicious scripts
  2. Complete takeover of the website and server if there is no containerization between websites on the same server
  3. Defacing the website

Astra Security plans to publish more details on the vulnerability in two weeks after the plugin’s user base has had more time to update to the patched version.

Version 5.3.2 removes control, separator, and other types of special characters from the filename to fix the unrestricted file upload vulnerability. At the time of publishing, more than a million Contact Form 7 updates have been downloaded today. Approximately 20% of the plugin’s user base is protected from the vulnerability. Now that it has been patched and published, Contact Form 7 users who do not update will be more at risk of having the vulnerability exploited.

AI Models Are Making the World a Better Place

Category Image 006

Artificial Intelligence (AI) is not a future trend; it is very much a part of our present and is steering our everyday lives. From the posts we see on our social media profiles to the movies we are recommended by Netflix and products Amazon suggests to us, we actively use AI technology. 

Further on, with big companies and makers like NVIDIA, Intel, Qualcomm, and others, innovating the underlying technology (semiconductors), AI models are becoming smarter and better. Here we explore a few ways in which AI is changing our world and making it more advanced and simpler.

favicon.ico is showing up as a soft 404

Featured Imgs 11

www.domain.com/favicon.ico is showing up as a Soft 404 in my GSC Coverage report. I can't imagine blocking it with robots.txt because it seems as if bots might want to access it from time to time. Suggestions? Or should I just ignore?

Three Ways to Distinguish a Site From the Norm

Featured Imgs 23

In an age where so much web design is already neat, clean, and simple, I can think of three ways to distinguish your site from the norm:

  1. Stunning visuals that cannot be created in UI vector editors, like Figma and Sketch
  2. Beautifully-animated interactions that cannot be dreamt in the language of Stacks of Rectangles
  3. Typography

The third is the most accessible, and an awesome place to differentiate your brand. Accordingly, look for a renaissance of type — a flourishing of serifs, throwbacks, quirky fonts, and genre-bending typefaces. Expect that font pairing will become an even more important skill, and picking great fonts for your brand will carry even more weight in the near future.

After all, it’s basically a design cheat code.


The post Three Ways to Distinguish a Site From the Norm appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

Why and How to Create a Static Website with WordPress

Featured Imgs 13

Why and How to Create a Static Website with WordPressWhat can’t you possibly build with WordPress? You can build all types of websites ranging from small blogs to large e-commerce websites. It’s the reason why WordPress is the platform of choice for millions of businesses across the globe, including big-name brands. WordPress is straightforward to use and comes with many customization options in themes, […]

The post Why and How to Create a Static Website with WordPress appeared first on WPExplorer.

Creating a quiz that shows one after the other from database

Category Image 101

Good day, I am actually a young programmer, who wants to develop a webpage that enables someone to take a practice test. It was given to me as an assignment that determines if I will remain a programmer. I know little about PHP codes but none in Mysql. I came to the website and noticed a discussion from @broj1 with another programmer. I don't have a code in mind yet or how I should start about it but I would a really appreciate a little help. All I have been able to do is a direct html quiz and the assignment is to be submitted on Friday. I really need help. Thanks

MDN on GitHub

Featured Imgs 25

Looks like all the content of MDN is on GitHub now. That’s pretty rad. That’s been the public plan for a while. Chris Mills:

We will be using GitHub’s contribution tools and features, essentially moving MDN from a Wiki model to a pull request (PR) model. This is so much better for contribution, allowing for intelligent linting, mass edits, and inclusion of MDN docs in whatever workflows you want to add it to (you can edit MDN source files directly in your favorite code editor).

Looks like that transition is happening basically today, and it’s a whole new back-end and front-end architecture.

Say you wanted to update the article for :focus-within. There will be a button on that page that takes you to the file in the repo (rather than the wiki editing page), and you can edit it from the GitHub UI (or however you like to do Git, but that seems like right-on-GitHub will be where the bulk of editing happens). Saving the changed document will automatically become a Pull Request, and presumably, there is a team in place to approve those.

We think that your changes should be live on the site in 48 hours as a worst case scenario.

Big claps from me here, I think this is a smart move. I can’t speak to the tech, but the content model is smart. I’d maybe like to see the content in Markdown with less specialized classes and such, but I suspect that kind of thing can evolve over time and this is already a behemoth of an update to ship all at once.

In August 2020, the entire MDN (writers) team was laid off, so it looks like the play here is to open up the creation and editing of these technical docs to the world of developers. Will it work? It super didn’t work for the “Web Platform Docs” (remember those?). But MDN has way more existing content, mindshare, and momentum. I suspect it will work great for the maintenance of existing docs, decently for new docs on whatever is hot ‘n’ fresh, but less so for anything old and “boring”.

Seems a little risky to fire all the writers before you find out if it works, so that speaks to the product direction. Things are changing and paying a content creation team directly just ain’t a part of whatever the new direction is.


The post MDN on GitHub appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

I need help with files, multidimensional arrays and structures

558fe5180e0e8fc922d31c23ef84d240

The user is going to enter the product number, then the program must be able to open the file, read the information of a inventory in the company, capture the information into an structured array and display the specific product with its information in the labels. all this using a multidimensional arrays and also the structures. currently in the execution it reads only one part of the data.

I think that the direct declaration of the array is causing part of the problem, also my program is not reading and capturing well.

Imports System.IO

Public Class frmMain
    Public Structure sInventory
        Public strProductNumber As String
        Public strProductDescription As String
        Public intProductQuantity As Integer
        Public dblProductCost As Double
        Public dblProductMarkup As Double
    End Structure

    Private Sub mnuBuscarProducto_Click(sender As Object, e As EventArgs) Handles mnuBuscarProducto.Click
        ' read the file
        Dim inventarioFile As StreamReader
        inventarioFile = File.OpenText("DatosInventario.txt")

        'Array
        Dim strProductos() As String = {"123", "234", "345", "456", "567", "678"}
        Dim strDescripcion() As String = {"Juego de comedor con 2 sillas", "Sof cama", "Escritorio", "Cama king", "Librero de 6'", "Mueble para pecera"}
        Dim intCantidad() As Integer = {15, 10, 25, 5, 35, 8}
        Dim dblCostos() As Double = {425.0, 769.0, 250.0, 1875.0, 399.0, 350.0}
        Dim dblProrciento() As Double = {0.25, 0.25, 0.35, 0.2, 0.3, 0.2}
        Dim i As Integer = 0
        Dim intProducto As Integer 'Valor que ingres el usuario capturado

        'capture and validate
        If Integer.TryParse(txtNumeroProducto.Text, intProducto) Then
            intProducto = CInt(txtNumeroProducto.Text)
        Else
            MessageBox.Show("Debe ingresar un entero de tres dgitos")
        End If

        'Find something in the archive
        Dim blnBuscador As Boolean = False
        Do While blnBuscador = False And i <= (strProductos.Length - 1)
            If strProductos(i) = intProducto Then
                blnBuscador = True
                lblDescripcion.Text = inventarioFile.ReadLine()
                lblInventario.Text = inventarioFile.ReadLine()
                lblCosto.Text = inventarioFile.ReadLine()
                lblPrecioVenta.Text = inventarioFile.ReadLine()
                lblImporteCosto.Text = inventarioFile.ReadLine
                lblImportePrecioVenta.Text = inventarioFile.ReadLine
            End If
        Loop
        i += 1
        inventarioFile.Close()
    End Sub

    Private Sub frmMain_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
        If MessageBox.Show("Desea cerrar la aplicacin?", "Confirmar", MessageBoxButtons.YesNo) = DialogResult.Yes Then
            e.Cancel = False
        Else
            e.Cancel = True
        End If
    End Sub

    Private Sub mnuSalir_Click(sender As Object, e As EventArgs) Handles mnuSalir.Click
        Me.Close()
        frmSplash.Close()
    End Sub

    Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        'Open the file text
        ofdDatosInventario.ShowDialog()
    End Sub
End Class