B4JSnippetCharts
Cubic Spline Curve Fit
Cubic Spline Curve Fit
@rgarnett1955 · 2021-01-05
B4JSnippetMaths
Statistics - Filters and Histogram Tools
Statistics - Filters and Histogram Tools
@rgarnett1955 · 2020-12-31
B4JSnippetDialogs
How To Show Sign In/Log In Window Prior to App Start
Here is a simple example of the program flow of using a sign in dialog box before running your full app. Now with a minimal Windows titlebar, as is appropriate for a sign in window.
@cklester · 2020-12-16
B4JSnippetEditText/Textview/TextArea/TextField
TextArea - Moving Focus after pressing TAB
Here is a fairly simple solution to solving the TAB issue in TextArea. Currently, instead of moving to the next node, tabbing stays within the TextArea. To fix this, I used a combination of the jgameviewhelper library to capture the TAB keypress and additional code to get the current focus (post entitled- "Get last object focused" by stevel05 & Daestrum). Note that you must use the tag feature in order for you to identify the TextArea.
@gregchao · 2020-12-13
B4JSnippetOAuth
Google OAuth2 authorization token
Some of Google online services no longer allow the access token to be sent as a query parameter. You will get an error similar to: "The OAuth token was received in the query string, which this API forbids for response formats other than JSON or XML. If possible, try sending the OAuth token in the Authorization header instead." The solution is to send it in the authorization header. The secret that they don''t tell you is that you need to add "Bearer " to the value.
@Erel · 2020-12-03
B4JSnippetCharts
B4j Line Graph, Multiple Traces, Predetermined intervals
This program is an extension of a simpler one I did for B4a and uses some of the features I have also seen on other programs. It can plot 3 Y variables against the X axis. The Y axis range for each is determined from the data and the intervals of the graph divisions set to sensible whole numbers for each plot according to the individual plot data
@rodmcm · 2020-11-28
B4JSnippetExcel
jPOI how to get the Active sheet
jPOI how to get the Active sheet
@Christian75 · 2020-11-19
B4JSnippetB4J
B4JQuiz - Desktop App
B4JQuiz - Desktop App
@aeric · 2020-11-04
B4JSnippetDatabase
Parse SQL Schema File Into SQLite
When you create a SQLite database with DB Browser for SQLite, you can output a schema file for the database. Instead of manually copying each CREATE line into your source, you can simply use the code below to read and parse the schema file automatically and create the SQLite database inside of and for your app.
@cklester · 2020-10-28
B4JSnippetComms & Network
Interprocess Comms - Controller Widget and example clients.
Interprocess Comms - Controller Widget and example clients.
@rgarnett1955 · 2020-10-23
B4JSnippetPrint
Print a pane
I wanted to print a pane to a specific size like A4. I searched but I didn''t find any library or code snippet. So I wrote it myself.
@Ali Dashtaki · 2020-10-22
B4JSnippetMail
Bulk Email Sender
Bulk Email Sender
@cklester · 2020-10-21
B4JSnippetMail
DateTime stamp and MessageID for Smtp mail
Noticed that the emailprovider suddenly deletes my automatic generated mails from the Pi. Looking in the output the dateinfo was not included and also no Message-ID thus the server classifies it as Spam. This routine generates the map you need to for composing a mail with Date/MessageID.
@MbedAndroid · 2020-10-21
B4JSnippetComms & Network [B4J]
send string msg from WebView js 2 B4J - and from B4J to WebView javascript [B4J]
send string msg from WebView js 2 B4J - and from B4J to WebView javascript [B4J]
@a6000000 · 2020-10-17
B4JSnippetMap
Return B4X Map from inline Java
Return B4X Map from inline Java
@tchart · 2020-10-07
B4JSnippetLinux
Linux + B4JPackager11: Cannot run program objcopy: error=2, No such file or directory
Linux + B4JPackager11: Cannot run program objcopy: error=2, No such file or directory
@Erel · 2020-10-04
B4JSnippetB4J Server [SERVER]
list all request headers in a handler class [server]
list all request headers in a handler class [server]
@Erel · 2020-10-04
B4JSnippetMenu
Translate Menus and keep Tag for Identifying
Translate Menus and keep Tag for Identifying
@Midimaster · 2020-09-22
B4JSnippetLogging/Exceptions
Set slf4j log level
A 3rd party library I am using was outputting INFO level messages frequently and ended up creating a 20gb log file. Ive asked the author to change the log level for the function to DEBUG but in the meantime I had to reduce the logging level of slf4j. This can be done using the inline code below and calling it via a JavaObject.
@tchart · 2020-08-25
B4JSnippetStrings
Scroll background color by words in a string.
Scroll background color by words in a string.
@Juan Perz · 2020-08-17
B4JSnippetList- and scrollview
Get Visible Area Of Scrollpane
Get Visible Area Of Scrollpane
@keirS · 2020-08-12
B4JSnippetB4J [TOOL]
ScenicView [tool]
ScenicView is a JavaFX tool that allows you to see the UI structure of other JavaFX apps. It can be useful when debugging issues with complex layouts.
@Erel · 2020-08-11
B4JSnippetBase64 [XUI]
SD Base64 - Encode / Decode [XUI]
SD Base64 - Encode / Decode [XUI]
@Star-Dust · 2020-07-19
B4JSnippetGPS/location/maps
B4J offline map app - jpg/jgw
I can not find the offline map app for B4J, therefore I make a little app for it.
@js486dog · 2020-07-12
B4JSnippetGPS/location/maps [JPG/JGW]
B4J offline map app [jpg/jgw]
I can not find the offline map app for B4J, therefore I make a little code for it.
@js486dog · 2020-07-12
B4JSnippetRaspberry Pi
Raspberry PI - setup as WiFi Access Point and Client
Raspberry PI - setup as WiFi Access Point and Client
@Chris2 · 2020-07-07
B4JSnippetStrings
Measure Multiline Text Height
Measuring the length of multiline text is simple in B4A with StringUtils.MeasureMultilineTextHeight and in B4i by setting the width of a multiline Label and calling SizeToFit. There is no similar method available in B4J. One option is to add a label to an AnchorPane and wait for the layout to be set: https://www.b4x.com/android/forum/threads/measure-text.45750/#post-311358 Another option is to call a non-public API with the following code
@Erel · 2020-06-11
B4JSnippetTable/Grid
B4xTable Row Move
The order of the rows can be changed with the Up and Down buttons from the start to the end of the table rows/records
@rodmcm · 2020-06-03
B4JSnippetAudio/Video
What did you hear?
Train your language listening skills by checking out if you''ve correctly listened what was talked.
@Xandoca · 2020-06-01
B4JSnippetGPS/location/maps
Create KML file
Several have asked how to create a KML file (or KMZ if compressed) starting from a map generated with the GMap library.
@Star-Dust · 2020-05-26