B4XSnippetDrawing [B4X]
Cube Spline [B4X]
I made the B4X version for the Cube Spline. This is just an exercise, but can be used with appropriate modifications for other applications.
@Star-Dust · 2018-04-25
B4XSnippetAnimation [B4X][BITMAPCREATOR]
Layout implode animation [B4X] [BitmapCreator]
Layout implode animation [B4X] [BitmapCreator]
@Erel · 2018-04-22
B4XSnippetImages [B4X][XUI]
Image to JPEG byte array with resize/quality options [B4X] [XUI]
Image to JPEG byte array with resize/quality options [B4X] [XUI]
@OliverA · 2018-04-11
B4XSnippetImages [B4X]
Mandelbrot Fractal [B4X]
Mandelbrot Fractal [B4X]
@Erel · 2018-04-03
B4XSnippetB4X
FIFO queue
A FIFO queue (First-In-First-Out): Initialize - sets up the queue. isInitilized - true if initialized false if not push - add an item to the queue (Always to the end). pop - return the first item AND remove it from the queue. peek - return the first item but does not remove it size - returns the size (item count) in the queue toArray - returns ALL the items in the queue, but does not remove them.
@Daestrum · 2018-03-28
B4XSnippetFile handling [B4X]
Reading a UTF 8 file that might have BOM [B4X]
UTF8 text files might include a BOM character. You can test it by using a decent text editor such as Notepad++. Always prefer to work with text files encoded with UTF8 without BOM. This code reads a UTF8 text file and removes the BOM character if needed.
@Erel · 2018-03-22
B4XSnippetStrings
Remove leading numbers from string
This code removes leading numbers from a string
@fredo · 2018-03-06
B4XSnippetGPS/location/maps [B4X]
Find distance between two points (Lat/Lon) [B4X]
Here is a function that could be useful if you want to determine the distance between two coordinates. The distance is returned in Miles.
@Amin Ismail · 2018-02-28
B4XSnippetDate/time [B4X]
Convert milliseconds to string [B4X]
This code converts milliseconds to hours, minutes and seconds
@Erel · 2018-02-22
B4XSnippetB4X
Send structure from C++ to B4X in prefix mode
Send structure from C++ to B4X in prefix mode
@johnf2013 · 2018-02-10
B4XSnippetGPS/location/maps
Load Map - travel to site show start point and end point on google maps
Load Map – travel to site show start point and end point on google maps
@Daniel-White · 2018-02-09
B4XSnippetGPS/location/maps [B4X]
Check if Google Street View is available [B4X]
This code check''s easy and fast if Google Street View is available. You need the latitude and longitude.
@Alexander Stolte · 2018-02-01
B4XSnippetGPS/location/maps [B4X]
Google Street View Get Picture [B4X]
With this Code you can get the picture of a Google Street View Position
@Alexander Stolte · 2018-02-01
B4XSnippetB4X [B4X]
Do something after the user finished typing [B4X]
This code pattern allows you to do something after the user stopped typing. It can be useful for example if you want to filter a large list or send a http request.
@Erel · 2017-12-06
B4XSnippetB4X [B4X]
Join arrays of bytes [B4X]
Input = A list (or array of objects) with one or more arrays of bytes; Output = An array of bytes with the input data.
@Erel · 2017-12-03
B4XSnippetImages [B4X][XUI]
Rectangle image with rounded corners [B4X] [XUI]
Rectangle image with rounded corners [B4X] [XUI]
@Erel · 2017-11-19
B4XSnippetDatabase [B4X][SQLITE]
Get all tables, column names and definitions of a db [B4X] [SQLite]
This snippet gets all tables, column names and definitions (e.g. INTEGER, TEXT, etc.) and returns a list with maps.
@KMatle · 2017-11-09
B4XSnippetGPS/location/maps [B4X]
GPS Antipode [B4X]
GPS Antipode [B4X]
@AHilton · 2017-11-09
B4XSnippetB4X
Swap without extra variable
We don''t need an extra variable for swapping integer values
@wonder · 2017-10-26
B4XSnippetStrings
PyJoin() - Python ''str.join''
Returns a string in which the string elements of the given sequence (list / array) have been joined by glue separator.
@wonder · 2017-10-04
B4XSnippetB4X
Search algorithms (and code) on ordered lists
Search algorithms (and code) on ordered lists
@Star-Dust · 2017-09-02
B4XSnippetXML
Manage XMLRPC with okHttpUtils easily (B4X)
I see that there are often questions if there are XMLRPC libraries working in B4X ( B4A, B4i ).Managing the same is very simple through okHttputils.
@MarcoRome · 2017-08-06
B4XSnippetB4X
Fun With Lists
It doesn''t improve anything, but it makes my code more readable
@wonder · 2017-07-29
B4XSnippetStrings [B4X]
Index of Nth occurrence [B4X]
Returns the index of the Nth occurrence of the string searched for. Returns -1 if not found.
@Erel · 2017-07-20
B4XSnippetStrings
Sanitize Hashtag strings
Code to make sure a string complies with "standard" Hashtag rules.
@fredo · 2017-07-20
B4XSnippetFile xfer [B4X]
One-liner downloads [B4X]
One-liner downloads [B4X]
@Erel · 2017-07-18
B4XSnippetB4X
Numeric conversions
The class posted in this thread contains many functions that i use to convert numeric variables in others (ex. byte2int16, long2bytes, byte2hex, etc..)
@MarcelloCSI · 2017-03-27
B4XSnippetDate/time [B4X]
Calculating the next scheduled time [B4X]
Calculating the next scheduled time [B4X]
@Erel · 2016-12-12
B4XSnippethttp
GZIP: B4x & PHP via okHttpUtils
Often transfered data (esp. JSON fromatted) get''s huge. This is about to GZIP encode in PHP and decode in B4X. Like every data manipulation (encryption, zipping) it is BYTE based. So the main thing is to convert it between bytes and string format.
@KMatle · 2016-11-15
B4XSnippetB4X
Switching between 0 and 1
Switching between 0 and 1
@wonder · 2016-08-05