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
int Sphere::hit(Ray ray, vec3& point) | |
{ | |
ray.setOrigin(vec3(getInverseTransform() * vec4(ray.getOrigin(),1))); | |
ray.setDirection(glm::normalize(vec3(getInverseTransform() * vec4(ray.getDirection(),0)))); | |
// R(t) = o + td | |
// (p-c)·(p-c) - r² = 0 => | |
// (o + td - c) · (o + td - c) - r² = 0 => | |
// t²(D·D) + 2t(d · (o - c)) + (o - c) · (o - c) - r² = 0 | |
vec3 m = ray.getOrigin() - m_center; |
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
<Ifmodule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/json | |
</Ifmodule> |
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
<?php | |
Route::get("/test", function(){ | |
return "..."; | |
}); | |
?> |
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
public static String BASE_URI = "https://192.168.1.109/Test/public/index.php/"; | |
//public static String BASE_URI = "http://192.168.1.109/Test/public/index.php/"; | |
public static String API_LOGIN = BASE_URI + "api/v1/login"; | |
public static String GET_RESOURCES = BASE_URI + "resources"; | |
public static String GET_RESOURCE = BASE_URI + "resources/?"; | |
public static String GET_SUB_RESOURCES = BASE_URI + "resources/?/subresources"; | |
public static String GET_SUB_RESOURCE = BASE_URI + "resources/?/subresources/?"; |
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
void CPU::step() | |
{ | |
BYTE instruction = fetch(); | |
registers.pc++; | |
decode(instruction); | |
} | |
BYTE CPU::fetch() | |
{ | |
BYTE instruction = memory->readByte(registers.pc); |
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
memory[0] = 0x06; | |
memory[1] = 0x00; | |
memory[2] = 0x0E; | |
memory[3] = 0x00; | |
memory[4] = 0x16; | |
memory[5] = 0x00; | |
memory[6] = 0x1E; | |
memory[7] = 0x00; | |
memory[8] = 0x26; | |
memory[9] = 0x00; |
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
3E 00 06 03 0E 03 80 0D C2 06 01 06 00 00 00 00 | |
57 01 00 02 3E 45 02 03 3E 6C 02 03 3E 20 02 03 | |
3E 72 02 03 3E 65 02 03 3E 73 02 03 3E 75 02 03 | |
3E 6C 02 03 3E 74 02 03 3E 61 02 03 3E 64 02 03 | |
3E 6F 02 03 3E 20 02 03 3E 65 02 03 3E 73 02 03 | |
3E 3A 02 03 3E 20 02 03 7A C6 30 02 C5 D1 |
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
#include <string.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
void func(char *arg) | |
{ | |
char name[32]; | |
strcpy(name, arg); | |
printf("Bienvenido %s\n", name); | |
} |
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
.code32 | |
.section .text | |
.globl _start | |
_start: | |
jmp truco | |
inicio: | |
pop %esi | |
xorl %eax, %eax | |
movb %al, 0x07(%esi) |
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
section .text | |
global _start | |
_start: | |
jmp truco | |
inicio: | |
pop ESI | |
xor EAX, EAX | |
mov [ESI + 7], AL | |
mov AL, 0Bh |