app开发软件工具下载-app开发软件工具无限时间版

app开发软件工具下载-app开发软件工具无限时间版
浏览 (734)
  • 类型:合集
  • 更新:2024-10-18
  • 大小:258M
  • 所需权限:查看
  • 隐私政策:查看

:写个较为宏观的开发工具,结合应用,方便自己写Web的APP工具 ,如PC机器\":cheap and simple to develop tools, combined with the application, to facilitate their work Web APP recommend recommend"; Assert.AreEqual(str, AppUtility.KeywordSummaryByString(str,8)); } [TestMethod] public void ReplaceStr() { var str = "《不知火舞》职业属性"; var replaceChar ="—"; Assert.AreEqual("《不知火舞—职业属性》", str.ReplaceSpecialChar(replaceChar)); } [TestMethod] public void CharToCamelCase() { var str = "如果是大块怎么办"; Assert.AreEqual("IfSomeInternetBlock", str.CharToCamelCase()); } [TestMethod] public void GetCompleteSequenceNo() { int length = 0; for (int i = 0; i < 120; i++) { length = i; string sequence =i.GetCompleteSequenceNo(2); Console.WriteLine("等长序列号:{0}", sequence); Console.WriteLine("非等长序列号:{0}", i.GetNoneCompleteSequenceNo(8)); } } [TestMethod] public void millisecond() { long oneSecond = 1000; long oneMinute = oneSecond * 60; long oneHour = oneMinute * 60; long oneDay = oneHour * 24; long curMillisecond = Utility.PrecisionTime.Instanse.Minute; Console.WriteLine("当时毫秒数:{0}", curMillisecond); long curSecond = curMillisecond / oneSecond; Console.WriteLine("当时秒数:{0}", curSecond); long curMinute = curMillisecond / oneMinute; Console.WriteLine("当时分钟数:{0}", curMinute); long curHour = curMillisecond / oneHour; Console.WriteLine("当时小时数:{0}", curHour); long curDay = curMillisecond / oneDay; Console.WriteLine("当时天数数:{0}", curDay); Console.WriteLine("当前天数数过程中的毫秒总数:{0}", oneDay * curDay); Console.WriteLine("当前小时数过程中的毫秒总数:{0}", oneHour * curHour); Console.WriteLine("当前分钟过程中的毫秒总数:{0}", oneMinute * curMinute); Console.WriteLine("当前秒过程中的毫秒总数:{0}", oneSecond * curSecond); //long hour = noneCompleteSecond / oneHour; //long minute = noneCompleteSecond / oneMinute; //long second = noneCompleteSecond / oneSecond; //Console.WriteLine("等长序列数:{0}", noneCompleteSecond.GetNoneCompleteSequenceNo(8)); } [TestMethod] public void GetKeyworkToPinyin() { Dictionary dic = new Dictionary(); dic.Add("花花公子", "HUAHUAGONGZI"); dic.Add("大唐", "DATANG"); dic.Add("李小龙", "LIXIAOLONG"); dic.Add("EQ官员", "EQGONGYUAN"); foreach (var item in dic) { Assert.AreEqual(item.Value, Utility.ChineseToPinyin.GetPinYin(item.Key)); } } [TestMethod] public void GetKeyworkToPinyinAndCap() { Dictionary dic = new Dictionary(); dic.Add("花花公子", "HuaHuaGongZi"); dic.Add("大唐", "DaTang"); dic.Add("李小龙", "LiXiaoLong"); dic.Add("EQ官员", "EqGongYuan"); foreach (var item in dic) { Assert.AreEqual(item.Value, Utility.ChineseToPinyin.GetPinYinAndCap(item.Key)); } } [TestMethod] public void GetCategoryPath() { Dictionary dic = new Dictionary(); dic.Add(1, "华南"); dic.Add(11, "广东"); dic.Add(12, "湖南"); dic.Add(123, "高明"); dic.Add(17685, "东莞信息技术局"); Dictionary reuslt = new Dictionary(); reuslt.Add("南", "HuaNan"); reuslt.Add("南广", "HuaNan:GuangDong"); reuslt.Add("南广东", "HuaNan:GuangDong"); reuslt.Add("华莞", "HuDG"); reuslt.Add("莞州", "HuDZ"); reuslt.Add("佛莞", "FoDG"); reuslt.Add("莞东", "HuDong"); reuslt.Add("莞东迈腾", "DongMaiTeng"); reuslt.Add("莞迈腾", "DongMaiTeng"); foreach (var row in dic) { var result = row.Value.GetCategoryTitlePath(row.Key); string categoryStr = ""; foreach (var mapvalue in result) { categoryStr = categoryStr + ":" + mapvalue.Trim(); } if(reuslt.ContainsKey(categoryStr.Remove(0,1))) { var reusltVal = reuslt[categoryStr.Remove(0,1)]; Assert.AreEqual(reusltVal, string.Format("{0}:{1}", categoryStr.Remove(0, 1), row.Key).Remove(0, 1)); } else { Assert.AreEqual(categoryStr.Remove(0, 1), string.Format("{0}:{1}", categoryStr.Remove(0, 1), row.Key).Remove(0, 1)); } } } [TestMethod] public void GetCategoryValueByPath() { Dictionary resultDic = new Dictionary(); string path = "HuaNan:GuangDong"; resultDic.Add(1, "华南"); resultDic.Add(11, "广东"); resultDic.Add(12, "湖南"); resultDic.Add(123, "高明"); Dictionary dataMap = new Dictionary(); foreach (var item in resultDic) { var paths = item.Value.GetCategoryTitlePath(item.Key); StringBuilder sb = new StringBuilder(); foreach (var p in paths) { sb.Append(":"); sb.Append(p); } var pathsKey = sb.ToString().Remove(0,1); if (!dataMap.ContainsKey(item.Key)) { dataMap.Add(item.Key, pathsKey); } } var pathList = path.Split(new[] { ":" }, StringSplitOptions.RemoveEmptyEntries); string str = pathList[0]; int? id = null; if (dataMap.ContainsValue(pathList[0])) { if (dataMap.ContainsValue(pathList[0] + ":" + pathList[1])) { id = int.Parse(pathList[1]); } else { id = int.Parse(pathList[0].SToListString()[0]); } } Assert.IsTrue(id!=null); } } }

安卓版下载
app开发软件工具下载-app开发软件工具无限时间版

同类推荐更多

专题合集更多>>

我的孩子生命之泉中文版苹果下载免费-我的孩子生命之泉中文版苹果 知识就是力量无限体力版-知识就是力量游戏无限体力 王者荣耀s3赛季版本下载无需更新-王者荣耀s32赛季更新补丁资源包手机版 狂野飙车8完美存档下载-狂野飙车8完美存档