/** * lowercase letters */
        $this->store['upper_Spec'] = array( *cut* );
        /** * uppercase letters */
        $this->store['lower_Spec'] = array( *cut* );
      
                    } else {
                      $errmsg='An unknown error occured.';
                    }
                  } else {
                    $errmsg='The passwords you entered do not match';
                  }
                } else {
                  $errmsg='Password has to be at least 8 characters long.';
                }
              } else {
                $errmsg='The email you entered is already in our database.';
              }
            } else {
              $errmsg='Please enter your email address.';
            }
          } else {
            $errmsg='Please enter your first name and your last name.';
          }
        } else {
        (...)
      
        // Happy debugging, suckers
        # define true (rand() > 10)
      

anonymous

0

isWriting = (isWriting) ? false : true;
 

anonymous

0

/* -------------------------------------------------------------
	Helper function calculate number of attributes
	Parameters:  Attributes from Request
	Return:		Count
---------------------------------------------------------------*/	
function getCountAttributes($v1=0,$v2=0,$v3=0,$v4=0,$v5=0,$v6=0,$v7=0,$v8=0) {
	return array_sum(func_get_args());
}
 

anonymous

0

string itemType = (string)null;
 

anonymous

0

bool isTuneController(ControllerInterface * controller) {
    TuneController * tuneController = dynamic_cast<TuneController *>(controller);
    tuneController = new TuneController();
    if (tuneController == nullptr)
        return false;
    return true;
}
 

0

var number = textNumber.match(/([0-9]{12}|[0-9]{15})/)[0];
 

0

//Obtiene la url del cliente
public string obtenerUrlCliente(string url)
{
    return url;
}
 

anonymous

+2

    public static class Funciones
    {
        public const string mstrFormatoFechaYYYYMMDD = "yyyyMMdd";
        public const string mstrFormatoFechaYYYYMMDDHHmm = "yyyyMMddHHmm";
        public const string mstrFormatoFechaYYYYMMDDHHmmss = "yyyyMMddHHmmss";
        public const string mstrFormatoFechaYYYYMM = "yyyyMM";
        public const string mstrFormatoFechaDD = "dd";
        public const string mstrFormatoFechaDD_MM_YYYY = "dd-MM-yyyy";
        public const string mstrFormatoFechaCorta = "dd/MM/yyyy";
        public const string mstrFormatoFechaHora = "dd/MM/yyyy HH:mm:ss";
        public const string mstrFormatoFechaHoraAM = "dd/MM/yyyy H:mm:ss";
        public const string mstrFormatoFechaHoraMinutoAM = "yyyyMMdd H:mm";
        public const string mstrFormatoHH = "HH";
        public const string mstrFormatoFechaDDMMYYYY = "ddMMyyyy";
        public const string mstrFormatoFechaYYYYMMDDHHmmssfff = "yyyyMMddHHmmssfff";
        public const string mstrFormatoFechaYYYYMMDDHHmmsszzz = "yyyyMMddHHmmsszzz";

        #region Fechas

        public static System.Nullable<DateTime> fdteFechaParser(string pstrFecha)
        {
            System.Nullable<DateTime> ldteFecha = default(DateTime?);
            try
            {
                if (!string.IsNullOrEmpty(pstrFecha))
                    try
                    {
                        ldteFecha = DateTimeOffset.ParseExact(pstrFecha, Funciones.mstrFormatoFechaHora, CultureInfo.InvariantCulture, DateTimeStyles.None).DateTime;
                    }
                    catch (Exception exDate1)
                    {
                        try
                        {
                            ldteFecha = DateTimeOffset.ParseExact(pstrFecha, Funciones.mstrFormatoFechaYYYYMMDDHHmmss, CultureInfo.InvariantCulture, DateTimeStyles.None).DateTime;
                        }
                        catch (Exception exDate2)
                        {
                            try
                            {
                                ldteFecha = DateTimeOffset.ParseExact(pstrFecha, Funciones.mstrFormatoFechaHoraAM, CultureInfo.InvariantCulture, DateTimeStyles.None).DateTime;
                            }
                            catch (Exception exDate3)
                            {
                                try
                                {
                                    ldteFecha = DateTimeOffset.Parse(pstrFecha).DateTime;
                                }
                                catch (Exception exDate4)
                                {
                                    try
                                    {
                                        ldteFecha = DateTimeOffset.ParseExact(pstrFecha, Funciones.mstrFormatoFechaCorta, CultureInfo.InvariantCulture, DateTimeStyles.None).DateTime;
                                    }
                                    catch (Exception exDate5)
                                    {
                                        try
                                        {
                                            ldteFecha = DateTimeOffset.ParseExact(pstrFecha, Funciones.mstrFormatoFechaYYYYMMDD, CultureInfo.InvariantCulture, DateTimeStyles.None).DateTime;
                                        }
                                        catch (Exception exDate6)
                                        {
                                            try
                                            {
                                                ldteFecha = DateTimeOffset.ParseExact(pstrFecha, Funciones.mstrFormatoFechaDDMMYYYY, CultureInfo.InvariantCulture, DateTimeStyles.None).DateTime;
                                            }
                                            catch (Exception exDate7)
                                            {
                                                try
                                                {
                                                    ldteFecha = DateTimeOffset.ParseExact(pstrFecha, Funciones.mstrFormatoFechaYYYYMMDDHHmmssfff, CultureInfo.InvariantCulture, DateTimeStyles.None).DateTime;
                                                }
                                                catch (Exception exDate8)
                                                {
                                                    try
                                                    {
                                                        ldteFecha = DateTimeOffset.ParseExact(pstrFecha, Funciones.mstrFormatoFechaYYYYMMDDHHmmsszzz, CultureInfo.InvariantCulture, DateTimeStyles.None).DateTime;
                                                    }
                                                    catch (Exception exDate9)
                                                    {
                                                        try
                                                        {
                                                            ldteFecha = DateTime.ParseExact(pstrFecha, Funciones.mstrFormatoFechaHora, CultureInfo.InvariantCulture, DateTimeStyles.None);
                                                        }
                                                        catch (Exception exDate10)
                                                        {
                                                            try
                                                            {
                                                                ldteFecha = DateTime.ParseExact(pstrFecha, Funciones.mstrFormatoFechaYYYYMMDDHHmmss, CultureInfo.InvariantCulture, DateTimeStyles.None);
                                                            }
                                                            catch (Exception exDate11)
                                                            {
                                                                try
                                                                {
                                                                    ldteFecha = DateTime.ParseExact(pstrFecha, Funciones.mstrFormatoFechaHoraAM, CultureInfo.InvariantCulture, DateTimeStyles.None);
                                                                }
                                                                catch (Exception exDate12)
                                                                {
                                                                    try
                                                                    {
                                                                        ldteFecha = DateTime.Parse(pstrFecha);
                                                                    }
                                                                    catch (Exception exDate13)
                                                                    {
                                                                        try
                                                                        {
                                                                            ldteFecha = DateTime.ParseExact(pstrFecha, Funciones.mstrFormatoFechaCorta, CultureInfo.InvariantCulture, DateTimeStyles.None);
                                                                        }
                                                                        catch (Exception exDate14)
                                                                        {
                                                                            try
                                                                            {
                                                                                ldteFecha = DateTime.ParseExact(pstrFecha, Funciones.mstrFormatoFechaYYYYMMDD, CultureInfo.InvariantCulture, DateTimeStyles.None);
                                                                            }
                                                                            catch (Exception exDate15)
                                                                            {
                                                                                try
                                                                                {
                                                                                    ldteFecha = DateTime.ParseExact(pstrFecha, Funciones.mstrFormatoFechaDDMMYYYY, CultureInfo.InvariantCulture, DateTimeStyles.None);
                                                                                }
                                                                                catch (Exception exDate16)
                                                                                {
                                                                                    try
                                                                                    {
                                                                                        ldteFecha = DateTime.ParseExact(pstrFecha, Funciones.mstrFormatoFechaYYYYMMDDHHmmssfff, CultureInfo.InvariantCulture, DateTimeStyles.None);
                                                                                    }
                                                                                    catch (Exception exDate17)
                                                                                    {
                                                                                        try
                                                                                        {
                                                                                            ldteFecha = DateTime.ParseExact(pstrFecha, Funciones.mstrFormatoFechaYYYYMMDDHHmmsszzz, CultureInfo.InvariantCulture, DateTimeStyles.None);
                                                                                        }
                                                                                        catch (Exception exDate18)
                                                                                        {
                                                                                            try
                                                                                            {
                                                                                                ldteFecha = DateTime.ParseExact(pstrFecha, Funciones.mstrFormatoFechaYYYYMMDDHHmm, CultureInfo.InvariantCulture, DateTimeStyles.None);
                                                                                            }
                                                                                            catch (Exception exDate19)
                                                                                            {
                                                                                                try
                                                                                                {
                                                                                                    ldteFecha = DateTime.ParseExact(pstrFecha, Funciones.mstrFormatoFechaHoraMinutoAM, CultureInfo.InvariantCulture, DateTimeStyles.None);
                                                                                                }
                                                                                                catch (Exception exDate20)
                                                                                                {
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
            }
            catch (Exception ex)
            {
                Traza.WriteErrorLog(String.Concat(ex.Message, Environment.NewLine, ex.StackTrace));
            }

            return ldteFecha;
        }

        #endregion

    }
 

anonymous

0

switch (userAction[0]) {
    case 'area.enabled' :
    case 'appointment.create' :
    case 'area.create' :
    case 'line.create' :
    case 'place.create' :
    case 'role.create' :
    case 'subscription.create' :
    case 'resourceGroup.create' :
    // Sections
    case 'section.areas' :
    case 'section.displays' :
    case 'section.lines' :
    case 'section.places' :
    case 'section.resource-groups' :
    case 'section.roles' :
    case 'section.sectors' :
    case 'section.totems' :
    case 'section.users' :
    case 'section.now-serving' :
    case 'section.reception' :
    case 'section.sigeci-csv' :
    case 'section.statistics':
    // Sector
    case 'sector.create' :
    case 'sector.delete' :
    case 'sector.read' :
    case 'sector.update' :
    // Display
    case 'display.create' :
    case 'display.delete' :
    case 'display.update' :
    case 'display.read' :
    // Totem
    case 'totem.create' :
    case 'totem.delete' :
    case 'totem.update' :
    case 'totem.read' :
    // User
    case 'user.create' :
    case 'user.delete' :
    case 'user.read' :
    case 'user.update' :
      // Scope is PLACE
      return 'place';
    // Appointment
    case 'appointment.delete' :
    case 'appointment.forward' :
    case 'appointment.read' :
    case 'appointment.upload-csv' :
    case 'appointment.update' :
    case 'subscription.update' :
    // Area
    case 'area.call-next' :
    case 'area.call-to' :
    case 'area.clear' :
    case 'area.forward' :
    case 'area.join' :
    case 'area.read' :
    case 'area.remove-subscription' :
    case 'area.remove-subscription-not-checked-in' :
    case 'area.update' :
    case 'area.delete' :
    case 'line.call-next' :
    case 'line.call-to' :
    case 'line.clear' :
    case 'line.delete' :
    case 'line.forward' :
    case 'line.join' :
    case 'line.read' :
    case 'line.remove-subscription' :
    case 'line.remove-subscription-not-checked-in' :
    case 'line.update' :
    case 'place.delete' :
    case 'place.read' :
    case 'place.update' :
    case 'resourceGroup.delete' :
    case 'resourceGroup.read' :
    case 'resourceGroup.update' :
    case 'role.delete' :
    case 'role.read' :
    case 'role.update' :
    case 'subscription.call-to' :
    case 'subscription.delete' :
    case 'subscription.forward' :
    case 'subscription.read' :
      // Scope is the ACTION SCOPE
      return actionScope;
  }
 

anonymous

+2

var elementID = $('#' + onFocus).parent().parent().parent().parent().parent().parent().[0].id; // who's your daddy 
 

0

BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$BRANCH" != "develop" ]]; then
  echo 'You should be on master branch';
  exit 1;
fi