Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

2013-07-01

Switching between OpenJDK v.6 and v.7 in Debian 7 Wheezy


In Debian 7 Wheezy for the architecture amd64 (most of the modern 64-bit architectures) the default OpenJDK is OpenJDK v.6.

But what if you want OpenJDK v.7 (Java 7)?

Debian Wiki ( http://wiki.debian.org/Java ) already have the answer, what and how to do, but this answer mining should take you for a while...

Here is the howto.

First, open the terminal and
$ su -l

Now install the JDKs:
# aptitude install default-jdk default-jre openjdk-6-jre openjdk-6-jdk openjdk-7-jre openjdk-7-jdk java-common

This will take you for a while.

At Debian 7 the default JDK/JRE version is managed by the 'alternatives' system. So, to list the available (installed) JDKs, type:
# update-java-alternatives -l
The output will be like this:
java-1.6.0-openjdk-amd64 1061 /usr/lib/jvm/java-1.6.0-openjdk-amd64
java-1.7.0-openjdk-amd64 1051 /usr/lib/jvm/java-1.7.0-openjdk-amd64


Now let's switch to Java 7:
# update-java-alternatives -s java-1.7.0-openjdk-amd64

That's all!

Please, check the Java version:
$ java -version
$ javac -version
In both cases, the versions should be like 1.7.*

Enjoy!

2012-06-14

Some humour at programmer's life

During my research and programming work I find this programming language:

http://en.wikipedia.org/wiki/Brainfuck

Take a rest, reading about this Turing tarpit. :)

2011-05-06

ZenPhoto: Powerful tool to make photo galleries

After relocation of my family's web-site davimas.name to Dreamhost, I get the ability to place entire photos from Nuclear Physics Conferences and many other images, too large to be published using Flikr or Pikasa. But what software is the most suitable to manage multi-album, tree-like set of photos?

2011-04-19

MoinMoin and Sitemap

To inform search engines about available URLs at Your web-site You can use sitemaps in special XML-format (http://www.sitemaps.org/).

Such useful XML can be generated by MoinMoin wiki engine in response to request like: http://example.com/FirstPage?action=sitemap Here FirstPage is the start page of Your wiki.

I write this post, suggesting Your site uses "clean URLs" technology, described in my previous post: http://en.vas.davimas.name/2011/04/moinmoin-wiki-engine-and-clean-urls.html

2011-04-17

vas-short-progs - Simple Programs for Education Purposes

Project vas-short-progs is just a collection of simple and short programs for education and demonstration purposes.

Now it has only one simple Java program: MemoryCache. MemoryCache is used to demonstrate students how to implement simple caching system, storing cached objects in Heap.

vas-short-progs hosting configuration is equal to schq with code hosted and managed throw Launchpad: https://launchpad.net/vas-short-progs and wiki at my family's website: http://davimas.name/software/vas-short-progs.

schq - Two-Body Radial Schroedinger Equation Solver for Local Potentials Model

This is the computational program, used by international group of theoreticians at nuclear physics to obtain characteristics of few-body nuclear systems at low energies.

Development process of schq passed the startup phase. The first release should be published in aim to make this program available for everyone of our group. Also we need instruments to develop schq and adopt it for the new tasks.

It is just a task for a Launchpad! schq project registered as: http://launchpad.net/schq at Launchpad. As of cbr2ecbformat case, schq project's wiki placed at my family's web-site. But in the case of schq, this is due to lack of wiki service at Launchpad.

Long live Launchpad!

Launchpad - software collaboration platform, that looks great!

I look for a place to host the code of my projects. This should be as free software's place as possible.

So, I find Launchpad. It looks great! Moreover, it uses GNU Bazaar as CVS! For me it is amazing! I like Bazaar and use this CVS to control my projects' code during more than two years.

But Launchpad not only give the way to host the project's code. It gives an instruments for Bug tracking, Code reviews (and making releases), Blueprints, Answers, and more, and more...

I shall try Launchpad in real tasks.

cbr2ecbformat - XML format converter for Virtuemart

http://code.google.com/p/cbr2ecbformat/

This is my simple program to "teach" Virtuemart to get currencies exchange rates from www.cbr.ru in place of www.ecb.int.

MoinMoin wiki engine and "clean URLs"

What URLs look smarter? Just look:
http://example.com/index.cgi/ExamplePage
or
http://example.com/ExamplePage


I think, that the second URL looks smarter. Such URLs are called as "clean URLs". But how to achieve this at Your web-site, if You are using MoinMoin wiki engine as website revision system (WRS or CMS)?


How to use Google Analytics with MoinMoin wiki engine?


To start using Google Analytics, You must place some piece of code into Your site's webpages. What should be done, if Your site uses MoinMoin wiki engine as website revision system (WRS or CMS)? Where to place the code?