Hi I would like to mention that i know "ls" and "find" to traverse a directory structure recursive. The goal is to get into each directory and list each directory WITHOUT using find or ls recursive! So somehow a find rewritten in shell code. Example: Directory structure looks like ../1/2/3/ ../1/3/3/ ../2/3/1/ ../2/3/2/ The result should look like 1 1/2 1/2/3 1/3 1/3/3 2 2/3 2/3/1 2/3/2 Script cd /tmp mkdir -p ./1/2/3/ ./1/3/3/ ./2/3/1/ ./2/3/2/ cd - cat lsr.sh #!/usr/bin/ksh f_lsr() { cd $1 for dir in $( find . ! -name . -type d -prune ) ; do echo "$PWD/$dir" f_lsr $PWD/$dir done } f_lsr /tmp/ The result is /tmp/./1 /tmp/1/./2 /1/2/./3 /tmp/1/2/3/./3 .... /tmp/1/2/3/./3: [No such file or directory] /tmp/1/2/3/./2 .... /tmp/1/2/3/./2: [No such file or directory] Any hints ? tia Hajo In article <c4478dea-6eef-4281-b657-bd090bcd6d97@u16g2000yqb.googlegroups.com>, Hajo Ehlers <service@metamodul.com> wrote: > Hi > I would like to mention that i know "ls" and "find" to traverse a > directory structure recursive. > > The goal is to get into each directory and list each directory WITHOUT > using find or ls recursive! > So somehow a find rewritten in shell code. > > Example: > Directory structure looks like > > ./1/2/3/ > ./1/3/3/ > ./2/3/1/ > ./2/3/2/ > > The ...

Hi, As recommended by others, you should use CForm. I've appended to this message a function that I use to make minor alterations in the output of CForm, such as Power -> pow, to yield a more standard form in C++. I hope it helps. Tom Burton On 11/5/03 6:17 AM, in article bob7qo$qu1$1@smc.vnet.net, "Nathan Moore" <nmoore@physics.umn.edu> wrote: > I've composed a large list of functions in Mathematica that I'd like to > have a c function evaluate. To my knowledge c and C++ reject the > convention x^2 and prefer either x*x or pow(x,2). ...

small correction: ref (me) > This function takes as input the row number and the matrix itself and > returns a list that contain the non-zero elements in the that row. > > i.e. function is f[ list , matrix]:=Module[{},.....] > The above should be f[ rowNumber , matrix]:=Module[{},.....] i.e. the function f[] takes as argument a number and the matrix. The number is the row number to process. Nasser ...

Hello. Possibly this is a very simple question. Is there a way to define a function over a (BIG) list of ordered pairs? I mean, suppose that I have a list, created using a Table command or something like that, of the form [{a,b},{c,d},etc.] such that, after naming it f, say, f = [{a,b},{c,d},etc.], then, afterwards, whenever there is a command such that one needs to compute f[a] (or f[c]), the program immediately replaces f[a] by b,and f[c] by d? Thank you. Hi, Joaquim, One way may be like the following. This is a list to play with: lst = Partition[Map[ToExpression, CharacterRange["a", "z"]], 2] {{a, b}, {c, d}, {e, f}, {g, h}, {i, j}, {k, l}, {m, n}, {o, p}, {q, r}, {s, t}, {u, v}, {w, x}, {y, z}} Let us take, for example, o and try with it. Its position is Position[lst, o] {{8, 1}} We only need the position of the corresponding pair: Position[lst, o][[1, 1]] 8 Then the second pair member, p, has the coordinate [[8,2]]: lst[[Position[lst, o][[1, 1]], 2]] p Now we can write a function doing all this: f[lst_, x_] := lst[[Position[lst, x][[1, 1]], 2]] Let us try it: Map[f[lst, #] &, {a, e, i, w}] {b, f, j, x} Have fun, Alexei Alexei BOULBITCH, Dr., habil. IEE S.A. ZAE Weiergewan, 11, rue Edmond Reuter, L-5326 Contern, LUXEMBOURG Office phone : +352-2454-2566 Office fax: +352-2454-3566 mobile phone: +49 151 52 40 66 44 e-mail: alexei.boulbitch@iee.lu ...

I want to make a program to minitor the usages of all of the file systems on my AIX or Linux systems. But I will not use shell commands like "df -k" for some FILE SYSTEMS maybe not mounted and "df -k" will not collect info about that FILE SYSTEM ,so I want to obtain theses info from system calls or lib functions . First I want to list all the FILE SYSTEMS on my OS ,which c function should I use ? Thanks! Tommy <oract666@gmail.com> wrote: > I want to make a program to minitor the usages of all of the file systems on > my AIX or Linux systems. > But I wi...

I want to make a program to minitor the usages of all of the file systems on my AIX or Linux systems. But I will not use shell commands like "df -k" for some FILE SYSTEMS maybe not mounted and "df -k" will not collect info about that FILE SYSTEM ,so I want to obtain theses info from system calls or lib functions . First I want to list all the FILE SYSTEMS on my OS ,which c function should I use ? Thanks! Tommy wrote: > I want to make a program to minitor the usages of all of the file systems on > my AIX or Linux systems. comp.unix.programmer is down the h...

Hello. Possibly this is a very simple question. Is there a way to define a function over a (BIG) list of ordered pairs? I mean, suppose that I have a list, created using a Table command or something like that, of the form [{a,b},{c,d},etc.] such that, after naming it f, say, f = [{a,b},{c,d},etc.], then, afterwards, whenever there is a command such that one needs to compute f[a] (or f[c]), the program immediately replaces f[a] by b,and f[c] by d? Thank you. Hi, Joaquim, One way may be like the following. This is a list to play with: lst = Partition[Map[ToExpression, CharacterRange["a", "z"]], 2] {{a, b}, {c, d}, {e, f}, {g, h}, {i, j}, {k, l}, {m, n}, {o, p}, {q, r}, {s, t}, {u, v}, {w, x}, {y, z}} Let us take, for example, o and try with it. Its position is Position[lst, o] {{8, 1}} We only need the position of the corresponding pair: Position[lst, o][[1, 1]] 8 Then the second pair member, p, has the coordinate [[8,2]]: lst[[Position[lst, o][[1, 1]], 2]] p Now we can write a function doing all this: f[lst_, x_] := lst[[Position[lst, x][[1, 1]], 2]] Let us try it: Map[f[lst, #] &, {a, e, i, w}] {b, f, j, x} Have fun, Alexei Alexei BOULBITCH, Dr., habil. IEE S.A. ZAE Weiergewan, 11, rue Edmond Reuter, L-5326 Contern, LUXEMBOURG Office phone : +352-2454-2566 Office fax: +352-2454-3566 mobile phone: +49 151 52 40 66 44 e-mail: alexei.boulbitch@iee.lu ...

�� �ޭz�manoopkammaran@gmail.com (AK)�n���ʨ��G > Hi > This is quite easy. You don't need 2 for-loops for that. > When you get questions like this, keep in mind that all the elements > need not be put in a single loop. > Some of them maybe formaing a series while others have to be done > seperately. > In your case, the first 10! can be done seperately. The rest forms a > series, as > 10!, (10-1)! > 9!, (9-1)! > ..... > ...... > ......... > 1!,(1-1)! > Since you already have a recursive function to computer the factorial > of a number called fac...

On 3/10/08 at 2:04 AM, petsie@dordos.net (Peter Pein) wrote: >Nasser Abbasi schrieb: >>I have a function which I want to call repeatedly for all rows of a >>matrix to find non-zero elements in each row. This function takes >>as input the row number and the matrix itself and returns a list >>that contain the non-zero elements in the that row. >this is a task for Map: >In[1]:= findNonZeroElements[row_, p_] := >Select[p[[row]], #1 != 0 & ] >mchain[p_] := >(findNonZeroElements[#1, p] & ) /@ Length[p]] >p = {{1, 0, 0, 0, 0}...

Thank you Nat it worked I forgot "OF" inside the Catx function SL On Tue, Sep 1, 2009 at 5:12 PM, Nathaniel Wooding <nathaniel.wooding@dom.com > wrote: > Learner: > > First, remove the space between col and the colon. It should read col: > > Then, an "of" in front of it. > > data learner; > col1='a'; > col2='b'; > col3 = 'c'; > Txdecod = Catx(',',of Col: ); > proc print;run; > > > Nat Wooding > > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] ...

Dear SAS-L-ers, Rathindronath posted the following: > I need to use a sas dataset that is located in a different > unix directory (I am also using unix sas). How can I get that > dataset from a different unix directory to merge it with a > dataset that is in my present working directory. Thanks > Rathindronath, without meaning to hurt your feelings: This seems like such a basic question, that I am not sure whether you have not phrased it correctly, I just don't get it, or it is really a basic question. No matter what the situation, I so vow that you shall not leave this...

Chris, If one wants to do parallel operations on the elements of two equal length lists, and then do something with the resulting outputs, the magic command is Inner. For example, to add the elements of the two lists and then leave them in a list (not what you want)... Inner[Plus, {1, 2, 3}, {4, 5, 6}, List] {5, 7, 9} To get what you want use... Inner[Plus, {1, 2, 3}, {4, 5, 6}, Plus] 21 If you wanted to take 2 times the element in the first list and add it to the square of the corresponding element in the second list and then multiply the results, you could use... Inner[2#1 + #2^2 &, {1, 2, 3}, {4, 5, 6}, Times] 21924 For some reason it took me a long time to get a simple understanding of the Inner command. Basically it is a way to make a parallel combination of the elements of two equal length lists and then do something with the results. David Park djmp@earthlink.net http://home.earthlink.net/~djmp/ From: Chris Rozell [mailto:crozell@rice.edu] I have basic experience with Mathematica, but this problem has stumped me for the last day or so. Any help would be appreciated. I have a function that needs to take two lists as arguments, perform operations on them, and then sum the resulting list. However, by including the Plus function, it operates on each list item separately (which is exactly the opposite of what I need. For a simple example, >myfunc[x_, y_] = Apply[Plus, x + y]; >myfunc[{1, 2, 3}, {4, 5...

Hi, I want to get inputs from you all, if below task can be done through batch scripting or VB scripting. I have a unix script currently running on Sun Solaris (SunOS 5.10 Generic_142900-15 sun4u sparc SUNW,Sun-Fire-V440). This script takes directory name as input and searches for some patterns (both Regular expression based and strings) in all files and directories under the passed directory location. My questions are =96 1) Can I use this unix script to search the patterns on windows? Basically I want to pass windows directory location and get the output. 2) If yes, how to go...

Learner: First, remove the space between col and the colon. It should read col: Then, an "of" in front of it. data learner; col1='a'; col2='b'; col3 = 'c'; Txdecod = Catx(',',of Col: ); proc print;run; Nat Wooding -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of SAS_learner Sent: Tuesday, September 01, 2009 8:05 PM To: SAS-L@LISTSERV.UGA.EDU Subject: How to use list of variables inside Catx function ?? Hello all, I am getting list of Txdecod's after transposing data set, Right now I know that ...

> I'm sure that what I want here is extremely simple to do and I'm just > missing a CL function... I'd like to pass the same argument to a list > of functions and apply those results (as a list) to another function -- > at runtime. For example: > > ; Some functions > (setf alpha #'alpha-char-p) > (setf digit #'digit-char-p) > > ; A list of the above functions > (setf functions (list alpha digit)) > > ; Test to see if 'c' is true for any item in the list > (defun is-alpha-numeric (c) > (apply #'or (map...

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. > > Clear[x,f,EQ]; > EQ={f'[x] == f[Cos[x]],f[0]== 1}; > NDSolve[EQ,f,{x,0,4}]; > f[x_]=f[x]/.First[%]; > Plot[f[x],{x,0,4}]; > > Clear[x,f,EQ]; > EQ={f'[x] == Cos[f[x]],f[0]== 1}; > NDSolve[EQ,f,{x,0,4}]; > f[x_]=f[x]/.First[%]; > Plot[f[x],{x,0,4}]; Surely, you mean the second one works, the first one does not!? Also, I think I agree with Jens. These cases are quite different and the problem he mentione does not arise in the second case. Ine the second case the derivative at a point x is defined only in terms of the value of the function at x. Thus values of the function, it's derivative, function etc, can be computed sequentially. In the first case, however, in order to compute the derivative at x you need to know the value of the function at Cos[x], which in general will not be known yet. This ...

On Thu, 18 May 2006 12:58:47 -0400, Rathindronath <mehedisas@YAHOO.COM> wrote: >I need to use a sas dataset that is located in a different unix directory >(I am also using unix sas). How can I get that dataset from a different >unix directory to merge it with a dataset that is in my present working >directory. >Thanks I am not going to provide a direct answer but I would encourage you to look at the LIBNAME statement in the online doc. This will tell you how to associate a path to a LIBREF to refer to a dataset in a particular location. http://support.sas.com/onlinedoc/...

I think that what you mean is that you have two data sets with an equal = number of rows that you want to merge together, and they match row for = row, but you don't have an ID field on data 1. =20 Try this: data data1; obsnum + 1; run; data data2; obsnum + 1; run; data mergeset; merge data1 data2; by obsnum; run; -Mary ----- Original Message -----=20 From: jn mao=20 To: SAS-L@LISTSERV.UGA.EDU=20 Sent: Wednesday, April 16, 2008 2:27 PM Subject: How to use lookup function to merge data from a standard list = file Hello SAS-Ls, I have a standard list file...

No, the data1 has 100 category and 200 data, var1 has data with fall in 100 category (category). Data2 has 400 subjects. I need to find each subject fall in which category according to var2. Mary <mlhoward@avalon.net> wrote: I think that what you mean is that you have two data sets with an equal number of rows that you want to merge together, and they match row for row, but you don't have an ID field on data 1. Try this: data data1; obsnum + 1; run; data data2; obsnum + 1; run; data mergeset; merge data1 data2; by obsnum; run; -M...

I geez Ill give you the easy version (however id normally do this with a Hash). Proc SQL ; Create Table Need As Select Tbl2.* , Tbl1.Category From Table2 As Tbl2 Left Join Table1 As Tbl1 On Tbl1.Var1 = Tbl2.Var2 ; Quit ; Toby Dunn "Don't bail. The best gold is at the bottom of barrels of crap." Randy Pausch "Be prepared. Luck is where preparation meets opportunity." Randy Pausch > Date: Wed, 16 Apr 2008 12:55:10 -0700 > From: jn_mao@YAHOO.COM > Subject: Re: How to use lookup function to merge data from a standard...

Or just do this: data mergeset; merge data1 data2; run; And avoid some completely unnecessary I/O. On Wed, Apr 16, 2008 at 3:39 PM, Mary <mlhoward@avalon.net> wrote: > I think that what you mean is that you have two data sets with an equal number of rows that you want to merge together, and they match row for row, but you don't have an ID field on data 1. > > Try this: > > data data1; > obsnum + 1; > run; > > data data2; > obsnum + 1; > run; > > data mergeset; > merge data1 data2; > by obsnum; > run; > > -Mary > &...

I see. Let me see if I can guess what your problem is. Data 1 has 100 categories (variables?) and 200 observations. Or, data 1 has a variable (var1) that has 100 different values and 200 observations. Data2 has 400 subjects (400 observations?). I think I don't know enough about var2. On Wed, Apr 16, 2008 at 3:55 PM, jn mao <jn_mao@yahoo.com> wrote: > No, the data1 has 100 category and 200 data, var1 has data with fall in 100 category (category). Data2 has 400 subjects. I need to find each subject fall in which category according to var2. > > > > Mary <mlhoward@a...

jn mao wrote: > Hello SAS-Ls, > > I have a standard list file with 100 category. And I have another > data2 file with all subjects. In data2, var2 need be matched to the > list file, and find the category it belongs. > > data1 (list file): > var1 category > aa 1 > bb 1 > cc 2 > > data2: > Id var2 > 1 aa > 2 cc > 3 bb > > I need add category to data2. When I tried use merge, I lost all ID > data which means all ID data become missing. Could someone help me > to add the categ...

"Richard A. DeVenezia" <rdevenezia@wildblue.net> wrote: jn mao wrote: > Hello SAS-Ls, > > I have a standard list file with 100 category. And I have another > data2 file with all subjects. In data2, var2 need be matched to the > list file, and find the category it belongs. > > data1 (list file): > var1 category > aa 1 > bb 1 > cc 2 > > data2: > Id var2 > 1 aa > 2 cc > 3 bb > > I need add category to data2. When I tried use merge, I lost all ID > data which means all ID data become missing. Could someone help me > to...

Open Directory Project (a.k.a. ODP or dmoz) – The largest directory of the Web. Its open content is mirrored at many sites, including the Google ...

Facebook is now closer than ever to becoming the phone book for the internet. The site recently launched a Directory of people , Pages , and ...

The source for IT industry news, views and analysis across the channel, business and technology

The former royal editor of Rupert Murdoch's now defunct British tabloid the News of the World told a court on Thursday that the late Princess ...

TELSTRA is slashing 800 jobs from its struggling directories arm Sensis just one month after the telco giant sold a 70 per cent stake in the ...

... has decided to stop publishing contact information for all of its departments and agencies in the blue pages section of telephone directories.A ...

Explains how to create and manage files and directories.

Web directories are one of the key points of differentiation between plans on the Exchanges. A single company can offer half a dozen networks ...

... email newsletters, events, print subscription, digital subscription or other special offers. Welcome to Pittsburgh Business Times Local Directories. ...

The Bradenton Herald is your source for Bradenton and Lakewood Ranch directories and guides.

Resources last updated: 3/10/2016 9:22:30 AM