open

Portability of open(...O_DIRECT) in C?

In C file I/O, the O_DIRECT flag can be used to minimize cache effects for a file being open()ed. I understand that this is not a POSIX feature, has been present in the Linux kernel since version 2.4.10, and that Linus is opposed to the interface in general. Under NetBSD, it seems to work as advertised. Example call: int fd = open(f...

Unable to make Firefox open Ack's output

I aim to have a list of lines where I use the word NB in my notes. Pseudo-code open -a Firefox `ack -a NB` However, I cannot make Firefox to understand parameters from terminal. The output of Ack is a text-file, so it should be somehow redirected to Firefox. I run unsuccessfully open "http://`ack -a NB`" I get in Firefox's addre...

COM ApplicationClass.Documents.Open thread

Hi , I am using the Interop word ApplicationClass.Documents.Open method to open a word document. In my application when i use the below statement it hangs as in the IE shows its still loading but it never does anything. _Document aDoc = WordApp.Documents.Open(ref fileName, ref oMissing, ref readOnly, ref oMissing, ref oMissing, ref oMis...

How do you open an XML picture file?

I have a digital elgph camera and accidently pressed something that turned all my pictures into XML files, they all show up on my computer but i cannot open them. Is there any way i am able to open them? ...

In Perl, how can I read an entire file into a string?

So I'm working on a server where I can't install any modules whatsoever. Yes this makes my job difficult. To complete the rest of my script I need to do something that I had thought would be fairly straightforward but it seems to be anything but. I'm trying to open an .html file as one big long string. This is what I've got: ope...

Open files using VisualBasicScript (.vbs)

Hello, i want to open a file with VisualBasicScript (.vbs) How could i do this? The file is 'file.bat' and it's located in the same dir as the .vbs. It should RUN it! ...

Check to see if excel file is available before opening or starting it

Ok so here's the problem, i use a connection with using(connection.... blah blah) and then after my using block is over I want to start the excel aplication like this: System.Diagnostics.Process.Start(excelFile); This works... sometimes, other times my computer runs too quick and before the file is fully close, or the connection is full...

Open Source Winforms applications?

Hi! I'm looking for open source applications, built with winforms in C#. Specifically, i'm looking for applications using new and real world techniques. Like nerddinner and oxite for asp.net. Thanks ...

How does the OS know what to do with a file when the "Open With..." option is selected?

Explanation: I don't remember about Linux and I don't know about OS X, but in Windows you can right-click a file and select a program to open it. But how does the OS know exactly how to make the program open it? Does it keep track of the "Open file" dialogs the program has? Does the developer have to specify a special event handler or so...

Bash: Getting standard program for file type

Hi, the background is a shell script to open the .m3u file of a web radio station. Therefore I want to know inside the script, what's the user's program to open such files. At the moment, he has to set the environment variable $PLAYER, but obviously that is not a good way to go. Alternative: Is there a command that takes a filename and...

Is there an easier away to extract these data?

my $changelog = "/etc/webmin/Pserver_Panel/changelog.cgi"; my $Milestone; open (PREFS, $changelog); while (<PREFS>) { if ($_ =~ m/^<h1>(.*)[ ]Milestone.*$/g) { $Milestone=$1; last; } } close(PREFS); Here is an example of the data its extracting from: <h1>1.77 Milestone</h1> <h3> 6/26/2009 </h3><ul style="margin-t...

Modify sources under Apache License 2.0

Say I am working on some application in my free time, with non-commercial purposes. Surfing around I find some sources from some developer that has created a parser for the type of data I am also working on. But his parser is way better than mine. I would like to copy it into my project, and modify it to suit my needs. It is licensed u...

C# word.open() error - Attempted to read or write protected memory

I am trying to open the word document as follows. wordDocument = wordApplication.Documents.Open(ref paramSourceDocPath, ref paramMissing, ref paramMissing, ref paramMissing, ref paramMissing, ref paramMissing, ref paramMissing, ref paramMissing, ref paramMissing, ref paramMissing, ref paramMissing, ref paramMissing, ref par...

ExtJS display link in new tab

Hello, I am using ExtJS version 2. I am clicking a button to add new tab to a TabPanel. The new tab function looks like this: function addTab(tabTitle, targetUrl){ tabPanel.add({ title: tabTitle, iconCls: 'tabs', closable:true }).show(); } I would like to know if it's possible to get the targetU...

rendering open office files in ruby on rails

Hi All, I'm trying to render .odf files from a controller action in a rails application. I'd like to be able to put templates inside my view folders called show.odp.erb, show.odf.erb, etc.. and have that represent the content.xml file that is inside the zip. I'd also like to be able to render these actions in the controller like so: ...

Free or Open Personal Digital Cerificate of Signing Documents?

I need to sign a pdf file with my own e-signature using a certificate where can i get one pfx file. ...

WordProcessingML : How to create Table of COntent in MS Word Document

I have to create a word report in project and also have to TOC dynamicaly in word report . So, from Word ProcessingML or Open XML APIs how to do that? ...

What are all Financial Industries - Standards, Protocols and Data Model?

First, let me agree this is not about programming. This is more about Financial Industry Architecture, and OpenStandards. It requires some exposure to banking (and financial) industry. When I was preparing for TOGAF exam, I came across Open Standard available for DataModel, Service Model, Architecture for many industries. (Example: AR...

How do I mock an open used in a with statement (using the Mock framework in Python)?

How do I test the following code with mocks (using mocks, the patch decorator and sentinels provided by Michael Foord's Mock framework): def testme(filepath): with open(filepath, 'r') as f: return f.read() ...

Why can't webmin can't open files in directories that are not world executable?

I'm using an open source Perl package named "webmin" on several servers. It's mostly Perl on the inside. I found a weird behavior on a new 64-bit server: files were getting created empty. I've traced it down to a "Permission Denied" error in Perl's builtin function open which is pretty unusual, since the application is running as root....