Posts

class - How to compare two classes in vb.net? -

let's suppose have class this: class myclass(of template) 'some things here end class so far, good. however, things depending on template, like class myclass(of template) 'some things here public sub mymethod 'if template myotherclass ' things 'else ' other things 'end if end sub end class of course, give object , check whether typeof (obj) myotherclass , seems less intuitive me. there way compare 2 classes in vb.net? you compare type class myclass(of template) 'some things here public sub mymethod if gettype(template) gettype(myotherclass) things else other things end if end sub end class but seems bad thing do. point of oo have logic in it's respective class instead of doing this.

mysql - Difference between these sql queries -

i can't seem understand why these 2 queries return different results following task: "find names , grades of students have friends in same grade. return result sorted grade, name within each grade." tables here: https://lagunita.stanford.edu/c4x/db/sql/asset/socialdata.html the first query: select distinct h1.name, h1.grade highschooler h1, friend f, highschooler h2 h1.id = f.id1 , h2.id = f.id2 , h1.grade = h2.grade order h1.grade, h1.name the second query: select name, grade highschooler id not in ( select id1 highschooler h1, friend, highschooler h2 h1.id = friend.id1 , friend.id2 = h2.id , h1.grade <> h2.grade) order grade, name; the second 1 returns expected result, not first one. if cares clarify, thanks. the first query applies 3 filter in query simultaneously data in tables , returns entries matching filters. second query firstly subquery returns rows matching subquery condition , ids not there returned, includes ids h1.id =...

xslt 2.0 - How to implement saxon OutputURIResolver in Java? -

i new java. have similar scenario [ catch output stream of xsl result-document not understanding pass href , base parameter.. my xslt (result-document) follows: <xsl:template match="/" mode="create-text-file"> <xsl:param name="book-name" tunnel="yes"/> <xsl:result-document href="{$book-name}.xml" doctype-public=" test" doctype-system="test.dtd"> <xsl:apply-templates/> </xsl:result-document> </xsl:template> another: <xsl:result-document href="{$book-name}.opf" doctype-public="" doctype-system="" indent="yes"> <xsl:apply-templates mode="#current"/> </xsl:result-document> parameter book-name getting : <xsl:template match="d...

javascript - pause youtube video and show div with a form -

i have youtube video on website: <div id="video"> <iframe width="560" height="315" src="https://www.youtube.com/embed/some_video" frameborder="0" allowfullscreen></iframe> </div> after fixed time, want pause , ask user question overlaying form on video: <h1>how video far? </h1> <div id="question"> <form> <input type="radio" name="question" value="poor" checked>poor<br> <input type="radio" name="question" value="good">good<br> <input type="submit" value="submit"> </form> </div> what javascript code pause video after fixed period of time , css displaying form nicely? want mimic way lectures on coursera.org once looked like. tyr this: html: <div id="video"> ...

sorting - It is possible to sort by "valid" percentage in my data? -

Image
using tableau, have arranged data in 100.00% stacked bar: i want sort data descending (largest smallest) valid component type (green) - possbile? update (26th july 2017) merawalaid's answer worked; followed steps, adjusted code match specific project, , resulted in this: as can see, sorted, not quite should (for example, fourth , sixth rows featured high in chart. is there might wrong have missed here? i able this: you can download workbook here. advised though, feel there simpler way out there this. what did create 2 calculated fields. 'validcomponentcount': if ([component type]='valid component') 1 else 0 end '% of valid': {fixed [rootname] : sum([validcount])/count([number of records])} then sorted 'rootname' column based on descending value of 2nd calculated field (% of valid).

swift - Editor placeholder in source file -

following arkit tutorial https://www.youtube.com/watch?v=r8u8rgdmop4 but getting editor placeholder in source file error in following code (2nd line). has there been change in swift cause this? override func viewwillappear(_ animated: bool) { super.viewwillappear(animated) let configuration = arworldtrackingsessionconfiguration() sceneview.session.run(configuration) addobject() } there placeholder in file, meaning you'll see grey or blue block, that'll value, indicating need replace placeholder of value. the gray blocks in image placeholders. it possible xcode being idiotic, try cleaning project, run again.

java - Mylyn WikiText Extras won’t install in eclipse Oxygen, says Mylyn WikiText 3.0.6 is installed -

vogella suggests installing mylyn wikitext extras editing asciidoc. on (just installed) eclipse oxygen java ee, refuses install. according instructions , selected mylyn wikitext extras mylyn docs eclipse repository. eclipse says: cannot complete install because of conflicting dependency. software being installed: mylyn wikitext extras 3.0.14.201707112336 (org.eclipse.mylyn.wikitext.extras_feature.feature.group 3.0.14.201707112336) software installed: mylyn wikitext 3.0.6.201703111926 (org.eclipse.mylyn.wikitext_feature.feature.group 3.0.6.201703111926) 1 of following can installed @ once: mylyn wikitext tasks ui 3.0.6.201703111926 (org.eclipse.mylyn.wikitext.tasks.ui 3.0.6.201703111926) mylyn wikitext tasks ui 3.0.14.201707112336 (org.eclipse.mylyn.wikitext.tasks.ui 3.0.14.201707112336) cannot satisfy dependency: from: mylyn wikitext extras 3.0.14.201707112336 (org.eclipse.mylyn.wikitext.extras_feature.feature.group 3.0.14.201707112336) to: org.eclipse....