f



Re: Chained-functional notation examples? #4

A query such as this might do what you have in mind. Here
directoryname should be changed to whatever directory you
want searched.

Select[FileNames[("*uid*" | "*UID*"), directoryname, Infinity],
     ((StringMatchQ[DirectoryName[#] , "*egal*"] && Today < 
DayPlus[FileDate[#], 3]) &]

Also there is a case sensitive switch if you want to allow strings with
e.g. "uID". If you want to allow that uid only in the name and not full 
string

Daniel Lichtblau
Wolfram Research

-------------------

On Tue, 06 May 2014 06:26:46 +0000, Unknown wrote:

 > I came to 'Mathematica' via Xahlee's criticism of the ad-hoc nature of
 > unix-piping [functional notation].  He claims [& I believe him] that
 > Mathematica has a better, more consistent notation.  But the facility of
 > PRE, IN & POST-fix alternatives, seems bad.  You want ONE way of
 > acieving the goal. More rules just increases mental load.
 >
 > A major benefit of functional [unix-piping] programming style, is that
 > you don't need to remember the-full-journey: you just need to remember
 > the previous stage's output. Nor do you need to remember several names:
 > the previous output is just "it".  A superficial read through a recent
 > article[s] here, about <collecting data from several servers, and
 > agregating it, and sending the result to a master> seemed very
 > interesting, and matches my ideas of using functional programming.  But
 > I can't afford to invest in ANOTHER notation/syntax, without good
 > prospect of productivety increase.
 >
 > Just as a test, how would Mathematica handle the following [or part of]
 > little task:
 >
 > search all files in Dir=tree D |
 >  which are less than N days-old |
 >  and which contain string S1 |
 >  and which contain string S2 .
 >
 > Actually, this seems not a good example, since it's biased towards the
 > *nix file system's format/syntax.
 >
 > Try:
 > Search in table of ListOfOpenFiles for lineS with path-P [field] |
 >  which have same tty-field as line with path-P2 & program-M [field]
 >
 > This sounds like a data-base problem?
 >
 > Or is there a nice list of 'such' Mathematica examples?
 >
 >  Thanks,
 >
 > == John Grant.

Here's a related real-live problem:
  list all files in Dir-tree:D |
  which are less-than daysOld:N |
  and contain "egal" in the FullPathName |
   and contain String:"uid" OR "UID"

..

0
Daniel
5/9/2014 6:05:44 AM
comp.soft-sys.math.mathematica 28821 articles. 0 followers. Follow

0 Replies
853 Views

Similar Articles

[PageSpeed] 46

Reply:

Similar Artilces:

Re: Chained-functional notation examples?
On 5/6/14 at 2:26 AM, dog@gmail.com (Unknown) wrote: >I came to 'Mathematica' via Xahlee's criticism of the ad-hoc nature >of unix-piping [functional notation]. He claims [& I believe him] >that Mathematica has a better, more consistent notation. But the >facility of PRE, IN & POST-fix alternatives, seems bad. You want >ONE way of acieving the goal. More rules just increases mental load. If you are looking for a system with one way to achieve a given goal, Mathematica isn't it. There are multiple ways of achieving a result without using dif...

Re: Chained-functional notation examples? #2
A query such as this might do what you have in mind. Here directoryname should be changed to whatever directory you want searched. Select[FileNames[("*uid*" | "*UID*"), directoryname, Infinity], ((StringMatchQ[DirectoryName[#] , "*egal*"] && Today < DayPlus[FileDate[#], 3]) &] Also there is a case sensitive switch if you want to allow strings with e.g. "uID". If you want to allow that uid only in the name and not full string Daniel Lichtblau Wolfram Research ------------------- On Tue, 06 May 2014 06:26:46 +0...

Re: Chained-functional notation examples? #3
A query such as this might do what you have in mind. Here directoryname should be changed to whatever directory you want searched. Select[FileNames[("*uid*" | "*UID*"), directoryname, Infinity], ((StringMatchQ[DirectoryName[#] , "*egal*"] && Today < DayPlus[FileDate[#], 3]) &] Also there is a case sensitive switch if you want to allow strings with e.g. "uID". If you want to allow that uid only in the name and not full string Daniel Lichtblau Wolfram Research ------------------- On Tue, 06 May 2014 06:26:46 +0...

Re: Chained-functional notation examples? #5
On 5/7/14 at 2:44 AM, dog@gmail.com (Unknown) wrote: >Here's a related real-live problem: >list all files in Dir-tree:D | which are less-than daysOld:N | and >contain "egal" in the FullPathName | and contain String:"uid" OR >"UID" It is not entirely clear what it is you are trying to do. There are a couple of ways to obtain a list of files in a given directory. First, if the directory is the current working directory, then FileName[] will return a list of every thing at the top level of the directory. But in this case, only the...

Re: Fyi, Listing of Mathematica 7 functions (1869 functions) #4
One of my colleagues reminded me off-list that some messages have linear syntax embedded in them which makes it more difficult to reliably string-process them. I think that's part of why your messages are under-counting, too. It may, for example, be missing functions whose usage messages include subscripts (like many of the plotting functions). He suggested using SyntaxInformation[], which is probably still not 100% reliable, but much easier than trying to slice apart linear syntax and more reliable than your function which does not. I was probably influenced in thinking...

Chained-functional notation examples?
I came to 'Mathematica' via Xahlee's criticism of the ad-hoc nature of unix-piping [functional notation]. He claims [& I believe him] that Mathematica has a better, more consistent notation. But the facility of PRE, IN & POST-fix alternatives, seems bad. You want ONE way of acieving the goal. More rules just increases mental load. A major benefit of functional [unix-piping] programming style, is that you don't need to remember the-full-journey: you just need to remember the previous stage's output. Nor do you need to remember several names: the previous outp...

Re: Re: EUREKA Re: Types in Mathematica, a practical example
Hi David, Comments are interlaced in the text below, > -----Original Message----- > From: David Bailey [mailto:dave@Remove_Thisdbailey.co.uk] > Subject: Re: EUREKA Re: Types in Mathematica, a > practical example > > Hello, > > If you want to compute with undefined array elements, why not > use subscript elements such as Subscript[a,1,2]. Hmmm, maybe... Let's see ax := {{Subscript[ax, 1, 1], Subscript[ax, 1, 2]}, {Subscript[ax, 2, 1], Subscript[ax, 2, 2]}} is not a good idea, since evaluation of ax gives an infinite loop. (There are o...

RE: Re: Re: Suggestion: Visualization of complex functions with Mathematica
I'd like to add the ComplexAnalysis package at my web site below: This package contains complex analysis routines and complex graphics routines. There are routines that convert the regular 2D Graphics into equivalent complex forms. For example ComplexLine[{z1,z2,z3...}] takes complex numbers for the point coordinates. There are routines for producing one or two panel plots or animations of complex functions. Each panel may be one of the following plot types. 1) Cartesian/PolarSurface - Plots the surface s[f[z]] where f is a complex function and s is a real function. 2) Cartesian...

Re: Re: function of a function
On 30 Nov 2005, at 14:07, Narasimham wrote: > Jens-Peer Kuska wrote: > >> it can't work because f [0] ==1 given in your differential equation >> f ' [0]==f [1] and NDSolve[] can't find the value for >> f[1] until it has integrated the equation. > > ??? > >> The nested dependence is equivalent to an infinite >> system of ordinary differential equations and it seems to be >> hard to do this by a finte computer. > > I cannot understand this. In the following two examples the first one > works, not the second...

Re: Defining a function using common notation for absolute value (not Abs[x]) #4
On 9/28/10 at 6:06 AM, accardi@accardi.com (Gianni) wrote: >I am trying to display the absolute value exponent in the second >function definition above in the way students will see it in a >standard math text (with the vertical bars, not Abs, like in the >first text line). The first definition above is without error >(exponent shown as -Abs[x]). I know how I can create a function using Abs where the notebook will look like I used two vertical bars to create the Abs function. Basically, I can do this by making use of Traditional form to get the desired result in an ...

Re: functionality of the in(xxx:xxx) function #4
On Thu, 15 Jun 2006 08:35:46 -0700, Choate, Paul@DDS <pchoate@DDS.CA.GOV> wrote: >Jon- > >then mailid = 21 and lettertextid = 'LA2'; > >should be two separate statements > >then do; >mailid = 21; >lettertextid = 'LA2'; >end; And there was probably a clue in Jonathan's log: NOTE: Variable lettertextid is uninitialized. The code was syntactically OK. The statement mailid = 20 and lettertextid = 'LA1'; or mailid = ( 20 and lettertextid = 'LA1' ); will first compare the variable LETTERTEXTID to the literal &qu...

RE: Re: scaled complementary error function in Mathematica?
It would seem that by the time Exp[x^2]*Erfc[x] runs into exponent trouble, that the approximation 1/(x Sqrt[Pi]) would be sufficiently accurate for most numeric calculations. Thus, you might form a function like scaledErfc[ x_ ] := If[ x < 25000, Exp[x^2]*Erfc[x] , 1/(x Sqrt[Pi]) ] -----Original Message----- From: Peter Pein [mailto:petsie@dordos.net] Subject: Re: scaled complementary error function in Mathematica? Tanim Islam schrieb: > Hi: > > I was wondering if anyone had a package or notebook file that computes > the scaled complementary error functi...

Re: EUREKA Re: Types in Mathematica, a practical example
I forgot one thing: how to deal with your original problem. In[1]:= a=Array[Unique[a]&,{2,2}] Out[1]= {{a$17,a$18},{a$19,a$20}} In[2]:= a-x/.Flatten[Thread/@Thread[a->x]] Out[2]= {{0,0},{0,0}} Seems to me a little simpler than with the HoldForm approach. Andrzej On 17 Dec 2005, at 13:48, Andrzej Kozlowski wrote: > If you feel really want do it in this sor of way, I suggest the > following approach: > > > x=Array[Unique[x]&,{2,2}] > > > {{x$23,x$24},{x$25,x$26}} > > etc. > > I think in this way you get...

Re: Re: Output display of exponential function in Mathematica
Log[1/E^.5] -0.5 Log[1/E^-.5] � .5 True Refine[1/E^x, 0<x<1] E^-x Or if you need to, Refine[Log[1/E^x], 0<x<1] -x Kris -------------- Original message -------------- > On Sun, 27 Nov 2005 08:24:53 +0000 (UTC), Bob Hanlon > wrote: > > >The output that you want is "unstable", i.e., Mathematica automatically > >converts it. > > > > Thanks. > > I have another question if you don't mind. > > I'm trying to just check and see if I got a whole bunch of > even-numbered study exercises r...

Web resources about - Re: Chained-functional notation examples? #4 - comp.soft-sys.math.mathematica

Resources last updated: 1/26/2016 11:04:12 PM