网络中的任何计算机不管使用何种操作系统,都可以通过网络将打印文件发送到与打印服务器相连的打印机或者网络的其他打印机。
安装与共享本地打印机
本地打印机就是连接在用户使用的计算机上的打印机。要在Windows中添加打印机,步骤如下:
在已经装好打印机驱动的机子上设置打印机的共享.选择”开始→设置→打印机”.选择需要共享的打印机,点鼠标右键,选择共享.详细操作如图所示

选择”共享这台打印机”,设置好共享打印机的名,按确定结束.
客户机的设置:
打印机服务端设置好后,客户机只要添加这台共享的打印机就可以实现网络共享打印的实现.
(1)在执行“添加打印机”的第三步时,选择“网络打印机”,点击“下一步”,用户可以在此处设置查找打印机的方式。
(2)如果用户希望在工作组中查找打印机,可以点击“下一步”,弹出“查找打印机”对话框。由于在局域网内部,可以选择“键入打印机名,或者点击‘下一步’,浏览打印机”单选项。
(3)用户可以输入打印机名称也可以点击“下一步”,弹出“浏览打印机”对话框。在这里,“共享打印机”列表框中列出了域中的所有共享打印机以及与打印机连接的计算机。如果局域网中有多台打印机,用户可以在这里找到适合自己的打印机。
(4)点击“下一步”按钮,在弹出的对话框中,用户可以设置是否将打印机设置为默认打印机。
(5)点击“下一步”按钮 ,在弹出的对话框中,显示了用户设置的网络打印机的情况,点击“完成”后,就可以像使用本地打印机一样地使用网络打印机了。
具体操作如图所示:




安装与共享本地打印机
本地打印机就是连接在用户使用的计算机上的打印机。要在Windows中添加打印机,步骤如下:
在已经装好打印机驱动的机子上设置打印机的共享.选择”开始→设置→打印机”.选择需要共享的打印机,点鼠标右键,选择共享.详细操作如图所示
选择”共享这台打印机”,设置好共享打印机的名,按确定结束.
客户机的设置:
打印机服务端设置好后,客户机只要添加这台共享的打印机就可以实现网络共享打印的实现.
(1)在执行“添加打印机”的第三步时,选择“网络打印机”,点击“下一步”,用户可以在此处设置查找打印机的方式。
(2)如果用户希望在工作组中查找打印机,可以点击“下一步”,弹出“查找打印机”对话框。由于在局域网内部,可以选择“键入打印机名,或者点击‘下一步’,浏览打印机”单选项。
(3)用户可以输入打印机名称也可以点击“下一步”,弹出“浏览打印机”对话框。在这里,“共享打印机”列表框中列出了域中的所有共享打印机以及与打印机连接的计算机。如果局域网中有多台打印机,用户可以在这里找到适合自己的打印机。
(4)点击“下一步”按钮,在弹出的对话框中,用户可以设置是否将打印机设置为默认打印机。
(5)点击“下一步”按钮 ,在弹出的对话框中,显示了用户设置的网络打印机的情况,点击“完成”后,就可以像使用本地打印机一样地使用网络打印机了。
具体操作如图所示:
用simplexml处理atom数据
很多博客使用atom来输出数据,但是atom使用了名称空间(namespace),所以现在请求被命名的元素和本地名称时必须指定名称空间统一资源标识符(URI),还有一点就是simplexml的xpath方法无法直接query这个xml tree。
从 PHP 5.1 版开始,SimpleXML 可以直接对带名称空间的文档使用 XPath 查询。和通常一样,XPath 位置路径必须使用名称空间前缀,即使搜索的文档使用默认名称空间也仍然如此。registerXPathNamespace() 函数把前缀和后续查询中使用的名称空间 URL 联系在一起。
下面是使用xpath查询atom文档title元素的例子:
PLAIN TEXT
CODE:
- $atom = simplexml_load_file('http://www.ooso.net/index.php/feed/atom');
- $atom->registerXPathNamespace('atom', 'http://www.w3.org/2005/Atom');
- $titles = $atom->xpath('//atom:title');
- foreach ($titles as $title)
- echo "<h2>" . $title . "</h2>";
用simplexml处理rss数据
wordpress可以输出rss2的数据源,这里面也有一些不同的namespace,比如dc。一个使用simplexml解析rss2的例子:
PLAIN TEXT
PHP:
- $ns = array (
- 'content' => 'http://purl.org/rss/1.0/modules/content/',
- 'wfw' => 'http://wellformedweb.org/CommentAPI/',
- 'dc' => 'http://purl.org/dc/elements/1.1/'
- );
- $articles = array();
- // step 1: 获得feed
- $blogUrl = 'http://www.ooso.net/index.php/feed/rss2';
- $xml = simplexml_load_url($blogUrl);
- // step 2: 获得channel metadata
- $channel = array();
- $channel['title'] = $xml->channel->title;
- $channel['link'] = $xml->channel->link;
- $channel['description'] = $xml->channel->description;
- $channel['pubDate'] = $xml->pubDate;
- $channel['timestamp'] = strtotime($xml->pubDate);
- $channel['generator'] = $xml->generator;
- $channel['language'] = $xml->language;
- // step 3: 获得articles
- foreach ($xml->channel->item as $item) {
- $article = array();
- $article['channel'] = $blog;
- $article['title'] = $item->title;
- $article['link'] = $item->link;
- $article['comments'] = $item->comments;
- $article['pubDate'] = $item->pubDate;
- $article['timestamp'] = strtotime($item->pubDate);
- $article['description'] = (string) trim($item->description);
- $article['isPermaLink'] = $item->guid['isPermaLink'];
- // get data held in namespaces
- $content = $item->children($ns['content']);
- $dc = $item->children($ns['dc']);
- $wfw = $item->children($ns['wfw']);
- $article['creator'] = (string) $dc->creator;
- foreach ($dc->subject as $subject)
- $article['subject'][] = (string)$subject;
- $article['content'] = (string)trim($content->encoded);
- $article['commentRss'] = $wfw->commentRss;
- // add this article to the list
- $articles[$article['timestamp']] = $article;
- }
这个例子中,使用children方法来获得名称空间中的数据:
PLAIN TEXT
PHP:
- $dc = $item->children($ns['dc']);
老百姓将鸡蛋视为补品,经常食用鸡蛋可增强记忆力,还可保护心脏和动
脉血管、预防癌症、延缓衰老。可如果不能加工和食用,补品就会变为“废品”
,甚至是“毒品”,所以应当认真掌握鸡蛋的各种饮食禁忌,防患于未然…
禁忌一:鸡蛋与白糖同煮
很多地方有吃糖水荷包蛋的习惯。其实,鸡蛋和白糖同煮,会使鸡蛋蛋白质中的
氨基酸形成果糖基赖氨酸的结合物。这种物质不易被人体吸收,对健康会产生不
良作用。
禁忌二:鸡蛋与豆浆同食
早上喝豆浆的时候吃个鸡蛋,或是把鸡蛋打在豆浆里煮,也是许多人的饮食习惯
。豆浆性味甘平,含植物蛋白、脂肪、碳水化合物、维生素、矿物质等很多营养
成分,单独饮用有很强的滋补作用。但其中有一种特殊物质叫胰蛋白酶,与蛋清
中的卵松蛋白相结合,会造成营养成分的损失,降低二者的营养价值。
禁忌三:鸡蛋与兔肉同吃
鸡蛋还有一个饮食禁忌,就是不能与兔肉同吃。《本草纲目》中说:“鸡蛋同兔
肉食成泄痢。”兔肉性味甘寒酸冷,鸡蛋甘平微寒,二者都含有一些生物活性物
质,共食会发生反应,刺激肠胃道,引起腹泻。
脉血管、预防癌症、延缓衰老。可如果不能加工和食用,补品就会变为“废品”
,甚至是“毒品”,所以应当认真掌握鸡蛋的各种饮食禁忌,防患于未然…
禁忌一:鸡蛋与白糖同煮
很多地方有吃糖水荷包蛋的习惯。其实,鸡蛋和白糖同煮,会使鸡蛋蛋白质中的
氨基酸形成果糖基赖氨酸的结合物。这种物质不易被人体吸收,对健康会产生不
良作用。
禁忌二:鸡蛋与豆浆同食
早上喝豆浆的时候吃个鸡蛋,或是把鸡蛋打在豆浆里煮,也是许多人的饮食习惯
。豆浆性味甘平,含植物蛋白、脂肪、碳水化合物、维生素、矿物质等很多营养
成分,单独饮用有很强的滋补作用。但其中有一种特殊物质叫胰蛋白酶,与蛋清
中的卵松蛋白相结合,会造成营养成分的损失,降低二者的营养价值。
禁忌三:鸡蛋与兔肉同吃
鸡蛋还有一个饮食禁忌,就是不能与兔肉同吃。《本草纲目》中说:“鸡蛋同兔
肉食成泄痢。”兔肉性味甘寒酸冷,鸡蛋甘平微寒,二者都含有一些生物活性物
质,共食会发生反应,刺激肠胃道,引起腹泻。
相比较于上一个版本 2.6 RC,这个版本没有做任何更新,证明RC版本的稳定性已经足够.
whatsnew:
whatsnew:
Version 2.6 (Download Zip or GZip from Sourceforge.net)
No changes. The stabilization of the 2.6 RC was completed successfully, as expected.
Version 2.6 RC (Download Zip or GZip from Sourceforge.net)
New Features and Improvements:
- [#2017] The FCKeditorAPI.Instances object can now be used to access all FCKeditor instances available in the page.
- [#1980] Attention: By default, the editor now produces <strong> and <em> instead of <b> and <i>.
Fixed Bugs:
- [#1924] The dialog close button is now correctly positioned in IE in RTL languages.
- [#1933] Placeholder dialog will now display the placeholder value correctly in IE.
- [#957] Pressing Enter or typing after a placeholder with the placeholder plugin will no longer generate colored text.
- [#1952] Fixed an issue in FCKTools.FixCssUrls that, other than wrong, was breaking Opera.
- [#1695] Removed Ctrl-Tab hotkey for Source mode and allowed Ctrl-T to work in Firefox.
- [#1666] Fixed permission denied errors during opening popup menus in IE6 under domain relaxation mode.
- [#1934] Fixed JavaScript errors when calling Selection.EnsureSelection() in dialogs.
- [#1920] Fixed SSL warning message when opening image and flash dialogs under HTTPS in IE6.
- [#1955] [#1981] [#1985] [#1989] Fixed XHTML source formatting errors in non-IE browsers.
- [#2000] The # character is now properly encoded in file names returned by the File Browser.
- [#1945] New folders and file names are now properly sanitized against control characters.
- [#1944] Backslash character is now disallowed in current folder path.
- [#1055] Added logic to override JavaScript errors occurring inside the editing frame due to user added JavaScript code.
- [#1647] Hitting ENTER on list items containing block elements will now create new list item elements, instead of adding further blocks to the same list item.
- [#1411] Label only combos now get properly grayed out when moving to source view.
- [#2009] Fixed an important bug regarding styles removal on styled text boundaries, introduced with the 2.6 Beta 1.
- [#2011] Internal CSS <style> tags where being outputted when FullPage=true.
- [#2016] The Link dialog now properly selects the first field when opening it to modify mailto or anchor links. This problem was also throwing an error in IE.
- [#2021] The caret will no longer remain behind in the editing area when the placeholder dialog is opened.
- [#2024] Fixed JavaScript error in IE when the user tries to open dialogs in Source mode.
- [#1853] Setting ShiftEnterMode to p or div now works correctly when EnterMode is br.
- [#1838] Fixed the issue where context menus sometimes don't disappear after selecting an option.
- [#2028] Fixed JavaScript error when EnterMode=br and user tries to insert a page break.
- [#2002] Fixed the issue where the maximize editor button does not vertically expand the editing area in Firefox.
- [#1842] PHP integration: fixed filename encoding problems in file browser.
- [#1832] Calling FCK.InsertHtml() in non-IE browsers would now activate the document processor as expected.
- [#1998] The native XMLHttpRequest class is now used in IE, whenever it is available.
- [#1792] In IE, the browser was able to enter in an infinite loop when working with multiple editors in the same page.
- [#1948] Some CSS rules are reset to dialog elements to avoid conflict with the page CSS.
- [#1965] IE was having problems with SpellerPages, causing some errors to be thrown when completing the spell checking in some situations.
- [#2042] The FitWindow command was throwing an error if executed in an editor where its relative button is not present in the toolbar.
- [#922] Implemented a generic document processor for <OBJECT> and <EMBED> tags.
- [#1831] Fixed the issue where the placeholder icon for <EMBED> tags does not always show up in IE7.
- [#2049] Fixed a deleted cursor CSS attribute in the minified CSS inside fck_dialog_common.js.
- [#1806] In IE, the caret will not any more move to the previous line when selecting a Format style inside an empty paragraph.
- [#1990] In IE, dialogs using API calls which deals with the selection, like InsertHtml now can be sure the selection will be placed in the correct position.
- [#1997] With IE, the first character of table captions where being lost on table creation.
- The selection and cursor position was not being properly handled when creating some elements like forms and tables.
- [#662] In the Perl sample files, the GetServerPath function will now calculate the path properly.
Version 2.6 Beta (Download Zip or GZip from Sourceforge.net)
New Features and Improvements:
- [#35] New (and cool!) floating dialog system, avoiding problems with popup blockers and enhancing the editor usability.
- [#1886] Adobe AIR compatibility.
- [#123] Full support for document.domain with automatic domain detection.
- [#1622] New inline CSS cache feature, making it possible to avoid downloading the CSS files for the editing area and skins. For that, it is enough to set the EditorAreaCSS, SkinEditorCSS and SkinDialogCSS to string values in the format "/absolute/path/for/urls/|<minified CSS styles". All internal CSS links are already using this feature.
- New language file for Canadian French.
Fixed Bugs:
- [#1643] Resolved several "strict warning" messages in Firefox when running FCKeditor.
- [#1522] The ENTER key will now work properly in IE with the cursor at the start of a formatted block.
- [#1503] It's possible to define in the Styles that a Style (with an empty class) must be shown selected only when no class is present in the current element, and selecting that item will clear the current class (it does apply to any attribute, not only classes).
- [#191] The scrollbars are now being properly shown in Firefox Mac when placing FCKeditor inside a hidden div.
- [#503] Orphaned <li> elements now get properly enclosed in a <ul> on output.
- [#309] The ENTER key will not any more break <button> elements at the beginning of paragraphs.
- [#1654] The editor was not loading on a specific unknown situation. The breaking point has been removed.
- [#1707] The editor no longer hangs when operating on documents imported from Microsoft Word.
- [#1514] Floating panels attached to a shared toolbar among multiple FCKeditor instances are no longer misplaced when the editing areas are absolutely or relatively positioned.
- [#1715] The ShowDropDialog is now enforced only when ForcePasteAsPlainText = true.
- [#1336] Sometimes the autogrow plugin didn't work properly in Firefox.
- [#1728] External toolbars are now properly sized in Opera.
- [#1782] Clicking on radio buttons or checkboxes in the editor in IE will no longer cause lockups in IE.
- [#805] The FCKConfig.Keystrokes commands where executed even if the command itself was disabled.
- [#902] The button to empty the box in the "Paste from Word" has been removed as it leads to confusion for some users.
- [#1682] Editing control elements in Firefox, Opera and Safari now works properly.
- [#1613] The editor was surrounded by a <div> element that wasn't really needed.
- [#676] If a form control was moved in IE after creating it, then it did lose its name.
- [#738] It wasn't possible to change the type of an existing button.
- [#1854] Indentation now works inside table cells.
- [#1717] The editor was entering on looping on some specific cases when dealing with invalid source markup.
- [#1530] Pasting text into the "Find what" fields in the Find and Replace dialog would now activate the find and replace buttons.
- [#1828] The Find/Replace dialog will no longer display wrong starting positions for the match when there are multiple and identical characters preceding the character at the real starting point of the match.
- [#1878] Fixed a JavaScript error which occurs in the Find/Replace dialog when the user presses "Find" or "Replace" after the "No match found" message has appeared.
- [#1355] Line breaks and spaces are now conserved when converting to and from the "Formatted" format.
- [#1670] Improved the background color behind smiley icons and special characters in their corresponding dialogs.
- [#1693] Custom error messages are now properly displayed in the file browser.
- [#970] The text and value fields in the selection box dialog will no longer extend beyond the dialog limits when the user inputs a very long text or value for one of the selection options.
- [#479] Fixed the issue where pressing Enter in an <o:p> tag in IE does not generate line breaks.
- [#481] Fixed the issue where the image preview in image dialog sometimes doesn't display after selecting the image from server browser.
- [#1488] PHP integration: the FCKeditor class is now more PHP5/6 friendly ("public" keyword is used instead of depreciated "var").
- [#1815] PHP integration: removed closing tag: "?>", so no additional whitespace added when files are included.
- [#1906] PHP file browser: fixed problems with DetectHtml() function when open_basedir was set.
- [#1871] PHP file browser: permissions applied with the chmod command are now configurable.
- [#1872] Perl file browser: permissions applied with the chmod command are now configurable.
- [#1873] Python file browser: permissions applied with the chmod command are now configurable.
- [#1572] ColdFusion integration: fixed issues with setting the editor height.
- [#1692] ColdFusion file browser: it is possible now to define TempDirectory to avoid issues with GetTempdirectory() returning an empty string.
- [#1379] ColdFusion file browser: resolved issues with OnRequestEnd.cfm breaking the file browser.
- [#1509] InsertHtml() in IE will no longer turn the preceding normal whitespace into .
- [#958] The AddItem method now has an additional fifth parameter "customData" that will be sent to the Execute method of the command for that menu item, allowing a single command to be used for different menu items..
- [#1502] The RemoveFormat command now also removes the attributes from the cleaned text. The list of attributes is configurable with FCKConfig.RemoveAttributes.
- [#1596] On Safari, dialogs have now right-to-left layout when it runs a RTL language, like Arabic.
- [#1344] Added warning message on Copy and Cut operation failure on IE due to paste permission settings.
- [#1868] Links to file browser has been changed to avoid requests containing double dots.
Jacob Seidelin正在做一件很牛的事情,而且很有趣,这就是一个只用了14k javascript 写的超级玛丽程序!

这个程序所有的内容都只占用很小的空间,包含在一个javascript文件中,而且没有一个外部图片文件,所有的图像信息都是用javascript 渲染canvas元素或者老式div生成策略(for IE)而成的。sprites存储在定制编码字符串中,只能存储4种颜色,但是每个sprite只占用40-60 bytes,大大节省了存储空间。
来自:ajaxian.com
这个程序所有的内容都只占用很小的空间,包含在一个javascript文件中,而且没有一个外部图片文件,所有的图像信息都是用javascript 渲染canvas元素或者老式div生成策略(for IE)而成的。sprites存储在定制编码字符串中,只能存储4种颜色,但是每个sprite只占用40-60 bytes,大大节省了存储空间。
同时MIDI音乐用base64编码数据嵌入,URI定位,但没有支持IE的音乐,其他浏览器或多或少有点小问题,但是这是一件很好的作品,不是吗?
去看看:
Regular version: no music or with music
Double size: no music or with music
来自:ajaxian.com






