Posts

python - Brand new to scipy/numpy and attempting some batch manipulation -

python - Brand new to scipy/numpy and attempting some batch manipulation - so, have bunch of scanned images annoying white around them want remove. i'm prepping algorithm using numpy arrays find closest pixel row , columns of finish white, cropping them positions. code: from scipy import misc import os import datetime a0 = datetime.datetime.now() print("imported @ " + str(a0)) def run(): inputdir = '/users/nicholasezyk/documents/funeralhomescans' os.chdir(inputdir) #batch image renaming counter = 1 file in os.listdir(inputdir): if file.endswith('.jpg'): img = misc.imread(file) print(file + ' beingness analyzed.') cropx = -1 cropy = -1 lx = img.shape[0] ly = img.shape[1] countx = 0 county = 0 while countx < lx: pix = img[countx, 0] if pix == (255, 255, 255): ...

winapi - C++/Win32: How to wait for a pending delete to complete? -

winapi - C++/Win32: How to wait for a pending delete to complete? - solved: * workable solution: @sbi * explanation happens: @hans * explanation why openfile doesn't pass through "delete pending": @benjamin the problem: our software in big part interpreter engine proprietary scripting language. scripting language has ability create file, process it, , delete file. these separate operations, , no file handles kept open in between these operations. (i.e. during file create handle created, used writing, closed. during file processing portion, separate file handle opens file, reads it, , closed @ eof. , finally, delete uses ::deletefile has utilize of filename, not file handle @ all). recently we've come realize particular macro (script) fails able create file @ random subsequent time (i.e. succeeds during first hundred iterations of "create, process, delete", when comes creating hundred , first time, windows replies "access denied")....

How to show google video snippet in SERP without paid search? -

How to show google video snippet in SERP without paid search? - i have follow same construction http://www.dailymotion.com/ while dailymotion display not site. reason? video thumbnail not display on serp . mysite http://www.easywebvideo.com/ i have submit sitemap google.site map http://www.easywebvideo.com/video_sitemap/files/sitemap_1.xml i have follow same construction http://www.dailymotion.com/ while dailymotion display not site. reason? try seacrh "door knob hanger printing boone north carolina" in google. video google-search

javascript - Responsive Canvas in Bootstrap -

javascript - Responsive Canvas in Bootstrap - i'm trying responsive canvas. tests has been doing 600x600 canvas , height , width works ok , paint every line correctly. problem have tried this: #mycanvas { background-color: #ffffff; border:1px solid #000000; min-height: 600px; height: 100%; width: 100%; } just record, mycanvas within sm-col-8. and looks nice on laptop , looks nice on phone (because of draw() function, because thinking square) draw starts more in down-left corner (nearby) , should start @ up-right corner. so, don't want alter draw() function i'm looking reescale canvas size. mean: if i'm in laptop/tablet.. 600x600, show @ size, if i'm on phone has 384x640 show 300x300? don't know if solution. my draw function: function drawlines(lines,i,table,xtotal,ytotal){ var c = document.getelementbyid("mycanvas"); var ctx = c.getcontext("2d"); var xini; var xfin; var yini; ...

keylistener - Listening for input without focus in Java -

keylistener - Listening for input without focus in Java - i'm making little programme in java using robot class. programme takes on mouse. while in course of study of debugging if starts acting in way don't want it's hard quit program, since can't move mouse on terminate button in eclipse, , can't utilize hotkeys nail because mouse constant clicking in window, giving window focus instead. what i'd hook keylistener when nail q can quit program, way know how involves making window, , window needs focus capture input. there way hear keyboard or mouse input anywhere, regardless of has focus? this not trivial problem , java doesn't give way elegantly. can utilize solution banjollity suggested won't work time if errant mouse clicks open fullsized window open in taskbar example. the fact is, java default gives developers little command on os. due 2 main reasons: security (as citied java documentation) , fact different operating syste...

javascript - Swfobject video doesn't work in IE9 -

javascript - Swfobject video doesn't work in IE9 - i have such swfoject shows video in site. works fine @ browsers except ie 9. can problem? <script src='http://...js/swfobject.js'></script> <div id='video' style='width: 640px; height: 480px;'></div> <script > swfobject.embedswf('http://...js/swfobject.js', 'video', 640, 480, '10.3', 'false', {file:'cam210.0', streamer:'rtmp://1111111111.../1111111111', 'rtmp.tunneling':false, autostart:true}, {allowfullscreen : 'true', allownetworking : 'all'}); </script> update <iframe id='video' name='iframeanimfx' src='http://xmpp.feelinhome.ru:8080/flu/js/swfobject.js' height='600' width='900'></iframe...

What is the meaning of daimond bracket in java generics containg two types List<car> -

What is the meaning of daimond bracket in java generics containg two types List<car<u>> - whats list<car<u>> ?,what meaning of 2 parameters within list?am new generics , illustration code picked online...explain pls! package generics; import java.util.arraylist; import java.util.list; class car<t>{ private t t; public t gett() { homecoming t; } public void sett(t t) { this.t = t; } } public class carlist{ public static <u> void addcar(u u, list<car<u>> cars){ //whats list<car<u>>?,what meaning of 2 parameters within list? car<u> car=new car<>(); car.sett(u); //could expalin above code cars.add(car); } public static void main(string[] args) { arraylist<car<string>> carlist=new arraylist<>(); carlist.addcar("audi", carlist); } } first have @ auto class, al...