- 浏览: 390415 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (309)
- xaml C# wpf (0)
- scala java inner clas (1)
- Tools UML Eclipse UML2 (1)
- Timer .NET Framework (1)
- perl (6)
- python function paramter (1)
- Python Docstring (1)
- Python how to compare types (1)
- Python (8)
- java (5)
- C# (76)
- C# WPF (0)
- p4 (0)
- WPF (46)
- .net (6)
- xaml (1)
- javascript (40)
- windows (10)
- scala (4)
- winform (1)
- c++ (48)
- tools (12)
- cmd (1)
- os (0)
- CI (0)
- shell (0)
- C (2)
- haskell (49)
- functional (1)
- tool (1)
- gnu (1)
- linux (1)
- kaskell (0)
- svn (0)
- wcf (3)
- android (1)
最新评论
There is an type that is called the StringDictionary, the namespace is System.Collections.Specialized;
the StringDictionary is optmized for both key and value types are string;
What situation will the String dictionary be useful? the StringDictionary will be useful in scenario such as Application configuration;
Below shows the operation that you can apply on the StrnigDictionary; Hopefull it may help you understand the StringDictionary;
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections.Specialized; using System.Collections; namespace StringDictionaryTest { class Program { static void Main(string[] args) { StringDictionary myCol = new StringDictionary(); myCol.Add("red" , "rojo"); myCol.Add("green", "verde"); myCol.Add("blue", "azul"); // Display the contenst of the collection using foreach, this is preferred method Console.WriteLine("Display the elemnts using foreach "); PrintKeysAndValues1(myCol); // Display the contens of the collection using Enumerator Console.WriteLine("Display the elements using the IEnumerator:"); PrintKeysAndValues2(myCol); // Display the contents of the collection using the keys, values, Count and Item properties Console.WriteLine("Display the elements using the Keys, Values, Count and item properties"); PrintKeysAndValues3(myCol); // Copies the StringDictionary to an array with DictionaryEntry elements. DictionaryEntry[] myArr = new DictionaryEntry[myCol.Count]; myCol.CopyTo(myArr, 0); // Displays the values in the array. Console.WriteLine("Displays the elements in the array:"); Console.WriteLine(" KEY VALUE"); for (int i = 0; i < myArr.Length; i++) Console.WriteLine(" {0,-10} {1}", myArr[i].Key, myArr[i].Value); Console.WriteLine(); // Searches for a value. if (myCol.ContainsValue("amarillo")) Console.WriteLine("The collection contains the value \"amarillo\"."); else Console.WriteLine("The collection does not contain the value \"amarillo\"."); Console.WriteLine(); // Searches for a key and deletes it. if (myCol.ContainsKey("green")) myCol.Remove("green"); Console.WriteLine("The collection contains the following elements after removing \"green\":"); PrintKeysAndValues1(myCol); // Clears the entire collection. myCol.Clear(); Console.WriteLine("The collection contains the following elements after it is cleared:"); PrintKeysAndValues1(myCol); } public static void PrintKeysAndValues1(StringDictionary myCol) { Console.WriteLine(" KEY VALUE"); foreach (DictionaryEntry d in myCol) { Console.WriteLine(" {0,-25} {1}", d.Key, d.Value); } Console.WriteLine(); } public static void PrintKeysAndValues2(StringDictionary myCol) { IEnumerator myEnumerator = myCol.GetEnumerator(); DictionaryEntry de; Console.WriteLine(" Key VALUE"); while (myEnumerator.MoveNext()) { de = (DictionaryEntry)myEnumerator.Current; Console.WriteLine(" {0,-25} {1}", de.Key, de.Value); } Console.WriteLine(); } public static void PrintKeysAndValues3(StringDictionary myCol) { string[] myKeys = new String[myCol.Count]; myCol.Keys.CopyTo(myKeys, 0); Console.WriteLine(" INDEX KEY VALUE"); for (int i = 0; i < myCol.Count; i++) { Console.WriteLine(" {0,-5} {1,-25} {2}", i, myKeys[i], myCol[myKeys[i]] ); } Console.WriteLine(); } } }
发表评论
-
wpf - example to enhance ComboBox for AutoComplete
2014-09-19 15:56 1942first let’s see an example ... -
Investigate and troubleshoot possible memory leak issue of .NET application
2014-07-31 10:42 0Hi All, I would like to sh ... -
C# – CoerceValueCallback合并、替换元数据值
2013-08-05 21:59 1895Topic: C# – CoerceValueCallbac ... -
wpf – ListView交替背景色
2013-07-02 20:56 6497Wpf – Alternate background col ... -
C# - 简单介绍TaskScheduler
2013-06-29 17:18 11947标题: C# - 简单介绍TaskSchedulerTit ... -
c# - Get enum from enum attribute
2013-06-27 21:32 1203DescriptionAttribute gives the ... -
C# - PInvoke, gotchas on the RegisterClassEx and the CreateWindowEx
2013-06-24 13:49 2538I get an exception message li ... -
c# - Use PInvoke to create simple win32 Application
2013-06-24 11:59 10891In this post, .net platform h ... -
c# - Linq's Select method as the Map function
2013-06-19 18:47 1250If you comes from a functiona ... -
c# - Tips of Linq expression Any to determine if a collection is Empty
2013-06-19 18:29 896When you are @ the linq expres ... -
myth buster - typeof accepting array of types not acceptable
2013-06-19 17:17 785I have seen from some book whe ... -
windows - trying to create WIN32 application with PInvoke
2013-06-19 14:34 0While it is stupid to do such ... -
WPF - Setting foreground color of Entire window
2013-06-13 16:00 1883You might as well as I would s ... -
WPF - Enhanced TabControl - TabControlEx aka Prerendering TabControl
2013-06-13 13:12 5294As an opening word, let's che ... -
wpf - ControlTemplate and AddLogicChild/RemoveLogicalChild
2013-06-10 15:42 1149Recently I was trying to debug ... -
c# - P/Invoke, DllImport, Marshal Structures and Type conversions
2013-06-05 15:25 1663P/Invoke as in the following q ... -
c# - A study on the NativeWindow - encapsulate window handle and procedure
2013-06-05 14:40 6046NativeWindow gives you a way t ... -
WCF - Notify server when client connects
2013-06-03 18:19 1186It is sometimes very importan ... -
wcf - Debug to enable Server exception in Fault message
2013-06-03 15:47 1060WCF will be able to send back ... -
c# - determine if a type/object is serialzable
2013-05-30 16:35 840In WCF, primitives type are s ...
相关推荐
StringDictionary:默认key不区分大小写 NameValueCollection:默认key区分大小写 KeyedCollection:不是键值对容器,但是比键值对容器更好用,强烈推荐 命名空间using System.Collections.Specialized System....
RaiDrive翻译项目 除英语和韩语外,某些语言源文件已初始化,但尚未完全翻译。 请为我们提供非翻译语言的帮助,同时也为我们提供翻译语言的改进。 您的贡献可以通过“请求”记录。...StringDictionary.id.xam
10.3.2 StringCollection、StringDictionary和NameValueCollection 295 10.3.3 BitArray 295 10.4 Microsoft.VisualBasic.Collection类 296 10.5 强类型化的集合 296 10.6 System.Collections.Generics 299 ...
C# 2.0语言的改进1067 A.1 概述1067 A.2 泛型1068 A.2.1 泛型集合1068 A.2.2 泛型方法1072 A.3 迭代器1074 A.4 匿名方法1075 A.5 运算符重载1077 A.6 全局命名空间限定符1077 A.7 部分类1078 A.8 Visual Basic XML...
附件是安装NumPy教程_详细版,文件绿色安全,请大家放心下载,仅供交流学习使用,无任何商业目的!
语音端点检测及其在Matlab中的实现.zip
使用C#完成一般文档的打印,带有页眉,页脚文档打印,表格打印,打印预览等
directx修复工具 DirectX修复工具(DirectX repair)是系统DirectX组件修复工具,DirectX修复工具主要是用于检测当前系统的DirectX状态,若发现异常情况就可以马上进行修复,非常快捷,使用效果也非常好。
人脸识别的主要算法 其核心算法是 欧式距离算法使用该算法计算两张脸的面部特征差异,一般在0.6 以下都可以被认为是同一张脸 人脸识别的主要步骤 1 获得人脸图片 2 将人脸图片转为128D的矩阵(这个也就是人脸特征的一种数字化表现) 3 保存人脸128D的特征到文件中 4 获取其他人脸转为128D特征通过欧式距离算法与我们保存的特征对比,如果差距在0.6以下就说明两张脸差距比较小
ciscn 全国大学生信息安全竞赛知识问答-CISCN 题库.zip
JAVA+SQL离散数学题库管理系统(源代码+LW+外文翻译)JAVA+SQL离散数学题库管理系统(源代码+LW+外文翻译)JAVA+SQL离散数学题库管理系统(源代码+LW+外文翻译)JAVA+SQL离散数学题库管理系统(源代码+LW+外文翻译)JAVA+SQL离散数学题库管理系统(源代码+LW+外文翻译)JAVA+SQL离散数学题库管理系统(源代码+LW+外文翻译)JAVA+SQL离散数学题库管理系统(源代码+LW+外文翻译)JAVA+SQL离散数学题库管理系统(源代码+LW+外文翻译)JAVA+SQL离散数学题库管理系统(源代码+LW+外文翻译)JAVA+SQL离散数学题库管理系统(源代码+LW+外文翻译)JAVA+SQL离散数学题库管理系统(源代码+LW+外文翻译)JAVA+SQL离散数学题库管理系统(源代码+LW+外文翻译)JAVA+SQL离散数学题库管理系统(源代码+LW+外文翻译)JAVA+SQL离散数学题库管理系统(源代码+LW+外文翻译)
strcmp函数应用.zip
蓝桥杯单片机第十一届国赛设计题试做
基于MATLAB的pca人脸识别.zip
520.html
JAVA在线考试管理系统(源代码+LW+开题报告+外文翻译+英文文献+答辩PPT)
STR710的定时器编程C语言例子,开发环境为IAR EWARM。.zip
协同过滤算法(Collaborative Filtering)是一种经典的推荐算法,其基本原理是“协同大家的反馈、评价和意见,一起对海量的信息进行过滤,从中筛选出用户可能感兴趣的信息”。它主要依赖于用户和物品之间的行为关系进行推荐。 协同过滤算法主要分为两类: 基于物品的协同过滤算法:给用户推荐与他之前喜欢的物品相似的物品。 基于用户的协同过滤算法:给用户推荐与他兴趣相似的用户喜欢的物品。 协同过滤算法的优点包括: 无需事先对商品或用户进行分类或标注,适用于各种类型的数据。 算法简单易懂,容易实现和部署。 推荐结果准确性较高,能够为用户提供个性化的推荐服务。 然而,协同过滤算法也存在一些缺点: 对数据量和数据质量要求较高,需要大量的历史数据和较高的数据质量。 容易受到“冷启动”问题的影响,即对新用户或新商品的推荐效果较差。 存在“同质化”问题,即推荐结果容易出现重复或相似的情况。 协同过滤算法在多个场景中有广泛的应用,如电商推荐系统、社交网络推荐和视频推荐系统等。在这些场景中,协同过滤算法可以根据用户的历史行为数据,推荐与用户兴趣相似的商品、用户或内容,从而提高用户的购买转化率、活跃度和社交体验。 未来,协同过滤算法的发展方向可能是结合其他推荐算法形成混合推荐系统,以充分发挥各算法的优势。
FTP(File Transfer Protocol)是文件传输协议的简称。 FTP的主要作用,就是让用户连接上一个远程计算机(这些计算机上运行着FTP服务器程序)查看远程计算机有哪些文件,然后把文件从远程计算机上拷到本地计算机,或把本地计算机的文件送到远程计算机去。 目前FTP服务器软件都为国外作品,例如Server_U、IIS,国内成熟的FTP服务器软件很少,有一些如(Crob FTP Server),但从功能上看来远不能和那些流行的服务器软件媲美。
本项目基于深度学习TensorFlow框架,针对滚动轴承故障诊断方法进行研究。项目采用了卷积神经网络(CNN)对轴承振动信号进行特征提取和分类,实现了对滚动轴承不同故障类型的自动诊断。 在技术实现上,项目利用TensorFlow搭建了一个高效的CNN模型,通过多层卷积、池化操作以及全连接层,自动学习轴承振动信号中的故障特征。同时,采用交叉熵损失函数优化模型参数,提高故障识别率。此外,项目还集成了数据预处理、模型训练、测试评估等功能模块,方便用户快速上手并进行实验研究。 经过运行测试,该项目代码运行稳定,诊断效果良好,可广泛应用于滚动轴承故障诊断领域。对于计算机相关专业的在校学生、老师或企业员工来说,该项目是一份难得的高分大作业资源,同时也是小白学习和实际项目借鉴的优秀参考资料。请放心下载使用,为您的学习和工作提供帮助!