I wrote a web page with one Russian word in it, using the Cyrillic alphabet character entity names (found in a list of all Unicode characters that I have). The page works fine in every browser I tried. But the W3C validator won't validate the page because the Cyrillic character entity names were used. It validates if I use the Unicode numbers instead, but that is such clanky programming. It reminds me of having to type in the ASCII code for every character the program displays in assembly language programming. Why can't we have the better programming practices? W3C seems …

Member Avatar
Member Avatar
+0 forum 14

Hello I try to learn the String.charCodeAt(index) method Here is a snippet that demonstrate that the first index is allways 48 independentely of the character. How work's it (I was expecting that each letter has her unicode-number equivalent. function unicoding(str) { for (i = 0; i < str.length; i ++) { console.log(String.charCodeAt(i)) } return str; } unicoding("abce"); unicoding("abcde"); unicoding("zabcdef"); unicoding("yzabcdefg"); 48 49 50 51 48 49 50 51 52 48 49 50 51 52 53 54 48 49 50 51 52 53 54 55 56 => 'yzabcdefg' what is the secret of this numbers. Sorry if it is very trivial.

Member Avatar
Member Avatar
+0 forum 9

All, I am wanting to be able to "read" hand writing. I have managed to get the hand written characters from papers. I now - to the computer - have just pixels on paper (output is in .pdf format). I want to have the computer be able to convert the pixels into letters and numbers, then into words that can be read/analyzed by the computer. My thoughts are to see if there is open source for hand writing character recognition that I can use as a start. I also read that I would need a large data set of charaters. …

Member Avatar
Member Avatar
+0 forum 1

Hi all! Whenever I am working with my code in my main.cpp file, I can call character-handling functions like * isdigit * isalpha * isspace * toupper without importing the `cctype` library. However, my C++ How to Program Book shows that the cctype library must be imported before the functions can be used. Why and how am I able to access these (working) functions without importing the cctype library in my main.cpp file?

Member Avatar
Member Avatar
+0 forum 7

Hi.. I'm doing a project on Vb.net 2008.. There's a textbox called "Price" which requires validation.. The validation is that the textbox should not enter dot, special characters or alphabets as the first character.. The Dot should only be active after the number which is entered on the textbox.. for now i'm using this code.. Thanks in advance Private Sub txt7_pprice_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt7_pprice.KeyPress If Char.IsDigit(e.KeyChar) Or (Asc(e.KeyChar) = Asc(".")) And Me.txt7_pprice.Text.Count(Function(c As Char) c = ".") = 0 Then e.Handled = False ElseIf Asc(e.KeyChar) = 8 Then e.Handled = False Else e.Handled = …

Member Avatar
Member Avatar
+0 forum 4

I am trying to get character matching when comparing two strings. The result would display the two words side by side with the matching (and non-matching) characters displayed. This would be similar to mastermind. Example: (test word) - HALE (sample word) - HELP This would be displayed as: H?L? HELP and with each subsequent test word, it would update for matches: H?L? HELP HEL? HELP HELP HELP The code would register each test and display success or failure at the end of the line. I can do that part and even compare the two words. I just need to get …

Member Avatar
Member Avatar
+0 forum 5

hi i want to get character like 'a','c','b' etc as input from user and before geting the character first i need to get how many character should be entered if it is 5 then i will get 5 times input as character from user.and i want to asign some value to these character 'a'=10,'c'=8 'b'=9 etc ... plz help me

Member Avatar
Member Avatar
+0 forum 1

Hi techies, I am new to webservices. The issue is regarding a SOAP request. The request contains a comment which has the charechter as "&" example., the comment is: You & me & is getting converted to "&amp;" in the receiver side. We tried getting the SOAP request (from our side) replaced the "&amp;" to & in the comment and sent the request to other side But still we get the "&amp;" in the other side. Is there any way to solve the same. Will be happy if I can get some good solution. thanks.

Member Avatar
Member Avatar
+0 forum 2

Hello, I admit I’n not sure about which forum to post my question to. Anyway, here’a my "problem" - not as much a problem (as my website is served alright) but it bugs me. My website ([www.rosebrossut.fr](http://www.rosebrossut.fr/)) was created in XHTML and with character encoding ASCII. In the meta tags both the mime-type and character encoding is declared accordingly (application/xhtml+xml and us-ascii) but when I look in Firefox both are identified as text/html and windows-1252, respectively. Trying to validate the code using Validator.nu yields the same result and thus any XML markup and the subsequent us-ascii declaration results in a …

Member Avatar
Member Avatar
+0 forum 3

I am writing a program where the user enters 2 strings and the program checsk to see if any characters are in both strings, and if they are, remove them from the first string and print it. So i have this at the moment, and it's almost working but it seems to be ignoring the first character of the second string. If you enter "computer" and "program", for example, it returns "cpute" instead of "cute". Anyone have any ideas? [CODE] #include <iostream> #include <string> using namespace std; int i; int j; string x; string y; int main() { cout << …

Member Avatar
Member Avatar
+0 forum 5

Howdy, I found that the symbol "<" can be encoded this way: "[\xC0][\xBC]" Can you tell me in which encoding standard does "[\xC0][\xBC]" belong ? Regards from Begueradj

Member Avatar
Member Avatar
+0 forum 1

I had a difficult time figuring out how to get or test the last character of a string with javascript, so figured I would post it once I found out in case it helps someone else. I found plenty of removing the last character, but not for just checking what the last character of a string is using javascript. [CODE]// create string var str = new String("No Periods Allowed."); // alternatively get string from field: // var str = document.getElementById('textbox').value; // show last character in the string alert( str.charAt( str.length-1 ) ); // remove last character from string if a …

Member Avatar
Member Avatar
+0 forum 2

I'm trying to take input keypress event and move the text it would have typed into a textbox to a different textbox instead. textBox1 has a length limit of 1 so I dont actually have to prevent text going into the box because the textbox is already full I just need to put the character that would have been typed into the next textbox **Lines 16 and 24 are the problem afaik** '******************************************************* 'Handle all typeable characters in populated(full) boxes '******************************************************* If (e.KeyCode > 31 And e.KeyCode < 127) Then 'Only handle full textboxes (empty are already handled) If Not …

Member Avatar
Member Avatar
+0 forum 8

I have this line of code: $str = "$str<td><a href=\"javascript:Open($Row->ID , $Row->IDCode)\" title=\"click to open window...\">more...</a></td></tr>"; it works fine when the IDCode at the $Row->IDCode is a numeric but then it doesn't work anymore when the IDCode starts with a character. At my database the ID is int(11) unsigned and the IDCode is varchar(10).... the javascript for this is: function Open(susi,kodigo) { if (susi) { Win = window.open("View.php?View=" + susi + "|" + kodigo , "winMore", "height=480, width=450, resizable=yes, scrollbars=yes, top=100, left=125"); } } ...it's not clear to me why it doesn't work on characters.... please help...thank you in advance...

Member Avatar
Member Avatar
+0 forum 2

**Bold Text Here**a program hat can convert uppercase characters to lower characters

Member Avatar
Member Avatar
-2 forum 5

Is there any way to change all of the text inside a label to another character? It would still be the same length, but all of the text within the label would be the new character.

Member Avatar
Member Avatar
+0 forum 7

Hi, I am trying to write a program which read a certain input in a particular format and then gives an ouput. I wrote a code to read the file. Input is something like this. X 20 60 80 90 X 78 98 97 96 X 34 35 43 23 Y 76 87 34 Y 65 76 72 Z 13 70 39 So my reading function read the input and then it counts the number lines with X and Y. Now, when I wrote two different funcions to read X and Y lines. When I am finished reading the X …

Member Avatar
Member Avatar
+0 forum 4

This module is for validating textboxes.... After using this module in your project you can simply validate all of your text boxes like [CODE] Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AssignValidation(Me.TextBox1, ValidationType.Only_Digits) AssignValidation(Me.TextBox2, ValidationType.Only_Characters) AssignValidation(Me.TextBox3, ValidationType.No_Blank) AssignValidation(Me.TextBox4, ValidationType.Only_Email) End Sub [/CODE]

Member Avatar
Member Avatar
+4 forum 14

hi! i have a program in C++ that produces a right triangle of character and i need the same program, i mean a program that makes the same function, but in C. This is my program in C++ : #include <iostream> using namespace std; int main() { int i,j; char input,temp='A'; cout<<"Enter uppercase character you want in triange at last row: "; cin>>input; for(i=1;i<=(input-'A'+1);++i) { for(j=1;j<=i;++j) cout<<temp<<" "; ++temp; cout<<endl; } return 0; } please help me :)

Member Avatar
Member Avatar
+0 forum 2

Assuming i have $a='1024,1025,0000|1020,0000|'; $b='1024,1025,0000,1020,0000,'; i want replace commas (,) in $b with (|) so that $b is equal to $a like this $b='1024,1025,0000|1020,0000|'; if i use $ob=str_replace("0000,","0000|",$b); echo $ob; output works : 1024,1025,0000|1020,0000| But, how to make it with PHP where did i put that this refers to the $a and what if it does not always 0000, with other purposes may be i want replace character referring to another character sequence in the array, so that $b is equal to $a, other sample : eg : $a='1024,1025,1234|1020,0000|'; $b='1024,1025,1234,1020,0000,'; output: $b='1024,1025,1234|1020,0000|'; thanks to your help. regards,

Member Avatar
Member Avatar
+0 forum 6

Basically i have literally just started learning Java Script and i was seeking some help as to how i could repeatedly display the character "X" any given number of times using a function. Here is what i have so far: function makex(8) { var resultStr = ""; for (var xcount = 0; xcount < makex(8); xcount++) { resultStr = resultStr + 1; // this line was an experiment so could be completely wrong? } return resultStr; } // this is just so when you press run // i get some output console.log(makex(7)); Would really appreciate anyone that could help me. …

Member Avatar
Member Avatar
+0 forum 3

hi everyone :) what i'm trying to do is to check if word in a string has numbers in it for example: if i enter string of one word "he11o" i want to show error message that says "One or more characters are numeric! Please re-enter the word!" and if every character is alphabetic i want to let program continue working(this is just a small part of my overall program.) i have no idea how to check each character, please help. i'm working in DevC++ 4.9.9.2 if that matters my overall program is about converting NOUN words to PLURALS i …

Member Avatar
Member Avatar
+0 forum 3

Problem : String : Hello World Output : H occured 1 times e occured 1 times l occured 3 times o occured 2 times W occured 1 times r occured 1 times d occured 1 times How to do it in Javascript...

Member Avatar
Member Avatar
+0 forum 1

This Python code allows you to get selected statistics of a story text. It will count lines, sentences, words, list words and characters by frequency, and give the average word length. It should be easy to add more statistics using the dictionaries created.

Member Avatar
Member Avatar
+3 forum 5

Ok. As the title says I tried many times to simply write a program that rewrites a file to remove null characters. I confirmed with a hex editor that the file in question has tons on null characters, on average about 1 of every 2 characters in null. So my last attempt: #include <stdlib.h> #include <stdio.h> int main() { FILE *f = fopen("main2.c","r"); FILE *t = fopen("temp","w"); int c; int count = 0; while((c = fgetc(f))!=EOF) { if(c) { fputc(c,t); } else { printf("null found\n"); } } fclose(f); fclose(t); FILE *n = fopen("main2.c","w"); FILE *w = fopen("temp","r"); while((c=fgetc(w))!=EOF) { fputc(c,n); …

Member Avatar
Member Avatar
+0 forum 10

Hello, I have a problem about counting consequtive characters, here my code char query[] = "tttthe oneZZZZZ trully loveeee"; void cntfreq(char A[]) { int j; int k=0; j = 1; while (A[j] != '\0') { if (A[j-1] == A[j]) { ++k; cout<<k<<"\t"<<A[j]<<endl; } else k = 0; ++j; } } Suppose that also my char is the following as an input: char query[] = "tttthe oneZZZZZ trully loveeee"; I success in counting the consequtive characters, but it counts minus 1, for example there are 4 consecutive char 't' but it says 3 't' or 5 'Z' character, but it outputs …

Member Avatar
Member Avatar
+0 forum 1

I need to design and implement an application that reads a string from the user and prints it one character per line. import java.util.*; import java.text.*; public class EveryLine5 { //---------------------------------------------------------------------------------------------- // Reads in a string. //---------------------------------------------------------------------------------------------- public static void main (String[] args) { int length; char current; String msg = "user input"; Scanner scan = new Scanner(System.in); System.out.println ("Enter a string: "); msg = scan.nextLine(); length = msg.length(); for (int count = 0; count < length; count++) { current = msg.charAt(count); System.out.println (current); count++; } } }

Member Avatar
Member Avatar
+0 forum 2

Hi, I've just started learning Python and for my first script I wanted to make something that would make life easier and that I would actually use, so starting small I've began working on a Torrent Search script that uses the ISOHunt API. However I've ran into a problem in the unfinished method that cleans the results from the search: def sanitise(string): a = string.split('{"title":') # split page into parts, a is list for i in range(len(a)): a[i].lower() # lower every char on page index = a[i].find('"enclosure_url":') b = a[i].replace(a[:index], "") print a[i] Here's an example search result: <b>Inception</b>.FRENCH.DVDRip.XViD-DVDFR", "link":"http:\/\/isohunt.com\/torrent_details\/255340617\/inception?tab=summary", …

Member Avatar
Member Avatar
+0 forum 2

i want to take the 1st argument from commandline, ie argv[1] and assign it to a `char target[80]` i know im making some very stupid beginer mistakes... but just cant understand what :( this is my code: #include <stdio.h> #include <string.h> void converge(char *targ, char *src); int main(char *argc[],char *argv[]) { char target[80]; target=(*argv[1]); converge(target, "This is a test of converge()."); printf("Final string: %s\n", target); printf("%s",argv[1]); return 0; } /* This function copies one string into another. It copies characters to both the ends, converging at the middle. */ void converge(char *targ, char *src) { int i, j; printf("%s\n", targ); …

Member Avatar
Member Avatar
+0 forum 2

I'm writing a program in MARS that encrypts/decrypts a string with a simple addition/subtraction method to each character according to a 4 digit key such as '2848.' I'm now trying to navigate through each character in a string and just increase the decimal count by 1 just to test it in a smaller scope but I don't understand how to save the byte back into the string. Here's what i have so far: .data title: .asciiz "program start\nenter string: " endl: .asciiz "\n" msg: .asciiz "You wrote: " .align 2 str: .space 20 count: .space 40 .text .globl main main: …

Member Avatar
+0 forum 0

The End.