Skip to content

Instantly share code, notes, and snippets.

View MadinaB's full-sized avatar
we all shine in different ways

Madina MadinaB

we all shine in different ways
View GitHub Profile
@MadinaB
MadinaB / gist:1b71082babea80cad96bcfde66dc18b5
Created May 5, 2018 17:30
Getting height of a view in OnCreate()
final View view=//smth;
...
view.post(new Runnable() {
@Override
public void run() {
view.getHeight(); //height is ready
}
});
.gitignore file
To see the file in folder make 'ls a', to modify do 'vi .gitignore file'. Use this file to insert there full pathes and names of folders/files/objects you would not want to commit to the repo.
git init
To create a new, empty repository in the current directory
git status
Shows status of current repo
git log
sudo apt-get update && sudo apt-get dist-upgrade
@MadinaB
MadinaB / ConcurrentModificationException
Created January 6, 2019 17:59
ConcurrentModificationException
import java.util.*;
public class MyClass {
public static void main(String args[]) {
LinkedList<Integer> list = new LinkedList<>();
list.addFirst(1);
Iterator key = list.listIterator(0);
list.add(1);
System.out.println(key.next());
}