Skip to content
0
  • Categories
  • 讨论
  • Recent
  • Tags
  • Popular
  • Top
  • Users
  • Categories
  • 讨论
  • Recent
  • Tags
  • Popular
  • Top
  • Users
Skins
  • Light
  • 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 (Zephyr)
  • No Skin
Collapse
JIKE社区
  1. 首页
  2. 讨论区
  3. 技术专区
  4. 本社区终于可以向 @ChatGPT 提问了!

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

Scheduled Pinned Locked Moved 技术专区
11.5k Posts 326 Posters 49.5m Views
  • 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
                                          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 - 热门主题
                                          • 免费油管音乐客户端:Metrolist
                                            undefined
                                            1
                                            1
                                            118

                                          • 速度!9.9开美团年卡(12个月每月10张5元无门槛券)
                                            A
                                            abcpython
                                            0
                                            3
                                            327

                                          • 美団APP-首页~美团外卖点进去
                                            H
                                            ‍
                                            0
                                            2
                                            93

                                          • 盘古之殇:华为诺亚盘古大模型研发历程的心酸与黑暗
                                            孤
                                            孤傲的王
                                            0
                                            2
                                            67

                                          • <港剧>守诚者[2025][动作 悬疑 犯罪][陈小春 李治廷 韩雪 任达华 何润东 熊黛林 李丽珍]国粤双语
                                            爱之梦梦爱
                                            爱之梦梦
                                            0
                                            2
                                            20

                                          • 中国广电APP首页宣传图每月可领取5GB流量+60分钟通话,持续到9月底,限北京
                                            T
                                            Tily
                                            0
                                            2
                                            203

                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          百度网盘
                                          1,561 topics
                                          连续剧
                                          773 topics
                                          国产剧
                                          603 topics
                                          美剧
                                          359 topics
                                          中国移动
                                          307 topics
                                          动画片
                                          263 topics
                                          动作片
                                          223 topics
                                          中国电信
                                          222 topics

                                          151

                                          Online

                                          40.9k

                                          Users

                                          40.6k

                                          Topics

                                          111.2k

                                          Posts
                                          • First post
                                            Last post