Don’t use Java in a nuclear facility
From the license of Java, Section 3:
“… You acknowledge that Licensed Software is not designed or intended for use in the design, construction, operation or maintenance of any nuclear facility. …”
Found here.
Update (20130318)
It seems the original text has changed. The new version says: “You agree that neither the Software nor any direct product thereof will be exported, directly, or indirectly, in violation of these laws, or will be used for any purpose prohibited by these laws including, without limitation, nuclear, chemical, or biological weapons proliferation.”
Hmm, I preferred the old one :(
A little help for hyphenating words in LaTeX
Problem
When working with LaTeX, sometimes I’m not sure if a word is correctly hyphenated by LaTeX so I’d like to verify that. As I’m not a native English speaker, it’d be nice to hear the correct pronunciation too.
Solution
I made a little script that addresses the two problems (available here). It’s part of my jabbapylib library. The script relies on dictionary.com.
apt-get: “the following packages have been kept back”
Problem
You install something with apt-get and it keeps telling you that some “packages have been kept back”. Great! What to do with that?
Solution
After looking at this warning for years, today I got fed up and looked after it on Google. I found the solution here. If you have a package called X
kept back, then try to install it with “sudo apt-get install X
“. That’s all.
Some beautiful conky setups
Windows 7 stops booting in Virtualbox
I installed Windows 7 in Virtualbox and it worked fine until I installed all the updates… After that the boot process stopped at the splash screen and nothing happened. Neither restart nor boot in safe mode helped.
Solution
Close Virtualbox completely. Restart it and go to the Settings of Windows 7. Here change some parameters, e.g. the number of processors and the amount of memory reserved for the system. After this Windows 7 booted up normally. I could even restore the settings without corrupting the booting process.
Firefox 7 beta
Yesterday I tried Firefox 7 beta. After one day of usage I can say that it works well. I could even install my favorite add-ons.
With FF6 I had some problems: from while to while it blocked for several seconds, the CPU was running on 100%, and then everything came back to normal. I tried to clean my ~/.mozilla
folder but the problem remained. I think I could have solved it by removing ~/.mozilla
completely but then I said to myself: “let’s try FF7 then”. So I closed FF6, renamed ~/.mozilla
to ~/.mozilla6.bak
and started FF7 that created a new ~/.mozilla
folder. No more blockings :)
I’ve never liked the new tab button but there is an easy way to get rid of it. Right click next to it, from the popup choose Customize…, and then drag and drop the new tab button (probably it’ll be on the right side) to the list. Done. This tip is from here.
Zombie.js, PhantomJS
This is not a real post, just a reminder for me. I should look at these projects in detail in the future.
“Zombie.js is a fast, headless full-stack testing using Node.js. Zombie.js is a lightweight framework for testing client-side JavaScript code in a simulated environment. No browser required. Here is a Python driver for it called python-zombie.”
“PhantomJS is a headless WebKit with JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG. PhantomJS is an optimal solution for headless testing of web-based applications, site scraping, pages capture, SVG renderer, PDF converter and many other use cases.“
Node.js
I’ve heard a lot about node.js recently so I looked after it a bit. At the homepage of the project you can find a one-hour long video presentation of the project.
Node.js is a set of libraries on top of Google’s V8 Javascript engine, which is used in Chrome. V8 is a very high performance virtual machine. Node.js uses the greatness of V8 to do networking things. The focus is on doing networking correctly.
Examples
Hello World:
setTimeout(function() { console.log('world'); }, 2000) console.log('hello');
It registers that the first function must be executed in 2 sec. and it goes on. It prints ‘hello’, then ‘world’ 2 sec. later. One very important thing: in node.js there is no blocking (like sleep()). The program exits when there is nothing else left to do.
Simple web server:
var http = require('http'); var s = http.createServer(function(req, res) { res.writeHead(200, {'content-type' : 'text/plain'}); res.write("hello\n"); setTimeout(function() { res.write("world\n"); res.end(); }, 2000) }); s.listen(8000);
All these examples are from the introductory video. In the video there is also a TCP server. He also shows a simple chat server via TCP.
Installation
Under Ubuntu I already had a “node
” command. According to “man node
” it was something different so I removed it (sudo apt-get remove node).
Download the source from the HQ, extract it, then configure
, make
, sudo make install
.
Start it with the command “node” and you get a prompt. Execute a script with “node file.js”.
Further reading
- What is node.js? @ SO
- npm, a package manager for node
- What is Node.js?
- Node.js is genuinely exciting
- Understanding node.js
- Learning Server-Side JavaScript with Node.js
- Node.js Step by Step: Introduction
- Node.js is Cancer (Ted Dziuba doesn’t like Node.js)
You must be logged in to post a comment.