This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/adolfo/.xmonad/xmonad-i386-linux: executeFile: does not exist (No such file or directory) | |
X Error of failed request: BadAccess (attempt to access private resource denied) | |
Major opcode of failed request: 2 (X_ChangeWindowAttributes) | |
Serial number of failed request: 7 | |
Current serial number in output stream: 8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <iostream> | |
#include <cstdio> | |
#include <GL/glut.h> | |
using namespace std; | |
int x1,x2,y1,y2 = 0; | |
void drawLine ( int x1 , int y1 , int x2 , int y2 ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// robot.c: Adaptado de OpenGL Programming Guide (Neider, Davis, Woo) | |
#include <GL/glut.h> | |
#include <stdio.h> | |
GLfloat angle, fAspect; | |
static int shouldery = 0, shoulder = 0, elbow = 0,wrist=0,finger1 = 0,finger2 = 0; | |
GLfloat ambient[] = { 0.0, 0.0, 0.0, 1.0 }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Post = Post { title :: String , author :: User , comments :: [Comments], votes :: Int } | |
data User = User { nickName :: String, email :: String } -- Any other relevant info ? | |
data Comments = Comment {author :: User, body :: String } -- " " " " ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun google-region (beg end) | |
"Google the selected region." | |
(interactive "r") | |
(browse-url (concat "http://www.google.com/search?ie=utf-8&oe=utf-8&q=" (buffer-substring beg end)))) | |
(defun translate-region (beg end) | |
"Show the translation of the selected word." | |
(interactive "r") | |
(browse-url (concat "http://www.wordreference.com/es/translation.asp?tranword=" (buffer-substring beg end)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BuildList r where | |
type Build r | |
build' :: [Build r] -> Build r -> r | |
instance BuildList [a] where | |
type Build [a] = a | |
build' l x = reverse $ x:l | |
instance BuildList r => BuildList (a-> r) where | |
type Build (a -> r) = Build r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;Full screen | |
(defun toggle-fullscreen () | |
(interactive) | |
(set-frame-parameter nil 'fullscreen (if (frame-parameter nil 'fullscreen) | |
nil | |
'fullboth))) | |
(global-set-key [(meta return)] 'toggle-fullscreen) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun google-region (beg end) | |
"Google the selected region." | |
(interactive "r") | |
(browse-url (concat "http://www.google.com/search?ie=utf-8&oe=utf-8&q=" (buffer-substring beg end)))) | |
(defun translate-region (beg end) | |
"Show the translation of the selected word." | |
(interactive "r") | |
(browse-url (concat "http://www.wordreference.com/es/translation.asp?tranword=" (buffer-substring beg end)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; hiding toolbar menubar scrollbar | |
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) | |
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) | |
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails assumes that a join table is named after the two tables it joins (with the | |
names in alphabetical order). Rails will automatically find the join table cat- | |
egories_products linking categories and products. If you used some other name, | |
you’ll need to add a :foreign_key declaration so Rails can find it. We describe | |
this in Section 19.3, belongs_to and has_xxx Declarations, on page 362. | |
Note that our join table does not need an id column for a primary key, because | |
the combination of product and category id is unique. We stopped the migra- | |
tion from automatically adding the id column by specifying :id => false. We then | |
created two indices on the join table. The first, composite index actually serves |