tag:blogger.com,1999:blog-59580268259395785302024-02-08T16:16:57.120+02:00Alexey ZavizionovAlexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.comBlogger432125tag:blogger.com,1999:blog-5958026825939578530.post-57494469691592519872020-03-12T16:28:00.001+02:002020-03-12T16:28:19.598+02:00Почему синие или голубые самолёты на флайтрадаре<br />
Синий/голубой цвет значит что трекинг самолёта идёт через спутник.<br />
<br />
<a href="https://www.flightradar24.com/">https://www.flightradar24.com/</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-DcqnmSW8URM/XmpG55r6kVI/AAAAAAAADxc/lMqjwg3lWloJoHWup-Z6LeaOyPsR5wTKQCNcBGAsYHQ/s1600/flight.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="428" data-original-width="815" height="336" src="https://1.bp.blogspot.com/-DcqnmSW8URM/XmpG55r6kVI/AAAAAAAADxc/lMqjwg3lWloJoHWup-Z6LeaOyPsR5wTKQCNcBGAsYHQ/s640/flight.png" width="640" /></a></div>
<br />
<h3 style="background-color: white; border-bottom-color: initial; border-bottom-style: initial; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: initial; border-right-style: initial; border-top-color: rgb(224, 224, 224); border-top-style: solid; border-width: 1px 0px 0px; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 1.05em; line-height: 1.1; margin: 20px 0px 0.5em; padding: 1.4em 0px 0px; text-shadow: none;">
Why are some aircraft shown as blue on the map?</h3>
<div style="background-color: white; border: 0px; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 10px; padding: 0px;">
Aircraft displayed as blue icons are currently being tracked via satellite. Satellites are collecting the ADS-B signals from aircraft and transmitting them to the Flightradar24 network. Space-based ADS-B tracking will be used to supplement our terrestrial receiver network.</div>
<div style="background-color: white; border: 0px; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 10px; padding: 0px;">
<br /></div>
<div style="background-color: white; border: 0px; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 10px; padding: 0px;">
<a href="https://www.flightradar24.com/faq">https://www.flightradar24.com/faq</a></div>
<div style="background-color: white; border: 0px; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 10px; padding: 0px;">
<br /></div>
<div style="background-color: white; border: 0px; box-sizing: border-box; color: #333333; font-family: "Open Sans", sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 10px; padding: 0px;">
<br /></div>
<div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-27511505312932446812019-10-03T14:39:00.000+03:002019-10-03T14:39:47.007+03:00Mongodb aggregate: convert date to another timezoneMongo version 3.6 timezone operator in dateToString<br />
<br />
Mongo version 3.4 DateToString and Add:<br />
<br />
project()<br />
.and(DateOperators.DateToString.dateOf(ArithmeticOperators.Add.valueOf(DATE).add(offsetMilliseconds))<br />
.toString("%Y-%m-%d")).as(DATE_DAYS);<br />
<div>
<br /></div>
<br />
"dateDays": {<br />
<span style="white-space: pre;"> </span>"$dateToString": {<br />
<span style="white-space: pre;"> </span>"format": "%Y-%m-%d",<br />
<span style="white-space: pre;"> </span>"date": {<br />
<span style="white-space: pre;"> </span>"$add": ["$date", -36000000]<br />
<span style="white-space: pre;"> </span>}<br />
<span style="white-space: pre;"> </span>}<br />
}<br />
<div>
<br /></div>
<div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-27699677544437991892019-10-02T10:59:00.000+03:002019-10-02T14:29:14.277+03:00mongodb download 3.6 and 3.4<a href="https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.6.14.zip">https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.6.14.zip</a><br />
<br />
<a href="https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-3.4.23.zip">https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-3.4.23.zip</a><br />
<br />
<a href="https://www.mongodb.org/dl/win32/">https://www.mongodb.org/dl/win32/</a><br />
<br /><div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-32740461559543653902019-07-17T11:10:00.000+03:002019-07-17T11:10:09.588+03:00Totalcommander search exact filenameTotal Commander how to search exact filename:<br />
<br />
use dot sign at the end<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-ZiPWS5ucIz8/XS7XeBVO1dI/AAAAAAAADsE/Ct5yDuDOKpERWVt1qpmFAgocYtVTO0x4gCLcBGAs/s1600/dot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="315" data-original-width="390" height="258" src="https://1.bp.blogspot.com/-ZiPWS5ucIz8/XS7XeBVO1dI/AAAAAAAADsE/Ct5yDuDOKpERWVt1qpmFAgocYtVTO0x4gCLcBGAs/s320/dot.png" width="320" /></a></div>
<br /><div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-54981140079346345722019-04-01T14:55:00.000+03:002019-04-01T14:55:19.378+03:00Сравнение лед лент (LED comparison)<div class="separator" style="clear: both; text-align: left;">
<a href="http://led-lenta.com.ua/">Led-lenta.com.ua</a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-TNgcXglTbgE/XKH7qYgv1xI/AAAAAAAADnI/mDsOjRVrKVkGkXqNvLmc_K5mQLa0jM6fACLcBGAs/s1600/led.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="574" data-original-width="878" height="418" src="https://4.bp.blogspot.com/-TNgcXglTbgE/XKH7qYgv1xI/AAAAAAAADnI/mDsOjRVrKVkGkXqNvLmc_K5mQLa0jM6fACLcBGAs/s640/led.png" width="640" /></a></div>
<br /><div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-88059203877913383692019-03-28T13:04:00.001+02:002019-03-28T13:04:24.921+02:00<div class="separator" style="clear: both; text-align: left;">
PROBLEM: Karaf restarting bundles twice at startup with logs:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both;">
BlueprintExtender Starting BlueprintContainer destruction process for bundle</div>
<div class="separator" style="clear: both;">
LifecycleManager Closing application context OsgiBundleXmlApplicationContext</div>
<div class="separator" style="clear: both;">
DependencyWaiterApplicationContextExecutor Shutting down normally appCtx OsgiBundleXmlApplicationContext</div>
<div class="separator" style="clear: both;">
OsgiBundleXmlApplicationContext Unpublishing application context OSGi service for bundle</div>
<div class="separator" style="clear: both;">
DefaultListableBeanFactory Destroying singletons in </div>
<div class="separator" style="clear: both;">
OsgiServiceFactoryBean Unregistered service </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
SOLUTION:</div>
<div class="separator" style="clear: both; text-align: left;">
Remove versions in manifest file. A specially for jackson.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-frRghIhxS1g/XJypuD7ppJI/AAAAAAAADms/NjFkYxEIPagwHJXOvXF2jan1aol78NxSwCLcBGAs/s1600/jackson.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="374" data-original-width="691" height="216" src="https://1.bp.blogspot.com/-frRghIhxS1g/XJypuD7ppJI/AAAAAAAADms/NjFkYxEIPagwHJXOvXF2jan1aol78NxSwCLcBGAs/s400/jackson.png" width="400" /></a></div>
<br /><div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-17303477885969125602019-03-15T15:53:00.003+02:002019-03-15T15:53:52.009+02:00Как выделить текст на сайте - отмена блокировки мышки<blockquote class="tr_bq">
<pre class="default prettyprint prettyprinted" style="background-color: #eff0f1; border-radius: 3px; border: 0px; box-sizing: inherit; color: #393318; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px 8px; vertical-align: baseline; width: auto;"><code style="border: 0px; box-sizing: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"><span class="pln" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">javascript</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">:(</span><span class="kwd" style="border: 0px; box-sizing: inherit; color: #101094; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">function</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">(){</span><span class="kwd" style="border: 0px; box-sizing: inherit; color: #101094; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">function</span><span class="pln" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> ats</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">(){</span><span class="kwd" style="border: 0px; box-sizing: inherit; color: #101094; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">var</span><span class="pln" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> styles</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="str" style="border: 0px; box-sizing: inherit; color: #7d2727; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">'*,p,div{user-select:text !important;-moz-user-select:text !important;-webkit-user-select:text !important;}'</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">;</span><span class="pln" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">jQuery</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="str" style="border: 0px; box-sizing: inherit; color: #7d2727; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">'head'</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">).</span><span class="pln" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">append</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="pln" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">jQuery</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="str" style="border: 0px; box-sizing: inherit; color: #7d2727; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">'<style>'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">).</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">html</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">styles</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">));</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(16, 16, 148);">var</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);"> allowNormal</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">=</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(16, 16, 148);">function</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(){</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(16, 16, 148);">return</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);"> </span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(16, 16, 148);">true</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">;};</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">jQuery</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">'*[onselectstart], *[ondragstart], *[oncontextmenu], #songLyricsDiv'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">).</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">unbind</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">'contextmenu'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">).</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">unbind</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">'selectstart'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">).</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">unbind</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">'dragstart'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">).</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">unbind</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">'mousedown'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">).</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">unbind</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">'mouseup'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">).</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">unbind</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">'click'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">).</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">attr</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">'onselectstart'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">allowNormal</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">).</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">attr</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">'oncontextmenu'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">allowNormal</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">).</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">attr</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">'ondragstart'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">allowNormal</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">);}</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(16, 16, 148);">function</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);"> atswp</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(){</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(16, 16, 148);">if</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">window</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">jQuery</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">){</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">ats</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">();}</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(16, 16, 148);">else</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">{</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">window</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">setTimeout</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">atswp</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">,</span><span class="lit" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">100</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">);}}</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(16, 16, 148);">if</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">window</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">jQuery</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">){</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">ats</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">();}</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(16, 16, 148);">else</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">{</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(16, 16, 148);">var</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);"> s</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">document</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">createElement</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">'script'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">);</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">s</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">setAttribute</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">'src'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">,</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">'http://code.jquery.com/jquery-1.9.1.min.js'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">);</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">document</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">getElementsByTagName</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">'body'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">)[</span><span class="lit" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">0</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">].</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">appendChild</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">s</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">);</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">atswp</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">();}})();</span></code></pre>
</blockquote>
</style></span></code></pre>
</blockquote>
<div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-19348077675300297072018-12-14T13:11:00.002+02:002018-12-14T13:11:34.911+02:00Print linux memory every 30 seconds, half a minute while true; do cat /proc/meminfo | grep MemFree ; sleep 30; done<br />
<br /><div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-6586301965653510022018-11-09T12:36:00.001+02:002018-11-12T19:27:52.095+02:00CodecConfigurationException in mongo-java-driver when using $elemMatch in $all<br />
<a href="https://stackoverflow.com/questions/53223909/codecconfigurationexception-in-mongo-java-driver-when-using-elemmatch-in-all">https://stackoverflow.com/questions/53223909/codecconfigurationexception-in-mongo-java-driver-when-using-elemmatch-in-all</a><br />
<br />
<a href="https://groups.google.com/forum/#!forum/mongodb-user">https://groups.google.com/forum/#!forum/mongodb-user</a><br />
<br />
<br />
<div style="background-color: white; border: 0px; box-sizing: inherit; clear: both; color: #242729; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Who has the same error and how to fix it?</div>
<div class="post-text" itemprop="text" style="background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.3; margin: 0px 0px 5px; overflow-wrap: break-word; padding: 0px; vertical-align: baseline; width: 666px;">
<div style="border: 0px; box-sizing: inherit; clear: both; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Java code:</div>
<pre style="background-color: #eff0f1; border: 0px; box-sizing: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;"><code style="border: 0px; box-sizing: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;">// For simplify code I left one criteria elemMatch in all criteria.
Criteria expectedCriteria = Criteria.where("tags").all(new Criteria().elemMatch(Criteria.where("localization").is("EN")));
String json = expectedCriteria.getCriteriaObject().toJson();
</code></pre>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-3FkHTV1qAuk/W-Viu5Miw5I/AAAAAAAADjs/xb3FxzWkG8IC0M5H8Qcs_MM2UhoM1JKigCLcBGAs/s1600/allElemMatch-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="769" data-original-width="1094" height="448" src="https://3.bp.blogspot.com/-3FkHTV1qAuk/W-Viu5Miw5I/AAAAAAAADjs/xb3FxzWkG8IC0M5H8Qcs_MM2UhoM1JKigCLcBGAs/s640/allElemMatch-2.png" width="640" /></a></div>
<div style="border: 0px; box-sizing: inherit; clear: both; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
<br /></div>
<div style="border: 0px; box-sizing: inherit; clear: both; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
<br /></div>
<div style="border: 0px; box-sizing: inherit; clear: both; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Exception:</div>
<pre style="background-color: #eff0f1; border: 0px; box-sizing: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;"><code style="border: 0px; box-sizing: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;">Exception in thread "main" org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class org.springframework.data.mongodb.core.query.Criteria.
at org.bson.codecs.configuration.CodecCache.getOrThrow(CodecCache.java:46)
at org.bson.codecs.configuration.ProvidersCodecRegistry.get(ProvidersCodecRegistry.java:63)
at org.bson.codecs.configuration.ProvidersCodecRegistry.get(ProvidersCodecRegistry.java:37)
at org.bson.codecs.DocumentCodec.writeValue(DocumentCodec.java:184)
at org.bson.codecs.DocumentCodec.writeIterable(DocumentCodec.java:207)
at org.bson.codecs.DocumentCodec.writeValue(DocumentCodec.java:180)
at org.bson.codecs.DocumentCodec.writeMap(DocumentCodec.java:199)
at org.bson.codecs.DocumentCodec.writeValue(DocumentCodec.java:182)
at org.bson.codecs.DocumentCodec.writeMap(DocumentCodec.java:199)
at org.bson.codecs.DocumentCodec.encode(DocumentCodec.java:141)
at org.bson.codecs.DocumentCodec.encode(DocumentCodec.java:45)
at org.bson.Document.toJson(Document.java:313)
at org.bson.Document.toJson(Document.java:286)
at org.bson.Document.toJson(Document.java:273)
</code></pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-LPW6D30fffU/W-Viu1myXDI/AAAAAAAADjw/iar4pQ0y2fUPAbcTTCT67RPM8Em5MKKPgCEwYBhgL/s1600/allElemMatch-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="766" data-original-width="1542" height="316" src="https://4.bp.blogspot.com/-LPW6D30fffU/W-Viu1myXDI/AAAAAAAADjw/iar4pQ0y2fUPAbcTTCT67RPM8Em5MKKPgCEwYBhgL/s640/allElemMatch-3.png" width="640" /></a></div>
<div style="border: 0px; box-sizing: inherit; clear: both; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
<br /></div>
<div style="border: 0px; box-sizing: inherit; clear: both; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Documentation: <a href="https://docs.mongodb.com/manual/reference/operator/query/all/#use-all-with-elemmatch" rel="nofollow noreferrer" style="border: 0px; box-sizing: inherit; color: #005999; cursor: pointer; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">https://docs.mongodb.com/manual/reference/operator/query/all/#use-all-with-elemmatch</a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-yjPtFp7d_bU/W-Viu_F7sZI/AAAAAAAADjo/QbSIj2lvxNU-NCejnu4fBvTTtVZ7gXqggCEwYBhgL/s1600/allElemMatch-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="999" data-original-width="1454" height="272" src="https://1.bp.blogspot.com/-yjPtFp7d_bU/W-Viu_F7sZI/AAAAAAAADjo/QbSIj2lvxNU-NCejnu4fBvTTtVZ7gXqggCEwYBhgL/s400/allElemMatch-1.png" width="400" /></a></div>
<div style="border: 0px; box-sizing: inherit; clear: both; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
<br /></div>
<div style="border: 0px; box-sizing: inherit; clear: both; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Version of mongo-java-driver in reproduce: (in all) - 3.4.3 - 3.5.0 - 3.6.4 - 3.7.1 - 3.8.2 - 3.9.0</div>
<div style="border: 0px; box-sizing: inherit; clear: both; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Mongo DB script which works for code:</div>
<pre style="background-color: #eff0f1; border: 0px; box-sizing: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;"><code style="border: 0px; box-sizing: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;">db.getCollection('devices').find({
"tags": {
"$all": [{
"$elemMatch": {
"key": "localization",
"value": {
"$eq": "EN"
}
}
}
]
}
})
</code></pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-jY63fMQIrtQ/W-VivuuLffI/AAAAAAAADj0/NxlqI_HgqhUprAPajQEL7HurDsSk4sKSACEwYBhgL/s1600/allElemMatch-4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="646" data-original-width="710" height="362" src="https://3.bp.blogspot.com/-jY63fMQIrtQ/W-VivuuLffI/AAAAAAAADj0/NxlqI_HgqhUprAPajQEL7HurDsSk4sKSACEwYBhgL/s400/allElemMatch-4.png" width="400" /></a></div>
</div>
<div class="post-taglist grid gs4 gsy fd-column" style="background-color: white; border: 0px; box-sizing: inherit; clear: both; color: #242729; display: flex; flex-direction: column !important; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: -2px 0px 10px; padding: 0px; vertical-align: baseline;">
<div class="grid ps-relative d-block" style="border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 2px 0px; padding: 0px; position: relative !important; vertical-align: baseline;">
<a class="post-tag js-gps-track" href="https://stackoverflow.com/questions/tagged/mongo-java-driver" rel="tag" style="background-color: #e1ecf4; border-radius: 3px; border: 1px solid rgb(225, 236, 244); box-sizing: inherit; color: #39739d; cursor: pointer; display: inline-block; font-family: inherit; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1; margin: 2px 2px 2px 0px; padding: 0.4em 0.5em; position: relative; text-align: center; text-decoration-line: none; transition: all 0.15s ease-in-out 0s; vertical-align: baseline; white-space: nowrap;" title="">mongo-java-driver</a></div>
</div>
<div style="background-color: white; border: 0px; box-sizing: inherit; clear: both; font-stretch: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
<span style="color: #242729; font-family: arial, helvetica neue, helvetica, sans-serif;"><span style="font-size: 15px;"><a href="https://spring.io/projects/spring-data-mongodb">https://spring.io/projects/<b>spring-data-mongodb</b></a></span></span><br />
<span style="color: #242729; font-family: arial, helvetica neue, helvetica, sans-serif;"><br /></span>
<span style="color: #242729; font-family: arial, helvetica neue, helvetica, sans-serif;"><br /></span>
<span style="color: #242729; font-family: arial, helvetica neue, helvetica, sans-serif;"><span style="font-size: 15px;"><br /></span></span></div>
<div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-20174792880339994992018-11-02T18:35:00.001+02:002018-11-02T18:35:50.403+02:00mvnrepository linkshttps://mvnrepository.com/open-source/http-clients<br />
https://mvnrepository.com/open-source/logging-frameworks<br />
https://mvnrepository.com/open-source/core-utilities<br />
<br />
all - https://mvnrepository.com/open-source<br />
netty - https://mvnrepository.com/search?q=netty&sort=popular<br />
<br /><div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-19958702592231235082018-10-30T16:28:00.000+02:002018-10-31T10:34:18.641+02:00Netty NoClassDefFoundError JdkAlpnApplicationProtocolNegotiatorPROBLEM:<br />
Caused by: java.lang.NoClassDefFoundError: Could not initialize class io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator<br />
at io.netty.handler.ssl.JdkSslContext.toNegotiator(JdkSslContext.java:285)<br />
at io.netty.handler.ssl.JdkSslClientContext.<init>(JdkSslClientContext.java:261)</init><br />
at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:751)<br />
at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:418)<br />
at com.relayrides.pushy.apns.ApnsClientBuilder.build(ApnsClientBuilder.java:408)<br />
<br />
c.r.p.a.ApnsClientBuilder Native SSL provider not available; will use JDK SSL provider.<br />
<br />
OpenSSL available? false<br />
ALPN supported? false<br />
Reason for unavailability:<br />
java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty-tcnative-linux-x86_32, netty-tcnative-linux-x86_32-fedora, netty-tcnative]<br />
at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:178)<br />
at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:384)<br />
at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:84)</clinit><br />
at OpenSslZav.main(OpenSslZav.java:7)<br />
<br />
<br />
JDK vs OPENSSL<br />
new JdkSslClientContext<br />
new OpenSslClientContext<br />
<br />
netty-tcnative-boringssl-static-2.0.0.Final.jar<br />
<br />
netty-tcnative-boringssl-static-2.0.0.Final.jar\META-INF\native\<br />
libnetty-tcnative-linux-x86_64.so<br />
libnetty-tcnative-osx-x86_64.jnilib<br />
netty-tcnative-windows-x86_64.dll<br />
<br />
SOLUTION:<br />
Update Java to arch 64<br />
ONLY WORKS IN JAVA 64 !!!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-bF4JrlOIOjU/W9lo8UeK2dI/AAAAAAAADjA/Dv6gLyqyGkoJxnNTtRR6VJrkJLJPN_HxACLcBGAs/s1600/JNI.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="782" data-original-width="982" height="508" src="https://1.bp.blogspot.com/-bF4JrlOIOjU/W9lo8UeK2dI/AAAAAAAADjA/Dv6gLyqyGkoJxnNTtRR6VJrkJLJPN_HxACLcBGAs/s640/JNI.png" width="640" /></a></div>
<br /><div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-90558864881477815002018-10-29T11:46:00.000+02:002018-10-29T12:24:14.086+02:00Notepad++<a href="https://notepad-plus-plus.org/download/v7.5.9.html">https://notepad-plus-plus.org/download/v7.5.9.html</a><br />
<br />
Plugin for formatting xml and json:<br />
<br />
<b>XML Tools </b><br />
<a href="https://sourceforge.net/projects/npp-plugins/files/XML%20Tools/Xml%20Tools%202.3.2%20r908%20Unicode%20Beta4/xmltools_2.3.2_r908_unicode_beta4.zip/download">https://sourceforge.net/projects/npp-plugins/files/XML%20Tools/Xml%20Tools%202.3.2%20r908%20Unicode%20Beta4/xmltools_2.3.2_r908_unicode_beta4.zip/download</a><br />
Copy <b>XMLTools.dll </b>to c:\MyProgramFiles\Notepad++\plugins\<br />
Maybe you need to copy ext_libs also.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-BXWDWxEHaFE/W9bWswWOqhI/AAAAAAAADig/f_xX036WlSoYUGrTBBPty1UDc3M9ouvNQCLcBGAs/s1600/xmltools.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="815" data-original-width="774" height="320" src="https://4.bp.blogspot.com/-BXWDWxEHaFE/W9bWswWOqhI/AAAAAAAADig/f_xX036WlSoYUGrTBBPty1UDc3M9ouvNQCLcBGAs/s320/xmltools.png" width="303" /></a></div>
<br />
<br />
<b>JStool</b><br />
<a href="https://code.google.com/archive/p/jstoolnpp/downloads">https://code.google.com/archive/p/jstoolnpp/downloads</a><br />
<a href="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/jstoolnpp/JSToolNPP.1.16.uni.zip">https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/jstoolnpp/JSToolNPP.1.16.uni.zip</a><br />
Copy <b>JSMinNPP.dll</b> to c:\MyProgramFiles\Notepad++\plugins\<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-tcDaW1M_mts/W9bWx0Mx9xI/AAAAAAAADik/EbUfTekU1ZEZJNV-UP7kjlNU4rMBbTS6QCLcBGAs/s1600/json.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="431" data-original-width="661" height="208" src="https://1.bp.blogspot.com/-tcDaW1M_mts/W9bWx0Mx9xI/AAAAAAAADik/EbUfTekU1ZEZJNV-UP7kjlNU4rMBbTS6QCLcBGAs/s320/json.png" width="320" /></a></div>
<br /><div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-55902808084200827382018-10-24T17:39:00.001+03:002019-07-18T19:05:26.791+03:00YourKit on remote serverhttps://www.yourkit.com/docs/java/help/profiling_j2ee_remote.jsp<br />
<br />
<br />
<br />
export PROFILER="-agentpath:/opt/yjp/bin/linux-x86-64/libyjpagent.so=disablestacktelemetry,disableexceptiontelemetry,delay=10000,listen=all"<br />
<br />
export JAVA_OPTS="-Xmx3G -Xms3G -Xmn1G -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/xxx/log/xxx-oom.hpref $GC_OPTS $PROFILER $JMX_OPTS"<div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-61192718129991694232018-10-17T13:20:00.002+03:002018-10-17T13:20:21.709+03:00Docker: Error response from daemon, Exception caught, Bad Request - FOR PROXY USERS<br />
PROBLEM:<br />
C:\Users\alexeyz> docker run hello-world<br />
Unable to find image 'hello-world:latest' locally<br />
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: Bad Request.<br />
See 'docker run --help'.<br />
-OR-<br />
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.10:build (myproject.all) on project com.myproject.docker: Exception caught: Get https://registry-1.docker.io/v2/: Bad Request<br />
<br />
SOLUTION:<br />
1. Switch off proxy in Docker<br />
2. Find non-proxy internet.<br />
<br />
<br /><div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-42385472570832362232018-10-12T17:45:00.002+03:002018-10-12T17:45:14.564+03:00Mongo notesuse admin<br />
db.runCommand( {buildInfo: 1} )<br />
db.adminCommand({setParameter: 1, internalQueryExecMaxBlockingSortBytes:67108864})<div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-37251671591913085182018-10-05T15:40:00.001+03:002018-10-05T15:45:45.149+03:00Mask credit card number in java<div class="separator" style="clear: both; text-align: left;">
<a href="https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html">https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html</a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-fCrJUKhnfbM/W7dYhapTo7I/AAAAAAAADg0/4XybD17jSjc2Ojv79Ta-xsHjamfafiEyQCLcBGAs/s1600/regex.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="337" data-original-width="836" height="256" src="https://3.bp.blogspot.com/-fCrJUKhnfbM/W7dYhapTo7I/AAAAAAAADg0/4XybD17jSjc2Ojv79Ta-xsHjamfafiEyQCLcBGAs/s640/regex.png" width="640" /></a></div>
<span style="white-space: pre;"> </span>String result;<br />
<span style="white-space: pre;"> </span>if (string.length() > 4) {<br />
<span style="white-space: pre;"> </span>result = string.replaceAll("(?<=.{4})(\\w)", "*");<br />
<span style="white-space: pre;"> </span>} else {<br />
<span style="white-space: pre;"> </span>result = string.replaceAll("(\\w)", "*");<br />
<span style="white-space: pre;"> </span>}<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-2UuVH6uQH74/W7dbmmg7R_I/AAAAAAAADhA/rgZhdFfPPiMY7bUTGuXO7UeMI4AlAGQowCLcBGAs/s1600/mask1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="808" data-original-width="861" height="600" src="https://3.bp.blogspot.com/-2UuVH6uQH74/W7dbmmg7R_I/AAAAAAAADhA/rgZhdFfPPiMY7bUTGuXO7UeMI4AlAGQowCLcBGAs/s640/mask1.png" width="640" /></a></div>
<br /><div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-82148580168076094762018-07-13T10:29:00.002+03:002018-07-13T10:29:40.009+03:00How to include class name property when serializing json<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">import com.google.gson.Gson;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">import com.google.gson.JsonElement;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">import com.google.gson.JsonObject;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">import com.google.gson.TypeAdapter;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">import com.google.gson.stream.JsonReader;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">import com.google.gson.stream.JsonWriter;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">/**</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> * Only for List type fields.</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> * @author alexeyz</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> */</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">public class RuntimeClassNameTypeAdapter extends TypeAdapter<list bject="">> {</list></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><span style="white-space: pre;"> </span>private static final String CLASS_NAME_PROPERTY = "type";</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><span style="white-space: pre;"> </span>@Override</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><span style="white-space: pre;"> </span>public void write(JsonWriter out, List<object> src) throws IOException {</object></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><span style="white-space: pre;"> </span>if (src == null) {out.nullValue();return;}</span><br />
<span style="white-space: pre;"><span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> </span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><span style="white-space: pre;"> </span>Gson gson = new Gson();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><span style="white-space: pre;"> </span>out.beginArray();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><span style="white-space: pre;"> </span>for (Object srcBlocker : src) {</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><span style="white-space: pre;"> </span> JsonElement serializedBlocker = gson.toJsonTree(srcBlocker);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><span style="white-space: pre;"> </span> JsonObject blocker = (JsonObject) serializedBlocker;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><span style="white-space: pre;"> </span> blocker.addProperty(CLASS_NAME_PROPERTY, srcBlocker.getClass().getSimpleName());</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><span style="white-space: pre;"> </span> out.jsonValue(blocker.toString());</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><span style="white-space: pre;"> </span>}</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><span style="white-space: pre;"> </span>out.endArray();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><span style="white-space: pre;"> </span>}</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">Usage:</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> @JsonAdapter(RuntimeClassNameTypeAdapter.class)</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> protected List<bookentity> book;</bookentity></span><br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-3M9XVYznhO8/W0hUb8nlpCI/AAAAAAAADe4/IKN2cjccsec8J2UtkM72eFMEzn00Z_B3ACLcBGAs/s1600/111gsonAdapter.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="828" data-original-width="1072" height="492" src="https://1.bp.blogspot.com/-3M9XVYznhO8/W0hUb8nlpCI/AAAAAAAADe4/IKN2cjccsec8J2UtkM72eFMEzn00Z_B3ACLcBGAs/s640/111gsonAdapter.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><br /></span><div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-24953747268232840852018-05-07T17:15:00.002+03:002018-05-07T17:15:22.584+03:00Http java linkshttps://www.programcreek.com/java-api-examples/?api=io.reactivex.netty.protocol.http.client.HttpClient<br />
<br />
https://blogs.oracle.com/java/jdk-http-client#synchronousGet<br />
<br />
http://www.baeldung.com/java-http-request<br />
<br />
https://stackoverflow.com/questions/46387896/how-can-i-use-http-client-apisince-java-9-in-java8-project<br />
<br />
https://www.mkyong.com/java/how-to-send-http-request-getpost-in-java/<br />
<br />
http://openjdk.java.net/groups/net/httpclient/intro.html<br />
<br />
https://alvinalexander.com/java/java-apache-httpclient-restful-client-examples<br />
<br />
https://github.com/timboudreau/netty-http-client<br />
<br />
https://github.com/cloudbow/netty-http-client<div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-69852912436910866192018-05-07T17:14:00.001+03:002018-05-07T17:14:21.655+03:00TODO mongodb query toJson<br />
<br />
Operator $all produces error on toJson() method.<br />
<br />
<a href="http://api.mongodb.com/java/current/org/bson/codecs/package-summary.html">http://api.mongodb.com/java/current/org/bson/codecs/package-summary.html</a><br />
<br />
<a href="https://mvnrepository.com/artifact/org.mongodb/mongo-java-driver">https://mvnrepository.com/artifact/org.mongodb/mongo-java-driver</a><br />
<br />
<a href="http://api.mongodb.com/java/3.0/?com/mongodb/client/model/Filters.html">http://api.mongodb.com/java/3.0/?com/mongodb/client/model/Filters.html</a><br />
<br />
<a href="http://mongodb.github.io/mongo-java-driver/3.4/bson/codecs/">http://mongodb.github.io/mongo-java-driver/3.4/bson/codecs/</a><br />
<br />
<br />
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<blockquote class="tr_bq">
Criteria criteria = Criteria.where("props").all(</blockquote>
<blockquote class="tr_bq">
new Criteria().elemMatch(Criteria.where("key").is("lang").and("value").is("EN")),</blockquote>
<blockquote class="tr_bq">
new Criteria().elemMatch(Criteria.where("key").is("photo").and("value").exists(true)));</blockquote>
<blockquote class="tr_bq">
String json = criteria.getCriteriaObject().toJson();</blockquote>
</blockquote>
</blockquote>
</blockquote>
<br />
<br />
<br />
org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class org.springframework.data.mongodb.core.query.Criteria.<br />
<span style="white-space: pre;"> </span>at org.bson.codecs.configuration.CodecCache.getOrThrow(CodecCache.java:46)<br />
<span style="white-space: pre;"> </span>at org.bson.codecs.configuration.ProvidersCodecRegistry.get(ProvidersCodecRegistry.java:63)<br />
<span style="white-space: pre;"> </span>at org.bson.codecs.configuration.ProvidersCodecRegistry.get(ProvidersCodecRegistry.java:37)<br />
<span style="white-space: pre;"> </span>at org.bson.codecs.DocumentCodec.writeValue(DocumentCodec.java:184)<br />
<br />
<br />
<h3 style="background-color: white; box-sizing: border-box; font-size: 18px; line-height: 24px; margin: 24px 0px; padding: 0px;">
<code class="docutils literal" style="box-sizing: border-box; font-size: 1em;"><span style="color: #313030; font-family: Akzidenz, Helvetica Neue, Helvetica, Arial, sans-serif;">Documentation: </span></code><code class="docutils literal" style="box-sizing: border-box; color: black; font-family: "Source Code Pro", monospace; font-size: 1em;">$all</code><span style="color: #313030; font-family: Akzidenz, Helvetica Neue, Helvetica, Arial, sans-serif;"> with </span><code class="docutils literal" style="box-sizing: border-box; color: black; font-family: "Source Code Pro", monospace; font-size: 1em;">$elemMatch</code><span style="font-family: Akzidenz, Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="font-size: 0.8em;"><a class="headerlink" href="https://docs.mongodb.com/manual/reference/operator/query/all/#use-all-with-elemmatch" style="box-sizing: border-box; color: #c60f0f; font-size: 0.8em; padding: 0px 4px; text-decoration-line: none; visibility: hidden;" title="Permalink to this headline"></a></span></span></h3>
<div style="background-color: white; box-sizing: border-box; color: #494747; font-family: Akzidenz, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; margin-bottom: 24px; padding: 0px;">
If the field contains an array of documents, you can use the <a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/all/#op._S_all" style="box-sizing: border-box; color: #006cbc; text-decoration-line: none;" title="$all"><code class="xref mongodb mongodb-query docutils literal" style="box-sizing: border-box; font-family: "Source Code Pro", monospace; font-size: 1em;">$all</code></a> with the <a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/elemMatch/#op._S_elemMatch" style="box-sizing: border-box; color: #006cbc; text-decoration-line: none;" title="$elemMatch"><code class="xref mongodb mongodb-query docutils literal" style="box-sizing: border-box; font-family: "Source Code Pro", monospace; font-size: 1em;">$elemMatch</code></a> operator.</div>
<div style="background-color: white; box-sizing: border-box; color: #494747; font-family: Akzidenz, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; margin-bottom: 24px; margin-top: 24px;">
The following operation queries the <code class="docutils literal" style="box-sizing: border-box; color: black; font-family: "Source Code Pro", monospace; font-size: 1em;">inventory</code> collection for documents where the value of the <code class="docutils literal" style="box-sizing: border-box; color: black; font-family: "Source Code Pro", monospace; font-size: 1em;">qty</code> field is an array whose elements match the <a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/elemMatch/#op._S_elemMatch" style="box-sizing: border-box; color: #006cbc; text-decoration-line: none;" title="$elemMatch"><code class="xref mongodb mongodb-query docutils literal" style="box-sizing: border-box; font-family: "Source Code Pro", monospace; font-size: 1em;">$elemMatch</code></a> criteria:</div>
<div class="button-code-block" style="background-color: white; box-sizing: border-box; color: #494747; font-family: Akzidenz, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; margin: 20px 0px;">
<div class="button-row" style="-webkit-box-direction: reverse; -webkit-box-orient: horizontal; background-image: url("https://media.mongodb.org/code-block-bg.png"); border-left: 5px solid rgb(73, 71, 71); box-sizing: border-box; display: flex; flex-direction: row-reverse; height: 24px;">
<a class="code-button--copy code-button" href="https://www.blogger.com/null" role="button" style="-webkit-box-flex: 0; background: rgb(122, 123, 123); border-radius: 0px; box-sizing: border-box; color: white; cursor: pointer; flex-grow: 0; height: 24px; line-height: 16px; margin: 0px 0px 0px 1px; min-width: 75px; padding: 4px 8px; position: relative; text-align: center; user-select: none;">copy<div class="code-button__tooltip code-button__tooltip--inactive" style="background-color: rgba(34, 34, 34, 0.8); border-radius: 6px; box-sizing: border-box; display: inline-block; font-size: 13px; opacity: 0; padding: 4px 16px; pointer-events: none; position: absolute; right: 8px; top: -30px; transition: opacity 0.3s ease-out;">
copied</div>
</a></div>
<div class="copyable-code-block highlight-javascript" style="box-sizing: border-box;">
<div class="highlight" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box;">
<pre style="background: url("https://media.mongodb.org/code-block-bg.png") rgb(245, 246, 247); border-bottom: none; border-image: initial; border-left: 5px solid rgb(73, 71, 71); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; color: #222222; font-family: "Source Code Pro", monospace; font-size: 14px; line-height: 24px; margin-left: auto; margin-right: auto; overflow: auto; padding: 2px 12px 24px; word-break: break-all; word-wrap: normal;"><span style="box-sizing: border-box;"></span><span class="nx" style="box-sizing: border-box;">db</span><span class="p" style="box-sizing: border-box;">.</span><span class="nx" style="box-sizing: border-box;">inventory</span><span class="p" style="box-sizing: border-box;">.</span><span class="nx" style="box-sizing: border-box;">find</span><span class="p" style="box-sizing: border-box;">(</span> <span class="p" style="box-sizing: border-box;">{</span>
<span class="nx" style="box-sizing: border-box;">qty</span><span class="o" style="box-sizing: border-box; color: #666666;">:</span> <span class="p" style="box-sizing: border-box;">{</span> <span class="nx" style="box-sizing: border-box;">$all</span><span class="o" style="box-sizing: border-box; color: #666666;">:</span> <span class="p" style="box-sizing: border-box;">[</span>
<span class="p" style="box-sizing: border-box;">{</span> <span class="s2" style="box-sizing: border-box; color: #4070a0;">"$elemMatch"</span> <span class="o" style="box-sizing: border-box; color: #666666;">:</span> <span class="p" style="box-sizing: border-box;">{</span> <span class="nx" style="box-sizing: border-box;">size</span><span class="o" style="box-sizing: border-box; color: #666666;">:</span> <span class="s2" style="box-sizing: border-box; color: #4070a0;">"M"</span><span class="p" style="box-sizing: border-box;">,</span> <span class="nx" style="box-sizing: border-box;">num</span><span class="o" style="box-sizing: border-box; color: #666666;">:</span> <span class="p" style="box-sizing: border-box;">{</span> <span class="nx" style="box-sizing: border-box;">$gt</span><span class="o" style="box-sizing: border-box; color: #666666;">:</span> <span class="mi" style="box-sizing: border-box; color: #208050;">50</span><span class="p" style="box-sizing: border-box;">}</span> <span class="p" style="box-sizing: border-box;">}</span> <span class="p" style="box-sizing: border-box;">},</span>
<span class="p" style="box-sizing: border-box;">{</span> <span class="s2" style="box-sizing: border-box; color: #4070a0;">"$elemMatch"</span> <span class="o" style="box-sizing: border-box; color: #666666;">:</span> <span class="p" style="box-sizing: border-box;">{</span> <span class="nx" style="box-sizing: border-box;">num</span> <span class="o" style="box-sizing: border-box; color: #666666;">:</span> <span class="mi" style="box-sizing: border-box; color: #208050;">100</span><span class="p" style="box-sizing: border-box;">,</span> <span class="nx" style="box-sizing: border-box;">color</span><span class="o" style="box-sizing: border-box; color: #666666;">:</span> <span class="s2" style="box-sizing: border-box; color: #4070a0;">"green"</span> <span class="p" style="box-sizing: border-box;">}</span> <span class="p" style="box-sizing: border-box;">}</span>
<span class="p" style="box-sizing: border-box;">]</span> <span class="p" style="box-sizing: border-box;">}</span>
<span class="p" style="box-sizing: border-box;">}</span> <span class="p" style="box-sizing: border-box;">)</span></pre>
</div>
</div>
</div>
<div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-54404717029383673672018-05-03T16:42:00.002+03:002018-08-29T14:09:29.366+03:00Count how much unique field values in mongo<div>
<span style="font-family: "courier new" , "courier" , monospace;">db.getCollection('myCollection').aggregate( </span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"> {$group: {"_id":"$username"}},</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"> {$group: {"_id":1, count:{$sum:1}}</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">})<br /></span><br />
<span style="font-family: courier new, courier, monospace;">db.getCollection('</span><span style="font-family: "courier new", courier, monospace;">myCollection</span><span style="font-family: courier new, courier, monospace;">').aggregate( [</span><br />
<span style="font-family: courier new, courier, monospace;"> {$match: { "_id.appId":"23893259736", "status" : 1 } },</span><br />
<span style="font-family: courier new, courier, monospace;"> {$group: {"_id":"$_id.deviceId"}},</span><br />
<span style="font-family: courier new, courier, monospace;"> {$group: {"_id":1, count:{$sum:1}}}</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: courier new, courier, monospace;">])</span></div>
<div>
<br /></div>
<div>
<br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Criteria criteria = SearchQueryBuilder.parse(query);</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Aggregation aggregation = Aggregation.newAggregation(</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span style="white-space: pre;"> </span>Aggregation.match(criteria),</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span style="white-space: pre;"> </span>Aggregation.group("username"),</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span style="white-space: pre;"> </span>Aggregation.group("username").count().as("count")</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span style="white-space: pre;"> </span>);</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">try {</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span style="white-space: pre;"> </span>AggregationResults<groupandcount> aggregationResults = mongoTemplate.aggregate(aggregation, Devices.class, GroupAndCount.class);</groupandcount></span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span style="white-space: pre;"> </span>GroupAndCount cbg = aggregationResults.getMappedResults().iterator().next();</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span style="white-space: pre;"> </span>return cbg.count;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">} catch (Exception e) {</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span style="white-space: pre;"> </span>return 0;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">}</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">private static final class GroupAndCount {</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span style="white-space: pre;"> </span>@Id</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span style="white-space: pre;"> </span>private Integer _id;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span style="white-space: pre;"> </span>private Integer count;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">}</span></div>
<div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-28120884007129254942018-04-25T13:18:00.002+03:002018-04-25T13:18:45.142+03:00Java 8 - create array ))Criteria[] cc = ((IntFunction<criteria>)Criteria[]::new).apply(0);</criteria><div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-85964637657722255042018-04-13T19:00:00.004+03:002018-04-13T19:00:38.263+03:00Mongo script syntax<a href="http://ptgmedia.pearsoncmg.com/imprint_downloads/informit/learninglabs/9780133902990/ch03.html">http://ptgmedia.pearsoncmg.com/imprint_downloads/informit/learninglabs/9780133902990/ch03.html</a><div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-80344185523695368442018-03-23T13:10:00.001+02:002018-03-23T13:10:43.746+02:00Java download JDK 8<a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html">jdk8 downloads</a><br />
<br />
<a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html">http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html</a><br />
<br />
<br />
<br />
<a href="http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/jdk-8u162-windows-x64.exe">jdk 8u162 windows x64</a><br />
<br />
<a href="http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/jdk-8u162-windows-x64.exe">http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/jdk-8u162-windows-x64.exe</a><br />
<br />
<br />
<span style="background-color: white; color: #242729; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px;">JDK build - included src.zip file.</span><div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-51793286407942352372018-02-27T18:45:00.001+02:002018-03-13T16:38:14.030+02:00BigDecimal to String :)<span style="white-space: pre;"> </span>public static void main(String[] args) {<br />
<span style="white-space: pre;"> </span>double d = 10.00001;<br />
<span style="white-space: pre;"> </span>BigDecimal bigDecimal = new BigDecimal(d);<br />
<span style="white-space: pre;"> </span>System.out.println(bigDecimal);<br />
<span style="white-space: pre;"> </span>// result: 10.000009999999999621422830387018620967864990234375<br />
<span style="white-space: pre;"> </span>System.out.println(bigDecimal.toPlainString());<br />
<span style="white-space: pre;"> </span>// result: 10.000009999999999621422830387018620967864990234375<br />
<span style="white-space: pre;"> </span>System.out.println(bigDecimal.toString());<br />
<span style="white-space: pre;"> </span>// result: 10.000009999999999621422830387018620967864990234375<br />
<span style="white-space: pre;"> </span>System.out.println(bigDecimal.stripTrailingZeros().toString());<br />
<span style="white-space: pre;"> </span>// result: 10.000009999999999621422830387018620967864990234375<br />
<span style="white-space: pre;"> </span>System.out.println(bigDecimal.stripTrailingZeros().toPlainString());<br />
<span style="white-space: pre;"> </span>// result: 10.000009999999999621422830387018620967864990234375<br />
<span style="white-space: pre;"> </span><br />
<span style="white-space: pre;"> </span>DecimalFormat df = new DecimalFormat();<br />
<span style="white-space: pre;"> </span>df.setMaximumFractionDigits(2);<br />
<span style="white-space: pre;"> </span>df.setMinimumFractionDigits(5);<br />
<span style="white-space: pre;"> </span>df.setGroupingUsed(false);<br />
<span style="white-space: pre;"> </span>String format = df.format(bigDecimal);<br />
<span style="white-space: pre;"> </span>System.out.println(format);<br />
<span style="white-space: pre;"> </span>// result: 10.00001<br />
<span style="white-space: pre;"> </span>}<br />
<br />
<br />
<span style="white-space: pre;"> </span>public static final String FORMAT_DEFAULT = "#0.00";<br />
<span style="white-space: pre;"> </span>public static final NumberFormat formatter = new DecimalFormat(FORMAT_DEFAULT);<br />
<br />
<span style="white-space: pre;"> </span>public static final String FormatDefault = "0.##";<br />
<span style="white-space: pre;"> </span>public static final NumberFormat Formatter = new DecimalFormat(FormatDefault);<br />
<br />
<span style="white-space: pre;"> </span>public static void main(String[] args) {<br />
<br />
<span style="white-space: pre;"> </span>double d = 1000000.00001;<br />
<span style="white-space: pre;"> </span>BigDecimal bigDecimal = new BigDecimal(d);<br />
<span style="white-space: pre;"> </span>System.out.println(bigDecimal);<br />
<br />
<span style="white-space: pre;"> </span>String format1 = formatter.format(d);<br />
<span style="white-space: pre;"> </span>System.out.println(format1);<br />
<span style="white-space: pre;"> </span><br />
<span style="white-space: pre;"> </span>String format2 = Formatter.format(d);<br />
<span style="white-space: pre;"> </span>System.out.println(format2);<br />
<br />
<span style="white-space: pre;"> </span>}<div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0tag:blogger.com,1999:blog-5958026825939578530.post-33332669124489547022017-10-24T17:32:00.001+03:002017-10-24T17:32:43.138+03:00unable to find valid certification path to requested target1. Add certificate to cacerts with InstallCert.java or linux command line. Put it to %JAVA_HOME%\jre\lib\security\<br />
<br />
2. Check or add usage correct <span style="background-color: white; color: #333333; font-family: Georgia, serif; font-size: 13px;">-Djavax.net.ssl.trustStore="...\cacerts"</span><br />
<span style="background-color: white; color: #333333; font-family: Georgia, serif; font-size: 13px;"><br /></span>
3. Check Network, Firewall and Proxy settings by accessing the site with:<br />
Try:<br />
<div style="text-align: left;">
<span style="font-family: "Courier New", Courier, monospace;">ping host </span></div>
<div style="text-align: left;">
<span style="font-family: "Courier New", Courier, monospace;">ping ip</span></div>
<div style="text-align: left;">
Try:</div>
<div style="text-align: left;">
<span style="font-family: "Courier New", Courier, monospace;">telnet hostname port </span></div>
<div class="blogger-post-footer">Blog Feeds</div>Alexey Zavizionovhttp://www.blogger.com/profile/01172046139726230558noreply@blogger.com0