I need to write a custom batch File renamer. I've got the bulk of it done except I can't figure out how to check if a file is already open. I'm just using the java.io.File package and there is a canWrite() method but that doesn't seem to test if the file is in use by another program. Any ideas on how I can make this work?
hi friends present i am working as developes,
i want code for the following scenario
my scenario is the word document must contain checkbox, and this word document should read to asp.net page, when user click the check box, the selected value should be stored into the database
can any one help me
I'd like to write a simple decorator that I can put above functions in my controller to check authentication and re-direct to the login page if the current user is not authenticated. What is the best way to do this? Where should the decorator go? How should I pass cookie info to the decorator? Sample code is greatly appreciated.
Thank you!
Hi. Can anyone point out how to check if a select query returns non empty result set?
For example I have next query:
SELECT * FROM service s WHERE s.service_id = ?;
Should I do something like next:
ISNULL(SELECT * FROM service s WHERE s.service_id = ?)
to test if result set is not empty?
Hey!
I want to check wether or not the iPhone is muted when the app starts, and I want some code to be run every time the mute-switch switches.
Is this possible?
Thanks :)
Hi,
I'm trying to achieve a requirement in Pre-requisites part of my package:
The package should be able to check for the presence of a specific Operating System or Microsoft Patch on the target machine and block installation if the specified OS&patch is not found. I want to pass this information from Configuration xml or ini file, so that installer need not to be edited and build again for changes in requirements.
Any ideas on how to achieve this!!
I am trying to check if a lhs is already abbreviated in vim.
mapcheck, however, seems to have a problem. For example,
iabbr swt switch
echo mapcheck('sw','i',1)
returns "switch" even when "switch" defined for "swt".
mapargs seem to return a string even if there is a partial
match with the lhs. Is there a way to find if an
abbreviation has been defined for the "exact" match, i.e.,
the above mapcheck returning a "" instead.
Hi,
I am creating the session using HttpSession session=request.getSession();
before creating session i want to check if session is existing or not,how would i do this?
I have four tables
TableA:
id1
id2
id3
value
TableB:
id1
desc
TableC:
id2
desc
TableD:
id3
desc
What I need to do is to check if all combinations of id1 id2 id3 from table B C and D exist in the TableA. In other words, table A should contain all possible combinations of id1 id2 and id3 which are stored in the other three tables.
Hi guys,
Let's assume:
$time = '2010-05-17 02:49:30' // (retrieved from MySQL TIMESTAMP field)
How do I do the following in PHP:
1) Check if it has been more than one week since this time has passed?
2) Assuming "false" on (1), find out how much more time until the one week mark, rounded to days and hours remaining.
I know this is pretty straightforward, but it uses a very specific syntax. Having never played with time calculations before, I'd appreciate some guidance.
Thanks!
Hello,
I write simple application in C++/Qt. And i have a text and some octal number in it. My app splits this text by spaces. And i need to check octal numbers from text. How can i select octal numbers from this text with regular expressions?
Thank you.
I have main form and some other forms, that can be shown by controls, using ShowDialog(control). Also I have event handler on the main form, that can be handled anytime. How can I check inside it, is there any other dialog forms?
I need to check the checked property of a checkbox and perform an action based on the checked property using jQuery.
For example, if the age checkbox is checked, then I need to show a textbox to enter age, else hide the textbox.
But the following code returns false by default:
if($('#isAgeSelected').attr('checked')) {
$("#txtAge").show();
} else {
$("#txtAge").hide();
}
How do I successfully query the checked property?
i'm trying to get computer's state in my LAN...
thought about using QTcpSocket but it's not realy effective since port also should be inserted as:
socket->connectToHost("hostName", portNumber);
if (socket->waitForConnected(1000))
qDebug("Connected!");
can anyone demonstare me a better way to check if computer is responding ?
I would like to propose to the user some songs whose volume doesn't exceed a certain level. Is there any way to access to the results of the 'Sound Check' option, from the iPhone ?
If not, do you know if I can calculate that with the audio tools in the iPhone SDK ?
Thanks a lot.
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?
Hello,
i have grid with user data.with first column has check box.. i have a button at the top of the gird..if i click button I need to selct top 5 users from the list?
can anybody tell me how to do this using jquery?
thanks
I have a field ,if user enters data it should go and check db if it is present it should redirect to next page.
But here i m not sure whether it is checking the db but mysql query is correct.
$ThirdPartyCategoryName =$_POST['ThirdPartyCategoryName'];
$activate = mysql_query("SELECT * FROM `thirdpartycategorymaster` WHERE `delete` = 'y' ");
if($activate=='y')
{
header("location:catact.php");
}
else
{
//$activate=='NULL';
header("location:tp_home.php");
}
I am getting a SqlConnection does not support parallel transactions. exception and this answer mentions its when a connection tries to open two transactions. This is exactly what i am doing. I thought nested transactions were ok (i was using sqlite for the prototype).
How do i check if the connection is already in a transaction? I am using Microsoft SQL Server Database File.
How can i check (with SELinux) access to the file by process name?
For examle: we have 2 process:
* /usr/bin/foo1
* /usr/bin/foo2
They are run under account with username userA and
try to open for modify file:
/home/userA/test.txt
I want that if foo1 try to open file - it's ok. But if foo2 try to open
this file - i have message about this in /var/log
Problem is that both processes have the same user ID. And i cant use RBAC by username.
Hi all
In my win forms c# app, I want to be able to add spell check functionality. But, I want to do it my own way, and NOT use any other components. All I need is just an online service where i can send a request or something and it tells me whether or not the word i sent was spelled correctly.
Preferred but not required: The ability for that online sevrice to also send back suggestions.
Thank you :)