This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public V put(K key, V value) { | |
... | |
index = ~index; //NOT -1 = 0 | |
... | |
mHashes[index] = hash; | |
mArray[index<<1] = key; //XOR 1 == 0 | |
mArray[(index<<1)+1] = value; //XOR 1 + 1 == 1 | |
return null //previous value | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int indexOf(Object key, int hash) { | |
final int N = mSize; | |
// Important fast case: if nothing is in here, nothing to look for. | |
if (N == 0) { | |
return ~0; // NOT 0 will return -1 | |
} | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class TraceObject( | |
val hashMap: HashMap<Int, Value>, | |
val arrayMap: ArrayMap<Int, Value> | |
) | |
data class Value(val test: String) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@InjectViewState | |
public class PhotoPresenter extends BasePresenter<PhotoView> { | |
private Uri selectedImageUri; | |
@Inject | |
PhotoPresenter(Context applicationContext, RestApi restApi, PreferenceHelper preferenceHelper, RealmHelper realmHelper) { | |
super(applicationContext, restApi, preferenceHelper, realmHelper); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ввв |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D/OkHttp: --> POST https://api.limonapp.com/v2/files/sign/?type=audio&orig_name=file9146281325376003163.3gp&is_private=true | |
Content-Length: 0 | |
User-Agent: HUAWEI CLT-L29; 9 O_MR1; 0.0.54-debug | |
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxMDUwLCJ1c2VybmFtZSI6Ijc5MDk5NDY1NDY0IiwidXNlcl91dWlkIjoiYzZmZGI1NjMtMTI5OC00ZTMyLThlMjAtNjEyYTI2ODNmZTgxIiwiZXhwIjoxNTUzOTY0NjU4LCJvcmlnX2lhdCI6MTU1MTM3MjY1OH0.YT8S6IkeflGC8jM3E6Y5ZGX9F5hRPzO9KNPb-NBq0J0 | |
--> END POST (0-byte body) | |
D/ChatActivity$enablePaginate: --------isBottomReached-------- | |
D/ChatActivity$initEmoji: Keyboard close | |
D/OkHttp: <-- 500 https://api.limonapp.com/v2/files/sign/?type=audio&orig_name=file9146281325376003163.3gp&is_private=true (124ms) | |
server: nginx/1.15.8 | |
date: Thu, 28 Feb 2019 17:59:31 GMT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File file = new File(selectedImage.getPath()); | |
RequestBody body = RequestBody.create(MediaType.parse("image/*"), file); | |
restApi.imageEndpoint.upload(user.getToken(), body) | |
.observeOn(AndroidSchedulers.mainThread()) | |
.subscribeOn(Schedulers.io()) | |
.subscribe(this::successGetImageDTO, this::errorGetImageDto); | |
@Multipart | |
@POST("user/avatarUpload") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun ViewGroup.onKeyboardStateChanged(activity: Activity, listener: (Boolean) -> Unit) { | |
viewTreeObserver.addOnGlobalLayoutListener { | |
//Размер экрана | |
val screenSize = Point() | |
activity.windowManager.defaultDisplay.getSize(screenSize) | |
//Размер фрейма, который видит пользователь | |
val rect = Rect() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: ‘com.google.gms.google-services’ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"project_info": { | |
"project_number": "887654601522", | |
"firebase_url": "https://fir-test3-4bab3.firebaseio.com", | |
"project_id": "fir-test3-4bab3", | |
"storage_bucket": "fir-test3-4bab3.appspot.com" | |
}, | |
"client": [ | |
{ | |
"client_info": { |