61 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for kouty

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 ++) …

Member Avatar for Traevel
0
383
Member Avatar for nathan.pavlovsky

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 …

Member Avatar for nathan.pavlovsky
0
258
Member Avatar for Greyhelm

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 …

Member Avatar for Greyhelm
0
329
Member Avatar for Scooterman1

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 …

Member Avatar for asmita.saha.1
0
4K
Member Avatar for Vikram Sehgal

Hello, so i am making a shooter game, and i want the asteroids or '@' to spawn randomly along the y axis and fall down (- y axis per second) compiler:- codeblocks os:- win 7 thanks.

Member Avatar for Vikram Sehgal
0
296
Member Avatar for SolidSolutions

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 …

Member Avatar for lucascaixeta
0
5K
Member Avatar for robert.knighton.79

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 …

Member Avatar for robert.knighton.79
0
3K
Member Avatar for Kewne

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 …

Member Avatar for Kewne
0
174
Member Avatar for schroaus

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 for schroaus
0
690
Member Avatar for patrickgormally

I'm writing a program in .asm which prompts the user to enter a sentence. I have no problems with this but one requirement of the program is to change the format of the sentence by replacing all the spaces (" ") with underscore characters ("_"). How do I go about …

Member Avatar for Assembly Guy
1
6K
Member Avatar for ivanichi

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 …

Member Avatar for ivanichi
0
255
Member Avatar for Taras20

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 …

Member Avatar for nullptr
0
410
Member Avatar for guilherme.carvalho.9250

Hello to everyone, I´m having problems on retrieving data from mysql to a textfield in html, the data appears with queston marks inside of a "black diamond"! I researched and followed the steps like putting the database charset utf8, the table too! When I insert for example Alimentação its goes …

Member Avatar for guilherme.carvalho.9250
0
3K
Member Avatar for LastMitch

Hi I can't access on **PHP** section for **25** minutes close to half hour now. It keep on saying **Disallowed Key Characters**. Are you updating the section?

Member Avatar for LastMitch
0
387
Member Avatar for it@61@sec

I have a bash script (test.sh) which reads parameters from the command line. The parameters could look like this: param1 param2 param3&ext param4 param5 The problem is that when the script reads the parameters and then echo them I get the following: param1 param2 param3 No command 'ext' found did …

Member Avatar for it@61@sec
0
967
Member Avatar for dancks

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 …

Member Avatar for dancks
0
419
Member Avatar for umesh314

Hi, I am trying to write a code in which i want to read the command line arguement ( which i can get by using $(0,1,...) ) and want to give the arguement to some filename. Eg. ./myprogram filename.cpp I want to remove ".cpp" from the filename and want to …

Member Avatar for Watael
0
200
Member Avatar for babi.meloo

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 …

Member Avatar for JamesCherrill
0
2K
Member Avatar for somjit{}

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[]) …

Member Avatar for somjit{}
0
4K
Member Avatar for kingkactuar

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 …

0
120
Member Avatar for shifat96

I need help for another one of my assignments for CS Class. On the rubric, one of the part said: > all characters are shifted right by two positions and the last two characters becomes the first two characters The condition is that the string has to be entered by …

Member Avatar for shifat96
0
2K
Member Avatar for yeeitsneo

hi. would someone minf giving me a snippet of a code where a program searches for a specific character in a string? for example. if i have a label that contains a string "abcd" the program would check if the characters "b" and "d" exist in the string regardless of …

Member Avatar for ChrisPadgham
0
965
Member Avatar for webmedia

My sms gateway save message data in log(MSSQL) in Hex code, like this: 0046003A0062006F006B0040007700650062006D0065006400690061002E0070006C These are Unicode message (16 bits per characters) Each 4 characters is AsciiHex representation of a character (in hex): For example: “0046” = 46hex = ‘F’ “003A” = 3Ahex = ‘:’ how can I convert this …

Member Avatar for webmedia
0
708
Member Avatar for Sturdy

Hi all, How can i validate a text in text box? I need to check that text length is 7 and first four characters is contain "ABCD" and last three characters must contain numbers. e.g : ABCD123 Thank you.

Member Avatar for Sturdy
0
1K
Member Avatar for engineerchica

Hello! I am working on a problem to count characters (without using strings) and I got my program to work! However, I got it to work before I put the code that counts characters into a function (countChar), which is required for this assignment. I'm not sure I understand how …

Member Avatar for engineerchica
0
189
Member Avatar for FALL3N

ok, I'm pretty embarrassed to be posting such a simple question, I feel like I've done this in much harder applications like a million times... [CODE]String[] wordVar = text.split("$");[/CODE] Why does the above code not split the String 'text' at each occurrence of a "$"? Is the "$" a special …

Member Avatar for FALL3N
0
167
Member Avatar for hamby

Hi guys, I'm writing a weasel program and needed a random character generator, I used a random number generator to give an ascii code for each character, and made a sequence of them, then I realized I needed to include the "space" symbol, but upon inclusion of the new code …

Member Avatar for hamby
0
186
Member Avatar for inuasha

How would I find the amount of characters in a string and then use that to print a certain amount of some character that you choose. For example: [CODE=Python] a = 'string' # this holds 6 characters print '*' * # amount of characters in string [/CODE]

Member Avatar for inuasha
0
241
Member Avatar for lethal.b

I am writing a program using J2ME and my goal is to count how many times each character appears in a string. I am not very good at java so the way i see i should do this is create 2 arrays. First array is used to hold characters. Second …

Member Avatar for lethal.b
0
184
Member Avatar for Kyle Willett

I need help with a programing assignment for my CS 2 class, the task is to check rather a user inputted string is a palindrome meaning it is the same forwards as it is backwards. I have most of the program working, I input a string then copy it and …

Member Avatar for frogboy77
0
263

The End.