this is a part of my code :
public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
TextView title_t = new TextView(this);
title_t.setText("");
String title = title_t.getText().toString();
switch(position){
case 0 : new AlertDialog.Builder(this).setTitle(title).setMessage("blah blah").setNeutralButt...
I am comparing substrings in two large text files. Very simple, tokenizing into two token containers, comparing with 2 for loops. Performance is disastrous! Does anybody have an advice or idea how to improve performance?
for (int s = 0; s < txtA.TokenContainer.size(); s++) {
String strTxtA = txtA.getSubStr(s);
strLengthA = txtA...
I would like to know how to parse a hex string, representing a number, in objective c. I am willing to use both an objective, or a C based method, either is fine.
example:
#01FFFFAB
should parse into the integer:
33554347
Any help would be appreciated!
...
I am reading in a number of strings which have /'es through them, the most common example being dates/numbers like 05/06, 07/08, etc.
I am using ASP.NET MVC2 and generating links off of these strings read out of DB, which therein lies the problem.
Obviously a link to:
www.mysite.com/yearperiod/05/06/detail
will not work the same as a...
In VB6, what is the likely cause of an Overflow error? I am using strings when it occurs.
Is it RAM, or hard-drive space? Or is it something internal to VB6?
...
String s = "test";
String is a class, so to use it we should create an object of it. But rather we just make a reference of it and give it a value. How is it possible and what concepts are used in it.
The metadata of String class shows the following :
public sealed class String : IComparable, ICloneable, IConvertible,
IComparable<st...
Silly question, but I do not know how to find (2000) into a regular expression and replace it with [2000]
...
void aFunction_2()
{
char* c = new char[10];
c = "abcefgh";
}
Questions:
Will the: c = "abdefgh" be stored in the new char[10]?
If the c = "abcdefgh" is another memory area should I dealloc it?
If I wanted to save info into the char[10] would I use a function like strcpy to put the info into the char[10]?
...
The following Split function found at support.microsoft.com does not create array values corresponding to consecutive delimiters.
eg. the string "hello|world||today" would generate the array: arr[0] = "hello", arr[1] = "world", arr[2] = "today" instead of the more correct: arr[0] = "hello", arr[1] = "world", arr[2] = "", arr[3] = "tod...
I use GZIPOutputStream or ZIPOutputStream to compress a String( my string.length() is less than 20), but the compress result is longer than original string.
on some site, I found some friends said this is because my original string is too short, GZIPOutputStream is only do use to compress long string.
so, can somebody give me a help to...
Hi need to change the function ereg_replace("[\]", "", $theData) to preg_replace
...
Hi all i am having a form namely addbatch and i will have some textboxes and 3 buttons namely save cancel addentry. When i given some sort of values on my form i will check for a condition as
if(file.Length<95)
{
// I will raise an error
}
When the user clicks on Addentry button i would like to show a new form and if t...
Hello,
I have a String which can be very long so I want to split it in an array of Strings so in each position the string's length should be lower than a specified number. The split can only be done in a white space or after a punctuation symbol, because I need that each fragments makes sense when it is read. It is something like a word...
HI all I have an issue, let say I have $var="z" and how to concatenate the z $i times, for example if $i==5 then $var should be "zzzzz".
BTW I would need this in one row.
...
hey guys i have to read a huge xml file which consists of over 3 million records and over 10 million nested elements
naturally i am using xmltextreader and have got my parsing time down to about 40 seconds from earlier 90 seconds using multiple optimization tricks and tips
but i want to further save processing time as much as i can hen...
Hello all,
If the string is bigger then 50 chars long, I need to split it.
The maximum allowed is 3 chunks of 50. It could be less then 50 but never more then 150.
I don't need any special chars to be added, or to serve as "splitters"; I can break the string anywhere, no problem, since the propose is not for showing it to the user.
if...
What is the difference between String str = new String("SOME") and String str="SOME"
Does these declarations gives performance variation.
...
Hi, I'd like to know how to replace parts of a string in latex. Specifically I'm given a measurement (like 3pt, 10mm, etc) and I'd like to remove the units of that measurement (so 3pt-->3, 10mm-->10, etc).
The reason why I'd like a command to do this is in the following piece of code:
\newsavebox{\mybox}
\sbox{\mybox}{Hello World!}
\n...
i want to create a method to open a popup when i click on it and the title and the text would be automatic, something like this :
public void Display(String test){
new AlertDialog.Builder(this).setTitle(getTitle()).setMessage(test).setNeutralButton("close", new DialogInterface.OnClickListener() {
@Override
...
I have following queries regarding java string pool:
Is it a part of java heap of is it a part of native heap of JVM?.As per my understanding its the first one.
Do we have any limit on the size of this string pool?Or is it user configurable ?
In the following two statement
String str = "Stack";
String str2 = str.concat("overflow");
...