Skip to content

Instantly share code, notes, and snippets.

View fakedrake's full-sized avatar

Chris Perivolaropoulos fakedrake

View GitHub Profile
@fakedrake
fakedrake / gtags-wrapper.el
Created December 13, 2012 16:34
wraps gtags-find-tag to use imenu if it looks like a better idea
(defun gtags-wrap-find-tag ()
"Just a simple wrapper for gtags-find-tag. This is needed for
ubiquitous exceptions, but it also tries to use imenu before
actually trying to use gtags. This way if we have a single file
project we do not need gtags to jump around. Also we dont need to
regenerate gtags for local symbols."
(interactive)
(let* ((current-token (gtags-current-token))
(imenu-tokens (mapcar (lambda (x) (car x)) (imenu--make-index-alist)))
(def errors '())
(defn push-error
"Push an error"
[error]
(def errors (cons error errors))
nil)

Instruction Set of 8085

Keep in mind that M is the contents of the memory location specified by HL.

Data Transfer

OpcodeOperandDescription
MVI[Rd/M], ImmMove 8-bit immediate
LDAIAddrLoad to 16bit addr to A
xmin = -10;
xmax = 1;
f[x_, a_] = (x + 1) a + (x + 0.7) (x + 0.2)
g[a_] :=
(y = x /. Solve[f[x, a] == 0, x];
pl1 = Graphics[{PointSize[0.02],
Point[Table[{Re[y[[i]]], Im[y[[i]]]}, {i, 1, Length[y]}]]},
Axes -> True, PlotRange -> {{-3, 0}, {-1, 1}}, Frame -> False,
AspectRatio -> 1, AxesOrigin -> {0, 0}];
pl2 = Plot[f[x, a] /. a -> 1, {x, xmin, xmax},
;; Extra keywords
(setq my:elisp-extra-keywords '("and" "interactive" "or" "list" "setq-default" "setq" "setf" "set"))
(font-lock-add-keywords 'emacs-lisp-mode
(mapc '(lambda (kw) (cons kw font-lock-keyword-face)) my:elisp-extra-keywords))
(setq my:elisp-extra-keywords '("and" "interactive" "or" "list" "setq-default" "setq" "setf" "set"))
(font-lock-add-keywords 'emacs-lisp-mode
(mapc '(lambda (kw) (cons (format "\\<[percent]s\\>" kw) font-lock-keyword-face)) my:elisp-extra-keywords))
#include <string.h>
#include <malloc.h>
#define STRING_SIZE 20
#define STUDENT_NUMBER 100000
struct Student {
char lastName[STRING_SIZE];
char firstName[STRING_SIZE];
};
#include <string.h>
#include <malloc.h>
#include <assert.h>
#define STRING_SIZE 20
#define STUDENT_NUMBER 100000
struct Student {
char lastName[STRING_SIZE];
char firstName[STRING_SIZE];
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define STR_SIZE 100
struct studentRecord {
char courseName[STR_SIZE];
float Mark;
struct studentRecord *next;