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
#!/usr/bin/env python | |
import os, socket, sys, struct, getopt | |
def sendfile(filename, ip): | |
statinfo = os.stat(filename) | |
with open(filename, 'rb') as f: | |
sock = socket.socket() | |
sock.connect((ip, 5000)) | |
sock.send(struct.pack('!i', 1)) | |
if struct.unpack("!b", sock.recv(1))[0] == 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
Sanity check: | |
- Validate the YAML | |
- Make sure required fields exist and are not empty: | |
- title | |
- dir | |
- author | |
- version | |
- description | |
- file |
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 <cpp3ds/Window/EventManager.hpp> | |
#include <cpp3ds/Window/Keyboard.hpp> | |
#include <cpp3ds/System/Sleep.hpp> | |
#include <3ds.h> | |
#include <iostream> | |
namespace cpp3ds { | |
EventManager::EventManager() { | |
m_joystickThreshold = 10.f; |
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
static int update_attrib_format(struct gl_vertex_array_object* vao) | |
{ | |
int x, index = 0; | |
struct gl_vertex_attrib_array* attrib; | |
for (x = 0; x < VERT_ATTRIB_MAX; ++x) { | |
attrib = &vao->VertexAttrib[x]; | |
if (attrib->Enabled) { | |
vao->AttributeFormats |= GPU_ATTRIBFMT(index, attrib->Size, attrib->Type); | |
// vao->AttributeFormats |= ((attrib->Size-1 << 2) | attrib->Type) << (index * 4); | |
vao->AttributePermutation |= index << (index * 4); |
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
$song = $this->Artist->Song->find('first', array( | |
'conditions' => array('Song.name'=>'Emotion'), | |
'contain' => array( | |
'Artist'=> array( | |
'conditions'=>array( | |
'Artist.name'=>'Daft Punk' | |
) | |
) | |
), | |
)); |
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
// app/Config/routes.php | |
Router::connect('/:controller/:id/:slug', array('action' => 'view'), | |
array( | |
'pass' => array('id', 'slug'), | |
'id' => '[0-9]+' | |
)); |