Hello,
I would like to use a string (e.g. read from a file) as a piece of code in my perl program. For example, I read a string (e.g. $str="1..100,171,398..1000") then I would like to print all the numbers in the range represented by the string.
Thanks,
Dave
...
I've got this nifty little piece of code here that self-propogates ad infinitum every time the relevant method is called:
if (this.ListBox_MyListBox.Items[e.Index] is MyObject)
{
MyObject epicObject= new MyObject();
epicObject= (MyObject)this.ListBox_MyListBox.Items[e.I...
I have to assume I am missing something simple, or I am not understanding something, but I can't seem to figure this.
I have a list of strings that I add to an array, then attempt to set those values in a for-loop using data that I read in. The array gets updated, but the values the array contains do not. I also have an array of buttons...
I have a string I need to convert back to a date. I can call .ToString("yyyyMMdd") and get the string i want. My question is how can I convert that back into a date? I'm trying something like the following with no luck.
DateTime d;
var formatInfo = new DateTimeFormatInfo {ShortDatePattern = "yyyyMMdd"};
if (DateTime.TryParse(details.Det...
My application produces strings like the one below. I need to parse values between the separator into individual values.
2342|2sd45|dswer|2342||5523|||3654|Pswt
I am using strtok to do this in a loop. For the fifth token, I am getting 5523. However, I need to account for the empty value between the two separators || as well. 5523 ...
Hi,
I have a pretty obscure problem here. I'm writing a photoshop plugin (for mac) using Xcode.
I use printf statements for simple debugging. A printf without a format string works fine, however, if I use a format string to try and print out a value it does not show up in xcode's debugger console.
#include <stdio.h>
DLLExport ...
I try to remove some non-safe characters from a string but i believe i have a problem on my RegExp object.
What i try to do below is if there are chars whose encoded length is greater than 3 chars they should be replaced with a space.
So if encoded value is %3D which is = sign, it is ok to have in my string. But if it is an ’ apostroph...
I have a very long string which includes many new lines ( it's a really long SQL statement ).
The SQL is easier to read when I break it up with newlines. But from time to time, I need to
copy the sql statement from code to paste into sql developer.
In Perl, I always loved the qq operator, which you can use in place of double quotes:
...
I have a string that represents a list of tags separated by space. It may look like this:
Australia 2010 David November Family
If a tag contains at least one space, it must be quoted. So the string can be:
"Best Friends" "My Pictures" Wow "Very Nice Photo" University
Quotes are also allowed for single words. For example:
"Good One...
I'm using python for S60.
I want to use string in hebrew, to represent them on the GUI and to send them in SMS message.
It seems that the PythonScriptShell don't accept such expressions, for example:
u"אבגדה"
what can I do?
thanks
development of situation:
I added the line:
# -*- coding: utf-8 -*-
as the first line in the source ...
i am trying to do a simple string manipulation. input is "murder", i want to get "murderredrum".
i tried this
String str = "murder";
StringBuffer buf = new StringBuffer(str);
// buf is now "murder", so i append the reverse which is "redrum"
buf.append(buf.reverse());
System.out.println(buf);
but now i get "redrumredrum" instead of "m...
I make the other day a question here, but finally I decided to do it myself for questions of time, now I have a little more time to fix it :D I liked jSoup, but I'm kind of from old school, and preffer doing it my self (thanks to @Bakkal anyway).
I manage to made this code, it works fine for now, but if a webpage is not well contructed ...
Hello there, I getting crazy trying to echo an <img> tag I want to add this simple string "/uploads/" before $photo->name...Here is my echo: echo '<img src="'.$photo->name.'"/>';
thanks for any help...
...
import os
path= os.getcwd()
final= path +'\xulrunner.exe ' + path + '\application.ini'
print final
I want the out put:
c:\python25\xulrunner.exe
c:\python25\application.ini
I don't want slash to work as string, i mean don't want it to escape or do anything special. But i get an error
Invalid \x escape
How can i use a '\' ...
Possible Duplicate:
how to copy char * into a string and vice-versa
I have to pass a value into a method that required a char *
MyMethod(char * parameter)
{
// code
}
However, the parameter I need to feed it is currently a std::string. How do I convert the std::string to a char *?
std::string myStringParameter = //what...
I know that .index() will return where a substring is located in python.
However, what I want is to find where a substring is located for the nth time, which would work like this:
>> s = 'abcdefacbdea'
>> s.index('a')
0
>> s.nindex('a', 1)
6
>>s.nindex('a', 2)
11
Is there a way to do this in python?
...
What is the best way to convert a string to hex and vice versa in C++?
Example:
A string like "Hello World" to hex format: 48656C6C6F20576F726C64
And from hex 48656C6C6F20576F726C64 to string: "Hello World"
...
Hello I have a text file with three lines. every line has a float number.
How can I take each value and put in a float variable even if array?
For example text file is like the following
+3.01\n
-0.0012\n
-0.1\n
I want an array [if it possible] which save the values as float not as string.
Thanks
...
I use around 1000 properties associated with a specific java.util.Properties which is backed by a file. The main reason for the file is to change them without recompiling the program and to allow users to adjust their according to their taste.
Some of the properties are used only in one place in the code, but there are some properties th...
Possible Duplicate:
Why is String final in Java?
There are various moments in my programming life that I wished the the String class had not been final/sealed/NotInheritable.
What are the language architects trying to prevent me from doing that would throw a monkey wrench into the works.
Rather, what are the monkey wrenches ...