B4JSnippetStrings
Processing an EDN string
Sample code for reading and traversing an EDN structure. EDN is a more flexible data interchange format, than JSON.
@B4JExplorer · 2017-07-22
B4JSnippetB4J Server
jServer v2.80+ Enabling TLSv1.1
TLS v1.1 is disabled in the latest version of jServer, as it is disabled in the underlying Jetty SDK. It is considered a weak protocol and should be kept disabled in most cases. However if you need to access the server with an old client then you might need to enable it.
@Erel · 2017-07-16
B4JSnippetTabPane
Looking form MDI form?
Looking form MDI form? With a TabPane.
@jroriz · 2017-07-03
B4JSnippetMaths
Math functions
Constants: e = base of the natural logarithm = 2.71828182845905 pi = 3.141592653589793 Trigonometric sin(x); cos(x); tan(x); asin(x); atan(x) Hyperbolic sinh(x); cosh(x); tanh(x) logarithm logn(x); log10(x) Exponential Exp(x) = e raised to x power Other abs(x); sqrt(x); round(x); int(x); frac(x) Operators +; -; *; /; ^ @ = logarithm Number@base Ex.: 10@5
@BeneBarros · 2017-06-27
B4JSnippetFile handling
How to include many files into app without using files manager.
My aim was to include a lot of image files saved in directories in my app. Adding the files with the files manager tab was not of interest, as I had over 400 files. This solution comes from Erel and I am adding it here because its so simple and neat!
@Mark Read · 2017-06-21
B4JSnippetList- and scrollview
ListView based on FXML scene with image download
Dynamically adjust the layout of a listview and re-use the code for different projects.
@notedop · 2017-06-18
B4JSnippetDatabase
JRDC and Periodic backup of MySql database
I want to share this piece of code found on internet. Really it has nothing to deal with B4J programming, but anybody that uses JRDC will find useful to make a regular backup of the MySql database. So, it''s a batch file.
@marcick · 2017-06-13
B4JSnippetDatabase
Load A JDBC Driver Dynamically At Run Time Using Inline Java
Load A JDBC Driver Dynamically At Run Time Using Inline Java
@keirS · 2017-06-13
B4JSnippetGPS/location/maps
Google Maps API Key
Oops! Something Went Wrong! (when trying to display a Google Map in your app). You need a key. Get a browser based key.
@Harris · 2017-05-14
B4JSnippetB4J Server [SERVER]
Persistent JDBC Session - Store session data in database [Server]
Call this sub after the server is started (srvr.Start). The sessionIds and SessionData tables will be automatically created (your database user needs to have the privileges to create tables) This is usefull if you have many instances of an app and you want the session to be shared between them. And if you restart the server you don''t lose your session data. This is for the current B4J jetty version (9.3) More about this: http://www.eclipse.org/jetty/documentation/9.3.x/session-clustering-jdbc.html
@mindful · 2017-04-21
B4JSnippetDatabase
Sqlite version
Get the Sqlite version number
@B4JExplorer · 2017-04-21
B4JSnippetMap
First stab at Functional Map, Reduce and Filter in B4J
First stab at Functional Map, Reduce and Filter in B4J
@B4JExplorer · 2017-04-17
B4JSnippetABMaterial [ABMATERIAL]
JustGauge 1.2.2 Custom Component [ABMaterial]
JustGauge 1.2.2 Custom Component [ABMaterial]
@Mashiane · 2017-04-08
B4JSnippetStrings
IsUnsignedInteger/IsSignedInteger/IsUnsignedDecima l/IsSignedDecimal/GetDecimalSeparator
Test if strings are numeric
@walt61 · 2017-04-05
B4JSnippetDatabase [RDC SNIPPET]
delegating the response management [RDC snippet]
delegating the response management [RDC snippet]
@Cableguy · 2017-02-21
B4JSnippetTooltip
Configure Tooltip timings
I have found that the tooltip delay is too long most of the time, searching google I found this:https://gist.github.com/darmbrust/9559744d1b1dada434a3 This is a straight implementation of this code.
@stevel05 · 2017-02-17
B4JSnippetGame
Solitaire (simple game) with sources
Solitaire (simple game) with sources
@BeneBarros · 2017-02-15
B4JSnippetB4J
It is not an MDI. But the idea works.
It is not an MDI. But the idea works.
@BeneBarros · 2017-02-13
B4JSnippetRandomise
Random String Password
I needed to generate a random password (string) of variable length that contains a mix of upper/lower case and numbers. It also avoids special characters. It is random and there are no checks - so there are no guarantees that it would meet complexity rules. Im sure there are better ways to do this but I just needed something quickly.
@tchart · 2017-01-31
B4JSnippetOther
Skins
Skins
@BeneBarros · 2017-01-23
B4JSnippetRegEx
Get URL from String using RegEx
Get URL from String using RegEx
@mindful · 2017-01-20
B4JSnippetEncryption
Password SHA512 hash and salt
Generates a SHA512 hash of a string based on a given salt
@mindful · 2017-01-08
B4JSnippetViews - additional
Leds and switches
Leds and switches
@BeneBarros · 2016-12-30
B4JSnippetFile xfer
Download file using HttpUtils and webView with cookies
Download file using HttpUtils and webView with cookies
@mc73 · 2016-12-04
B4JSnippetABMaterial [ABMATERIAL]
Responsive Design - Input Footer [ABMaterial]
This is always a challenge. A phone in portrait mode is nothing like a tablet or desktop in landscape... Fortunately, we can adjust the appearance for phone or desktop. I don''t worry about tablets since they automatically take the best from both (upper and lower) screen views.
@Harris · 2016-12-01
B4JSnippetSpinner
Spinner View Change Style Arrows
The default style class of the Spinner View (since B4J 4.70), has the arrows to the right and stacked vertically. This can be changed using a different style class: arrows-on-right-horizontal, arrows-on-left-vertical, arrows-on-left-horizontal, split-arrows-vertical, split-arrows-horizontal
@rwblinn · 2016-12-01
B4JSnippetOther
How to set ''MainForm'' both as Utility and as Transparent
A form cannot be styled to be BOTH as UTILITY and as TRANSPARENT... So I found a little workaround
@Cableguy · 2016-11-22
B4JSnippetWebApp [SERVER][WEBSOCKETS][WEBAPP]
Browser Window Session Store [Server] [WebSockets] [WebApp]
This is a code helper. It can be used to identify the browser window/tab and/or store attributes in session referencing that window/tab. This can be helpful if you users use your app with multiple tabs opened in one browser (because multiple tabs in the same browser share the same session).
@mindful · 2016-11-20
B4JSnippetABMaterial [SERVER][WEBSOCKETS][ABMATERIAL]
Check if browser has cookies enabled [Server] [WebSockets] [ABMaterial]
You can check if browser has cookies enabled using this code based on the navigator object
@mindful · 2016-11-16
B4JSnippetB4J Server [SERVER]
Disable/Enable cache for specific static files [Server]
Disable/Enable cache for specific static files [Server]
@mindful · 2016-11-16