Suggestions on mimicing fgetc and fseek with F90

Hi all,

I know that many compilers have hooks to the C routines fgetc and fseek. 
      I'  However, I was hoping to use standard F90 I/O to do this.  I 
read data files that vary from 3MB to 45MB in size.  So sometime the 
whole file is read to access data.  Other times I seek into the file to 
pluck a few bytes out.

Would something like the following be practical

To mimic reading a file in a fgetc fashion

character(1) c1
character(100) text100
open(iunit, fname='foo', form='formatted',access='sequential')

do i =1,100
   read(iunit,'(A1)',advance='no')c1
   text100(i:i) = c1
end do


The to do a seek followed by a read I was thinking of something like the 
following that would read characters starting at the 300th character and 
stopping at the 399th character.

character(1) c1
character(100) text100
open(iunit, fname='foo', form='formatted',access='direct',recl=1)

j = 1
do i =300,399
   read(iunit,rec=i)c1
   text100(j:j) = c1
   j = j +1
end do


Does this seem like a reasonable approach?  Are there any known speed 
issues with this approach?  Fgetc and fseek are working for me now, but 
I would like to removed the non-standard fortran calls.

Thanks in advance,

Mike Sutton

0
mws116 (5)
10/26/2005 1:30:49 AM
comp.lang.fortran 11365 articles. 0 followers. Post Follow

17 Replies
273 Views

Similar Articles

[PageSpeed] 28
m sutton <mws116@usa.com> wrote:

> To mimic reading a file in a fgetc fashion
....
> do i =1,100
>    read(iunit,'(A1)',advance='no')c1
>    text100(i:i) = c1
> end do

Perhaps I misrecall (as I don't tend to do things like this, so I'd have
to check to be sure), but I don't think this will ever read past the end
of the first record.

> The to do a seek followed by a read I was thinking of something like the
> following that would read characters starting at the 300th character and
> stopping at the 399th character.
> 
> character(1) c1
> character(100) text100
> open(iunit, fname='foo', form='formatted',access='direct',recl=1)
> 
> j = 1
> do i =300,399
>    read(iunit,rec=i)c1
>    text100(j:j) = c1
>    j = j +1
> end do
> 
> Does this seem like a reasonable approach?  Are there any known speed
> issues with this approach?  Fgetc and fseek are working for me now, but
> I would like to removed the non-standard fortran calls.

Many, many issues. Start with the fact that you aren't guaranteed to be
able to open an arbitrary file as direct access at all, though you
probably can on most current systems. Then there is the problem that,
even if you can do such an open, the conversion between the resulting
"record numbers" and file position is not well-defined and portable. In
particular, you are likely to find "surprises" in switching between
unix-like systems (where end-of-record for text files tends to be a
single byte), vs dos/windows-like systems where it tends to be two bytes
(and we'll ignore vms-like systems where things are more different than
that).

Oh, and your read is unformatted, while the open is formatted. I'll
assume that is just a typo; in any case it is easily fixed.  You can
concievably do character data either way, but you do need to be
consistent, and each has a slightly different set of subtle portavility
issues.

Yes, reading character-at-a-time can have speed issues. So can direct
access in general (it can turn off some read-ahead optimizations). They
might not be significant enough to worry about for your application;
that part is hard to tell. If you are doing formatted I/O, then pretty
much by definition, you aren't going to be going blazingly fast anyway,
the format processing might dwarf anything else, and you probably aren't
dealing with gigabyte-sized files.

All those "issues" aside, it might work adequately for you. Things
aren't as bad as, on rereading the above, I've made it sound. Might even
be the best current approach for your application, all things
considered. But don't think that this will make your code perfectly
standard-conforming, portable, and bullet-proof.

Come f2003 compilers, I think you'll want to look at stream I/O, but the
day for that is not quite yet here.

-- 
Richard Maine                    | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle           |  -- Mark Twain
0
nospam47 (9747)
10/26/2005 3:29:55 AM
In message <1h50833.ighhr11xx8akyN%nospam@see.signature>, Richard Maine 
<nospam@see.signature> writes
>Come f2003 compilers, I think you'll want to look at stream I/O, but the
>day for that is not quite yet here.
>

Richard has perhaps forgotten (or chosen to ignore) the fact that the 
g95 compiler (which you can download free from www.g95.org) implements 
the F2003 Stream I/O specification in all its glory.  I wrote some notes 
on how it works at here:
  http://www.star.le.ac.uk/~cgp/streamIO.html



-- 
Clive Page
0
junk3604 (64)
10/27/2005 5:57:42 PM
In article <gfAaskCWURYDJw7P@page.demon.co.uk>,
	Clive Page <junk@page.demon.co.uk> writes:
> In message <1h50833.ighhr11xx8akyN%nospam@see.signature>, Richard Maine 
> <nospam@see.signature> writes
>>Come f2003 compilers, I think you'll want to look at stream I/O, but the
>>day for that is not quite yet here.
>>
> 
> Richard has perhaps forgotten (or chosen to ignore) the fact that the 
> g95 compiler (which you can download free from www.g95.org) implements 
> the F2003 Stream I/O specification in all its glory.  I wrote some notes 
> on how it works at here:
>   http://www.star.le.ac.uk/~cgp/streamIO.html

Perhaps, Richard noticed that the OP specifically requested a
"standard F90 I/O to do this".

-- 
Steve
http://troutmask.apl.washington.edu/~kargl/
0
kargl (773)
10/27/2005 6:16:12 PM
Clive Page <junk@page.demon.co.uk> wrote:

> In message <1h50833.ighhr11xx8akyN%nospam@see.signature>, Richard Maine
> <nospam@see.signature> writes
> >Come f2003 compilers, I think you'll want to look at stream I/O, but the
> >day for that is not quite yet here.
> 
> Richard has perhaps forgotten (or chosen to ignore) the fact that the
> g95 compiler (which you can download free from www.g95.org) implements
> the F2003 Stream I/O specification in all its glory.

A little bit of both (forgotten and chosen to ignore). I had forgotten,
though your mention reminds me that I did see mention of this feature
being done. I was "ignoring" it in that the poster seemed to have
interest in portability, and having the feature in one or two compilers
doesn't yet get you there.

Still, your point is well taken. And g95 is running on enough different
platforms that you do have at least a certain kind of portability with
it today (with more in the future as other compilers implement this).

-- 
Richard Maine                     | Good judgment comes from experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov            |       -- Mark Twain
0
nospam47 (9747)
10/27/2005 6:21:10 PM
In message <djr5hc$cra$1@gnus01.u.washington.edu>, Steven G. Kargl 
<kargl@troutmask.apl.washington.edu> writes
>Perhaps, Richard noticed that the OP specifically requested a
>"standard F90 I/O to do this".
>
Well maybe that's the explanation.   Of course there really isn't such a 
thing, as F90 didn't support it.  There are three solutions as far as I 
know:

(1) Use g95 which is a Standard F90 compiler supporting stream I/O 
conforming to the latest Standard.  So far this solution isn't very 
portable because I don't know of other compilers which have added this 
F2003 feature, but no doubt more will be along soon.  But it seems to me 
to work well, and is the most future-proof.

(2) Use some other Fortran90 compiler which has stream or binary I/O as 
a proprietary extension.  Not, in my opinion, as good as (1).

(3) Do it using formatted direct-access with RECL=1, which works with 
many compilers but is awkward to use (though it can be wrapped in a set 
of subroutines), inefficient (I suspect), and not totally portable.




-- 
Clive Page
0
junk3604 (64)
10/27/2005 9:55:58 PM
Clive Page wrote:
> In message <djr5hc$cra$1@gnus01.u.washington.edu>, Steven G. Kargl 
> <kargl@troutmask.apl.washington.edu> writes
> 
>> Perhaps, Richard noticed that the OP specifically requested a
>> "standard F90 I/O to do this".
>>
> Well maybe that's the explanation.   Of course there really isn't such a 
> thing, as F90 didn't support it.  There are three solutions as far as I 
> know:
> 
> (1) Use g95 which is a Standard F90 compiler supporting stream I/O 
> conforming to the latest Standard.  So far this solution isn't very 
> portable because I don't know of other compilers which have added this 
> F2003 feature, but no doubt more will be along soon.  But it seems to me 
> to work well, and is the most future-proof.

I reckon (1) is the way to go .... along with a request to one's compiler vendor (assuming 
one also has a licensed compiler along with g95) to start adding f2003 features. I mean, 
that's what upgrade/maintenance fees should be for, no?  :o)  I would think the addition 
of the f2003 access="stream" feature on I/O would be one of the more easier additions to 
make to current compilers (seeing as most of them have it as extensions under a variety of 
different names) if it hasn't been done already.

<aside>
Apart from allocatable components of derived types, one of the other things I'm hanging 
out for in f2003 is the PROTECTED attribute for module variables (I wouldn't think that 
would be difficult to implement either, but it's probably the total opposite).
</aside>

Questions from managers can be answered with your future-proofing argument. It might also 
stimulate a bit more groundswell for faster development of, and transition to, f2003 
compilers.

Anyway... it's getting late. ehem.

cheers,

paulv

-- 
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
0
paul.vandelst (1947)
10/27/2005 10:25:15 PM
Clive Page wrote:
> In message <djr5hc$cra$1@gnus01.u.washington.edu>, Steven G. Kargl
> <kargl@troutmask.apl.washington.edu> writes
>> Perhaps, Richard noticed that the OP specifically requested a
>> "standard F90 I/O to do this".
>>
> Well maybe that's the explanation.   Of course there really isn't
> such a thing, as F90 didn't support it.  [...]

Well, all of the functionality of *formatted* streams was
already supported in F90.  The F2003 formatted stream
feature adds nothing to the capability of the Fortran
language.

-- 
J. Giles

"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies."   --  C. A. R. Hoare


0
jamesgiles (2210)
10/27/2005 11:11:42 PM
Thanks for the ideas.  For now I will stick with fgetc & fseek even 
though they are not standard.  I have to support the Sun, CVF, PGI and 
SGI compilers.  These are the compilers that the users have.

I have not tried g95 or gfortran yet.  It looks like gfortran does not 
support fgetc and fseek.

Mike Sutton
0
mws116 (5)
11/2/2005 3:32:36 AM
In article <orW9f.5760$Kv.1971@newssvr22.news.prodigy.net>,
	m sutton <mws116@usa.com> writes:
> 
> I have not tried g95 or gfortran yet.  It looks like gfortran does not 
> support fgetc and fseek.
> 

It's on the gfortran TODO list.

-- 
Steve
http://troutmask.apl.washington.edu/~kargl/
0
kargl (773)
11/2/2005 6:02:13 PM
>  Apart from allocatable components of derived types, one of the other things I'm hanging
> out for in f2003 is the PROTECTED attribute for module variables (I wouldn't think that
> would be difficult to implement either, but it's probably the total opposite).

Sun f95 has supported the PROTECTED attribute for more than three years
now.
It was not difficult to implement.  It did require extensions to Sun's
module file
format, and they were not done correctly; but that was a matter of
process, not
technology.

Bob Corbett

0
11/3/2005 9:43:53 AM
> (1) Use g95 which is a Standard F90 compiler supporting stream I/O
> conforming to the latest Standard.  So far this solution isn't very
> portable because I don't know of other compilers which have added this
> F2003 feature, but no doubt more will be along soon.

Sun f95 has had stream access for more than three years now.

Bob Corbett

0
11/3/2005 9:45:27 AM

robert.corbett@sun.com wrote:
>> Apart from allocatable components of derived types, one of the other things I'm hanging
>>out for in f2003 is the PROTECTED attribute for module variables (I wouldn't think that
>>would be difficult to implement either, but it's probably the total opposite).
> 
> 
> Sun f95 has supported the PROTECTED attribute for more than three years
> now.
> It was not difficult to implement.  It did require extensions to Sun's
> module file
> format, and they were not done correctly; but that was a matter of
> process, not
> technology.
> 
> Bob Corbett
> 
There's a potential gotcha in PROTECTED variables.  The
standard basically says they can't be defined (or undefined)
outside of the module.  That's easy enough for the compiler
to enforce in the USEing routine, but not if they are
passed on to an external subroutine.
       use some_module, only : a_protected_variable
       call some_random_external (a_protected_variable)
and you're on your own.  There's no guaranteed compiler
help with the protection.

Dick Hendrickson

0
11/3/2005 5:23:50 PM
Dick Hendrickson wrote:
> 
> 
> robert.corbett@sun.com wrote:
> 
>>> Apart from allocatable components of derived types, one of the other 
>>> things I'm hanging
>>> out for in f2003 is the PROTECTED attribute for module variables (I 
>>> wouldn't think that
>>> would be difficult to implement either, but it's probably the total 
>>> opposite).
>>
>>
>>
>> Sun f95 has supported the PROTECTED attribute for more than three years
>> now.
>> It was not difficult to implement.  It did require extensions to Sun's
>> module file
>> format, and they were not done correctly; but that was a matter of
>> process, not
>> technology.
>>
>> Bob Corbett
>>
> There's a potential gotcha in PROTECTED variables.  The
> standard basically says they can't be defined (or undefined)
> outside of the module.  That's easy enough for the compiler
> to enforce in the USEing routine, but not if they are
> passed on to an external subroutine.
>       use some_module, only : a_protected_variable
>       call some_random_external (a_protected_variable)
> and you're on your own.  There's no guaranteed compiler
> help with the protection.

Hmm. How is this different from the case where one does:

   call some_random_external(1)

   subroutine some_random_external(j)
     integer j
     j = j+1
   end subroutine some_random_external

?? (If at all)

If, in your
    use some_module, only : a_protected_variable
    call some_random_external (a_protected_variable)
example, the external routine modifies the protected variable, what happens upon return to 
the calling routine? I.e what value does "a_protected_variable" contain?

cheers,

paulv

-- 
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
0
paul.vandelst (1947)
11/3/2005 5:34:19 PM

Paul Van Delst wrote:

> Dick Hendrickson wrote:
> 
>>
>>
>> robert.corbett@sun.com wrote:
>>
>>>> Apart from allocatable components of derived types, one of the other 
>>>> things I'm hanging
>>>> out for in f2003 is the PROTECTED attribute for module variables (I 
>>>> wouldn't think that
>>>> would be difficult to implement either, but it's probably the total 
>>>> opposite).
>>>
>>>
>>>
>>>
>>> Sun f95 has supported the PROTECTED attribute for more than three years
>>> now.
>>> It was not difficult to implement.  It did require extensions to Sun's
>>> module file
>>> format, and they were not done correctly; but that was a matter of
>>> process, not
>>> technology.
>>>
>>> Bob Corbett
>>>
>> There's a potential gotcha in PROTECTED variables.  The
>> standard basically says they can't be defined (or undefined)
>> outside of the module.  That's easy enough for the compiler
>> to enforce in the USEing routine, but not if they are
>> passed on to an external subroutine.
>>       use some_module, only : a_protected_variable
>>       call some_random_external (a_protected_variable)
>> and you're on your own.  There's no guaranteed compiler
>> help with the protection.
> 
> 
> Hmm. How is this different from the case where one does:
> 
>   call some_random_external(1)
> 
>   subroutine some_random_external(j)
>     integer j
>     j = j+1
>   end subroutine some_random_external
> 
> ?? (If at all)
I don't think it's fundamentally different.  It's a
programming error, and one which compilers generally
have trouble diagnosing.

> 
> If, in your
>    use some_module, only : a_protected_variable
>    call some_random_external (a_protected_variable)
> example, the external routine modifies the protected variable, what 
> happens upon return to the calling routine? I.e what value does 
> "a_protected_variable" contain?

Unless I missed something in the standard, it's undefined.
The rule is ultimately a boy scout one, "Thou shalt not mess
up a protected variable".  If you do, your program is non
standard and anything can happen.

Protected variables might be stored in read-only memory,
or they might be passed-by-value, but you can't count it.

Dick Hendrickson
> 
> cheers,
> 
> paulv
> 

0
11/3/2005 5:45:09 PM
Paul Van Delst wrote:
> Dick Hendrickson wrote:
....
>> There's a potential gotcha in PROTECTED variables.  The
>> standard basically says they can't be defined (or undefined)
>> outside of the module.  That's easy enough for the compiler
>> to enforce in the USEing routine, but not if they are
>> passed on to an external subroutine.
>>       use some_module, only : a_protected_variable
>>       call some_random_external (a_protected_variable)
>> and you're on your own.  There's no guaranteed compiler
>> help with the protection.
>
> Hmm. How is this different from the case where one does:
>
>    call some_random_external(1)
>
>    subroutine some_random_external(j)
>      integer j
>      j = j+1
>    end subroutine some_random_external
>
> ?? (If at all)
>
> If, in your
>     use some_module, only : a_protected_variable
>     call some_random_external (a_protected_variable)
> example, the external routine modifies the protected variable, what
> happens upon return to the calling routine? I.e what value does
> "a_protected_variable" contain?

I think that's the point Dick was making.  In both cases the
call is illegal.  But, the standard doesn't require implementations
to detect or report the violation.  And in fact, actual compilers
seldom will.  It's not just a "quality of implementation" issue
since detecting this can actually cause significant degradation
in quality (specifically efficiency).  It's one of those where
it's up to the individual programmer to be aware of the
problem and not do the illegal call.

(In your example above of passing a literal constant, I support
a change in the standard anyway.  The rule should be that when
you pass literals or named constants the compiler should use
call-by-value semantics for that argument.  That is, the procedure
may cause the dummy argument to be redefined or become
undefined but the caller ignores any change in value.  That's
already a very common behavior of implementations when the
actual argument is an expression.)

-- 
J. Giles

"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies."   --  C. A. R. Hoare


0
jamesgiles (2210)
11/3/2005 5:54:09 PM
Dick Hendrickson <dick.hendrickson@att.net> wrote:

> Paul Van Delst wrote:
> > I.e what value does "a_protected_variable" contain?
> 
> Unless I missed something in the standard, it's undefined.

I'll quibble with that answer. I think that what you have is illegal
code in that case. This in the category of illegal code for which
anything can happen. "Anything" encompasses a lot more than just the
value of the variable being undefined. For example, the code might well
abort wkith some kind of error. It might even fail to compile. You can't
count on the compiler detecting such things, but it is certainly allowed
to, and one could imagine scenarios in which it might be possible.

When the standard says that the value of a variable is undefined, that
at least ties down the effects to that variable. Illegal code doesn't
tie things down that much.

I'm sure that Dick knows all this stuff and was probably just speaking
loosely. My elaboration is just for other readers.

-- 
Richard Maine                     | Good judgment comes from experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov            |       -- Mark Twain
0
nospam47 (9747)
11/3/2005 7:03:03 PM
Dick Hendrickson wrote:
| Paul Van Delst wrote:
| 
|| Dick Hendrickson wrote:
|||| 
||| There's a potential gotcha in PROTECTED variables.  The
||| standard basically says they can't be defined (or undefined)
||| outside of the module.  That's easy enough for the compiler
||| to enforce in the USEing routine, but not if they are
||| passed on to an external subroutine.
|||       use some_module, only : a_protected_variable
|||       call some_random_external (a_protected_variable)
||| and you're on your own.  There's no guaranteed compiler
||| help with the protection.
|| 
|| 
|| Hmm. How is this different from the case where one does:
|| 
||   call some_random_external(1)
|| 
||   subroutine some_random_external(j)
||     integer j
||     j = j+1
||   end subroutine some_random_external
|| 
|| ?? (If at all)
|
| I don't think it's fundamentally different.  It's a
| programming error, and one which compilers generally
| have trouble diagnosing.
| 
| Protected variables might be stored in read-only memory,
| or they might be passed-by-value, but you can't count it.
 
There is a likely difference in implementation though.
For constants (and expressions?), it's fairly easy for 
compiler to put them in read-only memory (CVF and IVF
do that by default and you'll get a run-time error if
you try Paul's code). 

However, for protected variables compiler can't do that 
because it couldn't know when it will be (legally) written 
by module procedures or (illegally) written by outside 
procedures, and one can't mark OS memory pages as 
"full access for these routines and read-only for others".

So, the bottom line is that it *is* a programmer's error
but I wouldn't be optimistic that compilers would be able
to catch it in all situations (but, for example, if dummy
argument j of some_random_external had an INTENT(INOUT)
declared & explicit interface provided, a compile-time 
error would be justified).
-- 
 Jugoslav
___________
www.xeffort.com

Please reply to the newsgroup.
You can find my real e-mail on my home page above.
0
jdujic (694)
11/4/2005 7:47:59 AM
Reply:
Similar Artilces:

From the Tutorial Wiki: suggested restructure
For anyone interested, here's a blog entry I've added over at the Tutorial Wiki: ---------------------------------------- As mentioned by effbot in the previous post I've put together a suggested alternative factoring of the Tutorial here(http://pytut.infogami.com/gerard_refactor). At the minute it just amounts to a carving-up of the existing material into two sections: beginners and intermediate. It's a bit stilted in places, but not excessively. There's also a suggested advanced section - I'm not an advanced user myself so I don't really know what would be approp...

SASware ballot suggestion
Here's one that came up with me the other day; according to SAS tech support, there's no current easy way to do it. Suppose youre running a bunch of regressions using forward or backward or stepwise selection (yes, I know it's rarely a good idea, but it's what my boss wanted, and, in this particular case, made some sense). Using ODS, you can just print out the paramter estimates (ods select selparmest;) but this gives them for EVERY step. How about a way to just give them for the LAST step, perhaps in order of entry into the model? Peter Peter L. Flom, PhD Assistant Directo...

Suggestion
Given Apple's latest financials, change the name of the group to: mp3.apple.ipod.advocacy In article <gv5f42drco3phqsbnkcv7cqb4v2d51nb5g@4ax.com>, tom_elam@earthlink.net wrote: > Given Apple's latest financials, change the name of the group to: > > mp3.apple.ipod.advocacy Here's a suggestion. Get a fucking life you dumb-fuck wintroll. tom_elam@earthlink.net wrote: > Given Apple's latest financials, change the name of the group to: > > mp3.apple.ipod.advocacy yawn. hint: your ignorance is showing again. "Mojo" <windoze_sucks@mic...

your suggestions
Dear all, I am wondering whether you may offer me some suggestions on modelling the distribution of some variables. I have three expenditure variables: health expenditure (>=0), food expenditure (>0, can't be zero) and other expenditure (>=0). My questions are (1) what will be appropriate distributions for these three variables? I am thinking about gamma distribution, but food expenditure cann't be zero, so the gamma might not fit. (2) what will be appropriate distributions of measurement errors of these three variables? normal distribution? Any comments are highly ap...

Kyocera 1020D paper misfeeding
I've got a Kyocera FS-1020D laser printer, bought June 2004. It had a warranty repair in January 2005 for a "Fuser Error (6000)", but has run fine since.... ....until about 1 month ago, when the paper started mis-feeding, leading to paper jams in various places through the printer. I suspect it is at the initial paper pick-up roller that the problem is occuring. I now get a mis-feed about every 4th sheet!! Lots of wasted paper. Occurs more often in the middle of multi-page runs than single sheet jobs, but is getting more frequent as time goes on. Has anyone seen this...

Game suggestion #4
Anybody know of some non-violent puzzle type games (tetris, eg) which are multiplayer and can be played on a Mac and Windows XP machines networked together. Thanks ------------------------------------------------ Bumperstickers: http://www.cafepress.com/bush_doggers?pid=2794571 Quoth The Raven; DefendUSA <defendusa2@yahoo.com> in <1158089315.863231.27430@e3g2000cwe.googlegroups.com> > Anybody know of some non-violent puzzle type games (tetris, eg) which > are multiplayer and can be played on a Mac and Windows XP machines > networked together. > > Thanks > >...

Suggestions
Hi, The following SELECT statement works fine and returns what I need as one of the columns in my query. I have to create more than 10 of the selection statements like this and then UNION them into a final query. What I want to do is to have an example to show me how create a function to pass the column name and the table name to create the query. SELECT LN_NR, ROUND(CAST(amountTotal AS DECIMAL(7, 2)) / positionTotal, 0) AS AverageYearsinPresentPosition FROM (SELECT SURV_YY_DT, LN_NR, SUM(TOT_PSTN_OFFCR_NR) AS positionTotal, SUM(TOT_YY_PSTN_NR) AS amountTotal ...

Suggestion for a new regular expression extension
Hi, I'm currently writing various regular expressions designed to help me parse some real-world French postal addresses. The task is not easy due to the vast amount of abbreviations, misspelling and variations in adresses. Just to give you a taste of what the regular expression looks like (unoptimized and perfectible, but for now it performs well enough) : re_adresse = re.compile(r''' (?P<street_number>\d+(?:[ /\-]\d+)?)? \s* (?:(?P<street_number_extension> A | B(?:IS)? | C | E | F | T(?:ER|RE)? | Q(?:UATER)?...

TCPIP Services: SMTP receiver suggestions
Have been going through the paces to solidify my smtp receiver since it is about to get more exposure to the net and bring the following comments: (This is based on VAX TCPIP Services 5.3) 1-Handling of RBLs Right now, it seems that VMS will immediatly issue a 550 message when the IP address of the remote SMTP server is on a black list. Suggestion: capture the HELO, MAIL FROM and all RCPT TO: (with fake 200 OK messages) and only at start the DATA phase, do you issue the nasty message and close connection. Rationale: allows investigation if a user complains he hasn't received a message...

book review/suggestion requested for DSP programming
Hi, I am learning DSP programming and I am looking for some good book suggestions. I have good background in general Assembly/C/C++ programming and signal processing, but I am specifically looking for information on DSPs (interfacing, specific programming/optimization techniques etc.,) I found this one at Amazon.com: "The DSP Handbook: Algorithms, Applications and Design Techniques", Andrew Bateman & Ian Paterson-Stephens. I didn't find any reviews of this book at Amazon, but a sample chapter (# 4) that I found here - http://sparg.derby.ac.uk/SPARG/SPARG_Downloads.asp - a...

CPU pegged; any suggestions?
Hello gurus; I hav a 280R, 6 GB ram and 2 900 MHz processors, running Solaris 8 and bea weblogic as a webserver. The web developer recently increased the memory allotted to the webserver, as we had added memory to the machine a while back. Prior to that increase, CPU stats showed very little in the way of activity; I'm talking 25 - 30% usr at most for very brief periods; little kernel activity, and the rest idle. Now, since the web memory increase, we're experiencing very HIGH usr stats; averaging 95 - 99% usr, the remaining in kernel and idle; sometimes it will shift to maybe 80/20...

Saturday Suggestions
MacBook Chrismas Gift Suggestions If you know someone with a new MacBook here are some wonderful Christmas gift suggestions that are sure to please them (or yourself should Santa need your personal list): 1. More RAM memory. The C2D MacBooks should be sold with 4Gig of memory but they aren't. For as little as $150 you can buy them 4GB (2G sticks each)from various vendors like OWC (fast delivery, highly recommended) Crucial and RamJet. RAM is easy to install and makes a great deal of difference in the power and speed of any C2D MacBook. 2. MacBook Sleeves. Nothing saves the exterior finis...

suggestion
Hi group users, I'm writing this, since I am extremely confused about how to configure network time sync for an embedded system I'm working on. Possible time sources for the box are: 1. onboard RTC (used at boot to start-up system clock) 2. NTP server (optional and configurable: used as soon as reachable for synchronisation) 3. local GPS connected to serial line (an alternative to NTP: used as soon as it fix ad send timestamps) When first thinking about the time sync problem, I was pleased to learn that ntpd was able to handle the time data from the GPS as a special time source, tog...

QEMU--Suggestions. I want to run couple old win apps on PCLOS
Anyone running this? Suggestions? Sounds cleaner than other VMs or emulators. On 2007-02-19, flyer <flyer@there.net> wrote: > Anyone running this? Yes. > Suggestions? Buy index funds with low expense ratios. > Sounds cleaner than other VMs or emulators. It works fine for me. It's a _lot_ slower than Win4Lin 9x, but I needed something that would run Win 2K or XP, and Qemu does that. -- Grant Edwards grante Yow! .. I want a COLOR at T.V. and a VIBRATING BED!!! ...

A Query Analyzer for Linux: Suggestions?
Cany anyone suggest a tool that would allow me to connect to SQL server from a Linux workstation and run sql queries ( like query analyzer) ? On Tue, 09 Dec 2003 02:48:08 GMT, John Bailo <jabailo@earthlink.net> wrote: > Cany anyone suggest a tool that would > allow me to connect to SQL server from > a Linux workstation and run > sql queries ( like query analyzer) ? Use this and write your own: http://sourceforge.net/projects/freetds/ -- General Protection Fault generalpf@nospam.yahoo.reallynospam.com General Protection Fault wrote: > On Tue, 09 Dec 2003 02:48:08 G...

suggest
Matlab 7 suggest me the following Use the DIMENSION input argument to prod instead of using transpose (') p3=prod(p2'); What Does it mean? "Andrea" <cigen@hotmail.com> wrote in message news:Qti5d.4802$O9.409037@news4.tin.it... > Matlab 7 suggest me the following > Use the DIMENSION input argument to prod instead of using transpose (') > p3=prod(p2'); > > What Does it mean? > > down columns is the first dimension, across rows is the second dimension, etc. Just use 1, 2, ... In article <Qti5d.4802$O9.409037@news4.tin.it>, &qu...

Suggestion: SET FILE/SHADOW=<filespec>
OK, call this another one of JF's wacky suggestions... SET FILE $disk1:[vms$common.sysmgr]systartup_vms.com - /shadow=$disk2:[vms$common.sysmgr]systartup_vms.com So, whenever you make changes to either file, the other file(s) get updated as well (same as when you create a new version. But this would be at the file level, not the disk level. So you could have specific files on a system (or other) disk duplicated/mirrored on different systems in a cluster. This way, when you have multiple distinct system disks (to allow your cluster to stay up with multiple boot nodes), system m...

Imaging Manipulation Library: basic question and suggestions
Hello all, I'm starting to face a new range of problems I never faced before: imaging manipulation. Basically we have to develop an application that, from a collection of pictures, can perform the following operations on them: 1. scaling or zooming 2. rotate them 3. merging, eventualli managing overlap smoothly 4. image contour detection 5. polygonal interpolation of a closed curve 6. area determination Honestly I think these are very stupid task, accomplished by almost all imaging manipulation software I've experieced. The fundamental question is: which toolkit ...

suggestion on download distribution ...
hi, I am close to releasing an OS project (Maven multi-module project) and I wonder what is best for the downloads section ... - All delivered jar separately: users have to get the needed dependencies on their own (is listed in the dependencies report) - A tarball per project including cumulative dependencies e.g. sub-module A (tarball including only jar A, documentation, maven project etc) sub-module B depends on A (tarball including jar A and B, all the rest for both) or - A tarball per project with non cumulative dependencies e.g. sub-module A (tarball including only...

A suggestion for newsgroup conduct
This newsgroup is just like every one I've ever frequented. There are a couple of regulars who are here only to flame by posting rude or profame messages and replies. You all know who they are. It is so easy to hide behind the anonimity of a computer terminal and behave badly. Then, there are several more who are just as bad because they are dumb enough to take the bait, resultin in a flame war that goes on forever. Unfortunately, those of us who read this group for information have to sift through tons of garbage messages in a thread to find the few with useful information. ...

Suggest a reporting tool?
Hi all, I am hoping someone can suggest a reporting tool that I can use with my program. Currently, I am using Crystal Reports. I use the reports strictly as a container that I dump data into. It does not connect directly to any data source. For each element of data that I am passing in, there is a corresponding formula field with the same element name. Thus I have a variable called "A1a" that has a value of "3", my program pushes into the Crystal Report to the formula {@A1a} the value of "3". Then, based upon that, I may have statements print out or simply ma...

Suggestions for rebuild ???
Hi, I'm getting ready to upgrade my Ultra 10 from Solaris 2.6 to Soalris 8. I'm familiar with installing the OS, but have never done a machine that has an OS installed previously. I want to do a clean install. What do people recommend? Should I format the disk and them do a <boot cdrom> to start the install? How can I do this if the machine has only one disk? I'm a little confused how I can run format when the system has only one disk. Will the installation of Solaris 8 do this for me? thanks Peter Peter Cattaneo wrote: > > I'm a little confused how...

Suggestion for tapered sinc
Hi, For interpolation, I'm using a truncated sinc function to get interpolation coefficients. It appears that I'm getting Gibbs ripple, as expected within this kernal. So I'd like to taper the sinc. Any suggestions? What about sinc(x)/x? Thanks. spasmous wrote: > Hi, > > For interpolation, I'm using a truncated sinc function to get > interpolation coefficients. It appears that I'm getting Gibbs ripple, > as expected within this kernal. > > So I'd like to taper the sinc. Any suggestions? What about sinc(x)/x? > Try Lanczos - it's my...

any suggestions.
Still no luck but I have been getting closer I think. I relized something odd. This is what it is. 12345hello 1 This is a integer. 2 This is a integer. 3 This is a integer. 4 This is a integer. 5 This is a integer. h e l l o Press any key to continue . . . and hello12345 h e l l o 1 This is a integer. 2 This is a integer. 3 This is a integer. 4 This is a integer. 5 This is a integer. Press any key to continue . . . my code so far is; public class intis2 { public static void main(String[] args){ String s = Stdin.readln(); // read input from console. for(int i=0; i<s.lengt...

Batch processing package suggestions needed...
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I want a batch processing package that will do nothing while the queue is empty but once something is put in start processing immediately regardless of processor load. I looked (momentarily) at 'at', but it wants system load to be below 0.8 before starting. This doesn't work for me, because I have setiathome running at all times. I'm planning to have each batch job stop then restart setiathome. Is there an option in at that will allow this, or another batch tool that will do what I need? Thanks Mark - -- Remove both wrongs ...