Пример #1
0
 @Override
 protected void setup(Context context) throws IOException, InterruptedException {
   super.setup(context);
   filter =
       PcapFilters.valueOf(
               context.getConfiguration().get(PcapFilterConfigurator.PCAP_FILTER_NAME_CONF))
           .create();
   filter.configure(context.getConfiguration());
   start = Long.parseUnsignedLong(context.getConfiguration().get(START_TS_CONF));
   end = Long.parseUnsignedLong(context.getConfiguration().get(END_TS_CONF));
 }
Пример #2
0
  public static long sol2(long num) {
    // int bin = Integer.parseInt(Integer.toBinaryString(num));
    long bin2 = Long.parseLong(Long.toBinaryString(num));
    for (long i = 1; i <= bin2; i++) {
      String binary = Long.toBinaryString(i);
      System.out.println(Long.parseLong("-" + binary));
      if (Long.parseUnsignedLong(binary) % num == 0) return Long.parseLong(binary);
    }

    return 0;
  }
Пример #3
0
 private void initialize() {
   start = Long.parseUnsignedLong(configuration.get(START_TS_CONF));
   end = Long.parseUnsignedLong(configuration.get(END_TS_CONF));
   width = Long.parseLong(configuration.get(WIDTH_CONF));
 }