Web Standard for minimum size of touch icons

Microsoft put together some UI guidelines for designing their Windows 8 store apps. These could apply to any touch based UI.

Take a look at the section Touch, Commanding, and Controls beginning on page 65

Windows 8 User Experience Guidelines:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465424.aspx

Direct download: http://go.microsoft.com/fwlink/p/?linkid=258743

In particular relating to minimum sizes for touch see page 74-75

People often blame themselves for having “fat fingers.” But even baby
fingers are wider than most touch targets. The image on the left shows
that the width of the average adult finger is about 11 millimeters
(mm) wide, while a baby’s is 8 mm, and some basketball players have
fingers wider than 19 mm!

enter image description here
.

7×7 mm: Recommended minimum size 7×7 mm is a good minimum size if
touching the wrong target can be corrected in one or two gestures or
within five seconds. Padding between targets is just as important as
target size.

When accuracy matters Close, delete, and other actions
with severe consequences can’t afford accidental taps. Use 9×9 mm
targets if touching the wrong target requires more than two gestures,
five seconds, or a major context change to correct.

When it just
doesn’t fit
If you find yourself cramming things to fit, it’s okay to
use 5×5 mm targets as long as touching the wrong target can be
corrected with one gesture. Using 2 mm of padding between targets is
extremely important in this case.

enter image description here

What are the standard frameworks, patterns, etc used in a python flask microservice?

I’m working on building a python microservice and I am looking for suggestions on how to organize/structure one. For eg – I know that most Java microservices are on Spring, occasionally use Hibernate, jUnit for testing mostly (or jupiter), etc.

I have been following a couple of blogs and have come across unittest for python testing, using flask, flask_script, flask_migrate, PEP8 style guide for python linting. Are these acceptable/industry standard packages/frameworks used in a python microservice? Are there some other packages I should be considering? I’m building a barebones python microservice.

So far I like the approach outlined here – https://www.freecodecamp.org/news/structuring-a-flask-restplus-web-service-for-production-builds-c2ec676de563/ and https://overiq.com/flask-101/extending-flask-with-flask-script/

What are your thoughts?

12 standard items out of a set 20. 5 items are withdrawn at random without replacement. All possible exhaustive and mutually exclusive events:

This homework question does not make any sense to me. Can someone help? Here is also the full question.
There are 12 standard items out of a set 20. Five items are withdrawn at random without replacement. Describe all possible exhaustive and mutually exclusive events.

How to clear the BIOS admin password in the standard case that you know the admin password? (no motherboard pw reset, just remove it in the BIOS)

After creating a BIOS Administrator Password:

“Create New Password”:

enter image description here

and confirming:

“Confirm New Password”:

enter image description here

How do you clear this password so that you do not need to enter any password at BIOS startup anymore?

PS: This is a very easy question. Strangely, it took me some time to find out since searching for this will give you many other more complex hits about forgotten passwords, but not the easy idea of just clearing the password when you know your current password.

seo – What should be the standard time for a crawler to revisit my site?

How often you would like the search engine spiders to visit your site is entirely dependent on your content and how often it changes. There is no “standard”. If it changes daily then once a day might be nice. However, if the site predominantly contains archived/static documents and new documents are only rarely added then search engine spiders only need to visit your site… rarely.

"revisit-after" content="3 days"

No search engines actually use this meta tag, so this serves no SEO benefit whatsoever. Unless you have a specific requirement of your own then this meta tag should be removed. In fact, Google themselves describe the revisit-after tag as “completely useless”:

To our knowledge only one search engine has ever supported it, and that search engine was never widely used — at this point, it is nothing more than a good luck charm. A remarkably widely used one. More pages use the completely worthless <meta name="revisit-after"> than use the <em> element!

Overtime Google tries to intelligently determine how often it should crawl your pages. You have limited control in Google Search Console (Site Settings > Crawl Rate) and even then you can only slow it down, not speed it up. (As stated on that page, this feature should only be used if Googlebot is causing you server problems by crawling too much!)

c++ – Mode and standard deviation for Math Library

Taking forward the code written for the math library previously mentioned here. link. Wrote templatized functions for mode and standard deviations. (Some of the changes to the previous reviews were not made yet.
Please review the same.

NB: I get certain comments regarding the inclusion of headers. This is a part of a visual studio project and some of the headers are moved to pch.h.

CODE

#include <vector>
#include <numeric>
#include <string>
#include <functional>
#include <unordered_map>

namespace Statistics
{
    template <typename T>
    T average(const std::vector<T> &distributionVector)
    {
        if (distributionVector.size() == 0)
        {
            throw std::invalid_argument("Statistics::average - The distribution provided is empty");
        }
        return std::accumulate(distributionVector.begin(), distributionVector.end(), T()) 
            / (distributionVector.size());
    }

    template <typename T>
    T variance(const std::vector<T> &distributionVector)
    {
        if (distributionVector.size() == 0)
        {
            throw std::invalid_argument("Statistics::expectation - The distribution provided is empty");
        }
        T meanOfSquare = average(distributionVector);
        return (std::accumulate(distributionVector.begin(), distributionVector.end(), T(), (=)(T a,T b) { return a + (b - meanOfSquare )*(b - meanOfSquare); })/distributionVector.size());
    }

    template <typename T>
    T standardDeviation(const std::vector<T>& distributionVector)
    {
        return pow(variance(distributionVector), 0.5);
    }

    template<typename T>
    T mode(const std::vector<T>& distributionVector)
    {
        std::unordered_map<T, int> frequencyMap;
        std::for_each(distributionVector.begin(), distributionVector.end(), (&)(T a) { frequencyMap(a)++;  });
        int maxCount = 0;
        std::for_each(frequencyMap.begin(), frequencyMap.end(), (&)(auto a) { maxCount = std::max(maxCount, a.second); });
        T answer;
        std::for_each(frequencyMap.begin(), frequencyMap.end(), (&)(auto a) { if (maxCount == a.second) { answer = a.first; } });
        return answer;
    }
}

Test code

#include <vector>
#include <numeric>
#include <string>
#include <functional>
#include <unordered_map>

namespace Statistics
{
    template <typename T>
    T average(const std::vector<T> &distributionVector)
    {
        if (distributionVector.size() == 0)
        {
            throw std::invalid_argument("Statistics::average - The distribution provided is empty");
        }
        return std::accumulate(distributionVector.begin(), distributionVector.end(), T()) 
            / (distributionVector.size());
    }

    template <typename T>
    T variance(const std::vector<T> &distributionVector)
    {
        if (distributionVector.size() == 0)
        {
            throw std::invalid_argument("Statistics::expectation - The distribution provided is empty");
        }
        T meanOfSquare = average(distributionVector);
        return (std::accumulate(distributionVector.begin(), distributionVector.end(), T(), (=)(T a,T b) { return a + (b - meanOfSquare )*(b - meanOfSquare); })/distributionVector.size());
    }

    template <typename T>
    T standardDeviation(const std::vector<T>& distributionVector)
    {
        return pow(variance(distributionVector), 0.5);
    }

    template<typename T>
    T mode(const std::vector<T>& distributionVector)
    {
        std::unordered_map<T, int> frequencyMap;
        std::for_each(distributionVector.begin(), distributionVector.end(), (&)(T a) { frequencyMap(a)++;  });
        int maxCount = 0;
        std::for_each(frequencyMap.begin(), frequencyMap.end(), (&)(auto a) { maxCount = std::max(maxCount, a.second); });
        T answer;
        std::for_each(frequencyMap.begin(), frequencyMap.end(), (&)(auto a) { if (maxCount == a.second) { answer = a.first; } });
        return answer;
    }
}

Do you prefer military (24h) or standard (12h) time?

& why do you prefer that method. I like standard. While I can understand military time, just easier to have a.m. & p.m. for me!

t sql – T-SQL – Standard Deviation for Times?

You can convert a time value to a corresponding number of desired time units by using the DATEDIFF() function:

DATEDIFF(MINUTE, CAST('00:00' AS time), YourTimeColumn) AS Minutes

DATEDIFF(SECOND, CAST('00:00' AS time), YourTimeColumn) AS Seconds

DATEDIFF(MILLISECOND, CAST('00:00' AS time), YourTimeColumn) AS Milliseconds

Basically, you are just obtaining the difference, in the given units, between the timestamp of 00:00:00.0000000 and your time value.

You can put the entire expression inside STDEV:

STDEV(DATEDIFF(MINUTE, CAST('00:00' AS time), YourTimeColumn))

That, of course, will give you the deviation in minutes. If you need to convert it back to time, you can do it by applying DATEADD() to the STDEV result:

DATEADD(
  MINUTE
, CAST('00:00' AS time)
, STDEV(
    DATEDIFF(
      MINUTE
    , CAST('00:00' AS time)
    , YourTimeColumn
    )
  )
)

The final expression becomes quite cumbersome this way. You can try simplifying it by defining some of the intermediate expressions as columns. One way is to use CROSS APPLY. For instance, here is how you can define and use a temporary computed column for the DATEDIFF result:

SELECT
  ...
  DATEADD(MINUTE, CAST('00:00' AS time), STDEV(tmp.TimeMinutes)) AS TimeStDev,
  ...
FROM
  dbo.YourTable AS data
  CROSS APPLY
  (
    SELECT
      DATEDIFF(MINUTE, CAST('00:00' AS time), data.YourTimeColumn)
  ) AS tmp (TimeMinutes)
  ...
WHERE
  ...
;

Standard Library by Xon

Admin submitted a new resource:

Standard Library by Xon – A number of helper utilities designed to ease add-on development

A number of helper utilities designed to ease add-on development, does not have any direct user-facing changes.

Uploaded to the resource manager to aid dependency tracking and allow updating without updating every individual add-on

Read more about this resource…

.