原文:重新想象 Windows 8 Store Apps (24) - 文件系统: Application Data 中的文件操作, Package 中的文件操作, 可移动存储中的文件操作

[源码下载]

重新想象 Windows 8 Store Apps (24) - 文件系统: Application Data 中的文件操作, Package 中的文件操作, 可移动存储中的文件操作

作者:webabcd

介绍
重新想象 Windows 8 Store Apps 之 文件系统

  • Application Data(应用程序数据存储) 中的文件操作
  • Application Data(应用程序数据存储) 中的“设置”操作
  • 通过 uri 引用 Application Data(应用程序数据存储) 中的媒体(图片、视频或音频)
  • 访问 Package 中的文件
  • 访问可移动存储

示例
1、演示如何在 Application Data(应用程序数据存储)中对文件进行操作
FileSystem/AppData/FileDemo.xaml.cs

/*
* 演示如何在 Application Data(应用程序数据存储)中对文件进行操作
*
* ApplicationData - 操作应用程序数据存储的类
* Current - 返回当前的 ApplicationData 对象
* LocalFolder - 返回 StorageFolder 对象。本地存储,永久保存
* 保存路径:%USERPROFILE%\AppData\Local\Packages\{PackageId}\LocalState
* RoamingFolder - 返回 StorageFolder 对象。漫游存储,同一微软账户同一应用程序在不同设备间会自动同步
* 保存路径:%USERPROFILE%\AppData\Local\Packages\{PackageId}\RoamingState
* TemporaryFolder - 返回 StorageFolder 对象。临时存储,系统在需要的时候可以将其删除
* 保存路径:%USERPROFILE%\AppData\Local\Packages\{PackageId}\TempState
* RoamingStorageQuota - 从漫游存储同步到云端的数据的最大大小,只读
* ClearAsync() - 删除 Application Data 中的数据
* ClearAsync(ApplicationDataLocality locality) - 删除指定存储区的数据据
* ApplicationDataLocality.Local, ApplicationDataLocality.Roaming, ApplicationDataLocality.Temporary
*
* DataChanged - 从服务端向 app 同步漫游数据时所触发的事件
* SignalDataChanged() - 强行触发 DataChanged 事件
*/ using System;
using Windows.Storage;
using Windows.UI.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation; namespace XamlDemo.FileSystem.AppData
{
public sealed partial class FileDemo : Page
{
StorageFolder _roamingFolder = ApplicationData.Current.RoamingFolder; public FileDemo()
{
this.InitializeComponent();
} protected override void OnNavigatedTo(NavigationEventArgs e)
{
ApplicationData.Current.DataChanged += Current_DataChanged;
} protected override void OnNavigatedFrom(NavigationEventArgs e)
{
ApplicationData.Current.DataChanged -= Current_DataChanged;
} async void Current_DataChanged(ApplicationData sender, object args)
{
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "DataChanged 事件被触发";
});
} private async void btnReadWrite_Click_1(object sender, RoutedEventArgs e)
{
// 写
StorageFile fileWrite = await _roamingFolder.CreateFileAsync(@"webabcdTest\readWriteDemo.txt", CreationCollisionOption.ReplaceExisting);
await FileIO.WriteTextAsync(fileWrite, "I am webabcd: " + DateTime.Now.ToString()); // 读
// StorageFile fileRead = await _roamingFolder.GetFileAsync(@"webabcdTest\readWriteDemo.txt");
// ms-appdata:///local/, ms-appdata:///roaming/, ms-appdata:///temp/
StorageFile fileRead = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appdata:///roaming/webabcdTest/readWriteDemo.txt", UriKind.Absolute));
string textContent = await FileIO.ReadTextAsync(fileRead);
lblMsg.Text = textContent; // 强行触发 DataChanged 事件(仅为演示用,实际项目中不需要)
ApplicationData.Current.SignalDataChanged();
}
}
}

2、演示如何在 Application Data(应用程序数据存储)中对“设置”进行操作
FileSystem/AppData/SettingsDemo.xaml

<Page
x:Class="XamlDemo.FileSystem.AppData.SettingsDemo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:XamlDemo.FileSystem.AppData"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<StackPanel Margin="120 0 0 0"> <TextBlock Name="lblMsg" FontSize="14.667" /> <Button Name="btnReadWrite" Content="读写 Settings" Click="btnReadWrite_Click_1" Margin="0 10 0 0" /> <Button Name="btnReadWriteWithContainer" Content="分组 Settings" Click="btnReadWriteWithContainer_Click_1" Margin="0 10 0 0" /> <Button Name="btnReadWriteWithComposite" Content="父子 Settings" Click="btnReadWriteWithComposite_Click_1" Margin="0 10 0 0" /> <Button Name="btnSetVersion0" Content="将 Application Data 的版本号设置为 0" Click="btnSetVersion0_Click_1" Margin="0 10 0 0" /> <Button Name="btnSetVersion1" Content="将 Application Data 的版本号设置为 1" Click="btnSetVersion1_Click_1" Margin="0 10 0 0" /> </StackPanel>
</Grid>
</Page>

FileSystem/AppData/SettingsDemo.xaml.cs

/*
* 演示如何在 Application Data(应用程序数据存储)中对“设置”进行操作
*
* ApplicationData - 操作应用程序数据存储的类
* Current - 返回当前的 ApplicationData 对象
* LocalSettings - 返回 ApplicationDataContainer 对象。本地存储,永久保存
* 保存路径:%USERPROFILE%\AppData\Local\Packages\{PackageId}\Settings
* RoamingSettings - 返回 ApplicationDataContainer 对象。漫游存储,同一微软账户同一应用程序在不同设备间会自动同步
* 保存路径:%USERPROFILE%\AppData\Local\Packages\{PackageId}\Settings
* Version - 获取当前 Application Data 的版本号,默认值为 0,只读(用于本地“设置”数据的版本控制)
* SetVersionAsync() - 指定当前 Application Data 的版本号(用于本地“设置”数据的版本控制)
*
* ApplicationDataContainer - 操作“设置”数据的类
* Name - 容器的名称,默认为空
* CreateContainer(string name, ApplicationDataCreateDisposition disposition) - 激活一个用于保存“设置”数据的容器,即分组“设置”数据
* name - 容器的名称
* disposition - 容器的激活方式:Always - 始终激活;Existing - 容器存在才激活
* Containers - 容器集合
* DeleteContainer() - 删除指定的容器
* Values - 保存“设置”数据,一个字典表
* 其数据可以是一个 ApplicationDataCompositeValue 类型的数据,ApplicationDataCompositeValue 也是一个字典表,这样可将多个“设置”数据放到一个 key 里
*
*
* 备注:
* 当 key 为 HighPriority 时,系统会以最快的速度在多个设备间同步 HighPriority 所对应的数据(支持 ApplicationDataCompositeValue 数据)
* 示例如下:
* ApplicationDataContainer.Values["HighPriority"] = "此处的值将会以系统最快的速度在多个设备间同步";
*/ using System;
using Windows.Storage;
using Windows.UI.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls; namespace XamlDemo.FileSystem.AppData
{
public sealed partial class SettingsDemo : Page
{
public SettingsDemo()
{
this.InitializeComponent();
} // 操作“设置”数据的 demo
private void btnReadWrite_Click_1(object sender, RoutedEventArgs e)
{
ApplicationDataContainer localSettings = ApplicationData.Current.LocalSettings; // 保存“设置”数据
localSettings.Values["key"] = "I am webabcd"; // 如果 key 为 HighPriority,则系统将会以最高优先级的速度在多个设备间同步 HighPriority 的值
// localSettings.Values["HighPriority"] = "I am webabcd"; // 删除指定的“设置”数据
// localSettings.Values.Remove("key"); // 获取“设置”数据
lblMsg.Text = (string)localSettings.Values["key"];
} // 分组“设置”数据,即在不同的容器中保存不同的数据
private void btnReadWriteWithContainer_Click_1(object sender, RoutedEventArgs e)
{
// 在 LocalSettings 中激活名为 groupName 的容器
ApplicationDataContainer container = ApplicationData.Current.LocalSettings;
ApplicationDataContainer localSettings = container.CreateContainer("groupName", ApplicationDataCreateDisposition.Always); // 删除指定的容器
// container.DeleteContainer("groupName"); // 在容器内保存“设置”数据
if (container.Containers.ContainsKey("groupName"))
{
container.Containers["groupName"].Values["key"] = "I am webabcd";
} // 从指定的容器内获取“设置”数据
lblMsg.Text = (string)container.Containers["groupName"].Values["key"];
lblMsg.Text += Environment.NewLine;
// 从指定的容器内获取“设置”数据
lblMsg.Text += (string)localSettings.Values["key"];
} // 父子“设置”数据,即 key 中的数据是一个 ApplicationDataCompositeValue 对象,而 ApplicationDataCompositeValue 也是一个字典表
private void btnReadWriteWithComposite_Click_1(object sender, RoutedEventArgs e)
{
ApplicationDataContainer localSettings = ApplicationData.Current.LocalSettings; // 父子“设置”数据的保存
ApplicationDataCompositeValue parent1 = new ApplicationDataCompositeValue();
parent1["child1"] = "abc";
parent1["child2"] = "xyz";
localSettings.Values["parent1"] = parent1; // 父子“设置”数据的获取
lblMsg.Text = (string)((ApplicationDataCompositeValue)localSettings.Values["parent1"])["child1"];
lblMsg.Text += Environment.NewLine;
lblMsg.Text += (string)((ApplicationDataCompositeValue)localSettings.Values["parent1"])["child2"];
} private async void btnSetVersion0_Click_1(object sender, RoutedEventArgs e)
{
// 将 Application Data 的版本号设置为 0,并执行指定的方法
await ApplicationData.Current.SetVersionAsync(, new ApplicationDataSetVersionHandler(SetVersionHandler));
} private async void btnSetVersion1_Click_1(object sender, RoutedEventArgs e)
{
// 将 Application Data 的版本号设置为 1,并执行指定的方法
await ApplicationData.Current.SetVersionAsync(, new ApplicationDataSetVersionHandler(SetVersionHandler));
} // 根据当前版本号和将要设置成的版本号,将“设置”数据升级到最新版本
async void SetVersionHandler(SetVersionRequest request)
{
// 异步操作
SetVersionDeferral deferral = request.GetDeferral(); await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
lblMsg.Text = "CurrentVersion: " + request.CurrentVersion; // 当前版本号
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "DesiredVersion: " + request.DesiredVersion; // 将要设置成的版本号
lblMsg.Text += Environment.NewLine;
lblMsg.Text += "ApplicationData.Current.Version: " + ApplicationData.Current.Version; // 当前版本号
}); // 完成异步操作
deferral.Complete();
}
}
}

3、演示如何通过 uri 的方式引用 Application Data(应用程序数据存储)中的媒体(图片、视频或音频)文件
FileSystem/AppData/MediaReference.xaml.cs

/*
* 演示如何通过 uri 的方式引用 Application Data(应用程序数据存储)中的媒体(图片、视频或音频)文件
*
* ApplicationData - 操作应用程序数据存储的类
* LocalFolder 对应 ms-appdata:///local/
* RoamingFolder 对应 ms-appdata:///roaming/
* TemporaryFolder 对应 ms-appdata:///temp/
*/ using System;
using Windows.Storage;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation; namespace XamlDemo.FileSystem.AppData
{
public sealed partial class MediaReference : Page
{
public MediaReference()
{
this.InitializeComponent();
} protected async override void OnNavigatedTo(NavigationEventArgs e)
{
ApplicationData appData = ApplicationData.Current; try
{
// 将程序包内的文件保存到 ApplicationData 中的 TemporaryFolder
StorageFile imgFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/Logo.png"));
await imgFile.CopyAsync(appData.TemporaryFolder, imgFile.Name, NameCollisionOption.ReplaceExisting);
}
catch { } // 引用 Application Data 内的图片文件并显示
imgAppdata.Source = new Windows.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appdata:///temp/Logo.png"));
// 引用程序包内的图片文件并显示
imgAppx.Source = new Windows.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:///Assets/Logo.png")); // 也可以在 xaml 这样写
// <img src="ms-appdata:///temp/Logo.png" />
}
}
}

4、演示如何访问 Package 中的文件
FileSystem/PackageData/Demo.xaml.cs

/*
* 演示如何访问 Package 中的文件
*/ using System;
using Windows.Storage;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls; namespace XamlDemo.FileSystem.PackageData
{
public sealed partial class Demo : Page
{
public Demo()
{
this.InitializeComponent();
} private async void btnReadWrite_Click_1(object sender, RoutedEventArgs e)
{
// 写(无法向程序包中写数据,会报错)
// StorageFile fileWrite = await Package.Current.InstalledLocation.CreateFileAsync(@"FileSystem\PackageData\readWriteDemo.txt", CreationCollisionOption.ReplaceExisting);
// await FileIO.WriteTextAsync(fileWrite, "I am webabcd: " + DateTime.Now.ToString()); // 读
// StorageFile fileRead = await Package.Current.InstalledLocation.GetFileAsync(@"FileSystem\PackageData\readWriteDemo.txt");
StorageFile fileRead = await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///FileSystem/PackageData/readWriteDemo.txt", UriKind.Absolute));
string textContent = await FileIO.ReadTextAsync(fileRead);
lblMsg.Text = textContent; // 引用程序包内的图片文件并显示
img.Source = new Windows.UI.Xaml.Media.Imaging.BitmapImage(new Uri("ms-appx:///Assets/Logo.png"));
}
}
}

5、演示如何访问可移动存储
FileSystem/RemovableDevice/Demo.xaml

<Page
x:Class="XamlDemo.FileSystem.RemovableDevice.Demo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:XamlDemo.FileSystem.RemovableDevice"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<StackPanel Margin="120 0 0 0"> <TextBlock Name="lblMsg" FontSize="14.667" TextWrapping="Wrap" /> <Button Name="btnGetRemovableDevices" Content="获取全部可移动存储" Margin="0 10 0 0" Click="btnGetRemovableDevices_Click" /> <Button Name="btnWrite" Content="write" Margin="0 10 0 0" Click="btnWrite_Click" /> <Button Name="btnRead" Content="read" Margin="0 10 0 0" Click="btnRead_Click" /> <Image Name="img" Stretch="None" HorizontalAlignment="Left" Margin="0 10 0 0" /> </StackPanel>
</Grid>
</Page>

FileSystem/RemovableDevice/Demo.xaml.cs

/*
* 演示如何访问可移动存储
*/ using System;
using System.Collections.Generic;
using Windows.Devices.Enumeration;
using Windows.Devices.Portable;
using Windows.Storage;
using Windows.Storage.Streams;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Imaging; namespace XamlDemo.FileSystem.RemovableDevice
{
public sealed partial class Demo : Page
{
public Demo()
{
this.InitializeComponent();
} private async void btnGetRemovableDevices_Click(object sender, RoutedEventArgs e)
{
lblMsg.Text += "可用的移动存储如下:";
lblMsg.Text += Environment.NewLine; // 要在 Package.appxmanifest 中增加 <Capability Name="removableStorage" />
StorageFolder removableDevices = KnownFolders.RemovableDevices; // 可移动存储设备
IReadOnlyList<StorageFolder> removableStorages = await removableDevices.GetFoldersAsync(); // 每个可移动存储设备的根目录 if (removableStorages.Count > )
{
foreach (StorageFolder storageFolder in removableStorages)
{
// 显示每个可移动存储设备的名称
lblMsg.Text += storageFolder.DisplayName;
lblMsg.Text += Environment.NewLine; // 显示该可移动存储设备根目录下的文件数量(本 app 有权访问的文件类型的文件数量)
// 注:如果需要读写某扩展名的文件,需要在 Package.appxmanifest 增加“文件类型关联”声明,并做相应的配置
IReadOnlyList<StorageFile> storageFiles = await storageFolder.GetFilesAsync();
lblMsg.Text += "files count: " + storageFiles.Count;
lblMsg.Text += Environment.NewLine;
}
}
else
{
lblMsg.Text += "未找到可用的移动存储";
lblMsg.Text += Environment.NewLine;
}
} private async void btnWrite_Click(object sender, RoutedEventArgs e)
{
// 关于 DeviceInformation 请参见:Information/DeviceInfo.xaml
DeviceInformationCollection interfaces = await DeviceInformation.FindAllAsync(StorageDevice.GetDeviceSelector()); if (interfaces.Count > )
{
try
{
// 找到第一个可移动存储设备(也可以通过 KnownFolders.RemovableDevices 来获取)
DeviceInformation deviceInformation = interfaces[];
// 获取第一个可移动存储设备的根目录
StorageFolder storageFolder = StorageDevice.FromId(deviceInformation.Id); // 注:如果需要读写某扩展名的文件,需要在 Package.appxmanifest 增加“文件类型关联”声明,并做相应的配置
StorageFile imgFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/Logo.png")); // 将文件复制到第一个可移动存储设备的根目录
await imgFile.CopyAsync(storageFolder, "Logo.png", NameCollisionOption.ReplaceExisting); lblMsg.Text += "已将文件 Logo.png 复制到了 " + storageFolder.Name;
lblMsg.Text += Environment.NewLine;
}
catch (Exception ex)
{
lblMsg.Text += ex.ToString();
lblMsg.Text += Environment.NewLine;
}
}
else
{
lblMsg.Text += "未找到可用的移动存储";
lblMsg.Text += Environment.NewLine;
}
} private async void btnRead_Click(object sender, RoutedEventArgs e)
{
// 关于 DeviceInformation 请参见:Information/DeviceInfo.xaml
DeviceInformationCollection interfaces = await DeviceInformation.FindAllAsync(StorageDevice.GetDeviceSelector()); if (interfaces.Count > )
{
try
{
// 找到第一个可移动存储设备(也可以通过 KnownFolders.RemovableDevices 来获取)
DeviceInformation deviceInformation = interfaces[];
// 获取第一个可移动存储设备的根目录
StorageFolder storageFolder = StorageDevice.FromId(deviceInformation.Id); // 在第一个可移动存储设备的根目录中获取指定的文件
StorageFile storageFile = await storageFolder.GetFileAsync("Logo.png"); // 显示图片
IRandomAccessStream imageStream = await storageFile.OpenReadAsync();
BitmapImage bitmapImage = new BitmapImage();
bitmapImage.SetSource(imageStream);
img.Source = bitmapImage; lblMsg.Text += "已从 " + storageFolder.Name + " 获取到了 Logo.png 文件";
lblMsg.Text += Environment.NewLine;
}
catch (Exception ex)
{
lblMsg.Text += "没有找到 Logo.png 文件。" + ex.ToString();
lblMsg.Text += Environment.NewLine;
}
}
else
{
lblMsg.Text += "未找到可用的移动存储";
lblMsg.Text += Environment.NewLine;
}
}
}
}

OK
[源码下载]

重新想象 Windows 8 Store Apps (24) - 文件系统: Application Data 中的文件操作, Package 中的文件操作, 可移动存储中的文件操作的更多相关文章

  1. 重新想象 Windows 8 Store Apps (23) - 文件系统: 文本的读写, 二进制的读写, 流的读写, 最近访问列表和未来访问列表

    原文:重新想象 Windows 8 Store Apps (23) - 文件系统: 文本的读写, 二进制的读写, 流的读写, 最近访问列表和未来访问列表 [源码下载] 重新想象 Windows 8 S ...

  2. 重新想象 Windows 8 Store Apps (22) - 文件系统: 访问文件夹和文件, 通过 AQS 搜索本地文件

    原文:重新想象 Windows 8 Store Apps (22) - 文件系统: 访问文件夹和文件, 通过 AQS 搜索本地文件 [源码下载] 重新想象 Windows 8 Store Apps ( ...

  3. 重新想象 Windows 8 Store Apps 系列文章索引

    [源码下载][重新想象 Windows 8.1 Store Apps 系列文章] 重新想象 Windows 8 Store Apps 系列文章索引 作者:webabcd 1.重新想象 Windows ...

  4. 重新想象 Windows 8 Store Apps (2) - 控件之按钮控件: Button, HyperlinkButton, RepeatButton, ToggleButton, RadioButton, CheckBox, ToggleSwitch

    原文:重新想象 Windows 8 Store Apps (2) - 控件之按钮控件: Button, HyperlinkButton, RepeatButton, ToggleButton, Rad ...

  5. 重新想象 Windows 8 Store Apps (37) - 契约: Settings Contract

    [源码下载] 重新想象 Windows 8 Store Apps (37) - 契约: Settings Contract 作者:webabcd 介绍重新想象 Windows 8 Store Apps ...

  6. 重新想象 Windows 8 Store Apps (52) - 绑定: 与 Element Model Indexer Style RelativeSource 绑定, 以及绑定中的数据转换

    [源码下载] 重新想象 Windows 8 Store Apps (52) - 绑定: 与 Element Model Indexer Style RelativeSource 绑定, 以及绑定中的数 ...

  7. 重新想象 Windows 8 Store Apps (53) - 绑定: 与 ObservableCollection CollectionViewSource VirtualizedFilesVector VirtualizedItemsVector 绑定

    [源码下载] 重新想象 Windows 8 Store Apps (53) - 绑定: 与 ObservableCollection CollectionViewSource VirtualizedF ...

  8. 重新想象 Windows 8 Store Apps (57) - 本地化和全球化

    [源码下载] 重新想象 Windows 8 Store Apps (57) - 本地化和全球化 作者:webabcd 介绍重新想象 Windows 8 Store Apps 之 本地化和全球化 本地化 ...

  9. 重新想象 Windows 8 Store Apps (71) - 其它: C# 调用 C++

    [源码下载] 重新想象 Windows 8 Store Apps (71) - 其它: C# 调用 C++ 作者:webabcd 介绍重新想象 Windows 8 Store Apps 之 其它 C# ...

随机推荐

  1. 开发自己PHP MVC框架(一)

    本教程翻译自John Squibb 的Build a PHP MVC Framework in an Hour,但有所改动,原文地址:http://johnsquibb.com/tutorials 这 ...

  2. drupal form 中图片上传

    1.创建url 链接到form $items['qianfeng/add'] = array(     'title' => t('加入信息'),     'page callback' =&g ...

  3. hdu4738(双连通分量)

    传送门:Caocao's Bridges 题意:n个岛,曹操在一些岛之间建了一些桥,每个桥上有一些士兵把守,周瑜只有一个炸弹只能炸掉一个桥,并能使一些岛被孤立出来,炸弹需要士兵带过去,士兵的数量不能小 ...

  4. Android OpenGL ES 应用(二) 纹理

    上一篇讲了基础入门 OpenGL (一) ,这一次主要学习OpenGL 纹理基本学习总结 要是做复杂的OpenGL应用程序,一定会用到纹理技术.纹理说白了就是把图片或者视频图像绘制到OpenGL空间中 ...

  5. B. 沙漠之旅(分组背包)

    B. 沙漠之旅 Time Limit: 1000ms Case Time Limit: 1000ms Memory Limit: 65536KB 64-bit integer IO format: % ...

  6. Unity3D ITween!

    percentage +=0.001f; iTween.PutOnPath(gameObject,path,percentage); //You can cause the object to ori ...

  7. QT怎样在QTableWidge显示图片

      <span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px;">QTableWi ...

  8. POJ3050 Hopscotch 【DFS】

    Hopscotch Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2113   Accepted: 1514 Descrip ...

  9. linux--shell script

    下面是最近学习shell script的一些知识点总结 ***博客园-邦邦酱好***   1.介绍shell是一个文字接口,让我们与系统沟通.shell script就是针对shell所写的脚本.它就 ...

  10. Android 性能优化 五 性能分析工具dumpsys的使用

    Android提供的dumpsys工具能够用于查看感兴趣的系统服务信息与状态,手机连接电脑后能够直接命令行运行adb shell dumpsys 查看全部支持的Service可是这样输出的太多,能够通 ...