- 한국어 번역(초벌): nacyot
- 같이 읽으면 좋은 문서들
This file contains hidden or 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
#!python3 | |
""" | |
Convert a requirements.txt file to a Poetry project. | |
Just place in the root of your working directory and run! | |
""" | |
sourceFile = "./requirements.txt" | |
import re | |
import os |
This file contains hidden or 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
//Based on the link: Why doesn't RecyclerView have onItemClickListener()? and How RecyclerView is different from Listview?, and also @Duncan's general idea, I give my solution here: | |
//define one interface 'RecyclerViewClickListener' for passing message from adapter to Activity/Fragment: | |
public interface RecyclerViewClickListener | |
{ | |
public void recyclerViewListClicked(View v, int position); | |
} | |
//In Activity/Fragment implement the interface, and also pass listener to adapter: | |
@Override |
This file contains hidden or 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 HashTable { | |
private static int INITIAL_SIZE = 16; | |
private HashEntry[] entries = new HashEntry[INITIAL_SIZE]; | |
public void put(String key, String value) { | |
int hash = getHash(key); | |
final HashEntry hashEntry = new HashEntry(key, value); | |
if(entries[hash] == null) { | |
entries[hash] = hashEntry; | |
} | |
// If there is already an entry at current hash |