We know it's a good practice to prefer char[] over java.lang.String to store passwords. That's for the following two reasons (as I have read):
char[] are mutable so we can clear the passwords after the usage.
String literals goes to a pool that will not get garbage collected as other objects, hence might appear in memory dumps.
But j...
Hi all.
I'm having problems with ldap search filters.
I want to search through all the children of a root node. I want the users where the username of the email contains the query string.
for example, if I have
[email protected]
foobar@foo_l.c_bar
and the search query is "l.c" I want only [email protected]
the following co...
Hello !
I have two strings:
$a = '/srv/http/projects/name';
$b = '/projects/name/some/dir';
And I would like to get a merged string with not repeated common part:
$c = '/srv/http/projects/name/some/dir';
Is there any effective way to get it ?
...
Is there a way to parse utf codes in vbscript? What I'd like to do is replace all codes like "\u00f1" in a string for its corresponding character.
...
This is follow up for my last question about converting string to float
I have this value stored in a float variable: 33.9112625 (it's thirty three) and I need to convert it to string and get the exact value but I'm unable to do so. float.ToString( CultureInfo.InvariantCulture) gives me "33.91126" as result. I tried .ToString("G"), "G7"...
Hi there
i have a truckload of files with sql commands in them, i have been asked to extract all database table names from the files
How can I use grep and sed to parse the files and create a list of the unique table names in a text file ..one per line?
the name names all seem to start with "db_" which is handy!
what would be the best ...
I want to take an integer (that will be <= 255), to a hex string representation
eg: I want to pass in 65 and get out '\x65', or 255 and get '\xff'
I've tried doing this with the struct.pack('c', 65), but that chokes on anything above 9 since it wants to take in a single character string.
Thanks,
...
I have a procedure that accepts 2 string parameters, one of them has a default value. Inside the procedure, I want to concatenate one and the other and some literals to form one larger string. Somehow, I'm getting an AV... any ideas?
code is something like this
{$WRITEABLECONST ON}
constructor MyClass.Create(s1: string; s2: string = Gl...
I'm trying to simply print out the values contained in an array.
I have an array of strings called 'result'. I don't know exactly how big it is because it was automatically generated.
From what I've read, you can determine the size of an array by doing this:
sizeof(result)/sizeof(result[0])
Is this correct? Because for my program, ...
How to delete the last element of a string.
If 'globe'
is the value given by user, how to store it as 'glob'.
That is excluding last element.
...
This surely has been asked before, but Googling doesn't find it. Is there, in any of the standard java libraries (including apache/google/...), a static isNullOrEmpty() method for Strings?
...
Hi,
I would like to replace strings like 'HDMWhoSomeThing' to 'HDM Who Some Thing' with regex.
So I would like to extract words which starts with an upper-case letter or consist of upper-case letters only. Notice that in the string 'HDMWho' the last upper-case letter is in the fact the first letter of the word Who - and should not be i...
Possible Duplicate:
How do I concatenate strings in Objective-C?
hi im working with iphone sdk and i need to add string to another string like in java is
the ' += ' but in objective-c i don't know.. thx for help!
...
I have been trying to wrap my head around this FXCop violation "DoNotDeclareReadOnlyMutableReferenceTypes"
MSDN: http://msdn.microsoft.com/en-us/library/ms182302%28VS.80%29.aspx
Code from MSDN which would cause this violation:
namespace SecurityLibrary
{
public class MutableReferenceTypes
{
static protected readonly St...
I have two Strings: str1 and str2. How to check if str2 is contained within str1, ignoring case?
...
If I have a string '1+1' is there a way, other than eval(string) to get the numerical value of it i.e. I want to turn '1+1' into 2.
...
What is the pythonic way to split a string before the occurrences of a given set of characters?
For example, I want to split
'TheLongAndWindingRoad'
at any occurrence of an uppercase letter (possibly except the first), and obtain
['The', 'Long', 'And', 'Winding', 'Road'].
Edit: It should also split single occurrences, i.e.
from 'ABC'...
I have a csv file in the below format. I get an issue if either one of the beow csv data is read by the program
"D",abc"def,"","0429"292"0","11","IJ80","Feb10_1.txt-2","FILE RECORD","05/02/2010","04/03/2010","","1","-91","",""
"D","abc"def","","04292920","11","IJ80","Feb10_1.txt-2","FILE RECORD","05/02/2010","04/03/2010","","1","-91...
Hi all , I'm a beginner and i need to ask a question..
I wrote this small code that accepts a string from the user and prints it..very simple.
#include <iostream>
using namespace std;
int main()
{
int i;
char *p = new char[1];
for(i = 0 ; *(p+i) ; i++)
*(p+i) = getchar();
*(p+i) = 0;
for(i = 0 ; *(p+i) ; i++)
...
I'm trying to split a song title into two strings- the artist and song.
I receive the original string like this: "artist - song".
Using this code, I split the string using '-' as the spliiter:
char[] splitter = { '-' };
string[] songInfo = new string[2];
songInfo = winAmp.Split(splitter);
This works fine and all, except wh...