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
#!/usr/bin/env python | |
""" | |
To Run This Script you 2 things | |
- use virtualenv | |
- install pillow (PIL fork for python 3.x) - pip install pillow | |
""" | |
import sys | |
import os |
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
char *path_data_folder(const char *folder, const char *file) | |
{ | |
ALLEGRO_PATH *exe_path = NULL; | |
ALLEGRO_PATH *path = NULL; | |
ALLEGRO_PATH *data_dir = NULL; | |
char copy_path[2048]; | |
exe_path = al_get_standard_path(ALLEGRO_RESOURCES_PATH); | |
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 <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include "include/engine/stack.h" | |
#include "include/engine/mem.h" | |
void stack_init(CB_STACK **elem, void *data) | |
{ | |
CB_STACK *n_element = NULL; |
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 "include/engine/menu.h" | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
CB_MENU *menu_init(const char *menufile) | |
{ | |
CB_MENU *menu_ptr = NULL; | |
menu_ptr = malloc(sizeof(CB_MENU)); |
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
extends KinematicBody2D | |
const GRAVITY = Vector2(0,900) | |
const WALK_SPEED = 250.0 | |
const JUMP_SPEED = 450 | |
const DOWN_FORCE = Vector2(0,-1) | |
var linear_vel = Vector2() | |
const MAX_FALLING_SPEED = 1400 |
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 flask import Flask | |
import json | |
import urllib.request | |
app = Flask(__name__) | |
@app.route('/') | |
def hello_world(): | |
r = urllib.request.urlopen('https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=VALE3.SA&interval=5min&apikey=PN6ZAMT6VK4BZTFU') | |
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
if(invincible_on ){ | |
invincible_count += 100; | |
if(*ingame_timer_count >= invincible_timer){ | |
invincible_on = FALSE; | |
invincible_count = 0; | |
selected->flags.invincible |= 0; | |
printf("%d", invincible_count); | |
} | |
} |
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 | |
import sys | |
import time | |
from PyQt4 import QtGui as _qg | |
from PyQt4 import QtCore as _qc | |
''' | |
esta class é a classe da thread que vai rodar paralelamente | |
a thread principal da aplicação |
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
<? | |
abstract class Product { | |
public $id = 0; | |
public $qty = 1; | |
public $name = ""; // it needs for using search! | |
public $price = 0.0; |
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
<? | |
/* | |
esta classe abstrata devera estar inclusa na sua classe customizda para produtos | |
os atributos id e name sao usado para buscas por isso é obrigatorio te-los na assinatura da classe | |
*/ | |
abstract class Product { |