I have a form and from this I call
dialogPrintDiet.ShowDialog()
which launchs my dialog. I need to pass a string value and need the easiest way to do this in VB.NET
Thnaks
SELECT a.one + ' test ' +b.two from table1 a right join table1 on a.id =b.id
The problem is that when one is null then it the whole string is null, is there some kind of trick to bypass this problem
msSQL 2005
Hi,
I've got two possible string inputs that my application will receive, and if it matches the following two strings, I need it regex.ismatch() to return true:
"User * has logged out"
"User * has joined"
I'm not that good at regex and just can't figure out how to go about matching the above.
Any help would be great!!!
I have a list of strings where by each string is a url to a pdf document. All I want to do is cycle through this list and display each url as a hyperlink on my page. I've seen this done before in MVC where the collection is made avaliable to the view and you can just do a foreach etc etc but I don't know how to do it on a normal asp.net page...
Any help appreciated, cheers!
the following is a part of my code.
string lsStatus;
lsStatus = ((Tv10DBLookup)(Sender)).EditValue.ToString();
while im debuging the code, im getting the following: "lsStatus is not in the context" !
Knowing that (Tv10DBLookup)(Sender)).EditValue is returning the value "Closed"
what does this mean ?
My goal is to write this:
println "this should be 3: ($1+2)" //this is invalid groovy, it won't run
Yet this is valid in ruby. Is there a way I can put statements that will eval inside a string or must I use complete variables names? I am basically looking for the Ruby equivalent of:
puts "this shoud be 3: #{1+2}" #this is valid ruby
I am writing a program that stores data in a dictionary object, but this data needs to be saved at some point during the program execution and loaded back into the dictionary object when the program is run again.
How would I convert a dictionary object into a string that can be written to a file and loaded back into a dictionary object? This will hopefully support dictionaries containing dictionaries.
I have a version number with 3 digits as a String,
var version = "1.2.3";
and would like to compare it to another version. To see if version is newer than otherversion,
var otherVersion = "1.2.4";
How would you do it?
At some places in my code, I print debug messages like this:
int ret = getLinkSpeed(device.getSysName(), linkSpeed);
if (ret < 0)
{
logDebug("Failed to obtain port speed for this device. Error: " + std::string(strerror(errno)));
}
From the documentation it is not entirely clear if strerror will return 0 under certain conditions (which would cause my code to crash). Does anyone know if it's safe?
I have a class like this
$.fn.dimeBar = function(custom) {
var var1 = 'test1';
var var2 = 'test2';
if(sometest){
//how can i access var1 or var2 here by using string name of variables
//some thing like alert(this['var1']) -- should alert: 'test1'
}
}
What is the easiest way to take an objects and convert any of its values from null to string.empty ?
I was thinking about a routine that I can pass in any object, but I am not sure how to loop through all the values.
How can I quickly validate if a string is alphabetic only, e.g
var str = "!";
alert(isLetter(str)); // false
var str = "a";
alert(isLetter(str)); // true
Edit : I would like to add parenthesis i.e () to an exception, so
var str = "(";
or
var str = ")";
should also return true.
I am having an issue removing "%3Cbr+%2F%3E" from my string using the preg_replace function. My assumption is that the '+' char is being interpreted incorrectly. Here my code:
$address = preg_replace('/%3Cbr+%2F%3E/', '', urlencode($address));
Thanks as always!
Is there a difference between these ?
if(myString.equals("")){
}
if(myString.equals(null)){
}
if(myString == ""){
}
I have a string, I don't know is it empty or has some emtpy spaces I just wan't to stop it to be written in database if it is invalid(if empty or with some blank spaces).
I have a simple array like:
var myArr=["one","two","three"];
an I have a counting loop, which increases the value of var i by one.
What I want to do is print the next value from the array each time the loop runs, next to a text string, like so:
alert('value number '+myArr[i]+);
But for some reason I can't get this to work.
The following code works, so I'm assuming I'm not calling the counter right:
alert('value number '+myArr[0]+);
Since IPEndpoint contains a ToString method that outputs:
10.10.10.10:1010
There should be a Parse & TryParse method but there isn't.
I can split the string on the ':' and parse a IP address and a port.
But is there a more elegant way?
I am trying to use PHP to make a JSON file. Part of the code is as follow
$array = array("hello", "world");
$string='{"person": [
{
"name":'$array[0];',
"age":'$array[1];'
}
]
}';
The file created. However, $array[0] and $array[1] doesn't return the values "hello" and "world" but as $array[0] and $array[1]
Any idea?
Thanks
I want to remove the first characters from a string.
Is there a function that work like this ?:
.
a = "BarackObama"
print myfunction(4,a)
"ckObama"
b = "The world is mine"
print myfunction(6,b)
"rld is mine"
string = '
onchange="_Pd.passAttr(this.value,'size','p0_v0_bd');"
Select
</option>
size 6
</option>
size 7
</option>
size 9
</option>
'
I want to extract a list [size 6, size 7, size 8]. How to do and thanks!
$_GET['search'] = ucfirst(strtolower(str_replace("_"," ",urldecode($_GET['search']))));
For some reason it's adding slashes into the string similar to mysqL_escape_string, anyone got any ideas what would be causing it?
Hi,
Please understand firstly that I fully understand that Java will return a String when I use ""+int.
What I'm really not sure about is what exactly is happening down at the memory aspect. How exactly is java performing this conversion. I mean this in a very indepth way, not 'auto boxing' or anything like that :)
I'm hoping someone with a deeper understanding can explain what exactly is done.
I have a string for example like " :)text :)text:) :-) word :-( " i need append it in textbox(or somewhere else), with condition:
Instead of ':)' ,':-(', etc. need to call function which enter specific symbol
I thinck exists solution with Finite-state machine, but how implement it don't know. Waiting for advises.