用于永久化对象,什么程序都行,依赖NewtonSoft.用于json序列化和反序列化. using Newtonsoft.Json; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConfigHandler { public class ConfigHandl
using System; using System.Collections.Generic; using System.Text; using System.Xml; using System.IO; namespace ConfigMgrTest { public class SystemConfig { #region"基本操作函数" /// <summary> /// 得到程序工作目录 /// </summary> /// <returns>
要做一个截图的功能,并且玩家可以在相册中看到. 做的时候遇到了三个问题: 1.unity自带的截图API,Application.CaptureScreenshot在Android上不生效 2.图片保存的路径获取 3.保存的图片可以在手机的文件管理中找到,但是相册中没有. 解决方案: 1.这个问题查了半天没有说原因,大多数人都给出了新方案用 File.WriteAllBytes去实现,代码如下: using UnityEngine; using System.Collections; using
前面学习的cifar10项目虽小,但却五脏俱全.全面理解该项目非常有利于进一步的学习和提高,也是走向更大型项目的必由之路.因此,summary依然要从cifar10项目说起,通俗易懂的理解并运用summary是本篇博客的关键. 先不管三七二十一,列出cifar10中定义模型和训练模型中的summary的代码: # Display the training images in the visualizer. tf.summary.image('images', images) def _activ
SaveFileDialog用于保存文件 1.新建Winform窗体应用程序,命名为SaveFileDialogDemo. 2.在界面上添加一个按钮的控件(用于打开保存文件对话框),添加文本控件,用于输入要保存的内容. 3.后台代码实现: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System