Skip to content

Instantly share code, notes, and snippets.

View dutchand's full-sized avatar

DrED dutchand

View GitHub Profile
@dutchand
dutchand / urlTest.mxml
Last active August 29, 2015 14:09
Validate if specific urls can be accessed or not from a device on a network AS3: Whitelisturl
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" horizontalScrollPolicy="on" width="100%" height="1000" verticalScrollPolicy="off" layout="absolute" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF, #FFFFFF]" verticalAlign="middle">
<!--
http://pbskids.org/sprout_games/mama-mirabelle/games/source/ndi/utils/Logger.as
http://www.uh.edu/wtsc_apps/js/uploadify/com/adobe/webapis/URLLoaderBase.as
http://alivepdf.bytearray.org/?p=20
http://books.google.com/books?id=CeMMho6OodcC&pg=PT493&lpg=PT493&dq=onIOError%28event:IOErrorEvent%29&source=bl&ots=KkN3LufGUS&sig=Q28fa0EWe9p2msFtjyc-Wkhawvg&hl=en&sa=X&ei=7YJGVOa3EKrksATDoYDADw&ved=0CDkQ6AEwBQ#v=onepage&q=onIOError%28event%3AIOErrorEvent%29&f=false
-->
<mx:Script>
<![CDATA[
@dutchand
dutchand / Model.as
Last active August 29, 2015 14:09
Model is a singleton. Use Model.instance instead.
package Model.Modelo
{
import mx.collections.ArrayCollection;
[Bindable]
public class AppModel
{
private static var _instance:AppModel;
@dutchand
dutchand / Email.as
Created November 12, 2014 16:40
Local mail implementation within application
/**
* ActionScript source file that defines the UI logic and some of the data access code.
* This file is linked into the main application MXML file using the mx:Script tag.
* Most of the functions in this file are called by event handlers defined in
* the MXML.
*/
//import Modulos.Auditoria.AuditoriaClase;
import Model.Modelo.AppModel;
public var usuario_conectado:String = AppModel.nombre_usuario;
@dutchand
dutchand / audit.php
Created November 12, 2014 16:49
User log class: Audit of user actions
<?php
require_once(dirname(__FILE__) . "/Controlconn.php");
class TAuditoria {
function agregar_a_auditoria($usuario, $accion_ejecutada, $es_visita_admin) {
$listo =false;
$fecha = date("Y\-m\-d\ H\:i\:s");
// $fecha_ultima_visita = date("Y\-m\-d\ H\:i\:s");
@dutchand
dutchand / ValidacionClase.as
Created November 12, 2014 16:52
ID Validation
package Modulos.Validacion
{
public class ValidacionClase
{
public static function ValidarCarnet(ci:String):Boolean
{
var bandera:Boolean = false;
if(ci.length == 11)
@dutchand
dutchand / TTSpeech.java
Last active December 29, 2016 07:16
Android: Text to speech implementation
package com.ttsl;
import android.content.Context;
import android.speech.tts.TextToSpeech;
import java.util.Locale;
import java.util.Random;
import android.app.Activity;
import android.os.Bundle;
@dutchand
dutchand / paypal.as
Created November 12, 2014 19:01
Paypal Integration Function
public var period:int=1; //various also by service
public var charge:Number = 599.00;// varies by product
public function gopaypalpay():void{
if(sipay.selected == true)
charge = 1598.00
var p:Number;
p = 0;
var url:String = "https://www.paypal.com/cgi-bin/webscr";
@dutchand
dutchand / pedido_cliente.php
Created November 12, 2014 19:05
Script for managing data access to mysql db: food store resources
<?php
require_once(dirname(__FILE__) . "/Controlciroaconn.php");
require_once(dirname(__FILE__) . "/functions.inc.php");
require_once(dirname(__FILE__) . "/XmlSerializer.class.php");
require_once(dirname(__FILE__) . "/Ccentro.php");
require_once(dirname(__FILE__) . "/CPersona.php");
require_once(dirname(__FILE__) . "/TAuditoria.php");
/**
@dutchand
dutchand / tarjeta_estiba.php
Created November 12, 2014 19:10
Script to manage the request ticket for the provision of food from Storage
<?php
require_once(dirname(__FILE__) . "/Controlciroaconn.php");
require_once(dirname(__FILE__) . "/functions.inc.php");
require_once(dirname(__FILE__) . "/XmlSerializer.class.php");
require_once(dirname(__FILE__) . "/TAuditoria.php");
//example below
//http://www.scribd.com/doc/89066015/Tarjeta-de-Estiba
package com.end.model.vos_employee
{
[Bindable]
public class Employee
{
/*-.........................................Properties..........................................*/
public var emp_id : uint;
public var firstname : String;
public var lastname : String;