I have an array...and I need to exclude all the items in this array of string from the masterList.customField as shown below
string[] excludeItem = {"a","b","c"};
CustomDTO[] masterList = service.LoadMasterList();
masterList.Where(c=> masterList.customField NOT IN excludeItem
How do I achieve the NOT IN part above?
Hi there
I want to convert a string to a generic type
I have this:
string inputValue = myTxtBox.Text;
PropertyInfo propInfo = typeof(MyClass).GetProperty(myPropertyName);
Type propType = propInfo.PropertyType;
object propValue = ?????
I want to convert 'inputString' to the type of that property, to check if it's compatible
how can I do that?
tks
So I have a string like this (the hashtags are delimiters)
A1###B2###C3###12345.jpg
I was wondering how would I access A1, B2 and C3
STRING1###STRING2###STRING3###STRING4.jpg
SOME###THING###HERE###MEH.jpg
EXTRACT###THIS###PLEASE###pah.jpg
In one instance I'd like to extract the first string. In another the second, in another the third. I will be using this with Adobe Bridge to extract metadata items from the filename
I am looping through each filename so would need
Var1 = FirstString
Var2 = SecondString
Var3 = ThirdString
Hi all,
I have a string as below:
"http:172.1." = (10, 1,3);
"http:192.168." = (15, 2,6);
"http:192.168.1.100" = (1, 2,8);
The string inside " " is a Tag and inside () is the value for preceding tag.
What is the regular expression that will return me:
Tag: http:172.1.
Value: 10, 1,3
Say I have a 'user_log' table with the following field:
id
user_id
status_text
timestamp
How do I write a query that selects only the last update for all the users in that table?
Appreciate your help :)
What is the most straightforward way of making dictionary or list from a string in Python? Let's say I have string "{ 'x' : 3, 'y' : 4 }" and I want to parse it to a real dictionary object.
Hi ,
I have country table,
i fetch all values and moved into array ,
these value i like to populate into combo/dropdown list ,
here i want to do some magic things,
that is , for my site most of the users coming from uk,us,Australia,Romain and few,
So i like to populate by my preference ,
is there any array will do this magic work, else is it possible mysql query ,
So final question is ,
Populate country name into combo based on my prefernce ,
Thanks
var str = 'single words "fixed string of words"';
var astr = str.split(" "); // need fix
i want the array to be like: single, words, fixed string of words.
J2EE has ServletRequest.getParameterValues().
On non-EE platforms, URL.getQuery() simply returns a string.
What's the normal way to properly parse the querystring in a URL when not on J2EE?
I have a hexadecimal string "41464353". I want to convert it into bytes. I know the value of this hex string in byte will be "65706783". I want this as answer. Please give me a program for this in Java.
Having troubles finding a good way to get a string from a text file (separated by line breaks) randomly.
I want to do a setStringValue:@"random string from file here";
pretty much. Thanks in advance.
Suppose a query "select * from employee" returns 80 rows. I need to display middle rows that is from 20th row to 50th row.
I know, like to display first 20 rows we have option like "select top 20 * from employee" but if we need middle rows how to get it in MS SQL specifically.
I m new to this SQL queries...Can anybody answer to this question.
I have a string in my database that represents an image. It looks like this:
0x89504E470D0A1A0A0000000D49484452000000F00000014008020000000D8A66040....
<truncated for brevity>
When I load it in from the database it comes in as a byte[]. How can I convert the string value to a byte array myself. (I am trying to remove the db for some testing code.)
Let's say I have something like 30-10-2025 12:53, how could I convert that to an NSDate? I guess there's some class that takes this plus an format string that tells it how the date looks as a string, so it can parse it... where must I look?
I've built an API using actionwebservice and when a client calls a method to pass in an empty string (""), it's to_s value is # instead of "". But when the client passes in "hello", it's to_s value is "hello".
class UsersApiController < ApiController
web_service_api UserApi
def create_or_update(arg1)
Rails.logger.info arg1.to_s # Displays "#<SOAP::Mapping::Object:0x3a89c08>" if arg1 is an empty string
end
end
I have select, insert, update and delete query.
If I have to write all queries in the same stored procedure that is good for performance or should I write all queries in separate stored procedures?
c code
extern "C" __declspec(dllexport) int export(LPCTSTR inputFile, string &msg)
{
msg = "haha"
}
c# code
[DllImport("libXmlEncDll.dll")]
public static extern int XmlDecrypt(StringBuilder inputFile, ref Stringbuilder newMsg)
}
I got an error when I try to retrieve the content of newMsg saying that I'm trying to write to a protected memory area.
What is the best way to retrieve the string from c to c#. Thanks.
Hi,
I want to check whether a string starts with any character in a list. My current implementation in C# is as follows:
char[] columnChars = new char[] { 'A', 'B', 'C', 'D', 'E' };
private bool startWithColumn(string toCheck)
{
for(int i=0; i<columnChars.Length; i++)
if (toCheck.StartsWith(columnChars[i]+""))
{
return true;
}
return false;
}
I would like to know if any solution is better?
I have a string which is converted from date to string and the data looks like this "6/2/2010 4:30:00 PM6/2/2010 4:45:00 PM" and I need output like this 04:30PM could u pls help.. thanx :-)
Hi all,
I have a Windows Forms application (C#) containing a ListBox into which I have added some items (I'm not using a DataSource). I want to filter the items in the ListBox to show only items containing a string I'm searching for.
I have done this by keeping a list of the original items and selecting matching items from that list each time the search string changes and updating the ListBox.Items
Is there a more elegant/efficient way to do this?
I need to split this line string in each line, I need to get the third word(film name) but as you see the delimeter is one big blank character in some cases its small like before the numbers at the end or its big as in front of numbers at front.
I tried using string split with(" ") regex, and also \t but get the out of the bounds error.
400115305 Lionel_Atwill The_Song_of_Songs_(1933_film) 7587
400115309 Brian_Aherne A_Night_to_Remember_(1943_film) 7952
Did anyone have the same problem?
how can i copy part of the specific string to the another place
example
(aaa),(ddd),(fff),(fff),#p
copy (ddd) to the side of the p
(aaa),(fff),(fff),#p,(ddd) //before copyin add comma
copy (fff) to side of the (ddd)
(aaa),(fff),#p,(ddd),(fff) //string lenght always same