cdr

What does “my other car is a cdr” mean?

≯℡__Kan透↙ 提交于 2019-12-03 04:39:13
问题 Can anyone well versed in lisp explain this joke to me? I've done some reading on functional programming languages and know that CAR/CDR mean Contents of Address/Decrement Register but I still don't really understand the humour. 回答1: In Lisp, a linked list element is called a CONS. It is a data structure with two elements, called the CAR and the CDR for historical reasons. (Some Common Lisp programmers prefer to refer to them using the FIRST and REST functions, while others like CAR and CDR

How to make an external database query iterable?

匿名 (未验证) 提交于 2019-12-03 00:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have the following code: settings.py DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'tectcom', 'USER': 'test', 'PASSWORD': '***146***', 'HOST': '', 'PORT': '', }, 'cdr': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'ast', 'USER': '123', 'PASSWORD': '654', 'HOST': '', 'PORT': '', } views.py def cdr_user(request): cursor = connections['cdr'].cursor() calls = cursor.execute('SELECT * FROM cdr') return render_to_response("cdr_user.html", {'result':calls }, context_instance=RequestContext(request)) cdr_user.html {%

mysql query - peak concurrent calls CDR data

人盡茶涼 提交于 2019-12-01 08:07:05
Hi I need help working out how to calculate how many peak concurrent calls I have in a day from my CDR date stored in MySQL. The data set looks like this: INSERT INTO `cdr` (`calldate`, `clid`, `src`, `dst`, `dcontext`, `channel`, `dstchannel`, `lastapp`, `lastdata`, `duration`, `billsec`, `disposition`, `amaflags`, `accountcode`, `uniqueid`, `userfield`) VALUES I can user the following query to calculate how many entries there are for each unique date. SELECT COUNT(1) AS entries, date(calldate) AS DATE FROM `cdr` GROUP BY DATE (calldate) LIMIT 0 , 1000 However this only tells me the