A function with 'and' , 'not' , 'null' , 'car' and 'cdr'
What's this ?
(defun enigma (x)
(and (not (null x))
(or (null (car x))
(enigma (cdr x)))))
"I suppose I should learn Lisp, but it seems so foreign."
- Paul Graham, Nov 1983
On Wed, Oct 07 2015, CAI GENGYANG wrote:
> What's this ?
> (defun enigma (x)
> (and (not (null x))
> (or (null (car x))
> (enigma (cdr x)))))
Bad taste? It returns T if the list X contains nil as an element. It
would be clearer to write (some #'null x).
CAI GENGYANG ...'^=' and '~='?
What is the difference between '^=' and '~='?
...'is not' or '!='
A newbie question to you; what is the difference between statements
if x is not None:
if x != None:
Without any context, which one should be preferred?
IMHO, the latter is more readable.
On 2014-08-18 21:35, ElChino wrote:
> A newbie question to you; what is the difference between statements
> if x is not None:
> if x != None:
> Without any context, which one should be preferred?
> IMHO, the latter is more readable.
"x == y" tells you whether x and y refer to objects that are equal.
"x is y&qu...error: must use '.*' or '->*' to call pointer-to-member function in '__unary_op (...)'
a little compiler error. pls help.
B get(unsigned int i);// return an B object whose state depend on
*this and i
std::vector<unsigned int> ints(n);
get//or &get, *this.*get etc...
unsigned int n;
In function '_OutputIterator std::transform(_InputIterator,
_InputIterator, _OutputIterator, _UnaryOperation) [with _InputIterator
= __gnu_cxx::__normal_ite...i wonder result's difference between 'solve function' and 'circcirc function'
i calculate intersection point between two circles.
first way, i used solve function.
second way, i used circcirc function.
By the way two way result is similar.
but, The result is the same five-digit decimal.
i wonder result's difference between 'solve function' and 'circcirc function'
five-digit decimal. >> five decimal places
On 7/11/14 7:03 AM, 김영재 wrote:
> i wonder result's difference between 'solve function' and 'circcirc function'
solve is much more general. Try finding the intersections between y=x^3
and y=9*x us...'''''''''''''The Running Update/Append Queries Using VBA code Ordeal''''''''''''''
Hello fellow programmers,
I am trying to run an append/update query from code, a command button
on a form initiates the queries.
the format i am using is;
UPDATE/APPEND "field selections"
RecordSource "qryExample" = above text strings"
When i am running a SELECT query in this manner it works fine with no
problems, and accepts the values of specified linked for...Problem with 'sys' & 'frd' function
Im trying to get the Time-Domain Impulse Response from Freq Domain.
For the same am using the frd & sys functions.
Problems while using the same:
1) >> sys = frd(resp,freq,'Hz');
??? Error using ==> lti.set
Property/value pairs must come in even number.
Am using the format given in Help,whats the problem?
2) > impulse(sys)
??? Error using ==> rfinputs
Not supported for Frequency Response Data models.
Says no support. Can someone clarify more on this?
Hope will get some inputs.
The syntax should be
>> sys = frd(resp,...Is there a simple function to generate a list like ['a', 'b', 'c', ... 'z']?
Is there a simple function to generate a list like ['a', 'b', 'c', ...
'z']? The range() just can generate the numeric list.
On Apr 9, 2007, at 3:29 AM, =E4=BA=BA=E8=A8=80=E8=90=BD=E6=97=A5=E6=98=AF=E5=
> Is there a simple function to generate a list like ['a', 'b', 'c', ...
> 'z']? The range() just can generate the numeric list.
> Is there a simple ...'' TriScatteredInterp function not working ?? ''
Dear community, you 've already provided me with lot of knowledge through this website by watching other people's post. Is the first time that i write here and i'd like to ask about the TriScatteredInterp function. I have a bathymetric file (containing x,y coordinates in the first 2 columns and depth values (z) in the 3rd column). I am trying to create a grid so i execute in matlab the script below. My problem is that when i execute the last line -> ZI = F(X,Y); <- ZI values are not equal on size with XI,YI values. Do you know why this is happening ? Any sollutions?
Thank...'Ball' and 'Hole' function
I need to create a simple game whereby a ball has to fall into a
hole. I was told that there was a 'ball' and 'hole' function but can
anyone fill me in on that?
At first sight I discarded your original posting as not being serious.
However, as you take the trouble of reposting your question I now consider
your question as being more serious than I originally thought.
The 'ball' and 'hole' functions mentioned in the first reply do not exist
in matlab, and the original reply is likely to be some kind of joke.
I'll advise you to read (part o...function that ''filters'' a matrix
I want to create a function that take as an input a matrix and
returns that matrix but without the rows that are shown more than one
time...for example input: 1 2 3 4 output: 1 2 3 4
4 3 2 1 4 3 2 1
4 3 2 1 2 1 5 6
1 2 3 4
2 1 5 6
...Difference between 'function' and 'method'
This is a big problem puzzles me for a long time. The core question is:
How to dynamically create methods on a class or an instance?
Let me state it step by step.
a = A()
a.func # gives "bound method", type is "instancemethod"
A.func # gives "unbound method", type is "instancemethod"
gunc # gives "function", type if "function"
# ?? Does this line attach a method to instance? ... I don't think so.
a.gunc = gunc
I found star...Functions 'Imread' and 'Wavread'
i had this constant thought in mind about the C program code
equivalent to the function 'Imread'.
Can visitors and experts give their solution to this?
In article <firstname.lastname@example.orgYaTP>,
Narayana Srinivasan <email@example.com> wrote:
>i had this constant thought in mind about the C program code
>equivalent to the function 'Imread'.
>Can visitors and experts give their solution to this?
Do you need to be able to handle all of the formats of imread()?
CUR and ICO and GIF and HDF4 and PNG and TIFF ??
Some of those are handled by libimg; oth...'''''''''''''The Running Update/Append Queries Using VBA code Ordeal'''''''''''''' #2
Thanks for ur help there HJ.
I know how to do the tasks you specified there.
I would like for the update query to use field values from some of the
fields on the form (frmInvoices) such as InvoiceNumber, DateFrom,
DateTo. My problem is that an append/update query can't find the
values in the open Form (frmInvoices) when I specify them as;
a select query has no problem finding the field values on a form.
Could you post the entire code that you are having trouble with? Now it is
not possible to see what goes wron...