string

  1. practicalsoft

    B4X FEED CheckWin11

    Just a simple trick I use to detect Windows 11 using Shell. This Sub returns True if the version is larger or equals to 22000.493 There is a known bug in JDK to detect Windows 11 version. B4X: Sub CheckWin11 As ResumableSub Dim shl As Shell shl.Initialize("shl", "cmd", Array As...
  2. practicalsoft

    B4X FEED [Risolto] Conversione funzione vb.net invio dati tcp/ip socket

    Buongiorno a tutti, volevo convertire questa funzione vb.net in b4j , in sostanza invia dei comandi su socket tcp/ip qualcuno di buona anima potrebbe aiutarmi, Grazie vb.net B4X: 'Public Shared Function Init(ByVal ip As String, ByVal porta As String) As Object Dim obj As Object...
  3. practicalsoft

    B4X FEED Socket.IO Client Library

    Here is the Socket.IO Client library wrap for this Github Project. Click here for the B4A wrapper iSocketIOClient Author: @Biswajit Version: 1.30 Dependencies: iRandomAccessFile Events: Ack (data As String) CustomUserEvents (data As List, ack As Object) OnConnect (data As List) OnConnecting...
  4. practicalsoft

    B4X FEED [SOLUCIONADO]reducir peso de foto.

    hola tengo un sistema que saca foto y sube al servidor. estoy ocupando la librería resizepicture, para bajar el peso de una foto antes del envió. Camera1_PictureTaken (Data() As Byte) Dim filename As String =Starter.codigo_envio&".jpg" ' "1.jpg" Dim dir As String = File.DirInternal Dim ruta_ As...
  5. practicalsoft

    B4X FEED WebViewExtras

    Hi all. WebViewExtras is my latest library. It's a much updated version of JSInterface. WebViewExtras exposes more of the available native Android WebView methods to your B4A application: addJavascriptInterface(webView1 As WebView, interfaceName As String) Add a javascript interface to...
  6. practicalsoft

    B4X FEED KeyBoard Event,detect CTRL+X or etc...

    B4X: Private KEY_CTRL_PRESSED As Boolean = False Sub AppStart (Form1 As Form, Args() As String) MainForm = Form1 MainForm.RootPane.LoadLayout("Main") 'Load the layout file. MainForm.Show AddKeyPressedListener(MainForm) End Sub Sub AddKeyPressedListener(f As Form)...
  7. practicalsoft

    B4X FEED xCustomlistview & xGauges update value

    Hi, I try to use xCustomlistview with xGauges v 1.8 and the code is as follows: B4X: Dim user As showtype Dim lbtest As String clv1.Clear If userdata.showlist.Size>0 Then Dim calc As Double Dim str As String For i=0 To userdata.showlist.Size-1...
  8. abass

    برنامه نویسی حذف و کپی یک پوشه و زیر پوشه های آن در b4a

    کد زیر یک پوشه کامل را کپی می کند. Private Sub CopyFolder(Source As String, targetFolder As String) If File.Exists(targetFolder, "") = False Then File.MakeDir(targetFolder, "") For Each f As String In File.ListFiles(Source) If File.IsDirectory(Source, f) Then...
  9. abass

    پایتون تبدیل رشته به دیکشنری در پایتون

    تبدیل رشته به دیکشنری در پایتون # Python3 code to demonstrate working of # Convert String to tuple list # using loop + replace() + split() # initializing string test_str = "(۱, ۳, ۴), (۵, ۶, ۴), (۱, ۳, ۶)" # printing original string print("The original string is : " + test_str) # Convert...
  10. practicalsoft

    آموزش اشتباهات رایج و سایر نکات b4x

    اشتباهات رایج و سایر نکات b4x 'روش اشتباه Dim List1 As List List1.Initialize '<-- a new list was created here List1 = SomeOtherList '<--- previous list was replaced 'روش درست Dim List1 As List = SomeOtherList 'روش نادرست For i = 0 To Map1.Size - 1 Dim key As String = Map1.GetKeyAt(i)...
  11. practicalsoft

    B4X FEED [B4X] CopyFolder / DeleteFolder

    A recursive sub that copies a complete folder. B4X: Private Sub CopyFolder(Source As String, targetFolder As String) If File.Exists(targetFolder, "") = False Then File.MakeDir(targetFolder, "") For Each f As String In File.ListFiles(Source) If File.IsDirectory(Source, f) Then...
  12. practicalsoft

    B4X FEED HTTPJOB with multithread?

    Hi, sorry maybe it is a silly question but... can I use an HTTPJOB in a multithread handler? im using this code in a handler: B4X: 'Handler class Sub Class_Globals Public AWS_URI_Is_Path_Style As Boolean Public AWS_Access_Key_ID As String Public AWS_Secret_Access_Key As String...
  13. practicalsoft

    B4X FEED How to get parameters from an encoded URL

    When I run b4j web server, I can get the parameters with req.GetPrameter, but I can't get the correct parameters from an encoded URL. Here is my code: B4X: Sub Handle(req As ServletRequest, resp As ServletResponse) Log(req.FullRequestURI)...
  14. practicalsoft

    B4X FEED [Solved - Stupidity] Can I add a List to a Custom Type?

    I'm probably suffering brain fade but I want to do the following B4X: Type ViewInfo(ViewName As String, ViewType As String, HasText As Boolean, ViewText As String, ViewParent As String, ViewChildren() As List) '... Sub CreateViewInfo (ViewName As String, ViewType As String, HasText As Boolean...
  15. practicalsoft

    B4X FEED [SOLVED] jRDC2 Error : unexpected url: ?method=batch2

    Hi guys, I have a stored procedure like this on Firebird database server B4X: CREATE PROCEDURE INS_CMPNY ( CMPNY Varchar(180), DT Date, CD char(36)) AS BEGIN END I have tested on the server, the procedure runs OK. But when executed on B4A with this code B4X: Sub Test wait...
  16. practicalsoft

    B4X FEED a question about regex

    Why do IsMatch and Matcher do not have the same results ? B4X: Sub Search Dim toFind As String = "GetCanonicalPath" Dim pattern As String = "\b"& toFind &"\b" Dim list As List list.Initialize list.AddAll( Array As String( "test", "getCanonicalPath", "GetCanonicalPath"...
  17. practicalsoft

    B4X FEED jRDC2 Error : unexpected url: ?method=batch2

    Hi guys, I have a stored procedure like this on Firebird database server B4X: CREATE PROCEDURE INS_CMPNY ( CMPNY Varchar(180), DT Date, CD char(36)) AS BEGIN END I have tested on the server, the procedure runs OK. But when executed on B4A with this code B4X: Sub Test wait...
  18. practicalsoft

    B4X FEED B4A PhoneNumberUtils for B4I

    I have the following code in B4A B4X: Dim n As String="5699126532" Dim r As Reflector n=(r.RunStaticMethod("android.telephony.PhoneNumberUtils", "formatNumber", Array As Object("+" & n, Null), Array As String("java.lang.String", "java.lang.String"))) Which gives me a correct output: For...
  19. practicalsoft

    B4X FEED [solved] B4XTable Filter a Table Column

    This is ok B4X: Dim col2 As B4XTableColumn = B4XTable1.GetColumn("Sec") B4XTable2.CreateDataView($"${col2.SQLID.Trim} = 'ELT' "$) this is not ok ... ? B4X: Dim Msec As String Msec="ELT" B4XTable1.CreateDataView($"${col2.SQLID.Trim} = ${Msec} "$) or B4X: Dim Msec As String...
  20. practicalsoft

    B4X FEED How would one Ioad images into a cxCustomView from the internet

    I am filling a cxCustomView using clvExpandable When II start the app, I download a json file containing all the information I need to fill each item I need to display. B4X: DownloadAndSaveFile(f.msFilePSA, "psa.json") . . Sub DownloadAndSaveFile (Link As String, FName As String) Dim j As...
عقب
بالا