better binary representation
This commit is contained in:
parent
05425c0d04
commit
157ed1f162
@ -30,7 +30,7 @@ public class MiningBean {
|
|||||||
String currency;
|
String currency;
|
||||||
String resultStr;
|
String resultStr;
|
||||||
String restRequest;
|
String restRequest;
|
||||||
int finished = 0;
|
int finished = 0b0;
|
||||||
|
|
||||||
public String updateAll(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
public String updateAll(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
|
SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
|
||||||
@ -105,7 +105,7 @@ public class MiningBean {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e.getMessage());
|
System.out.println(e.getMessage());
|
||||||
}
|
}
|
||||||
finished = finished | 1;
|
finished = finished | 0b1;
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ public class MiningBean {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e.getMessage());
|
System.out.println(e.getMessage());
|
||||||
}
|
}
|
||||||
finished = finished | 10;
|
finished = finished | 0b10;
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ public class MiningBean {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e.getMessage());
|
System.out.println(e.getMessage());
|
||||||
}
|
}
|
||||||
finished = finished | 100;
|
finished = finished | 0b100;
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
@ -307,7 +307,7 @@ public class MiningBean {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e.getMessage());
|
System.out.println(e.getMessage());
|
||||||
}
|
}
|
||||||
finished = finished | 1000;
|
finished = finished | 0b1000;
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
@ -339,7 +339,7 @@ public class MiningBean {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e.getMessage());
|
System.out.println(e.getMessage());
|
||||||
}
|
}
|
||||||
finished = finished | 10000;
|
finished = finished | 0b10000;
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
@ -429,7 +429,7 @@ public class MiningBean {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e.getMessage());
|
System.out.println(e.getMessage());
|
||||||
}
|
}
|
||||||
finished = finished | 100000;
|
finished = finished | 0b100000;
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
@ -474,16 +474,18 @@ public class MiningBean {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e.getMessage());
|
System.out.println(e.getMessage());
|
||||||
}
|
}
|
||||||
finished = finished | 1000000;
|
finished = finished | 0b1000000;
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
while (finished != 1042431) {
|
while (finished != 0b1111111) {
|
||||||
|
//System.out.println(Integer.toBinaryString(finished));
|
||||||
Thread.sleep(2000);
|
Thread.sleep(2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
finished = 0;
|
//System.out.println("Done: " + Integer.toBinaryString(finished));
|
||||||
|
finished = 0b0;
|
||||||
|
|
||||||
KeyValue wi = new KeyValue();
|
KeyValue wi = new KeyValue();
|
||||||
wi.setKey("Last Update");
|
wi.setKey("Last Update");
|
||||||
@ -540,7 +542,8 @@ public class MiningBean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getStringResponse(String urlStr) {
|
public String getStringResponse(String urlStr) {
|
||||||
return getStringResponse(urlStr, Constants.DEFAULT_HTTP_CONNECTION_TIMEOUT, Constants.DEFAULT_HTTP_READ_TIMEOUT);
|
return getStringResponse(urlStr, Constants.DEFAULT_HTTP_CONNECTION_TIMEOUT,
|
||||||
|
Constants.DEFAULT_HTTP_READ_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getStringResponse(String urlStr, int timeout, int readTimeout) {
|
public String getStringResponse(String urlStr, int timeout, int readTimeout) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user