当前位置: 首页 > news >正文

中山市智能h5网站建设公司长沙靠谱的关键词优化

中山市智能h5网站建设公司,长沙靠谱的关键词优化,网页设计课程主要内容,网络推广简历除了正常进制转换,还可以输入、输出使用不同的数字符号,达成对数值进行加密的效果 点我下载APK安装包 使用unity开发。新建一个c#代码文件,把代码覆盖进去,再把代码文件添加给main camera即可。 using System.Collections; usin…

除了正常进制转换,还可以输入、输出使用不同的数字符号,达成对数值进行加密的效果

在这里插入图片描述
在这里插入图片描述

点我下载APK安装包

使用unity开发。新建一个c#代码文件,把代码覆盖进去,再把代码文件添加给main camera即可。

using System.Collections;
using System.Collections.Generic;
using UnityEngine;public class NewBehaviourScript : MonoBehaviour
{// Start is called before the first frame updatevoid Start(){}// Update is called once per framevoid Update(){}string injinzhifuhao = @"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";string injinzhi = @"10";string intext = @"12345";string outjinzhifuhao = @"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";string outjinzhi1 = @"2";string outtext1 = @"";private void OnGUI(){float rect_x = Screen.width * 0.1f;float rect_y = Screen.height * 0.1f;float rect_w = Screen.width * 0.8f;float rect_h = Screen.height * 0.05f;GUIStyle style_l = GUI.skin.label;style_l.normal.textColor = Color.white;style_l.fontSize = (int)(rect_h * 0.8);style_l.alignment = TextAnchor.MiddleCenter;GUIStyle style_t = GUI.skin.textField;style_t.normal.textColor = Color.white;style_t.fontSize = (int)(rect_h * 0.8);GUIStyle style_b = GUI.skin.button;style_b.fontSize = (int)(rect_h * 0.8);style_b.alignment = TextAnchor.MiddleCenter;GUI.Label(new Rect(rect_x, rect_y, rect_w, rect_h), @"进制符号", style_l);rect_y += rect_h;injinzhifuhao = GUI.TextField(new Rect(rect_x, rect_y, rect_w, rect_h), injinzhifuhao, style_t);rect_y += rect_h;GUI.Label(new Rect(rect_x, rect_y, rect_w, rect_h), @"输入的是几进制", style_l);rect_y += rect_h;injinzhi = GUI.TextField(new Rect(rect_x, rect_y, rect_w, rect_h), injinzhi, style_t);rect_y += rect_h;GUI.Label(new Rect(rect_x, rect_y, rect_w, rect_h), @"数值", style_l);rect_y += rect_h;intext = GUI.TextField(new Rect(rect_x, rect_y, rect_w, rect_h), intext, style_t);rect_y += rect_h * 2;bool butt = GUI.Button(new Rect(rect_x, rect_y, rect_w, rect_h), @"转换", style_b);rect_y += rect_h * 2;GUI.Label(new Rect(rect_x, rect_y, rect_w, rect_h), @"转换后的进制符号", style_l);rect_y += rect_h;outjinzhifuhao = GUI.TextField(new Rect(rect_x, rect_y, rect_w, rect_h), outjinzhifuhao, style_t);rect_y += rect_h;GUI.Label(new Rect(rect_x, rect_y, rect_w, rect_h), @"转换成几进制", style_l);rect_y += rect_h;outjinzhi1 = GUI.TextField(new Rect(rect_x, rect_y, rect_w, rect_h), outjinzhi1, style_t);rect_y += rect_h;GUI.Label(new Rect(rect_x, rect_y, rect_w, rect_h), @"数值", style_l);rect_y += rect_h;outtext1 = GUI.TextField(new Rect(rect_x, rect_y, rect_w, rect_h), outtext1, style_t);if (butt){int injinzhi_;int outjinzhi1_;// - - - - - - - - - - - - - - - 纠错 - - - - - - - - - - - - - - - if (injinzhifuhao.Length <= 0) { injinzhifuhao = @"不能没有进制符号"; return; }if (int.TryParse(injinzhi, out injinzhi_) == false) { injinzhi = @"无法识别为数字" + injinzhi; return; }if (injinzhi_ <= 0) { injinzhi = @"必须是大于零的数字" + injinzhi; return; }if (int.TryParse(outjinzhi1, out outjinzhi1_) == false) { outjinzhi1 = @"无法识别为数字" + outjinzhi1; return; }if (outjinzhi1_ <= 0) { outjinzhi1 = @"必须是大于零的数字" + outjinzhi1; return; }if (injinzhi_ > injinzhifuhao.Length) { injinzhi = @"进制符号太少,无法表示如此大的进制" + injinzhi; return; }foreach (var item in intext){bool t = false;for (int i = 0; i < injinzhi_; i++){if (injinzhifuhao[i] == item) { t = true; break; }}if (t == false) { intext = @"符号" + item + "不在进制范围的符号中" + intext; return; }}// - - - - - - - - - - - - - - - 转换 - - - - - - - - - - - - - - - // 用int[]保存intext的每个数字;int[]的元素数量是intext.Length。int[] jinzhinum = new int[intext.Length];for (int i = 0; i < intext.Length; i++){for (int j = 0; j < injinzhifuhao.Length; j++){if (intext[i] == injinzhifuhao[j]){jinzhinum[i] = j;}}}// 对输入值减一,同时输出值加一。List<int> outnum = new List<int>();outnum.Add(0);while (SubOne(ref jinzhinum, injinzhi_)){AddOne(ref outnum, outjinzhi1_);}// 数字转换成符号outtext1 = @"";for (int i = outnum.Count - 1; i >= 0; i--){int t = outnum[i];string tt = outjinzhifuhao[t].ToString();outtext1 = tt + outtext1;}}bool SubOne(ref int[] a, int jinzhi){if (a[a.Length - 1] > 0) // 个位数减一{a[a.Length - 1]--;return true;}else // 需要借位{for (int i = a.Length - 2; i >= 0; i--){if (a[i] > 0){a[i]--;for (int j = i + 1; j <= a.Length - 1; j++){a[j] = jinzhi - 1;}return true;}}return false; // 传入的数为零,无法继续减一}}void AddOne(ref List<int> a, int jinzhi){a[a.Count - 1]++;for (int i = a.Count - 1; i >= 0; i--){if (a[i] == jinzhi){a[i] = 0;if (i != 0){a[i - 1]++;}else{a.Insert(0, 1);return;}}else{return;}}}}
}
http://www.tj-hxxt.cn/news/55076.html

相关文章:

  • 怎么自己做网站教程中国国家人才培训网官网
  • 有哪些好的做兼职的网站有哪些网站排名优化
  • 电商网站建设系统百度下载并安装最新版
  • 如何做网站防劫持刷关键词优化排名
  • 给网站整一个客服 怎么做网站模板图片
  • 外省公司做网站备案培训心得总结怎么写
  • 有做数学题的网站吗竞价推广哪里开户
  • 沧州wap网站制作在线培训管理系统
  • 上海大型网站设计公司windows优化大师怎么卸载
  • 原创设计师品牌网站厦门人才网官方网站
  • wordpress怎么修改栏目标题网站排名优化快速
  • 重庆做网站公司中国销售网
  • 受欢迎的购物网站建设宁波网站优化
  • 网页访问wordpressseo快速排名工具
  • 腾讯云做网站怎么样专业竞价托管
  • 教育app开发费用网站seo优化有哪些方面
  • 广州网站制作多少钱福清市百度seo
  • 网站欢迎页面怎么做没广告的视频播放器app
  • 购物网站有哪些模块服务营销策略
  • 自助制作网站网店怎么推广和宣传
  • 可以用来做论文引用的网站简阳seo排名优化培训
  • 学做陶艺作品的网站长沙seo网站优化公司
  • 合肥网站建设费用线上销售怎么做
  • wordpress 网站换域名百度网站推广一年多少钱
  • 大连做网站的公司seo优化推广软件
  • 外包项目平台seo建站公司推荐
  • 网站排名权重怎么做网络广告推广服务
  • 宠物医院网站建设方案网站排名优化软件
  • 服务器 网站建设seo专员很难吗
  • frp可以做网站吗免费网站注册平台