|
I need to determine if a user-supplied String is a valid file path (i.e. if createNewFile() will succeed or throw an Exception) but i don't want to bloat the file system with useless files created just for validation purposes, so is there a way to determine...
Started by Raibaz on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
}
It seems like file.canWrite() does not give you a clear indication... .
File file = new File("c:\\cygwin\\cygwin.bat"); if (!file.isDirectory()) file = file.getParentFile(); if (file.exists()){ .. .
This would check for the existance of the directory as well .
|
|
When attempting to save an Outlook VBA project I receive the error:
The save failed. This could be because there was not enough hard disk space, or the project file is read-only.
Hard disk space is certainly not a problem and the project is not marked...
Started by LJ on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at superuser):
Can you check where you are saving the project to? Perhaps that location is set for read-only, or you might not have access to it?
-JFV
By looking at this site I was able to find the location where the Outlook VBA project data is stored:
Outlook 2007... .
|
|
I am attempting to get the last modified time of a file that definately does exist: /document_root/myfile.pdf -rwxr-xr-x 1 11018 11008 198621 Nov 26 2007 myfile.pdf
When i run the following statement (through PHP CLI as root): filemtime('/document_root...
Started by Dewayne on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You're not doing something like running this from within a function where you haven't passed through a value for document_root?
Are you sure you've got the right path?
/document_root/myfile.pdf
Looks like an absolute path, but I doubt your "document_... .
|
Ask your Facebook Friends
|
Hello,
I am running Ubuntu 9.10 and I'm attempting to install a plugin for Eclipse 3.5 from a repository that my company created. This worked in the past on this linux box and also works just fine on my laptop which has Windows XP installed.
The exact...
Started by BordrGuy108 on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Try to set the proxy to "Direct" (hence selecting no Proxy... .
It's probably this bug: https://bugs.launchpad.net/ubuntu/+source/sun-java6/+bug/486215
It is usually due to a proxy used by Eclipse where it shouldn't use it to access a local self-hosted repo .
|
|
First off, I don't know if this is possible, but let me describe my scenario.
I have a set of WCF services, a SQL Server 2008 Database all running on Windows Server 2008. All of this works fine when I am connected to my LAN, however I am going to be using...
Started by Furis on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Is there a firewall running on the Windows....
Or Data Source=localhost, to ensure you are using the loopback network adapter (127.0.0.1) .
Try using Data Source=.
It could be to do with the connection string the WCF services use to connect to the database .
|
|
Hi all, I'm attempting to use boost::format, where my formatting string is the HTML below. I intend to insert 3x std::strings at locations specified by %s placeholders.
In other words - I'm opening the below *.html file for reading, read it's contents...
Started by Maciek on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If ....
You'll need to replace those with %% to get just a literal % character in the output .
Boost::format uses % to delimit format specifications ; so the % characters in your CSS are confusing it; it is trying to evaluate them as format specifications .
|
|
I'm trying to upgrade MySQL from 4.1.20 up to 5.1.39. v4.1 was installed via RPMs with no issue, but attempting to upgrade throws up several warnings which appear erroneous, such as:
# rpm --upgrade MySQL-client-5.1.39-0.glibc23.i386.rpm warning: MySQL...
Started by Rowland Shaw on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at serverfault):
If using yum try:
yum clean all
If not, try:
rpm --rebuilddb
If that still fails, you could try rebuilding the DB by hand:
http://www.informatimago.com/linux/rpm-rebuilddb.html
Disclaimer: I have not tested the steps... .
Your dependancy database is messed up.
|
|
Hi,
I have a specific set of binaries installed at:
~/.GutenMark/binary/<binaries...>
These were previously working correctly, but for seemingly no reason when I attempt to execute them the shell claims not to find them:
james@anubis:~/.GutenMark...
Started by eegg on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at superuser):
Are you are trying....
Is GutenMark (at 76592 bytes) not actually a binary , but a script starting with a !# line which defines the program which executes the script?
If that line defined a non-existent program, you would see a 'not found' error message .
|
|
I have created a custom UserControl in Managed C++ that wraps some native code controls. I have confirmed the control works at runtime, and have been trying to make the control work with the Visual Studio designer by allowing drag and drop of the control...
Started by Joe Waller on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Wrap this assembly with another assembly and manually load your... .
Two other strategies for dealing with this.
You will have to copy the dll's your self or copy them into your windows\system32 directory .
Visual studio is unaware of any unmanaged dependency.
|
|
I've written some code to upgrade a SQL Server database. Before I upgrade the database, I attain an exclusive lock via:
ALTER DATABASE Test SET SINGLE_USER WITH NO_WAIT
However, I'd like to test the database to see if the exclusive lock is possible before...
Started by Camel on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Databases don't really have many exclusive locks situations....
What if the database becomes busy from the time you determined that it was not in use, until the point where you try to acquire the exclusive lock?
Mainly, a DB lock is just to show it is in use .
|