letters

What Letter and Number Mixups Need to be Considered?

I just had a user tell me his registration key didn't work. It took me quite a while to figure out that he entered the capital letter "O" instead of the number "0". So I decided that it is best for my registry checker to treat both "O" and "0" as equivalent, so both will work. I can think of two other possible mixups: The number "1...

generating random alphabets with some alphabets having a higher frequency of occurence(vc++6.0)

basically i have a function that generates random alphabets .i have done this using the rand() function to generate numbers and them converted them to their corresponding ascii equivalents. but i want the vowels to be generated in higher numbers as compared to other alphabets.i.e if have generated say 10 alphabets then there should be li...

simplest, shortest way to count capital letters in a string with php?

I am looking for the shortest, simplest and most elegant way to count the number of capital letters in a given string. ...

Regex - Match only letters, numbers, and one space between each word

How can I create a regex expression which will match only letters and numbers, and one space between each word? Good Examples: Amazing Hello Beautiful World I am 13 years old Bad Examples: Hello world I am 13 years old. I am Chuck Norris ...

Library or code to convert digit in letters

Could you suggest me a code or a library (possibly java) to convert digits (e.g. 24) in letters (e.g. twenty-four)? Obviously I need to change locale (from English to Italian). Thank you in advance and sorry for my English... Fabio ...

what's a good enterprise document generation solution? (SQL Server, .NET)

I wonder what "the big guys" use to generate documents. Like credit card statements, insurance documentation, etc. We're investigating changing solutions. Here are the two that I know of: SSRS Crystal Reports Neither of these seem to be able to handle widow/orphan control well. Crystal certainly can't deal with dynamically sized p...

How to go from list of words to a list of distinct letters in Python

Using Python, I'm trying to convert a sentence of words into a flat list of all distinct letters in that sentence. Here's my current code: words = 'She sells seashells by the seashore' ltr = [] # Convert the string that is "words" to a list of its component words word_list = [x.strip().lower() for x in words.split(' ')] # Now conver...

How to change String value comparison

In my code I need to compare string letters but my problem is that lower case letters are greater than upper case letter. For example Z < a. How could I implement this in my code ? Thanks ...

R: How to get the index of a letter from a list A-Z?

I want to get the index of a particular letter, e.g. > match(LETTERS,"G") [1] NA NA NA NA NA NA 1 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA Gives me that the letter exists, but I want it to return 6 in this case for the 6th element of the list. ...

PHP imagettftext: bounding boxes of letters superimpose above each other

I'm writing text-images on the fly with PHPs imagettftext, which works fine so far, but I have a very strange problem. We are using a very italicized font and apparently the bounding boxes of later letters are sometimes superimposing their background over previous letters, thus cutting into them. A screenshot of the effect can be seen...

letters or numbers only in a password with jquery

Hi, I found this code for alphanumeric check ("Letters, numbers, spaces or underscores") but I want to change so I will be able to write only letters or numbers. Can anyone tell me how to change this code: function(value, element) { return this.optional(element) || /^\w+$/i.test(value);} Thanks! Greg ...

How do I get the set of all letters in Java/Clojure?

In Python, I can do this: >>> import string >>> string.letters 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' Is there any way to do something similar in Clojure (apart from copying and pasting the above characters somewhere)? I looked through both the Clojure standard library and the java standard library and couldn't find i...

Function calculating the probability of a letter in an sentence

I have a function that is supposed to calculate the number of times a letter occurs in a sentence, and based on that, calculate the probability of it occurring in the sentence. To accomplish this, I have a sentence: The Washington Metropolitan Area is the most educated and affluent metropolitan area in the United States. An array o...

How to seperate String into chars

public static string kw; public String parse(String keyword) { this.keyword = keyword; char[] letters = keyword.ToCharArray(); string g; long length = System.Convert.ToInt64(keyword.Length.ToString()); for (int i = 0; i <= length-1; i++) { kw = "/"+letters[i]; } return kw; } So if the keyword i...

python: How do I assign values to letters?

I want to assign a value to each letter in the alphabet, so that a -> 1, b -> 2, c -> 3, ... z -> 26. Something like a function which returns the value of the letter, for example: value('a') = 1 value('b') = 2 etc... How would I go about doing this in python? ...

jquery arabic letters support

hi guys try this code it works very smooth Html <html><body> <div id="container"></div> </body></html> Jquery $('<div id="footer"><p>جميع الحقوق محفوظه لشركة</p></div>').insertAfter('#container'); but the problem in Arabic letters its look like that ������������������������ ...

Lowercase letters tail height (g, j, p, q, y)

Hi, This question is a little bit odd. I have to make sure of the distance between letters above and below. Now when calculating a letter height in Pixel, say font size = 14px does this mean my alloted pixel height for a letter is 14 pixels? What about the letters with tail? How are their tails alloted in Pixels? ------------ | **...

What is the best way to match only letters in a regex?

I would really like to use \w but it also matches underscores so I'm going with [A-Za-z] which feels unnecessarily verbose and America centric. Is there a better way to do this? Something like [\w^_] (I doubt I got that syntax right)? ...

Bash script to find the frequency of every letter in a file

I am trying to find out the frequency of appearance of every letter in the english alphabet in an input file. How can I do this in a bash script? ...

replacing letters (from a phrase) with images

$q = "my phrase with special chars like úção!?"; while ($i < strlen($q)) { echo '<img src="'.$q[$i].'.png" />'; $i++; } i also tried with switch/case but when i have chars like ç Ç ã â i cant get the image replacing to work since its more than one char (i was converting to html entities and then searching in the case ccedil but its ...