Wednesday, December 29, 2010

How to improve home wireless network performance

If Windows ever notifies you about a weak signal, it probably means your connection isn't as fast or as reliable as it could be. Worse, you might lose your connection entirely in some parts of your home. If you're looking to improve the signal for your wireless network, try some of these tips for extending your wireless range and improving your wireless network performance.
10 tips for improving your wireless network

1. Position your wireless router (or wireless access point) in a central location

When possible, place your wireless router in a central location in your home. If your wireless router is against an outside wall of your home, the signal will be weak on the other side of your home. Don't worry if you can't move your wireless router, because there are many other ways to improve your connection.
Bad router and good router comparison

2. Move the router off the floor and away from walls and metal objects (such as metal file cabinets)

Metal, walls, and floors will interfere with your router's wireless signals. The closer your router is to these obstructions, the more severe the interference, and the weaker your connection will be.

3. Replace your router's antenna

The antennas supplied with your router are designed to be omni-directional, meaning they broadcast in all directions around the router. If your router is near an outside wall, half of the wireless signals will be sent outside your home, and much of your router's power will be wasted. Most routers don't allow you to increase the power output, but you can make better use of the power. Upgrade to a hi-gain antenna that focuses the wireless signals only one direction. You can aim the signal in the direction you need it most.
Standard antenna and hi-gain antenna examples

4. Replace your computer's wireless network adapter

Wireless network signals must be sent both to and from your computer. Sometimes, your router can broadcast strongly enough to reach your computer, but your computer can't send signals back to your router. To improve this, replace your laptop's PC card-based wireless network adapter with a USB network adapter that uses an external antenna. In particular, consider the Hawking Hi-Gain Wireless USB network adapter, which adds an external, hi-gain antenna to your computer and can significantly improve your range.
Laptops with built-in wireless typically have excellent antennas and don't need to have their network adapters upgraded.

Wireless router and wireless repeater

5. Add a wireless repeater

Wireless repeaters extend your wireless network range without requiring you to add any wiring. Just place the wireless repeater halfway between your wireless access point and your computer, and you'll get an instant boost to your wireless signal strength. Check out the wireless repeaters from ViewSonic, D-Link, Linksys, and Buffalo Technology.

Wireless channels

6. Change your wireless channel

Wireless routers can broadcast on several different channels, similar to the way radio stations use different channels. In the United States and Canada, these channels are 1, 6, and 11. Just like you'll sometimes hear interference on one radio station while another is perfectly clear, sometimes one wireless channel is clearer than others. Try changing your wireless router's channel through your router's configuration page to see if your signal strength improves. You don't need to change your computer's configuration, because it'll automatically detect the new channel.

7. Reduce wireless interference

If you have cordless phones or other wireless electronics in your home, your computer might not be able to "hear" your router over the noise from the other wireless devices. To quiet the noise, avoid wireless electronics that use the 2.4GHz frequency. Instead, look for cordless phones that use the 5.8GHz or 900MHz frequencies.

8. Update your firmware or your network adapter driver

Router manufacturers regularly make free improvements to their routers. Sometimes, these improvements increase performance. To get the latest firmware updates for your router, visit your router manufacturer's website.
Similarly, network adapter vendors occasionally update the software that Windows uses to communicate with your network adapter, known as the driver. These updates typically improve performance and reliability. To get the driver updates, do the following:

Windows 7 and Windows Vista

  • Click Start menu, click All Programs, and then click Windows Update.
  • In the left pane, click Check for updates, and then wait while Windows Vista looks for the latest updates for your computer.
  • Install any updates relating to your wireless network adapter.

Windows XP

  • Visit Microsoft Update, click Custom, and then wait while Windows XP looks for the latest updates for your computer.
  • Install any updates relating to your wireless adapter.


9. Pick equipment from a single vendor

While a Linksys router will work with a D-Link network adapter, you often get better performance if you pick a router and network adapter from the same vendor. Some vendors offer a performance boost of up to twice the performance when you choose their hardware: Linksys has the SpeedBooster technology, and D-Link has the 108G enhancement.

10. Upgrade 802.11b devices to 802.11g

802.11b is the most common type of wireless network, but 802.11g is about five times faster. 802.11g is backward-compatible with 802.11b, so you can still use any 802.11b equipment that you have. If you're using 802.11b and you're unhappy with the performance, consider replacing your router and network adapters with 802.11g-compatible equipment. If you're buying new equipment, definitely choose 802.11g.
Wireless networks never reach the theoretical bandwidth limits. 802.11b networks typically get 2-5Mbps. 802.11g is usually in the 13-23Mbps range. Belkin's Pre-N equipment has been measured at 37-42Mbps.

关于域名DNS解析中TTL的设置时间

网上关于域名dns解析中ttl值设置时间的文章不多,我今天遇到了这个问题,就把这个问题整理一下,希望可以给需要的朋友有所帮助。
什么是域名的TTL值?
TTL(Time-To-Live),就是一条域名解析记录在DNS服务器中的存留时间。当各地的DNS服务器接受到解析请求时,就会向域名指定的 NS服务器(权威域名服务器)发出解析请求从而获得解析记录;在获得这个记录之后,记录会在DNS服务器(各地的缓存服务器,也叫递归域名服务器)中保存 一段时间,这段时间内如果再接到这个域名的解析请求,DNS服务器将不再向NS服务器发出请求,而是直接返回刚才获得的记录;而这个记录在DNS服务器上 保留的时间,就是TTL值。
      域名DNS分两种,一种是权威域名服务器,域名注册商的服务器都为权威域名服务器,TTL值只能在权威服务器修改,还有一种域名解析服务器就是缓存DNS 服务器,比如各地ISP上网设置的DNS服务器,它的作用主要是把域名解析结果缓存到本地,方便你查询。域名DNS的TTL值实际上就是各地的DNS缓存 服务器多久去你的权威域名解析服务器(NS)获取一次你域名的解析IP。
那么域名解析的TTL只应该设置为多少合适呢,下面有两个建议,你可以结合自己参考一下:
一.增大TTL值,以节约域名解析时间,给网站访问加速。

一般情况下,域名的各种记录是极少更改的,很可能几个月、几年内都不会有什么变化。我们完全可以增大域名记录的TTL值让记录在各地DNS服务器中缓存的 时间加长,这样在更长的一段时间内,我们访问这个网站时,本地ISP的DNS服务器就不需要向域名的NS服务器发出解析请求,而直接从缓存中返回域名解析 记录。

国内和国际上很多平台的TTL值都是以秒为单位的,很多的默认值都是3600,也就是默认缓存1小时,这个值实在有点小了,难道会有人一个小时就改一次域 名记录吗?你可以根据自己的需要把这个值适当的扩大,例如要缓存一天就设置成86400。Godaddy的TTL设置比较直观,但总共只有5个值可以选 定,即时切换到高级设置模式也是如此,有点死板了。


二.减小TTL值,减少更换空间时的不可访问时间。

     更换空间99.9%会有DNS记录更改的问题,因为TTL缓存的问题,新的域名记录在有的地方可能生效了,但在有的地方可能等上一两天甚至更久才生效。结 果就是有的人可能访问到了新服务器,有的人访问到了旧服务器。如果原来的域名TTL值设置的小,各地的ISP域名缓存服务器服务器就会很快的访问你域名的 权威DNS解析服务器,尽快把你域名的DNS解析IP返回给查询者
     这就是说你如果想要解析速度,各地ISP的DNS服务器缓存你的域名,你就需要把TTL值设置大一些,如果你想域名更换空间或者IP后能尽快解析到新的 IP上,就需要把TTL值设置小一些。(我今天因为一个域名过期忘记续费被停掉了解析,结果域名被美国的根库修改了DNS,并把域名转到一个域名停放页 面,后来联系注册商才发现这个问题,由此引起了我对域名的思考,考虑到了域名DNS 解析中TTL值的问题。小插曲,和本文的技术无关)
     总结:对于IP地址相对固定,或短期内不会变更IP地址的用户来说TTL值设置的大些如几个小时或更大些为宜。调大TTL值可以显著的提 高域名的解析稳定性和速度。而对于近期有计划变更IP地址的用户需要提前把TTL值改小,以便使缓存在世界各地DNS服务器上的旧域名记录迅速过期,等 IP地址固定下来后再把TTL值改大。
    经验:百度和google的域名TTL值我看了一下,都是86400秒,也就是一天。我的一些域名我也修改成了86400秒了,你的具体多大,你自己根据需要修改吧。


source: http://www.dabaoku.com/jiaocheng/fabu/yuming/201009207014.shtml

Monday, December 27, 2010

PPS网络电视(PPStream)播放器常见问题解答

    PPStream(PPS网络视频)是一套完整的基于 P2P 技术的流媒体大规模应用解决方案,包括流媒体编码、发布、广播、播放和超大规模用户直播。

使用 PPStream 播放经常缓冲?
1. 如果您使用的是 Windows XP SP2 操作系统, 请确认您已经使用过 XP SP2 突破连接限制补丁。该补丁会在您升级 windows 以后失效, 建议您在升级 Windows XP 后重新运行一次该补丁。
2, 如果您有使用卡巴斯基防火墙等防病毒软件, 请在播放时关闭其 “ 网络实时监控 ” 。
3, 如果您是内网用户,请使用端口映射或打开 UPNP 支持将自己变成外网。

使用 PPStream 播放经常花屏?
1. 出现花屏现象如果您的系统是 WINDOWS XP 请升级 WINDOWS MEDIA PLAYER 至 10 。非 WINDOWS XP 系统,如果是 ATI 显卡,则在显卡属性里把 “ 显卡--属性--高级 ” 下的 “ WMA 加速 ” 这个选项去掉。旧的 SIS 系列显卡会有个别节目出现花屏现象,请尝试彻底删除原驱程安装最新驱程或更换其它版本驱程。其他显卡如若出现花屏现象也请尝试重装驱程或更换其它版本驱 程。
2. 如果您是 ATI 显卡用户,装有 ATI TRAY TOOLS 这个 ATI 显卡优化工具的,可能会产生播放某些流媒体文件时导致电脑重启,请尝试卸载 ATI TRAY TOOLS 。

使用 PPStream 播放经常自动退出网络、断流掉线?
1. 主板自带网卡的用户请注意, 2003 年 -2004 年市面上出现了网卡集成主板这样的配置机型,存在重大的问题,主要表现为通讯量较大时,容易出现阻塞,造成缓冲,解决办法是请尝试再选购一块网卡,不使用板载网卡。
2. 用 ADSL 猫上网时,大部分猫都有默认的最大允许 session ,一旦超过这个数值,猫就会进行保护性断流,要解决这个问题,请修改您所用的 ADSL 猫默认 session 值。不同牌子不同型号的 ADSL 猫的设置都有可能不同,至于详细如何设置,请参考您自己所用的猫所带的用户设置说明书或向网络服务供应商求助。推荐上网使用搜索引擎输入您所用 ADSL 猫的型号,一般就有许多详细的设置使用说明供你参考。
3. 如果您有使用卡巴斯基防火墙等防病毒软件, 请在播放时关闭其 “ 网络实时监控 ” 。
4. 如果您使用的是 Windows XP SP2 操作系统, 请确认您已经使用过 XP SP2 突破连接限制补丁。该补丁会在您升级 windows 以后失效, 建议您在升级 Windows XP 后重新运行一次该补丁。

使用 PPStream 播放经常蓝屏、自动重启电脑?
请在系统安装目录下(默认 C :)查看有没有 C:WINDOWSsystem32aclayer.dll 和 C:WINDOWSsystem32aclayer.exe 这两个文件,一般没有,有则请在安全模式下删除,再打开注册表编辑器(点击 " 开始 " - " 运行 " ,输入 "Regedit.exe" ,确定),打开 HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices 注册表项,点击菜单 " 编辑 " - " 查找 " , " 查找目标 " 输入 "aclayer_Server.exe" ,点击确定,删除整个 aclayer_Server 项。这两个文件或许可能会导致您在使用 PPStream 时出现蓝屏以及自动重启电脑现象。
教育网、局域网用户为什么有的时候不能顺畅观看播放的节目?
如果条件允许,请作端口映射,或开启网络交换设备、路由设备、操作系统中的 upnp 功能。但如若由网管控制设备和封闭了 P2P 对外端口,则需要与网管协调解决。
WINODWS XP SP2 的用户有时候为什么不能顺畅观看播放的节目?
如果您的系统是 WINDOWSXP SERVICE PACK 2 的,请打 WINDOWSXP SP2 连接数破解补丁并将连接数改至适当数量。至于不断缓冲,基本解决办法是在播放区域点击鼠标右键选择默认播放器播放,默认播放器只推荐选用微软的 Windows Media Player10 。
ADSL 用户断流问题原因分析
1 、最常见的是设置错了 ADSL Modem 的 IP 地址,或是错误设置了 DNS 服务器。因为对于 ADSL 虚拟拨号的用户来说,是不需要设定 IP 地址的,自动分配即可。 TCP/IP 网关一般也不需要设置。另外如果设定 DNS 一定要设置正确,如果操作系统是 Windows 9x ,在 DOS 窗口下键入 Winipcfg 获取 DNS 地址,在 Windows 2000/XP 下键入 ipconfig /renew ,或询问当地电信部门。
另外, TCP/IP 设置最容易引起不能浏览网页的情况,例如没有更改过设置,一直可以正常浏览,突然发现浏览不正常了,就可以试着删除 TCP/IP 协议后重新添加 TCP/IP 协议 。
2 、有的操作系统可能对 ADSL 的相关组件存在兼容性问题,以 Windows 98 为例,它的网络组件存在重大缺陷,连网时都会出现莫名其妙的断流问题。遇到这种情况最好的解决方法是给系统打补丁,你可以直接连接到微软的官方网站,选择 系统搜索到的补丁下载。待补丁安装完成后,再安装虚拟拨号软件打补丁解决。
主要补丁有: Windows 98 SE 版的补丁、 Windows 98 拨号网络 1.3 升级 1.4 补丁、 Windows 95 当时用 WinPoET,RasPPPoE 这类依靠操作系统的拨号网络工作的软件请首先安装 “ 微软拨号网络 1.3” 方能正常工作、微软拨号网络 MSDUN1.4 。
为什么使用 PPStream 观看节目总是和电视相差数分钟不同步?
由于节目信号需要通过采集卡采集并编码后,才传送到网络上,再加上客户端需要接受数据,网络延时,所以时间会有差数分钟差距不同步。
使用 PPStream 观看某些双语剧集电影时如何切换语言?
1 、请点选系统右下角任务栏里喇叭图标,进入 “ 音量控制 ” 中左右调整平衡设置。
2 、请使用默认播放器 Windows Media Player 播放,点选进入 “ 查看 —— 增强功能 —— 图形均衡器 ” 中调整左右平衡。
如何更改 PPStream 的使用端口?
打开 PPStream 软件 菜单- > 工具- > 选项- > 连接设置- > 起始端口号 按随机端口号 来修改 PPStream 的端口。
PPStream 的端口经常改变,如何固定 PPStream 使用端口?
打开 PPStream 软件 菜单- > 工具- > 选项- > 连接设置 选中 使用固定端口。
我是局域网用户,带宽比较小,如何能实现局域网中多台机子共同观看同一频道?
打开 PPStream 软件 菜单- > 工具- > 选项- > 局域网共享来设置具体操作
剧场电影台可以自由点选剧集电影播放吗?
非常抱歉,暂时还不支持自由点播,需要自行留意计算播放周期收看。
我是使用默认播放器观看节目的,如何更改默认播放器?
请打开您选取的播放器,通常在播放器的 “ 工具(或查看) —— 选项(或设置) —— 文件类型(或格式或关联文件) ” 中选择关联 asf 、 asx 格式,若您不是很清楚,可以选择全部格式关联。
友情提醒,默认播放器请使用 Windows Media Player 9 或以上版本,使用其它播放器会有部分频道不能正常收看。
为什么我的 PPStream 显示 “ 找不到成员 ” ?
请确认您成功安装了 PPStream 最新版本的客户端。
为什么我不能全屏幕观看节目?
1 、 请打开 Windows Media Player 播放器点选 “ 工具 —— 选项 —— 性能 ” ,将 “ 视频加速 ” 项开至 “ 完全 ” 。
2 、 请在桌面空白处点击鼠标右键选取 “ 属性 ” ,进入 “ 显示属性 —— 设置 —— 高级 —— 疑难解答 ” 中将 “ 硬件加速 ” 项开至 “ 完全 ” 。
为什么我使用 PPStream 观看节目时会出现 “ 播放 c:Program filesppstareamhttpxxxxx.asx 失败 ” 的错误提示?
1 、 请打开 Windows Media Player 播放器,在 “ 工具 —— 选项 —— 文件类型 ” 中选择关联 asf 、 asx 格式,若您不是很清楚,可以选择全部格式关联。
2 、 请重新安装 MediaWindowsPlayer 播放器。
为什么使用 PPStream 时无法打开其他网页?
问题多是发生在 WindowsXP Service Pack 2 系统用户上。 请安装 WindowsXP SP2 连接数破解补丁,将连接数自行调整至适合数量。
突然发生无法打开左边频道列表时如何解决?
1 、请暂时使用 “ 在线帮助 —— 在网页中播放 ” 观看。
2 、请点击右边节目预告表上的节目预告可以直接打开相关频道。

为什么我无法读取频道列表?
请打开 PPStream 软件 菜单- > 工具- > 选项- > 其他设置- > 通过 HTTP 方式获得列表- >
重新启动 PPStream 。
PPStream 能否使用代理观看?

请点选 “ 在线帮助 —— 在网页中播放 ” 观看,这样可以对 IE 浏览器使用代理设置。
为什么我使用 PPStream 时某个频道不能正常收看,但其它频道能正常收看?
1 、请确认已安装 Windows Media Player 9 或以上版本。
2 、非常抱歉,是个别频道的节目源出现问题,我们的工作人员会尽快修复,请稍候再试。
我是 Windows98 系统用户,为什么使用 PPStream 观看一段时间后会不能接受数据?
PPStream 是基于 Windows2000 以上系统开发的,由于 Windows98 系统网络组件存在一定缺陷,所以在 Windows98 系统上使用 PPStream 可能会存在一定问题。如果条件允许,建议您升级系统。
如何控制 PPStream 连接数量?
可以通过菜单- > 工具- > 选项- > 连接设置 里设置连接数不宜设置过多, 否则可能会导致路由器或防火墙出现断流。
如何设置定时播放指定频道?
可以通过菜单- > 工具- > 定时 中设置。

如何在 PPStream 播放节目时进行录象?

1 、 请使用 PPStream 主页上提供的录象工具。
2 、 可以在默认播放器 Windows Media Player 播放区域中点击鼠标右键进入 “ 属性 ” 中获得录象地址如: http://127.0.0.1:xxxxx/ps/xxxxxxxxxx/xxxxxx.xxx ,只要复制地址使用软件下载工具如 FlashGet 等进行下载就能录象。

如何正确使用定时功能?
请选取 “ 工具 —— 定时 ” ,设定好时间、方式并在 “ 定时 ” 前的方框打上勾后,最重要一步是在点击 “ 确定 ” 前,一定要先查看设定时间有否变化,确认无误后才按 “ 确定 ” 。

如何将播放窗口固定在桌面最前端显示?
请在播放区域点击鼠标右键选取 “ 窗口总在最顶端 ” 项。

如何调整播放窗口尺寸大小?
请用鼠标移动窗口四边方框调整大小。

如何消隐播放窗口两边节目列表?
菜单-查看 将频道列表 咨询导航 画面预览前的勾去掉或者直接在想要关闭的部分上按 关闭 (X) 按钮。

如何了解频道的节目播放内容时间 ?
请点选右边节目推荐表右上角的 “ 查看节目表 ” 项。

如何对 PPStream 频道进行排序?
请移动鼠标至左边频道列表上方,分别可以点选 “ 频道 ” 、 “ 码率 ” 、 “ 收视率 ” 进行分类。
播放时如何切换全屏幕?
请在播放区域双击鼠标左键进行来回切换。

如何调整设置 PPStream 播放画面亮度色彩?
1 、 请使用默认播放器 Windows Media Player 播放,点选进入 “ 查看 —— 增强功能 —— 视频设置 ” 中调整。
2 、 请进入系统显示属性里显卡驱动附带功能中设置。
3 、 请使用显示器硬件调整。
为什么使用 PPStream 时出现错误报告,导致程序关闭?
目前 PPStream 还是测试版,由于各种原因,可能会导致程序出错,但出现这种情况是非常少的,请将出错的信息报告发送给我们。如果出现频繁,可以先检查 PPStream 是否与您系统中某个程序或视频插件发生冲突。
播放时如何获知 PPStream 的网络连接状态?
1 、请移动鼠标至播放区域下方 3 盏闪光小灯处显示。
2 、请在播放区域点击鼠标右键选取 “ 属性 ” 项查看。
打开软件后为什么会是乱码?
PPStream 最新版本已经支持在繁体操作系统上显示繁体中文。请下载最新版本的 PPStream 客户端。
PPStream 为什么总是缓冲到 99% 又重新缓冲?
点击右键,使用默认播放器。

PPS网络电视(PPStream)使用技巧

PPStream(PPS网络视频)是一套完整的基于 P2P 技术的流媒体大规模应用解决方案,包括流媒体编码、发布、广播、播放和超大规模用户直播。能够为宽带用户提供稳定和流畅的视频直播节目。

1、快速查询当前最热节目

PPS网络电视目前提供了二十多个节目分类,总计近600个频道节目,全天候24小时为用户服务。面对如此众多的频道节目、分类,我们该如何快速判断当前最受欢迎、最火爆的节目呢?其实很简单,直接查看PPS网络电视提供的收视率即可。

默认情况下,软件只能查看单个分类下所有节目的收视情况,那如何了解频道列表所有节目中哪些是最热最火的节目呢?操作步骤:鼠标右键点 击频道列表任意区域,在随后的快捷菜单中点击“显示分类”,此时,频道列表中的分类将消失,所有节目将混为一体。现在,直接点击“观众”按钮(图1),频 道列表就会按照收视率的高低顺序来排列节目列表了,你也就能一眼看到当前最热的节目。

图1 按观众排序

2、画中画也能暂停

PPS网络电视的画中画功能非常不错,满足了部分用户的实际需求。但是,画中画没有直接提供播放控制功能,导致无法暂停当前正在播放的画中画内容。好在,我们可以通过变通方法来实现。

具体操作步骤:当要暂停画中画播放节目时,直接双击画中画,使其与当前主播放内容相互切换而成为主播放画面,随后应用主播放界面中播放控制进行 暂停,接着依旧双击画中画区域再度进行切换,使暂停的画面返回至之前的画中画模式。要想将暂停的画中画恢复播放,再次执行类似操作即可。

3、快速调用系统保护工具

由于目前网络上各种蠕虫、木马、恶意软件横行,导致国内用户的网络安全形式严峻。针对这种情况,PPS网络电视从用户安全角度出发,和国内拥有 庞大用户群的安全辅助工具360安全卫士合作,将360的主要功能(如木马查杀、插件清理、实时保护、系统漏洞修复等8项)接口整合进软件,以便用户快速 调用360安全卫士进行查杀,优化等应用。操作步骤:依次在主界面下执行“工具/安全保护”,随后选择要执行的功能名称,即可启动360安全卫士并进入对 应功能界面。

4、自定义快捷键让操控更自如

快捷键的熟练应用,非常有助于提供工作效率,这对PPS网络电视操作也不例外。为了满足不同用户的需求,PPS网络电视各主要操控功能(总计有 28项)均提供了快捷键,并支持自定义。操作步骤:依次执行“工具/快捷键”进入快捷键自定义对话框,随后直接在列表中选择要重新定义的功能,接着修改设 定“组合键”和“键”这两项的内容即可。

5、断点续播

不少用户在欣赏网络节目时,由于各种突发事件,不得不半途中断节目观看。更令人烦恼的是,下次再度欣赏该节目时,要么是重新开始看,要 么是拖动进度条至上次中断的地方。不过,随着版本的升级,目前PPS网络电视的点播节目,可以直接从上次中断的地点继续播放,也就是所谓的断点续播。具体 操作:依次执行“工具/选项”,接着直接勾选“记忆上次播放的位置”(图2)即可。之后再次欣赏这同一部影片时,软件便能自动跳转至之前中断播放的地方播 放。


6、欣赏网络电视,屏保请勿打扰

不少朋友在有滋有味的欣赏网络电视时,屏保会突然跳出,影响了整个节目的观看。对于这个问题其实PPS网络电视已经考虑到了,只需简单 设置一下即可。具体步骤:依次执行“选项/工具”进入设置对话框,随后在默认显示的播放器设置界面勾选“禁用屏幕保护程序很电源管理”即可,该设置属于即 时生效。一旦设定完成,就再也不用担心半途杀去个程咬金来扫兴了。

PPStream自定义快捷键

PPStream自定义快捷键
鼠标一个一个地点选功能是不是很麻烦?为了更快捷地操作我们就要用到
快捷键,我们选择主菜单上的工具->快捷键(A)...就可以查看常用功能的
快捷键并且可以对其重新设定。(如图1)

(图1)
这里列出常用功能的默认快捷键设定:
功能键                    组合键                       键
1倍窗口                    Ctrl                        1
音量增强                   无                          +
音量减弱                   无                          -
1.5倍窗口                  Ctrl                        2
全屏                       Ctrl                        3
静音                       无                          8
双声道                     Ctrl                        B
画面比例4:3                Ctrl                        D
画面比例16:9               Ctrl                        F
截获画面                   Ctrl                        I
保持比例                   Ctrl                        K
左声道                     Ctrl                        L
精简模式                   Ctrl                        M
打开文件                   Ctrl                        O
播放/暂停                  Ctrl                        P
右声道                     Ctrl                        R
停止                       Ctrl                        S
打开地址                   Ctrl                        U
音量增加                   无                          +
直播                       Ctrl                        F2
关闭PPS网络电视            Alt                         F4
频道列表伸缩               Ctrl                        Left(Left为数字键区的4)
静音                       无                          *
快进                       Ctrl                        PageDown
快退                       Ctrl                        PageUp
全屏/退出全屏              Alt                         Enter
资讯导航收缩               Ctrl                        Right(Right为数字键区的6)
音量减弱                   无                          -
置顶模式                   Alt                         Z

我们可以选择组合键的下拉列表,对组合键进行设置(如图1所示),可选设置有:

Alt
Ctrl
Shift
Ctrl+Alt
Ctrl+Shift
Alt+Shift
Ctrl+Alt+Shift
这些组合键选择好后我们可以对“键”进行设置,
单击“键”下的键名,然后按下键盘上想要设置的字母或数字键,最后单击确定按钮。
以后我们就可以用组合键+键的组合来快速使用PPStream为我们
提供的功能了!比如说截取画面功能就是Ctrl+I,我们可以同时
按下键盘上的Ctrl键和I键就可以使用截取画面功能功能了。
如果此时我们把截取画面的“组合键”设定为Ctrl+Alt+Shift,
“键”设定为A,我们就必须同时按下Ctrl,Alt,Shift,A键才能
实现截取画面功能。(即Ctrl+Alt+Shift+A)
如果我们想将快捷键恢复为系统默认的设置,我们可以先选择一个
功能键,然后单击“恢复选中”按钮,最后选择确定即可。如果
想恢复所有功能键,那么选择“全部恢复为默认”将所有功能键
恢复为默认设置,最后我们单击确定即可。

Monday, December 20, 2010

SQL高手篇:精妙SQL语句介绍

说明:复制表(只复制结构,源表名:a 新表名:b)
  SQL: select * into b from a where 1<>1   
  说明:拷贝表(拷贝数据,源表名:a 目标表名:b)
  SQL: insert into b(a, b, c) select d,e,f from b;   
  说明:显示文章、提交人和最后回复时间
  SQL: select a.title,a.username,b.adddate from table a,(select max(adddate) adddate from table where table.title=a.title) b  
  说明:外连接查询(表名1:a 表名2:b)
  SQL: select a.a, a.b, a.c, b.c, b.d, b.f from a LEFT OUT JOIN b ON a.a = b.c   
  说明:日程安排提前五分钟提醒
  SQL: select * from 日程安排 where datediff('minute',f开始时间,getdate())>5   
  说明:两张关联表,删除主表中已经在副表中没有的信息
  SQL: delete from info where not exists ( select * from infobz where info.infid=infobz.infid )   
  说明:--
  SQL: SELECT A.NUM, A.NAME, B.UPD_DATE, B.PREV_UPD_DATE FROM TABLE1,(SELECT X.NUM, X.UPD_DATE, Y.UPD_DATE PREV_UPD_DATE FROM (SELECT NUM, UPD_DATE, INBOUND_QTY, STOCK_ONHAND FROM TABLE2 WHERE TO_CHAR(UPD_DATE,'YYYY/MM') = TO_CHAR(SYSDATE, 'YYYY/MM')) X, (SELECT NUM, UPD_DATE, STOCK_ONHAND FROM TABLE2 WHERE TO_CHAR(UPD_DATE,'YYYY/MM') = TO_CHAR(TO_DATE(TO_CHAR(SYSDATE, 'YYYY/MM') ¦¦ '/01','YYYY/MM/DD') - 1, 'YYYY/MM') ) Y, WHERE X.NUM = Y.NUM (+)AND X.INBOUND_QTY + NVL(Y.STOCK_ONHAND,0) <> X.STOCK_ONHAND ) B WHERE A.NUM = B.NUM   
  说明:--
  SQL: select * from studentinfo where not exists(select * from student where studentinfo.id=student.id) and 系名称='"&strdepartmentname&"' and 专业名称='"&strprofessionname&"' order by 性别,生源地,高考总成绩   
  说明: 从数据库中去一年的各单位电话费统计(电话费定额贺电化肥清单两个表来源)
  SQL: SELECT a.userper, a.tel, a.standfee, TO_CHAR(a.telfeedate, 'yyyy') AS telyear, SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '01', a.factration)) AS JAN, SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '02', a.factration)) AS FRI, SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '03', a.factration)) AS MAR, SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '04', a.factration)) AS APR, SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '05', a.factration)) AS MAY, SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '06', a.factration)) AS JUE,SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '07', a.factration)) AS JUL, SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '08', a.factration)) AS AGU, SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '09', a.factration)) AS SEP, SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '10', a.factration)) AS OCT, SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '11', a.factration)) AS NOV,SUM(decode(TO_CHAR(a.telfeedate, 'mm'), '12', a.factration)) AS DEC FROM (SELECT a.userper, a.tel, a.standfee, b.telfeedate, b.factration FROM TELFEESTAND a, TELFEE b WHERE a.tel = b.telfax) a GROUP BY a.userper, a.tel, a.standfee, TO_CHAR(a.telfeedate, 'yyyy')   
  说明:四表联查问题:
  SQL: select * from a left inner join b on a.a=b.b right inner join c on a.a=c.c inner join d on a.a=d.d where .....   
  说明:得到表中最小的未使用的ID号
  SQL: SELECT (CASE WHEN EXISTS(SELECT * FROM Handle b WHERE b.HandleID = 1) THEN MIN(HandleID) + 1 ELSE 1 END) as HandleID FROM Handle WHERE NOT HandleID IN (SELECT a.HandleID - 1 FROM Handle a)

Wednesday, December 15, 2010

子网IP计算工具集

http://www.subnetonline.com/pages/subnet-calculators.php

Sunday, December 12, 2010

Kindle : How to delete files (books)


On a Kindle 3, you can select your book from the home screen, click the left arrow on the 5-way button which brings up a delete (Remove from device) button the screen. Press the center button the 5-way button and the book goes away.

Saturday, December 11, 2010

Mac - How to rename a filename

Method 1,
    -->In Finder, open the folder with your file in it.
    -->See all those pretty icons? Don’t click on them. Find the icon for your file. Click once on that icon then click and hold the mouse button down on the filename below it.
    -->After about a second of holding down the mouse button the text will become editable and you can type over the filename. Be careful you don’t change the extension because bad things will happen!

Method 2,
You can also just select the icon (click once) and then hit the Enter key. That’ll make the file name editable as well.

Mac - How to 'Show' Desktop and Shortcut?

1. fn+F11. to see desktop
or

2. Exposé

Mac OS X offers a simple way to see what's on your desktop when you have a lot of windows open. It’s called Exposé, and here’s how you can use it. Press the F9 key and Exposé instantly creates thumbnails of the open windows and displays them neatly on your screen. Click the window you want, and Exposé brings it to the front, switching automatically to the appropriate application.
You can press the F10 key to create thumbnails of the open windows of your current application. Or F11 to move all open windows to the side, so you can see the files on your desktop.

Thursday, December 9, 2010

Best Media Player for Mac OSX

Best Media Player for Mac OSX

No 1. Movist (5 Stars *****)
http://code.google.com/p/movist/downloads/list

No 2,  mplayerx (not mplayer) (4 Stars ****)
http://code.google.com/p/mplayerx/downloads/list

Thursday, December 2, 2010

Harmony Remote and Apple TV, iMac... issues

Apple TV
If after updating your Harmony Remote the Apple TV does not respond, please follow these steps:
  1. Press the Device button on your Harmony.
  2. Select the Apple TV. It will be listed as a Media Center PC.
  3. Hold the Harmony within 3 inches of the Apple TV.
  4. From the LCD of your Harmony, select the command Unpair.
The Apple TV should now respond to your Harmony Remote.

I want to control more than one Apple device with my Harmony Remote:

If you have more than one Apple product that you wish to control with your Harmony, you will need to pair the Harmony with those devices.
  1. Press the Device button on your Harmony.
  2. Select your Apple device (for example, an iPod will be listed as Digital Music Server, an iMac or Apple TV as a Media Center PC)
  3. Hold the Harmony within 3 inches of the Apple product.
  4. Ensure all other Apple devices are powered off so that they do not pair to the same remote language.
  5. From the LCD of your Harmony, select the command Pair.
Repeat these steps for each Apple product you wish to control with the Harmony

Friday, November 26, 2010

How to Run IE8 Without Addons

Internet Explorer can be run without the add-ons installed. This is useful if you run into some kind of error after you installed any particular add-on. In Firefox, this mode is called as safe mode and a similar mode is available for IE. You can open Internet Explorer without add-ons in 2 ways. One way to open is to navigate to start menu-> All Programs-> Accessories-> System Tools-> Internet Explorer (no Add-ons). This opens up IE without ActiveX controls and browser extensions.



IE8 without add-ons

Second way is Win + R key which opens Run command, type iexplore –extoff and this will open up IE8 without add-ons.

IE8 no add-ons


Opening IE8 without add-ons will help you to find any issues encountered after the installation of any add-on.

Everything you've ever wanted to know about MDaemon

http://www.everything-mdaemon.com/

Wednesday, November 24, 2010

备份激活文件保存win7激活的方法

如何通过备份Windows 7“两个激活文件”实现重装操作系统后的自行激活呢?以下向大家提供:动手制作两个“批处理”即可得以圆满解决的简单实用方法——

(一)关于两个“批处理”文件制作:

1。备份激活文件“批处理”

---------------------------------------------------------------------------
@echo off
copy %windir%\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms
copy %windir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat
pause
exit

---------------------------------------------------------------------------

——将以上绿色字符复制/粘贴到记事本,另存为“备份激活文件.bat”即可。

2。恢复激活文件“批处理”

---------------------------------------------------------------------------
@echo off
net stop sppsvc /y
takeown /f "%WinDir%\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms"
cacls "%WinDir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat" /e /g everyone:f
cacls "%WinDir%\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms" /e /g everyone:f
ren "%WinDir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat" "tokens.bak"
ren "%WinDir%\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms" "pkeyconfig.bak"
copy tokens.dat "%WinDir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\"
copy pkeyconfig.xrm-ms "%WinDir%\System32\spp\tokens\pkeyconfig\"
del "%WinDir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.bak"
del "%WinDir%\System32\spp\tokens\pkeyconfig\pkeyconfig.bak"
net start sppsvc
cscript %windir%\system32\slmgr.vbs -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
cscript %windir%\system32\slmgr.vbs -ato
pause
exit

---------------------------------------------------------------------------

——将以上绿色字符复制/粘贴到记事本,用激活该系统时所使用的密钥替换其中的XXXXX-XXXXX-XXXXX-XXXXX-XXXXX,另存为“恢复激活文件.bat”即可。

(二)关于两个“批处理”文件使用:

    第一,将以上两个批处理文件放到任意磁盘的同一文件夹。以管理员身份运行“备份激活文件.bat”,即可得到两个激活文件的备份。

    第二,重装操作系统后,在断网情况下(注意:不要接通),以管理员身份运行“恢复激活文件.bat”,即可实现操作系统的自行激活。

友情提示:

    我看了所有网友的留言。特就其中三个问题提示如下:

    其一,制作批处理文件,首先要在文件夹选项中去掉“隐藏已知文件类型扩展名”之前的“√”,然后在“另存为”时选择“保存类型:所有文件”:文件名后缀必须是.bat。

    其二,进行备份的正确操作:鼠标右键 / 备份激活文件.bat / 以管理员身份运行,就会在“备份激活文件.bat”旁边生成两个激活文件备份:pkeyconfig.xrm-ms和tokens.dat。

    其三,因为某种原因不能成功备份,可以尝试在安全模式下操作,或者启用Administrator:控制面板/管理工具/计算机管理/本地用户和组/用户/Administrator属性/去掉“帐户已禁用”前边的“√”/确定。

    另外,提请各位网友务必注意:这两个激活文件备份必须“原地不动”(不能脱离“恢复激活文件.bat”,将其转移到其它地方),否则将来不能实现有效恢复和自行激活。



最后, 建议不要安装补丁包(KB971033), 微软正版增值补丁. 这个补丁没有任何增值效果, 唯一的作用就是定期检查你的windows是否是正版,不是正版就黑屏,相信很多狼友领教过了.在系统升级是可以右键点击该补丁,设置为隐藏就可以了(前提是不要选中升级).

Tuesday, November 23, 2010

iOS 开发资源

http://www.ipadev.org/
http://www.verycd.com/topics/2863494/

Network Know how memo 201011

In an Ethernet switching environment (all providers have this), it's necessary to record a table of MAC addresses on the Ethernet ports of the switches.  The MAC address is unique to each Ethernet device on the network; your servers each have globally unique MAC addresses.  If the switch is Layer 2, it only records the port number and the MAC.  If it's Layer 3 (like a router), it records the MAC, the port, and the IP in something we call the "arp table" (arp == Address Resolution Protocol, it's the method by which an IP-speaking Ethernet device resolves the map from IP to MAC).

When you added the IP .242 to the new server, the switch was still caching the old MAC in the arp table.  It needed to be either cleared manually in the router, or the router would need to learn the new MAC-to-IP mapping by receiving a packet initiated from .242, or it would be cleared automatically at the end of the normal arp expiration time in the router (currently 4 hours).  I would have cleared the arp table manually in this instance, but you wrote back and said it's working just a few minutes before I could get to a PC to do this.

This problem you had is unique only to customers who are in a private VLAN and can change their machine's IP themselves; perhaps in the future we can provide a way for customers to clear their own arp table within our router.  But if you ever get into that situation again, you can resolve it within seconds by generating a packet toward the Internet with the source address of the IP you want to override in the arp table. Unfortunately "ping" does not allow you to do this (at least the Server 2003 version I'm looking at), because the -S flag (source address) only applies to ipv6.  However you may be able to find a utility on the Internet that lets you bind to a certain IP. mIRC is one that immediately comes to mind.

VPN step by step and other resource link

 http://technet.microsoft.com/en-us/network/bb545442.aspx

Remote Access Step-by-Step Guide: Deploying Remote Access with VPN Reconnect
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=7E973087-3D2D-4CAC-ABDF-CC7BDE298847&amp%3Bdisplaylang=en

Sunday, November 21, 2010

Vancouver Biz Fibre Optic Internet and other information

http://www.ubn.ca/bizbroadband.html
http://www.novusnow.ca/services/soho_internet.php
http://www.spectrumnetworks.ca/products.htm
http://www.westel.com/about-us/news/releases/teraspan-fibre.html

Tuesday, November 16, 2010

Maximizing Attribute Relationship Aggregations in Changing Dimensions

When designing your SQL Server 2005 Analysis Services (SSAS) dimensions and related attributes—appropriately called attribute relationships—you should consider how changes in your dimension data will affect the underlying dimension aggregations and, in turn, processing and query performance. If you aren’t careful in defining attribute relationships, you’ll likely run into dimension processing problems such as processing errors—and seemingly at the most inconvenient time. In this article, I explore the attribute relationship property called RelationshipType, which defines whether SSAS persists aggregations when it processes the dimension. If changes such as inserts or updates are occurring in your dimension tables, read on because you’ll want to optimize this property to maximize how your cube stores aggregations. I also walk through different types of dimension changes and their effect on the RelationshipType property so that you can optimize this setting whenever possible.
Performance Potholes
I remember my first taste of dimension processing with changing dimension data. That was in SQL Server 7.0, in the early days of SSAS, which was called OLAP Server back then. I had created a dimension based on a table whose columns experienced daily updates. When I processed the dimension, I received a “duplicate dimension” processing error. I thought, “What? I don’t have duplicate dimension records in my table!” But the problem wasn’t my dimension table; it was that my dimension in OLAP Server wasn’t marked as a changing dimension. When OLAP Server processed the dimension, all existing rows that had changed looked like new records to the dimension. And the server saw a new row with the same surrogate key as an existing row—a “duplicate.”
I set the dimension as a changing dimension, and the error disappeared, but so did some supporting aggregations and, in turn, performance. With changing dimensions in pre-SSAS 2005 versions, whenever you processed the dimension, all cube aggregations would be dropped and then slowly built again—a process called lazy aggregations.
In SSAS 2005, however, the changing-dimension concept is now part of the AttributeRelationship object’s RelationshipType property. This design has two performance impacts. First, when SSAS drops the aggregations and until it rebuilds them, queries suffer because the SSAS engine must calculate the query results by computing the values from either the underlying data or other aggregations. Second, when lazy aggregations are running, generating and storing the aggregations requires server resources, adding to the overall server load.
You can set the RelationshipType property to Flexible or Rigid, depending on whether the data from the associated attribute changes in relationship to the attribute relationship. The default setting is Flexible. If all the RelationshipType settings in an aggregation are set to Rigid, SSAS can persist the aggregation even when it processes the cube. Let’s look at how to determine the correct setting for the RelationshipType property, with the goal of using the Rigid setting as much as possible, which isn’t always easy.
Defining Attribute Relationships
Figure 1 shows the Product dimension in the AdventureWorks cube, with the Model Name and Subcategory attribute relationship highlighted. Also highlighted is the RelationshipType property, currently set to Flexible.

Figure 1: Product dimension in the AdventureWorks cube, with the Model Name and Subcategory Attribute Relationship highlighted.
If you follow SSAS optimization best practices (such as the ones in the white paper “Microsoft SQL Server 2005 Analysis Services Performance Guide,” which you can download at http://www.microsoft.com/technet/prodtechnol/sql/2005/ssas2005perfguide.mspx) chances are you’re familiar with two basic optimization techniques for dimensions:
  • Create attribute relationships above the key attribute that follow the natural hierarchies of your dimensions.
  • Set the RelationshipType property of the attribute relationships to Rigid when the data doesn’t change between related attributes.
The confusion comes when you combine these two techniques and your extraction, transformation, and loading (ETL) process modifies your dimension table by adding new records, adding Type 2 historical dimension changes (which track the history of changes for an attribute), and performing Type 1 changing updates when some attribute values are overwritten.
So here’s the big question: When should you set the RelationshipType property to Flexible versus Rigid in your dimensions when you have dimension changes occurring and natural hierarchies built? The answer: It depends on what kind of changes are happening and where!
For example, if you’re tracking Type 2 historical changes of an attribute such as Model Name that’s tied to the key attribute, then you change the RelationshipType property to Rigid. But if your Type 2 historical change is happening to an attribute such as SubCategory that’s not directly related to the key attribute but is related instead to a higher level attribute, then the RelationshipType property needs to remain Flexible so that the change doesn’t cause an error.
Thus, the basis for determining whether to set the RelationshipType property to Rigid or Flexible is whether the keys of the related attributes change relative to one another. To determine a change, look at whether the “key” relationships (that is, the attribute key values) change—not whether there are changes to just the name property as attributes related to one another. Confused? Stay tuned.
Type 2 Historical Changes
Let’s look at an example for Type 2 historical changes. The Model Name attribute uses the Model Name column for both the key and the name property. In addition, this attribute is tied directly to the key attribute of the dimension, which is the surrogate key. Let’s assume that Model Name is classified as a Type 2 historical attribute and that Model Name can change for a record. Because a Model Name change is a Type 2 change, a new record will be created when the Model Name changes for a record.
In the following sample dimension table, a new Model Name is assigned to an existing product, which creates a new record for that product.
Product Key Product Name Product ID Model Name (the attribute’s key)
210 HL Road Frame – Black, 58 FR-R92B-58 HL Road Frame
607 HL Road Frame – Black, 58 FR-R92B-58 HL Frame
Notice that a new surrogate key is also created for the new Model Name, and the old surrogate key is still tied to the old Model Name. However, because the Model Name didn’t change in relationship to the surrogate key (the key of the key attribute), the relationship isn’t changing, and you can set the RelationshipType property to Rigid for the Model Name attribute relationship. The principle to follow here is that you can set the RelationshipType property of Type 2 historical attribute relationships to Rigid if the attribute relates directly to the key attribute.
Now let’s look at an example of Subcategory tracked as a Type 2 historical attribute in relationship to Model Name. In Figure 1, Subcategory is defined as an attribute relationship of Model Name. If the Subcategory changes for a product, a new record will be generated for the product, as the following table shows.
Product Key Product Name Model Name
(the attribute’s key)
Subcategory Key Subcategory
210 HL Road Frame – Black, 58 HL Road Frame 14 Road Frames
608 HL Road Frame – Black, 58 HL Road Frame 17 Touring Frames
If you define the RelationshipType property of the Subcategory attribute relationship as Rigid, your processing will fail with the error “Rigid relationships between attributes cannot be changed during incremental processing of a dimension,” as Figure 2 shows.

Figure 2: Processing errors when the RelationshipType property is set incorrectly
Why the error? Because the Model Name attribute in relationship to the Subcategory attribute changed. The new record had the same Model Name, but the Subcategory ID was different. Although this was a new record, the Model Names were the same for both records, and the Subcategory was related to the Model Name as an attribute relationship, so the different Subcategory ID signified a change. The principle in this case is that you need to set the RelationshipType property to Flexible for attribute relationships that don’t relate directly to the key attribute but that undergo a Type 2 historical change.
Type 1 Changes
Type 1 changing attributes are much easier to understand than Type 2 changes. If you have an attribute whose key column is updated by your ETL process as a Type 1 update, you need to set its RelationshipType property to Flexible for all attribute relationships that it participates in at any level.
The only exception to this rule is when you’re updating only the column used as the name property of the attribute and not the key column. In other words, the key of the attribute doesn’t change, only the name changes in relationship to the related attribute. An example of this situation would be if the name of a Subcategory changes but not its key. In the following table, for instance, the Subcategory changes from Road Frames to Road Bike Frames, but the Subcategory Key remains 14 for the new record.
Original Record:
Model Name Subcategory Key Subcategory
HL Road Frame 14 Road Frames
New Record:
Model Name Subcategory Key Subcategory
HL Road Frame 14 Road Bike Frames
As long as the Subcategory Key doesn’t change in relationship to the Model Name, you can define this relationship as Rigid. The principle here is that for Type 1 changing attributes where only the name column changes, you can set the RelationshipType property to Rigid—as long as the key column for the attribute doesn’t change in relationship to the related attribute.
When a Complete Hierarchy Moves
One final note of interest: You can have a lower level attribute that changes and still have a higher level attribute in the same attribute relationship path that’s defined as Rigid, provided the relationships between the higher level relationships don’t change. For example, if Category and Subcategory never change in relationship to each other, even though a Model Name can be assigned to different Subcategories, you can still define the RelationshipType property for Category and Subcategory as Rigid. Consider the following table example, showing original and new records, with the changing record highlighted.
Original Records:
Model Name Subcategory Key Subcategory Category Key Category
ML Bike Frames 14 Road Frames 3 Accessories
HL Road Frame 14 Road Frames 3 Accessories
HL Touring Frame 17 Touring Frames 2 Components
New Records:
Model Name Subcategory Key Subcategory Category Key Category
ML Bike Frames 14 Road Frames 3 Accessories
HL Road Frame 17 Touring Frames 2 Components
HL Touring Frame 17 Touring Frames 2 Components
The Subcategory name for the Model Name HL Road Frame changed from Road Frames to Touring Frames, but the new Subcategory name didn’t change in relationship to the Category of existing Touring Frame records. It might look like the Category changed from Accessories to Components, but Category remained the same for the Touring Frames Subcategory. Therefore, you can set the RelationshipType property to Rigid for the Category attribute relationship related to Subcategory. However, the Subcategory and Model Name relationship changes, so you would need to set the RelationshipType property to Flexible for the Subcategory attribute relationship related to Model Name. In this situation, you can set the RelationshipType property to Rigid for higher level attribute relationships in a natural hierarchy as long as the attributes (their key columns) do not change relative to one another, even if lower levels in the natural hierarchy can change and are set to Flexible.
Putting It All Together
The result of optimizing the RelationshipType property is that more aggregations will persist even when a dimension is processed, leading to better overall query performance and processing. If you’re lost in the complexities of the changes happening in your dimension data and in how to navigate the RelationshipType setting, you can always try setting all the RelationshipType properties to Rigid, and then change the ones that cause an error to Flexible. But be sure you test all possible changes, or you’ll find yourself dealing with more errors than you bargained for. Better yet, keep this article and its highlighted principles (at right) handy for when you design your dimensions. Either way, you’ll gain the benefits of a cube that’s tuned for performance.
Primary Principles for Setting the RelationshipType Property
  • The basis for determining whether to set the RelationshipType property to Rigid or Flexible is whether the keys of the related attributes change relative to one another. To determine a change, look at whether the “key” relationships (that is, the attribute key values) change—not whether there are changes to just the name property as attributes related to one another.
  • Set the RelationshipType property of a Type 2 historical attribute relationship to Rigid if the attribute relates directly to the key attribute.
  • Set the RelationshipType property to Flexible for attribute relationships that don’t relate directly to the key attribute but that undergo a Type 2 historical change.
  • If you have an attribute whose key column is updated by your ETL process as a Type 1 update, set its RelationshipType property to Flexible for all attribute relationships that it participates in at any level.
  • For Type 1 changing attributes where only the name column changes, set the RelationshipType property to Rigid, as long as the key column for the attribute doesn’t change in relationship to the related attribute.
  • Set the RelationshipType property to Rigid for higher level attribute relationships in a natural hierarchy as long as the attributes (their key columns) do not change relative to one another, even if lower levels in the natural hierarchy can change and are set to Flexible.

Using a Correlated Subquery in a T-SQL Statement

What is a Correlated Subquery?

A correlated subquery is a SELECT statement nested inside another T-SQL statement, which contains a reference to one or more columns in the outer query. Therefore, the correlated subquery can be said to be dependent on the outer query. This is the main difference between a correlated subquery and just a plain subquery. A plain subquery is not dependent on the outer query, can be run independently of the outer query, and will return a result set. A correlated subquery, since it is dependent on the outer query will return a syntax errors if it is run by itself.
A correlated subquery will be executed many times while processing the T-SQL statement that contains the correlated subquery. The correlated subquery will be run once for each candidate row selected by the outer query. The outer query columns, referenced in the correlated subquery, are replaced with values from the candidate row prior to each execution. Depending on the results of the execution of the correlated subquery, it will determine if the row of the outer query is returned in the final result set.

Using a Correlated Subquery in a WHERE Clause

Suppose you want a report of all "OrderID's" where the customer did not purchase more than 10% of the average quantity sold for a given product. This way you could review these orders, and possibly contact the customers, to help determine if there was a reason for the low quantity order. A correlated subquery in a WHERE clause can help you produce this report. Here is a SELECT statement that produces the desired list of "OrderID's":
select distinct OrderId
  from Northwind.dbo.[Order Details] OD
  where 
    Quantity &ltl; (select avg(Quantity) * .1 
                      from Northwind.dbo.[Order Details] 
                      where OD.ProductID = ProductID)
The correlated subquery in the above command is contained within the parenthesis following the greater than sign in the WHERE clause above. Here you can see this correlated subquery contains a reference to "OD.ProductID". This reference compares the outer query's "ProductID" with the inner query's "ProductID". When this query is executed, the SQL engine will execute the inner query, the correlated subquery, for each "[Order Details]" record. This inner query will calculate the average "Quantity" for the particular "ProductID" for the candidate row being processed in the outer query. This correlated subquery determines if the inner query returns a value that meets the condition of the WHERE clause. If it does, the row identified by the outer query is placed in the record set that will be returned from the complete T-SQL SELECT statement.
The code below is another example that uses a correlated subquery in the WHERE clause to display the top two customers, based on the dollar amount associated with their orders, per region. You might want to perform a query like this so you can reward these customers, since they buy the most per region.
select CompanyName, ContactName, Address,
       City, Country, PostalCode from Northwind.dbo.Customers OuterC
where CustomerID in ( 
select top 2 InnerC.CustomerId
     from Northwind.dbo.[Order Details] OD join Northwind.dbo.Orders O
               on OD.OrderId = O.OrderID
          join Northwind.dbo.Customers InnerC
               on O.CustomerID = InnerC.CustomerId
     Where Region = OuterC.Region
     group by Region, InnerC.CustomerId
     order by sum(UnitPrice * Quantity * (1-Discount)) desc
     ) 
order by Region
Here you can see the inner query is a correlated subquery because it references "OuterC", which is the table alias for the "Northwind.DBO.Customer" table in the outer query. This inner query uses the "Region" value to calculate the top two customers for the region associated with the row being processed from the outer query. If the "CustomerID" of the outer query is one of the top two customers, then the record is placed in the record set to be returned.

Correlated Subquery in the HAVING Clause

Say your organizations wants to run a yearlong incentive program to increase revenue. Therefore, they advertise to your customers that if each order they place, during the year, is over $750 you will provide them a rebate at the end of the year at the rate of $75 per order they place. Below is an example of how to calculate the rebate amount. This example uses a correlated subquery in the HAVING clause to identify the customers that qualify to receive the rebate. Here is my code for this query:
select C.CustomerID, Count(*)*75 Rebate
  from Northwind.DBO.Customers C
         join
       Northwind.DBO.Orders O
         on c.CustomerID = O.CustomerID
  where Datepart(yy,OrderDate) = '1998'
  group by C.CustomerId
  having 750 < ALL(select sum(UnitPrice * Quantity * (1-Discount)) 
           from Northwind.DBO.Orders O
                  join
                Northwind.DBO.[Order Details] OD
                  on O.OrderID = OD.OrderID
           where CustomerID = C.CustomerId 
             and Datepart(yy,OrderDate) = '1998'
           group by O.OrderId
            )      
By reviewing this query, you can see I am using a correlated query in the HAVING clause to calculate the total order amount for each customer order. I use the "CustomerID" from the outer query and the year of the order "Datepart(yy,OrderDate)", to help identify the Order records associated with each customer, that were placed the year '1998'. For these associated records I am calculating the total order amount, for each order, by summing up all the "[Order Details]" records, using the following formula: sum(UnitPrice * Quantity * (1-Discount)). If each and every order for a customer, for year 1998 has a total dollar amount greater than 750, I then calculate the Rebate amount in the outer query using this formula "Count(*)*75 ".
SQL Server's query engine will only execute the inner correlated subquery in the HAVING clause for those customer records identified in the outer query, or basically only those customer that placed orders in "1998".

Performing an Update Statement Using a Correlated Subquery

A correlated subquery can even be used in an update statement. Here is an example:
create table A(A int, S int)
create table B(A int, B int)

set nocount on 
insert into A(A) values(1)
insert into A(A) values(2)
insert into A(A) values(3)
insert into B values(1,1)
insert into B values(2,1)
insert into B values(2,1)
insert into B values(3,1)
insert into B values(3,1)
insert into B values(3,1)

update A 
  set S = (select sum(B)
             from B 
             where A.A = A group by A)
 
select * from A

drop table A,B
Here is the result set I get when I run this query on my machine:
A           S           
----------- ----------- 
1           1
2           2
3           3
In my query above, I used the correlated subquery to update column A in table A with the sum of column B in table B for rows that have the same value in column A as the row being updated.

Conclusion

Let me summarize. A subquery and a correlated subquery are SELECT queries coded inside another query, known as the outer query. The correlated subquery and the subquery help determine the outcome of the result set returned by the complete query. A subquery, when executed independent of the outer query, will return a result set, and is therefore not dependent on the outer query. Where as, a correlated subquery cannot be executed independently of the outer query because it uses one or more references to columns in the outer query to determine the result set returned from the correlated subquery. I hope that you now understand the different of subqueries and correlated subqueries, and how they can be used in your T-SQL code. 

Source: http://www.databasejournal.com/features/mssql/article.php/3485291/Using-a-Correlated-Subquery-in-a-T-SQL-Statement.htm

SQL: Select M to N records

1.select top m * from tablename where id not in (select top n id from tablename) 
2.select top m * into #temp from tablename order by columnname -- 将top m笔插入 
set rowcount nselect * from #temp
 order by columnname desc 
3.select top n * from
(select top m * from tablename order by columnname) aorder by columnname desc 
4.如果tablename里没有其他identity列,那么:select identity(int) id0,* into #temp from tablename 

取n到m条的语句为:select * from #temp where id0 > =n and id0  <= m 

如果你在执行select identity(int) id0,* into #temp from tablename这条语句的时候报错,那是因为你的DB中间的select into/bulkcopy属性没有打开要先执行:exec sp_dboption 你的DB名字,'select into/bulkcopy',true 
5.如果表里有identity属性,那么简单:select * from tablename where identitycol between n and m

Select Random Percent of Data in SQL

This can be achieved by using newid() function
Example
select TOP 20 PERCENT FirstName from dim_customer
order by newid()
一,ping
它是用来检查网络是否通畅或者网络连接速度的命令。作为一个生活在网络上的管理员或者黑客来说,ping命令是第一个必须掌握的DOS命令,它所利 用 的原理是这样的:网络上的机器都有唯一确定的IP地址,我们给目标IP地址发送一个数据包,对方就要返回一个同样大小的数据包,根据返回的数据包我们可以 确定目标主机的存在,可以初步判断目标主机的操作系统等。下面就来看看它的一些常用的操作。先看看帮助吧,在DOS窗口中键入:ping /? 回车,。所示的帮助画面。在此,我们只掌握一些基本的很有用的参数就可以了(下同)。
-t 表示将不间断向目标IP发送数据包,直到我们强迫其停止。试想,如果你使用100M的宽带接入,而目标IP是56K的小猫,那么要不了多久,目标IP就因为承受不了这么多的数据而掉线,呵呵,一次攻击就这么简单的实现了。
-l 定义发送数据包的大小,默认为32字节,我们利用它可以最大定义到65500字节。结合上面介绍的-t参数一起使用,会有更好的效果哦。
-n 定义向目标IP发送数据包的次数,默认为3次。如果网络速度比较慢,3次对我们来说也浪费了不少时间,因为现在我们的目的仅仅是判断目标IP是否存在,那么就定义为一次吧。
说明一下,如果-t 参数和 -n参数一起使用,ping命令就以放在后面的参数为标准,比如”ping IP -t -n 3″,虽然使用了-t参数,但并不是一直ping下去,而是只ping 3次。另外,ping命令不一定非得ping IP,也可以直接ping主机域名,这样就可以得到主机的IP。
下面我们举个例子来说明一下具体用法。
这里time=2表示从发出数据包到接受到返回数据包所用的时间是2秒,从这里可以判断网络连接速度的大小 。从TTL的返回值可以初步判断被ping主机的操作系统,之所以说”初步判断”是因为这个值是可以修改的。这里TTL=32表示操作系统可能是 win98。
(小知识:如果TTL=128,则表示目标主机可能是Win2000;如果TTL=250,则目标主机可能是Unix)
至于利用ping命令可以快速查找局域网故障,可以快速搜索最快的QQ服务器,可以对别人进行ping攻击……这些就靠大家自己发挥了。
二,nbtstat
该命令使用TCP/IP上的NetBIOS显示协议统计和当前TCP/IP连接,使用这个命令你可以得到远程主机的NETBIOS信息,比如用户名、所属的工作组、网卡的MAC地址等。在此我们就有必要了解几个基本的参数。
-a 使用这个参数,只要你知道了远程主机的机器名称,就可以得到它的NETBIOS信息(下同)。
-A 这个参数也可以得到远程主机的NETBIOS信息,但需要你知道它的IP。
-n 列出本地机器的NETBIOS信息。
当得到了对方的IP或者机器名的时候,就可以使用nbtstat命令来进一步得到对方的信息了,这又增加了我们入侵的保险系数。
三,netstat
这是一个用来查看网络状态的命令,操作简便功能强大。
-a 查看本地机器的所有开放端口,可以有效发现和预防木马,可以知道机器所开的服务等信息,如图4。
这里可以看出本地机器开放有FTP服务、Telnet服务、邮件服务、WEB服务等。用法:netstat -a IP。
-r 列出当前的路由信息,告诉我们本地机器的网关、子网掩码等信息。用法:netstat -r IP。
四,tracert
跟踪路由信息,使用此命令可以查出数据从本地机器传输到目标主机所经过的所有途径,这对我们了解网络布局和结构很有帮助。如图5。
这里说明数据从本地机器传输到192.168.0.1的机器上,中间没有经过任何中转,说明这两台机器是在同一段局域网内。用法:tracert IP。
五,net
这个命令是网络命令中最重要的一个,必须透彻掌握它的每一个子命令的用法,因为它的功能实在是太强大了,这简直就是 微软为我们提供的最好的入侵工具。首先让我们来看一看它都有那些子命令,键入net /?回车如图6。
在这里,我们重点掌握几个入侵常用的子命令。
net view
使用此命令查看远程主机的所以共享资源。命令格式为net view \IP。
net use
把远程主机的某个共享资源影射为本地盘符,图形界面方便使用,呵呵。命令格式为net use x: \IP\sharename。上面一个表示把192.168.0.5IP的共享名为magic的目录影射为本地的Z盘。下面表示和192.168.0.7 建立IPC$连接(net use \IP\IPC$ “password” /user:”name”),
建立了IPC$连接后,呵呵,就可以上传文件了:copy nc.exe \192.168.0.7\admin$,表示把本地目录下的nc.exe传到远程主机,结合后面要介绍到的其他DOS命令就可以实现入侵了。
net start
使用它来启动远程主机上的服务。当你和远程主机建立连接后,如果发现它的什么服务没有启动,而你又想利用此服务怎么办?就使用这个命令来启动吧。用法:net start servername,如图9,成功启动了telnet服务。
net stop
入侵后发现远程主机的某个服务碍手碍脚,怎么办?利用这个命令停掉就ok了,用法和net start同。
net user
查看和帐户有关的情况,包括新建帐户、删除帐户、查看特定帐户、激活帐户、帐户禁用等。这对我们入侵是很有利的,最重要的,它为我们克隆帐户提供了前提。键入不带参数的net user,可以查看所有用户,包括已经禁用的。下面分别讲解。
1,net user abcd 1234 /add,新建一个用户名为abcd,密码为1234的帐户,默认为user组成员。
2,net user abcd /del,将用户名为abcd的用户删除。
3,net user abcd /active:no,将用户名为abcd的用户禁用。
4,net user abcd /active:yes,激活用户名为abcd的用户。
5,net user abcd,查看用户名为abcd的用户的情况
net localgroup
查看所有和用户组有关的信息和进行相关操作。键入不带参数的net localgroup即列出当前所有的用户组。在入侵过程中,我们一般利用它来把某个帐户提升为administrator组帐户,这样我们利用这个帐户 就可以控制整个远程主机了。用法:net localgroup groupname username /add。
现在我们把刚才新建的用户abcd加到administrator组里去了,这时候abcd用户已经是超级管理员了,呵呵,你可以再使用net user abcd来查看他的状态,和图10进行比较就可以看出来。但这样太明显了,网管一看用户情况就能漏出破绽,所以这种方法只能对付菜鸟网管,但我们还得知 道。现在的手段都是利用其他工具和手段克隆一个让网管看不出来的超级管理员,这是后话。有兴趣的朋友可以参照《黑客防线》第30期上的《由浅入深解析隆帐 户》一文。
net time
这个命令可以查看远程主机当前的时间。如果你的目标只是进入到远程主机里面,那么也许就用不到这个命令了。但简单的入侵成功了,难道只是看看吗?我 们 需要进一步渗透。这就连远程主机当前的时间都需要知道,因为利用时间和其他手段(后面会讲到)可以实现某个命令和程序的定时启动,为我们进一步入侵打好基 础。用法:net time \IP。
六,at
这个命令的作用是安排在特定日期或时间执行某个特定的命令和程序(知道net time的重要了吧?)。当我们知道了远程主机的当前时间,就可以利用此命令让其在以后的某个时间(比如2分钟后)执行某个程序和命令。用法:at time command \computer。
表示在6点55分时,让名称为a-01的计算机开启telnet服务(这里net start telnet即为开启telnet服务的命令)。
七,ftp
大家对这个命令应该比较熟悉了吧?网络上开放的ftp的主机很多,其中很大一部分是匿名的,也就是说任何人都可以登陆上去。现在如果你扫到了一台开 放 ftp服务的主机(一般都是开了21端口的机器),如果你还不会使用ftp的命令怎么办?下面就给出基本的ftp命令使用方法。
首先在命令行键入ftp回车,出现ftp的提示符,这时候可以键入”help”来查看帮助(任何DOS命令都可以使用此方法查看其帮助)。
大家可能看到了,这么多命令该怎么用?其实也用不到那么多,掌握几个基本的就够了。
首先是登陆过程,这就要用到open了,直接在ftp的提示符下输入”open 主机IP ftp端口”回车即可,一般端口默认都是21,可以不写。接着就是输入合法的用户名和密码进行登陆了,这里以匿名ftp为例介绍。
用户名和密码都是ftp,密码是不显示的。当提示**** logged in时,就说明登陆成功。这里因为是匿名登陆,所以用户显示为Anonymous。
接下来就要介绍具体命令的使用方法了。
dir 跟DOS命令一样,用于查看服务器的文件,直接敲上dir回车,就可以看到此ftp服务器上的文件。
cd 进入某个文件夹。
get 下载文件到本地机器。
put 上传文件到远程服务器。这就要看远程ftp服务器是否给了你可写的权限了,如果可以,呵呵,该怎么 利用就不多说了,大家就自由发挥去吧。
delete 删除远程ftp服务器上的文件。这也必须保证你有可写的权限。
bye 退出当前连接。
quit 同上。
八,telnet
功能强大的远程登陆命令,几乎所有的入侵者都喜欢用它,屡试不爽。为什么?它操作简单,如同使用自己的机器一样,只要你熟悉DOS命令,在成功以 administrator身份连接了远程机器后,就可以用它来干你想干的一切了。下面介绍一下使用方法,首先键入telnet回车,再键入help查看 其帮助信息。
然后在提示符下键入open IP回车,这时就出现了登陆窗口,让你输入合法的用户名和密码,这里输入任何密码都是不显示的。
当输入用户名和密码都正确后就成功建立了telnet连接,这时候你就在远程主机上具有了和此用户一样的权限,利用DOS命令就可以实现你想干的事情了。这里我使用的超级管理员权限登陆的。
到这里为止,网络DOS命令的介绍就告一段落了,这里介绍的目的只是给菜鸟网管一个印象,让其知道熟悉和掌握网络DOS命令的重要性。其实和网络有 关 的DOS命令还远不止这些,这里只是抛砖引玉,希望能对广大菜鸟网管有所帮助。学好DOS对当好网管有很大的帮助,特别的熟练掌握了一些网络的DOS命 令。
另外大家应该清楚,任何人要想进入系统,必须得有一个合法的用户名和密码(输入法漏洞差不多绝迹了吧),哪怕你拿到帐户的只有一个很小的权限,你也可 以利用它来达到最后的目的。所以坚决消灭空口令,给自己的帐户加上一个强壮的密码,是最好的防御弱口令入侵的方法。
最后,由衷的说一句,培养良好的安全意识才是最重要的。
=========================================
开始→运行→命令集锦
winver———检查Windows版本
wmimgmt.msc—-打开windows管理体系结构(WMI)
wupdmgr——–windows更新程序
wscript——–windows脚本宿主设置
write———-写字板
winmsd———系统信息
wiaacmgr——-扫描仪和照相机向导
winchat——–XP自带局域网聊天
mem.exe——–显示内存使用情况
Msconfig.exe—系统配置实用程序
mplayer2——-简易widnows media player
mspaint——–画图板
mstsc———-远程桌面连接
mplayer2——-媒体播放机
magnify——–放大镜实用程序
mmc————打开控制台
mobsync——–同步命令
dxdiag———检查DirectX信息
drwtsn32—— 系统医生
devmgmt.msc— 设备管理器
dfrg.msc——-磁盘碎片整理程序
diskmgmt.msc—磁盘管理实用程序
dcomcnfg——-打开系统组件服务
ddeshare——-打开DDE共享设置
dvdplay——–DVD播放器
net stop messenger—–停止信使服务
net start messenger—-开始信使服务
notepad——–打开记事本
nslookup——-网络管理的工具向导
ntbackup——-系统备份和还原
narrator——-屏幕”讲述人”
ntmsmgr.msc—-移动存储管理器
ntmsoprq.msc—移动存储管理员操作请求
netstat -an—-(TC)命令检查接口
syncapp——–创建一个公文包
sysedit——–系统配置编辑器
sigverif——-文件签名验证程序
sndrec32——-录音机
shrpubw——–创建共享文件夹
secpol.msc—–本地安全策略
syskey———系统加密,一旦加密就不能解开,保护windows xp系统的双重密码
services.msc—本地服务设置
Sndvol32——-音量控制程序
sfc.exe——–系统文件检查器
sfc /scannow—windows文件保护
tsshutdn——-60秒倒计时关机命令
tourstart——xp简介(安装完成后出现的漫游xp程序)
taskmgr——–任务管理器
eventvwr——-事件查看器
eudcedit——-造字程序
explorer——-打开资源管理器
packager——-对象包装程序
perfmon.msc—-计算机性能监测程序
progman——–程序管理器
regedit.exe—-注册表
rsop.msc——-组策略结果集
regedt32——-注册表编辑器
rononce -p —-15秒关机
regsvr32 /u *.dll—-停止dll文件运行
regsvr32 /u zipfldr.dll——取消ZIP支持
cmd.exe——–CMD命令提示符
chkdsk.exe—–Chkdsk磁盘检查
certmgr.msc—-证书管理实用程序
calc———–启动计算器
charmap——–启动字符映射表
cliconfg——-SQL SERVER 客户端网络实用程序
Clipbrd——–剪贴板查看器
conf———–启动netmeeting
compmgmt.msc—计算机管理
cleanmgr——-垃圾整理
ciadv.msc——索引服务程序
osk————打开屏幕键盘
odbcad32——-ODBC数据源管理器
oobe/msoobe /a—-检查XP是否激活
lusrmgr.msc—-本机用户和组
logoff———注销命令
iexpress——-木马捆绑工具,系统自带
Nslookup——-IP地址侦测器
fsmgmt.msc—–共享文件夹管理器
utilman——–辅助工具管理器
gpedit.msc—–组策略

Monday, November 15, 2010

更多的 XBMC 主题皮肤下载

http://blackmarket.ictcsc.net/files/skins/

XBMC设置连续播几个音乐视频(队列)

1。如果视频文件在同一个文件夹内,在该文件夹上按P键(遥控器的播放键)即可播放所有视频文件。
2。如果视频文件不在同一个文件夹内,则在想加入播放列表视频上的按Q键,直到把所有的视频加入播放列表,然后按空格键打开播放列表开始播放。

Sunday, November 14, 2010

解决XBMC中文乱码

XBMC是支持中文的,但自身不带中文字体。这也是为什么直接在软件中设置界面为中文,会导致操作界面文字变乱码。
解决乱码的方法就是给他加入中文字体。

解决方法:
1、先找一款喜欢的字体(下面以细黑字体simhei.ttf为例),放到桌面,然后在终端输入下面命令
sudo -i
mv /usr/share/xbmc/media/Fonts/simhei.ttf /usr/share/xbmc/media/Fonts/arial.ttf
说明:重命名simhei.ttf为arial.ttf并替换XBMC安装目录下的arial.ttf字体
将以上命令中的 simhei.ttf 换成要你想用的字体名就可以了

2、打开XBMC,进入SETTING-Appearance----Look and Feel中将Skin Fonts设置为arial,再将 region中的language设置为Chinese simplified即可。

Friday, November 12, 2010

How to user SSIS to process SSAS Cubes Automatically

To Create SSIS And Schedule It

1. Create a New Integration Service Project. In the control flow tab, add a connection manager for analysis Services database and refer the instance of analysis service database in which cube exist.
2. From the Control Flow tool bar tab, find the ‘Analysis Services Processing Task’ and drag and drop to the control flow panel.
3. Edit this task and add the ‘cubes’ which we want to process in the object list option
4. Build the project and In the file menu, select ‘Save…..as’ and save the package to Analysis Services Database Server
5. Connect the Database Engine using Management Studio
6. Go to SQL Server Agent and Right Click on the Jobs. Add a new Job and set the Job Type as ‘integration Service’.
7. And Select the locally saved SSIS Package and set the period option as per your requirement
8. That’s it. Now the cubes will be processed at the scheduled intervals.

Tuesday, November 9, 2010

How to solve MOSS / Sharepoint 2010 Local Activation permission error (DCOM 10016 error solution)

You may see this error - more than once - when working with your Microsoft Office SharePoint Server (MOSS) 2007 deployment. This animal / error generally shows itself after you have applied an upgrade to an existing deployment. For example, when upgrading from B2 MOSS to B2TR MOSS - or when applying a special service pack from MSFT - you may begin to see a lot of these errors pop up in the SYSTEM event log.
The error CLSID is followed by a class ID for the DCOM+ application that the service account trying to activate that application - does NOT have permission to activate.
For example, let's say I installed MOSS on a server, and used the account mossService as the service account (a least privileged, user account you created to run the MOSS service(s))., when I get this error, I could very well see an error like the following:
The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{61738644-F196-11D0-9953-00C04FD919C1}
to the user \mossService SID (S-1-5-21-). This security permission can be modified using the Component Services administrative tool.
Copy the GUID following the CLSID above, and Start-->Run-->regedit
With the registry editor open, ensure that your cursor is on the computer at the beginning of the tree (make sure you are not in the middle of some previous edit session in the registry editor).
Edit-->Find and paste in the GUID. It'll stop at the application entry - and you will want to note the application name on the right side pane. In this example, it was the IIS WAMREG admin service that popped up.
Now, open Component Services (typically, from the server - Start-->Administrative Tools-->Component Services), expand Component Services, Computers, My Computer, DCOM Config. Scroll down and find the application (IIS WAMREG in this case). Right-Click-->Properties and select the Security tab. You'll have some options here - the first block Launch and Activation Permissions - ensure that the Customize radio button is selected, and click Edit. Now, add your service account - giving it launch and activate - and in some requirements - remote launch / activate permission.
Restart IIS and continue on. 

NOTE for windows 2008R2 


If you have been installing SharePoint you have probably also seen and fixed the DCOM 10016 error. This error occurs in the event log when the SharePoint service accounts doesn't have the necessary permissions (Local Activation to the IIS WAMREG admin service). Your farm will still function, but your event log will be cluttered.
On a Windows Server 2003 or Windows Server 2008 machine you would just fire up the dcomcnfg utility (with elevated privileges) and enable Local Activation for your domain account.
But for Windows Server 2008 R2 (and Windows 7, since they share the same core) you cannot do this, the property dialog is all disabled due to permission restrictions. It doesn't matter if you are logged in as an administrator or using elevated privileges. The change is probably due to some new security improvements.
DCOMCNG - all disabled
The reason for it being disabled is that this dialog is mapped to a key in the registry which the Trusted Installer is owner of and everyone else only has read permissions. The key used by the IIS WAMREG admin is:
HKEY_CLASSES_ROOT\AppID\{61738644-F196-11D0-9953-00C04FD919C1}
Registry permissions on R2 Registry permissions on R1
Image on the left shows the default permissions for Windows Server 2008 R2 and on the right the default settings for Windows Server 2008.
To be able to change the Launch and Activation Permissions with dcomcnfg you have to change the ownership if this key. Start the registry editor (regedit), find the key, click Advanced in the Permissions dialog of this key and select the Owner tab. Now change the owner of the key to the administrators group for example, then set full control to the administrators group. Make sure not to change the permissions for the TrustedInstaller.
Now you have to restart the dcomcnfg application and once find the IIS WAMREG application and then set the Launch and Activation settings that you need to get rid of the DCOM 10016 error.
Unlocked!

Configuring Windows Server 2008 as a Remote Access SSL VPN Server

http://www.windowsecurity.com/articles/Configuring-Windows-Server-2008-Remote-Access-SSL-VPN-Server-Part2.html

http://www.windowsecurity.com/articles/Configuring-Windows-Server-2008-Remote-Access-SSL-VPN-Server-Part2.html?printversion

Boxee APP list (201011)

Thursday, November 4, 2010

OLAP PivotTable Extensions (for caculated member issue)

source: http://olappivottableextend.codeplex.com/

OLAP PivotTable Extensions is an Excel 2007 and Excel 2010 add-in which extends the functionality of PivotTables on Analysis Services cubes. The Excel API has certain PivotTable functionality which is not exposed in the UI. OLAP PivotTable Extensions provides an interface for some of this functionality. It also adds some new features like searching cubes, configuring default settings, and filtering to a list in your clipboard. The add-in can be launched from the following menu option in the right-click menu for PivotTables:

menu.png

Private Calculated Members

Any calculated members which are part of the Analysis Service cube on the server can be added to PivotTables. But there is no built-in UI to define your own MDX calculations. Adding extra Excel calculations in the cells surrounding the PivotTable has some limitations as they are not part of the PivotTable and can be wiped out if the dimensions of the PivotTable change, and plain Excel calculations must only operate on data visible in the PivotTable.

OLAP PivotTable Extensions let you define your own calculated measures which are private to that particular PivotTable:
AvgTaxFormula.png

Those calculations appear in the PivotTable just like any other calculations:
AvgTaxPivotTable.png

They appear in the Field List pane at the very top under the Values grouping:
AvgTaxFieldList.png

For help with advanced calculation properties for these private PivotTable calculations, or for help with MDX expressions, refer to our Calculations Help page.

Best Practice: In order to ensure a single version of the truth, it is a best practice to define important calculations as part of the cube source code. But some calculations like simple ratios or differences may clutter the cube and may be more appropriate if defined in the PivotTable itself. In addition, certain ad hoc research or prototyping may be more appropriate to be done as calculations private to a PivotTable until they are finalized and are ready to be added to the cube source code.

Limitation: If you run "OLAP Tools... Convert to Formulas" on a PivotTable with private calculated members in Excel 2007, the private calculated members will show N/A. There is no known workaround at this point other than upgrading to Excel 2010 or having your OLAP administrator define these calculated members in the cube itself.

Calculations Library

Since all calculations you define are private to that one PivotTable, OLAP PivotTable Extensions automatically creates a Calculations Library for you which contains all the calculations you create. This allows you to pick any previous calculation you've used from a dropdown and add it to the current PivotTable:

LibraryDropDown.png

You can also perform Calculation Library maintenance by importing, exporting, and deleting calculations:

Export.png

View PivotTable MDX

If a PivotTable is performing poorly or returning incorrect numbers, it may be necessary for the Analysis Services administrator to troubleshoot the MDX query which the PivotTable is using. The MDX tab of the OLAP PivotTable Extensions dialog shows you this MDX.

AvgTaxMDX.png

The MDX is exactly what is sent to the server with one exception. Any private calculations you've created for your PivotTable are defined as session calculated members. The MDX query exposed on the MDX tab displays the formulas for these calculations as query calculated members in the WITH clause of the MDX query. This allows an administrator to copy and paste the MDX query and troubleshoot it more easily in Management Studio or MDX Studio.

Filtering PivotTable to a List

A common scenario is having a list of items you wish to research in a PivotTable. Instead of manually checking each item in the filter dropdown, you can use the Filter List feature from OLAP PivotTable Extensions:

FilterListDialog.png

Changing PivotTable Defaults

Certain settings must be manually changed after creating a new PivotTable. For instance, if your dimensions have calculated members you wish to see in your PivotTable, you must manually right click on the PivotTable, choose PivotTable Options, flip to the Display tab, then check "Show calculated members from OLAP server". The Defaults tab of OLAP PivotTable Extensions lets you default this setting to be on in any new PivotTables you create in the future. If checked, it also automatically sets "Refresh data when opening the file" on the connection properties:

Defaults.png

Searching

Finding what you’re looking for in a cube can sometimes be challenging, but the Search feature of OLAP PivotTable Extensions can help. It lets you text search the items in the Field List and their descriptions. It also lets you text search the dimension members in your cube.

SearchTab.png

For more detailed information about the Search feature, see the dedicated Search page.

Distributing PivotTables

OLAP PivotTable Extensions need only be installed on computers which need to create new private PivotTable calculations. After those calculations have been defined, the PivotTable can be distributed to others without problem. If you distribute the Excel 2007 workbook to other Excel 2007 users, they will be able to continue designing and manipulating that PivotTable without problem. If published to Excel Services, the private calculations you define will still be active in the PivotTable.

ExcelServices.png

The Calculation Library does not need to be distributed unless other users wish to start brand new PivotTables and reuse certain calculations you have created using OLAP PivotTable Extensions.

Using Excel 2007/2010 and OLAP PivotTable Extensions to edit an Excel 2003 format .xls workbook with a PivotTable and add a private calculated member will work. This PivotTable can be saved and distributed to users of Excel 2003 and the private calculated member will show up and work.

Installation Requirements

  • Excel 2007 or Excel 2010 is required.
  • Access to a cube on an Analysis Services server is required.
  • .NET Framework version 2.0 is required.

Troubleshooting Installation

If OLAP PivotTable Extensions is not visible in Excel, please consult the Troubleshooting Installation page.