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 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!
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
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.
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 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.
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.
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?
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?
While it is recommended to use the following construct to check whether request is POST,
if request.method == 'POST':
pass
It is likely that people will find
if request.POST:
pass
to be more elegant and concise.
Are there any reasons not to use it, apart from personal preference?
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?
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 :-)
I searched in the web but i couldn find a single article dealing in a straight forward way on how to find the vibrate on/off logs in logcat. If anybody who is aware of the procedure, please enlighten me. Once again i need it specifically to check if my app triggers vibrator or not...
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.
Hi, what is the best method to insert a search query into MySql
and check for double words? (for showing up the last searches and a collection of searches)
I install a sphinx search engine a couple months ago, as time pass, I don't remember that sphinx version I installed.
how to check my system sphinx version?
I want to continuously ping a server and see a message box when ever it responds i.e. server is currently down. I want to do it through batch file.
I can show a message box as said here http://stackoverflow.com/questions/774175/how-can-i-open-a-message-box-in-a-windows-batch-file/774253#774253
and can ping continuously by
ping <servername> -t
But how do I check if it responded or not?
Is there a way to check if a template tag exists before using the template tag?
In other words, I would like to be able to do something like this:
{% load my_custom_tags %}
...
{% ifloaded my_custom_tags %}
{% some_custom_tag %}
{% endifloaded %}
I have a page that a user selects what he wants to download, the submit button posts the form to
public FileStreamResult GetFiles(FileSelectionModel model)
{
//zips files into one zip
return File();
}
However, what if the model wasn't in a valid state? How do I check it? It wouldn't let me return View() or return RedirectToAction() here
thanks
Hi,
I want to count the days passed with respect to a given date.
I have a predefined date with me and i want to check the days passed, once the day pass 30 days with respect to the given time i want to get a message.
example given date is25/03/2010 and when my system date reaches 25/04/2010 i have to get a message.
How can i implement it. please give some help
Hello,
I want to check whether hre 1.6 or higher is installed or not. If installed I want to progress my application. If not installed , I want to install jre-6u17-windows-i586-s.exe after successfully installing jre , my control not returns to inno again. Please send a inno script for that.
best regards
SOumen