The line `Table[Prime[n],{n,1000}]`

produces the list of first 1000 primes. Given this list how can the values be grouped by the values of their tens digit? i.e. how to have the primes in 10s together. and then primes in 20s together and so on up to primes in 7900s?

# Tag: digit

## windows 7 – why does a dot between two digits changes automatically to comma immediately after typing the second digit?

I have a problem with word on my laptop. I uninstalled and then reinstalled my office 3 times (different versions) and the problem still exists.

When I try to type 1.1 in Persian, it converts to 1,1 immediately after pressing the second digit on the keyboard.

I changed the settings in regional and language to set the default decimal symbol of the system, but it does not affect the issue.

I am using windows 7 and checked office 2010, 2013, and 2016 and in all versions of office, this problem occurs.

## sql – c # How to check password in MVC with at least 1 uppercase, 1 lowercase and 1 digit

I have to do a user registration asking me to confirm the password.

It must contain at least 1 uppercase letter, 1 lowercase letter and 1 digit. How can I check this?

I've validated with data annotations in the following way, but I've found out in this validation.

I use asp.net MVC!

**Valid here with data annotation**

**This is my controller**

Thank you very much if you can give me a good hand

## Power Shell. Add +1 digit for each object

I have a list of IPs stored in the TXT file at C: IPs.txt

```
10.0.0.0
100.0.0.0
```

And a PowerShell script that runs commands for every entry in this file.

```
Get-Content C:IPs.txt |ForEach-Object { Write-Host 1 - $_ }
```

So this command returns

```
1 - 10.0.0.0
1 - 100.0.0.0
```

How do I add +1 to a digit so the PowerShell command returns:

```
1 - 10.0.0.0
2 - 100.0.0.0
```

## ubuntu gnome – Prevents psensor shifting thanks to digit change on the label of the application indicator

Sorry in advance for this kind of concern :), but is it possible to prevent the psensor display from shifting if one of the sensor labels wins / loses a digit?

These screenshots are not precise, but they could help to show what I mean.

I really like it when the sensor label is shown on the application indicator because it allows me to monitor resource usage and availability. However, if the numbers change by one digit, I notice this (especially since I sometimes expect updates from other apps that also display the icon).

I believe that a fixed placeholder for ten (and a hundred) digits would solve this problem. The other solution, of course, is to reduce the update interval, but that would of course not be optimal.

## Algorithms – How much time (in hours) will it take to check whether the 20 binary digit number is the prime number?

How much time (in hours) will it take to check whether the 20 binary digit number is the prime number? In a problem it is mentioned that for a number with 10 digits 1 hour has passed and the number has been checked with AKS piracy test and it is also stated that log (n) is the length of the number to be verified.

## haskell – Square all digits of a digit

Task: Use a number (positive or negative) to square each digit and concatenate it into a number.

For example:

9119 should become 811181 = 9 ^ 2 * 10 ^ 0 + 1 * 10 ^ 1 + 1 * 10 ^ 2 + 9 ^ 2 * 10 ^ 3

(-1) should become (-1)

My code:

```
-- convert a number to the list of digits
-- doesn't work with negative numbers
digs :: Integral x => x -> (x)
digs 0 = (0)
digs x = let
helper :: Integral x => x -> (x)
helper 0 = ()
helper n = helper (n `div` 10) ++ (n `mod` 10)
in
helper x
squareDigit :: Int -> Int
squareDigit n = let sign = signum n
digits = (digs (abs n))
digs_sq = map (^ 2) digits
-- we can't concat squares as they may have more then 1 digit
digs_sq_flat = map digs digs_sq >>= id
in
sign * foldl (acc x -> x + (acc * 10)) 0 digs_sq_flat
```

Basically it works:

```
*SquareDigit> squareDigit 9119
811181
*SquareDigit> squareDigit (-9119)
-811181
```

But maybe my solution can be made more elegant.

## Excel – Additional commas between each digit in the iPhone table from the SSRS report

This is a really bizarre question, but I can't find anything like it anywhere. I have an SSRS report that is automatically emailed to some recipients. One of them told me that while it looked good on the computer, additional commas were added on its iPhone. See attached example. Any ideas what I could try? I use the standard format "#, 0.00; (#, 0.00)". Enter the image description here

## magento2.3 – Magento 2 Swiss currency decimal digit problem only on the staging server

In Magento 2.3.1 we have several stores on our server

A currency format problem has only occurred on the server on the success page and checkout page of the shopping cart. We have set up the Swiss currency and the decimal place shows just a number like – **CHF 123.0** (Only on the shopping cart overview and the checkout page)

Expected currency format **CHF 123.00**

## Convert string "0400" to a 2d array with the binary equivalent of each digit in string

String str = "0400";

2D array int [] [] mat = new int [4] [4];