Skip to main content

Posts

Creating a Joke Application in React

Introduction I've recently started learning React. I've been a backend developer for a long time, but have started to love doing client side work. As they say, the best way to learn is to practise. So here is a simple joke application that I've written in React. The source code for the application can be found on GitHub at: https://github.com/doobrie/react-joke Creating the project Whilst practising, I've quite often created projects from scratch, but this is quite tedious as the same steps need to be taken for each project. I needed to create the project structure, configure Babel, write some control scripts etc. Instead of doing that this time, I've used the create-react-app tool to scaffold the basics of an application. npx create-react-app This sets up everything that you need to get started with a React app. Coding As this is a simple project, I've created one react component, function app() . I've created this as a functional c...
Recent posts

Dock flickering In Gnome

I'm using Pop!_OS on my current machine, and have the Gnome desktop enabled. I'm always on the lookout for good tweaks and one that I like is Dash To Dock that turns the standard Dashboard along the left hand side of the screen into a dock, similar to on MacOS. I really like this extension as it fits my workflow better to have a dock on my screen that automatically hides when a window covers it. You can add your favourite applications to it and also add the application launcher. I'm currently running Gnome version 3.38.3 and there's a small bug that makes the application launcher flicker when its opened. Fortunately, there is a simple fix described here . On my machine, this meant editing the ~\.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/docking.js file and editing the if (animate) { clause at line 1896 to read: if (animate) { Main.overview.viewSelector._activePage = Main.overview.viewSelector._appsPage; Meta.later_add(Meta...

Changing Default Search Provider in Firefox on Linux Mint

On Linux Mint, the default version of Firefox is installed and configured to allow the following search engines to be queried directly from the address bar: Yahoo! Startpage DuckDuckGo Wikipedia Mint defines these as the default available set of search engines based upon 3 criteria (funding to Linux Mint, privacy support and whether the search engine is non-commercial). Other search engines such as Google, Bing or Twitter, etc. can easily be added into the default version of Firefox however. To add a different search provider, browse to Search Engines At the bottom of the page, click on the icon of the requested search engine, then click on the ... button in the URL bar and select the Add Search Engine option. You then have the option to change the default search engine within Firefox preferences to your new choice.

Bootstrap CDN Plugin for NetBeans Release 1.1.0

I've just released version 1.1.0 of the Bootstrap CDN Support Plugin for NetBeans 8. The Bootstrap CDN plugin allows you to easily add references to the Bootstrap CSS and JS files hosted at the Bootstrap CDN directly from within NetBeans. Version 1.1.0 of the plugin allows you to choose the version of the files to references (all releases from v3.0.0 onwards) plus allows you to choose whether to references the CSS, the JS or both in your web pages. The plugin can be downloaded from github where the source code can also be found. If you find the plugin useful, or you find any bugs, please let me know either as a github issue or in a comment to this post.

Rapid Bootstrap CDN Support in NetBeans

I've just published a NetBeans 8 plugin that allows developers to quickly add links to Bootstrap CSS (hosted by bootstrapcdn.com) into their .xhtml files. Once installed, the plugin is appears on the "Insert Code..." dialog within .xhtml files. Selecting the "Bootstrap CDN..." option causes the Bootstrap version selector dialog to be displayed. Select a version of Boostrap CSS to be linked to and press the "OK" button and a link will be added into the file, e.g. <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"></link> The .NBM can be downloaded from GitHub along with the full source code . Let me know if you find this useful or if you find any bugs in the plugin.

Unable to start WildFly from NetBeans ?

NetBeans 8 provides native support for WildFly 8. Sometimes however, WildFly can fail to start from within NetBeans. In these instances, the following error is displayed within the NetBeans "WildFly Application Server" output window. Calling "C:\DevTools\wildfly-8.0.0.Final\bin\standalone.conf.bat" | was unexpected at this time. This error has been reported as NetBeans error 242661 . To get around the problem, bring up the server properties for WildFly (right click on WildFly in the services tab and choose Properties).  On the platform tab, uncheck the "Use IDE Proxy Settings" option and then restart NetBeans. You should now be able to start/stop WildFly directly from within NetBeans.

Creating Maven Projects For WildFly

The JBoss/WildFly way to configure Maven projects makes developing Java EE 7 applications with WildFly very straightforward. Configuring a project to use the JBoss Java EE 7 Bill Of Materials (BOM) removes the difficulty of specifying what version of dependencies are required as these are already defined within the BOM. So, to configure a WildFly project, we need to first define the BOM in the project's pom.xml file. <properties> <version.jboss.bom>8.0.0.Final</version.jboss.bom> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>org.wildfly.bom</groupId> <artifactId>jboss-javaee-7.0-with-tools</artifactId> <version>${version.jboss.bom}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> Once...