Posts

annotations - Using scala constants in constant expressions -

i have constants, made of other, smaller constants. example object myconstants { final val tablename = "table_name"; final val fieldname = "field_name"; final val indexname = tablename + "_" + fieldname + "_ix"; // 1 not want constant } i want these true constants because use them in annotations. how make work? (on scala 2.11) what want interface myconstants { string tablename = "table_name"; string fieldname = "field_name"; string indexname = tablename + "_" + fieldname + "_ix"; } but in scala. scalac not pick constants usage in annotations if compiles them java class/interface ( see si-5333 ) decided put them in scala object. works literals, , expressions literals, not expressions other constants. with code: import javax.persistence.entity import javax.persistence.table import org.hibernate.annotations.index object myconstants { final val tablename = "...

Memory leak when using package XML on Windows -

having read memory leaks parsing xml in r (including linked posts) , this post on r , given time has passed again, still think unresolved issue deserves attention xml package used throughout r universe. thus please consider follow post and/or reference informative yet concise illustration of problem . issue parsing xml/html documents in way can searched xpath afterwards requires internal use of c pointers (afaiu). , seems @ least on ms windows (i'm running on windows 8.1, 64 bit) these references not recognized garbage collector. consumed memory not released leads freeze of r process @ point. central findings far to me seems xml:free and/or gc does/do not recognize all memory involved when parsing xml/html docs via xmlparse or htmlparse , subsequently processing them xpathapply or like: the reported memory usage of os task (rterm.exe) adding significantly fast while reported memory of r process "seen within r" (function memory.size ) increases ...

Apache RewriteRule issue in .htaccess -

i have redirect permanently urls: http://www.example.com/?par=1248 (with , without www) to http://www.example.com using .htaccess file. the placeholders used above, "par" , "1248", (char(s), number(s), ..) this should work , redirect urls want: rewriteengine on rewritecond %{the_request} ^(get|post)\ /\?(.*)\ http rewriterule ^ /? [r=301,l]

c# - WPF TreeView Arrange Max Size -

Image
i have treeview inside of canvas. when treeviewitem collapsed, treeview shrinks. can explicitly set height , width, may vary number of items change. want treeview big possible. in other words, want treeview size if every treeviewitem expanded. here attempted when extending treeview, doesn't quite work. protected override size arrangeoverride(size arrangebounds) { if (this.actualheight > arrangebounds.height) { arrangebounds.height = this.actualheight; } if (this.actualwidth > arrangebounds.width) { arrangebounds.width = this.actualwidth; } return base.arrangeoverride(arrangebounds); } edit: i need treeview in canvas can pan , zoom around properly. here couple screen shots. notice how treeview isn't staying max size?? it's shrinking required size. horizontal alignment working if treeview still large. if remove arrangeoverride, items visible, treeview shr...

css - IE 8 does not keep sub menu open when hovering -

i have navigation menu on site, sub menu on 1 of links. sub menu shown when user hovers on parent level li element. on modern browsers works perfectly, in internet explorer 8 hovering on li shows sub menu, , hides try select of sub menus elements. means sub menu becomes unusable can't select on it. i've tried putting sub menu directly underneath li there can no gap between them causing problem persists. i've put code fiddle can see issue yourself. use embedded link view in ie 8. fiddle (source): http://jsfiddle.net/2gk5p/3/ embedded (best ie 8 compatibility): http://jsfiddle.net/2gk5p/3/embedded/result/ heres html: <ul> <li class="selected"><a href="#">home</a></li> <li><a href="#">services</a> <ul class="subnav-wrapper"> <span class="container block"> <span class="subnav"> ...

sprite kit - SKAction playSoundFileNamed from Singleton -

i have several levels using same sound effects. instead of having same code in every level, consolidated of sounds singleton class. however, having in singleton no sound played when run method other classes. have no errors or warnings. when have same code in each class have no problems playing sound. question: skaction playsoundfilenamed not work when called singleton or code missing something? my singleton header file... -(void)soundswordwhoosh; my singleton methods file... @implementation animations{ skaction *swordwhooshsound; } -(id)init { self = [super init]; if (self) { swordwhooshsound = [skaction playsoundfilenamed:@"swordwhoosh.mp3" waitforcompletion:yes]; } return self; } -(void)soundswordwhoosh { [self runaction:swordwhooshsound]; } i call method this: [_animations soundswordwhoosh]; your singleton not in node hierarchy (ie not child or grandchild etc of scene). hence can't run actions on self single...

Weird problems when submitting iOS app to Facebook review team -

fb team unable check facebook + ios app. every time send team (i tried 4 times), review finishes failure. either promo code not valid (i’m sure 100% working) or unable download binary attached submission form (its funny send me own internal url https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-frc3/t39.3826-6/10333114_442712309165103_1256335019_n.zip/myappname_232586603511009.zip ). i used without problems (after redesigned review forms) stuck it. me ? if sure promo code , binaries correct, can file bug here: https://developers.facebook.com/bugs/ you sure have no restrictions in place, such ip/domain checks, etc?