- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
因此,我仍在学习Java,并尝试实现跳转搜索以在对象数组中基于no_resi查找数据。
我了解它做int数组时,但我仍然困惑如何使用对象数组。我已经尝试过使用它来做一些事情,但仍然无法摆脱它,或者我只是愚蠢。
在此先感谢您提供的任何帮助!
这是我的代码
JumpSearch.java
public class JumpSearch {
public static int jumpsearch(Pengiriman[] arrayPengiriman, int no_resi) {
int n = arrayPengiriman.length;
// Mencari ukuran blok untuk dilompati
int step = (int)Math.floor(Math.sqrt(n));
// Mencari blok tempat elemen berada
// present (kalau elemet present)
int prev = 0;
while (arrayPengiriman[1-Math.min(step, n)] < no_resi)
{
prev = step;
step += (int)Math.floor(Math.sqrt(n));
if (prev >= n)
return -1;
}
// Melakukan linear search untuk x di dalam blok
// dimulai dengan prev
while (arrayPengiriman[1-Math.min(step, n)] < no_resi)
{
prev++;
// Jika mencapai blok berikutnya atau akhir
// array, elemen tidak ada.
if (prev == Math.min(step, n))
return -1;
}
// Jika elemen ditemukan
if (arrayPengiriman[prev] == no_resi)
return prev;
return -1;
}
// Program untuk menguji fungsi
public static void main(String [ ] args)
{
Scanner scan = new Scanner(System.in);
System.out.println("|==============================================================================|");
System.out.println("| PROGRAM PENCARIAN DATA PENGIRIMAN BARANG DENGAN ALGORITMA JUMP SEARCH |");
System.out.println("|==============================================================================|");
System.out.println("|Kasus Mencari Data Pengiriman Dengan No.Resi Menggunakan Algoritma Jump Search|");
System.out.println("");
// Array untuk menampung nilai tiap Data
Pengiriman[] arrayPengiriman = new Pengiriman[16];
Pengiriman kirim1 = new Pengiriman (101101,"Adam Kamil","Jl.Anggrek","Bogor","Gunungbatu","16118");
Pengiriman kirim2 = new Pengiriman (101102,"Putra Mandala","Jl.Apel","Kerawang","Kerawang Barat","41311");
Pengiriman kirim3 = new Pengiriman (101103,"Mamat Sanusi","Jl.Merpati","Jakarta Selatan","Lenteng Agung","12610");
Pengiriman kirim4 = new Pengiriman (101104,"Kamila Akhwan","Jl.Kelapa","Bekasi","Bekasi Timur","17111");
Pengiriman kirim5 = new Pengiriman (101105,"Putra Iskandar","Jl.Anggrek 2","Bogor","Menteng","16111");
Pengiriman kirim6 = new Pengiriman (101106,"Nabila Putri","Jl.Merapi","Palu","Tatanga","94239");
Pengiriman kirim7 = new Pengiriman (101107,"Imam Satya","Jl.Pulau Nias","Manado","Bunaken","95231");
Pengiriman kirim8 = new Pengiriman (101108,"Robby Dermawan","Jl.Tajung Pura","Yogyakarta","Gondokusuman","55225");
Pengiriman kirim9 = new Pengiriman (101109,"Adrian Suta","Jl.Dewi Sartika","Banggai","Luwuk","94712");
Pengiriman kirim10= new Pengiriman (1011010,"Rizky Prima","Jl.Gunung Jati","Jayawijaya","Wamena","99511");
Pengiriman kirim11 = new Pengiriman (1011011,"Margareth Warouw","Jl.Sawit","Jakarta Timur","Cibubur","13720");
Pengiriman kirim12 = new Pengiriman (1011012,"Jeni Indira","Jl.Tuna","Bekasi","Bekasi Barat","17136");
Pengiriman kirim13 = new Pengiriman (1011013,"Asep Suratman","Jl.Palapa","Bogor","Margajaya","16116");
Pengiriman kirim14 = new Pengiriman (1011014,"Gigi Purnama","Jl.Keraton Atas","Bekasi","Setu","17320");
Pengiriman kirim15 = new Pengiriman (1011015,"Kamila Dewi","Jl.Dago Timur","Bandung","Coblong","40135");
Pengiriman kirim16 = new Pengiriman (1011016,"Desy Sambeta","Jl.Proklamasi","Surabaya","Wonocolo","60239");
//memasukan data mahasiswa ke dalam array
arrayPengiriman[0]=kirim1;
arrayPengiriman[1]=kirim2;
arrayPengiriman[2]=kirim3;
arrayPengiriman[3]=kirim4;
arrayPengiriman[4]=kirim5;
arrayPengiriman[5]=kirim6;
arrayPengiriman[6]=kirim7;
arrayPengiriman[7]=kirim8;
arrayPengiriman[8]=kirim9;
arrayPengiriman[9]=kirim10;
arrayPengiriman[10]=kirim11;
arrayPengiriman[11]=kirim12;
arrayPengiriman[12]=kirim13;
arrayPengiriman[13]=kirim14;
arrayPengiriman[14]=kirim15;
arrayPengiriman[15]=kirim16;
Pengiriman tampilPengiriman = new Pengiriman();
System.out.println("|==============================================================================|");
System.out.println("| DATA PENGIRIMAN |");
System.out.println("|==============================================================================|");
System.out.println("");
for(int i = 0; i < 16; i++){
//Menampilkan Array yang sudah disorting secara Ascending
tampilPengiriman = arrayPengiriman[i];
System.out.print(" "+(i+1)+". ");
System.out.print(tampilPengiriman.getNoResi()+" ");
System.out.print(tampilPengiriman.getNamaPengirim()+" ");
System.out.print(tampilPengiriman.getAlamatTujuan()+" ");
System.out.print(tampilPengiriman.getKotaTujuan()+" ");
System.out.print(tampilPengiriman.getKecamatanTujuan()+" ");
System.out.println(tampilPengiriman.getKodePosTujuan()+" ");
}
System.out.println("");
System.out.println("--------------------------------------------------------------------------------");
System.out.println("|==============================================================================|");
System.out.println("| CARI DATA PENGIRIMAN |");
System.out.println("|==============================================================================|");
System.out.println("");
//Memasukan 'noRes'
System.out.print("\n Masukkan No Resi yang ingin dicari datanya : ");
int no_resi = scan.nextInt();
// Mencari index dari 'x' dengan jump search
int index = jumpsearch(arrayPengiriman, no_resi);
System.out.println("");
System.out.println("--------------------------------------------------------------------------------");
System.out.println("|==============================================================================|");
System.out.println("| HASIL PENCARIAN DATA PENGIRIMAN |");
System.out.println("|==============================================================================|");
System.out.println("");
// Menampilkan index dimana 'x' ditemukan
if (no_resi != -1 && index != -1) {
System.out.println("\n Data pengiriman barang dengan" + no_resi +
" ditemukan di index ke " + index);
} else {
System.out.println("\n Data pengiriman dengan No Resi" + no_resi +
" tidak ditemukan");
}
System.out.println("|==============================================================================|");
}
}
public class Pengiriman{
private int no_resi;
private String nama_pengirim;
private String alamat_tujuan;
private String kota_tujuan;
private String kecamatan_tujuan;
private String kode_pos_tujuan;
public Pengiriman(){
this.no_resi = 0;
this.nama_pengirim = "";
this.alamat_tujuan = "";
this.kota_tujuan = "";
this.kecamatan_tujuan = "";
this.kode_pos_tujuan = "";
}
public Pengiriman(int no_resi,String nama_pengirim, String alamat_tujuan,
String kota_tujuan, String kecamatan_tujuan, String kode_pos_tujuan){
this.no_resi = no_resi;
this.nama_pengirim = nama_pengirim;
this.alamat_tujuan = alamat_tujuan;
this.kota_tujuan = kota_tujuan;
this.kecamatan_tujuan = kecamatan_tujuan;
this.kode_pos_tujuan = kode_pos_tujuan;
}
public int getNoResi() {
return no_resi;
}
public void setNoResi(int no_resi) {
this.no_resi = no_resi;
}
public String getNamaPengirim() {
return nama_pengirim;
}
public void setNamaPengirim (String nama_pengirim) {
this.nama_pengirim = nama_pengirim;
}
public String getAlamatTujuan() {
return alamat_tujuan;
}
public void setAlamatTujuan (String alamat_tujuan) {
this.alamat_tujuan = alamat_tujuan;
}
public String getKotaTujuan() {
return kota_tujuan;
}
public void setKotaTujuan (String kota_tujuan) {
this.kota_tujuan = kota_tujuan;
}
public String getKecamatanTujuan() {
return kecamatan_tujuan;
}
public void setKecamatanTujuan (String kecamatan_tujuan) {
this.kecamatan_tujuan = kecamatan_tujuan;
}
public String getKodePosTujuan(){
return kode_pos_tujuan;
}
public void setKodePosTujuan (String kode_pos_tujuan) {
this.kode_pos_tujuan = kode_pos_tujuan;
}
}
最佳答案
在大多数情况下,您的代码可以正常工作,但是这里需要注意一些小事情,还有其他需要考虑的事情。让我们从Pengiriman类开始。
在Pengiriman类中,您有一个典型的构造函数,该构造函数不接受任何参数,并且在该构造函数中,您将所有类成员变量的默认值设置为0或Null String(“”)。如果仅在声明的位置初始化变量,则可以消除此附加代码。每当创建新的Pengiriman实例时,这将使这些值成为默认值,例如:
public class Pengiriman{
private int no_resi = 0;
private String nama_pengirim = "";
private String alamat_tujuan = "";
private String kota_tujuan = "";
private String kecamatan_tujuan = "";
private String kode_pos_tujuan = "";
public Pengiriman(){ }
// .... Overloaded Contructor(s) ....
// .... Getters and Setters ....
// .... Nice to have a toString() method ....
}
Pengiriman p = new Pengiriman();
p.setNoResi(101109);
Pengiriman[] arrayPengiriman = new Pengiriman[16];
arrayPengiriman[0] = new Pengiriman(101101, "Adam Kamil", "Jl.Anggrek", "Bogor", "Gunungbatu", "16118");
arrayPengiriman[1] = new Pengiriman(101102, "Putra Mandala", "Jl.Apel", "Kerawang", "Kerawang Barat", "41311");
arrayPengiriman[2] = new Pengiriman(101103, "Mamat Sanusi", "Jl.Merpati", "Jakarta Selatan", "Lenteng Agung", "12610");
// ..... etc. .....
arrayPengiriman[0] = kirim1;
arrayPengiriman[1] = kirim2;
arrayPengiriman[2] = kirim3;
arrayPengiriman[3] = kirim4;
arrayPengiriman[4] = kirim5;
arrayPengiriman[5] = kirim6;
arrayPengiriman[6] = kirim7;
arrayPengiriman[7] = kirim8;
arrayPengiriman[8] = kirim9;
arrayPengiriman[9] = kirim10;
arrayPengiriman[10] = kirim11;
arrayPengiriman[11] = kirim12;
arrayPengiriman[12] = kirim13;
arrayPengiriman[13] = kirim14;
arrayPengiriman[14] = kirim15;
arrayPengiriman[15] = kirim16;
//Your class must start with:
public class Pengiriman implements Comparable<Pengiriman> {
// Sort by Receipt Number in 'Ascending Order'.
@Override
public int compareTo(Pengiriman comparePengiriman) {
int compareNoResi = comparePengiriman.getNoResi();
//ascending order
return this.no_resi - compareNoResi;
// If you want Descending order then use this instead:
// return compareNoResi - this.no_resi;
}
// Sort the Object Array
Arrays.sort(arrayPengiriman);
// Somewhere in the Pengiriman class:
@Override
public String toString() {
return no_resi + ", " + nama_pengirim + ", " + alamat_tujuan +
", " + kota_tujuan + ", " + kecamatan_tujuan + ", " +
kode_pos_tujuan;
}
System.out.println(arrayPengiriman[8].toString());
101109, Adrian Suta, Jl.Dewi Sartika, Banggai, Luwuk, 94712
// Sort the Object Array
Arrays.sort(arrayPengiriman);
System.out.println("|==============================================================================|");
System.out.println("| DATA PENGIRIMAN |");
System.out.println("|==============================================================================|");
System.out.println("");
// Displays the Sorted Array
for (int i = 0; i < 16; i++) {
System.out.print(" " + (i + 1) + ". " + arrayPengiriman[i].toString());
}
while (arrayPengiriman[1 - Math.min(step, n)] < no_resi) {
1 - Math.min(step, n)
。从1的值中减去
Math.min(step, n)
的值,换句话说就是
1 - (calculated index value)
。您认为最终会得到什么样的指数值?确实... ArrayIndexOutOfBoundsException!它应该是:从
Math.min(step, n)
减去1或换句话说
(calculated index value) - 1
:
while (arrayPengiriman[Math.min(step, n) - 1] < no_resi) {
while (arrayPengiriman[Math.min(step, n) - 1].getNoResi() < no_resi) {
String senderName = arrayPengiriman[12].getNamaPengirim();
while (arrayPengiriman[prev].getNoResi() < no_resi) {
if (arrayPengiriman[prev].getNoResi() == no_resi) {
return prev;
}
public class JumpSearch {
public static int jumpsearch(Pengiriman[] arrayPengiriman, int no_resi) {
int n = arrayPengiriman.length;
// Find the block size to skip
int step = (int) Math.floor(Math.sqrt(n));
// Finds the block where the element is located
// present (if element present)
int prev = 0;
while (arrayPengiriman[Math.min(step, n) - 1].getNoResi() < no_resi) {
prev = step;
step += (int) Math.floor(Math.sqrt(n));
if (prev >= n) {
return -1;
}
}
// Perform a linear search for x in blocks
// starts with prev
while (arrayPengiriman[prev].getNoResi() < no_resi) {
prev++;
// If you reach the next or last block
// array, missing element.
if (prev == Math.min(step, n)) {
return -1;
}
}
// If an element is found
if (arrayPengiriman[prev].getNoResi() == no_resi) {
return prev;
}
return -1;
}
// Program for functional testing
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("|==============================================================================|");
System.out.println("| PROGRAM PENCARIAN DATA PENGIRIMAN BARANG DENGAN ALGORITMA JUMP SEARCH |");
System.out.println("|==============================================================================|");
System.out.println("| Case Finding Shipping Data With Recession Using Jump Search Algorithm |");
System.out.println("");
// Array untuk menampung nilai tiap Data
Pengiriman[] arrayPengiriman = new Pengiriman[16];
arrayPengiriman[0] = new Pengiriman(101101, "Adam Kamil", "Jl.Anggrek", "Bogor", "Gunungbatu", "16118");
arrayPengiriman[1] = new Pengiriman(101102, "Putra Mandala", "Jl.Apel", "Kerawang", "Kerawang Barat", "41311");
arrayPengiriman[2] = new Pengiriman(101103, "Mamat Sanusi", "Jl.Merpati", "Jakarta Selatan", "Lenteng Agung", "12610");
arrayPengiriman[3] = new Pengiriman(101104, "Kamila Akhwan", "Jl.Kelapa", "Bekasi", "Bekasi Timur", "17111");
arrayPengiriman[4] = new Pengiriman(101105, "Putra Iskandar", "Jl.Anggrek 2", "Bogor", "Menteng", "16111");
arrayPengiriman[5] = new Pengiriman(101106, "Nabila Putri", "Jl.Merapi", "Palu", "Tatanga", "94239");
arrayPengiriman[6] = new Pengiriman(101107, "Imam Satya", "Jl.Pulau Nias", "Manado", "Bunaken", "95231");
arrayPengiriman[7] = new Pengiriman(101108, "Robby Dermawan", "Jl.Tajung Pura", "Yogyakarta", "Gondokusuman", "55225");
arrayPengiriman[8] = new Pengiriman(101109, "Adrian Suta", "Jl.Dewi Sartika", "Banggai", "Luwuk", "94712");
arrayPengiriman[9] = new Pengiriman(1011010, "Rizky Prima", "Jl.Gunung Jati", "Jayawijaya", "Wamena", "99511");
arrayPengiriman[10] = new Pengiriman(1011011, "Margareth Warouw", "Jl.Sawit", "Jakarta Timur", "Cibubur", "13720");
arrayPengiriman[11] = new Pengiriman(1011012, "Jeni Indira", "Jl.Tuna", "Bekasi", "Bekasi Barat", "17136");
arrayPengiriman[12] = new Pengiriman(1011013, "Asep Suratman", "Jl.Palapa", "Bogor", "Margajaya", "16116");
arrayPengiriman[13] = new Pengiriman(1011014, "Gigi Purnama", "Jl.Keraton Atas", "Bekasi", "Setu", "17320");
arrayPengiriman[14] = new Pengiriman(1011015, "Kamila Dewi", "Jl.Dago Timur", "Bandung", "Coblong", "40135");
arrayPengiriman[15] = new Pengiriman(1011016, "Desy Sambeta", "Jl.Proklamasi", "Surabaya", "Wonocolo", "60239");
// Sort the Object Array
Arrays.sort(arrayPengiriman);
System.out.println("|==============================================================================|");
System.out.println("| DATA PENGIRIMAN |");
System.out.println("|==============================================================================|");
System.out.println("");
// Displays the Ascending Sorted Array
for (int i = 0; i < 16; i++) {
System.out.println(" " + (i + 1) + ". " + arrayPengiriman[i].toString());
}
// Apply the Search Mechanism...
System.out.println("");
System.out.println("--------------------------------------------------------------------------------");
System.out.println("|==============================================================================|");
System.out.println("| SEARCH SHIPPING DATA |");
System.out.println("|==============================================================================|");
System.out.println("");
// Enter 'noRes'
System.out.print(" Enter the receipt number you want to search for: ");
int no_resi = scan.nextInt();
// Finding index of 'x' with jump search
int index = jumpsearch(arrayPengiriman, no_resi);
System.out.println("");
System.out.println("--------------------------------------------------------------------------------");
System.out.println("|==============================================================================|");
System.out.println("| RESULTS OF SHIPPING DATA RESULTS |");
System.out.println("|==============================================================================|");
System.out.println("");
// Displays the index where 'x' is found
if (no_resi != -1 && index != -1) {
System.out.println("Shipping data with " + no_resi
+ " found in index to " + index);
}
else {
System.out.println("Shipping data with Receipt No " + no_resi
+ " not found");
}
System.out.println("|==============================================================================|");
}
}
public class Pengiriman implements Comparable<Pengiriman> {
private int no_resi = 0;
private String nama_pengirim = "";
private String alamat_tujuan = "";
private String kota_tujuan = "";
private String kecamatan_tujuan = "";
private String kode_pos_tujuan = "";
public Pengiriman() { }
public Pengiriman(int no_resi, String nama_pengirim, String alamat_tujuan,
String kota_tujuan, String kecamatan_tujuan, String kode_pos_tujuan) {
this.no_resi = no_resi;
this.nama_pengirim = nama_pengirim;
this.alamat_tujuan = alamat_tujuan;
this.kota_tujuan = kota_tujuan;
this.kecamatan_tujuan = kecamatan_tujuan;
this.kode_pos_tujuan = kode_pos_tujuan;
}
public int getNoResi() {
return no_resi;
}
public void setNoResi(int no_resi) {
this.no_resi = no_resi;
}
public String getNamaPengirim() {
return nama_pengirim;
}
public void setNamaPengirim(String nama_pengirim) {
this.nama_pengirim = nama_pengirim;
}
public String getAlamatTujuan() {
return alamat_tujuan;
}
public void setAlamatTujuan(String alamat_tujuan) {
this.alamat_tujuan = alamat_tujuan;
}
public String getKotaTujuan() {
return kota_tujuan;
}
public void setKotaTujuan(String kota_tujuan) {
this.kota_tujuan = kota_tujuan;
}
public String getKecamatanTujuan() {
return kecamatan_tujuan;
}
public void setKecamatanTujuan(String kecamatan_tujuan) {
this.kecamatan_tujuan = kecamatan_tujuan;
}
public String getKodePosTujuan() {
return kode_pos_tujuan;
}
public void setKodePosTujuan(String kode_pos_tujuan) {
this.kode_pos_tujuan = kode_pos_tujuan;
}
@Override
public int compareTo(Pengiriman comparePengiriman) {
int compareNoResi = comparePengiriman.getNoResi();
//ascending order
return this.no_resi - compareNoResi;
// If you want Descending order then use this instead:
// return compareNoResi - this.no_resi;
}
@Override
public String toString() {
return no_resi + ", " + nama_pengirim + ", " + alamat_tujuan
+ ", " + kota_tujuan + ", " + kecamatan_tujuan + ", "
+ kode_pos_tujuan;
}
}
关于java - 如何在Java程序中实现对对象数组的跳转搜索?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58442046/
我有两个函数,在 C++ 中看起来像这样: void f1(...); void f2(...); 我可以更改 f1 的主体,但是 f2 是在另一个我无法更改的库中定义的。我绝对必须(尾部)在f1 中
我正在尝试避免这个 while 循环出了什么问题 while True: start = input("Ok, are you ready now?\n") if (start !=
当我点击按钮加载页面时,它加载正常。调整浏览器大小后,此页面会不断刷新。我复制了布局页面的一部分,用于处理按钮。如果我遗漏了什么,你能告诉我吗? Statistics 最佳答案 确保没有在“调
PHP的header函数 可以很少代码就能实现HTML代码中META 标签 这里只说用 header函数来做页面的跳转 1. HTML代码中页面的跳转的代码 HTML meta refresh 刷
我使用并喜欢 Tim Pope's excellent Fugitive plugin for VIM ,我一直希望能够加载 :Glog quickfix 中所有文件的差异,并通过它们循环到 HEAD
当我访问 my_site.com/page.php#something 时,滚动位置是携带此特定主题标签的元素之一,而不是页面顶部。 执行 window.scrollTo(0, 0); 不会改变这一事
在我自己的一个应用程序中看到这一点后,我构建了一个测试应用程序。 我在导航 Controller 中嵌入了一个集合 View 。 这一切都链接到 ViewController 类。 class Vie
在我们的应用程序中,当其中一个 View 被推送到导航 Controller 时,导航栏会显示 5 秒,然后我们将 navigationBarHidden 设置为 TRUE。稍后,如果用户点击屏幕,我
我必须更新滚动 UITextView 中的少量文本。我只会在光标当前所在的位置插入一个字符,并且只需按一下导航栏上的按钮即可执行此操作。 我的问题是,每当我调用 TextView 的setText方法
我正在使用第三方脚本(详细信息如下)将表单分解为多个 ajax 页面。当我单击前进到下一页时,它会跳转到表单顶部的 anchor 。这是一种不必要且不和谐的行为,我想阻止它发生。这个脚本不是我写的,不
这个问题已经有答案了: Call an absolute pointer in x86 machine code (2 个回答) 已关闭 4 年前。 我正在用 C 语言为 x86_64 linux 编
查看objdump -d ELFfile的输出,我无法区分直接和间接跳转/调用。有什么建议吗? 最佳答案 间接调用和跳转有*在指令之后和位置之前,如callq *%r13和jmpq *0x204d8a
我试图通过单击 anchor 链接来突出显示 div。我的意思是如果我点击My link 然后滚动到 here在此页面上,我有很多 anchor 链接和 div,因此很难识别哪个 div 然后滚动,因
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 已关闭 8 年前。 Improve this ques
没有任何编程经验,只有基本的 html/css。我正在尝试创建一个 javascript 菜单(如果有更简单的方法,可以接受建议吗?),它将根据第一个菜单中选择的选项显示/隐藏?我有以下... Q
我正在使用 jquery 的 scrollTop 函数,但无法弄清楚为什么在同一项目上多次调用时它会跳来跳去。 我把这个 example 放在一起了来说明问题。单击测试按钮时,它会交替滚动到指定的项目
我已经创建了一个关于 Storyboard的项目, Storyboard上有两个名为“loginViewController”、“BViewController”的 View Controller ,
基本上,我在网站的最顶部有一个我想隐藏的 div,当您单击一个按钮时,它会将整个网站向下推并显示其内容。与此非常相似 nd.edu (单击标题右侧的帮助中心或白杨站点)。我正在使用 jquery 来完
当我单击所单击的 div 旁边的 div 框时,我的底部 div 会上下跳跃 这是 fiddle 的链接 http://jsfiddle.net/abtPH/17/ 这是我的jquery $('li
我在悬停时调整 .main-partners div 中卡片的大小,以便出现 查看更多 按钮。 我的问题是当我 :hover 在 .main-partners 中的卡片 (.main-card) 上时
我是一名优秀的程序员,十分优秀!