# zeros (554)

How do you prevent leading zeros from being stripped when importing an excel doc using c#

I'm able to connect to and read an excel file no problem. But when importing data such as zipcodes that have leading zeros, how do you prevent excel from guessing the datatype and in the process str…

How to zero pad numbers in file names in Bash?

What is the best way, using Bash, to rename files in the form:(foo1, foo2,..., foo1300,..., fooN) With zero-padded file names:(foo00001, foo00002,..., foo01300,..., fooN)…

security - Why overwrite a file more than once to securely delete all traces of a file?

Erasing programs such as Eraser recommend overwriting data maybe 36 times. As I understand it all data is stored on a hard drive as 1s or 0s. If an overwrite of random 1s and 0s is carried out once o…

Removing leading zeroes from a field in a SQL statement

I am working on a SQL query that reads from a SQLServer database to produce an extract file. One of the requirements to remove the leading zeroes from a particular field, which is a simple VARCHAR(10…

Is there any built-in way to convert an integer to a string(of any base) in C#?

Convert.ToString() only allows base values of 2, 8, 10, and 16 for some odd reason; is there some obscure way of providing any base between 2 and 16?…

how to trim leading zeros from alphanumeric text in mysql function

What mysql functions are there(if any) to trim leading zeros from an alphanumeric text field? Field with value "00345ABC" would need to return "345ABC".…

algorithm - How to count the number of set bits in a 32-bit integer?

8 bits representing the number 7 look like this: 00000111 Three bits are set. What are algorithms to determine the number of set bits in a 32-bit integer?…

String Format Date-C# or VB.NET

Date coming out of a database, need to format as "mm/dd/yy" For Each dr as DataRow in ds.Tables(0).Rows Response.Write(dr("CreateDate")) Next…

python - Display number with leading zeros

Given: a=1 b=10 c=100 How do I display a leading zero for all numbers with less than two digits? That is, 01 10 100…

I'm trying to find a good way to print leading 0's, such as 01001 for a zipcode. While the number would be stored as 1001, what is a good way to do it? I thought of using either case statements/if th…