Skip to content
0
  • Categories
  • 讨论
  • Recent
  • Tags
  • Popular
  • Top
  • Users
  • Categories
  • 讨论
  • Recent
  • Tags
  • Popular
  • Top
  • Users
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
JIKE社区
  1. 首页
  2. 讨论区
  3. 技术专区
  4. 本社区终于可以向 @ChatGPT 提问了!

本社区终于可以向 @ChatGPT 提问了!

Scheduled Pinned Locked Moved 技术专区
11.5k Posts 326 Posters 57.9m Views 8 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P peng111

    @ChatGPT java中一个用于传入学生年龄作为参数,返回学生出生年份的代码

    ChatGPTC Offline
    ChatGPTC Offline
    ChatGPT
    wrote on last edited by
    #821

    peng111说:

    java中一个用于传入学生年龄作为参数,返回学生出生年份的代码

    示例如下:

    public static int getBirthYear(int age) {
        Calendar cal = Calendar.getInstance();
        int currentYear = cal.get(Calendar.YEAR);
        int birthYear = currentYear - age;
        return birthYear;
    }
    

    帖子内容中 @ChatGPT(注意前后空格,发帖后名称变色才行)。必须@才会回答

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #822

      @ChatGPT 调用linux系统函数输出hello world

      ChatGPTC 1 Reply Last reply
      0
      • ? Guest

        @ChatGPT 调用linux系统函数输出hello world

        ChatGPTC Offline
        ChatGPTC Offline
        ChatGPT
        wrote on last edited by
        #823

        guest说:

        调用linux系统函数输出hello world

        #include
        #include

        int main()
        {
        write(1,"Hello World\n",12);
        return 0;
        }

        帖子内容中 @ChatGPT(注意前后空格,发帖后名称变色才行)。必须@才会回答

        1 Reply Last reply
        0
        • P Offline
          P Offline
          peng111
          🍌
          wrote on last edited by
          #824

          @ChatGPT koloeb660m主板怎么样

          ChatGPTC 1 Reply Last reply
          0
          • P peng111

            @ChatGPT koloeb660m主板怎么样

            ChatGPTC Offline
            ChatGPTC Offline
            ChatGPT
            wrote on last edited by
            #825

            peng111说:

            koloeb660m主板怎么样

            Koloeb660M主板是一款高性能主板,具有良好的性能,它采用了Intel B560芯片组,支持LGA1200接口的11代Core i9/i7/i5/i3处理器,内置DDR4 3200MHz超频内存,支持双通道技术,最大支持64GB容量,可提供强大的计算能力。另外,它还支持双M.2插槽扩展,支持PCI-E 3.0 x16插槽扩展,支持双HDMI输出,支持一个HDMI2.0输出,具备USB3.0接口。总的来说,Koloeb660M主板可以满足用户的多种需求,性能优越,具有更强大的扩展性,值得推荐。

            帖子内容中 @ChatGPT(注意前后空格,发帖后名称变色才行)。必须@才会回答

            1 Reply Last reply
            0
            • ? This user is from outside of this forum
              ? This user is from outside of this forum
              Guest
              wrote on last edited by
              #826

              @ChatGPT 写一个程序,输出当前系统进程列表,并且输出进程名为system的进程号,运行平台是linux

              ChatGPTC 1 Reply Last reply
              0
              • P Offline
                P Offline
                peng111
                🍌
                wrote on last edited by
                #827

                java中一个用于传入学生年龄作为参数,返回学生出生年份的代码的方法

                1 Reply Last reply
                0
                • ? Guest

                  @ChatGPT 写一个程序,输出当前系统进程列表,并且输出进程名为system的进程号,运行平台是linux

                  ChatGPTC Offline
                  ChatGPTC Offline
                  ChatGPT
                  wrote on last edited by
                  #828

                  guest说:

                  写一个程序,输出当前系统进程列表,并且输出进程名为system的进程号,运行平台是linux

                  #include 
                  #include 
                  #include 
                  
                  int main()
                  {
                      FILE *fp; 
                      char buff[1024];
                      int pid;
                  
                      fp = popen("ps -e", "r"); //获取进程列表
                      while(fgets(buff, sizeof(buff), fp) != NULL) {
                          printf("%s", buff);
                          if(strstr(buff, "system")) {  //查找进程名为system的进程
                              sscanf(buff, "%d", &pid);
                              printf("system的进程号是:%d\n", pid);
                              break;
                          }
                      }
                      pclose(fp);
                      return 0;
                  }
                  

                  帖子内容中 @ChatGPT(注意前后空格,发帖后名称变色才行)。必须@才会回答

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    peng111
                    🍌
                    wrote on last edited by
                    #829

                    @ChatGPT java中一个用于传入学生年龄作为参数,返回学生出生年份的代码的方法

                    ChatGPTC 1 Reply Last reply
                    0
                    • P peng111

                      @ChatGPT java中一个用于传入学生年龄作为参数,返回学生出生年份的代码的方法

                      ChatGPTC Offline
                      ChatGPTC Offline
                      ChatGPT
                      wrote on last edited by
                      #830

                      peng111说:

                      java中一个用于传入学生年龄作为参数,返回学生出生年份的代码的方法

                      可以使用Calendar类:

                      int age = 18;
                      Calendar calendar = Calendar.getInstance();
                      int year = calendar.get(Calendar.YEAR) - age;
                      System.out.println("Student's birth year is: " + year);

                      帖子内容中 @ChatGPT(注意前后空格,发帖后名称变色才行)。必须@才会回答

                      1 Reply Last reply
                      0
                      • ? This user is from outside of this forum
                        ? This user is from outside of this forum
                        Guest
                        wrote on last edited by
                        #831

                        @ChatGPT 写一个程序,弹出一个窗口,窗口内的文字为hello world,运行平台为linux

                        ChatGPTC 1 Reply Last reply
                        0
                        • ? Guest

                          @ChatGPT 写一个程序,弹出一个窗口,窗口内的文字为hello world,运行平台为linux

                          ChatGPTC Offline
                          ChatGPTC Offline
                          ChatGPT
                          wrote on last edited by
                          #832

                          guest说:

                          写一个程序,弹出一个窗口,窗口内的文字为hello world,运行平台为linux

                          #!/bin/bash
                          
                          # yum install dialog 
                          # 安装dialog模块
                          
                          # 弹出hello world窗口
                          dialog --title "Hello World" --msgbox "Hello World" 10 40
                          

                          帖子内容中 @ChatGPT(注意前后空格,发帖后名称变色才行)。必须@才会回答

                          1 Reply Last reply
                          0
                          • ? This user is from outside of this forum
                            ? This user is from outside of this forum
                            Guest
                            wrote on last edited by
                            #833

                            @ChatGPT 写一个程序,弹出一个窗口,窗口内的内容为hello world,运行平台为linux,使用语言为C++

                            ChatGPTC 1 Reply Last reply
                            0
                            • P Offline
                              P Offline
                              peng111
                              🍌
                              wrote on last edited by
                              #834

                              @ChatGPT 鲍鱼要吃什么饲料、龙丝莱、包菜、罗卜,红罗卜比较有营养

                              ChatGPTC 1 Reply Last reply
                              0
                              • ? Guest

                                @ChatGPT 写一个程序,弹出一个窗口,窗口内的内容为hello world,运行平台为linux,使用语言为C++

                                ChatGPTC Offline
                                ChatGPTC Offline
                                ChatGPT
                                wrote on last edited by
                                #835

                                guest说:

                                写一个程序,弹出一个窗口,窗口内的内容为hello world,运行平台为linux,使用语言为C++

                                #include 
                                #include 
                                
                                int main(int argc, char *argv[])
                                {
                                    GtkWidget *window;
                                    gtk_init(&argc, &argv);
                                
                                    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
                                    gtk_window_set_title(GTK_WINDOW(window), "Hello World");
                                    gtk_window_set_default_size(GTK_WINDOW(window), 300, 300);
                                    gtk_widget_show_all(window);
                                
                                    gtk_main();
                                
                                    return 0;
                                }
                                

                                帖子内容中 @ChatGPT(注意前后空格,发帖后名称变色才行)。必须@才会回答

                                1 Reply Last reply
                                0
                                • P peng111

                                  @ChatGPT 鲍鱼要吃什么饲料、龙丝莱、包菜、罗卜,红罗卜比较有营养

                                  ChatGPTC Offline
                                  ChatGPTC Offline
                                  ChatGPT
                                  wrote on last edited by
                                  #836

                                  peng111说:

                                  鲍鱼要吃什么饲料、龙丝莱、包菜、罗卜,红罗卜比较有营养

                                  。

                                  帖子内容中 @ChatGPT(注意前后空格,发帖后名称变色才行)。必须@才会回答

                                  1 Reply Last reply
                                  0
                                  • ? This user is from outside of this forum
                                    ? This user is from outside of this forum
                                    Guest
                                    wrote on last edited by
                                    #837

                                    @ChatGPT 写一个程序,从网址www.baodu.com下载一个html,并用控制台显示出来,使用语言为C++,运行平台为linux

                                    ChatGPTC 1 Reply Last reply
                                    0
                                    • ? Guest

                                      @ChatGPT 写一个程序,从网址www.baodu.com下载一个html,并用控制台显示出来,使用语言为C++,运行平台为linux

                                      ChatGPTC Offline
                                      ChatGPTC Offline
                                      ChatGPT
                                      wrote on last edited by
                                      #838

                                      guest说:

                                      写一个程序,从网址www.baodu.com下载一个html,并用控制台显示出来,使用语言为C++,运行平台为linux

                                      #include 
                                      #include 
                                      #include 
                                      #include 
                                      
                                      using namespace std;
                                      
                                      size_t writeData(void *ptr, size_t size, size_t nmemb, void *stream)
                                      {
                                          string data((const char*) ptr, (size_t) size * nmemb);
                                          *((stringstream*) stream) << data << endl;
                                          return size * nmemb;
                                      }
                                      
                                      int main()
                                      {
                                          CURL *curl;
                                          CURLcode res;
                                          stringstream out;
                                      
                                          curl = curl_easy_init();
                                          if (curl)
                                          {
                                              curl_easy_setopt(curl, CURLOPT_URL, "www.baodu.com");
                                              curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writeData);
                                              curl_easy_setopt(curl, CURLOPT_WRITEDATA, &out);
                                              res = curl_easy_perform(curl);
                                      
                                              curl_easy_cleanup(curl);
                                      
                                              cout << out.str();
                                          }
                                          return 0;
                                      }
                                      

                                      帖子内容中 @ChatGPT(注意前后空格,发帖后名称变色才行)。必须@才会回答

                                      1 Reply Last reply
                                      0
                                      • P Offline
                                        P Offline
                                        peng111
                                        🍌
                                        wrote on last edited by
                                        #839

                                        @ChatGPT 电压是380V的16平方铜线能承受多少千瓦,为什么

                                        ChatGPTC 1 Reply Last reply
                                        0
                                        • ? This user is from outside of this forum
                                          ? This user is from outside of this forum
                                          Guest
                                          wrote on last edited by
                                          #840

                                          @ChatGPT 找一个美女网站

                                          ChatGPTC 1 Reply Last reply
                                          0

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          Register Login
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • 1
                                          • 2
                                          • 40
                                          • 41
                                          • 42
                                          • 43
                                          • 44
                                          • 576
                                          • 577
                                          Popular Topics - 热门主题
                                          • 京东游跟进了0元体重秤
                                            我是小马甲~M
                                            我是小马甲~
                                            1
                                            3
                                            535

                                          • 中国广电免费领取30G通用数据流量
                                            A
                                            amly
                                            1
                                            2
                                            292

                                          • 阿里云Shell,可免费跑一些脚本
                                            孤
                                            孤傲的王
                                            0
                                            4
                                            210

                                          • 蚂蚁阿福App中10元可领体脂秤
                                            游魂Y
                                            游魂
                                            0
                                            4
                                            901

                                          • Win 10 RTM Professional Volume:MAK
                                            V
                                            vip0546
                                            0
                                            3
                                            35

                                          • 今日支付宝福利活动(限时领取)
                                            鹏鹏啊折
                                            鹏鹏啊
                                            0
                                            3
                                            274


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          夸克网盘
                                          4,387 topics
                                          百度网盘
                                          4,332 topics
                                          连续剧
                                          1,519 topics
                                          国产剧
                                          1,027 topics
                                          美剧
                                          707 topics
                                          动作片
                                          660 topics
                                          恐怖片
                                          526 topics
                                          动画片
                                          401 topics

                                          119

                                          Online

                                          44.0k

                                          Users

                                          50.1k

                                          Topics

                                          126.0k

                                          Posts
                                          • First post
                                            Last post