Posts

Featured post

Show multiple (2,3,4,…) images in the same window in OpenCV -

i want show 2, 3 or more images in same window. my problem how put second, third image on right side (above, left or upper) main image. i want create this, using opencv. --------------- | | | | | | --------------- | | | | | | --------------- thanks in advance jorge you can find answer on opencv wiki: http://code.opencv.org/projects/opencv/wiki/displaymanyimages :-)

c# - How to make a button that changes apperance on mouseover event? -

i creating windows forms application in visual studio 2010. need make button has different image changes on mouseover , mousedown events. i used this: public form1() { initializecomponent(); button1.mouseenter += new eventhandler(button1_mouseenter); button1.mouseleave += new eventhandler(button1_mouseleave); } void button1_mouseleave(object sender, eventargs e) { this.button1.backgroundimage = ((system.drawing.image)(properties.resources.img1)); } void button1_mouseenter(object sender, eventargs e) { this.button1.backgroundimage = ((system.drawing.image)(properties.resources.img2)); } i saved images in resources "img1" , "img2". however, not recognised. this.button1.backgroundimage = ((system.drawing.image)(properties.resources. img2 )); what put instead of "img2" in example ? how access image resources? button has bevel-border. ho

c# - Detect changes in ObjectSet in Entity Framework 4.0? -

i want check if there changes in table in ef 4.0 following code: var = context.users.gethashcode(); addnewuser(); context.savechanges(); var b = context.users.gethashcode(); a == b, don't know why? any helps appreciated! gethashcode has absolutelly different usage . can't detect changes in objectset because entry point related database table(s). can detect changes prepared in objectcontext before accept changes (default savechanges accept changes). changes objectcontext use: context.objectstatemanager.getobjectstateentries(...)

java - ImageIO.write() method and png -

why imageio.write(bufferedimage_dest,"png",new file(filedest)); writes jpg (without transparency colour) file instead png? added: static bufferedimage createresizedcopy(image originalimage, int scaledwidth, int scaledheight, boolean preservealpha) { system.out.println("resizing..."); int imagetype = preservealpha ? bufferedimage.type_int_rgb : bufferedimage.type_int_argb; bufferedimage scaledbi = new bufferedimage(scaledwidth, scaledheight, imagetype); graphics2d g = scaledbi.creategraphics(); if (preservealpha) { g.setcomposite(alphacomposite.src); } g.drawimage(originalimage, 0, 0, scaledwidth, scaledheight, null); g.dispose(); return scaledbi; } public static void scale(string src, int width, int height, string dest) throws ioexception { bufferedimage bsrc = imageio.read(new file(src)); bufferedimage bdest =

mysql - How to insert just year and month into date field? -

i have column called table_date using now() insert current date ( 2011-02-23 ). know can manipulate sql/php show me year , monthname. however, want know if it's possible insert table_date current date year-month 2011-02 ? thanks a date field going full date, , far know, required specify full date. it might easiest use 01 , 2011-02-01 february 2011. obviously, can format output of date field liking when querying it: select date_format(fieldname,"%y-%m");

iphone - YouTube-Video hidden by css not loading in MobileSafari -

on iphone-mobile-webseite in jquery-accordion there «video»-content-box embeded youtube-video [iframe]. if load page «video»-box 'open' youtube-video loading , displaing preview-image … but if load page boxes closed (display: none … accordion), mobilesafari load box, empty (but has right height/height has displayed video. on desktop-safari video load no matter if box visible or hidden (accordion) … short: on mobilesafari video shows if box visible start … :-/ the problem i've used iframe embed video … therefore mobilesafari had problem iframe. if use object/embed-code (the 'old' youtube-embed-code), whole thing works perfectly.

python - Does anyone know how to configure the hunpos wrapper class on nltk? -

i've tried following code , installed http://code.google.com/p/hunpos/downloads/list english-wsj-1.0 hunpos-1.0-linux.tgz i've extracted file onto '~/' directory and when tried following python code: import nltk nltk.tag import hunpos nltk.tag.hunpos import hunpostagger import os, sys, re, glob cwd = os.getcwd() infile in glob.glob(os.path.join(cwd, '*.txt')): (path, filename) = os.path.split(infile) read = open(infile) ht = hunpostagger('english.model') ht.tag(read.readline()) i following error traceback (most recent call last): file "<stdin>", line 4, in <module> file "/usr/local/lib/python2.6/dist-packages/nltk-2.0b9-py2.6.egg/nltk/tag/hunpos.py", line 46, in __init__ verbose=verbose) file "/usr/local/lib/python2.6/dist-packages/nltk-2.0b9-py2.6.egg/nltk/internals.py", line 503, in find_binary raise lookuperror('\n\n%s\n%s\n%s' % (div, msg, div