I am using a Lucene.Net index and want to give the user an option to move the index, but am having trouble closing it down so the directory/contents can be moved (I keep getting access denied exceptions). I need to be able to have some more information so I can debug this problem, such as being able to tell what files are currently open, and as much information about each use as possible.
Alternatively, is there any way to simply force close a bunch of files so they can be moved? This would make things a lot easier to solve.
Hello,
I am trying to open the SMS/MMS app on the iPhone and have an image that is saved in the camera roll pre loaded into the text field. Is this possible? Here is the code I have tried:
NSString *urlString = [NSString stringWithString:@"sms://asset/asset.JPG?id=1000000041&ext=JPG"];
NSString *escaped = [urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSLog(@"URL: %@", escaped);
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:escaped]];
I received the URL from a return after I saved the image to the camera roll. Unfortunately this doesn't work. Any ideas?
Thanks!
Hi, I developing program witch have to write some data in file whom are stored in network computer witch are protected by password.
Now I'm doing this way - open connection with cmd then write data.
static bool ConnectToSrv()
{
String myUser = "domain.local\\user";
String myPass = "pwd";
String cmdString = "net use \\\\otherPC\\folder\\ /user:" + myUser + " " + myPass;
try
{
ManagementClass processClass = new ManagementClass("Win32_Process");
object[] methodArgs = { cmdString, null, null, 0 };
object result = processClass.InvokeMethod("Create", methodArgs);
return true;
}
catch (System.Exception error)
{
return false;
}
}
public void writeDate(string data){ }
I believe there must by better way. I mean the .NET way.
Does anybody know how to do it? :)
Thanks
Hi,
I'm developing an application which requires that state of entities be read from a database at frequent intervals or triggers. However, once hibernate reads the state, it doesn't re-read it unless I explicitly close the session and read the entity in a new session.
Is it a good idea to open a session everytime I want to read the entity and then close it afterwards? How much of an overhead does this put on the application and the database (we use a c3p0 connection pool also)?
Will it be enough to simply evict the entity from the session before reading it again?
After using relational databases as back-end storage all my Windows programming life (currently .NET), I want to experiment with a document-oriented database by this Wikipedia definition; it can be standalone or layered over an existing non-commercial database system.
What open source document-oriented database solution would you recommend from your own experience and why?
A nice to have would be a .NET provider.
Admittedly this is somewhat subjective and potentially argumentative so keep it real folks and I'll do the same - also your answers will be invaluable to others looking into document-oriented databases for the first time on Windows. I'm sure the overall value of your answers will outweigh any biases.
Thanks.
I have activities A and B. The A is the one with LAUNCHER intent-filter (i.e. the activity that is started when we click the app icon on home screen).
A launches B using startActivity(new Intent(A.this, B.class)).
When the user has the B activity open, and then put my application into the background, and later my application's process is killed, when the user starts my application again, B is opened instead of A.
This caused a force close in my app, because A is the activity that initializes the resources my app needs, and when B tried to access the uninitialized resources, B crashes.
Do you have any suggestions what should I do in this situation?
The following javascript opens a pop-up in Firefox, Safari, IE, and Google Chrome:
window.open("http://google.com", "foo", "toolbar=yes,location=yes,menubar=yes")
However, in Google Chrome the toolbar (with the usual forward and back buttons, etc.) does not appear on the popped-up window. (Tested on both Windows and Mac.)
How can I fix this? I would like the user to be able to navigate forward and back using the tools with which they are most familiar.
Thanks!
I'm new on this bash script thing. Can you show me some example on writing Bash script. I want to write a script that can read from a filename and save it to a variable; increment the value of the variable and write that variable back to the file and save it. This is what I have started and stuck on it so far.
#!/bin/bash
# if file exist
#echo "Testing \ "$1""
if [ -f "$1" ]; then
echo "$1 does exist"
else
echo "$1 does not exist!"
echo "Creating $1"
touch $1
echo "This is test" > $1
exit 1
fi
#echo "Testing \ "$2""
if [ "$2" == "" ]; then
echo "Enter the filename"
elif [ -f "$2" ]; then
echo "$2 Fille does exist"
else
echo "$2 File doesn't exist"
echo "Creating $2"
touch $2
exit 1
fi
counter=1
echo -n "Enter a file name : "
read file
if [ ! -f $file ]
then
echo "$file not a file!"
exit 1
fi
Is there any addin or tools available for web browser to view multiple web sites on one page or tab? Or is there any web service to allow me to customize one page for multiple web sites?
For example, within a page, there are some tools to allow me to define regions like a table or several frames. Then I'll be able to add url to each cell or frames. After settings, I'll be able to view several sites on one tab or page. Not sure if there is any tools available?
We're getting this a lot lately.
Windows 2008 Server
Windows 7 & Vista Client PC's
Microsoft Office 2007
When a user tries opening a file on our network drive (word doc, excel spreadsheet, etc) the software reports the file is locked by 'another user' even when it's not. They're also seeing random 'Sharing Violation' errors when trying to save files to the network.
Possibly the same manifestation of the problem shows up when a user tries saving a local, on their own drive, non-network files and they get 'Can not save due to a Sharing Violation'.
Hi there,
Opening a tab-delimited data file in Excel to view & manipulate the data is a very common operation around here. However, by default Excel (2003/4 or 2007/8) will read the columns in a "General" format, which occasionally does terrible things like turning "1/2" into "2-Jan".
Is there a way to tell Excel never to do this, but always process the values as Text, without going through the format wizard, selecting all of the columns, and doing it manually?
Extra points if this works in both Mac and Windows versions of Excel.
Hi, not sure if this is the best forum or if there's someplace better...but I need to write a script/macro for Open Office.
I am sending a letter to 4-6 different people (A,B,C,D).
The format for, say, four people would be:
Dear A,
I'm writing to B,C, and D.
Dear B,
I am writing to A,C, and D.
etc.
Sometimes it may be 4. Sometimes 6. Sometimes 10. But it needs to cycle through all and do so listing the ones not in the "dear" header.
There have been a few other questions on here sort of like this, but none seem to have any answers.
Is it possible to open the command prompt (and I guess any other terminal for other systems), and execute commands in the newly opened window?
Currently what I have is this:
Runtime rt = Runtime.getRuntime();
rt.exec(new String[]{"cmd.exe","/c","start"});
I've tried adding the next command after the "start", I've tried running another rt.exec containing my command, but I can't find a way to make it work.
If it matters, I'm trying to run a command similar to this:
java -flag -flag -cp terminal-based-program.jar
Hi there,
i have a very simple question about Google Maps API.
In this case, i have on my page a map on the left, with about 40 points, and the list of these 40 points on the right.
So you know, when you click on a point of the map, the "info window" is displayed so you can see some informations about it.
I can't find how can i do to simply open the "info window" on the map, by making a "hover" on the corresponding link. (and by the way, close all the others info windows)
Did someone have an idea about this?
Thanks a lot, have a nice day! :)
I've got some files for a project that's due in a few weeks. The guy sent them in a zipx file. How would I extract the files from a zipx on OS X or Linux?
What is the difference between IEditableObject and IRevertibleChangeTracking (both from the System.ComponentModel namespace)? It looks as if the first supports explicit transaction whilst the second is more implicit - but the net result is the same. How should I go about implementing this in code? At the moment I do nothing in BeginEdit and call RejectChanges and AcceptChanges in EndEdit and CancelEdit respectively. My problem is that this will also accept the changes made prior to the BeginEdit. Is that really what MS wanted or am I trying to implement two mutually exclusive interfaces?
I'm running a script in the background which loads an image with feh depending on which application is currently in focus. However, whenever the script opens the image, window focus is lost to feh. I was able to circumvent this by using xdotool to switch back to the application that was originally in focus, but this introduces a short annoying period of time where the focus is switched from feh to the application.
My question is this: is there any way to launch feh in the background such that window focus is NOT lost?
System: Fedora 17, Gnome 3, Bash
Thanks a ton!
My question is pretty self-explanatory. I prefer firefox, but my organization send out intranet links that simply work better in IE. Is there a way to do this?
It is often said that some programming languages exist that once grasped can open your mind and change the way you write software. A sort of "software design enlightenment", we can say.
I heard this about Lisp, Smalltalk, Haskell, pure functional programming in general..
What are your experiences about this?
I know that the right language to use depends on your needs, but I would like to know the one that better improve your programming skills in general.
What do you think would be the best language/paradigm to learn to end up being a better programmer in the long run?
I learn best by taking apart something that already does something and figuring out why decisions were made in which manner.
Recently I've started working with Perl's CGI::Application framework, but found i don't really get along well with the documentation (too little information on how to best structure an application with it). There are some examples of small applications on the cgi-app website, but they're mostly structured such that they demonstrate a small feature, but contain mostly of code that one would never actually use in production. Other examples are massively huge and would require way too much time to dig through. And most of them are just stuff that runs on cgiapp, but isn't open source.
As such I am looking for something that has most base functionality like user logins, db access, some processing, etc.; is actually used for something but not so big that it would take hours to even set them up.
Does something like that exist or am i out of luck?
I have am reading a twitter feed in my iPhone application and can do it correctly, but I'd like to evolve it in a way to detect if the whole NSString contains any URL or URLs and create a "link" that will open a UIWebView within the same application.
Can you guide me on how to perform this task?
-(void) setTextTwitter:(NSString *)text WithDate:(NSString*)date
{
[text retain];
[textTwitter release], textTwitter = nil;
textTwitter = text;
[date retain];
[dateTwitter release], dateTwitter = nil;
dateTwitter = date;
[self setNeedsDisplay];
}
Good morning -
I'm an intermediate-level developer who wants to build on online data-driven app (CRUD with a few calculations and basic HTML form inputs, nothing fancy) that keeps track of user sessions, and looks "professional" (or at least not "homemade").
I'm looking to development something with the look-and-feel that users get from sites like:
http://www.datamasher.org/
http://www.thisweknow.org/ (About page says it was made with Ruby on Rails, which I'm unfamiliar with)
(stackoverflow.com)
Any pointers on whether I should just go the Miscrosoft route, and develop in ASP.net with WebForms, or if there's a quick qay to do this kind of development (with a WYSIWYG environment) on an open-source platform? I'm willing to learn, if it's somethat I can use to quickly drag/drop, add code, and publish online. Templates would be a plus, too.
I apologize is the question seems a bit vague.
My friend's site which I agree to tech-advise, is psychtalkonline.com. You can go check it out, it's an anonymous forum (miniBBS) running Apache on Unix. I at first had a problem with mod_rewrite but then I uploaded the .htaccess file. However, that seemed to cause problems. If you click on any link, you will get a pop-up saying "You have chosen to open which is a BIN file". If you click the source code, and click on the links in the source code, you will see that it goes to the BIN file. I'm not really sure what's going on. I really would appreciate some help. Thanks.
Suppose I have a program named any_program.exe and my operating system drive is C:.
The location of the program is D:\Any_Folder\any_program.exe
How do I start/execute that program via command prompt in Windows 8?
I have tried the command line START any_program.exe, but it shows me an error that
Windows cannot find 'any_program.exe'. Make sure you typed the name correctly, and then try again.
By the way, it worked perfectly in Windows 7.
And, if I type START notepad.exe or START firefox.exe (Firefox is not installed in C: drive), it works in Windows 8.