我必須保存用戶ID。我想強制保存用戶ID在長期偏好類型。什麼問題是如果服務器分配我22作爲用戶ID是整數類型。我通過它來優先保存。它保存在putInt方法下,因爲數字的長度很短。如果我檢索它說,整數不能被施放長時間。下面是保存用戶標識的prefrence util類中的重載方法。 public int read(String valueKey, int valueDefault) {
r
我有什麼用,而不是ToInt32,轉換長串號值「10000000001」爲整數,所以這種方式僅限於10位數字: string str1 = "1000000000";
string str2 = "1000000000";
int a = Convert.ToInt32(str1);
int b = Convert.ToInt32(str2);
int
比較: >>> import numpy; numpy.int32(-1) & 0xFFFFFFFF00000000
TypeError: ufunc 'bitwise_and' not supported for the input types, and the inputs
could not be safely coerced to any supported types accord
該方案適用於小的數字,但只要我有一個大的數量這樣它不工作 這裏是我的代碼 public class Main {
public static void main(String[] args) {
long no=600851475143L,i;
int result=0;
for(i=(no/2);i>=2;i--){
if(no%i