Example of a string:
"Some text.....!!!!!!!!?????"
Using PHP how would I get the position of the last letter (or even alphanum character) which in this example is the letter t?
In Java/C++, for example, do you casually say that 'a' is the first character of "abc", or the zeroth?
Do people say both and it's always going to be ambiguous, or is there an actual convention?
Hello everyone,
I have variable length character and want to store in SQL Server (2005) database. I want to learn some best practices about how to choose TEXT SQL type or choose VARCHAR SQL type, pros and cons in performance/footprint/function.
thanks in advance,
George
I have two pieces of text. I would like to make a word-based diff between them (like whe unix utility wdiff does) but with more information in the output (I mean, the character's posizion where the added/delited word starts).
I need to do this in Java, so a simple output of the differences (like wdiff) doesn't suite for me: I would like to manipulate objects representing differences.
Hi again, here is my coding which gives me the error 'warning: unknown conversion type character 0x20 in format'
int subtotal;
long long a,b,c,d,e,f,g,h,i,j,k,l,m;
subtotal = (1*(a+c+e+g+i+k))+(3*(b+d+f+h+j+l));
printf(" = %d % 10 = %d; (10 - %d) % 10 = %lld\n", subtotal,subtotal%10,subtotal%10,m);
any idea why this is wrong?
i have an char array b[20] which i want to write into a file . After every iteration the value of b[20] changes , so i would like to write the string in each line of the file in each iteration . So how can i change a new line in a file and also put in a array of character?
I want to print in the terminal with colors ? how can I do that in python ?
Another questions what is the best character that when it is printed it look like a box [brick] ?
I want to print colored blocks, it is part of game :)
Hi friends i am trying to move curser move to the next line. it is worked but when i enter a character in textview curser again back to first line. please help me any one. i am writing below code.` if (textView == mailBodyTxtVew)
{
textView.text= [textView.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
//[textView resignFirstResponder];
// return NO;
}
`
In a perl script, I'm trying to accept input without blocking and without echoing the characters entered (The script is producing output and I want to have 'hotkeys' to alter its behaviour).
I got as far as using
use Term::ReadKey;
ReadMode( "cbreak", STDIN );
if($input = ReadKey($pause_time, STDIN)){
#process input
}
But once the user types anything then the script stops until a newline is entered. I'd like the input to be processed per-character, without waiting for a newline.
i like to split a string depending on "," character using JavaScript
example
var mystring="1=name1,2=name2,3=name3";
need output like this
1=name1
2=name2
3=name3
Hi,
i want to show a select which options are the character '-' and a range of integers.
I have this:
$years = range(14,130);
new sfWidgetFormChoice(array('choices' =>
array_merge(array('' => '-',array_combine($years,$years)));
The problem: between the '-' and the range of integers there is a "0" (bold and italic).
Any help?
Regards
Javi
Consider this function declaration:
int IndexOf(const char *, char);
where char * is a string and char the character to find within the string (returns -1 if the char is not found, otherwise its position). Does it make sense to make the char also const? I always try to use const on pointer parameters but when something is called by value, I normally leave the const away.
What are your thoughts?
What does it mean?
Byte count of encoded content string with encoding specified in header.
Character count of content string.
Especially in case of "Content-Type: application/x-www-form-urlencoded".
var query = from d in testPersons.person
where d.Name == txtbox
select d;
txtbox is text box on View page.
How change this code to return all names who starts with any part of name?
For example:when I type R in text box, on View page, this query should return all names who is start with character R
If I have a file that contains a complete path for a file, is there a way to highlight the filename (using visual mode) and open the file? (preferably in a split screen)
As I think about it, here is what I would like: if the file name contains a / character, assume it is a full path (IE the 'current directory' is root). Otherwise, use the current folder (IE default behavior) Is this possible?
Instead of making a macro for each letter, as in
\def\bA{\mathbf{A}}
...
\def\bZ{\mathbf{Z}}
Is there a way to loop over a character class (like capital letters) and generate macros for each? I'd also like to do the same for Greek letters (using bm instead of mathbf).
I need to split this line string in each line, I need to get the third word(film name) but as you see the delimeter is one big blank character in some cases its small like before the numbers at the end or its big as in front of numbers at front.
I tried using string split with(" ") regex, and also \t but get the out of the bounds error.
400115305 Lionel_Atwill The_Song_of_Songs_(1933_film) 7587
400115309 Brian_Aherne A_Night_to_Remember_(1943_film) 7952
Did anyone have the same problem?
The C# compiler interpolates special character literals like \t for tab, \n for newline etc. But is there a built-in C# or .Net function that can interpolate them at runtime?
Hello all ,
I have a string like "SAB_bARGS_D" . What I want is that the string gets divided into list of characters but whenever there is a _ sign the next character gets appended to the previous one.
So the answer to above should be ['S','A','B_b','A','R','G','S_D']
It can be done by using a for loop traversing through the list but is there an inbuilt function that I can use.....
Thanks a lot
Hi,
I need a C# function that takes 2 strings as an input and return an array of all possible combinations of strings.
private string[] FunctionName (string string1, string string2)
{
//code
}
The strings input will be in the following format:
String1 eg - basement
String2 eg - **a*f**a
Now what I need is all combinations of possible strings using the characters in String2 (ignoring the * symbols), and keeping them in the same character position.
Eg: baaement, baaefent, baaefena, basefent, basemena, etc
any help? :)
I want to know from where the index of a string and an array starts from.
I am getting a lot of confusion while making programs.
While calculating string length of a string is the null character also counted.
Recently I came across a character range that was the following:
[/-+]
My very simple question is, is this even a valid charectar range? If so, what range of charectars would it match?
Hi,
I'm using the permalink_fu plugin to create permalinks from titles. My problem is: If the title contains german characters, they are just replaced with '_'.
What I need is something that replaces
ä with ae
ü with ue
ö with oe
I fount String.tr but the problem here is that it replaces 1 character with 1 replacement, so it would work for replacing
é with e
ø with o
etc.
Does anyone have a nice and clean solution for that?
Thanks