lundi 3 décembre 2012

latex floatflt.sty not found in mac



mkdir -p /usr/share/texmf-texlive/tex/latex/floatflt
cd /usr/share/texmf-texlive/tex/latex/floatflt
rm -f floatflt.* float*.tex
wget http://mirror.ctan.org/macros/latex/contrib/floatflt/floatflt.ins
wget http://mirror.ctan.org/macros/latex/contrib/floatflt/floatflt.dtx
latex floatflt.ins
texhash /usr/share/texmf-texlive
PS: using mac, the folder is ~/Library/texmf/tex/latex, then go to that directory, and run the command wget ...
Ref: Incidentally, if you want to add files to TEX Live for one particular user, install them in a similar tree ~/Library/texmf where ~/Library
 is the Library folder in that user’s home directory. The folder texmf 
and other folders for the tree will have to be created. For instance, 
TEX will find any file in ~/Library/texmf/tex or a subfolder of this location, LATEX will find any file in ~/Library/texmf/tex/latex or a subfolder of this location, and BibTEX will find any .bib file in ~/Library/texmf/bibtex/bib or a subfolder of this location, and any .bst file in ~/Library/texmf/bibtex/bst or a subfolder of this location. It is not necessary to use texhash when adding files to this local tree.    

jeudi 1 novembre 2012

MAC 下屏蔽某些网站

为了使我在工作的时候不去某些网站浪费时间,在苹果电脑上可以使用以下方法屏蔽某些域名,使之转向与自己的电脑。

1: 使用命令:
 sudo vim /private/etc/hosts


2: 显示如下:
  1 ##
  2 # Host Database
  3 #
  4 # localhost is used to configure the loopback interface
  5 # when the system is booting.  Do not change this entry.
  6 ##
  7 127.0.0.1   localhost
  8 255.255.255.255 broadcasthost
  9 ::1             localhost
 10 fe80::1%lo0 localhost


3: 在文件后添加若干行(11-13行),每行对应一个域名,文件如下:
  1 ##
  2 # Host Database
  3 #
  4 # localhost is used to configure the loopback interface
  5 # when the system is booting.  Do not change this entry.
  6 ##
  7 127.0.0.1   localhost
  8 255.255.255.255 broadcasthost
  9 ::1             localhost
 10 fe80::1%lo0 localhost
 11 127.0.0.1   www.weibo.com/
 12 127.0.0.1   www.renren.com/
 13 127.0.0.1   sports.sina.com.cn/


4: 退出编辑器:wq

如果是linux 机器,修改/etc/hosts 文件应该可以达到想通的效果。

jeudi 18 octobre 2012

有关rmi 的一些问题

- the java.rmi.server.codebase Property

    the classes needed to execute remote method calls can be downloaded from "file:///" URLs, but like applets, a "file:///" URL generally requires that the client and the server reside on the SAME physical host

information from: http://docs.oracle.com/javase/1.4.2/docs/guide/rmi/codebase.html

-

samedi 13 octobre 2012

Latex TexShop 输入中文

%!TEX encoding = UTF-8 Unicode
\documentclass[12pt]{article}
\usepackage{CJKutf8}
\begin{document}
\begin{CJK}{UTF8}{bsmi}
This is a test. 中文字測試。
\end{CJK}
\end{document}

原址:http://philip.pixnet.net/blog/post/18367221-%5Bmac%5D%E5%9C%A8mac%E4%B8%8A%E5%AE%89%E8%A3%9Dlatex%E6%95%99%E5%AD%B8


vendredi 5 octobre 2012

NOKIA N95 恢复系统出厂设置


1.软格  待机状态下输入 *#7370# ,系统会提示你是否恢复出厂设置,选择【是】,密码默认是:12345。这个时候等待手机重启就可以了,选择【是】后,千万不要断电!必须等到手机再次进入桌面才可以操作,最后设置好正确的时间就可以。

2.硬格  先关机,然后先同时按住这三个键【发射、3、*】不要松开,然后开机,仍然不要松开手,一直到 蓝色的【NOKIA】显示并闪动后,再松手。这个时候等待手机重启就可以了,选择【是】后,千万不要断电!必须等到手机再次进入桌面才可以操作,最后设置好正确的时间就可以。

lundi 24 septembre 2012

去掉vim 中的^M

使用下面的命令

%s/^V^M//g 
其中:
 ^V 是ctrl+V,^M是ctrl+M。
因此最终的终端显示应该是:
 :%s/^M//g

-

jeudi 20 septembre 2012

Problem: Server Ode v1.x Server at localhost failed to start.

when you want to start the Apache ODE server, you may have this problem:

java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:55)
Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more


Analyse: miss the tomcat-juli.jar in the Classpath
check by: echo $CLASS_PATH
if the reply is empty, that is.
so you can add the tomcat-juli.jar into the classpath.

Solution:
1. double-click on the ODE server entry in the Servers view; this should open the server configuration editor

http://wiki.eclipse.org/images/0/0b/Server-config-editor.png

2. in the configuration editor, click the "Open launch configuration" link
3. select "Classpath" in the launch configuration dialog and then "Add externals jars..."
4. navigate to your $CATALINA_HOME/bin and select the tomcat-juli.jar

http://wiki.eclipse.org/images/thumb/7/77/Launch-config.png/583px-Launch-config.png

Hope that helps
Bob


this solution comes from the eclipse forum:
http://www.eclipse.org/forums/index.php/m/760341/

-