Posts

android - Memory leak by AttachInfo.mRootCallbacks reported by LeakCanary -

i'm using leakcanary library troubleshoot memory leak of activity. after fixing several issues got logcat output : com.mypackage.activities.myactivity has leaked: gc root com.mypackage.myview.mattachinfo references android.view.view$attachinfo.mrootcallbacks references android.view.viewrootimpl.mcontext leaks com.mypackage.activities.myactivity instance i have no idea reference mean. view keeping reference activity prevents being gced? when , how should handle it? i used eclipse memory analyze tool tool , found there no instances of activity alive. make sense? also opened issue canary. edit 1 : relevant implementation : public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { myview.interactioncallbacks interactioncallback = new interactioncallbackimplementation( mnewview = new myview(getactivity().getapplicationcontext(), layoutinflater li = (layoutinflater) getactivity().getapp...

sql - Alternative to case statement -

i need suggestions on writing sql query other using case statement in oracle.i have table named system_specs following data customer_id disk_space_allocated c001 44g c002 1300g c003 1503g c004 1780g i wrote following sql query using oracle case statement count of customer_id based on ranges disk_space_allocated select case when to_number(substr(disk_space_allocated,0,length(disk_space_allocated) -1 )) <= 300 '1-300' when to_number(substr(disk_space_allocated,0,length(disk_space_allocated) -1 )) <= 500 '300-500' when to_number(substr(disk_space_allocated,0,length(disk_space_allocated) -1 )) <= 700 '500-700' when to_number(substr(disk_space_allocated,0,length(disk_space_allocated) -1 )) <= 900 '700-900' else '900+' end diskallocated, count(*) number_of_customers system_specs group ...

ubuntu - java.lang.SecurityException: Expecting a sun.rmi.server.UnicastRef2 remote reference in stub -

Image
i trying connect remote java process running on different machine using jconsole tool on ubuntu machine. this how running java program in remote machine: sudo java -dcom.sun.management.jmxremote.port=51082 -dcom.sun.management.jmxremote.authenticate=false -dcom.sun.management.jmxremote.ssl=false -jar myfile.jar i running jconsole command on machine this: jconsole -debug -j-djava.util.logging.config.file=logging.properties this logging.properties file: handlers = java.util.logging.consolehandler sun.rmi.level=finest .level = info java.util.logging.consolehandler.level = finest java.util.logging.consolehandler.formatter = \ java.util.logging.simpleformatter // use finer or finest javax.management.remote.level - finest // verbose... javax.management.level = finest javax.management.remote.level = finer now on jconsle ui have given below properties: when click on connect button getting exception saying: finer: [javax.management.remote.rmi.rmic...

apache spark - How to move 1000 files to RDD's? -

i new in apache spark , need help. i have python script reading 6 tdms files (tdms() function) , building graph numerical data of each of them (graph() function). loop. want load 1000 such files , run script in parallels each one. want create rdd's files , apply function each file? how can it? can define number of nodes in spark? have tried making python list includes files need read, , run in loop read data file, create rdd, run graph function, , guess save it? or make file list rdd, , run map, lambda(for graph), each. if care parallel run, can keep loading data , make 1 big rdd, , call sc.parallelize. can either decide spark it, or can specify number want use calling sc.parallelize(data, ).

mysql - Changed phpmyadmin password on mac using AMPPs and now Can not login into phpmyadmin -

i've changed password of localhost user of ampps stack , can not log phpmyadmin shows pink message : access denied... , have tried restoring default configuration have same problem. i've checked config.inc file , it's content : <?php /* servers configuration */ $i = 0; /* server: localhost [1] */ $i++; $cfg['servers'][$i]['verbose'] = ''; $cfg['servers'][$i]['host'] = '127.0.0.1'; $cfg['servers'][$i]['port'] = ''; $cfg['servers'][$i]['socket'] = ''; $cfg['servers'][$i]['connect_type'] = 'tcp'; $cfg['servers'][$i]['extension'] = 'mysqli'; $cfg['servers'][$i]['auth_type'] = 'config'; $cfg['servers'][$i]['user'] = 'root'; $cfg['servers'][$i]['password'] = file_get_contents('/applications/ampps/ampps/data/my.conf'); $cfg['servers'][$i]['hide...

how to measure distance and centroid of moving object with Matlab stereo computer vision? -

which matlab functions or examples should used (1) track distance moving object stereo (binocular) cameras, , (2) track centroid (x,y,z) of moving objects, ideally in range of 0.6m 6m. cameras? i've used matlab example uses peopledetector function, becomes inaccurate when person within 2m. because begins clipping heads , legs. the first thing need deal with, in how detect object of interest (i suppose have resolved issue). there lot of approaches of how detect moving objects. if cameras stand in fix position can work 1 camera , use background subtraction objects appear in scene (some info here ). if cameras are moving, think best approach work optical flow of 2 cameras (instead use previous frame flow map, stereo pair images used optical flow map in each fame). in matlab, there option called disparity computation , try detect objects in scene, after need add stage extract objects of interest, can use thresholds. once have desired objects, need put them in binary ma...

Add static field to grouped data in Mongodb -

how add static field result using group operation in mongodb. query looks like: db.sales.aggregate({ $group : { _id: { year: { $year: '$date' }, }, amount: { $sum: 1 } } }); than result: { "result" : [ { "_id" : { "year" : 2013 }, "amount" : 43433 }, ... ] "ok" : 1 } i need add field called type value 'year' in each object of result. i need add project operation literal 'year'. query looks like: db.sales.aggregate([ { $group : { _id: { year: { $year: '$registrationdate' } }, amount: { $sum: 1 } }, }, { $project: { type: { $literal: 'year' }, } } ]);