Hi,
Say I have a few string like
Hi my name is <Name>
Hi <name>, shall we go for a <Drink>
Is it possible to get the tags captured through c# Regex? like <Name>, <drink> etc?
I am not able to get it right..
[MetadataType(typeof(Deal_Validation))]
public partial class Deal
{
}
public class Deal_Validation
{
[Required]
public string Title { get; set; }
public double? EstValue { set; get; }
}
How to validate EstValue (check if it is of type double?)
Thanks
Is there a way to force classes in Java to have public static final field (through interface or abstract class)? Or at least just a public field?
I need to make sure somehow that a group of classes have
public static final String TYPE = "...";
in them.
I am trying to store nested arrays in a cookie. I decided to store the array as a JSON string. However, I am getting this warning:
PHP Warning: Cookie values can not contain any of the following ',; \t\r\n\013\014' in foobar.php
Is there a recommended way of storing nested arrays in a cookie?
Hi,
The 'DiscriminatorColumn' annotation isn't creating any column in my parent entity. Where am I going wrong ?
Here's my code
@Entity
@Inheritance(strategy=InheritanceType.JOINED)
@DiscriminatorColumn(name="TYPE", discriminatorType=DiscriminatorType.STRING,length=20)
public class WorkUnit extends BaseEntityClass implements Serializable{
@Entity
@DiscriminatorValue(value="G")
@Table(name="Group_")
@PrimaryKeyJoinColumn
public class Group extends WorkUnit implements Serializable{
I'm wondering if it is possible to create a separate APK file which contains only language specific strings and somehow persuade my program to try to read the string resources first from that package's resource and then from the program's own resources... I would like to have a main program with 2-3 mayor laguages and the rest of the languages would go into a separate language pack. (This is to keep the main program size small as I have already 12 translations)
I had to use threading to avoid "XSL Compilation time-out error"
Now the problem I am facing is:
It gives error, saying the output-string(generated as a result of transformation) is null!!
Here is my C# code : [click_me]
And the errors I am getting is copied in this text file : [click_me]
And the original code without threading .. [click_me]
I have the following method :
public List<string> someMethod()
{
// populate list of strings
// dump them to csv file
//return to output
}
Question is: i dont want the user to wait for csv dump, which might take a while.
If i use a thread for csvdump, will it complete? before or after the return of output?
Hiya.
Red5 uses ISharedObject interface to create shared objects and to operate them.
because ISharedObject is an interface I'm having issues extending it.
I would like to extend the getAttribute, setAttribute, get{Int/String/Map}Attribute so the values will be checked before entered or pulled out.
how is it possible to do so ?
thanks
when I write
Response.Redirect("Default2.aspx?Name=" + TextBox1.Text);
then
string input = Request.QueryString["Name"];
if I write yahoo+music in textbox
the input will be yahoo music why ? and how can I keep the '+' ?
Hi, i need to get all the HTML TEXT from a url "http://localhost/index.html" to a String variable on C
I know that if i put on telnet - telnet www.google.com 80 Get webpage.... it returns all the html.
How i can do it? im on linux enviroment? with C (NOT C++).
BTW im .net programmer :/
I have an IP address which I want to grab the last chunk of as an integer. So from "192.168.1.150" I'd get 150.
This is the code I'd concocted (I'm using C++/CLI), but somehow it feels rather clunky:
String^ ipString = "192.168.1.150";
int lastDot = ipString->LastIndexOf('.');
int lastSection = int::Parse(ipString->Substring(lastDot, ipString->Length-lastDot));
Is there a simpler way of doing this?
w3schools says that exceptions can be strings, integers, booleans, or objects, but the example given doesn't strike me as good practice, since exception type checking is done through string comparison. Is this the preferred method of exception handling in Javascript? Are there built-in exception types (like NullPointerException)? (if so, what are they, what kind of inheritance do they use, and are they preferred over other options?)
I need a regular expression that matches three consecutive characters (any alphanumeric character) in a string.
Where 2a82a9e4eee646448db00e3fccabd8c7 "eee" would be a match.
Where 2a82a9e4efe64644448db00e3fccabd8c7 "444" would be a match.
etc.
I would like to create a stored procedure that takes in a string of comma separated values like this "1,2,3,4", and break it apart and use those numbers to run a query on a different table.
so in the same stored procedure it would do something like
select somefield from sometable where somefield = 1
select somefield from sometable where somefield = 2
select somefield from sometable where somefield = 3
select somefield from sometable where somefield = 4
Thanks!
Quick one for you guys.
Say I have a function that outputs a string:
function myString()
{
echo 'Hello World';
}
How would I go about testing to see if the function outputs any data?
if(myString() ==''){
echo ''Empty function;
}
Im using the answer to this question to convert an array of XML to a single XML output:
http://stackoverflow.com/questions/2554671/output-array-of-xml-to-plain-xml
Im using the simpler solution of the two there (Marked as the answer)
It all works for me, however at the start of the output I get:
string(109960) "
Can anyone shed any light on this? Output here: http://bit.ly/aoA3qY
is there any preg or str_replace that can help me remove characters from a string that are not supported on sms in phones.
Now accented characters are shown as yy in sms :-(
I have the following source code
public class mod_MyMod extends BaseMod
public String Version()
{
return "1.2_02";
}
public void AddRecipes(CraftingManager recipes)
{
recipes.addRecipe(new ItemStack(Item.diamond), new Object[] {
"#", Character.valueOf('#'), Block.dirt
});
}
When I try to compile it I get the following error:
java:11: reached end of file while parsing }
What am I doing wrong? Any help appreciated.
When I run my python script in the shell terminal, it works
sudo myscript.py --version=22 --base=252 --hosts="{'hostA':[1],'hostB':[22]}"
But when I run in Hudson and Jenkins, using Execute Shell step, somehow, the string --hosts="{'hostA':[1],'hostB':[22]}" is interpreted as
sudo myscript.py --version=22 --base=252 '--hosts="{'hostA':[1],'hostB':[22]}"'
How do we overcome this so that our script would run in Jenkins and Hudson ?
Thank you.
Sincerely
Hi, I'm having the following problem with grails' 1.2.1 domain classes:
When I set a constraint attr(nullable:true) and attr is int or bool, this condition isn't reflected in the db (postgresql 8.4). However, if attr is a String, the DB is consistent with the situation.
Any hints ?
Thanks
I've been trying to figure out a way to replace part of a string in an input value, but haven't been able to get it working.
the input field looks like this:
<input type="text" value="20,54,26,99" name="ids" />
I've tried:
$('input[name=ids]').val().replace("54,","");
and
var replit = $('input[name=ids]').val();
replit.replace("54,","");
$('input[name=ids]').val(replit);
but neither worked?
Hi,
I want to use plist files to hold large data such as image data and other texts. Is this feasible or is it that plist are for holding small string such as needed for settings etc. Will there be any memory issues.
--
Regards,
U'suf