Posts

Integrate a Java stand alone application to the Web -

i develop java applications eclipse process data. far developed stand alone applications take data file or database, process data, , output results console/file/database. i put application online. never did web development, understanding, difference code needs on web server can http requests users, , return http response based on application's result. i advice on easiest way can this. technology need learn , tools can use making transition easier. separate code code related web stuff. thanks lot! the simplest approach developing java web applications via servlet specification. lets load application servlet container (such jetty or tomcat), handles http-side invocation issue. servlet front-end front end agnostic processing application. since applications require user interface, take @ myraid of possible templating languages available. velocity safe pick. seperate user interface adapter code.

menu - jQuery Easing Tutorial -

i'm developing menu , need incorporate jquery easing effect sub menu. submenu horizontal dropline menu. here's html , css if you're interested in looking @ it. both not completed don't mind mess :) preview http://wilwaldon.com/easing/easingmenu.html i've googled didn't find total noobie myself. thank you! found asnwer cletus. superfish work perfect situation , easy implement using few simple css changes.

Python - Speed up generation of permutations of a list (and process of checking if permuations in Dict) -

i need faster way generate permutations of list, check if each 1 in dictionary. x in range (max_combo_len, 0, -1): possible_combos = [] permutations = list(itertools.permutations(bag,x)) item in permutations: possible_combos.append(" ".join(item)) #then check see if each possible combo in specific dict if helps, lists going lists of strings. ['such as', 'this', 'one'] my solution works, it's slow. need stop using python, thought i'd run experts first! best, gary i can't test without better input cases, here few improvements: for x in xrange(max_combo_len, 0, -1): possible_combos = (" ".join(item) item in itertools.permutations(bag,x)) #then check see if each possible combo in specific dict combos = (c c in possible_combos if c in specific_dict) first, assuming you're using python 2.x, xrange not constructing explicit ...

iphone - I do not know how to fix the leak -

how fix leak here? -(nsarray *)sectionindextitlesfortableview:(uitableview *)tableview { if(searching){ return nil; } nsmutablearray *temparray = [[nsmutablearray alloc] init]; [temparray addobject:uitableviewindexsearch]; [temparray addobject:@"a"]; [temparray addobject:@"b"]; [temparray addobject:@"c"]; [temparray addobject:@"d"]; [temparray addobject:@"e"]; [temparray addobject:@"f"]; [temparray addobject:@"g"]; [temparray addobject:@"h"]; [temparray addobject:@"i"]; [temparray addobject:@"j"]; [temparray addobject:@"k"]; [temparray addobject:@"l"]; [temparray addobject:@"m"]; [temparray addobject:@"n"]; [temparray addobject:@"o"]; [temparray addobject:@"p"]; [temparray addobject:@"q"]; [temparray addobject:@"r"]; [temparray addobject:@"s"]; [temparray addobject:@"t...

JavaScript Image Loading -

when click on button javascript function invoked , loads image in page. image not loading properly. image size 72kb , image coming db , it's loaded in server start. if put alert message image loads properly. what's reason behind issue? var catimg = document.getelementbyid(\"categorysampleimage\"); var oldimgsrc = catimg.src; var newimgsrc = oldimgsrc.substr(0,oldimgsrc.indexof(\"images\"))+\"images/\"+\""+imagename+"\"; catimg.src=newimgsrc; (var intcounter = 1; intcounter <= 500; intcounter++){ (var counter = 1; counter <= 500; counter++) { if(counter==500) break; } } document.getelementbyid(\"light\").style.display=\"block\"; document.getelementbyid(\"fade\").style.display=\"block\";"; code works fine browsers except ie6. in ie6 can see white area in place of image , need right clic...

c# - How to change modifier of a control to Static in Visual Studio -

when create control drag , drop vs automatically generate code this: public system.windows.forms.label label1; when want change modifier of control static, go form1.designer.cs , edit to: public static system.windows.forms.label label1; it's ok. when modify every control, vs automatically change origin :(. how change modify of control static ? sorry, im bad @ english :( code comment: public static void setlabelinfovisible(bool visible) { if (form1.labelinfo.invokerequired) { setlabelinfovisibledelegate del = new setlabelinfovisibledelegate(setlabelinfovisible); form1.labelinfo.invoke(del, new object[] { visible }); } else { form1.labelinfo.visible = visible; } } designer code not supposed user modified, gets re-written visual studio every time make changes form in designer (as have discovered). one way forward move control declaration , initialization non designer code file. however, means control ...

Image Processing on Android -

i'm writing application android. need make image processing on picture taken camera. use camera.picturecallback photo, , picture in byte array. problem want make operations on every pixel of photo (some filtering , other stuff) guess, have photo in byte array not bad idea. don't know how interpret information in byte array... way know make processing use bitmapfactory.decodebytearray() , use bitmap object. way handle lot of image processing? right use this: bitmap mphotopicture mphotopicture = bitmapfactory.decodebytearray(imagedata, 0 , imagedata.length); mphotopicture = mphotopicture.copy(bitmap.config.rgb_565, true); i appreciate help. i'm not sure if decoding byte array best way on android, can offer know image processing in general. if you're using rgb_565 , means each pixel 16 bits, or 2 of bytes. first 5 bits red, next 6 green, , last 5 blue. dealing hairy in java. suggest work easier format argb_8888 , mean have 32 bits, or 4 byt...