手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表Tag:官方

Ubuntu下ZS5.5打开之后是空白屏幕的解决方案

安装了ubuntu之后,立马安装上了zendstudio 5.5 结果出现空白屏幕,以为是不兼容呢。也就没注意。然后安装了一个 ZS for eclipse 6,一切正常。更加肯定了自己的机器与ZS5的不兼容。

可是,我的屏幕只有12。1,在ZS6下面,能够给我写代码的地方太小了。。。。简直无法下手。

于是就想怎么解决5。5的问题。

想不到啊。一直劝别人:内事不决问百度外事不决问google的,象ZS这种进口软件,我居然没有想到问问google。不过,我问了Vampire(政委)同学,他采用了我教别人的方法,然后给了我条答案。

不敢独享。。。

以下内容来自官方网站,地址为:http://www.zend.com/support/knowledgebase.php?kbid=241,不翻译了,也没有什么好翻译的。。。。

Zend Studio starts up with an empty window, or other GUI problems, due to XGL-Compiz/Beryl (with JRE) compatibility issues

Article #241
Product: Zend Studio

 

Symptoms




When running Zend Studio:
1. The ZS's main window comes up totally empty.
2. Sometimes the window has some of the frames painted, but the rest of the window is empty.
3. In the empty ZS window the mouse cursor is changing while moving around the window (as if there are objects: like buttons and other objects).
4. There were erratic mouse/window movements reported.

Summary




Zend Studio starts up with various windowing GUI problems in some linux distros, while using the XGL-Compiz/Beryl product.

Cause




1. Incompatibility between the XGL environment, the JRE, and the Zend Studio Client.
2. The decoration in the 3D environment clashes with the Java Runtime and distorts the operation and visualization of the Zend Studio client's window.

Workaround




There are two ways to execute Zend Studio, by running the ZDE script, and by running the runStudio_unix.sh script, both are in the bin directory of zend studio
(usually /usr/local/Zend/ZendStudio-/bin)

The following workarounds may be used, but there is no guarantee how well or how long it might work for you in your environment.

  •  
  • modification of ZDE script for xgl:
  •  


1. Open your ZDE script with your favorite editor
2. add the next line of code at line 1693.
options="$options -Dawt.toolkit=sun.awt.motif.MToolkit"

for example:
1693:
1694: debugOut ""
1695: unset POSIXLY_CORRECT
1696: if [ $DO_NOT_FORK ]

becomes:
1693: options="$options -Dawt.toolkit=sun.awt.motif.MToolkit"
1694: debugOut ""
1695: unset POSIXLY_CORRECT
1696: if [ $DO_NOT_FORK ]

3. Save the file.

  •  
  • modification of runStudio_unix.sh script for xgl:
  •  


1. open the the file in your favorite editor.
2. modify the java execution line,
the line starts with: ../jre/bin/java -Xms16m -Xmx256m -cp...
change it to: ../jre/bin/java -Dawt.toolkit=sun.awt.motif.MToolkit -Xms16m -Xmx256m -cp...
^^^^^^^^^^^^^^^^^^^^^^^^^^
as you can see, the only difference is an extra parameter to the java program.
3. Save the file.

Another solution




the AWT_TOOLKIT environment variable can be set in order for Java to choose a working AWT Toolkit.

export AWT_TOOLKIT="MToolkit"

In most Linux Distributions it's enough to append this line to /etc/profile.

The information in this article applies to




Zend Studio Client

Common Problems



On some amd64 based systems, the motif toolkit will not work, complaining that "current locale is not supported in X11".

A solution for this case is to set the XLOCALELIBDIR environment variable to the X11 32 bit locale
directory of your system.
Ubuntu Distribution users will find it at: /usr/lib32/X11/locale.

Ubuntu users can use the following as a startup-script:
#!/bin/bash
export AWT_TOOLKIT=MToolkit
export XLOCALELIBDIR=/usr/lib32/X11/locale
exec ZendStudio-5.5.0/Zend_Development_Environment

  •  
  • more information can be found:
  •  


http://alioth.debian.org/tracker/index.php?func=detail&aid=301730&group_id=30192&atid=410386

Keywords




Zend Studio, ZS, ZDE, IDE, Installation, XGL, Compiz, Beryl, unsupported, blank, empty, window, decoration,xgl

Last Updated: 2008-01-07 09:50:08

Tags: ubuntu, zendstudio, 空白屏幕, 官方, 解决方案

MYSQL官方的文章:几种无限分类的算法……

我只贴一种,其余的去看:http://dev.mysql.com/tech-resources/articles/hierarchical-data.html

The Adjacency List Model

Typically the example categories shown above will be stored in a table like the following (I'm including full CREATE and INSERT statements so you can follow along):

CREATE TABLE category(
category_id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(20) NOT NULL,
parent INT DEFAULT NULL);


INSERT INTO category
VALUES(1,'ELECTRONICS',NULL),(2,'TELEVISIONS',1),(3,'TUBE',2),
(4,'LCD',2),(5,'PLASMA',2),(6,'PORTABLE ELECTRONICS',1),
(7,'MP3 PLAYERS',6),(8,'FLASH',7),
(9,'CD PLAYERS',6),(10,'2 WAY RADIOS',6);

SELECT * FROM category ORDER BY category_id;

+-------------+----------------------+--------+
| category_id | name | parent |
+-------------+----------------------+--------+
| 1 | ELECTRONICS | NULL |
| 2 | TELEVISIONS | 1 |
| 3 | TUBE | 2 |
| 4 | LCD | 2 |
| 5 | PLASMA | 2 |
| 6 | PORTABLE ELECTRONICS | 1 |
| 7 | MP3 PLAYERS | 6 |
| 8 | FLASH | 7 |
| 9 | CD PLAYERS | 6 |
| 10 | 2 WAY RADIOS | 6 |
+-------------+----------------------+--------+
10 rows in set (0.00 sec)

In the adjacency list model, each item in the table contains a pointer to its parent. The topmost element, in this case electronics, has a NULL value for its parent. The adjacency list model has the advantage of being quite simple, it is easy to see that FLASH is a child of mp3 players, which is a child of portable electronics, which is a child of electronics. While the adjacency list model can be dealt with fairly easily in client-side code, working with the model can be more problematic in pure SQL.

Retrieving a Full Tree

The first common task when dealing with hierarchical data is the display of the entire tree, usually with some form of indentation. The most common way of doing this is in pure SQL is through the use of a self-join:

SELECT t1.name AS lev1, t2.name as lev2, t3.name as lev3, t4.name as lev4
FROM category AS t1
LEFT JOIN category AS t2 ON t2.parent = t1.category_id
LEFT JOIN category AS t3 ON t3.parent = t2.category_id
LEFT JOIN category AS t4 ON t4.parent = t3.category_id
WHERE t1.name = 'ELECTRONICS';

+-------------+----------------------+--------------+-------+
| lev1 | lev2 | lev3 | lev4 |
+-------------+----------------------+--------------+-------+
| ELECTRONICS | TELEVISIONS | TUBE | NULL |
| ELECTRONICS | TELEVISIONS | LCD | NULL |
| ELECTRONICS | TELEVISIONS | PLASMA | NULL |
| ELECTRONICS | PORTABLE ELECTRONICS | MP3 PLAYERS | FLASH |
| ELECTRONICS | PORTABLE ELECTRONICS | CD PLAYERS | NULL |
| ELECTRONICS | PORTABLE ELECTRONICS | 2 WAY RADIOS | NULL |
+-------------+----------------------+--------------+-------+
6 rows in set (0.00 sec)

Tags: mysql, 无限分类, 算法, 存储结构, 官方

最常用的链接

日常工作中,有一些网站是经常要去的,因此在这里加上链接,以后就可以偷懒了,而且,也防止自己以后找不到相应的网站。[逐步更新中]

PHP官方网站   PHP官方手册  PHP下载  PHP snap   pear for PHP

APACHE官方网站  APACHE手册  MYSQL官方网站  MYSQL官方中文手册

SMARTY官方网站  SMARTY手册  smarttemplate官方网站(改名叫quickskin了)

jQuery官方网站  prototype官方网站  mootools官方网站 

PYTHON官方网站  PYTHON手册


下面是系统类的链接
FREEBSD操作手册

Tags: 链接, 常用, 官方, 学习