f



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 +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:24 AM
comp.soft-sys.math.mathematica 28821 articles. 0 followers. Follow

0 Replies
853 Views

Similar Articles

[PageSpeed] 10

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? #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: 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? #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 +0...

Re: Re: Output display of exponential function in Mathematica #3
To get the 'double struck small e' type esc e e esc, or click it off the palette. In any case, it is not the Latin small case e. David Park djmp@earthlink.net http://home.earthlink.net/~djmp/ From: New Guy [mailto:NewGuy@yahoo.com] On Fri, 2 Dec 2005 11:05:41 +0000 (UTC), Jean-Marc Gulliet <jeanmarc.gulliet@gmail.com> wrote: >Now, the base of the natural logarithm is written E (capital e). Beg to differ here. The BasicInput.nb palette uses the small 'e' that is kind of double-struck. Bookreader ...

Re: Fyi, Listing of Mathematica 7 functions (1869 functions) #3
Ok, Final tally is completed. I get 2559 functions in Mathematica 7 (Kernel and AddOns) 1920 functions in the kernel, and the rest in the AddOns packages. A table showing each context and which functions in it is now on my page below http://12000.org/my_notes/compare_mathematica/index.htm in the version 7.0 row, look for the column before last. Determining which are the functions in the packages was bit more tricky since the InformationSytanx[] can't be used there. So had to do it the old way, i.e. get the usage information for each symbol and parse it out lookin...

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: Mathematica Collect function #3
> Many thanks to all who have responded to my question. > The question I posted was actually a smaller section of what I had > originally planned on asking. I was hoping to use what I had learnt > from your answers and apply it to a larger problem but I haven't had > much success. > > What I want is to go from expression1: > -((P10 P20 P30)/Sqrt[2]) + (i P10 P20 P30)/Sqrt[2] - i P11 P20 P30 + > i P10 P21 P30 + (P11 P21 P30)/Sqrt[2] - (i P11 P21 P30)/Sqrt[2] - > P10 P20 P31 - (P11 P20 P31)/Sqrt[2] - (i P11 P20 P31)/Sqrt[2] + ( > P10 P21 P31)/Sqr...

Re: Types in Mathematica, a practical example #3
This letter contains answers to , .. It has taken some time. Hi Andrzej, Comments are interlaced in the text below > -----Original Message----- > From: Andrzej Kozlowski [mailto:akoz@mimuw.edu.pl] > Subject: Types in Mathematica, a > practical example > > > On 8 Dec 2005, at 22:11, Ingolf Dahl wrote: > > > I feel it as a round-about way to solve the problem. > > Andrzej Kozlowski, who suggests such a solution, thinks that I am > > looking at Mathematica from the wrong view point. It is my strong > > belief that one s...

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: 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: Evaluation of boolean functions in Mathematica 8 #3
Thank you Bob for the excellent suggestions. I've never used Grid before, so I got side-tracked on learning about this function. I know there are many variations one can do along this theme. So, here's a variation that incorporated some of your ideas. I added a column that attempts to find a simpler version if it finds one. What is considered simpler is of course subjective, so this is only an attempt. :>) // ===== Main Function ===== TruthTable[equ_,steps_List:{}]:=Module[{v,data,min,hdg}, v = BooleanVariables[equ]; AppendTo[v,{steps,equ}]; (* If shorter versi...

Re: How to convert the expression 3*x to a function in Mathematica?
> In doing a program in Mathematica that receives an > expression called f and converts it to a function. > However the command Function[x,f] doesn't work, what > do I do? > In[1]:= f = 3 x; In[2]:= g = Function[x, f // Evaluate] Out[2]= Function[x, 3 x] ...

Re: Output display of exponential function in Mathematica #3
On 12/4/05 at 5:57 AM, NewGuy@yahoo.com (New Guy) wrote: >On Fri, 2 Dec 2005 11:05:41 +0000 (UTC), Jean-Marc Gulliet ><jeanmarc.gulliet@gmail.com> wrote: >>Now, the base of the natural logarithm is written E (capital e). >Beg to differ here. The BasicInput.nb palette uses the small 'e' >that is kind of double-struck. The BasicInput palette displays the constants Pi and E in TraditionalForm. If you type E//TraditionalForm into an empty cell, the corresponding output cell will be the same character you get after clicking the entry button on...

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

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