> In bourne shell, I would like to find out if a user has
> read/write/execute permissions on a given folder.
> Is this possible?
Try: ls -ld <foldername>
Then also try: getfacl <foldername>
amortizing read-access in read/write mutex... You can amortize read access on a read/write mutex by using the following
fairly simple pattern:
static uword32 g_pending = 0;
static rw_mutex g_rw_mutex;
request_type* r = try_to_get_a_read_request();
if (! r)
r = wait_for_a_read_request();
NTFS read/write There's been some discussion of NTFS read/write here. This might be of
Read/write to file Hi!
I have problem where I would like to read through a huge text file
and write some of the lines back to another file. I have to check
each line to see if it is the right one.
This takes a lot of time. Does anybody have any good ideas on how to
save some time?
My suggestion is a bit round about,but will ensure speed.
You can invoke perl scripts from matlab.
You will get many perl scripts already written to do your task.(Perl can
read the entire content of the file into an array,and later each element of
array is processed).
you can use eval('!perl ...') command in matl...
If I run Exact Audio Copy under VPC I can adjust the read offset for
my CD Drive, though as CD burning isn't supported I can't do likewise
for the write. I know the audible difference that this allows is
utterly imperceptible but there are a lot of folks to whom this
fraction of a 75th of a millisecond or whatever it is really does seem
to matter. CDRDAO achieves an acceptable degree of error correction but
as far as I can tell from hours of googling it doesn't address the
offset issue. If a slug-slow emulation program can manage it, surely
there must be a way of achieving it w...
writing/reading DVDs I have a G4 desktop, an iBook and an eMachines PC. The G4 desktop and
the PC both have DVDRWS, while the iBook just has a DVD reader. Here's
the problem I'm having: any data DVD which I burn on the PC is
completely readable by both the PC and my desktop G4. But the iBook
will not be able to deal with files in the last part of the catalog.
Whenever I try to make use of those files it freezes up for awhile,
then tells me "Files contain data which cannot be read." However, it
has no problem with DVDs burned on my Mac. It can read those just fine
and doesn't experience any pr...
Directly Reading/Writing to Disk Can a kernel mode process read/write to physical disk sectors without
going through operating system (without using ints). Is it possible to
do the same in less privilege levels (ring 1-3)?
> Can a kernel mode process read/write to physical disk sectors without
> going through operating system (without using ints). Is it possible to
> do the same in less privilege levels (ring 1-3)?
If your harddisk is (for example) "/dev/hda" then open this device node,
seek and read and write on it as you like.
Read/write binary data Does anyone have an example of how to read binary data from a channel
and write the data to another channel using a fixed buffer size? Read
the manuals but can't get it to work right. Using fconfigure with
-buffersize, -translation, -encoding, etc but still not working right.
Writing to function arguments during execution I'm writing a (music-generating) program incorporating a generator function
which takes dictionaries as its arguments. I want to be able to change the
values of the arguments while the program is running. I have it working as in
this toy example (python 2.5):
from sys import argv
from threading import Thread
from my_functions import option_processor, work
#Make a dictionary of arguments to the main "work" function
argdict = option_processor(argv[1:])
"""Write new values to a dictionary of arguments"""
NIfTI read and write from IDL? Can anyone point me toward IDL code for reading and writing image data
in NifTi format? (http://nifti.nimh.nih.gov)
opening a file to read and write open $file, '+>', $File::Find::name;
This did not do what I expected. It deleted all my file's contents!
Here's my whole program:
#change shebang line for my Windows computer for all scripts
my $shebang = '#!/c:/perl/bin/perl.exe';
open my $file, '<', $File::Find::name;
my $contents = <$file>;
return if not $contents;
return if $contents =~/^$shebang$/;
if ($contents =~/^#!/)
How to execute and read from external bash commands? Hi!
How can i execute an external program and read the output?
Lets make a simple example:
I am writing a pascal program, and this program should execute this bash
'ls -la | grep test | cut -b 1-10'
I have a string variable called "firstline" and this should be set to the
first line of the output from this ls-command.
How do is it possible to run commands like this?
I found some procedures like Execve, but they don't seem to return the
output of the executed command.
I am running fpc under intel linux.
On 2006-05-02, Amund <email@example.com...
How to read and write the same socket in different threads? I'd like to read and write the same socket in different threads.
one thread is only used to read from the socket, and the other is only
used to write to the socket.
But I always get a 10022 'Invalid argument' exception. Anyone knows why?
I'm using windows xp.
my source code is here:
and the stack trace is:
C:\WINDOWS\system32\cmd.exe /c python "main.py"
Exception in thread Thread-1:
Traceback (most recent call last):
File "c:\Python25\lib\threading.py", line 486, in __bootstrap_inner
Xilinx Read First Write First What's this Read First or Write First on Xilinx BRAM about?
"Brad Smallridge" <firstname.lastname@example.org> wrote in message
> What's this Read First or Write First on Xilinx BRAM about?
If you write to mem[addr] the same clock edge that you read mem[addr] on
that same port, what do you want for the result?
Do you want the old data before the write as if it were a register (read
first) or the brand new data that's in process of being written to the
memory array (write first)? The Xilinx Software Manuals (library...
Reading/Writing to Tracks 36 through 40? I've been trying to read/write to Tracks 36 through 40, but Disk Doctor
only goes up to Track 35 (obviously). But I've heard of disks storing
data on Tracks 36 through 40, and I'd like to take advantage of that
extra space on disk to store additional programs.
Do I get an "?ILLEGAL TRACK AND SECTOR ERROR" if I try to store
programs on Tracks 36 through 40?
How do I write information/read information from Tracks 36 through 40
on a standard 5.25" floppy diskette?
How would such a program be written in BASIC/ML?
And is there any such program to do just that?
Newbie I'm a computer science student, and my structures of languages teacher
asked us each to pick a language we'd never formally studied before, so
I went with Prolog. I've been slowly working through both books listed
as "Introduction" in the group's faq. Prolog Programming for AI is
especially good, since the 'exercises' at the end of sections help a
Now. Part of this assignment is the typical paper and report, but he
also asked us to write a small, non-trivial (IE, no 'hello world')
program. I've found plenty of sample code on the web...
How would one write a LabVIEW app to read and change mp3 tags? I am a very experienced LabVIEW programmer interested in creating an
MP3 tag editor to help me appropriately label my music files. Any
thoughts would be greatly appreciated.
How far have you come?
A good start if you are to do it in pure G would be the
I have looked at the MP3 player apps done via ActiveX and have played
with some existing tag editors (shareware or freeware) available
What I would like to do is to be able to customize my music file names
and tags to make it easier to automati...
executing com file -- reading com file code in debug Hi everybody,
When I execute a COM file or an EXE file where is the code loaded to?
I know that COM files are loaded to 100h but which segment?
I'm trying to read the code in memory using debug. Will it show up?
Dennis Chang <email@example.com> schreef in berichtnieuws
> Hi everybody,
> When I execute a COM file or an EXE file where is the code loaded to?
To memory ofcourse :-)
> I know that COM files are loaded to 100h but which segment?
You won't be able to say,...
"read/write synchronization is not available for the selected family" Hi,
While synthesizing the code on Spartan 2 for free filter IP I've found
on internet, I am getting the following message.
The filter stores coefficients in rom entity, and intermediate results
in sram. The first one has only read option, while the last one
Xilinx Webhelp does not have an article on that error message. It looks
like I have to use another device, but why wouldn't it support such a
simple structure? I doubd that though. Maybe I can modify the code
Thank you very much
Synthesizing Unit <sram>.
Related source file is
Re: executing com file -- reading com file code in debug
"Wendy E. McCaughrin" <firstname.lastname@example.org> wrote in message
> R.Wieser <email@example.com> wrote:
> : Dennis Chang <firstname.lastname@example.org> schreef in berichtnieuws
> : 001101c38898$dbdd0f10$6601a8c0@athlon...
> :> Hi everybody,
> : Hello Dennis,
> :> Question:
> :> When I execute a COM file or an EXE file where is the code loaded to?
> : To memory ofcourse :-)
> :> I know that COM files are loaded to 100h but which segment?
> : You ...
problems getting os.system and wxmenu to read options from a file and then execute I managed to get the program running and the menu options are
appearing on the list but the programs are not running. I suspect it
is my onexecutemethod
# Get the GUI stuff
# We're going to be handling files and directories
menufile = open('menufile.txt','r')
# Set up some button numbers for the menu
#ID_TOOL = 400
# based on a frame, so set up the frame