Questions tagged [chars]

a datatype that can hold a character of the implementation’s character set.

208 questions
1
vote
4 answers

Swap chars or strings in data.frame

I have a data.frame with column of Sex: Name <- c("Alex", "Lilly", "Mark", "Oliver", "Martha", "Lucas", "Caroline") Age <- c(25, 31, 23, 52, 76, 49, 26) Height <- c(177, 163, 190, 179, 163, 183, 164) Weight <- c(57, 69, 83, 75, 70, 83, 53) Sex <-…
Babai I.
  • 23
  • 1
  • 4
1
vote
1 answer

SQL How clarify a weird char in a string

I have grabbed from a file source a column that suppose to be a DATE not more longer than 8 chars in a NVARCHAR(50) staging field. Now when I try to cast it to DATE it fails because SQL is not able to apply the transformation. I tried to go deeper…
Andres Urrego Angel
  • 1,842
  • 7
  • 29
  • 55
1
vote
2 answers

Copy data from a longer array to a shorter array

I would like to copy only certain data from an old array of chars to a new array of chars. This is what I have thus far: char[] charsInString = s.toCharArray(); int length = 0; for (int i = 0; i < charsInString.length; i++) { if…
1
vote
1 answer

Can I use: "TextEntered.ToUpperInvariant().Contains("a")" to count chars in a string?

I'm trying to count vowels in a certain string inputted by a user. So if there are 6 A's in a sentence that the user inputs via a console.Readline(); the console should return A=6. The final output is supposed to look a bit like: A =? I =? E =? …
Harry
  • 61
  • 1
  • 15
1
vote
0 answers

Special chars with images

I'm using the josh admin template which has a blog. The blog works with summernote. When i'm using special chars in German (like ü,ä,...) the blog shows it as special chars and not as "Umlaut". I'm also using the picture upload support which stores…
Peter
  • 655
  • 1
  • 14
  • 37
1
vote
1 answer

Split list of characters into list of words

I am currently learning SML functional language and I am trying to make a function that takes a list of characters then it searches for any white spaces in the list when it finds a white space it concatinates the characters before the white space to…
xx3z
  • 15
  • 3
1
vote
1 answer

ANTLR: Lexer rule accepting strictly one letter, and a token of multiple chars, instead of just one (Java)

I've written the below grammar for ANTLR parser and lexer for building trees for logical formulae and had a couple of questions if someone could help: class AntlrFormulaParser extends Parser; options { buildAST = true; } biconexpr : impexpr…
ChocolateBear
  • 415
  • 1
  • 4
  • 7
1
vote
7 answers

How to convert from integer to unsigned char in C, given integers larger than 256?

As part of my CS course I've been given some functions to use. One of these functions takes a pointer to unsigned chars to write some data to a file (I have to use this function, so I can't just make my own purpose built function that works…
Alf_InPogform
  • 53
  • 1
  • 2
  • 4
1
vote
7 answers

.NET RegEx - First N chars of First M lines

I want 4 general RegEx expressions for the following 4 basic cases: Up to A chars starting after B chars from start of line on up to C lines starting after D lines from start of file Up to A chars starting after B chars from start of line on up to…
Fit Dev
  • 3,413
  • 3
  • 30
  • 54
1
vote
2 answers

Java/Android: how to find the first characters of a string if it equals other string

I have a String Array #1 countries[] and I have another String Array #2 splitr_str[] that have the same values but it split in half. What I want is to to check which value of the #2 Array match the first half value of the #1 String Array which has…
Fadi A.
  • 93
  • 1
  • 10
1
vote
2 answers

How do I iterate over a list of chars while still being able to skip in the iteration?

I have the following piece of code: let mut lex_index = 0; let chars = expression.chars(); while lex_index < chars.count() { if(chars[lex_index] == "something") { lex_index += 2; } else { lex_index += 1; } } I use a…
duck
  • 1,674
  • 2
  • 16
  • 26
1
vote
1 answer

I am trying to get html data from a site using urllib but for some sites i am ending up with some unknown characters in python

Hey guys i am trying to get a html data from a site using urllib.openurl.read() but for some sites all i am getting is data link this * 6\xbdW\xb6\xd6\xff\xca\x9d\x9bO|\xc0\x96a\xc7\xc8\xf7\xa7\x10-\x8aM{\xf8\x* and i have no clue what it is and why…
laslavinco
  • 344
  • 4
  • 14
1
vote
1 answer

Program to check user input for password (in chars) doesnt give the right results, C#

I'm trying to have the program check the user entry in chars against the Password "prog". The user has three tries to get the right Password. However it often gives the answer "right Password" although it doesnt match. using System; using…
zom4
  • 21
  • 3
1
vote
1 answer

puttging special chars in a java string like "ctrl+insert"

java strings problem: I am trying to automate a process of special char typing (ctrl+insert) using a java based system. i have tried googling it with no luck how do i include chars like these in a java string?
op g
  • 9
  • 6
1
vote
0 answers

SIMCOM SIM900 Arduino AT answers strange characters

I have been testing the following product http://thumbs2.ebaystatic.com/d/l225/m/mboWkBZlMUEWh7HE5iTGyAg.jpg the module is correctly registered to the mobile network since I can the MSIDSN and it rings. Unfortunately I'm not able to send AT commands…