Skip to content

Instantly share code, notes, and snippets.

View danieldsf's full-sized avatar

Daniel Farias danieldsf

  • Ion Systems
  • Parnaíba - PI - Brazil
  • 00:59 (UTC -03:00)
View GitHub Profile
#include <stdio.h>
char set[] = {'<', '2', '>', '[', 'C','A', 'T', 'A', 'R', 'I', 'N', 'A' ,']'};
int position = 0;
char charByChar(){
if(position < 13){
position++;
return set[position-1];
}
<?php
App::uses('Component', 'Controller');
App::uses('Folder', 'Utility');
class UploadComponent extends Component{
const MAX_FILES = 4;
const DIR = WWW_ROOT.'upload'.DS;
public $endereco_atual = null;
<?php
#TESTA SE O ARQUIVO EXISTE:
$file = "endereco_do_arquivo_url";
$file_headers = @get_headers($file);
$existe = true;
if($file_headers[0] == 'HTTP/1.1 404 Not Found') {
$existe = false;
}
<?php
App::uses('Component', 'Controller');
#App::uses('Vendor','phpmailer/phpmailer/class.phpmailer');
App::import('Vendor', 'phpmailer', array('file' => 'phpmailer'.DS.'phpmailer'.DS.'PHPMailerAutoload.php'));
class MailComponent extends Component {
public function send() {
$mail = new phpmailer();
//$mail->SMTPDebug = 3; // Enable verbose debug output
<?php
class ManipulaPython{
private $arquivo;
private $diretivaInicial = "python";
private $argumentos = [];
public $isRunnable = false;
function __construct($arquivo = null){
if($arquivo){
/**
* BasicHTTPClient.ino
*
* Created on: 24.05.2015
*
*/
#include <Arduino.h>
#include <ESP8266WiFi.h>
test
text
traffic
12
11/12/1995
11-11-1995
3i
3.89
3,89