I made 7 examples how to exchange data between B4x apps and php. I use the POSTSTRING method as it is simple, secure (get-methods will be logged with the data autmatically on the server, post-methods not), strings can be formatted very easy (JSON) and en-/decrypted (not included but see my other...
B4J Version: 7.51
OS Platfrom: Win10 Pro (1903)
JDK: 11.0.1 downloaded from B4X's site
Here's the setup. I'm creating a list of maps that contain x, y values (note: in my case, the map contains way more info, I'm just simplifying it here to show the issue I'm running into)
Dim largestX As...
Good day to all,
I have code below. Everything is ok except when using kvs.get(), which I could not get every item on the list.
Thank you for your kind reply.
'Non-UI application (console / server application)
#Region Project Attributes
#CommandLineArgs:
#MergeLibraries: True...
Hi there
Let's assume, this is the master content..
Today #I# got to #experiment# #with# reef. I #needed# this to try #and# see if #I# can #wrap# it with #BANano#.png
Now I need to return a list that will have
I,experiment,with,needed,and,wrap,BANano
And kindly need a code snippet for such...
Ex:
Dim myLife as Map (As yearstring, As Wine)
If myLife.Get("2019").IsTonsOfWine = True Then...
Because I haven't found any with the IDE or in the forums.
That would be a huuuuuuuuuuuuuuuuuuuuuuuge time saver I believe.
Thanks !
Hi there
Can anyone please help with a snippet to unflatten data into a json stree?
For example, this is my list of records...
Dim arr As List
arr.Initialize
arr.Add(CreateMap("id":1 ,"parentid" : 0))
arr.Add(CreateMap("id":4 ,"parentid" : 2))
arr.Add(CreateMap("id":3 ,"parentid" : 1))...
hello,
i need an idea.
i have a item with property "A" and "B"
A is parent from B or B is child from A
from this items i have a list (it describes a status workflow from to)
and i need to bring them to a hierarchy view but i don't know which is the root.
X,Z
A,B
D,G
Z,A
B,D
Output should...
Hi
I am confused about how to insert a type into a list
So far I have....
Sub Process_Globals
Thelist As List
TheList.initialize
Type TheRT(Code As String, Description As String, Price As Double, Quantity As Double)
Public ItemInfo As TheRT
End Sub
Sub...
Hello,
This is a module code to retrieve value from complex structure (combination of list, map, array and primitives types).
Give the path with a dot (.) separator to get the value or the default value if not accessible.
example : m=createmap("Name":"John" ,"Friends":array as...
Buongiorno,
premetto ... che sono un "praticone",
comunque vorrei sapere se è possibile inviare per Whatsapp una LIST ("filtrata") che genero in un modulo.
dal Google traslator :-)
practice = hobby
pratico = passatempo
Grazie
Hello,
Does anybody know if there is a way to check if an item exists in a list, finding by index?
for example:
If list1.isexist(8) Then
......
End if
Thanks in advance
I have json file which contain nearly 37000 record
when I'm using :
Dim list1 As List
list1 = json.NextArray
Dim exact_record As Int
exact_record = list1.Size
It slow down app.
this work fine :
Dim exact_record As Int
exact_record = 38000
what i'm doing wrong?
The next code snippet, return a list with non repeating random numbers
Feel free to modify or use it as you want.
This code depends on JavaObject and Inline Java Code usage.
I decide to use the inline java because the Core random function (RND) get stuck at some point, I do not have the Core...
Hi All
I use a webservice to return JSON data which looks something like:
Data:[{"col1":"value1","col2":"value2","col3":"value3","col4","value4"}{…etc...}]
I store save the above to the list:
dim recordList = root.Get("Data")
I then iterate through the list using:
For i = 0 To recordList.Size...
Hi there
I have been using the 'Dim row(3) As Object' notation for a while with tableviews record addition. So I decided to try to use a list instead.
So I..
Dim row as List
row.Initialize
row.add("x")
row.add("y")
row.add("z")
tableview.items.add(row)
of rather row.AddAll(array as...
I got http.getstring == [{"place_return":",'','a place','b place','c place'"}] like this
and i have to insert it into autocomplete.setitem()
I tried like this ::
Dim p As JSONParser
p.Initialize(Job.GetString)
Dim list1 As List
list1 =...
I can't get size or data in list and map from java lib
[I need java lib + b4a and use list in map , map in map, map in list or list in list]
please suggest me for fixed this problem
thanks
this is my test lib
java library code:
ackage testlib;
import anywheresoftware.b4a.BA;
import...
Description: A simple class to add 3 methods to the native List.
Methods:
IndexOf2(Item As Object, StartIndex As Int) As Int
Returns the index of the specified item starting the search from StartIndex. Returns -1 if Item was not found.
GetAllIndexes(Item As Object) As List
Returns a list...
Hello guys,
I've seen this issue in many other threads here, but now that I need it I'm unable to find the answer.
I cast labels on the activity and want to save their information for later retrieval (.text, .left, .top, etc).
I created a map with the fields I want to save.
I lstLetters.add...