Questions tagged [cdr]

cdr (/ˈkʌdər/ or /ˈkʊdər/) is primitive operation on cons cells (or "non-atomic S-expressions") introduced in the Lisp programming language.

cdr (/ˈkʌdər/ or /ˈkʊdər/) is primitive operation on cons cells (or "non-atomic S-expressions") introduced in the Lisp programming language. A cons cell is composed of two pointers; The cdr operation extracts the second pointer.

Thus, the expression (cdr (cons x y)) evaluates to y.

For Compact Disc Recordable, use instead.

Source: Wikipedia

103 questions
1
vote
1 answer

Write a function that behaves like car, cadr, caddr etc

I'm new to lisp (i'm experimenting with sbcl and ccl), i came across the use of car and cdr that can be chained arbitrarily within a single function call like (caddr). I was wandering how one would write functions that behave like this... Say for…
Bandoos
  • 93
  • 6
1
vote
1 answer

Distinguish between CANCELLED and NOANSWERED calls in asterisk 11

I have configured Asterisk CDR system to log cdr records in the database (using Elastix 2.5). Now I want to determine which call was cancelled by the caller and which one was not answered by the callee. I have seen in the Asterisk CDR Wiki page that…
T.Sh
  • 390
  • 2
  • 16
1
vote
1 answer

car/cdr arguments are lists... right?

I made a list of lists of strings called chatbot in Scheme. Every list element in chatbot have strings. I'm trying to classify these strings using different lists, and these lists are all stored in a big list called chatbot. (sorry for…
Charles
  • 25
  • 5
1
vote
0 answers

Java ASN.1 Parser - how to decode information against defined structure

I try to do a simple asn1 parser using bouncy castle library. I got 3 files - 2 scheme (or sequnce) and BAR file. Firstly i try to read a schema from files and next to use BER file to decrypt. CDR-HLR.asn : CDR-HLR-Version3 DEFINITIONS IMPLICIT TAGS…
Błażej Rejnowski
  • 239
  • 1
  • 2
  • 8
1
vote
1 answer

Scheme pair construction

I am trying to understand pair construction and representation. Let's take a look at the following results: (length (cons '(a b) '(d e f))) => 4 Now let's switch the order: (length (cons '(d e f) '(a b))) => 3 but (length (car (cons '(d e f) '(a…
David
  • 733
  • 2
  • 11
  • 30
1
vote
5 answers

scheme getting the last element in a list

Im very new to scheme and the ideas of car, cdr, etc. I have this function to return the last element of a list, but right now it just returns an empty list. (define (last mylist) (if (list? mylist) (if (null? mylist) …
1
vote
1 answer

How to get correct billsec when originated call in asterisk?

I want to implement call back feature using asterisk pbx. What I need is - to call one external number (XXXXXXXX) - and on ANSWER call another external number (YYYYYYYY), bridge them and rate both calls by using billsec column from CDR table. I…
Ilie Soltanici
  • 377
  • 2
  • 16
1
vote
0 answers

LcsCDR linking data to say it's one call

I have currently been given a task in work to link data in the LcsCDR SessionDetails table. I'm using SSMS to do this. Currently I have to create a excel report of all the calls that happen the previous day, but there is no linking this data. It…
CiaraNolan
  • 11
  • 3
1
vote
2 answers

multiplying list of items by a certain number 'x'

How would you write a procedure that multiplies each element of the list with a given number (x).If I give a list '(1 2 3) and x=3, the procedure should return (3 6 9) My try: (define (mul-list list x) (if (null? list) 1 (list(* x (car…
mike
  • 49
  • 1
  • 8
1
vote
1 answer

Elm how to update head of list

I am trying to program small time tracking application, where I write what I do, and it just logs it. I successfully implemented adding entries to log, but now, I want to update last log entry with duration (for example when I started programming at…
Bunyk
  • 7,635
  • 8
  • 47
  • 79
1
vote
1 answer

Unknown user error when trying to set up replication with informix

I am on a linux system, logged in as the informix user. I have the following environment variables set: INFORMIXDIR=/opt/IBM/informix INFORMIXSQLHOSTS=/opt/IBM/informix/etc/sqlhosts.mydb INFORMIXSERVER=rep_0 The contents of sqlhosts.mydb are as…
fredley
  • 32,953
  • 42
  • 145
  • 236
1
vote
3 answers

Bouncy Castle example for encoding CDR

I am trying to encode PGWRecord CDR using ASN.1 notation, starting on page 89 in this 3GPP TS Document I've been looking for awhile for examples how I can do this, but to no avail. Are there any examples that can show me how to do this using Bouncy…
user3499505
  • 21
  • 1
  • 2
  • 3
1
vote
1 answer

Recursive function not working '"Wrong type argument in procedure car"

I am writing a recursive function that takes an element A and a list L and returns a list equal to L, but with every occurrence of A removed. Here is what I've written: (define (remove A L) (cond ( (eq? A (car L)) (remove A (cdr L)) ) …
KOB
  • 4,084
  • 9
  • 44
  • 88
1
vote
1 answer

How to design a real time charging system together with spark and nosql databases

I would like to design a system that Will be reading CDR (call data records) files and inserts them into a nosql database. To achieve this spark streaming with Cassandra as nosql looks promising as the files will keep coming Will be able to…
fatih tekin
  • 959
  • 10
  • 21
1
vote
3 answers

Longest Prefix between two MySQL Tables

I have a MySQL database with 2 tables: Table A: Number Location Table B: Calling Code Area Code Location Initially, I have about 60,000 entries in table A, which has the Location column empty at the beginning. In table B I have about 250,000+…
Benjamin Vison
  • 469
  • 9
  • 20