I want to find whether a string contains any of the special characters like !,@,#,$,%,^,&,*,(,)....etc.
How can I do that without looping thorugh all the characters in the string?
I am trying to load an XML file from a different domain name as a string. All I want is an array of the text within the < title < /title tags of the xml file, so I am thinking since I am using php4 the easiest way would be to do a regex on it to get them. Can someone explain how to load the XML as a string? Thanks!
We are using Hudson to automate our Android build. I need to incorporate the build number into the version string used in our app. Was wondering if anyone had an example of doing that before I (re?)invent that wheel. Obviously I need to replace a string value in one of our config files.
This is the connection string that is currently working on a non-password protected MS Access database.
db.url = jdbc:odbc:Driver\={Microsoft Access Driver (*.mdb)}Dbq\=C:\Inventory.mdb;DriverID\=22;READONLY\=true
How do I add a password to this connection string?
Thanks!
I need to simply encode a string variable (my api key) so that is not easily readable by human eyes, I need it to easily decode back to exactly the same initial string. What is the standard practical and fast (less computing on the user side) way to do this?
Many thanks in advance!
I have two textboxes in my page,
<asp:TextBox ID="TxtClientName" runat="server"></asp:TextBox>
<asp:TextBox ID="TxtClientMob" runat="server"></asp:TextBox>
and i have a json string,
{"Table" : [{"ClientName" : "Pandiya","ClientMobNo" : "9566643707"},
{"ClientName" : "Bala","ClientMobNo" : "9994403569"}]}
Is it possible to use this json string to autocomplete in two textboxes seperating keys ClientName and ClientMobNo in jquery..... Any suggestion....
Please look that alias name. I hope to set the value into a string var.
How to put single coats inside a string which is in single coats.
SET @SQLString = N'SELECT purDetQty as 'detQty',stkBatchCode as 'batchCode',purDetProductId as 'productId'
INTO #ProductTable FROM PurchaseDetail
INNER JOIN Stock on stkId=purDetStockId
WHERE purDetID=@detId'
Hi,
I've a problem in making a PERL program for matching the words in two documents. Let's say there are documents A and B
So I want to delete the words in document A that's not in the document B
A: I eat pizza
B: She go to the market and eat pizza
result: eat pizza
I use Perl for the system and the sentences in each document isn't in a big numbers so I think I won't use SQL
And the program is a subproram for automatic essay grading for Indonesian Language (Bahasa)
Thanx,
Sorry if my question is a bit confusing. I'm really new to 'this world' :)
I have a list of tuples that I'm trying to incorporate into a SQL query but I can't figure out how to join them together without adding slashes. My like this:
list = [('val', 'val'), ('val', 'val'), ('val', 'val')]
If I turn each tuple into a string and try to join them with a a comma I'll get something like
' (\'val\, \'val\'), ... '
What's the right way to do this, so I can get the list (without brackets) as a string?
Just wondering in php, if it was possible to convert a string to a double. I am using a financial web service which provides a price as a string. I really need to process this as a double and was wondering how i would convert it
thanks
There is a php script which sends a binary string to the client application:
$binary_string = pack('i',count($result_matrix));
foreach ($result_matrix as $row)
{
foreach ($row as $cell)
{
$binary_string .= pack('d',$cell);
}
}
echo $binary_string;
Silverlight application receives $binary_string via POST protocol. How can I parse this binary string?
Or maybe there is a better way to send matrix from PHP to Silverlight?
Hello,
Can this method work?
public String sayHello(){
return "Hello.jsp?name=" + "laala";
}
I am unable to access, query string using the above method. I tried ${param.name} as well as request.getParameter("name"). They both return null. Please help!
My input string is a PM time:
log(start);
// Sunday, January 09, 2011 6:30:00 PM
I'm using Joda Time's pattern syntax as follows to parse the DateTime:
DateTimeFormatter parser1 =
DateTimeFormat.forPattern("EEEE, MMMM dd, yyyy H:mm:ss aa");
DateTime startTime = parser1.parseDateTime(start);
So, why is my output string AM?
log(parser1.print(startTime));
// Sunday, January 09, 2011 6:30:00 AM
Hi, I'm using ereg in the followin way to validate a field which can contain only numbers from 0 to 9:
if(eregi("^([0-9])*$", $mynumber)) return true;
However the string must have between 8 and 10 characeters. Is it possible to improve the same ereg usage to check for a valid string length as well?
Thanks in advance.. all ereg tutorials seem to be traditional chinese to me. :S
I need to generate a string with n characters in Python. Is there a one line answer to achieve this with the existing Python library? For instance, I need a string of 10 letters:
string_val = 'abcdefghij'
I have json data being returned as a collection:
var foo = ["6", "7", "33"]
using JSONP in jQuery. Since I'm using JSONP, the data is being returned to a callback function, which is interpreting it as a string instead of a collection. Do I need to run eval(foo) on the string in the callback before handling it as a collection, or is there some other means of recasting it?
If I have an arithmetic expression as a string ("2+3*4/5"), is there a way to get this computed with the Javascript Math object without parsing that entire string to separate everything out?
Here is my code:
I should get output of the department id (did) as an integer and the templatefilename (result) that is required.
The errors I get are: Conversion from string "ad" to type 'Integer' is not valid. I'm fairly new to asp.net and cannot see where the did variable picks up the "ad" string.
Any help would be greatly appreciated.
Thanks
Hi Folks,
I want to store a string which itself is an XML string as a property of an JSON object , what's the reliable and proper way of dong this? Should I first encode the XML data into BASE64 first prior saving it to an JSON object, due to the fact that JSON does not support binary data?
Example of data I want to store:
{
"string1" : "...moderately complex XML..."
}
Thank you in advance for any hints and suggestions!
In javascript you can create a Date object from a string, like
var mydate = new Date('2008/05/10 12:08:20');
console.log(mydate); //=> Sat May 10 2008 12:08:20 GMT+0200
Now try this using milliseconds in the string
var mydate = new Date('2008/05/10 12:08:20:551'); // or '2008/05/10 12:08:20.551'
console.log(mydate); //=> NaN
Just out of curiosity: why is this?
I have a json string in an action of MVC controller. I want to send it to view as a JSON object. How can I solve this?
public JsonResult Json()
{
... some code here ...
string jsonString = "{\"Success\":true, \"Msg\":null}";
return new JsonResult() { Data = jsonString, JsonRequestBehavior = JsonRequestBehavior.AllowGet };
}
I'm not too fluent with the perl XML libraries (actually, I really suck at understanding encoding in general), all I'm doing is taking a string that possibly has characters such as "à" and putting it in an XML file, but when I open the file, I get an encoding error at the line containing such a character.
So I just need a lightweight way to take a string and encode it for XML.
it lists all files in "." that contain the string "string" but don't show dirs with permission denied.
What would it be the equivalent of that but squeezing xargs in between?