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
<?php | |
$baz='hello!'; | |
?> |
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
<?php | |
//ARRAY IN: | |
$in=array( | |
array('name' => 'john', 'occupation' => 'electrician'), | |
array('name' => 'jack', 'occupation' => 'plumber'), | |
array('name' => 'jake', 'occupation' => 'office rat'), | |
array('name' => 'pete', 'occupation' => 'electrician') | |
); |
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
glBindTexture(GL_TEXTURE_2D,entity->model->texture->texture); | |
glUseProgram(entity->model->texture->shader->program); | |
glBindVertexArray(entity->model->vao); | |
glUniformMatrix4fv(entity->model->texture->shader->m_mvp,1,GL_FALSE,matrix_position(matrix,entity->pos.x,entity->pos.y,0,0,0,0)); | |
glBindVertexArray(0); | |
glUseProgram(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
glActiveTexture(GL_TEXTURE0); | |
glBindTexture(GL_TEXTURE_2D,texture); | |
glUniform1i(uni.texture,0); | |
glUniform1f(uni.seed,1.0/glfwGetTime()); | |
glBindBuffer(GL_ARRAY_BUFFER,vbo); | |
glNormalPointer(GL_FLOAT,sizeof(OOKVertex),(void *)offsetof(OOKVertex,nor)); | |
glVertexPointer(3,GL_FLOAT,sizeof(OOKVertex),(void *)offsetof(OOKVertex,pos)); | |
glTexCoordPointer(2,GL_FLOAT,sizeof(OOKVertex),(void *)offsetof(OOKVertex,tex)); |
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
float coords[16]= | |
{ | |
(float)rect.x,(float)rect.y,u1,v1, | |
(float)rect.x+rect.w,(float)rect.y,u2,v1, | |
(float)rect.x+rect.w,(float)rect.y+rect.h,u2,v2, | |
(float)rect.x,(float)rect.y+rect.h,u1,v2 | |
}; | |
glVertexPointer(2,GL_FLOAT,sizeof(float)*4,(void *)&coords[0]); | |
glTexCoordPointer(2,GL_FLOAT,sizeof(float)*4,(void *)&coords[2]); |
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
<?php | |
include_once "simple_html_dom.php"; | |
set_time_limit(0); | |
try | |
{ | |
$bdd = new PDO('mysql:host=localhost;dbname=facematch', 'root', ''); // Connection à la base de données | |
} |
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
while(running) | |
{ | |
glClear(GL_COLOR_BUFFER_BIT); | |
glDisable(GL_DEPTH_TEST); | |
glMatrixMode(GL_PROJECTION); | |
glLoadIdentity(); | |
glOrtho(0.0,1024,768,0,-1.0,1.0); | |
glMatrixMode(GL_MODELVIEW); |
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
while(running) | |
{ | |
glClear(GL_COLOR_BUFFER_BIT); | |
glDisable(GL_DEPTH_TEST); | |
glMatrixMode(GL_PROJECTION); | |
glLoadIdentity(); | |
glOrtho(0.0,1024,0.0,768,-1.0,1.0); | |
glMatrixMode(GL_MODELVIEW); |
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
<?php | |
function foo($ob) | |
{ | |
++$ob; | |
} | |
$bar=0; | |
foo($bar); | |
echo $bar; //echoes 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
<?php | |
include('functions.php'); | |
$conn=mysql_connect('128.95.103.44','arch482','shazbat'); | |
mysql_select_db('m052091'); | |
$session=new brSession('supasess',false); | |
$result=mysql_query('SELECT * FROM accounts WHERE email=\''.mysql_real_escape_string($_SESSION['email'],$conn).'\' LIMIT 1',$conn); | |
if(mysql_num_rows($result)) | |
{ |