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
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()); | |
} |
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
sudo apt-get update && sudo apt-get dist-upgrade |
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
.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 |
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
http://square.github.io |
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
final View view=//smth; | |
... | |
view.post(new Runnable() { | |
@Override | |
public void run() { | |
view.getHeight(); //height is ready | |
} | |
}); |
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
xx |
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
MainActivity.java | |
package com.madinabektayeva.stepcounter; | |
import android.content.Context; | |
import android.hardware.*; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.TextView; | |
import android.widget.Toast; |
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
background.js : | |
if (!localStorage.isInitialized) { | |
localStorage.isInitialized = true; | |
localStorage.setItem('LatestDate', ''); | |
localStorage.setItem('currentWebsites', '{}'); | |
localStorage.setItem('backup',''); | |
} | |
console.log('hi'); |
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
Question: | |
I have to delete 2 last commits pushed to original repo, one of which is a merge commit. I want to delete changes in repo and keep them on my computer. | |
When I do | |
git revert -m 1 075cc2f | |
It adds a revert commit to my history of commits and my 075cc2f commit is still present there. | |
When I do | |
git push origin +HEAD^:master | |
commit is fully deleted from history. |
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
max_element(iter1, iter2) | |
min_element(iter1, iter2) | |
random_shuffle(iter1, iter2) | |
sort(iter1, iter2) | |
NewerOlder