tercoide 12-08-2021, 16:37
Hoy hice un experimento:
-desinstale completamente Gambas3 en la PC de mi trabajo
-baje el paquete de instalacion que esta en Git de un programa hecho en Gambas
-Ubuntu lo abre con el Software, pero se queja de dependencias no satisfechas

WTF ????????
no deberian estar dentro del .deb ???????????

[Imagen: P7rMJMq.png]
tincho 12-08-2021, 11:13
Hola a todos.
Aquí les propongo una función que genera una cadena de texto para marca temporal.
Por favor si alguien tiene una mejor idea por favor no dude en compartirla.

Código:
'' Returns a text string over time in "yyyymmddhhnnss" format. From years to seconds.

Static Public Function Timestamp(datTime As Date) As String
 
  Return Format(datTime, "yyyymmddhhnnss")
 
End
Saludos.
tincho 12-08-2021, 11:07
Hola a todos.
Aquí les propongo una función que formatea un texto en párrafos, opcionalmente se puede indicar "html5" para que agregue los tags  <p></p>.
Por favor si alguien tiene una mejor idea por favor no dude en compartirla.
Código:
'' Paragraph validation, double space NO, Space at the beginning and/or at the end NO, line breaks at the beginning and/or at the end NO etc.

Public Function Paragraph(strInput As String, Optional strMod As String) As String
 
  Dim strOut As String
  Dim strTmp As String
  Dim int As Integer
  Dim stxLines As New String[] ' List of lines as they come in txt
  Dim str As String
  Dim strCap As String
  Dim strParagraph As String
  Dim stxParagraph As New String[]
  '
  strTmp = Replace(strInput, "\n ", "\n")
  strTmp = Replace(strInput, "\n\n", "\n")
  strTmp = Replace(strInput, "\t\n", "\n")
  strTmp = Replace(strInput, "\n\t", "\n")
 
  ' Work by paragraph
  strParagraph = ""
 
  For int = 0 To stxLines.Max
    If stxLines[int] <> "" Then
      str = String.Trim(stxLines[int])
      strCap = String.Left(str)
      Select int
        Case 0
          stxParagraph.Add(str)
        Case Else
          If String.UCase(strCap) = strCap Then
            stxParagraph.Add(str)
          Else
            stxParagraph[stxParagraph.Max] = stxParagraph[stxParagraph.Max] & " " & str
          Endif
      End Select
    Endif
  Next
 
  Select String.LCase(strMod)
    Case "html", "html5"
      For int = 0 To stxParagraph.Max
        ' Proceed to validate the characters, in this case for XHTML 1.0
        strParagraph = XmlValidate(stxParagraph[int], "utf8")
        strParagraph = ReTager(strParagraph)
        If InStr(strParagraph, "<h") > 0 Then
          stxParagraph[int] = "\n" & strParagraph & "\n"
        Else
          stxParagraph[int] = "<p>" & strParagraph & "</p>"
        Endif
        
      Next
  End Select
 
  strOut = stxParagraph.Join("\n")
 
  Return strOut
 
End
Saludos.
Páginas (557):    1 399 400 401 402 403 557   
Bienvenido, Invitado
Tienes que registrarte para poder participar en nuestro foro.
Recordarme?
Miembros: 286
Último miembro: Emilio Uribe
Temas del foro: 1,720
Mensajes del foro: 8,935
Últimos temas
Archivos .ods
Foro: General
Último mensaje por: tincho, 01-07-2025, 18:54
Respuestas: 8 - Vistas: 273
Publicidad
Foro: Sobre gambas-es.org
Último mensaje por: tincho, 01-07-2025, 18:48
Respuestas: 6 - Vistas: 332
Web con gambas, a ver si ...
Foro: WebApp/WebForms
Último mensaje por: tincho, 01-07-2025, 17:47
Respuestas: 41 - Vistas: 32,592
Un sistema de ayudas cont...
Foro: Videotutoriales
Último mensaje por: guizans, 22-06-2025, 19:55
Respuestas: 3 - Vistas: 309
Powered By MyBB, © 2002-2025 MyBB Group.
Made with by Curves UI.