Map [1]
Operation | Time Complexity |
---|---|
Access | O(log n) |
Search | O(log n) |
Insertion | O(n) for <= 32 elements, O(log n) for > 32 elements [2] |
Deletion | O(n) for <= 32 elements, O(log n) for > 32 elements |
###################################################################### | |
## | |
## Feature Broker | |
## | |
###################################################################### | |
class FeatureBroker: | |
def __init__(self, allowReplace=False): | |
self.providers = {} | |
self.allowReplace = allowReplace |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
s.connect(("gmail.com",80)) | |
print(s.getsockname()[0]) | |
s.close() |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
sm = (SensorManager) getSystemService(SENSOR_SERVICE); | |
accell = sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); | |
setContentView(R.layout.activity_main); | |
xacc = (TextView) findViewById(R.id.xvalue); | |
yacc = (TextView) findViewById(R.id.yvalue); | |
zacc = (TextView) findViewById(R.id.zvalue); | |
std::vector<cv::Mat> planes; | |
cv::cvtColor(mat, sharp_mat, CV_BGR2HSV); | |
cv::split(sharp_mat, planes); | |
cv::equalizeHist(planes[2], planes[2]); | |
cv::merge(planes, sharp_mat); | |
cv::cvtColor(sharp_mat, mat, CV_HSV2BGR); |
// sharpen image using "unsharp mask" algorithm | |
Mat blurred; double sigma = 1, threshold = 5, amount = 1; | |
GaussianBlur(img, blurred, Size(), sigma, sigma); | |
Mat lowConstrastMask = abs(img - blurred) < threshold; | |
Mat sharpened = img*(1+amount) + blurred*(-amount); | |
img.copyTo(sharpened, lowContrastMask); |
#define VERSION "1.2.0 - development - COMMIT: $Revision: 17 $" |
svn propset svn:keywords 'Id Revision' target-source-file |
barcode -b 0401001702201100 -e 128 -u mm -g 50x20 -o teste |
import subprocess | |
def burn_data(self,PATH): | |
dir,file = (os.path.split(PATH)) | |
#unmount disc just in case (shouldn't be necessary for a blank disk) | |
p0 = Popen(["umount","/media/CDROM"],stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
#wait for unmount | |
p0.wait() | |
#create the isofs raw image to write to cd | |
p1 = Popen(["mkisofs","-R","-o","image.raw",PATH],stdout=subprocess.PIPE, stderr=subprocess.PIPE) |