Skip to content

Instantly share code, notes, and snippets.

View DfKimera's full-sized avatar
🦊

Aryel Tupinambá DfKimera

🦊
  • The Netherlands
  • 08:29 (UTC +02:00)
View GitHub Profile
object(SoapClient)[1]
public '_soap_version' => int 1
public 'sdl' => resource(5, Unknown)
array
0 => string 'UNKNOWN registerUser(UNKNOWN $registerUserRequest)' (length=50)
1 => string 'UNKNOWN updateUserRegister(UNKNOWN $updateUserRegisterRequest)' (length=62)
2 => string 'UNKNOWN messagePost(UNKNOWN $messagePostRequest)' (length=48)
3 => string 'UNKNOWN authenticationByCodeId(UNKNOWN $authenticationByCodeIdRequest)' (length=70)
4 => string 'UNKNOWN getExperiences(UNKNOWN $getExperiencesRequest)' (length=54)
5 => string 'UNKNOWN shareExperience(UNKNOWN $shareExperienceRequest)' (length=56)
object(UserInfoType)[3]
public 'useCase' => string 'UserProfile' (length=11)
public 'userID' => int 247
public 'braceletID' => string '555678' (length=6)
public 'name' => string 'Pedro Brito' (length=11)
public 'email' => string '' (length=0)
public 'gender' => string '' (length=0)
public 'birthDate' => string '0000-00-00 00:00:00' (length=19)
public 'hasFacebook' => boolean false
public 'hasTwitter' => boolean false
<?php
include("AccedoService.php");
try {
$client = new AccedoService();
$auth = new AuthenticationByCodeIdType();
$auth->braceletID = 555678;
-- --------------------------------------------------------
-- Host: localhost
-- Server version: 5.1.41 - Source distribution
-- Server OS: Win32
-- HeidiSQL version: 7.0.0.4053
-- Date/time: 2012-03-16 11:16:55
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/**
* Youtube: Retorna o link do Youtube embedado
* @param string $url
* @return string 'http://www.youtube.com/embed/'.$codigo;
*/
public static function youTubeVideo($url){
preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+(?=\?)|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#", $url, $matches);
return 'http://www.youtube.com/embed/'.$matches[0];
}
<?php
include("init.php");
ob_implicit_flush(true);
set_time_limit(0);
ini_set('memory_limit', '256M');
$t_start = microtime(true);
function msg($msg) {
@DfKimera
DfKimera / gist:2722007
Created May 17, 2012 22:33
GeoSearch Stored Procedure
CREATE DEFINER=`root`@`localhost` PROCEDURE `get_nearby_clusters`(IN `mylat` FLOAT, IN `mylng` FLOAT, IN `dist` FLOAT)
LANGUAGE SQL
NOT DETERMINISTIC
READS SQL DATA
SQL SECURITY INVOKER
COMMENT ''
BEGIN
declare lng1 float; declare lng2 float;
declare lat1 float; declare lat2 float;
<?php
//error_reporting(E_ERROR);
$original = imagecreatefrompng("assets/picture.png");
$mask = imagecreatefrompng("assets/mask.png");
$masked = applyAlphaMask( $original, $mask );
function applyAlphaMask($image, $mask) {
<?php
$filelistPath = "filelist.txt";
$baseURL = "http://url-with-images.com/";
// ------------
$filelist = file($filelistPath);
function downloadFile($url, $target) {
global $baseURL;
var dist:int = unit.distanceTo(unit.targetNode);
var minDist:int = moveSpeed;
if(dist < minDist) {
unit.targetNode = new FlxPoint();
unit.currentTask = Unit.TASK_IDLE;
} else {
var angleRad:Number = Math.atan2(unit.targetNode.y - unit.y, unit.targetNode.x - unit.x);
var dx:int = Math.cos(angleRad) * moveSpeed;