public class VirtualizingWrapPanel : VirtualizingPanel, IScrollInfo
{ #region Fields UIElementCollection _children;
ItemsControl _itemsControl;
IItemContainerGenerator _generator;
private Point _offset = new Point(, );
private Size _extent = new Size(, );
private Size _viewport = new Size(, );
private int firstIndex=;
private Size childSize;
private Size _pixelMeasuredViewport = new Size(, );
Dictionary<UIElement, Rect> _realizedChildLayout = new Dictionary<UIElement, Rect>();
WrapPanelAbstraction _abstractPanel; #endregion #region Properties private Size ChildSlotSize
{
get
{
return new Size(ItemWidth, ItemHeight);
}
} #endregion #region Dependency Properties [TypeConverter(typeof(LengthConverter))]
public double ItemHeight
{
get
{
return (double)base.GetValue(ItemHeightProperty);
}
set
{
base.SetValue(ItemHeightProperty, value);
}
} [TypeConverter(typeof(LengthConverter))]
public double ItemWidth
{
get
{
return (double)base.GetValue(ItemWidthProperty);
}
set
{
base.SetValue(ItemWidthProperty, value);
}
} public Orientation Orientation
{
get { return (Orientation)GetValue(OrientationProperty); }
set { SetValue(OrientationProperty, value); }
} public static readonly DependencyProperty ItemHeightProperty = DependencyProperty.Register("ItemHeight", typeof(double), typeof(VirtualizingWrapPanel), new FrameworkPropertyMetadata(double.PositiveInfinity));
public static readonly DependencyProperty ItemWidthProperty = DependencyProperty.Register("ItemWidth", typeof(double), typeof(VirtualizingWrapPanel), new FrameworkPropertyMetadata(double.PositiveInfinity));
public static readonly DependencyProperty OrientationProperty = StackPanel.OrientationProperty.AddOwner(typeof(VirtualizingWrapPanel), new FrameworkPropertyMetadata(Orientation.Horizontal)); #endregion #region Methods public void SetFirstRowViewItemIndex(int index)
{
SetVerticalOffset((index) / Math.Floor((_viewport.Width) / childSize.Width));
SetHorizontalOffset((index) / Math.Floor((_viewport.Height) / childSize.Height));
} private void Resizing(object sender, EventArgs e)
{
if (_viewport.Width != )
{
int firstIndexCache = firstIndex;
_abstractPanel = null;
MeasureOverride(_viewport);
SetFirstRowViewItemIndex(firstIndex);
firstIndex = firstIndexCache;
}
} public int GetFirstVisibleSection()
{
int section;
var maxSection = _abstractPanel.Max(x => x.Section);
if (Orientation == Orientation.Horizontal)
{
section = (int)_offset.Y;
}
else
{
section = (int)_offset.X;
}
if (section > maxSection)
section = maxSection;
return section;
} public int GetFirstVisibleIndex()
{
int section = GetFirstVisibleSection();
var item = _abstractPanel.Where(x => x.Section == section).FirstOrDefault();
if (item != null)
return item._index;
return ;
} private void CleanUpItems(int minDesiredGenerated, int maxDesiredGenerated)
{
for (int i = _children.Count - ; i >= ; i--)
{
GeneratorPosition childGeneratorPos = new GeneratorPosition(i, );
int itemIndex = _generator.IndexFromGeneratorPosition(childGeneratorPos);
if (itemIndex < minDesiredGenerated || itemIndex > maxDesiredGenerated)
{
_generator.Remove(childGeneratorPos, );
RemoveInternalChildRange(i, );
}
}
} private void ComputeExtentAndViewport(Size pixelMeasuredViewportSize, int visibleSections)
{
if (Orientation == Orientation.Horizontal)
{
_viewport.Height = visibleSections;
_viewport.Width = pixelMeasuredViewportSize.Width;
}
else
{
_viewport.Width = visibleSections;
_viewport.Height = pixelMeasuredViewportSize.Height;
} if (Orientation == Orientation.Horizontal)
{
_extent.Height = _abstractPanel.SectionCount + ViewportHeight - ; }
else
{
_extent.Width = _abstractPanel.SectionCount + ViewportWidth - ;
}
_owner.InvalidateScrollInfo();
} private void ResetScrollInfo()
{
_offset.X = ;
_offset.Y = ;
} private int GetNextSectionClosestIndex(int itemIndex)
{
var abstractItem = _abstractPanel[itemIndex];
if (abstractItem.Section < _abstractPanel.SectionCount - )
{
var ret = _abstractPanel.
Where(x => x.Section == abstractItem.Section + ).
OrderBy(x => Math.Abs(x.SectionIndex - abstractItem.SectionIndex)).
First();
return ret._index;
}
else
return itemIndex;
} private int GetLastSectionClosestIndex(int itemIndex)
{
var abstractItem = _abstractPanel[itemIndex];
if (abstractItem.Section > )
{
var ret = _abstractPanel.
Where(x => x.Section == abstractItem.Section - ).
OrderBy(x => Math.Abs(x.SectionIndex - abstractItem.SectionIndex)).
First();
return ret._index;
}
else
return itemIndex;
} private void NavigateDown()
{
var gen = _generator.GetItemContainerGeneratorForPanel(this);
UIElement selected = (UIElement)Keyboard.FocusedElement;
int itemIndex = gen.IndexFromContainer(selected);
int depth = ;
while (itemIndex == -)
{
selected = (UIElement)VisualTreeHelper.GetParent(selected);
itemIndex = gen.IndexFromContainer(selected);
depth++;
}
DependencyObject next = null;
if (Orientation == Orientation.Horizontal)
{
int nextIndex = GetNextSectionClosestIndex(itemIndex);
next = gen.ContainerFromIndex(nextIndex);
while (next == null)
{
SetVerticalOffset(VerticalOffset + );
UpdateLayout();
next = gen.ContainerFromIndex(nextIndex);
}
}
else
{
if (itemIndex == _abstractPanel._itemCount - )
return;
next = gen.ContainerFromIndex(itemIndex + );
while (next == null)
{
SetHorizontalOffset(HorizontalOffset + );
UpdateLayout();
next = gen.ContainerFromIndex(itemIndex + );
}
}
while (depth != )
{
next = VisualTreeHelper.GetChild(next, );
depth--;
}
(next as UIElement).Focus();
} private void NavigateLeft()
{
var gen = _generator.GetItemContainerGeneratorForPanel(this); UIElement selected = (UIElement)Keyboard.FocusedElement;
int itemIndex = gen.IndexFromContainer(selected);
int depth = ;
while (itemIndex == -)
{
selected = (UIElement)VisualTreeHelper.GetParent(selected);
itemIndex = gen.IndexFromContainer(selected);
depth++;
}
DependencyObject next = null;
if (Orientation == Orientation.Vertical)
{
int nextIndex = GetLastSectionClosestIndex(itemIndex);
next = gen.ContainerFromIndex(nextIndex);
while (next == null)
{
SetHorizontalOffset(HorizontalOffset - );
UpdateLayout();
next = gen.ContainerFromIndex(nextIndex);
}
}
else
{
if (itemIndex == )
return;
next = gen.ContainerFromIndex(itemIndex - );
while (next == null)
{
SetVerticalOffset(VerticalOffset - );
UpdateLayout();
next = gen.ContainerFromIndex(itemIndex - );
}
}
while (depth != )
{
next = VisualTreeHelper.GetChild(next, );
depth--;
}
(next as UIElement).Focus();
} private void NavigateRight()
{
var gen = _generator.GetItemContainerGeneratorForPanel(this);
UIElement selected = (UIElement)Keyboard.FocusedElement;
int itemIndex = gen.IndexFromContainer(selected);
int depth = ;
while (itemIndex == -)
{
selected = (UIElement)VisualTreeHelper.GetParent(selected);
itemIndex = gen.IndexFromContainer(selected);
depth++;
}
DependencyObject next = null;
if (Orientation == Orientation.Vertical)
{
int nextIndex = GetNextSectionClosestIndex(itemIndex);
next = gen.ContainerFromIndex(nextIndex);
while (next == null)
{
SetHorizontalOffset(HorizontalOffset + );
UpdateLayout();
next = gen.ContainerFromIndex(nextIndex);
}
}
else
{
if (itemIndex == _abstractPanel._itemCount - )
return;
next = gen.ContainerFromIndex(itemIndex + );
while (next == null)
{
SetVerticalOffset(VerticalOffset + );
UpdateLayout();
next = gen.ContainerFromIndex(itemIndex + );
}
}
while (depth != )
{
next = VisualTreeHelper.GetChild(next, );
depth--;
}
(next as UIElement).Focus();
} private void NavigateUp()
{
var gen = _generator.GetItemContainerGeneratorForPanel(this);
UIElement selected = (UIElement)Keyboard.FocusedElement;
int itemIndex = gen.IndexFromContainer(selected);
int depth = ;
while (itemIndex == -)
{
selected = (UIElement)VisualTreeHelper.GetParent(selected);
itemIndex = gen.IndexFromContainer(selected);
depth++;
}
DependencyObject next = null;
if (Orientation == Orientation.Horizontal)
{
int nextIndex = GetLastSectionClosestIndex(itemIndex);
next = gen.ContainerFromIndex(nextIndex);
while (next == null)
{
SetVerticalOffset(VerticalOffset - );
UpdateLayout();
next = gen.ContainerFromIndex(nextIndex);
}
}
else
{
if (itemIndex == )
return;
next = gen.ContainerFromIndex(itemIndex - );
while (next == null)
{
SetHorizontalOffset(HorizontalOffset - );
UpdateLayout();
next = gen.ContainerFromIndex(itemIndex - );
}
}
while (depth != )
{
next = VisualTreeHelper.GetChild(next, );
depth--;
}
(next as UIElement).Focus();
} #endregion #region Override protected override void OnKeyDown(KeyEventArgs e)
{
switch (e.Key)
{
case Key.Down:
NavigateDown();
e.Handled = true;
break;
case Key.Left:
NavigateLeft();
e.Handled = true;
break;
case Key.Right:
NavigateRight();
e.Handled = true;
break;
case Key.Up:
NavigateUp();
e.Handled = true;
break;
default:
base.OnKeyDown(e);
break;
}
} protected override void OnItemsChanged(object sender, ItemsChangedEventArgs args)
{
base.OnItemsChanged(sender, args);
_abstractPanel = null;
ResetScrollInfo();
} protected override void OnInitialized(EventArgs e)
{
this.SizeChanged += new SizeChangedEventHandler(this.Resizing);
base.OnInitialized(e);
_itemsControl = ItemsControl.GetItemsOwner(this);
_children = InternalChildren;
_generator = ItemContainerGenerator;
} protected override Size MeasureOverride(Size availableSize)
{
if (_itemsControl == null || _itemsControl.Items.Count == )
return availableSize;
if (_abstractPanel == null)
_abstractPanel = new WrapPanelAbstraction(_itemsControl.Items.Count); _pixelMeasuredViewport = availableSize; _realizedChildLayout.Clear(); Size realizedFrameSize = availableSize; int itemCount = _itemsControl.Items.Count;
int firstVisibleIndex = GetFirstVisibleIndex(); GeneratorPosition startPos = _generator.GeneratorPositionFromIndex(firstVisibleIndex); int childIndex = (startPos.Offset == ) ? startPos.Index : startPos.Index + ;
int current = firstVisibleIndex;
int visibleSections = ;
using (_generator.StartAt(startPos, GeneratorDirection.Forward, true))
{
bool stop = false;
bool isHorizontal = Orientation == Orientation.Horizontal;
double currentX = ;
double currentY = ;
double maxItemSize = ;
int currentSection = GetFirstVisibleSection();
while (current < itemCount)
{
bool newlyRealized; // Get or create the child
UIElement child = _generator.GenerateNext(out newlyRealized) as UIElement;
if (newlyRealized)
{
// Figure out if we need to insert the child at the end or somewhere in the middle
if (childIndex >= _children.Count)
{
base.AddInternalChild(child);
}
else
{
base.InsertInternalChild(childIndex, child);
}
_generator.PrepareItemContainer(child);
child.Measure(ChildSlotSize);
}
else
{
// The child has already been created, let's be sure it's in the right spot
Debug.Assert(child == _children[childIndex], "Wrong child was generated");
}
childSize = child.DesiredSize;
Rect childRect = new Rect(new Point(currentX, currentY), childSize);
if (isHorizontal)
{
maxItemSize = Math.Max(maxItemSize, childRect.Height);
if (childRect.Right > realizedFrameSize.Width) //wrap to a new line
{
currentY = currentY + maxItemSize;
currentX = ;
maxItemSize = childRect.Height;
childRect.X = currentX;
childRect.Y = currentY;
currentSection++;
visibleSections++;
}
if (currentY > realizedFrameSize.Height)
stop = true;
currentX = childRect.Right;
}
else
{
maxItemSize = Math.Max(maxItemSize, childRect.Width);
if (childRect.Bottom > realizedFrameSize.Height) //wrap to a new column
{
currentX = currentX + maxItemSize;
currentY = ;
maxItemSize = childRect.Width;
childRect.X = currentX;
childRect.Y = currentY;
currentSection++;
visibleSections++;
}
if (currentX > realizedFrameSize.Width)
stop = true;
currentY = childRect.Bottom;
}
_realizedChildLayout.Add(child, childRect);
_abstractPanel.SetItemSection(current, currentSection); if (stop)
break;
current++;
childIndex++;
}
}
CleanUpItems(firstVisibleIndex, current - ); ComputeExtentAndViewport(availableSize, visibleSections); return availableSize;
}
protected override Size ArrangeOverride(Size finalSize)
{
if (_children != null)
{
foreach (UIElement child in _children)
{
var layoutInfo = _realizedChildLayout[child];
child.Arrange(layoutInfo);
}
}
return finalSize;
} #endregion #region IScrollInfo Members private bool _canHScroll = false;
public bool CanHorizontallyScroll
{
get { return _canHScroll; }
set { _canHScroll = value; }
} private bool _canVScroll = false;
public bool CanVerticallyScroll
{
get { return _canVScroll; }
set { _canVScroll = value; }
} public double ExtentHeight
{
get { return _extent.Height; }
} public double ExtentWidth
{
get { return _extent.Width; }
} public double HorizontalOffset
{
get { return _offset.X; }
} public double VerticalOffset
{
get { return _offset.Y; }
} public void LineDown()
{
if (Orientation == Orientation.Vertical)
SetVerticalOffset(VerticalOffset + );
else
SetVerticalOffset(VerticalOffset + );
} public void LineLeft()
{
if (Orientation == Orientation.Horizontal)
SetHorizontalOffset(HorizontalOffset - );
else
SetHorizontalOffset(HorizontalOffset - );
} public void LineRight()
{
if (Orientation == Orientation.Horizontal)
SetHorizontalOffset(HorizontalOffset + );
else
SetHorizontalOffset(HorizontalOffset + );
} public void LineUp()
{
if (Orientation == Orientation.Vertical)
SetVerticalOffset(VerticalOffset - );
else
SetVerticalOffset(VerticalOffset - );
} public Rect MakeVisible(Visual visual, Rect rectangle)
{
var gen = (ItemContainerGenerator)_generator.GetItemContainerGeneratorForPanel(this);
var element = (UIElement)visual;
int itemIndex = gen.IndexFromContainer(element);
while (itemIndex == -)
{
element = (UIElement)VisualTreeHelper.GetParent(element);
itemIndex = gen.IndexFromContainer(element);
}
int section = _abstractPanel[itemIndex].Section;
Rect elementRect = _realizedChildLayout[element];
if (Orientation == Orientation.Horizontal)
{
double viewportHeight = _pixelMeasuredViewport.Height;
if (elementRect.Bottom > viewportHeight)
_offset.Y += ;
else if (elementRect.Top < )
_offset.Y -= ;
}
else
{
double viewportWidth = _pixelMeasuredViewport.Width;
if (elementRect.Right > viewportWidth)
_offset.X += ;
else if (elementRect.Left < )
_offset.X -= ;
}
InvalidateMeasure();
return elementRect;
} public void MouseWheelDown()
{
PageDown();
} public void MouseWheelLeft()
{
PageLeft();
} public void MouseWheelRight()
{
PageRight();
} public void MouseWheelUp()
{
PageUp();
} public void PageDown()
{
SetVerticalOffset(VerticalOffset + _viewport.Height * 0.8);
} public void PageLeft()
{
SetHorizontalOffset(HorizontalOffset - _viewport.Width * 0.8);
} public void PageRight()
{
SetHorizontalOffset(HorizontalOffset + _viewport.Width * 0.8);
} public void PageUp()
{
SetVerticalOffset(VerticalOffset - _viewport.Height * 0.8);
} private ScrollViewer _owner;
public ScrollViewer ScrollOwner
{
get { return _owner; }
set { _owner = value; }
} public void SetHorizontalOffset(double offset)
{
if (offset < || _viewport.Width >= _extent.Width)
{
offset = ;
}
else
{
if (offset + _viewport.Width >= _extent.Width)
{
offset = _extent.Width - _viewport.Width;
}
} _offset.X = offset; if (_owner != null)
_owner.InvalidateScrollInfo(); InvalidateMeasure();
firstIndex = GetFirstVisibleIndex();
} public void SetVerticalOffset(double offset)
{
if (offset < || _viewport.Height >= _extent.Height)
{
offset = ;
}
else
{
if (offset + _viewport.Height >= _extent.Height)
{
offset = _extent.Height - _viewport.Height;
}
} _offset.Y = offset; if (_owner != null)
_owner.InvalidateScrollInfo(); //_trans.Y = -offset; InvalidateMeasure();
firstIndex = GetFirstVisibleIndex();
} public double ViewportHeight
{
get { return _viewport.Height; }
} public double ViewportWidth
{
get { return _viewport.Width; }
} #endregion #region helper data structures class ItemAbstraction
{
public ItemAbstraction(WrapPanelAbstraction panel, int index)
{
_panel = panel;
_index = index;
} WrapPanelAbstraction _panel; public readonly int _index; int _sectionIndex = -;
public int SectionIndex
{
get
{
if (_sectionIndex == -)
{
return _index % _panel._averageItemsPerSection - ;
}
return _sectionIndex;
}
set
{
if (_sectionIndex == -)
_sectionIndex = value;
}
} int _section = -;
public int Section
{
get
{
if (_section == -)
{
return _index / _panel._averageItemsPerSection;
}
return _section;
}
set
{
if (_section == -)
_section = value;
}
}
} class WrapPanelAbstraction : IEnumerable<ItemAbstraction>
{
public WrapPanelAbstraction(int itemCount)
{
List<ItemAbstraction> items = new List<ItemAbstraction>(itemCount);
for (int i = ; i < itemCount; i++)
{
ItemAbstraction item = new ItemAbstraction(this, i);
items.Add(item);
} Items = new ReadOnlyCollection<ItemAbstraction>(items);
_averageItemsPerSection = itemCount;
_itemCount = itemCount;
} public readonly int _itemCount;
public int _averageItemsPerSection;
private int _currentSetSection = -;
private int _currentSetItemIndex = -;
private int _itemsInCurrentSecction = ;
private object _syncRoot = new object(); public int SectionCount
{
get
{
int ret = _currentSetSection + ;
if (_currentSetItemIndex + < Items.Count)
{
int itemsLeft = Items.Count - _currentSetItemIndex;
ret += itemsLeft / _averageItemsPerSection + ;
}
return ret;
}
} private ReadOnlyCollection<ItemAbstraction> Items { get; set; } public void SetItemSection(int index, int section)
{
lock (_syncRoot)
{
if (section <= _currentSetSection + && index == _currentSetItemIndex + )
{
_currentSetItemIndex++;
Items[index].Section = section;
if (section == _currentSetSection + )
{
_currentSetSection = section;
if (section > )
{
_averageItemsPerSection = (index) / (section);
}
_itemsInCurrentSecction = ;
}
else
_itemsInCurrentSecction++;
Items[index].SectionIndex = _itemsInCurrentSecction - ;
}
}
} public ItemAbstraction this[int index]
{
get { return Items[index]; }
} #region IEnumerable<ItemAbstraction> Members public IEnumerator<ItemAbstraction> GetEnumerator()
{
return Items.GetEnumerator();
} #endregion #region IEnumerable Members System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return GetEnumerator();
} #endregion
} #endregion
}

备份一个支持虚拟化的wrappanel的更多相关文章

  1. 怎样知道 CPU 是否支持虚拟化技术(VT) | Linux 中国

    版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/F8qG7f9YD02Pe/article/details/79832475 wx_fmt=png&a ...

  2. 一个支持DbFirst、ModelFirst和CodeFirst的数据库小工具DbTool

    DbTool 一个支持DbFirst.ModelFirst和CodeFirst的数据库工具. 简介 这是一个针对 SqlServer 数据库和 C# 开发语言的小工具,可以利用这个小工具生成数据库表对 ...

  3. 如何知道 CPU 是否支持虚拟化技术(VT)

    作者: Sk 译者: LCTT geekpi 我们已经知道如何检查你的 Linux 操作系统是 32 位还是 64 位以及如何知道你的 Linux 系统是物理机还是虚拟机.今天,我们将学习另一个有用的 ...

  4. 一个支持 CodeFirst/DbFirst/ModelFirst 的数据库小工具

    一个支持 CodeFirst/DbFirst/ModelFirst 的数据库小工具 Intro DbTool 是一个支持 CodeFirst/DbFirst/ModelFirst 的数据库小工具,原本 ...

  5. 查看CPU是否支持虚拟化

    参考:http://www.cnblogs.com/jankie/archive/2012/07/04/2575695.html 一.Windows平台:使用cpu-Z即可查看. 二.Linux平台: ...

  6. python 开发一个支持多用户在线的FTP

    ### 作者介绍:* author:lzl### 博客地址:* http://www.cnblogs.com/lianzhilei/p/5813986.html### 功能实现 作业:开发一个支持多用 ...

  7. Python3学习之路~8.6 开发一个支持多用户在线的FTP程序-代码实现

    作业: 开发一个支持多用户在线的FTP程序 要求: 用户加密认证 允许同时多用户登录 每个用户有自己的家目录 ,且只能访问自己的家目录 对用户进行磁盘配额,每个用户的可用空间不同 允许用户在ftp s ...

  8. 我发起了一个 支持 ServerFul 架构 的 .Net 开源项目 ServerFulManager

    大家好,  我发起了一个 支持 ServerFul 架构 的 .Net 开源项目 ServerFulManager . ServerFulManager 的 目标 是 实现一个 支持 ServerFu ...

  9. 问题 Windows7VMware14安装虚拟机时出现 此主机不支持虚拟化实际模式。需要具备 Intel“VMX 不受限客户机”功能才能在 Intel 处理器上运行此虚拟机。 模块“CPUIDEarly”启动失败。

    问题 Windows7VMware14安装虚拟机时出现 此主机不支持虚拟化实际模式.需要具备 Intel“VMX 不受限客户机”功能才能在 Intel 处理器上运行此虚拟机. 模块“CPUIDEarl ...

随机推荐

  1. ChangeWindowMessageFilterEx 概述(用于取消低权限程序向高权限程序发送消息不成功的限制,分6个等级)

    ChangeWindowMessageFilterEx 函数,为指定窗口修改用户界面特权隔离 (UIPI) 消息过滤器. 函数原型: BOOL WINAPI ChangeWindowMessageFi ...

  2. [TypeScript] Use the never type to avoid code with dead ends using TypeScript

    Example 1: A never stop while loop return a never type. function run(): never { while(true){ let foo ...

  3. 【u229】独木桥

    Time Limit: 1 second Memory Limit: 64 MB [问题描述] 战争已经进入到紧要时间.你是运输小队长,正在率领运输部队向前线运送物资.运输任务像做题一样的无聊.你希望 ...

  4. 创建数据库以及其属性的sql语句

    创建数据库的SQL语句: create database stuDB on primary -- 默认就属于primary文件组,可省略 ( /*--数据文件的详细描写叙述--*/ name='stu ...

  5. 在向server发送请求时发生传输级错误。 (provider: 共享内存提供程序, error: 0 - 管道的还有一端上无不论什么进程。

    作者:卿笃军 原文地址:http://blog.csdn.net/qingdujun/article/details/36425825 SQL Server 2008 + VS2010 用C#编写的代 ...

  6. 【Unity Shaders】Lighting Models —— 灯型号Lit Sphere

    考<Unity Shaders and Effects Cookbook>一书(感谢原书作者),同一时候会加上一点个人理解或拓展. 这里是本书全部的插图.这里是本书所需的代码和资源(当然你 ...

  7. NVIDIA 显卡信息(CUDA信息的查看)

    1. nvidia-smi 查看显卡信息 nvidia-smi 指的是 NVIDIA System Management Interface: 在安装完成 NVIDIA 显卡驱动之后,对于 windo ...

  8. 把搜狗输入法词库导入Google拼音输入法

    为PC端Google拼音输入法增加词库 为什么折腾词库 都在说百度.讯飞等输入法上传用户词库,为了安全建议大家使用google输入法之类,话说回来,要想使用智能联想功能是不是就得把你输入习惯放在他的里 ...

  9. 浅谈Linux下各种压缩 解压命令和压缩比率对比

    Linux下压缩.解压命令五花八门,不像在windows下一个winrar打遍天下无敌手,清一色的.rar .zip格式. 比如,Linux下常用的tar tar.gz tar.bz2 .Z等等不一而 ...

  10. IIS执行原理

    IIS执行原理   服务器的监听(IIS6.0+版本) 当请求到达服务器时,请求最终会到达TCPIP.SYS驱动程序,TCPIP.SYS将请求转发给HTTP.SYS网络驱动程序的请求队列中(可以理解为 ...