Posts

ghostdoc - How to document a file that is not in a solution? -

i have need document methods/functions in *.cpp code files not part of .net solution. until workaround has been create solution, time consuming step different files come across. does know how can accomplished? scott, unfortunately, workaround have use long ghostdoc relies on of information visual studio codedom... codedom not provide any info when open single file. do mind me asking if there particular reason opening single file in vs? other these might random files not part of solution? thanks!

reactjs - React Router: Call component function on RouteHandler ref -

i'm trying call component function on child component routehandler. var bar = react.createclass({ baz: function() { console.log('something'); }, render: function() { return <div />; }, }); var foo = react.createclass({ baz: function() { this.refs['ref'].baz(); }, render: function() { return <routehandler ref="ref" />; }, ); where routehandler bar this.refs['ref'].baz undefined . see https://facebook.github.io/react/tips/expose-component-functions.html more information on component functions. i don't believe react-router supports exposing component functions on routehandlers , current hacky workaround do: this.refs['ref'].refs['__routehandler__'].baz(); see https://github.com/rackt/react-router/issues/1597

java - Hibernate - fetch data from multple tables using many to one annotation -

i have 3 tables like: car carid|carname|carprice| 100|bmw|10l| 200|honda|5l| .. .. cartype cartypeid|type| 1|suv| 2|xuv| 3|sedan| carconfig carid|cartypeid| 100|3| 200|3| and have entities 3 tables. below have pasted code joining table carconfig : @entity @table(name = "carconfig", uniqueconstraints = { @uniqueconstraint(columnnames = { "carid" } ) }) public class carconfig { @id long carid; @onetoone @joincolumn(name = "carid", insertable = false, updatable = false) car car; @manytoone(optional = false) @joincolumn(name = "cartypeid") cartype cartype; public carconfig() { super(); } public carconfig(long carid, cartype cartype) { super(); this.cartype = cartype; this.carid = carid; } public car getcar() { return car; } public void setcar(car car) { this.car = car; } public cartype getcartype()...

wso2 - ArrayIndexOutOfBoundsException when adding a new API in wso2am -

i downloaded wso2am-1.9.0.zip macbook , expanded it. did not change of config or else. started bin/wso2server.sh, documented. seemed start successfully. able login api publisher admin/admin, documented. when tried add simple new api (just 1 endpoint) got following stacktrace: [2015-07-22 12:47:06,801] error - add:jag org.mozilla.javascript.wrappedexception: wrapped java.lang.arrayindexoutofboundsexception: 0 (/publisher/modules/api/add.jag#99) @ org.mozilla.javascript.context.throwasscriptruntimeex(context.java:1754) @ org.mozilla.javascript.memberbox.invoke(memberbox.java:148) @ org.mozilla.javascript.functionobject.call(functionobject.java:386) @ org.mozilla.javascript.optimizer.optruntime.call1(optruntime.java:32) @ org.jaggeryjs.rhino.publisher.modules.api.c3._c_anonymous_5(/publisher/modules/api/add.jag:99) @ org.jaggeryjs.rhino.publisher.modules.api.c3.call(/publisher/modules/api/add.jag) @ org.mozilla.javascript.scriptruntime.applyorcall(scriptr...

themes - Styling the application with android/style -

i trying style app using android:theme="@android:style/theme.holo" keep getting error @ runtime: java.lang.runtimeexception: unable start activity componentinfo{com.example.ghanghan.myapplication/com.example.ghanghan.myapplicat‌​ion.myactivity}: java.lang.illegalstateexception: need use theme.appcompat theme (or descendant) activity. i later discovered anytime use @android:style/ same error. is there sone library need import? note: minimum sdk set 19.

c# - Refactor dublicate methods with generics -

i have methods. how can refactor code have generic method? first method: void changeprojectname(datamodel datamodel) { foreach (project project in datamodel.projects) { string projectname = project.name; projectname = changename(projectname); project.name = projectname; } datamodel.submitchanges(); } second method: void changeemployeename(datamodel datamodel) { foreach (employee employee in datamodel.employees) { string employeename = employee.name; employeename = changename(employeename); employee.name = employeename; } datamodel.submitchanges(); } we must able t type collection appropriate property in model, must pass selection strategy it: void changename<t>(datamodel datamodel, func<datamodel, ienumerable<t>> selector) t : ihavename { foreach (t x in ...

scala - Is 'def eat():Unit = sleep(); def sleep(): Unit = eat()' a tail recursive function? -

two functions: def eat(): unit = sleep() def sleep(): unit = eat() both of them recursive functions, because called in body (indirectly), right? but tail recursive functions? both of them recursive functions, because called in body (indirectly), right? yes, called mutual recursion . but tail recursive functions? yes, are, call return value of body. however, afaik scala compiler not optimise these while loops, self-recursive functions. see does scala support tail recursion optimization? details, , how use tailcalls? workaround.