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 class DetailFragment extends Fragment { | |
// public List<Step> step; | |
public ArrayList < Step > stepList; | |
public Step currentStep; | |
public ExoPlayer mExoPlayer; | |
public SimpleExoPlayerView mPlayerView; | |
public int position; | |
public String videoURL; | |
public Uri videoUri; | |
public TextView textView; |
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 class DetailFragment extends Fragment { | |
// public List<Step> step; | |
public ArrayList<Step> stepList; | |
public Step currentStep; | |
public ExoPlayer mExoPlayer; | |
public SimpleExoPlayerView mPlayerView; | |
public int position; | |
public String videoURL; | |
public Uri videoUri; | |
public TextView textView; |
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
try { | |
final Socket socket = serverSocket.accept(); | |
final boolean[] accept = { false }; | |
new Handler(Looper.getMainLooper()).post(() -> { | |
new AlertDialog.Builder(lobbyActivity) | |
.setTitle("Incoming Request") | |
.setMessage("Incoming Game Request") | |
.setPositiveButton(android.R.string.yes, (dialog, which) -> { | |
accept[0] = true; | |
try { |
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
syntax enable | |
colorscheme murphy | |
set expandtab | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
let mapleader = "\<Space>" | |
" VUNDLE START |
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 boolean isTreeBalanced(Node root) { | |
return (maxDepth(root) - minDepth(root)) <= 1; | |
} | |
public int maxDepth(Node root) { | |
if (root == null) { | |
return 0; | |
} | |
return 1 + Math.max(maxDepth(root.leftChild), maxDepth(root.rightChild)); | |
} |
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 static void paintFill(int[][] image, int x, int y, int oldColor, int newColor) { | |
if (x < 0 || x == image[0].length || y < 0 || y == image.length) { | |
return; | |
} | |
if (image[y][x] == oldColor) { | |
image[y][x] = newColor; | |
paintFill(image, x + 1, y, oldColor, newColor); | |
paintFill(image, x - 1, y, oldColor, newColor); |
NewerOlder