How do I check that a stored procedure exists using ADO.Net? Is there a specific way to do this (apart from executing SELECT OBJECT_ID() and checking the result)?
How do i check if a sheet exists in a excel using interop. I tried the following but it throws an COMException if not there.. Is there a better way of finding out than actually looking at the exception
Worksheet sheet = null;
Sheets worksheets = some;
sheet = (Worksheet)worksheets.get_Item("sheetName");
if(sheet!=null)
{
//do something
}
In < Modern C++ Design ,it introduces a way to check if a type fundamental type by introducing the so called type list. but what if I don't want to include so many loki code and just want a simple function to implement that? What is the simplest way to do that?
I added datagridview to my win forms app and I also added one Check Box for marking rows.
ChekBox work as I accepted until user do sorting of DataGridView, After that previous selection of checkbox column get lost.
Is there a way to I make my datagridview remember which row is selected and after user do a sorting.
I find it curious that the most obvious way to create Date objects in Java has been deprecated and appears to have been "substituted" with not so obvious to use lenient calendar. So...
How do you check that a date given as a combination of day, month and year is a valid date? For instance a date 2008-02-31 (as in yyyy-mm-dd) would be invalid date.
I need to update an old classic asp, and I have to call a function that normally returns an array, but under certain circumstances might return either Nothing or an undefined value.
How can I check that the result actually returns an array?
Hi, i need to check the type of a variable in javascript, i know 3 ways to do it:
instanceof operator: if(a instanceof Function)
typeof operator: if(typeof a=="function"
toString method (jQuery uses this): Object.prototype.toString.call(a) == "[object Function]"
Which is the most secure way to do type checking beetween these solutions? and why? Please don't tell me that the last solution is better only because jQuery uses that.
How in TFS do you check-in a file over the server version (no matter what).
I see the option to Compare, Resolve, and revert local to the latest server version.
Where is the copy over server version option?
I have a table with columns a b and c, and if c is false then I only want to allow insertions if columns a and b are unique, but if c is true then a and b do not need to be unique.
Example:
There can only be one (foo, bar, false) in the table, but no limit on how many (foo, bar, true) there can be.
I tried something like CONSTRAINT blah UNIQUE (a,b) AND CHECK (C is TRUE) but I can't figure out the correct syntax.
I have a BigInteger value, let's say it is 282 and is inside the variable x. I now want to write a while loop that states:
while b2 isn't a perfect square:
a ? a + 1
b2 ? a*a - N
endwhile
How would I do such a thing using BigInteger?
EDIT: The purpose for this is so I can write this method. As the article states one must check if b2 is not square.
In OpenGL ES, is there a way to check if a texture is currently bound, as to avoid the overhead of state changes in glBindTexture()? glAreTexturesResident() seems to be what I want, but it's not defined in iPhone's ES1/ES2 implementation.
Hi
I was wondering if it was possible in the configuration of Lighttpd to read request headers, I've searched and searched.. apparently it's not possible.
For example, conditional configuration based upon IP address:
$HTTP["remoteip"] == "0.0.0.0" {
// Do something
}
Is there something similar to check headers, for example:
$HTTP["X-Some-Header"] == "Value" {
// Do something
}
I'm thinking there isn't but thought I would post here as a last resort. Google didn't help much, and Lighttpd documentation would suggest this is not possible.
Thanks
Mike
Hi all,
I have a Java app that has an icon in the system tray.
How can I check if the tray (or tray icon) has current focus?
Tray and TrayIcon don't seem to have .isFocused() or similar.
Is this possible?
Thanks!
How do you check if an NSString begins with a certain character (the character *).
The * is an indicator for the type of the cell, so I need the contents of this NSString without the *, but need to know if the * exists.
Hi, i need to check the type of a variable in javascript, i know 3 ways to do it:
instanceof operator: if(a instanceof Function)
typeof operator: if(typeof a=="function"
toString method (jQuery uses this): Object.prototype.toString.call(a) == "[object Function]"
Which is the most accurate way to do type checking beetween these solutions? and why? Please don't tell me that the last solution is better only because jQuery uses that.
I am trying to find a good mechanism where I can check whether the data being entered by a group of people is grammatically correct, has correct spellings, etc, etc. I also would like to compute words per minute and accuracy. Is there any process to do this so that I do not have to re-invent the wheel?
Thanks in advance.
Is there any way to check how many threads are waiting for a synchronized method to become unlocked?
I would like to know when the thread calls a synchronized method:
1) How many threads are already waiting to call the method?
2) Once the method is called how long it needed to wait for the method to become unlocked?
I have .zip file which contain csv data. I am reading .zip file using
<input type = "file" name = "select_file"/>
I want to decompress that .zip file and read csv data.
file_data = self.request.get('select_file')
file_str = zlib.decompress(file_data)
#file_data_list = file_str.split('\n')
#file_Reader = csv.reader(file_data_list,quoting=csv.QUOTE_NONE )
I am expecting csv data in file_str but I am getting error.
error :: Error -3 while decompressing data: incorrect header check
What I have to use?
Hello all.
I'm trying to figure out how to go about writing a website monitoring script (cron job in the end) to open up a given URL, check to see if a tag exists, and if the tag does not exist, or doesn't contain the expected data, then to write some to a log file, or to send an e-mail.
The tag would be something like or something relatively similar.
Anyone have any ideas?
I have a table defined by the following SQL:
CREATE TABLE test (
id integer PRIMARY KEY NOT NULL UNIQUE,
status text NOT NULL,
enddate date,
/* Checks */
CHECK (status IN ("Current", "Complete"))
);
I'd like to add a constraint that requires enddate to be non-null if the status is "Complete".
Is this possible? I am using SQLite v3.6.16.
Hi, lets say I have a script like that:
if(some condition)
begin
select somecolumn from sometable
end
Lets say, that "somecolumn" does not exist and the condition is not true, which means the select is NOT executed. Even though the select would not be executed, the script is not valid, Management Studio complains about the missing column "somecolumn".
Question: Can I somehow disable this sort of check so that the script is executed and since the if is not true, it will never notice that the column is missing?
Thanks :-)
How do I use lookahead assertion to determine if a certain character exist at most a certain number of times in a string.
For example, let's say I want to check a string that has at least one character to make sure that it contains "@" at most 2 times. Thanks in advance. Using python if that matters.