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 (560):    1 402 403 404 405 406 560   
Bienvenido, Invitado
Tienes que registrarte para poder participar en nuestro foro.
Recordarme?
Miembros: 288
Último miembro: shoUsho
Temas del foro: 1,729
Mensajes del foro: 8,987
Últimos temas
Paren...WAIT !!!
Foro: Aplicaciones/Fragmentos de Código
Último mensaje por: guizans, 25-08-2025, 14:49
Respuestas: 3 - Vistas: 458
GambOS
Foro: General
Último mensaje por: guizans, 20-08-2025, 13:58
Respuestas: 0 - Vistas: 318
Gambas y Wayland
Foro: General
Último mensaje por: guizans, 20-08-2025, 13:56
Respuestas: 6 - Vistas: 597
Odio a gb.Report
Foro: General
Último mensaje por: guizans, 19-08-2025, 10:40
Respuestas: 8 - Vistas: 943
Powered By MyBB, © 2002-2025 MyBB Group.
Made with by Curves UI.