锐 奇_个人页

个人头像照片 锐 奇
个人头像照片
3
4
0

个人介绍

一个路过的小学生

擅长的技术

  • Java
获得更多能力
通用技术能力:

暂时未有相关通用技术能力~

云产品技术能力:

阿里云技能认证

详细说明
暂无更多信息

2021年10月

  • 10.13 20:34:38
    发表了文章 2021-10-13 20:34:38

    使用云助手自动化运维 ECS 实例

    介绍与演示云助手的用法,包含: - 云助手的简介 - 在 ECS 实例上手动执行命令的实例 - 在 ECS 实例上安装 Jenkins 的实验
  • 发表了文章 2021-10-13

    使用云助手自动化运维 ECS 实例

  • 发表了文章 2019-06-14

    Alfred 工作流 - 阿里云 Open API 搜索与查看

  • 发表了文章 2018-03-05

    接口设计的几个注意事项

正在加载, 请稍后...
滑动查看更多
  • 回答了问题 2019-07-17

    java调用钉钉接口获取数据有时出现java.net.UnknownHostException: oapi.dingtalk.com异常

    域名未识别,DNS 解析错误,可以使用以下命令测试看看

    nslookup oapi.dingtalk.com
    ping -c 4 oapi.dingtalk.com
    踩0 评论0
  • 回答了问题 2019-07-17

    java如何获取发起请求的用户真实IP

        protected static String getRemoteAddr(HttpServletRequest request) {
            String caller = request.getHeader("X-Forwarded-For");
            if (caller == null || caller.isEmpty() || caller.equals("unknown")) {
                caller = request.getHeader("Proxy-Client-IP");
            }
    
            if (caller == null || caller.isEmpty() || caller.equals("unknown")) {
                caller = request.getHeader("WL-Proxy-Client-IP");
            }
            
            if (caller == null || caller.isEmpty() || caller.equals("un")) {
                caller = request.getHeader("HTTP_CLIENT_IP");
            }
    
            if (caller == null || caller.isEmpty() || caller.equals("un")) {
                caller = request.getHeader("X-Real-IP");
            }
    
            if (caller == null || caller.isEmpty() || caller.equals("unknown")) {
                caller = request.getRemoteAddr();
            }
            return caller;
        }
    踩0 评论0
  • 回答了问题 2019-07-17

    [@倚贤][¥20]什么是值传递和引用传递?

    "值传递"和"引用传递"这个称谓,一般是 .NET 平台(C#, F#, VB.NET 等等) 使用的术语。

    1. 默认对于 class 类型变量传参是引用传递 - 传递的参数实例的引用;
    2. 对于 struct 类型变量的传参是值传递,也可以在加在 ref 声明,指定使用为引用传递;
    3. 注意 string 类有那第一点点不寻常,虽然也是按引用传递,但对 string 参数的赋值实际上是将其指向了另一个 string 实例,所以表现起来比较像是按值传递,而实例是按引用传递。
    using System;
    
    namespace Demo
    {
        public struct Student
        {
            public long Id { get; set; }
            public string Name { get; set; }
        }
    
        public class Contact
        {
            public string Name { get; set; }
            public string Email { get; set; }
        }
    
        public static class Program
        {
    
            public static void TestStruct(Student student, int number) // 默认按值传递
            {
                student.Name = "student name";  //  此修改不会影响到方法调用者中的 stuct
                ++number;
            }
    
            public static void TestStructByRef(ref Student student, ref int number) // ref 强制改为按引用传递
            {
                student.Name = "student name";  //  此修改*会*影响到方法调用者中的 student
                ++number;
            }
    
            public static void TestClass(Contact contact) // 默认按引用传递
            {
                contact.Name = "contact name";  //  此修改*会*影响到方法调用者中的 contact
            }
    
            public static void TestString(String hello) // 默认按引用传递
            {
                hello = "hello, world";   //  此修改不会影响到方法调用者中的 hello
                Console.WriteLine(hello); //  will print "hello, world;
            }
    
            public static void TestStringOut(out String hello) // 默认按引用传递
            {
                hello = "hello, world";   //  此修改不会影响到方法调用者中的 hello
                Console.WriteLine(hello); //  will print "hello, world;
            }
    
            static void Main(string[] args)
            {
                Student student = new Student();
                student.Name = "new student";
                Console.WriteLine(student.Name);
    
                int number = 0;
                TestStruct(student, number);     // struct 默认按值传递
                Console.WriteLine(student.Name); // will write "new student" ##
                Console.WriteLine(number);       // will write 0
                Console.WriteLine();
    
                number = 0;
                TestStructByRef(ref student, ref number);
                Console.WriteLine(student.Name); // will write "student name" ##
                Console.WriteLine(number);       // will write 1
                Console.WriteLine();
    
                Contact contact = new Contact();
                contact.Name = "new contract";
                Console.WriteLine(contact.Name); // will write "new contact"
    
                TestClass(contact);              // class 默认按引用传递
                Console.WriteLine(contact.Name); // will write "contact name" ##
                Console.WriteLine();
    
                String hello = "hello";
                TestString(hello);
                Console.WriteLine(hello);        // will write "hello";
    
                hello = "hello";
                TestStringOut(out hello);
                Console.WriteLine(hello);        // will write "hello world";
            }
    
        }
    }
    踩0 评论0
  • 回答了问题 2019-07-17

    [@徐雷frank][¥20]什么是JAVA的平台无关性

    简单来说,使用 JAVA 语言编写出来的源代码文件 .java,被 JAVAC 编译器编译成字节码文件 .class (及压缩打包成*.jar),可以不加修改地拷贝到其他平台上、同该平台上的 JVM 运行,该平台的 JVM 使用 JIT技术 将 .class 再动态编译为可以当前平台上运行的代码指令。

    踩0 评论0
正在加载, 请稍后...
滑动查看更多
正在加载, 请稍后...
暂无更多信息