Posts

servlets - how to properly call a java function from a ftl file in ofbiz? -

i think have done necessary splicing me allow gui invoke java method. this ftl file process should start, on widget screens xml file , displaying contents i'm not sure of parameters used here proper call java class <form action="<@ofbizurl>methodtoinvoke</@ofbizurl>" method="post"> <input type="submit" value="id"></input> <input type="text" name="input"></input> </form> and code on controller <request-map uri="methodtoinvoke"> <security https="true" auth="true"/> <event type="java" path="com.report.someclass" invoke="methodtoinvoke"/> <response name="success" type="view" value="reports" /> <response name="error" type="view" value="reports" /> </request-map> when run application , hit b...

ios - animation on alert box -

i have alert box , apply below animation when "appears": scale 0.94 1.0 opacity 0 1 time 0.50ms x1: 0.48, y1: 0.44, x2: 0.01, y2: 1.2 can guide on how achieve in swift ? code: self.view.alpha = 0 uiview.animatewithduration(0.05, animations: { () -> void in self.view.alpha = 1.0 }, thanks. self.view.frame.origin = cgpoint(x: 0.48, y: 0.44) self.view.layer.transform = catransform3dmakescale(0.94, 0.94, 1) self.view.alpha = 0 uiview.animatewithduration(0.05, animations: { () -> void in self.view.layer.transform = cgaffinetransformidentity self.view.alpha = 1.0 self.view.frame.origin = cgpoint(x: 0.01, y: 1.2) self.view.layoutifneeded() })

How to customize the related videos that appears after the video stops in youtube ? -

is possible control(to show own list of video) related video thumbnails shown after video completed ? if create official "playlist" on youtube can control order of max 200 videos. you embed playlist-code list.

php - Uploading images inside array not working -

i want upload multiple images. img[] contains image files uploaded.the values inserted database imploded commas(,) .but images not uploaded specified folder named photos . <input type="file" name="img[]" id="img[]" /> $n=$_files["img"]["name"]; $t=$_files["img"]["tmp_name"]; $image=implode(",",$n); $ex=explode(",",$image); $i=0; foreach($ex $item) { move_uploaded_file($_files["img[$i]"]["tmp_name"],"photos/$ex[$i]"); $i++; } i think correct code should <input type="file" name="img[]" id="img[]" /> $n=$_files["img"]["name"]; $t=$_files["img"]["tmp_name"]; $image=implode(",",$n); // no need explode here foreach($n $key=>$item) { //name there in $items ...

perl to hardcode a static value in a field -

i still learning perl , have got program written. question, simple may be, if want hardcode string field below that? thank :). $out[45]="vus"; in other lines use below define values passed `$[out], 1 in question hardcoded , others come split. @vals = split/\t/; # splits line @ tabs @mutations=split/,/,$vals[9]; # splits on comma create array of mutations ($gene,$transcript,$exon,$coding,$aa); (@mutations) { ($gene,$transcript,$exon,$coding,$aa) = split/\:/; # takes col ab , splits @ colons grep {$transcript eq $_} keys %nms or next; } @out=($.,@colsleft,$_,@colsright); $out[2]=$gene; $out[3]=$nms{$transcript}; $out[4]=$transcript; $out[15]=$coding; $out[17]=$aa; your line of code: $out[45]="vus"; correct in defining 46th element of array @out string, "vus". trying understand code, why want that? usually, better practice not hardcode if @ possible. want make goal make program dyna...

ios - Error during storing values in plist file -

i have stepper, during change of value need store values in plist. so according saveappplist method need pass nsmutabledictionary changed file -> dictdata nsdata *plistdata = [nspropertylistserialization datafrompropertylist:dictdata format:nspropertylistxmlformat_v1_0 errordescription:&error]; if(plistdata) { [plistdata writetofile:plistpath atomically:yes]; } and here method stepper: -(void)changeitemquantityatrow:(int)row tovalue:(double)value { nsmutabledictionary *item = [[items objectatindex:row] mutablecopy]; [item setobject:[nsnumber numberwithdouble:value] forkey:@"quantity"]; [items setobject:item atindexedsubscript:row]; nslog(@"%@", items); nsmutabledictionary *plistdict = [nsdictionary dictionarywithobjects:items forkeys:[nsarray arraywithobjects:@"name", @"price", @"quantity", nil]]; nslog(@"%@", plistdict); [self saveappplist:plistdict]; }...

javascript - Hide comments from certain users? -

i'm using chrome extension web override few things , works great. right i'm trying hide comments users on stack overflow doesn't seem working. think it's way comments loaded. here javascript: $(function() { $('.comment-user:contains("devilsadvocate")').closest('.comment').hide(); }); if paste $('.comment-user:contains("devilsadvocate")').closest('.comment').hide(); console, hide comments, not when load page normally. one possible solution use mutationobserver() . this allow listen changes on comments section , react them accordingly. rough implementation can seen below. create observer , provide hide functionality hide of pertinent comments every time there mutation. then tell observer watch comments section of posts. i'm sure can write more jquery way of doing this. right cares first .comments section finds. listen child changes, attribute changes, , subtree changes well. var...