1 Temmuz 2011 Cuma

VMWare installation error: unknown encoding: ISO-8859-1

During VMWare installation on opensuse 11.2, i got this error:


SyntaxError: ('unknown encoding: ISO-8859-1', ('/usr/lib/vmware-installer/1.1/python/lib/sqlite3/__init__.py', 0, 0, None))



installation file is: VMware-Player-3.1.4-385536.x86_64.bundle

http://www.slax.org/forum.php?action=view&parentID=37046 says that this error is due to system local settings is Turkish.

sudo LANG=en ./VMware-Player-3.1.4-385536.x86_64.bundle  command worked for me..

17 Mayıs 2011 Salı

a few latex tips

unordered list sample in latex:

\begin{itemize}
\item \emph{item1: }bla...
\item \emph{item2:} bla bla...
\item \emph{item3:} bla bla bla...
\end{itemize}

defining a figure in latex:
\begin{figure}
\centering
\scalebox{0.5} {\includegraphics{myPhoto.PNG}}
\caption{My Photo Description}
\label{fig:myPhoto}
\end{figure}

note: don't forget to put this in document beginning:
\usepackage[pdftex]{graphicx}

.. and reference it:
.. as in Figure ~\ref{fig:myPhoto}

the point here is putting label after caption.. otherwise, you may not reference the figure correctly.. for more, see http://www.latex-community.org/forum/viewtopic.php?f=45&t=3823

6 Nisan 2011 Çarşamba

JavaFX MediaBox exception: Connection refused: connect.


Problem
When you build the JavaFX MediaBox component (or a modified version of it), Netbeans 6.9.1 ide produces the following files under dist folder.
MediaBox.html
MediaBox.jar
MediaBox.jar.pack.gz
MediaBox.jnlp
MediaBox_browser.jnlp

When you move those files to production environment (some other location or a web server), you may get the following error, when you try to see MediaBox.html via a browser.

exception: Connection refused: connect.
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
.....
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.net.ConnectException: Connection refused: connect

Solution
In my case, this was due to .jnlp files.
Editing codebase and homepage attributes accordingly in both MediaBox.jnlp and MediaBox_browser.jnlp files fixed the issue.


4 Nisan 2011 Pazartesi

problem passing time info through jaxws web service

reading http://hilaltarakci.blogspot.com/2009/10/revisited-troobleshooting-date-becomes.html beforehand may be useful for this post..


there was a problem while passing date info through jaxws web service; time info was absent..
However, editing the DateAdapter as follows solved the problem:

public class DateAdapter {

public static Date parseDate(String s) {
System.out.println("========= DateAdapter.parseDate param:" + s);
System.out.println("========= DateAdapter.parseDate:" + DatatypeConverter.parseDate(s).getTime().toString());
return DatatypeConverter.parseDate(s).getTime();
}

public static String printDate(Date dt) {
Calendar cal = new GregorianCalendar();
cal.setTime(dt);
//System.out.println("========= DateAdapter.printDate param:" + dt.toString());
System.out.println("========= DateAdapter.printDate: " + DatatypeConverter.printDateTime(cal).toString());
return DatatypeConverter.printDateTime(cal).toString();
}
}