Spring Framework - Application Context - three ways to get to the application context

Spring Framework - Application Context - three ways to get to the application context

This article shows you three different ways how to get to the Spring Framework Application Context in your code. Summary (This is a repost of an older article I wrote in 2010). In searching Google for “Spring ApplicationContextAware”, you will come across a lot of recommendations and I also see a lot of folks continuing to complain saying that their setApplicationContext method does not get invoked. So to help clarify, I’m blogging a few notes in hope that it helps clarify how the context works.

Quantum Computing Demands a Whole New Kind of Programmer

[![](/img/2017/05/quantum-computing-whole-new-kind-of-programmer-1-1068x601.jpg)](https://singularityhub.com/2017/05/09/quantum-computing-demands-a-whole-new-kind-of-programmer/)Quantum computers finally seem to be coming of age with promises of “quantum supremacy” by the end of the year. But there’s a problem—very few people know how to work them. The bold claim of achieving "quantum supremacy" came on the back of Google unveiling a new quantum chip design. The hyperbolic phrase essentially means building a quantum device that can perform a calculation impossible for any conventional computer. The technology has a major challenge to overcome.
Javascript: Embrace Arrow Functions

Javascript: Embrace Arrow Functions

Great article on JavaScript currying and arrow functions. Here is an example of a function in Javascript: const secret = function (msg) { return function () { return msg; }; }; The same function as currying or arrow function: const secret = msg => () => msg; To learn more about the basics, visit the link below. Source: Familiarity Bias is Holding You Back: It’s Time to Embrace Arrow Functions
Elements of JavaScript Style – JavaScript Scene – Medium

Elements of JavaScript Style – JavaScript Scene – Medium

Great article focusing on Javascript style. Provides some good examples of JavaScript coding styles, practices, and things to avoid. The examples includes: 1. Make the function the unit of composition. One job for each function. 2. Omit needless code. 3. Use active voice. 4. Avoid a succession of loose statements. 5. Keep related code together. 6. Put statements and expressions in positive form.
uvloop - Python replacement for asyncio event loop

uvloop - Python replacement for asyncio event loop

uvloop is a fast, drop-in replacement of the built-in asyncio event loop. uvloop is implemented in Cython and uses libuv under the hood. Benefits: uvloop makes asyncio 2-4x faster. Cons: uvloop is available from PyPI but it requires Python 3.5. (The reason for this is asyncio was introduced in Python 3.4 and above.) Unless your project is based on Python 3.4+ - you may not be able to leverage this library.
A URL Shortener Service using Go, Iris and Bolt – Medium

A URL Shortener Service using Go, Iris and Bolt – Medium

Go (cross-platform language/compiler) + Iris (web framework in Go) + Bolt (embedded key-value DB) = one powerful combination Read more at https://medium.com/@kataras/a-url-shortener-service-using-go-iris-and-bolt-4182f0b00ae7#.8ltduw3kf

Python pycharm - configuring remote interpreters from Windows to Linux

If you are an avid Python developer, you may all be excited about the new features available in the Pycharm 2.5 release, especially the remote interpreters, virtualenv and setup.py support. You can read more about the new exciting features here. But as I started to tinker with the “remote interpreter” feature - I stumbled upon some challenges and I thought I’d document them for other PyCharm users who might benefit from this blog entry.

How to extract public key from certificate?

How to extract public key from certificate? Recently I had to extract the public key from a certificate. Each time I do this I end up looking up the man pages for openssl and so I thought I’d blog it for myself and for others to use when needed. $ openssl x509 -inform pem -in certificate.pem -pubkey -noout > publickey.pem Enjoy

Extract all images in PDF file in a directory (batch extract images)

Sometimes you need a way to extract all images in a PDF but then you have a directory of files and you need to extract them iteratively. Prerequisites: Install Cygwin or linux environment with Perl support. Install ImageMagick. Install GhostScript. Afterward run the following script: [sourcecode language=“jscript”] #!/bin/perl my $directory = $ARGV[0]; opendir (DIR, $directory) or die $!; while (my $file = readdir(DIR)) { if ($file =~ m/.

Spring Framework Samples and Reference Implementations online in svn

Sometimes it’s good to look at the svn repository for the reference sample that Spring Framework provides. Here’s a quick link for that URL: https://src.springframework.org/svn/spring-samples/ You can traverse through it via a HTTP(s) browser or you can download the latest samples via tools like TortiseSVN. Here is a list of some of the projects samples that are available today: spring-samples - Revision 431: / * configuration-basic/ * jpetstore/ * mvc-ajax/ * mvc-basic/ * petcare/ * petclinic/ * petclinic-groovy/ * spring-travel/ * task-basic/ * templates/ * tutorials/ Hopefully this article will be beneficial for someone who is trying to get familiar with Spring Framework.

Java 6 Gems: Spash Screen for your application

In my coverage of all the new features that are part of Java SE 6, there is a new gem added that makes the user experience very clean and concise when you bring up a web-start or applet or desktop based Java application. Namely, the splash screen. When you load up a native application, it’s very traditional to display a “splash screen” with the company logo and branding of the particular product.

Finding the balance for your open source skills with .NET

I have been a strong supporter of Open Source technologies including Java, Python, Scala, Ruby and Perl for many, many years. But in order to be a strong Enterprise Architect, it’s best to also understand the various other technologies (some proprietary) to gain a broader-balanced view of technology and whats out there. And in this ever changing world of technology - knowing the various options you have can make the difference between being nimble and creative to an implementation that bites the dust.

Java 6 Gems: Scripting Framework to support Rhino Javascript and Groovy (natively)

What is it? With Java 6 there is a new addition (package: javax.script) that allows you to work with scripting languages like Javascript (using Rhino) and Groovy. Although there is built in support for adding scripting engines like Groovy, PHP, Perl, etc - what’s bundled in this release is Mozilla’s Rhino Javascript Engine. Why embed a scripting language? Most scripting languages out there are dynamically typed. Meaning, your code does not need to know what type of value you will be storing in a particular field at compile time.

Speeding up your load time for your Java applets and webstart applications

Today we are going to look at a new feature available in Java 5 and above that can speed up your load time of your jar’s within your applets and web start (provided you have a web server that’s hosting the jar that’s HTTP/1.1 compatible server). Let’s first take a look at what happens on the back-end: In a typical applet (same applies to a web-start application), you have a src/source tag that points to a JAR file like this: