Posts

css - position overlaying div within another div -

Image
i've got 'person' divs in 'main' div. on 'person':hover show overlaying div. want appear within 'main' div, not go beyond 'main's boundaries. way: when cursor on agch div when cursor on jalo div i want jack london's right border aligned main's right border. the complete example here: https://jsfiddle.net/yjdrnk9o/1/ html <div id="main"> <div class="person"> <span class="short-name">wish</span> <div class="more"> <span>william</span> <span>shakespeare</span> </div> </div> <div class="person"> <span class="short-name">agch</span> <div class="more"> <span>agatha</span> <span>christie</span> </div> ...

Orion refuses to start (location.coords_2dsphere index error) -

after upgrading orion 0.22.0 (applying the documented migration procedure ), orion refuses start, existing following message: info@10:51:50 contextbroker.cpp[1191]: connected mongo @ mongodb1:27017:orion terminate called after throwing instance of 'mongo::operationexception' what(): operationexception: { ok: 0.0, errmsg: "index name: location.coords_2dsphere exists different options", code: 85 } i'm using mongodb replica set database. the solution issue (which have been observed in replica set environments) remove location.coords_2dsphere index, i.e. executing following command in mongo shell (connected primary node): db.entities.dropindex({"location.coords": "2dsphere"}) in case of using orion in multiservice mode , have apply above command each 1 of tenant databases. orion re-create index next time starts.

xslt - Do not add comm if attribute is null -

i have string of code come delineate attribute of feature name. how ever if feature null still add comma. how code ignore feature name not have value. <xsl:for-each select="feature"> <!-- output feature name (there may more 1 feature associated --> <!-- point) identify feature attrinbutes --> <!-- associated with. --> <xsl:text>,</xsl:text> <!-- comma separate feature name code or previous feature --> <xsl:variable name="featname" select="@name"/> <!-- feature name --> <xsl:for-each select="attribute"> <xsl:if test="position() &gt; 0"> <xsl:text>,</xsl:text> <!-- include comma if not first attribute --> </xsl:if> <!-- prefix each attribute name feature belongs followed ':' --> <xsl:if test="$includefieldnames = 'yes'">...

android - Cordova plugin development - adding aar -

i new cordova plugin development stuff. want write plugin able open new android activty , showing advertisement. so followed simple tutorial here . works , expected. next step include android studio gradle project plugin. my first try: adding gradle project subfolder of cordova plugin , adding following line plugin.xml file: <framework src="libs/broper/build.gradle" custom="true" type="gradlereference" /> also tried: <framework src="libs/broper/app/build.gradle" custom="true" type="gradlereference" /> the graddle files recognised cordova. don't work. can't import classes of android studio project plugin java files. then better solution (i thought so) add aar instead. there don't have clue add aar in cordova plugin. so, question is: how add android atudio aroject (or library) cordova plugin right way? here's i've done use gradle reference cordova plugin, think might...

c++ - Invoking overload constructor within constructor -

i wondering either possible in c++ run constructor overload within constructor. know possible using regular methods. tryng do: class foo { public: foo(); foo(int val); }; foo::foo() { foo(1); } foo:foo(int val) { std::cout << val; } this doesnt compile me. trying create 2 constructors 1 witch takes parameter , 1 sets default (the void one). aprichiate help. class foo { public: foo(); foo(int val); }; foo::foo() : foo(1) { } foo:foo(int val) { std::cout << val; }

r - From longitude and latitude to cell number -

i have data frame this lonship latship lonint latint -179.94 -38.05 1 128 -179.93 -32.54 1 123 -179.93 -32.19 1 122 -179.93 -31.83 1 122 -179.92 -33.97 1 124 -179.92 -33.61 1 124 what want associate @ each (ordered) pair (lonint,latint) number identify grid cell. e.g. lonship latship lonint latint cell -179.94 -38.05 1 128 1 -179.93 -32.54 1 123 2 -179.93 -32.19 1 122 3 -179.93 -31.83 1 122 3 -179.92 -33.97 1 124 4 -179.92 -33.61 1 124 4 note that, example (1, 2) != (2,1), i.e. must have 2 different cell number. can help? if want ordered pairs need first order multiple columns: dat<-dat[order(dat$lonint,dat$latint,decreasing=f),] then can use simple formula concatenate 2 values. example, if max(latint)<1000 can do: gridint=dat$lonint*1000+dat$latint edit: well, first order not needed formula because ordering fo...

matplotlib - plot function in python -

i'm complete newbie python (this first post) have experience programming in r. i've been going through crash course in python scientists tutorial. i got far matplotlib bit-i havent been able go beyond plot function not recognized despite importing matplotlib . i'm using idle in python 2.7.3 (i'm using mac). here's i'm trying do: >>> import matplotlib >>> plot(range(20)) here's error message: # error message traceback (most recent call last): file "<pyshell#9>", line 1, in <module> plot(range(20)) nameerror: name 'plot' not defined can out @ all? know there loads of other editors use prefer similar r console can type directly command line. still haven't figured out short cut running code directly idle editor-my f5 key else , doesn't run when type it. plot function of matplotlib.pyplot , so: import matplotlib.pyplot plt plt.plot(range(20)) edit: to see plot, need ca...