Faster* DrawPolygon Method [B4X] [XUI]
You can draw polygons with B4XCanvas.DrawPath. The following code calls B4XCanvas.DrawPath on B4A and B4i and calls a different method in B4J. DrawPath in B4J is slower than the other drawing methods as it requires clipping the canvas (it is only required in B4J). To summarize, only use this code if you encountered a performance issue with B4XCanvas.DrawPath in B4J.
@Erel · 2018-06-24
Calculate Heat Index (B4x compatible)
I wanted to cycle between the actual air temperature and heat index on my little ESP-12E pool project. This can be used in any B4x IDE. It requires a known temperature and humidity. Calculating the heat index requires the temperature to be in Fahrenheit, so if working in Celsius, you need to convert it first: F = (C x 1.8) + 32. To convert Fahrenheit back to Celcius: C = (F - 32) / 1.8
@Kevin · 2018-06-17
Canvas Draw Round Rect, Arcs, Ovals [B4X] [XUI]
XUI v1.60 introduces a new method: DrawPath. With this, now we have more options to draw: Arc, Oval, RoundRect, LineTo
@ivan.tellez · 2018-05-16
Blur Image [B4X] [BitmapCreator]
Returns a blurred image
@Erel · 2018-05-14
Draw radial gradients [B4X] [BitmapCreator]
Draw radial gradients [B4X] [BitmapCreator]
@Erel · 2018-05-10
Light Effect [B4X] [XUI]
Have you ever thought of making a lighting effect on an image? If you do not, I thought about it ... this is a small code with a simple trick that allows you to get it with B4X
@Star-Dust · 2018-05-01
Light Effect B4A [B4X] [XUI]
Have you ever thought of making a lighting effect on an image? If you do not, I thought about it ... this is a small code with a simple trick that allows you to get it with B4X
@Star-Dust · 2018-05-01
Integer to Word [B4X]
Convert an integer number to words (text)
@AHilton · 2018-04-28
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
Layout implode animation [B4X] [BitmapCreator]
Layout implode animation [B4X] [BitmapCreator]
@Erel · 2018-04-22
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
Mandelbrot Fractal [B4X]
Mandelbrot Fractal [B4X]
@Erel · 2018-04-03
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
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
Remove leading numbers from string
This code removes leading numbers from a string
@fredo · 2018-03-06
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
Convert milliseconds to string [B4X]
This code converts milliseconds to hours, minutes and seconds
@Erel · 2018-02-22
Send structure from C++ to B4X in prefix mode
Send structure from C++ to B4X in prefix mode
@johnf2013 · 2018-02-10
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
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
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
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
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
Rectangle image with rounded corners [B4X] [XUI]
Rectangle image with rounded corners [B4X] [XUI]
@Erel · 2017-11-19
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
GPS Antipode [B4X]
GPS Antipode [B4X]
@AHilton · 2017-11-09
Swap without extra variable
We don''t need an extra variable for swapping integer values
@wonder · 2017-10-26
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
Search algorithms (and code) on ordered lists
Search algorithms (and code) on ordered lists
@Star-Dust · 2017-09-02
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