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 time | |
import random | |
import multiprocessing | |
# consumer class simulate the continuous data collection process | |
class Producer: | |
def __init__(self, queue): | |
super().__init__() | |
self.queue = queue |
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
BLOCK_PATTERN pattern[] = { | |
BLOCK_PATTERN.SMALL, BLOCK_PATTERN.SMALL, BLOCK_PATTERN.SMALL, BLOCK_PATTERN.SMALL, | |
BLOCK_PATTERN.SMALL, BLOCK_PATTERN.SMALL, BLOCK_PATTERN.SMALL, BLOCK_PATTERN.SMALL | |
}; |
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
class MainActivity extends Activity{ | |
@Bind(R.id.text_view_name) TextView mTextViewName; | |
@Override | |
public void onCreate(Bundle savedInstance){ | |
super.onCreate(savedInstance); | |
setContentView(R.layout.activity_main); | |
ButterKnife.bind(this); |