import numpy as np
import cv2
import mss
while True:
with mss.mss() as sct:
monitor = {'top': 150, 'left': 100, 'width': 1920, 'height': 1080}
img = np.array(sct.grab(monitor))
cv2.imshow("test", np.array(img))
if cv2.waitKey(25) & 0xFF == ord('q'):
cv2.destroyAllWindows()
break
JSONObject result_json = new JSONObject(result)
if (result_json.has("response")) {
setResponse(data.get("response"));
}
JSONObject groups_json = new JSONObject(result_json .get("groups").toString());
Iterator<String> iter = groups_json.keys();
while (iter.hasNext()) {
String key = (String) iter.next();
String value = groups_json.get(key).toString();
key - имя элемента ("id","name","screen_name"...)
value - значение элемента (163637512, "ღThe Rivera Dynastyღ", "ofrivera"...)
}
Intent NewActivityIntent;
NewActivityIntent = new Intent(MainActivity.this, NewActivity.class);
int items_count = 0;
for (int i = 0; i < item_List.size(); i++) {
String item_name = "item_" + items_count;
NewActivityIntent.putExtra(item_name, "Данные из массива под номером " + i);
items_count++;
}
NewActivityIntent.putExtra("items_count", items_count);
Bundle extras = getIntent().getExtras();
int items_count = extras.getInt("items_count");
for (int i = 0; i < items_count; i++) {
String string = "item_" + i;
String string_item = extras.getStringArray(string);
item_List.add(string_item );
}