这篇教程是在u盘安装Mac OS X 10.7 Lion Developer Preview 4最简单的方法,无需复杂的替换,无需复杂的恢复,就可以轻松搞定Mac OS X 10.7 Lion Developer Preview 4,我已经在本本和台式机上轻松安装了Mac OS X 10.7 Lion Developer Preview 4,驱动几乎完美。

好了,不啰嗦了,进入正题。

1、准备一个8G的u盘。usb键盘

2、下载好Mac OS X 10.7 Lion Developer Preview 4镜像。下载最新的MultiBeast

3、下载XFlash。点击这里下载http://dl.dbank.com/c0x3v1v019

4、插入u盘,打开磁盘工具,选定u盘,点分区,分区布局选一个分区,各式选Mac OS 扩展(日志式),随便选个名字,点应用。完成后,关闭磁盘工具。

5、在桌面点的u盘,右键显示简介,点开最下面的共享与权限,双击右下角的黄锁,打开修改权限,去掉左边的勾。

6、打开Mac OS X 10.7 Lion Developer Preview 4镜像,放到一边。

7、解压附件,进入XFlash文件夹,将桌面的u盘拖到XFlash的图标上,输入密码,就开始将Lion DP4镜像写入u盘,同时会将能在mbr下使用的文件一并替换写入,无需任何人为操作。十分简便。

8、根据u盘写入速度不同,大约20~30分钟。就完成。

9、打开u盘,将XFlash文件夹内的驱动放入u盘中的E/E中。有DSDT的也可以放进去。

10、好了u盘启动Lion DP4安装盘就到此制作完毕。

11、将u盘插入要按照Lion DP4的机器,从u盘启动。下面就是正常安装过程。

12、安装结束后,如果是双系统,会破坏windows的启动,用windows光盘修复。

13、如何进入已经安装好的Lion DP4?有2个办法,

       a、双系统的,进windows系统,安装最新的变色龙,以变色龙引导。

       b、单系统的,以iboot光盘引导。

14、进入系统后,运行MultiBeast,一般都知道这个东西,我就不详细介绍了。里面的2.0.6网卡驱动可以驱动大部分Realtek的网卡。

15、n卡基本是自动驱动的,a卡的情况不详(我没有a卡),大家可以测试下。

16、此方法只适合intel 的CPU

Ubuntu在升级了几次内核以后,就会在引导菜单里面多出很多引导项。看着很不爽~

今天研究了下,发现可以通过下面这个命令删除Ubuntu系统中过期的内核,精简菜单项:

 

XML/HTML代码
  1. sudo aptitude purge ~ilinux-image-.*(!`uname -r`)  

 

一行命令就解决问题,不错!

同时在网上还看到另外一个复杂一点的办法:

第一步:列出所有当前已经安装了的内核文件:
 
$dpkg –get-selections|grep linux-image
linux-image-2.6.31-14-generic            install
linux-image-2.6.31-15-generic            install
linux-image-2.6.31-16-generic            install
linux-image-2.6.31-17-generic            install
linux-image-2.6.31-20-generic            install
linux-image-2.6.31-21-generic            install

第二步:删除旧的内核,用以下命令:
 
$sudo apt-get remove [内核文件名]
 
同时删除多个可以在内核文件名之间加空格。比如我要删除14,15我就输入以下命令:
 
$sudo apt-get remove linux-image-2.6.31-14-generic linux-image-2.6.31-15-generic

大家看到标题后的第一个问题可能是:“我们需要这样做吗?”

如果我们开发的是局域网 Web 应用的话,可能没有必要这样做。但如果我们的 Web 应用面向的是互联网上的成千上万的用户,这样做就很必要了。因为在现实世界中并不是所有的用户都有高数率的网络连接,也许用户使用的是拨号接入,移动设备,3G,或者是 USB 网络加密狗。如果我们没有在低数率的网络环境中测试过我们 Web 应用,极有可能在上线后收到一些意想不到的关于系统性能方面的抱怨。这个时候无论我们的 Web 应用界面多么地 Web 2.0,功能多么地强大,对于用户来说都失去了使用价值。

目前有很多工具能够模拟慢速网络,值得一提的是 Firefox Throttle,这是一个 Firefox 插件,你可以设置上载和下载的数率,并且监控当前带宽的使用情况。另一个非常有用的特性是它可以控制你的 localhost 的连接数率,对本地测试很有用。

另一个工具是 Sloppy,它是一个 Java Web Start application。

 

  本文向大家简单描述一下DIV+CSS相对IE6 IE7和IE8兼容问题整理,重点介绍一下IE6 IE7和IE8等浏览器的区别和联系,相信本文介绍一定会让你有所收获。

  DIV+CSS相对IE6 IE7和IE8兼容问题整理

  1.区别IE和非IE浏览器

以下是代码片段:
#tip{
background:blue;/*非IE背景?色*/
background:red9;/*IE6、IE7、IE8背景?色*/
}

  2.区别IE6,IE7,IE8,FF

  【区别符号】:「9」、「*」、「_」

  【示例】:

以下是代码片段:
#tip{
background:blue;/*Firefox背景变蓝色*/
background:red9;/*IE8背景变红色*/
*background:black;/*IE7背景变黑色*/
_background:orange;/*IE6背景变橘色*/
}

  【说明】:因为IE系列浏览器可读「9」,而IE6和IE7可读「*」(米字号),另外IE6可辨识「_」(底线),因此可以依照顺序写下来,就会让浏览器正确的读取到自己看得懂得CSS语法,所以就可以有效区分IE各版本和非IE浏览器(像是Firefox、Opera、 GoogleChrome、Safari等)。

  3.区别IE6、IE7、Firefox(方法1)

  【区别符号】:「*」、「_」

  【示例】:

以下是代码片段:
#tip{
background:blue;/*Firefox背景变蓝色*/
*background:black;/*IE7背景变黑色*/
_background:orange;/*IE6背景变橘色*/
}

  【说明】:IE7和IE6可读「*」(米字号),IE6又可以读「_」(底线),但是IE7却无法读取「_」,至于Firefox(非IE浏览器)则完全无法辨识「*」和「_」,因此就可以透过这样的差异性来区分IE6、IE7、Firefox

  4.区别IE6、IE7、Firefox(方法2)

  【区别符号】:「*」、「!important」

  【示例】:

以下是代码片段:
#tip{
background:blue;/*Firefox背景变蓝色*/
*background:green!important;/*IE7背景变绿色*/
*background:orange;/*IE6背景变橘色*/
}

  【说明】:IE7可以辨识「*」和「!important」,但是IE6只可以辨识「*」,却无法辨识「!important」,至于Firefox可以读取「!important」但不能辨识「*」因此可以透过这样的差异来有效区隔IE6、IE7、Firefox。

  我们知道,PHP语言的合理运用可以帮助我们实现导出Word文档的功能。今天我们将为大家介绍PHP处理Word转PDF的相关实现方法。

  PHP处理Word转PDF代码示例:

PHP代码
  1. <?php       
  2. set_time_limit(0);       
  3. function MakePropertyValue($name,$value,$osm){       
  4. $oStruct = $osm->Bridge_GetStruct       
  5. ("com.sun.star.beans.PropertyValue");       
  6. $oStruct->Name = $name;       
  7. $oStruct->Value = $value;       
  8. return $oStruct;       
  9. }       
  10. function word2pdf($doc_url$output_url){       
  11. $osm = new COM("com.sun.star.ServiceManager")       
  12. or die ("Please be sure that OpenOffice.org     
  13. is installed.
    "
    );       
  14. $args = array(MakePropertyValue("Hidden",true,$osm));       
  15. $oDesktop = $osm->createInstance("com.sun.star     
  16. .frame.Desktop");       
  17. $oWriterDoc = $oDesktop->loadComponentFromURL       
  18. ($doc_url,"_blank", 0, $args);       
  19. $export_args = array(MakePropertyValue       
  20. ("FilterName","writer_pdf_Export",$osm));       
  21. $oWriterDoc->storeToURL($output_url,$export_args);       
  22. $oWriterDoc->close(true);       
  23. }       
  24. $output_dir = "D:/LightTPD/htdocs/";       
  25. $doc_file = "D:/LightTPD/htdocs/2.doc";       
  26. $pdf_file = "2.pdf";       
  27. $output_file = $output_dir . $pdf_file;       
  28. $doc_file = "file:///" . $doc_file;       
  29. $output_file = "file:///" . $output_file;       
  30. word2pdf($doc_file,$output_file);       
  31. ?>  

    * 在支持position:fixed的浏览器上使用position:fixed,这样当拖动共同条的时候弹窗位置是固定的。
    * 优化了IE6下onscroll 事件绑定的函数

还需改进的地方(过段事件等项目应用的时候会修改):

    * 30秒后自动关闭
    * 方便的插入弹出内容

 

JavaScript代码
  1. var RBMessage={      
  2.     boxW:200,      
  3.     boxH:101,      
  4.     init:function(){      
  5.         var that = this;      
  6.         this.createBox();      
  7.         document.getElementById("msg_close").onclick = function() {      
  8.             that.BoxWin.style.display="none";      
  9.         }      
  10.     },      
  11.     bind: function() { //绑定窗口滚动条与大小变化事件      
  12.         var that = this,      
  13.         st, rt;      
  14.         window.onscroll = function() {      
  15.             if( !!window.ActiveXObject &amp;&amp; !window.XMLHttpRequest ){      
  16.                 clearTimeout(st);      
  17.                 clearTimeout(that.timer2);      
  18.                 that.setOpacity(0);      
  19.                 st = setTimeout(function() {      
  20.                     that.BoxWin.style.top = that.getY().top;      
  21.                     that.show();      
  22.                 },500);      
  23.             }      
  24.         };      
  25.         window.onresize = function(){      
  26.             if (!!window.ActiveXObject &amp;&amp; !window.XMLHttpRequest) {      
  27.                 clearTimeout(rt);      
  28.                 rt = setTimeout(function(){      
  29.                     that.BoxWin.style.top = that.getY().top      
  30.                 }, 100);      
  31.             }      
  32.         }      
  33.     },      
  34.     show: function() { //渐显      
  35.         clearInterval(this.timer2);      
  36.         var that = this,      
  37.         fx = this.fx(0, 100, 0.1),      
  38.         t = 0;      
  39.         this.timer2 = setInterval(function() {      
  40.             t = fx();      
  41.             that.setOpacity(t[0]);      
  42.             if (t[1] == 0) {      
  43.                 clearInterval(that.timer2)      
  44.             }      
  45.         },      
  46.         10);      
  47.     },      
  48.     fx: function(a, b, c) { //缓冲计算      
  49.         var cMath = Math[(a – b) > 0 ? "floor""ceil"],      
  50.         c = c || 0.1;      
  51.         return function() {      
  52.             return [a += cMath((b – a) * c), a – b]      
  53.         }      
  54.     },      
  55.     setOpacity: function(x) { //设置透明度      
  56.         var v = x >= 100 ? ‘‘‘Alpha(opacity=‘ + x + ‘)‘;      
  57.         this.BoxWin.style.visibility = x < = 0 ? ‘hidden‘‘visible‘//IE有绝对或相对定位内容不随父透明度变化的bug      
  58.         this.BoxWin.style.filter = v;      
  59.         this.BoxWin.style.opacity = x / 100;      
  60.     },      
  61.     getY: function() { //计算移动坐标      
  62.         var d = document,      
  63.         b = document.body,      
  64.         e = document.documentElement;      
  65.         var s = Math.max(b.scrollTop, e.scrollTop);      
  66.         var h = /BackCompat/i.test(document.compatMode) ? b.clientHeight: e.clientHeight;      
  67.         var h2 = this.BoxWin.offsetHeight;      
  68.         return {      
  69.             foot: s + h + h2 + 2 + ‘px‘,      
  70.             top: s + h – h2 – 2 + ‘px‘     
  71.         }      
  72.     },      
  73.     moveTo: function(y) { //移动动画      
  74.         clearInterval(this.timer);      
  75.         var that = this;      
  76.         var moveTopNum=-that.boxH;      
  77.         this.timer = setInterval(function() {      
  78.             moveTopNum+=5;      
  79.             that.BoxWin.style.bottom =  moveTopNum +‘px‘;      
  80.             if (moveTopNum >= 0) {      
  81.                 clearInterval(that.timer);      
  82.                 that.bind();      
  83.             }      
  84.         },50);      
  85.         return this;      
  86.     },      
  87.     createBox:function(){      
  88.         this.BoxWin=document.createElement(‘div‘);      
  89.         this.BoxWin.style.width = this.boxW+"px";      
  90.         this.BoxWin.style.height =  this.boxH+"px";      
  91.         this.BoxWin.style.bottom = – this.boxH+"px";      
  92.         this.BoxWin.id = "msg_win";      
  93.         this.BoxWin.innerHTML = ‘<div class="icos"><a href="javascript:void 0" title="关闭" id="msg_close">X</a></div><div id="msg_title">温馨提示(标题)</div><div id="msg_content"></div>‘;      
  94.         document.body.appendChild(this.BoxWin);      
  95.         var that = this;      
  96.         setTimeout(function() { //初始化最先位置      
  97.             that.BoxWin.style.display = ‘block‘;      
  98.             that.moveTo();      
  99.         },1000);      
  100.         return this;      
  101.     }      
  102. };      
  103. RBMessage.init();    

手工法:

Click Start, click Run, type regedit, and then click OK.

  1. In the left pane, locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsNTCurrent VersionWPAEvents
  2. In the right pane, right-click OOBETimer, and then click Modify.
  3. Change at least one digit of the OOBETimer value to deactivate Windows.
  4. Click Start, click Run, type the following command, and then click OK:
    %systemroot%system32oobemsoobe.exe /a
  5. Click Yes, I want to telephone a customer service representative to activate Windows, and then click Next.
  6. Click Change Product key, type the new product key in the New key boxes, and then click Update. 



    Note If the previous Activation Wizard screen appears again, click Remind me later, and then restart the computer.
  7. Repeat steps 6 and 7 to verify that Windows is started. Click OK when you receive the following message:
    Windows is already activated. Click OK to exit.
  8. Install any Windows service packs that you want to install. 



    Note If you cannot restart Windows after you install a service pack, press F8 when you restart the computer, click Last Known Good Configuration, and then repeat this procedure.

 

脚本法:

ChangeVLKeySP1.vbs

ASP/Visual Basic代码
  1. ‘    
  2. ‘ WMI Script – ChangeVLKey.vbs   
  3.   
  4. ‘ This script changes the product key on the computer.   
  5.   
  6. ‘***************************************************************************   
  7.   
  8. ON ERROR RESUME NEXT   
  9.   
  10.   
  11. if Wscript.arguments.count<1 then   
  12.    Wscript.echo "Script can‘t run without VolumeProductKey argument"  
  13.    Wscript.echo "Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX"  
  14.    Wscript.quit   
  15. end if   
  16.   
  17. Dim VOL_PROD_KEY   
  18. VOL_PROD_KEY = Wscript.arguments.Item(0)   
  19. VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-",""‘remove hyphens if any   
  20.   
  21. for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")   
  22.   
  23.    result = Obj.SetProductKey (VOL_PROD_KEY)   
  24.   
  25.    if err <> 0 then   
  26.       WScript.Echo Err.Description, "0x" & Hex(Err.Number)   
  27.       Err.Clear   
  28.    end if   
  29.   
  30. Next  

 

 

 

ChangeVLKey2600.vbs

 

ASP/Visual Basic代码
  1. ‘    
  2. ‘ WMI Script – ChangeVLKey.vbs   
  3.   
  4. ‘ This script changes the product key on the computer.   
  5.   
  6. ‘***************************************************************************   
  7.   
  8. ON ERROR RESUME NEXT   
  9.   
  10. if Wscript.arguments.count<1 then   
  11.    Wscript.echo "Script can‘t run without VolumeProductKey argument"  
  12.    Wscript.echo "Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX"  
  13.    Wscript.quit   
  14. end if   
  15.   
  16. Dim VOL_PROD_KEY   
  17. VOL_PROD_KEY = Wscript.arguments.Item(0)   
  18. VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-",""‘remove hyphens if any   
  19. Dim WshShell   
  20. Set WshShell = WScript.CreateObject("WScript.Shell")   
  21. WshShell.RegDelete "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWPAEventsOOBETimer" ‘delete OOBETimer registry value   
  22. for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")   
  23.   
  24.    result = Obj.SetProductKey (VOL_PROD_KEY)   
  25.   
  26.    if err <> 0 then   
  27.       WScript.Echo Err.Description, "0x" & Hex(Err.Number)   
  28.       Err.Clear   
  29.    end if   
  30.   
  31. Next   

    我们知道使用 Gmail 给美国和加拿大拨打电话是完全免费的,现在 Google 则再一次震撼到了我们!只要使用 Gmail 拨打国内电话,通话双方均全部免费!

    操作的步骤如下:

    1、确保登录 Gmail 后可以看到在 Chat 列表中看到 "Call phone"按钮。这有2个方法:

    其一、使用美国或加拿大 IP 地址登录 Gmail 肯定能看到该按钮;
    其二、把 Gmail 语言设置成 US English ,也是有可能使用到呼叫功能的。

    2、安装 Gmail voice and video chat 浏览器插件。

    3、点击"Chat"列表中的"Call phone"按钮,拨打你自己的 Google Voice 手机号,如:(111) 222-333

    4、听到 Google Voice 语音提示:“您当前没有新的消息,按“2”健拨打电话,按“4”健更改设置”。我们按“2”健。

    5、再次听到 Google Voice 语音提示:“请按键输入您要拨打的电话号码,按“#”号健确认。如果是国际长途,则请先按键“011”,再输入国家号,最后输入电话号码”。

    举2个例子:

    如果我要拨打的中国移动手机号为:13866667777,则我应按键输入:0118613866667777#
    如果我要拨打的国内固定电话号码为:021-77778888,则我应按键输入:011862177778888#(注:21为上海区号,大家不要输入021,这是错误的。)

    6、再次听到 Google Vocie 语音提示:“这是一个免费电话!”,接下来电话就直接接通了呢。

    这么大的好事,大家赶紧自己动手试试吧!