Saturday, 22 January 2011
Tuesday, 11 January 2011
LateX packages on Ubuntu 16:29
To install LateX packages on Ubuntu:
- Download the package from CTAN, the Comprehensive TeX Archive Network
All files should be placed in the same directory, so it can be found by LateX. This will also allow to move everything in one go, if you want to build up a new system. To be found by LateX, the following directory tree must be respected.
- Create a folder in your home directory called texmf/tex/latex/packagefoldername (if you have multiple users on the same computer, you'll need to create a folder on every home directory):
e.g. texmf/tex/latex/listings
- If your package is a made of a single file with .sty extension, just place it in the folder and that's it. It will be accessed by LateX.
- If the package is made of several files, copy all files into the folder you've just created, or at least the file with the .ins extension, and run "latex filename.ins", this will create the filename.sty file. In my case, it was "latex listings.ins"
- Finally run "texhash ~/texmf" for LateX to recognise the new package.
You can now include your package in your .tex files in the preamble, such as:
\usepackage{listings}
link to documentation
- Download the package from CTAN, the Comprehensive TeX Archive Network
All files should be placed in the same directory, so it can be found by LateX. This will also allow to move everything in one go, if you want to build up a new system. To be found by LateX, the following directory tree must be respected.
- Create a folder in your home directory called texmf/tex/latex/packagefoldername (if you have multiple users on the same computer, you'll need to create a folder on every home directory):
e.g. texmf/tex/latex/listings
- If your package is a made of a single file with .sty extension, just place it in the folder and that's it. It will be accessed by LateX.
- If the package is made of several files, copy all files into the folder you've just created, or at least the file with the .ins extension, and run "latex filename.ins", this will create the filename.sty file. In my case, it was "latex listings.ins"
- Finally run "texhash ~/texmf" for LateX to recognise the new package.
You can now include your package in your .tex files in the preamble, such as:
\usepackage{listings}
link to documentation
Thursday, 6 January 2011
Pinhole Photography 13:34
First snapshots done with the body of a Soviet Zenith XP12 and a pinhole in a tin can. It's taking me back to the beginning of the camera obcura, at least conceptually. Was thinking of Niépce. What about back to developing in a cupboard?
Pinhole - English landscape #1 - Birchfields

Pinhole - English landscape #2 - Levenshulme
Pinhole - English landscape #1 - Birchfields
Pinhole - English landscape #2 - Levenshulme
Labels:
Photography
Tuesday, 21 December 2010
Firefox Flash player Ubuntu 10.10 LTS 64bit 13:43
In order to get the Flash player for Firefox under Ubuntu 10.10 64bit, it can easily be installed at the command prompt, typing:
sudo add-apt-repository ppa:sevenmachines/flash && sudo apt-get update && sudo apt-get install flashplugin64-installer.
You can refer to https://help.ubuntu.com/community/RestrictedFormats/Flash#installation for more detailed information.
sudo add-apt-repository ppa:sevenmachines/flash && sudo apt-get update && sudo apt-get install flashplugin64-installer.
You can refer to https://help.ubuntu.com/community/RestrictedFormats/Flash#installation for more detailed information.
Labels:
Computing
Thursday, 2 December 2010
Installing Apache Tomcat on Windows7 21:03
- Installing tomcat on Windows 7
- Download Apache Tomcat from the website http://tomcat.apache.org/index.html
- Unzip it
- Place the folder in a directory suitable for your system
e.g. C:\Program Files\Whatever
- If the classpath is correctly set, at the command prompt, navigate to the \bin folder of your apache-tomcat- (If not there's a previous post that will tell you how to do that).
- run startup.bat to start it up
- shutdown.bat to stop the server
- check with your browser if the server is correctly running, by typing in the address bar, http://localhost:8080
- Apache's Tomcat web page should load with no problem
- Now you're ready to develop your best web apps.

- Download Apache Tomcat from the website http://tomcat.apache.org/index.html
- Unzip it
- Place the folder in a directory suitable for your system
e.g. C:\Program Files\Whatever
- If the classpath is correctly set, at the command prompt, navigate to the \bin folder of your apache-tomcat-
- run startup.bat to start it up
- shutdown.bat to stop the server
- check with your browser if the server is correctly running, by typing in the address bar, http://localhost:8080
- Apache's Tomcat web page should load with no problem
- Now you're ready to develop your best web apps.
Labels:
Computing
How to set the Java Classpath 20:45
In Windows 7:
Control Panel->System->advanced system settings->environment variables->system variables:
Create new variables:
->click new
variable name: CLASSPATH, variable value: C:\Program Files\Java\jdk1.6.0_22
variable name: JAVA_HOME, variable value: C:\Program Files\Java\jdk1.6.0_22
variable name: Path, variable value: ...;...;C:\Program Files\Java\jdk1.6.0_22\bin; (append it to the existing path, don't forget the semi-columns(;))
Control Panel->System->advanced system settings->environment variables->system variables:
Create new variables:
->click new
variable name: CLASSPATH, variable value: C:\Program Files\Java\jdk1.6.0_22
variable name: JAVA_HOME, variable value: C:\Program Files\Java\jdk1.6.0_22
variable name: Path, variable value: ...;...;C:\Program Files\Java\jdk1.6.0_22\bin; (append it to the existing path, don't forget the semi-columns(;))
Labels:
Computing
Saturday, 6 November 2010
Google Maps in Android (emulator) 21:18
In order to get google maps in your apps and so build location-based services, your must register with Google, and include a key that they'll provide against a MD5 string that you get from your own system. If you're like me, just developing and debugging without deploying your apps, you'll need one key called "debug.store", another one will be used to comercially deploy your apps.
I've done that using Eclipse, so here it goes. Locate your .android folder, on Ubuntu/Linux, that's in ~/.android, it's a hidden file, (hence the dot .android, type ls -a for hidden files), on Windows 7, its location is at C:\Users\\.android. This file contains a digital certificate that is going to be used to create the MD5 string. You need Keytool in Eclipse, Eclipse is the "does it all for you" and is getting really powerful so if you're concerned with efficiency in producing code, Eclipse is the main thing.
To install keytool, once again go to the Help menu, install new software (in Helios), click add for a new repository, add
Once installed, they'll be a menu called keystore, choose open keystore, browse to the "debug.store" in the .android folder, and type "android" as password. It took me a while to find the password ... In the lower part of eclipse, where the console usually is, select the keytool tab if it's not already, double click on "androiddebugkey", the certificate should open and the MD5 Fingerprint displayed. Copy it and go to Maps API Key Signup - http://code.google.com/android/add-ons/google-apis/maps-api-signup.html, you need a valid Google account for that, accept their terms and conditions, and paste the key where it says so. It should give you back the key to insert in your code. That's in your project folder in Eclipse, open main.xml located in the res then layout folder and where it says apiKey, insert it. Now theoretically, it should display a Google map in your app. And it does!
Your main.xml should look like this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<com.google.android.maps.MapView
android:id="@+id/mapview1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="Your API Key" />
</LinearLayout>
I've done that using Eclipse, so here it goes. Locate your .android folder, on Ubuntu/Linux, that's in ~/.android, it's a hidden file, (hence the dot .android, type ls -a for hidden files), on Windows 7, its location is at C:\Users\
To install keytool, once again go to the Help menu, install new software (in Helios), click add for a new repository, add
http://keytool.sourceforge.net/update, (check http://keytool.sourceforge.net/), then follow the usual procedure to install plugins in Eclipse.Once installed, they'll be a menu called keystore, choose open keystore, browse to the "debug.store" in the .android folder, and type "android" as password. It took me a while to find the password ... In the lower part of eclipse, where the console usually is, select the keytool tab if it's not already, double click on "androiddebugkey", the certificate should open and the MD5 Fingerprint displayed. Copy it and go to Maps API Key Signup - http://code.google.com/android/add-ons/google-apis/maps-api-signup.html, you need a valid Google account for that, accept their terms and conditions, and paste the key where it says so. It should give you back the key to insert in your code. That's in your project folder in Eclipse, open main.xml located in the res then layout folder and where it says apiKey, insert it. Now theoretically, it should display a Google map in your app. And it does!
Your main.xml should look like this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<com.google.android.maps.MapView
android:id="@+id/mapview1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="Your API Key" />
</LinearLayout>
Labels:
Computing











