Skip to content

Instantly share code, notes, and snippets.

(defun arno/update-eclipse ()
(interactive)
(thread-last (eclim/project-list)
;; Get names from project list
(mapcar (lambda (p) (assoc-default 'name p)))
;; Remove unused projects to prevent eclipse from reopening them
(remove-if (lambda (s) (or (equal s "GantrySync") (equal s "SvgUtil"))))
;; Refresh the remaining projects
(eclim-project-refresh)))
(defun arno/update-eclipse ()
(interactive)
(thread-last (eclim/project-list)
; Get names from project list
(mapcar (lambda (p) (assoc-default 'name p)))
; Remove unused projects to prevent eclipse from reopening them
(remove-if (lambda (s) (or (equal s "GantrySync") (equal s "SvgUtil"))))
; Refresh the remaining projects
(eclim-project-refresh)))
(defmacro not-equal (&rest rest)
(let ((form '())
(prev (pop rest)))
(while rest
(dolist (cur rest)
(push `(/= ,prev ,cur) form))
(setf prev (pop rest)))
`(or ,@form)))
(defun calculate-row (triangle row)
(assert (< row (1- (length triangle))) t)
(let* ((toprow (aref triangle row))
(botrow (aref triangle (1+ row)))
(sumvec (make-vector (length toprow) 0)))
(dotimes (i (length toprow))
(setf (aref sumvec i) (max (+ (aref toprow i) (aref botrow i))
(+ (aref toprow i) (aref botrow (1+ i))))))
sumvec))
(setf triangle
[[75]
[95 64]
[17 47 82]
[18 35 87 10]
[20 04 82 47 65]
[19 01 23 75 03 34]
[88 02 77 73 07 63 67]
[99 65 04 28 06 16 70 92]
[41 41 26 56 83 40 80 70 33]
;; Binary tree
(cl-defstruct tree
(left nil)
(right nil)
(value nil)
(comparator #'<))
(cl-defun tree-insert (tree val &optional (comparator #'<))
(cond
In modern embedded systems, energy efficiency is one of the most important
design aspects. As there is only limited energy available per battery-life
cycle, the amount of computation that can be performed is heavily constrained.
General purpose processors provide high programmability at a high level of
abstraction, but this comes at a cost of lower performance, lower energy
efficiency or both.
In contrast, Application Specific Integrated Circuits (\textsc{ASIC}s) can offer
high performance at a high energy efficiency, but the operations performed by an
ASIC are fixed in hardware so flexibility is lacking. Since time-to-market is
include "globals.mzn";
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Model Settings
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Upper bound on #cycles
int: N = 5;
% B = array3d(1..10, 1..1, 1..1, [false, false, false, false, false, false, false, false, true, true]);
B:
false
false
false
false
% B = array3d(1..10, 1..1, 1..1, [false, true, false, false, false, false, false, false, false, false]);
B:
false
true
false
false