/** * 去除重复数据 * @author Sunqinbo */ public class RemoveDuplicateData { public static void main(String[] args) { Integer[] a = new Integer[] { 1, 4, 5, 2, -6, 5, 9, 10, 10 }; Set<Integer> set = new HashSet<Integer>(); for (int i = 0; i < a.le
需求:删除station_id.ab_data_time.item_code_id.data_cycle.ab_value 字段重复的记录 #查询重复的数据 select b.id,b.station_id,b.ab_data_time,b.item_code_id,b.data_cycle,b.ab_lable,b.ab_value from d_abnormal_data_yyyymms b where (b.station_id,b.ab_data_time,b.item_code_id,
实例如下: using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; namespace 集合去除重复数据 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e
1.具体见注释 2.后续或有更新 public class MyArray { private long[] array; private int cnt; // 自定义数组类的元素个数 /** 使用自定义类封装数组,添加类方法实现数据操作 */ public MyArray() { array = new long[50]; } public MyArray(int size) { array = new long[size]; } /** 插入数据,返回值为空 */ public void