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
package sdl | |
func c_SDL_Init(flags uint32) int __asm__ ("SDL_Init"); | |
func c_SDL_SetVideoMode(width, height, bpp int, flags uint32) *Surface __asm__("SDL_SetVideoMode"); | |
func c_SDL_Delay(ms uint32) __asm__ ("SDL_Delay"); | |
func c_SDL_Quit() __asm__ ("SDL_Quit"); | |
func c_SDL_UpperBlit(src *Surface, srcrect *Rect, dst *Surface, dstrect *Rect) int __asm__ ("SDL_UpperBlit"); | |
func c_SDL_Flip(screen *Surface) int __asm__ ("SDL_Flip"); | |
func c_SDL_FreeSurface(surface *Surface) __asm__ ("SDL_FreeSurface"); | |
func c_SDL_LoadBMP_RW(src *RWops, freesrc int) *Surface __asm__ ("SDL_LoadBMP_RW"); |
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
package sdl | |
// #include "SDL/SDL.h" | |
// #include "SDL/SDL_image.h" | |
import "C" | |
import ( | |
"unsafe" | |
) |
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
package main | |
import ( | |
"fmt" | |
) | |
type foo struct { | |
b int | |
c int | |
} |
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
cirno@perfect-math-class ~/sources/gollvm $ make | |
CGOPKGPATH= cgo -- `llvm-config --cflags` core.go executionengine.go target.go transforms_scalar.go transforms_ipo.go analysis.go bitwriter.go | |
error: 'LLVMInitializeCppBackendTargetInfo' undeclared (first use in this function) | |
error: (Each undeclared identifier is reported only once | |
error: 'LLVMInitializeARMTargetInfo' undeclared (first use in this function) | |
error: 'LLVMInitializeCellSPUTarget' undeclared (first use in this function) | |
error: 'LLVMInitializePowerPCTargetInfo' undeclared (first use in this function) | |
error: 'LLVMInitializeCBackendTargetInfo' undeclared (first use in this function) | |
error: 'LLVMInitializeAlphaTargetInfo' undeclared (first use in this function) | |
error: 'LLVMInitializeMBlazeTargetInfo' undeclared (first use in this function) |
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
package main | |
import "fmt" | |
func main() { | |
var x byte | |
for { | |
fmt.Scan("%c", &x) | |
fmt.Printf("\nGot: '%c'\n", x) | |
} |
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 ac-go-candidates () | |
(ac-go-autocomplete)) | |
(defvar ac-source-go | |
'((candidates . ac-go-candidates) | |
(prefix . "\\.\\(.*\\)") | |
(requires . 0))) | |
(defun ac-go-get-candidate-strings (tmpbuf) | |
(split-string (with-current-buffer tmpbuf (buffer-string)) "\n")) |
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
entity2order :: Ant -> Point -> [Order] | |
entity2order a food = let xant = snd.point $ a | |
yant = fst.point $ a | |
xfood = snd food | |
yfood = fst food | |
in case compare xant xfood of | |
GT -> map (Order a) (directionClockWise West) | |
LT -> map (Order a) (directionClockWise East) | |
EQ -> case compare yant yfood of | |
GT -> map (Order a) (directionClockWise North) |
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
diff -Naur unity-2d.orig//unity-2d-4.12.0/launcher/app/launcherview.cpp unity-2d/unity-2d-4.12.0/launcher/app/launcherview.cpp | |
--- unity-2d.orig//unity-2d-4.12.0/launcher/app/launcherview.cpp 2011-09-29 18:12:44.000000000 +0400 | |
+++ unity-2d/unity-2d-4.12.0/launcher/app/launcherview.cpp 2011-11-09 23:00:07.008801565 +0400 | |
@@ -164,7 +164,7 @@ | |
/* If the key is released, and was not being held, it means that the user just | |
performed a "tap". Unless we're told to ignore that tap, that is. */ | |
if (!m_superKeyHeld && !m_superPressIgnored) { | |
- Q_EMIT superKeyTapped(); | |
+ //Q_EMIT superKeyTapped(); | |
} |
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
def index | |
@rooms = Room.includes :user | |
result = [] | |
@rooms.each do |room| | |
el1 = {} | |
el2 = {} | |
Room.column_names.each { |col| el1[col] = room.send col } | |
User.column_names.each { |col| el2[col] = room.user.send col } | |
result << el1.merge(user: el2) |
OlderNewer