• C#中的Variable

    Programs typically use data to perform tasks. Creating a variable reserves a memory location, or a space in memory, for storing values. It is called variable because the information stored in that location can be changed when the program is running.

    To use a variable, it must first be declared by specifying the name and data type.

    A variable name, also called an identifier, can contain letters, numbers and the underscore character (_) and must start with a letter or underscore.

    Although the name of a variable can be any set of letters and numbers, the best identifier is descriptive of the data it will contain. this is very important in order to create clear, understandable and readable code.

    A data type defines the information that can be stored in a variable, the size of needed memory and the operations that can be performed with the variable.

    For example, to store an integer value (a whole number) in a vairable, use the int keyword:

    int myAge;
    myAge = 18;
    
    int myAge = 18;
    

    There are a number of built-in data types in C#. The most common are:

    • int
    • float
    • double
    • char
    • bool
    • string

    The statements below use C# data types:

    int x = 24;
    double pi = 3.14;
    char y = "a";
    bool isTure = true;
    string myName ="Ao";
    
  • About C#

    C# is one of the most popular modern programming languages. C# is elegant and powerful. You can use it to create video games, web, mobile, database applications, and much, much more.

    Humans use computer programs to communicate with machines. Without computer programs, we wouldn’t have smartphones, websites, or even exploration in outer space.

    Learning some coding can help you innovate and create different solutions to problems, giving you a competitive edge in this technology-driven world.

    Most computer programs are designed to produce outputs. The simplest output consists of a message displayed on the screen. Examples of outputs are:

    • “A new message” notifications
    • “Game over” is displayed on the screen when playing video games
    • Your account balance when checking your online banking app.

    Coders use outputs all the time to check that the computer is following the given instructions and fix problems with code. The following line of code displays a message on the screen as an output:

    Console.WriteLine("Hello world of C#!");
    

    Real computer programs can include thousands of lines of code. A line of code is called a statement. A statement performs a specific task.

    C# is an elegant object-oriented language that enables developers to build a variety of secure and robust applications that run on the .NET Framework.

    The .NET framework consists of the Common Language Runtime (CLR) and the .NET Framework class library.

    The CLR is the foundation of the .NET Framework. It manages code at execution time, code accuracy, and many other aspects of your code.

    The class library is a collection of classes, interfaces, and value types that enable you to accomplish a range of common programming tasks, such as data collection, file access, and working with text.

    C# programs use the .NET Framework class library extensively to do common tasks and provide various functionalities.

  • 在自己的PC上部署.Net

    进入.Net的下载网站,下载最新版本或者长期支持的.Net版本,然后直接安装。

    https://aka.ms/dotnet-download

    安装完成之后,进入命令提示符,输入`dotnet –version`,可以查看.Net的版本,版本可能因更新而不同。

    初始化新的.Net项目

    dotnet new console
    
  • 摘要写法

    摘要具有独立性,若出现缩写,摘要中必须注明。

    1. 背景介绍,给读者一个理解文章的环境。
    2. 研究目标、问题或假设,We asked whether,We hypothesized that.
    3. 快速总结所用的材料和方法。
    4. 给出关键的发现和关键的数字。
    5. 简短的结论来支持假设。
    6. 意义、暗示、推测或建议,让读者理解这项研究与真实世界的相关性。
  • 32bit和64bit的区别

      bit是计算机的最小存储单位,存储一个0或一个1,计算机就是用无数的0和1组成了丰富多彩的虚拟世界。被一起读入CPU(中央处理器)的一组bit若是32,则是32位,若是64,则是64位。

      1bit只能存储2个值,即0或1。2bit可以存储4个值,00、01、10、11。以此类推,一次处理多少位,就代表一次可以处理2的多少次方种组合。2的8次方等于256,即从0~255,而32位表示4294967296种组合,64位则是18446744073709551616。

  • 对审稿人要有礼貌

    审稿人花时间在看稿子,即便审稿人提出的问题不对,也应该给与合理的解释,并自己审查是否是自己的疏忽或描述不清造成了误解。

    Dear Dr. Editor,

    We appreciate your helpful comments and those of the reviewers.

    We feel that the manuscript is now greatly improved.

    逐条回复时候,可以用发

    We agree with Reviewer I that the section on xxx…

  • 推荐信

    写推荐信一般需要导师来写,导师需要对学生足够了解,否则是对被推荐方的不公平。在写推荐信时,需要学生提供一份简历,以免在评价学生时有所遗漏。

    根据对候选人的平时观察给与真实的评价。比如这是我从未见过的优秀学生。他是班里50个学生中最好的一个。我毫不怀疑他能够胜任一流的研究。我对他的能力有信心。他是我见过最热情的一个。也可以引用其他人的一些评价。

    格式

    我很高兴推荐XXX到XXX。如何认识候选人。一两句对候选人的看法。

    单位

    地址

    电话等

  • Windows下确定电脑最大支持内存

    1. Win+R打开运行,输入cmd

    2. 然后输入wmic memphysical get maxcapacity

    本机测试得到67108864,67108864÷1024÷1024=64GB,因此,本机最大支持64G内存。

  • Win11的Ubuntu子系统安装Miniconda

    1. 进入miniconda的官网主页(https://docs.conda.io/en/latest/miniconda.html)。

    2. 下拉,直到找到Linux installers,找对应的Python版本,我的是3.10,选择3.9的版本,在第一个链接上点鼠标右键,复制链接地址。

    3. 运行Windows11的子系统Ubuntu,输入wget空格,然后点鼠标右键,如图。

    4. 输入bash Miniconda3-latest-Linux-x86_64.sh,然后一顿回车,如果需要写yes的时候,输入yes

    5. 等待安装完成,关闭Ubuntu重新打开,看到用户名前面有(base)即表示成功,可以通过下面的命令查看conda版本。

    本文短链接:https://wp.me/p80aHo-Gj

  • 创造一个好的学习环境和习惯

      好的学习环境往往能使学习事半功倍!一般来说,好的学习环境要远离其他干扰,不能是吃饭、休息的场所。好的环境需要良好的光照,具备能让人专注的安静,身边放好水以便随时补充水分,最好把健康的零食也摆在旁边,及时补充能量。

      越来越多的人开始用笔记本电脑或平板工作,请使用“二十二十”原则,即工作20分钟,休息二十秒,休息期间拉伸身体,并尽量远望,让眼睛和身体得到充分的休息。