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
0
votes
1 answer

Scheme: "Contract Violation" when trying to compare elements of two lists

I am trying to compare elements in two different lists in scheme, using DrRacket. If m1 is less than m2, I need to return true. Otherwise, return false. I am getting the following error: <: contract violation expected: real? given: (3) …
user2411290
  • 631
  • 2
  • 10
  • 33
0
votes
1 answer

Lisp list manipulation issue

I have this expression , (write (cdr (car' ('(p q) r)))) http://ideone.com/bkZv20 which gives ((P Q)) as the output . I've been scratching my head all day and am still unable to figure out how this works . Doing just the car part gives, (write…
saruftw
  • 1,104
  • 2
  • 14
  • 37
0
votes
1 answer

How would I store a value into read for Scheme? Or is that not even possible?

(define (getFirstFew lst) (cond ((= (read) 0) '()) ;returns nothing (else(cons (car lst)(getFirstFew (cdr lst)(- (read) 1)))))) That is my code above. So i'm trying to write a procedure that will get the first x elements (user gets to choose…
suckypizza
  • 39
  • 1
  • 6
0
votes
0 answers

Parsing CDR from ACME PACKET in Python

I am trying to parse CDR records that are coming from an ACME PACKET SBC. The data for the most part is CSV the issue that I am running into is that there is some odd cases that I am running into and it isn't for every CDR it is only for some of…
0
votes
1 answer

Only one record is stored in MySQL

I configured asterisk on CentOS with storing CDR information in MySQL database but it stores only one record that I added first.
0
votes
1 answer

Elastix - how to insert custom field

I have problem with Elastix 2.5.0. I need to put custom value to custom field in cdr table. At this moment i modified cdr_mysql.conf and add [aliases] and [columns] [columns] alias miasto => miasto [aliases] miasto = miasto I also make custom…
przeqpiciel
  • 328
  • 2
  • 12
0
votes
2 answers

How to save Remote Party ID to CDR in Asterisk?

I'm new to Asterisk so any help will be greatly appreciated. I'm trying to save remote party ID (CONNECTEDLINE) in CDR logs table in transferred calls. In blind transfers there's no problem because I'm getting Remote Party ID as Caller ID in src…
ejuanillo
  • 1
  • 4
0
votes
1 answer

Count and find maximum number in Hadoop using pig

I have a table which contain sample CDR data in that column A and column B having calling person and called person mobile number I need to find whose having maximum number of calls made(column A) and also need to find to which number(column B)…
Anas A
  • 199
  • 4
  • 19
0
votes
2 answers

Asterisk CDR duration difference on DB and h exten

I'm using an AGI script on 'h' extension to compute call cost and save it on CDR(userfield) variable. The problem is I'm getting duration differences between CDR(duration) variable and the value stored on MySQL. Mainly, duration stored on DB is 1 or…
fseratti
  • 35
  • 1
  • 3
0
votes
1 answer

elastix cdr stop working

CDR was working before 19 march. Unfortunately i dont remember what kind of changes i made to configuration, but this exactly not changes to CDR config. elastix 2.4.0 asterisk 11.7.0 mysql 5.0.95 elastix*CLI> cdr show status Call Detail Record…
user3627480
  • 31
  • 1
  • 2
0
votes
1 answer

Scheme - cdr without outer brackets

consider this list: ((3 (1 (2 15) (8 5))) (1 10)), I would like to get its head and body. The procedure "car" works here as I imagine: (car '((3 (1 (2 15) (8 5))) (1 10))) - return its first item (list) (3 (1 (2 15) (8 5))) But procedure "cdr:…
arahusky
  • 71
  • 1
  • 10
0
votes
1 answer

How do I use a pair to find which of two functions will evaluate the largest value? Scheme

Basically there is a pair made up of two functions and the code has to take the pair input x to find the highest evaluation for x and print that evaluation. I receive the error: car: contract violation expected: pair? given: 4 define (max x) …
0
votes
1 answer

Scheme car and cdr recursion

Can someone explain to me how the recursion works in the following function? Specifically, I am interested in what happens when the function reaches its base case. Also, why is a named let used in this code? (I am not familiar with named…
John Friedrich
  • 343
  • 5
  • 21
0
votes
1 answer

Calculate call cost from rate table using MySQL

I am trying to compare call rates between two telephone providers. I have two tables, as follows: CREATE TABLE 18185_rates ( calldate DATE, calltime TIME, calledno VARCHAR(20), duration INTEGER(8), callcost FLOAT(5 , 3 ) ); CREATE TABLE…
btongeorge
  • 421
  • 2
  • 12
  • 23
0
votes
1 answer

From Mac iOS to Linux

I have a CDR file with binary code and code written on Perl to decode CDR file. Now I use Mac, but next week I will start to use Linux. I've never used Linux before. If now I use terminal to decode my files and I use this command: cat…
Ryainad
  • 219
  • 1
  • 5
  • 14