2007年8月19日星期日

Ubuntu屏幕分辨率和驱动设置加入图型用户界面

遥想当年,当要改变分辨率或驱动的时候,我们不得不编辑xorg.conf文件或是重新配置X.org文件,不过现在这些"美好"的时光已经一去不复返。 它们将在ubuntu 7.10中出现,就在几天前的一次更新中,加入了用户可通过图形界面来更改xorg.conf文件的功能。

Remember the good old days when to change a screen resolution or driver, you had to edit xorg.conf or reconfigure X.org? Those fine times are now over, or they will be, with the release of Ubuntu 7.10. As of an update from a few days ago, users are now able to access a graphical user interface for editing xorg.conf, though only for graphic and display settings. This tool has support for dual monitors at the moment, and with the release of X.org 7.3 it will be possible to add even more. You can turn on and off both (or one) of your monitor(s), change the available resolutions, orientations, and set mirror or exteneded desktops.

displayconfiggtkdriver.png

On the Graphics Card tab, you have a selection of drivers and video memory. You can pick your graphics card and have it select a driver for you, or you can choose the driver yourself (useful for binary ATI/NVIDIA drivers).

displayconfiggtk.png

The Test feature as of writing is a little buggy, but this is an alpha version still; updates will follow.

This feature is actually Ubuntu-specific at the moment, though other distributions are sure to adopt it soon. It is part of Ubuntu 7.10's "Bullet Proof X" blueprint that states, in a general sense, that if X for some reason fails to start, then it will fall back to a failsafe mode with this GUI running to help get you back on your feet.


There is much improvement to be made with X as 7.3 releases, but whether this will make it into Ubuntu 7.10 in time is another story. Feature freeze is now in effect, however it was broken for an X update once before. Whether we'll see it all depends on when it is released. Count on FOSSwire for our take on X.org 7.3 later this month or next.


来源:http://fosswire.net/2007/08/17/ubuntu-getting-xorgconf-gui/

2007年8月14日星期二

mootools的学习资源

对不起原文不知在那里啦,没有连接,不好意思啊!


网上看到有朋友搜集了很多关于mootools的资料链接,非常好,感谢。

 一.教程/文章/代码实例:
  
  http://clientside.cnet.com/wiki/mootorial/ --- The Mootorial:比较完整的mootools教程
  http://solutoire.com/2007/02/16/mootools-ajax-xhr-classes/ --- ajax 和 XHR
   http://solutoire.com/2007/01/31/mootools-10-whats-new/ --- Mootools 1.0: What's new
  " http://solutoire.com/2006/12/25/porting-prototype-enumerable-functions-to-mootools-array-objects/ --- 将 Prototype的Enumerable移植到Mootools Array
   http://www.coryhudson.com/blog/2006/09/12/extending-objects-and-classes-with-mootools/ --- 用mootools扩展 Objects 和 Classes
   http://www.coryhudson.com/blog/2006/09/14/useful-utility-functions-in-mootools/ --- Mootools中有用的"Utility"函数
   http://www.coryhudson.com/blog/2006/09/26/extending-dom-nodes-with-mootools/ --- 用 Mootools 扩展 DOM Nodes
  http://www.snook.ca/archives/javascript/mootools_drag_a/ --- Mootools 拖拽实例
  http://smoothgallery.jondesign.net/getting-started --- 在你的网站上创建一个画廊或幻灯
   http://www.chromasynthetic.com/blog/wp-content/uploads/2006/09/mootools1.html --- 简单的导航条实例
  http://www.chrisesler.com/mootools/mootools-dragwindow.html --- 可拖动的窗口实例(实际上是可拖动的div)
  http://www.chrisesler.com/mootools/mootools-rowcolumnhighlight.php --- 表格行列高亮实例
   http://techblog.billkrueger.com/2006/10/11/mootools-sortable-list-example/ --- 可排序列表实例
  http://www.digitalknk.com/2006/10/10/final-class-project-complete/ --- 可折叠菜单的视频教程
  http://solutoire.com/2007/01/16/mootools-playing-with-height-transitions/ --- 非常好的tab菜单教程(Mootools: playing with height-transitions)
  http://solutoire.com/2006/11/29/mootools-the-ajax-class/ --- 关于ajax类
   http://www.thepcspy.com/articles/programming/ajax_search_with_ms_live_and_mootools --- 用Mootools实现基于ajax的Ms live查询
   http://solutoire.com/2006/11/29/mootools-horizontal-accordions-explained/ --- 又一个可折叠菜单
  http://solutoire.com/2006/12/18/mootools-json-explained/ --- Json模块与php教程
  http://dev.digitarald.de/tile.html --- 移动背景实例
   http://www.dotes.com.br/mootools/FlyOverBackground.html --- 移动背景实例(fixed for ie)
  http://dev.digitarald.de/ghostdrag.html --- 拖拽实例
   http://dev.digitarald.de/tabs.html --- tab实例
  http://beautyindesign.com/tutorial/free_series_mootools_for_the_rest_of_us.php --- 5节课的Mootools教程:MooTools for the Rest of Us
  http://www.chrisesler.com/mootools/fisheye/index.php --- Mac os dock样式的菜单
  
 二. 插件
  http://smoothgallery.jondesign.net --- JonDesign的SmoothGallery:画廊、幻灯和展厅
   http://www.electricprism.com/aeron/slideshow/ --- 幻灯
  http://smoothslideshow.jondesign.net --- JonDesign的幻灯类库
   http://solutoire.com/2006/11/29/fxfont-mootools-and-font-resizing/ --- Fx.Font 自动改变文字大小
  http://www.brunofigueiredo.com/archive/2006/09/14/88.aspx --- moobox:实现简单的LightBox效果
  http://www.brunofigueiredo.com/archive/2006/09/21/103.aspx --- 反射效果
   http://www.brunofigueiredo.com/archive/2006/09/15/93.aspx --- 另类图片标签
  http://www.brunofigueiredo.com/code/jsShadowReflection/extension_1.htm --- efxFactory 0.1 BETA:阴影和反射效果库
  http://inviz.ru/moo/transcorners/ --- 圆角效果
   http://www.digitalia.be/software/slimbox --- Slimbox:完整的Lightbox克隆,只有7k
  http://www.digitalia.be/software/reflectionjs-for-mootools --- 反射 Reflection.js
  http://nhatanh.voxfamilyvn.com/moo/slider.html --- Moo.Slider:滑动器
   http://nhatanh.voxfamilyvn.com/moo/calendar.html --- Moo.Calendar:日历
  http://og5.net/~wusch/?cat=javascript --- ie6的png透明插件
   http://www.clanccc.co.uk/moo/sortlist.html --- 嵌入式可排序列表
  http://www.blackmac.de/archives/44-Mootools-AJAX-timeout.html --- AjaxPlus:为AJAX增加超时事件
  
  
  注意:部分.de域名需要用代理上,推荐的代理工具:vidalia
  下载:
http://vidalia-project.net/download.php



--
老板,真爱二两,打包带走.谢谢!
http://campong.blogspot.com

2007年6月6日星期三

JavaScript窗口之定制新窗口参数

今天有人问打开窗口只有关闭按钮如何写。google了一下:

window.open()方法的基本语法结构是:  

  window.open(sURL, sName);

  然而,你可以通过使用2个附加的参数定制新窗口:

  window.open(sURL, sName[, sFeatures][, bReplace]);

  通过省略这些参数,你可以使用默认特征。让我们先看看bReplace参数,它仅仅被Internet Explorer:4和以后版本所支持。只有当第2个参数命名一个已经存在的窗口时,这个参数才有用。它是一个Boolean型数值,如果为true,就 表示第一个参数指定的URL替换当前窗口浏览位置在历史中保存的地址,如果为false,就表示在窗口的浏览历史记录中创建一个新项目(这是默认情况)。 由于这个参数只被微软的浏览器所支持,所以显得不很有用。下面让我们看看广为人知的JavaScript窗口设置性质。

  open()方法的第3个参数是一个字符串,包含一个以逗号分隔的选项列表(不要包含任何空格)。在驶入可用功能的海洋前,先让我们看看它们的含义所在。这里有一个例子:

  win = window.open("http://www.docjs.com/", "docjs", "location=1,menubar=1,resizable=1");

  这个语句打开一个可变尺寸的窗口,它带有一个地址栏和一个菜单条,而其他的特征都被关闭。比如,没有指定status特征,新窗口就没有了状态栏。注意,还有几个其他的方法来定义窗口特征。下面是几个和前面语句功能等价的命令:

  win = window.open("http://www.docjs.com/", "docjs", "location,menubar,resizable");

  win = window.open("http://www.docjs.com/", "docjs", "location=yes,menubar=yes,resizable=yes");

  win = window.open("http://www.docjs.com/", "docjs", "location,menubar=1,resizable=yes");

  许多特征可以是yes,或者是no。对于这些特征,你也可以使用1代替yes,0代替no。如果你想激活一个特征,同样可以简单地在 sFeatures字符串中列出特征的名字。如果没有列出,就表示屏蔽该功能(titlebar和hotkeys除外)。sFeatures参数是一个以 逗号分隔的功能列表,其中不应该包含任何空格或者空白字符。列表中的每一个元素应该包含下面的格式:

  feature[=value]

  分配sFeatures参数一个空字符串与全部省略这个参数之间有一个很大的区别。如果调用open()没有任何参数,那么所有的特征都被设置为默认 值。换言之,浏览器将创建一个窗口,它有默认得宽度和高度、标准的菜单、工具栏,以及其他浏览器具备的特征。如果你使用空字符串做为需要功能的列表,浏览 器将打开一个窗口,它的所有特征都是被屏蔽的(titlebar和hotkeys除外)。

  window.open()方法的第2个参数sName指定了窗口的名字。如果是一个已经存在窗口的名字,浏览器就在那个窗口中装载指定的URL(sURL)。所以,如果sName指定了存在的窗口,浏览器就将忽视定义的特征列表。

  不是所有的窗口特征都能被所有的浏览器所支持。如果浏览器不能识别指定的特征,它就简单地忽视掉。下面来看看JavaScript中各种窗口特征的定义:

alwaysLowered innerWidth screenY
alwaysRaised left scrollbars
channelmode location status
dependent menubar titlebar
directories outerWidth toolbar
fullscreen outerHeight top
height menubar width
hotkeys resizable z-lock
innerHeight screenX  

alwaysLowered
  Internet Explorer:不支持

  Navigator:版本 4+

  指定窗口总是保留在堆栈的最下面。换言之,不管新窗口是否激活,总是其他窗口下。

  window.open("alwayslowered.html", "_blank", "alwaysLowered");

alwaysRaised
  Internet Explorer:不支持

  Navigator:版本 4+

  指定窗口总是保留在堆栈的最上面。换言之,不管新窗口是否激活,总是其他窗口上。

  window.open("alwaysraised.html", "_blank", "alwaysRaised");

channelmode
  Internet Explorer:版本 4+

  Navigator:不支持

  指定是否按照剧场模式显示窗口,以及是否显示频道区。

  window.open("channelmode.html", "_blank", "channelmode");

dependent
  Internet Explorer:不支持

  Navigator:版本 4+

  定义是否窗口成为当前打开窗口的依赖子窗口。依赖窗口就是当它的父窗口关闭时,它也随即关闭。在windows平台上,一个依赖窗口不会在任务栏上显示。

  window.open("dependent.html", "_blank", "dependent");

directories
  Internet Explorer:所有版本

  Navigator:所有版本

  指定是否显示目录按钮(比如众所周知的"What's Cool" and "What's New" 按钮)。Internet Explorer将这些目录按钮引用为链接工具栏,Navigator(版本4和以上)称之为个人工具栏。

  window.open("directories.html", "_blank", "directories");

fullscreen
  Internet Explorer:版本 4+

  Navigator:不支持

  定义是否按照全屏方式打开浏览器。请小心使用全屏模式,因为在这种模式下,浏览器的标题栏和菜单都被隐藏,所有你应该提供一个按钮或者其他可视的线索来帮助用户关闭这个窗口。当然,使用热键ALT+F4也能关闭窗口。

  window.open("fullscreen.html", "_blank", "fullscreen");

height
  Internet Explorer:所有版本

  Navigator:所有版本

  以象素pixel为单位定义窗口文档显示区域的高度,最小数值是100。如果仅仅定义高度,Internet Explorer使用给定的高度和默认的宽度。对于Navigator,如果不同时指定width或者innerWidth,那么就将忽略这个属性。

  window.open("height.html", "_blank", "height=200,width=300");

hotkeys
  Internet Explorer:不支持

  Navigator:版本 4+

  如果没有定义(或者为0),那么就屏蔽了没有菜单条的新窗口的大部分热键。但是安全以及退出热键仍然保留。

  window.open("hotkeys.html", "_blank", "hotkeys=0,menubar=0");

innerHeight
  Internet Explorer:不支持

  Navigator:版本 4+

  以象素pixel为单位定义窗口文档显示区域的高度,最小数值是100。在Navigator版本4中,这个特征替换height,为得是保持向后兼容。对于Navigator,如果不同时指定width或者innerWidth,那么就将忽略这个属性。

  window.open("innerheight.html", "_blank", "innerHeight=200,innerWidth=300");

innerWidth
  Internet Explorer:不支持

  Navigator:版本 4+

  以象素pixel为单位定义窗口文档显示区域的宽度,最小数值是100。在Navigator版本4中,这个特征替换width,为得是保持向后兼容。对于Navigator,如果不同时指定height或者innerHeight,那么就将忽略这个属性。

  window.open("innerwidth.html", "_blank", "innerHeight=200,innerWidth=300");

left
  Internet Explorer:版本 4+

  Navigator:不支持

  以象素为单位定义窗口的X左标。

  window.open("left.html", "_blank", "left=20");

location
  Internet Explorer:所有版本

  Navigator:所有版本

  定义是否显示浏览器中供地址URL输入的文本域。

  window.open("location.html", "_blank", "location");

menubar
  Internet Explorer:所有版本

  Navigator:所有版本

  定义是否显示菜单条(菜单条位于窗口顶部,包括"文件"和"编辑"等)。

  window.open("menubar.html", "_blank", "menubar");

outerHeight
  Internet Explorer:不支持

  Navigator:版本 4+

  以象素为单位定义窗口(它的外部边界)的总高度,最小数值比100多一些,因为窗口内容区域的高度必须至少是100。如果没有同时定义outerWidth,Navigator将忽视这个特征。

  window.open("outerheight.html", "_blank", "outerHeight=200,outerWidth=300");

outerWidth
  Internet Explorer:不支持

  Navigator:版本 4+

  以象素为单位定义窗口(它的外部边界)的总宽度,最小数值比100多一些,因为窗口内容区域的宽度必须至少是100。如果没有同时定义outerHeight,Navigator将忽视这个特征。

  window.open("outerwidth.html", "_blank", "outerHeight=200,outerWidth=300");

resizable
  Internet Explorer:所有版本

  Navigator:所有版本

  定义是否窗口可以通过它的边界进行大小缩放控制。依赖于平台不同,用户也许还有其他改变窗口大小的方法。

  window.open("resizable.html", "_blank", "resizable");

screenX
  Internet Explorer:不支持

  Navigator:版本 4+

  以象素为单位定义窗口的X坐标。

  window.open("screenx.html", "_blank", "screenX=20");

screenY
  Internet Explorer:不支持

  Navigator:版本 4+

  以象素为单位定义窗口的Y坐标。

  window.open("screeny.html", "_blank", "screenY=20");

scrollbars
  Internet Explorer:所有版本

  Navigator:所有版本

  定义是否激活水平和垂直滚动条。

  window.open("scrollbars.html", "_blank", "scrollbars");

status
  Internet Explorer:所有版本

  Navigator:所有版本

  定义是否在窗口的下部添加状态栏。

  window.open("status.html", "_blank", "status");

titlebar
  Internet Explorer:Version 5+

  Navigator:版本 4+

  定义是否显示窗口的标题栏。在Internet Explorer中,除非调用者是一个HTML应用程序或者一个可信任的对话框,那么这个特征是被屏蔽的。

  window.open("titlebar.html", "_blank", "titlebar=0");

toolbar
  Internet Explorer:所有版本

  Navigator:所有版本

  定义是否显示浏览器的工具栏(位于窗口的上部,包括"后退"和"向前")。

  window.open("toolbar.html", "_blank", "toolbar");

top
  Internet Explorer:版本 4+

  Navigator:不支持

  以象素为单位定义窗口的纵坐标。

  window.open("top.html", "_blank", "top=20");

width
  Internet Explorer:所有版本

  Navigator:所有版本

  以象素pixel为单位定义窗口文档显示区域的宽度,最小数值是100。如果仅仅定义宽度,Internet Explorer使用给定的宽度和默认的高度。对于Navigator,如果不同时指定height或者innerHeight,那么就将忽略这个属性。

  window.open("width.html", "_blank", "height=200,width=300");

z-lock
  Internet Explorer:不支持

  Navigator:版本 4+

  定义窗口激活时不在堆栈中浮起,就是说,新窗口当被激活时并不能位于其他窗口之上。

  window.open("zlock.html", "_blank", "z-lock");

2007年5月30日星期三

Adobe Labs - Spry framework for Ajax

Adobe Labs - Spry framework for Ajax这是Adobe labs的ajax框架。按Adobe的介绍:Spry framework for ajax is a javascript library for web designers that provides functionality that allows designers to build pages that provide a richer experience for their users.

2007年5月17日星期四

div+css命名参考

来源: 网页教学网

用了一段CSS 布局设计网页,发现自己的命名有点混乱,完全按照自己的想法命名,虽然没什么影响,有不给别人看源文件,但是工作室有时候和团队合作完
成项目的时候,就遇到麻烦了,要修改一个地方相当的费事.所以还是有个标准比较好啊!

在网上看到的一个相关的参考,再加上平时也研究别人的代码,发现这样的命名使用很广泛!我再加上自己的经验,希望对看到这篇文章的人能有用!

命名参考

常用的CSS命名规则:

头:header

内容:content/container

尾:footer

导航:nav

侧栏:sidebar

栏目:column

页面外围控制整体布局宽度:wrapper

左右中:left right center

命名全部使用小写字母,如果需要多个单词,单词间使用"-"分隔,比如user-list

常用代码结构:

div:主要用于布局,分割页面的结构

ul/ol:用于无序/有序列表

span:没有特殊的意义,可以用作排版的辅助,例如

<li><span>(4.23)</span>天幻网六周年天幻网六周年天幻网六周年天幻网六</li>

然后在css中定义span为右浮动,实现了日期和标题分两侧显示的效果

h1-h6:标题

h1-h6 根据重要性依次递减

h1位最重要的标题

label:为了使你的表单更有亲和力而且还能辅助表单排版的好东西,例如:

<label for="user-password">密码</label>

<input type="password" name="password" id="user-password" />

fieldset & legend:fildset套在表单外,legend用于描述表单内容。例如:

<form>

<fieldset>

<legend>title</legend>

<label for="user-password">密码</label>

<input type="password" name="password" id="user-password" />

</fieldset>

</form>

dl,dt,dd:当页面中出现第一行为类似标题/简述,然后下面为详细描述的内容时应该使用该标签,例如

<dl>

<dt>什么是CSS?</dt>

<dd>CSS就是一种叫做样式表(stylesheet)的技术。也有的人称之为层叠样式表(Cascading
Stylesheet)。<dd>

<dt>什么是XHTML?</dt>

<dd>XHTML是一个基于XML的置标语言,看起来与HTML有些想像,只有一些小的但重要的区别。可以这样看,XHTML就是一个扮演着类似
HTML的角色的XML。 本质上说,XHTML是一个桥接(过渡)技术,结合了XML(有几分)的强大功能及HTML(大多数)的简单特性。</
dd>

</dl>

C #content

S #subcol

M #maincol

X #xcol

这是纵向布局的XHTML结构,c-smx表示网页有三个纵栏, c-sm表示有两个纵栏, c-mx表示有两个纵栏其中一个是附属的, c-m表示一
个纵栏。

其中在三纵栏的布局需要分为两层 第一层是#subcol与#main第二层是#main中的#maincol与#xcol。

自定义命名:

根据w3c网站上给出的,最好是用意义命名

比如:是重要的新闻高亮显示(像红色)

有两种

.red{color:red}

.important-news{color:red}

很显然第二种传达的意义更加明确,所以尽量不要用意义不明确的作为自己自定义的名字。

2007年4月9日星期一

Bookmark Bliss: 50 sources for web design inspiration

原文: http://www.fuzzyfuture.com/web-design/50-sources-for-web-design-inspiration/

When Fuzzy Future first got started, I said that our goal was to build content that other people can use to improve their own projects. Almost every day, while I'm checking out a blog or social bookmark site like Del.icio.us or Digg, I see a post entitled something along the lines of "50 beautiful web designs" or "25 amazing wordpress templates." As a web developer and not really a web designer, I always love these posts because they're great inspiration for the next time I need to create my own template, theme, site, etc. Over the years I've managed to build up a decent bookmark list of these "inspirational" sites so I thought I would put them all in one place for other people to take advantage of as well. So, without further ado, here is my list of 50 sources for web design inspiration…A little help for us artistically challenged individuals :)

  1. The Best Designs
  2. Six Shooter Media's Free Templates
  3. 2Advanced Studios
  4. Andreas Viklund Free Website Templates
  5. Studio7Designs
  6. Style Grind
  7. Open Source Web Design
  8. The Web Design Inspiration Photoset
  9. Most Inspired
  10. Open Source Templates
  11. Templates Box
  12. Smashing Magazine
  13. CSS Beauty
  14. CSS Galleries
  15. Drupal Sites
  16. Open Source Web Templates
  17. CSS Remix
  18. Glenn Wolsey 10 Most Beautiful Blog Designs
  19. CSS Drive
  20. Perfection
  21. CSS Elite
  22. SyleGala
  23. Creative Pakistan
  24. The FWA
  25. CSS Hazard
  26. Beautifully Webdesign
  27. Unmatched Style
  28. CSS Import
  29. Light on Dark
  30. StyleBoost
  31. CSS Bloom
  32. Screen Fluent
  33. CSS Websites
  34. Website Design Awards
  35. 3point7designs
  36. CSS Galaxy
  37. Screenalicio.us
  38. The Dreamer
  39. Style Crunch
  40. CSS Flavor
  41. Inspiration King
  42. CSS Thesis
  43. Web Creme
  44. CSS Zen Garden
  45. CSS Reboot
  46. WebDigity
  47. The Pixel Creativity
  48. Top Wordpess Themes
  49. CSSClip
  50. Deviant Art

50+5 Bonus Sources

  1. 83 Beautiful Wordpress Themes (smashing magazine)
  2. Go Drupal
  3. One Pixel Army
  4. CSS Mania
  5. Design Shack

Well, that's it for this round. Some of these sites offer their templates for free but others charge a fee for you to use. This list is intended to help you with your "designer's block" and give you the inspiration you need to come up with the perfect design for your next blog, community portal, social networking hub, or corporate e-commerce resource. I'd love to keep this list growing and possibly release updates on a regular basis.

Have you found this list useful? If so, show your support by subscribing to our news feed. We've posted several other entries in our Bookmark Bliss series that you might find interesting as well…

  1. Bookmark Bliss: 50 Sources for Web Design Inspiration
  2. Bookmark Bliss: The Developer Cheat Sheet Compilation
  3. Bookmark Bliss: 30 Web Developer Community Forums
  4. Bookmark Bliss: 101+ Stock Image Resources

As always, your comments are welcome and please let us know of any sites we might have missed.

2007年4月5日星期四

C#中的类型转换

无论是什么类型,所有的数据都是一系列的位,即一组0和1
。但是一般情况下,不同类型的变量使用不同的模式来表示数据。这意味着即使可以把一系列的位从一种类型的变量移动到另一种类型的变量中,结果也可能与期望的不同。所以这并不是数据从一个变量的一对一映射,而是需要对数据进行类型转换。那么类型转换有两种形式
A 隐式转换:从类型A到类型B的转换可以在所有的情况下进行,执行转换的规则非常简单,可以让编译器进行。
B 显式转换:从类型A到类型B的转换只能在某些情况下进行,转换的规则比较复杂,应进行某种类型的处理。