/** * 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

+2

if (ca.getVendorId() == null)
	throw new ApiException(ApiError.UNKNOWN_INTEGRATION_ERROR);

UUID vendorId = ca.getVendorId();

if (vendorId == null)
	throw new ApiException(ApiError.VENDOR_ID_EMPTY);
 

anonymous

0

# TODO: streetAddress should be an array in the API, too.
address = user_data.get('address', dict())
a4 = address.get('streetAddress4', None)
a3 = address.get('streetAddress3', '' if a4 else None)
a2 = address.get('streetAddress2', '' if a3 else None)
a1 = address.get('streetAddress1', '' if a2 else None)
address['streetAddress'] = [a for a in [a1, a2, a3, a4] if a is not None]
del address['streetAddress1']
del address['streetAddress2']
del address['streetAddress3']
del address['streetAddress4']
 

anonymous

+1

Friend Shared ReadOnly Property BasePath() As String
			Get
				Static sBasePath As String = String.Empty
				If sBasePath.Equals(String.Empty) Then
					Dim oConfig As New Common.Configuration
					sBasePath = oConfig.GetString("BasePath", "Plugin")
				End If
				Return sBasePath
			End Get
		End Property
 

anonymous

+2

isWriting = (isWriting) ? false : true;
 

anonymous

+1

/* -------------------------------------------------------------
	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

+2

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;
}
 

+1

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

+1

//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

    }