- Clone repository
git clone https://github.com/raysan5/raylib.git raylib && cd raylib/src
- Compile library to be dynamically linked
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED
- Install library
sudo make install RAYLIB_LIBTYPE=SHARED # Dynamic shared version.
- Set CPATH
export CPATH=/usr/local/lib:/usr/local/include
(Required by compiler to find the shared library) - Compile Source Code
clang -lraylib -o hello hello.c
(Using Basic Window example) - Set LD_LIBRARY_PATH
LD_LIBRARY_PATH=$CPATH
(Required by executable to find the shared library) - Run executable
./hello
This file contains 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
/* | |
BASIC EXAMPLE | |
*/ | |
val hMap0: Map[Int, Int] = Map(1 -> 102, 2 -> 202, 3 -> 302) | |
hMap0.get(100) | |
// What should be the value here? | |
// `100` does not exist in `hMap` | |
/* |
This file contains 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
import cats.effect.IO | |
class Server(http: Http, database: Database) { | |
def process(request: Request): IO[Response] = { | |
val respF = | |
for { | |
creds <- request.getCredentials() | |
authorizedCreds <- authenticateUser(creds) |
This file contains 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
Creative Achievement Questionnaire | |
Shelley Carson | |
Harvard University | |
A. Visual Arts (painting, sculpture) | |
__ 0. I have no training or recognized talent in this area. | |
__1. I have taken lessons in this area. | |
__2. People have commented on my talent in this area. | |
__3. I have wona prize orprizes atajuried artshow. | |
__4. I have had a showing of my work in a gallery. | |
__5. I have sold a piece of my work. |
This file contains 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
import os | |
dirs = ["js", "css", "html"] | |
for _d in dirs: | |
try: | |
os.mkdir("./{}".format(_d)) | |
except: | |
pass |
This file contains 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
import sys | |
import pygame | |
import pprint | |
# Create Main Window | |
window = pygame.display.set_mode((800, 600)) | |
pygame.display.set_caption("Simple Line") | |
# Start PyGame Instance |
This file contains 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
# View | |
class KhinModelView(viewsets.ModelViewSet): | |
model = KhinModel | |
queryset = KhinModel.objects.all() | |
# Endpoint | |
router = router.Router() # I think | |
router.register('/path/to/endpoint', KhinModelView) | |
url = urlpatterns( |
This file contains 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
rsts_set = [set(i) for i in rsts_slist] | |
x = rsts_set[0] | |
for rst in rsts_set: | |
x = rst.intersection(x) | |
y = reduce ( set.intersection, rsts_set) | |
z = rsts_set[0].intersection(*rsts_set[1:]) |
This file contains 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
from itertools import cycle | |
colours = cycle(['Dark','Light']) | |
def get_color_complex(): | |
i = 0 | |
dct = {'Light': [], 'Dark': []} | |
while i<64: | |
if colours.next() == 'Light': | |
dct['Light'].append(i) | |
else: |
NewerOlder