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 ...'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...'^=' and '~='?
What is the difference between '^=' and '~='?
...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...difference between ',' and 'a,'
Small question. In gforth is there a difference between the words ',' and 'a,'?
I'm thinking not, so perhaps another question, why have both ',' and 'a,'?
Should be the same, in gforth:
here cell allot ! ; ok
here cell allot ! ; ok
On Friday, January 9, 2015 at 5:46:04 AM UTC-8, beeflo wrote:
> Small question. In gforth is there a difference between the words ',' and 'a,'?
> I'm thinking not, so perhaps another question, why have both ',' and 'a,'...Difference between 'is' and '=='
Hey guys, this maybe a stupid question, but I can't seem to find the
result anywhere online. When is the right time to use 'is' and when
should we use '=='?
>Hey guys, this maybe a stupid question, but I can't seem to find the
>result anywhere online. When is the right time to use 'is' and when
>should we use '=='?
> Hey guys, this maybe a stupid question, but I can't seem to find the
> result anywhere online. When is the right time to ...'''''''''''''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...calling '!' or 'system' in matlab different than same functions from shell
When I am in the shell (tcsh) on my Mac (outside Matlab), I am able to
use the command line utility ncdump to read netcdf format files
ncdump -h testfile.nc
However, in Matlab, the same command preceded by the '!' (or using
'system') generates an error:
>> !ncdump -h test.nc
dyld: Library not loaded: /opt/local/lib/libnetcdf.7.dylib
Referenced from: /opt/local/bin/ncdump
Reason: Incompatible library version: ncdump requires version 10.0.0
or later, but libnetcdf.7.dylib provides version ...'''''''''''''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...if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.') Any shorter ?
I'm just curious if it ever dawned on anybody how to abbreviate this
if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in
Clinical Programmer Analyst
678 336 4328
no brain no pain
if not (str_mo in ('','.') or str_da in ('','.') or str_yy in
if not (missing(str_mo) or missing(str_da) or missing(str_yy))
On 22 Oct 03 21:13:37 GMT, ikurbeko@ATHER...difference between 'start' and 'preview' function
what is the difference between 'start function' and 'preview function' in image aquitition toolbox?
eg. start(vid); and preview(vid);
...Error while obtaining sizes from MEX S-function 'forward' in block 'dummy/Dynamic_Model/S-Function'. MATLAB error message:.
Hi to everybody,
I created the file forward.dll using the command:
mex -DWIN32 -output forward model_d.c model_s.c sdlib.c assigns.c contact.c
derivs.c gmc.c impact.c inits.c invert.c lcp_solver.c lmdif_c.c mathtools.c
object.c output.c pipetools.c readmuscles.c readtools.c sdfor.c
spring_based.c wrapping.c gcvspl.c user_def.lib forward.lib acpp.lib
qhull.lib solid.lib wrap.lib
I need to run the command:
name','forward','parameters',',,,,,,[1 0 0 0 20],');
...What's the difference between 'upfirdn' and 'conv' ?
Hello to everyone,
I try to figure out what's the difference between upfirdn and conv regarding the convolution operation.
I pass a signal through a bank filter 32-channel filter bank. I have two method for computing the output signal at the analysis filter bank.
I can use the upfirdn command like this :
H_analysis is my analysis filter bank.
Otherwise I can compute the output signal like this :
It should be the same operation, but why do I have different le...What's the difference between 'close' and 'delete'?
As you know, close(h) and delete(h) both methods can close figure
window, when h is a handle of a figure. What's the difference between
the two methods?
"Damayi" <email@example.com> wrote in message
> Dear all
> As you know, close(h) and delete(h) both methods can close figure
> window, when h is a handle of a figure. What's the difference between
> the two methods?
CLOSE calls the function specified in the CloseRequestFcn property of the