when I write a number to binary file, it won't display. but in case of a character, it does. why? how would you check to see if the file containing character is binary?
hello there,
In my .cs page i want to check some condition and depending on that i will show/hide a div in my .aspx page. Is that possible?
like
if(j==0)
{
div id="hi".visible=false; //something like that
}
I hope u guys understood the problem.
Thank you
Hi!
What's the best way for me to take url like: http://foobar.com/foo.torrent and check if that really is a torrent, not a html page or something else funny.
Suggestions?
Thank you :)
I've found many useful Bash commands that can execute OS X behaviors from the command line such as:
screencapture -x -C $FILENAME
Is there such a command that can check if the screen saver is active?
Is there a way to check to see if an Microsoft Office process (i.e. Word, Excel) has hung when using Office Automation? Additionally, if the process is hung, is there a way to terminate it?
Hi ,
I'm having a windows form which contains listview control ,
where listView1.View = View.Details; and listView1.CheckBoxes = true;
then added a column with HeaderName as "FileName".
listView1.Columns.Add("File Name", 200, HorizontalAlignment.Left);
Here I would like to have check box in the Header of listview , ie FileName.
Can anyone help me with this.
Thanks in advance.
andy
how can i check if a user is logged in in user control with asp.net mvc
usually on a view page i use this
<% if (User.Identity.IsAuthenticated) {%>
//Do something
<% } %>
but i can't get this done on a user control
I am using jQuery, I want to check existence of an element in my page. I have done following code, but its not working?
if ($("#btext" + i) != null){
//alert($("#btext" + i).text());
$("#btext" + i).text("Branch " + i);
}
Please tell me what will be the right code?
Thanks
Hi guys, I have to get linux distro name from python script. There is dist method in platform module:
import platform
platform.dist()
But it returns
>>> platform.dist()
('', '', '')
Under my Arch Linux. Why? How can I get the name.
p.s. I have to check whether the distro is debian-based.
How do I check to see if a column exists in a SqlDataReader object? In my data access layer, I have create a method that builds the same object for multiple stored procedures calls. One of the stored procedures has an additional column that is not used by the other stored procedures. I want to modified the method to accommodate for every scenario.
My application is written in C#.
In my C# program I call an external program from command line using a process and redirecting the standard input. After I issue the command to the external program, every 3 seconds I have to issue another command to check the status - the program will respond with InProgress or Finished. I would like some help in doing this as efficient as possible.
Is there a fast/efficiency way to check if a table is empty?
DECLARE @StartEndTimes TABLE
(
id bigint,
StartTime datetime,
EndTime datetime
)
IF @StartEndTimes IS NOT NULL
I am trying to check if md5sum or digest exists on solaris and script is used on different machines.
Here is the function in sh script which is called from a ksh script
getMD5cmd ()
{
PATH="${PATH}:/bin:/usr/bin:/usr/sfw/bin:/usr/local/bin:/usr/sbin/bin"
if type -p md5sum;then
MD5CMD=`type -p md5sum`
elif type -p digest;then
MD5CMD="`type -p digest` -a md5"
fi
echo "HERE ${MD5CMD}"
}
When I run scripts I get
-p not found
md5sum not found
-p not found
digest is /bin/digest
HERE
However, when I type it in a terminal, works as exptected
Any Ideas?
Thanks
I have this command
h = urllib.urlopen("http://google.com/")
How can I check if it retrieves me some error, internet down or something I don't expect?
For example, something like
if error
print 'ERROR'
Thank you
What is the easiest way to check if something is a list?
A method doSomething has the parameters a and b. In the method, it will loop through the list a and do something. I'd like a way to make sure a is a list, before looping through - thus avoiding an error or the unfortunate circumstance of passing in a string then getting back each letter.
This question must have been asked before - however my googles failed me. Cheers.
I want to use mod-rewrite to check for a file in two separate locations: at the requested URL, and at the requested URL within the "public" directory.
Here's what I have so far:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/public/$0 !-f #this line isn't working
RewriteRule ^(.*)$ index.php?$1 [L]
It can correctly determine if the file is there, but it's not correctly determining if the file is at /public/supplied/file/path/file.extension. How do I test for that?
Is there an easy way of programmatically checking if a serial COM port is already open/being used?
Normally I would use:
try
{
// open port
}
catch (Exception ex)
{
// handle the exception
}
However, I would like to programatically check so I can attempt to use another COM port or some such.
When I create a thread I save it handle in a list.
After a time I want to check which of them still exists.
I'm not looking for other kind of implementation, I want to know if is there some how to get a thread by it handle ?
Take a look at the ssl_requirement plugin.
Shouldn't it check to see if you're in production mode? We're seeing a redirect to https in development mode, which seems odd. Or is that the normal behavior for the plugin? I thought it behaved differently in the past.
Hi,
I created a view in the AppDelegate, that I add to the window like this:[window addSubview:myView]; I wanna be able to check for the device orientation everytime I come back to this view, so I can make some modifications to it. How can I do that in the appDelegate?
How do you check to see if a file does not exist in SQL Server Integration Services 2005?
Is there a native SSIS component which will just do this for you?
I want to check if the node <Type> is either "Debit" or "Credit"
so that I can transform the information from just credit card information into Debit or Credit transactions.
any suggestion????
I'm trying to prevent users from uploading (accidentally or maliciously) very large files to my website.
I have nginx max_client_body_size set to 4M, but if a file larger than this is uploaded, then it uploads the entire file before returning 413 (entity too large).
I want to make nginx check the Content-Length header, so that it rejects the request before it's uploaded.
Alternatively, a Rails solution would also be acceptable.
Any help appreciated.
my question is:
i have a member that can pay in 3 different way
credit card
check
transfer from bank account
how design the table that contain the history of payment.
the fields of every way is different .
if i save all in one table , i have lot of blank field ?
what the right way to deal it ?