Myth: Will low light reduce spawn rates?

Question: We should all be familiar with high enough light levels being used to completely prevent mobs from spawning in a location, but I am curious if it's a myth that there's any difference in the odds of mobs spawning when there's low enough light to allow spawns as opposed to no light whatsoever.
Let's say, for example, you have a single room, completely closed off from the outside, suspended in an otherwise void world. The walls and ceiling of this room are made of solid stone, but the floor is made entirely of glowstone. A default skeleton spawner block is floating 12 blocks above the floor with its spawn area fully inside the room. You can imagine that since the light is so far down from the spawner that skeletons should still be able to spawn anywhere in the spawn area (since spawner block rules allow things to spawn in midair) but would the spawn rates be better if the floor did not emit light at all?
I have researched this on the Minecraft wiki and found that there is only mention of what prevents the mob spawn, and nothing in the chain of conditions about reducing the mob spawn's odds of success when light exists in low levels. You can find all sorts of mob grinder build videos where the operators run on the assumption that the room ought to be pitch black for best spawn rates, claiming that you should allow no light from your collection room or your redstone wiring to filter into the spawning area. Could this assumption actually be just a myth we need to validate/bust?
Please substantiate your response. Personal experience and hearsay are okay, but good sources/statistics earn best answer.
Comment: What sort of testing on this have you done so far?
Comment: Currently, I've been applying my ideas to blaze spawner traps. They have high tolerance of light compared to most other mobs. In fact, I placed a floor of lava only a few blocks beneath a blaze spawner today and it seemed to be generating mobs at pretty much the same rate as the dark room traps I've used over the years.
Comment: Of course I welcome other trap builders to verify, and i can read Java programming, so finding lines of code related to this matter would be optional.
Answer: Now I built your example in 1.8 (I'm guessing You're using 1.8) And my results were... interesting.
Now first the mobs did spawn inside this little room as you can see by this image:
Now if you consider that hostile mobs only spawn if the light level is 7 or lower then yes. In theory this is true. BUT, In most cases of me just removing the glowstone and just me standing looking at how many spawn I would say that having no light source helps but it doesn't help a whole lot. I hope you found this helpful for whatever you're doing with this =D
Comment: Your work is similar to how mine turned out. I built a side-by-side system in the End with a scoreboard to track spawns from both sides, and your visual conclusion matches my systematic results. Thanks!
Comment: Welcome =D if You need any help You know where to find me!


Is it possible to port ps4 or xb1 minecraft saves to pc minecraft?

Question: I'm mostly wondering if there any way to port or convert minecraft ps4 saves into a format that is compatible with pc minecraft. I only own a ps4 and a pc, but I'm still curious if it's possible to do the same for xbox. Also, are there any legal reasons not to convert files from one platform to another?
Comment: Does this answer your question? [Can I sync or transfer save games and settings from one platform to another?](https://gaming.stackexchange.com/questions/198507/can-i-sync-or-transfer-save-games-and-settings-from-one-platform-to-another)
Answer: While not a direct duplicate of this Arqade question, the answer to that question is of relevance to yours.
Please keep in mind the following items:

These are not supported by Mojang or 4J Studios
The XBOX version doesn't support all PC features; you will lose any newer blocks/items
The conversion is said to take ~10 minutes, and is quite involved
The PC world is larger than XBOX ones, so you'll lose anything that it cannot fit

This list is copied verbatim from the answer linked, and credit goes to the SE user @colorfusion.


Anaconda Navigator not opening on M2 MacBook Air running MacOS Ventura

Question: I just downloaded anaconda on my M2 MacBook Air running MacOS Ventura (version 13.2.1). The download process went smoothly and I was able to locate Anaconda Navigator. But when I try opening it, it just won't open without even showing any error message.
After trying to run it from the terminal using anaconda-navigator, I got the following error:

Note that I have python 3.9.13 which was downloaded with anaconda when I downloaded it.
I tried to uninstall and reinstall anaconda, I also tried to check the .condarc file I also tried to check the list of packages that were installed using conda list to make sure that anaconda-navigator was there (Version 2.3.1 was installed). I also tried to uninstall and reinstall anaconda navigator using conda remove anaconda-navigator & conda install anaconda-navigator but none of these worked. Is there anyone else experiencing. the same issue? Or does anyone know how to fix that?
I will include the list of packages that were also installed out of the box for your reference:
<code># Name                    Version                   Build  Channel
_ipyw_jlab_nb_ext_conf    0.1.0            py39hecd8cb5_1
alabaster                 0.7.12             pyhd3eb1b0_0
anaconda                  2022.10                  py39_0
anaconda-client           1.11.0           py39hecd8cb5_0
anaconda-navigator        2.3.1            py39hecd8cb5_0
anaconda-project          0.11.1           py39hecd8cb5_0
anyio                     3.5.0            py39hecd8cb5_0
appdirs                   1.4.4              pyhd3eb1b0_0
applaunchservices         0.3.0            py39hecd8cb5_0
appnope                   0.1.2           py39hecd8cb5_1001
appscript                 1.1.2            py39h9ed2024_0
argon2-cffi               21.3.0             pyhd3eb1b0_0
argon2-cffi-bindings      21.2.0           py39hca72f7f_0
arrow                     1.2.2              pyhd3eb1b0_0
astroid                   2.11.7           py39hecd8cb5_0
astropy                   5.1              py39h67323c0_0
atomicwrites              1.4.0                      py_0
attrs                     21.4.0             pyhd3eb1b0_0
automat                   20.2.0                     py_0
autopep8                  1.6.0              pyhd3eb1b0_1
babel                     2.9.1              pyhd3eb1b0_0
backcall                  0.2.0              pyhd3eb1b0_0
backports                 1.1                pyhd3eb1b0_0
backports.functools_lru_cache 1.6.4              pyhd3eb1b0_0
backports.tempfile        1.0                pyhd3eb1b0_1
backports.weakref         1.0.post1                  py_1
bcrypt                    3.2.0            py39hca72f7f_1
beautifulsoup4            4.11.1           py39hecd8cb5_0
binaryornot               0.4.4              pyhd3eb1b0_1
bitarray                  2.5.1            py39hca72f7f_0
bkcharts                  0.2              py39hecd8cb5_1
black                     22.6.0           py39hecd8cb5_0
blas                      1.0                         mkl
bleach                    4.1.0              pyhd3eb1b0_0
blosc                     1.21.0               h8346a28_1
bokeh                     2.4.3            py39hecd8cb5_0
boto3                     1.24.28          py39hecd8cb5_0
botocore                  1.27.28          py39hecd8cb5_0
bottleneck                1.3.5            py39h67323c0_0
brotli                    1.0.9                hca72f7f_7
brotli-bin                1.0.9                hca72f7f_7
brotlipy                  0.7.0           py39h9ed2024_1003
brunsli                   0.1                  h23ab428_0
bzip2                     1.0.8                h1de35cc_0
c-ares                    1.18.1               hca72f7f_0
ca-certificates           2022.07.19           hecd8cb5_0
cctools                   949.0.1             h9abeeb2_25
cctools_osx-64            949.0.1             hc7db93f_25
certifi                   2022.9.24        py39hecd8cb5_0
cffi                      1.15.1           py39hc55c11b_0
cfitsio                   3.470                hbd21bf8_7
chardet                   4.0.0           py39hecd8cb5_1003
charls                    2.2.0                h23ab428_0
charset-normalizer        2.0.4              pyhd3eb1b0_0
click                     8.0.4            py39hecd8cb5_0
cloudpickle               2.0.0              pyhd3eb1b0_0
clyent                    1.2.2            py39hecd8cb5_1
colorama                  0.4.5            py39hecd8cb5_0
colorcet                  3.0.0            py39hecd8cb5_0
conda                     22.9.0           py39hecd8cb5_0
conda-build               3.22.0           py39hecd8cb5_0
conda-content-trust       0.1.3            py39hecd8cb5_0
conda-env                 2.6.0                         1
conda-pack                0.6.0              pyhd3eb1b0_0
conda-package-handling    1.9.0            py39hca72f7f_0
conda-repo-cli            1.0.20           py39hecd8cb5_0
conda-token               0.4.0              pyhd3eb1b0_0
conda-verify              3.4.2                      py_1
constantly                15.1.0             pyh2b92418_0
cookiecutter              1.7.3              pyhd3eb1b0_0
cryptography              37.0.1           py39hf6deb26_0
cssselect                 1.1.0              pyhd3eb1b0_0
curl                      7.84.0               hca72f7f_0
cycler                    0.11.0             pyhd3eb1b0_0
cython                    0.29.32          py39he9d5cce_0
cytoolz                   0.11.0           py39h9ed2024_0
daal4py                   2021.6.0         py39h01d92e1_1
dal                       2021.6.0           haf03e11_929
dask                      2022.7.0         py39hecd8cb5_0
dask-core                 2022.7.0         py39hecd8cb5_0
dataclasses               0.8                pyh6d0b6a4_7
datashader                0.14.1           py39hecd8cb5_0
datashape                 0.5.4            py39hecd8cb5_1
debugpy                   1.5.1            py39he9d5cce_0
decorator                 5.1.1              pyhd3eb1b0_0
defusedxml                0.7.1              pyhd3eb1b0_0
diff-match-patch          20200713           pyhd3eb1b0_0
dill                      0.3.4              pyhd3eb1b0_0
distributed               2022.7.0         py39hecd8cb5_0
docutils                  0.18.1           py39hecd8cb5_3
entrypoints               0.4              py39hecd8cb5_0
et_xmlfile                1.1.0            py39hecd8cb5_0
fftw                      3.3.9                h9ed2024_1
filelock                  3.6.0              pyhd3eb1b0_0
flake8                    4.0.1              pyhd3eb1b0_1
flask                     1.1.2              pyhd3eb1b0_0
fonttools                 4.25.0             pyhd3eb1b0_0
freetype                  2.11.0               hd8bbffd_0
fsspec                    2022.7.1         py39hecd8cb5_0
future                    0.18.2           py39hecd8cb5_1
gensim                    4.1.2            py39he9d5cce_0
gettext                   0.21.0               h7535e17_0
giflib                    5.2.1                haf1e3a3_0
glib                      2.69.1               h8346a28_1
glob2                     0.7                pyhd3eb1b0_0
gmp                       6.2.1                he9d5cce_3
gmpy2                     2.1.2            py39hd5de756_0
greenlet                  1.1.1            py39h23ab428_0
gst-plugins-base          1.14.0               h4180768_2
gstreamer                 1.14.0               h0fc69c2_2
h5py                      3.7.0            py39h4a1dd59_0
hdf5                      1.10.6               h10fe05b_1
heapdict                  1.0.1              pyhd3eb1b0_0
holoviews                 1.15.0           py39hecd8cb5_0
hvplot                    0.8.0            py39hecd8cb5_0
hyperlink                 21.0.0             pyhd3eb1b0_0
icu                       58.2                 h0a44026_3
idna                      3.3                pyhd3eb1b0_0
imagecodecs               2021.8.26        py39h0f85e6e_1
imageio                   2.19.3           py39hecd8cb5_0
imagesize                 1.4.1            py39hecd8cb5_0
importlib-metadata        4.11.3           py39hecd8cb5_0
importlib_metadata        4.11.3               hd3eb1b0_0
incremental               21.3.0             pyhd3eb1b0_0
inflection                0.5.1            py39hecd8cb5_0
iniconfig                 1.1.1              pyhd3eb1b0_0
intake                    0.6.5              pyhd3eb1b0_0
intel-openmp              2021.4.0          hecd8cb5_3538
intervaltree              3.1.0              pyhd3eb1b0_0
ipykernel                 6.15.2           py39hecd8cb5_0
ipython                   7.31.1           py39hecd8cb5_1
ipython_genutils          0.2.0              pyhd3eb1b0_1
ipywidgets                7.6.5              pyhd3eb1b0_1
isort                     5.9.3              pyhd3eb1b0_0
itemadapter               0.3.0              pyhd3eb1b0_0
itemloaders               1.0.4              pyhd3eb1b0_1
itsdangerous              2.0.1              pyhd3eb1b0_0
jdcal                     1.4.1              pyhd3eb1b0_0
jedi                      0.18.1           py39hecd8cb5_1
jellyfish                 0.9.0            py39hca72f7f_0
jinja2                    2.11.3             pyhd3eb1b0_0
jinja2-time               0.2.0              pyhd3eb1b0_3
jmespath                  0.10.0             pyhd3eb1b0_0
joblib                    1.1.0              pyhd3eb1b0_0
jpeg                      9e                   hca72f7f_0
jq                        1.6               h9ed2024_1000
json5                     0.9.6              pyhd3eb1b0_0
jsonschema                4.16.0           py39hecd8cb5_0
jupyter                   1.0.0            py39hecd8cb5_8
jupyter_client            7.3.4            py39hecd8cb5_0
jupyter_console           6.4.3              pyhd3eb1b0_0
jupyter_core              4.11.1           py39hecd8cb5_0
jupyter_server            1.18.1           py39hecd8cb5_0
jupyterlab                3.4.4            py39hecd8cb5_0
jupyterlab_pygments       0.1.2                      py_0
jupyterlab_server         2.10.3             pyhd3eb1b0_1
jupyterlab_widgets        1.0.0              pyhd3eb1b0_1
jxrlib                    1.1                  haf1e3a3_2
keyring                   23.4.0           py39hecd8cb5_0
kiwisolver                1.4.2            py39he9d5cce_0
krb5                      1.19.2               hcd88c3b_0
lazy-object-proxy         1.6.0            py39h9ed2024_0
lcms2                     2.12                 hf1fd2bf_0
ld64                      530                 h20443b4_25
ld64_osx-64               530                 h70f3046_25
ldid                      2.1.2                h2d21305_2
lerc                      3.0                  he9d5cce_0
libaec                    1.0.4                hb1e8313_1
libarchive                3.6.1                he336d3b_0
libbrotlicommon           1.0.9                hca72f7f_7
libbrotlidec              1.0.9                hca72f7f_7
libbrotlienc              1.0.9                hca72f7f_7
libclang                  12.0.0          default_hbc2896b_2
libcurl                   7.84.0               h6dfd666_0
libcxx                    14.0.6               h9765a3e_0
libdeflate                1.8                  h9ed2024_5
libedit                   3.1.20210910         hca72f7f_0
libev                     4.33                 h9ed2024_1
libffi                    3.3                  hb1e8313_2
libgfortran               5.0.0           11_2_0_h246ff09_26
libgfortran5              11.2.0              h246ff09_26
libiconv                  1.16                 hca72f7f_2
libidn2                   2.3.2                h9ed2024_0
liblief                   0.11.5               he9d5cce_1
libllvm11                 11.1.0               h46f1229_5
libllvm12                 12.0.0               h9b2ccf5_3
libllvm14                 14.0.6               he552d86_0
libnghttp2                1.46.0               ha29bfda_0
libpng                    1.6.37               ha441bb4_0
libpq                     12.9                 h1c9f633_3
libsodium                 1.0.18               h1de35cc_0
libspatialindex           1.9.3                h23ab428_0
libssh2                   1.10.0               h0a4fc7d_0
libtiff                   4.4.0                h2ef1027_0
libunistring              0.9.10               h9ed2024_0
libwebp                   1.2.2                h56c3ce4_0
libwebp-base              1.2.2                hca72f7f_0
libxml2                   2.9.14               hbf8cd5e_0
libxslt                   1.1.35               h5b33f42_0
libzopfli                 1.0.3                hb1e8313_0
llvm-openmp               14.0.6               h0dcd299_0
llvmlite                  0.38.0           py39h8346a28_0
locket                    1.0.0            py39hecd8cb5_0
lxml                      4.9.1            py39h65b224f_0
lz4                       3.1.3            py39h9ed2024_0
lz4-c                     1.9.3                h23ab428_1
lzo                       2.10                 haf1e3a3_2
markdown                  3.3.4            py39hecd8cb5_0
markupsafe                2.0.1            py39h9ed2024_0
matplotlib                3.5.2            py39hecd8cb5_0
matplotlib-base           3.5.2            py39hfb0c5b7_0
matplotlib-inline         0.1.6            py39hecd8cb5_0
mccabe                    0.7.0              pyhd3eb1b0_0
mistune                   0.8.4           py39h9ed2024_1000
mkl                       2021.4.0           hecd8cb5_637
mkl-service               2.4.0            py39h9ed2024_0
mkl_fft                   1.3.1            py39h4ab4a9b_0
mkl_random                1.2.2            py39hb2f4e1b_0
mock                      4.0.3              pyhd3eb1b0_0
mpc                       1.1.0                h6ef4df4_1
mpfr                      4.0.2                h9066e36_1
mpi                       1.0                       mpich
mpich                     3.3.2                external_0
mpmath                    1.2.1            py39hecd8cb5_0
msgpack-python            1.0.3            py39haf03e11_0
multipledispatch          0.6.0            py39hecd8cb5_0
munkres                   1.1.4                      py_0
mypy_extensions           0.4.3            py39hecd8cb5_1
navigator-updater         0.3.0            py39hecd8cb5_0
nbclassic                 0.3.5              pyhd3eb1b0_0
nbclient                  0.5.13           py39hecd8cb5_0
nbconvert                 6.4.4            py39hecd8cb5_0
nbformat                  5.5.0            py39hecd8cb5_0
ncurses                   6.3                  hca72f7f_3
nest-asyncio              1.5.5            py39hecd8cb5_0
networkx                  2.8.4            py39hecd8cb5_0
nltk                      3.7                pyhd3eb1b0_0
nose                      1.3.7           pyhd3eb1b0_1008
notebook                  6.4.12           py39hecd8cb5_0
nspr                      4.33                 he9d5cce_0
nss                       3.74                 h47edf6a_0
numba                     0.55.1           py39hae1ba45_0
numexpr                   2.8.3            py39h2e5f0a9_0
numpy                     1.21.5           py39h2e5f0a9_3
numpy-base                1.21.5           py39h3b1a694_3
numpydoc                  1.4.0            py39hecd8cb5_0
olefile                   0.46               pyhd3eb1b0_0
oniguruma                 188.8.131.52              h9ed2024_0
openjpeg                  2.4.0                h66ea3da_0
openpyxl                  3.0.10           py39hca72f7f_0
openssl                   1.1.1q               hca72f7f_0
packaging                 21.3               pyhd3eb1b0_0
pandas                    1.4.4            py39he9d5cce_0
pandocfilters             1.5.0              pyhd3eb1b0_0
panel                     0.13.1           py39hecd8cb5_0
param                     1.12.0             pyhd3eb1b0_0
parsel                    1.6.0            py39hecd8cb5_0
parso                     0.8.3              pyhd3eb1b0_0
partd                     1.2.0              pyhd3eb1b0_1
patch                     2.7.6             h1de35cc_1001
pathlib                   1.0.1              pyhd3eb1b0_1
pathspec                  0.9.0            py39hecd8cb5_0
patsy                     0.5.2            py39hecd8cb5_1
pcre                      8.45                 h23ab428_0
pep8                      1.7.1            py39hecd8cb5_1
pexpect                   4.8.0              pyhd3eb1b0_3
pickleshare               0.7.5           pyhd3eb1b0_1003
pillow                    9.2.0            py39hde71d04_1
pip                       22.2.2           py39hecd8cb5_0
pkginfo                   1.8.2              pyhd3eb1b0_0
platformdirs              2.5.2            py39hecd8cb5_0
plotly                    5.9.0            py39hecd8cb5_0
pluggy                    1.0.0            py39hecd8cb5_1
ply                       3.11             py39hecd8cb5_0
poyo                      0.5.0              pyhd3eb1b0_0
prometheus_client         0.14.1           py39hecd8cb5_0
prompt-toolkit            3.0.20             pyhd3eb1b0_0
prompt_toolkit            3.0.20               hd3eb1b0_0
protego                   0.1.16                     py_0
psutil                    5.9.0            py39hca72f7f_0
ptyprocess                0.7.0              pyhd3eb1b0_2
py                        1.11.0             pyhd3eb1b0_0
py-lief                   0.11.5           py39he9d5cce_1
pyasn1                    0.4.8              pyhd3eb1b0_0
pyasn1-modules            0.2.8                      py_0
pycodestyle               2.8.0              pyhd3eb1b0_0
pycosat                   0.6.3            py39h9ed2024_0
pycparser                 2.21               pyhd3eb1b0_0
pyct                      0.4.8            py39hecd8cb5_1
pycurl                    7.45.1           py39h0a4fc7d_0
pydispatcher              2.0.5            py39hecd8cb5_2
pydocstyle                6.1.1              pyhd3eb1b0_0
pyerfa                    2.0.0            py39h9ed2024_0
pyflakes                  2.4.0              pyhd3eb1b0_0
pygments                  2.11.2             pyhd3eb1b0_0
pyhamcrest                2.0.2              pyhd3eb1b0_2
pyjwt                     2.4.0            py39hecd8cb5_0
pylint                    2.14.5           py39hecd8cb5_0
pyls-spyder               0.4.0              pyhd3eb1b0_0
pyobjc-core               8.5              py39hc55c11b_0
pyobjc-framework-cocoa    8.5              py39hca72f7f_0
pyobjc-framework-coreservices 8.5              py39hca72f7f_0
pyobjc-framework-fsevents 8.5              py39hecd8cb5_0
pyodbc                    4.0.34           py39he9d5cce_0
pyopenssl                 22.0.0             pyhd3eb1b0_0
pyparsing                 3.0.9            py39hecd8cb5_0
pyqt                      5.15.7           py39he9d5cce_0
pyqt5-sip                 12.11.0          py39he9d5cce_0
pyqtwebengine             5.15.7           py39he9d5cce_0
pyrsistent                0.18.0           py39hca72f7f_0
pysocks                   1.7.1            py39hecd8cb5_0
pytables                  3.6.1            py39h648f197_1
pytest                    7.1.2            py39hecd8cb5_0
python                    3.9.13               hdfd78df_1
python-dateutil           2.8.2              pyhd3eb1b0_0
python-fastjsonschema     2.16.2           py39hecd8cb5_0
python-libarchive-c       2.9                pyhd3eb1b0_1
python-lsp-black          1.2.1            py39hecd8cb5_0
python-lsp-jsonrpc        1.0.0              pyhd3eb1b0_0
python-lsp-server         1.5.0            py39hecd8cb5_0
python-slugify            5.0.2              pyhd3eb1b0_0
python-snappy             0.6.0            py39h23ab428_3
python.app                3                py39hca72f7f_0
pytz                      2022.1           py39hecd8cb5_0
pyviz_comms               2.0.2              pyhd3eb1b0_0
pywavelets                1.3.0            py39hca72f7f_0
pyyaml                    6.0              py39hca72f7f_1
pyzmq                     23.2.0           py39he9d5cce_0
qdarkstyle                3.0.2              pyhd3eb1b0_0
qstylizer                 0.1.10             pyhd3eb1b0_0
qt                        5.15.9               hecd8cb5_0
qt-main                   5.15.2               h719ae48_7
qt-webengine              5.15.9               h90a370e_4
qtawesome                 1.0.3              pyhd3eb1b0_0
qtconsole                 5.3.2            py39hecd8cb5_0
qtpy                      2.2.0            py39hecd8cb5_0
qtwebkit                  5.212                h24dc246_4
queuelib                  1.5.0            py39hecd8cb5_0
readline                  8.1.2                hca72f7f_1
regex                     2022.7.9         py39hca72f7f_0
requests                  2.28.1           py39hecd8cb5_0
requests-file             1.5.1              pyhd3eb1b0_0
ripgrep                   13.0.0               hc2228c6_0
rope                      0.22.0             pyhd3eb1b0_0
rtree                     0.9.7            py39hecd8cb5_1
ruamel_yaml               0.15.100         py39h9ed2024_0
s3transfer                0.6.0            py39hecd8cb5_0
scikit-image              0.19.2           py39hae1ba45_0
scikit-learn              1.0.2            py39hae1ba45_1
scikit-learn-intelex      2021.6.0         py39hecd8cb5_0
scipy                     1.9.1            py39h3d31255_0
scrapy                    2.6.2            py39hecd8cb5_0
seaborn                   0.11.2             pyhd3eb1b0_0
send2trash                1.8.0              pyhd3eb1b0_1
service_identity          18.1.0             pyhd3eb1b0_1
setuptools                63.4.1           py39hecd8cb5_0
sip                       6.6.2            py39he9d5cce_0
six                       1.16.0             pyhd3eb1b0_1
smart_open                5.2.1            py39hecd8cb5_0
snappy                    1.1.9                he9d5cce_0
sniffio                   1.2.0            py39hecd8cb5_1
snowballstemmer           2.2.0              pyhd3eb1b0_0
sortedcollections         2.1.0              pyhd3eb1b0_0
sortedcontainers          2.4.0              pyhd3eb1b0_0
soupsieve                 2.3.1              pyhd3eb1b0_0
sphinx                    5.0.2            py39hecd8cb5_0
sphinxcontrib-applehelp   1.0.2              pyhd3eb1b0_0
sphinxcontrib-devhelp     1.0.2              pyhd3eb1b0_0
sphinxcontrib-htmlhelp    2.0.0              pyhd3eb1b0_0
sphinxcontrib-jsmath      1.0.1              pyhd3eb1b0_0
sphinxcontrib-qthelp      1.0.3              pyhd3eb1b0_0
sphinxcontrib-serializinghtml 1.1.5              pyhd3eb1b0_0
spyder                    5.3.3            py39hecd8cb5_0
spyder-kernels            2.3.3            py39hecd8cb5_0
sqlalchemy                1.4.39           py39hca72f7f_0
sqlite                    3.39.3               h707629a_0
statsmodels               0.13.2           py39hca72f7f_0
sympy                     1.10.1           py39hecd8cb5_0
tabulate                  0.8.10           py39hecd8cb5_0
tapi                      1000.10.8            ha1b3eb9_0
tbb                       2021.6.0             haf03e11_0
tbb4py                    2021.6.0         py39haf03e11_0
tblib                     1.7.0              pyhd3eb1b0_0
tenacity                  8.0.1            py39hecd8cb5_1
terminado                 0.13.1           py39hecd8cb5_0
testpath                  0.6.0            py39hecd8cb5_0
text-unidecode            1.3                pyhd3eb1b0_0
textdistance              4.2.1              pyhd3eb1b0_0
threadpoolctl             2.2.0              pyh0d69192_0
three-merge               0.1.1              pyhd3eb1b0_0
tifffile                  2021.7.2           pyhd3eb1b0_2
tinycss                   0.4             pyhd3eb1b0_1002
tk                        8.6.12               h5d9f67b_0
tldextract                3.2.0              pyhd3eb1b0_0
toml                      0.10.2             pyhd3eb1b0_0
tomli                     2.0.1            py39hecd8cb5_0
tomlkit                   0.11.1           py39hecd8cb5_0
toolz                     0.11.2             pyhd3eb1b0_0
tornado                   6.1              py39h9ed2024_0
tqdm                      4.64.1           py39hecd8cb5_0
traitlets                 5.1.1              pyhd3eb1b0_0
twisted                   22.2.0           py39hca72f7f_1
typing-extensions         4.3.0            py39hecd8cb5_0
typing_extensions         4.3.0            py39hecd8cb5_0
tzdata                    2022c                h04d1e81_0
ujson                     5.4.0            py39he9d5cce_0
unidecode                 1.2.0              pyhd3eb1b0_0
unixodbc                  2.3.11               hb456775_0
urllib3                   1.26.11          py39hecd8cb5_0
w3lib                     1.21.0             pyhd3eb1b0_0
watchdog                  2.1.6            py39h999c104_0
wcwidth                   0.2.5              pyhd3eb1b0_0
webencodings              0.5.1            py39hecd8cb5_1
websocket-client          0.58.0           py39hecd8cb5_4
werkzeug                  2.0.3              pyhd3eb1b0_0
wget                      1.21.3               h6dfd666_0
whatthepatch              1.0.2            py39hecd8cb5_0
wheel                     0.37.1             pyhd3eb1b0_0
widgetsnbextension        3.5.2            py39hecd8cb5_0
wrapt                     1.14.1           py39hca72f7f_0
wurlitzer                 3.0.2            py39hecd8cb5_0
xarray                    0.20.1             pyhd3eb1b0_1
xlrd                      2.0.1              pyhd3eb1b0_0
xlsxwriter                3.0.3              pyhd3eb1b0_0
xlwings                   0.27.15          py39hecd8cb5_0
xz                        5.2.6                hca72f7f_0
yaml                      0.2.5                haf1e3a3_0
yapf                      0.31.0             pyhd3eb1b0_0
zeromq                    4.3.4                h23ab428_0
zfp                       0.5.5                he9d5cce_6
zict                      2.1.0            py39hecd8cb5_0
zipp                      3.8.0            py39hecd8cb5_0
zlib                      1.2.12               h4dc903c_3
zope                      1.0              py39hecd8cb5_1
zope.interface            5.4.0            py39h9ed2024_0
zstd                      1.5.2                hcb37349_0
</code>
In addition, I tried resetting anaconda navigator through the terminal but I got the same error message.
Any help would be of great value :)
Thank you for your time!
Answer: Just got off a phone call with an Anaconda representative to try to solve this issue and it seems like they do not have any current support for M2 Macs and told me that I had to settle with using anaconda through the terminal until they do support this new chip.
Answer: I was just able to successfully download and install the latest Anaconda distribution on my Mac M2 (running 13.4.1).  It doesn't install Anaconda Navigator in the Applications folder but rather just an alias that links to the app.
The actual application is in:
/Users/[COMPUTER NAME]/anaconda3/Anaconda-Navigator.app


Let $S = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\}$. Find the number of subsets $A$ of $S$ such that $x \in A$ and $2x \in S \implies 2x \in A$.

Question: Let $S=\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\}$. Find the number of subsets $A\subseteq S$ such that $x\in A$ and $2x\in S$ $\implies 2x\in A$.
My Attempt
I broke the problem into cases. I made pairs $(1,2),(2,4),(3,6),(4,8),(5,10)$.
If considering these pairs only there are
$$\binom{5}{1}+\binom{5}{2}+\binom{5}{3}+\binom{5}{4}+\binom{5}{5}=2^5-1=31$$
Considering solely elements of $\{6,7,8,9,10 \}$ there are similarly $31$ subsets.
Now there may be cases where both occur.
$$2^4\binom{5}{1}+2^3\binom{5}{2}+2^2\binom{5}{3}+2^1\binom{5}{4}+2^0\binom{5}{5}=211$$
Clearly answer after summing all and including empty set is $31+31+211+1=274$.
It is not likely to be correct please give a systematic proceeding of solution.

Edit: On making an important comment by @Desparado
I would change tuples to $(\pmb1,2,4,8),(\pmb2,4,8),(\pmb3,6),(\pmb4,8),(\pmb5,10),(6),(7),(8),(9),(10)$.
Boldface indicates the entry which must be accompanied by the following in that particular tuple in the subset.
Correct answer is 180 given by @lulu and @Desperado in the comments
Comment: Partition $S$ into the five sets $$\{1,2,4,8\}$$ $$\{3,6\}$$ $$\{5,10\}$$ $$\{7\}$$ $$\{9\}$$ and decide how many elements you want to take from each set.
Comment: @lulu, I guess the options for the subsets involving 7 and 9 are just 4, so you have a total of 180 possible subsets A. For the rest it seems fine, nice idea!
Comment: @TechnoFreak What is not working in your approach is that you pick independently  for examplethe pairs (1,2) and (2,4). But taking (1,2) force you to take (2,4) and also (4,8), so they are not independent choices
Comment: I get $360$ mentally (so could have it wrong).  My method:  the least power of $2$ in $A$ is one of $\emptyset,0, 1, 2, 3$ ($5$ choices).  Considering $3$ you get one of $\emptyset, 3, 6$ ($3$ choices) and similarly $\emptyset, 5, 10$ ($3$ choices). then any subset of $\emptyset, 7, 9$ ($8$ choices).  And $5\times 3\times 3 \times 8=360$. I think the approach is good, though I strongly recommend checking the details.
Comment: Not sure what I wrote was clear.  If, say, in the first case you choose $1$ then when we have $1\not \in A$ but $2^1=2\in A$.  Which means that $4,8$ are also in $A$.  My point was that whatever you choose uniquely determines which elements of the given set are in $A$.  For clarity, I probably should have phrased the first choice as a choice between $\{\emptyset, 1, 2, 4, 8\}$... for whatever reason I focussed on the exponent in the power of $2$.
Comment: @Desperado, Oh, right.  I can't choose the empty set *along with* anything else.  Thanks, good catch.  I'm off by a factor of $2$.
Comment: @Desperado you got some mistake that's absolutely great. Thanks for the correction.Still processing answer though.
Answer: A subset $A$ of $S$ satisfying your property is exactly the same as a set that satisfies the following properties :

If $A$ contains 1, then $A$ contains $1$,$2$,$4$ and $8$ ;
If $A$ contains 2, then $A$ contains $2$,$4$ and $8$ ;
If $A$ contains 3, then $A$ contains $3$, $6$ ;
If $A$ contains 4, then $A$ contains $4$ and $8$ ;
If $A$ contains 5, then $A$ contains $5$ and $10$ ;

Five families of numbers appear : $(1,2,4,8)$, $(3,6)$, $(5,10)$, $(7)$ and $(9)$ (two numbers which can or cannot be in $A$ without any consequence on the property).
$A$ is therefore given by exactly 5 independant informations, which are the four smallest numbers that $A$ contains in these families (or if it contains none of the numbers of a family).
We have $5$ choices for the first family ($A$ contains no one / $A$ contains only $8$ / $A$ contains $4$ and $8$ / $A$ contains $2,4,8$ / $A$ contains $1,2,4,8$) ; $3$ choices for the 2nd family ; $3$ choices for the 3rd family and 2 choices for each of the last two families ($A$ contains 7 or $A$ does not contain 7). Which gives a total of
$$5 \times 3 \times 3 \times 2 \times 2 = 180 \text{ possibilities}.$$


How to deal with hyper control warrior as an aggressive deck

Question: In my most recent pursuit of getting lvl 60 in each class and working on golden heroes for each class, I find it is fastest to level up and get quick wins using hyper aggressive strategies (rush rogue, face hunter, zoo, etc.).
Even though the strategy of aggro decks seems easy (hit face and sometimes win), I find there are a lot of beneficial trades you can make and styles of play that can completely counter the opponent and/or force them to make bad trades to deal with your onslaught.
The one deck that seems to elude this strategy is the ultra-control warrior. My matchups against other decks with hyper strategies are quite favourable, but if I meet a warrior on ladder as an aggro rogue, it's almost a guaranteed loss. They are able to deal with my early threats and gain armour at the same time. At the end of the day there just isn't a way to keep up with their armour gain.
Just wondering if anyone has specific strategies they use to combat the control warrior matchup as an aggressive deck. While I don't expect to win most of the time (their deck is designed to deal with this type of aggressive strategy), my personal performance against this class in particular is quite poor when I'm playing aggressive decks (particularly aggro rogue).
Edit: Rank is usually around 3 to legend. I do care about rank and am not purely looking for just volume of wins.
Answer: On a generalized level, you're asking how to beat something that counters aggresive decks, while playing aggresive decks. Which, in a 'perfect' world, shouldn't happen.
I do have two sidepoints before talking about the extremely advanced aggresive tactics you can use;
1. Alternative
Since you just asked about "aggresive decks", and not your specific rogue deck, I believe Tempo Mage can do well against control warrior, but it's not the ultra aggresive deck (unless you get perfect wyrmWyrmCoinMirror (counter weps) + cheap spells opener) - Maybe Mana Addict would make it more aggresive.
2. Survive to live another day
You didn't mention anything about rank - If rank is irrelevant to you, the easiest solution is to just concede and quickly get to the next fight. Honestly, it's the best option against any deck that just intends to prolong the game forever! It's better to get 2-3 games with decent probability of winning, than hoping you might win that one game.
.
To answer the "main point" of your question... What strategies to use?
Go face.
Hard.
Go more face.

And hope he doesn't have brawl.
Honestly, unless you dominate the board, his face AND he doesn't have aoe, you shouldn't win. You need him to draw bad.
... If someone has a better reliable strategy, I'd LOVE to hear it.
Comment: Should've mentioned, but rank is important and I'm usually somewhere between rank 3 and legend. The obvious answer is to just hit face and hope for the best, but I was more asking for specific strategies that force a bad trade for the control opponent (throwing down divine shield threats and forcing them to blow weapon charges or holding off on flooding the board for a specific card to be used, etc.), For these unfavourable matchups it is mostly just getting incremental advantages and hoping they don't draw clinch cards (like the upgraded hero power).
Comment: +1 - I think this hits on many of the key issues. As an aggro deck, a slower, control focused deck is pretty much the worst matchup for you. If you have to play against specific decks, you have to work around their powerful removal, which is very difficult. There's a lot of finesse involved.
Comment: @SethChalmers You could add in tech cards for control, but it also makes your overall strength vs. other decks weaker. The cards would have to be useful against more than just control, which most decks online already take into account. In regards to strategies; yes in a slower matchup, you can commit on the board to force a brawl, without overcommitting - But as a "super rush", you don't have this luxury. Aggro shaman can avoid some of this... Insane possible openers, Feral Spirit and pesky totems (eat weapons), high hp minions and plenty of spells that aren't affected by most defensive cards
Answer: As you've noticed this is a very unfavorable match-up. In order to have much hope you need to have a great starting hand (mulligan aggressively for your best 1-2 drops) and a great draw. So then your your best course is to just play assuming that you will get the draws you need and go full face. You need to do this because he will be hitting armor up every turn, and every turn you stall by making a trade is more HP you have to burn through. The only exceptions for trade/removal I can think of offhand are armorsmith and acolyte, as both of those can punish you severely with armor and draw respectively.


How do I decide what items to save for future use

Question: How do people decide on which drops to save among the steady flood of items? Stash space is limited, and my earlier strategy of saving all rares and items with good MF stats isn't feasible any more.
I'm looking for answers on how to decide on what items to retain for

Alts of any class that are lower level and could use this equipment in future
Alternate gear for situational use - boss killing vs AoE mobs? Specific troublesome elites (molten fire chains with melee) in higher difficulties?
Adding in MF or GF gear for occasional item hunting runs
Even good items for the same character at a lower level (to give away to friends, and yes I'm not confident of always recognizing these just because I have leveled a particular class)
Comment: possible duplicate of [Is it worth stashing items for twinks?](http://gaming.stackexchange.com/questions/69920/is-it-worth-stashing-items-for-twinks)
Comment: @bwarner: I actually remembered to ask this after seeing that question, this is more 'I am a packrat anyway, but what do I throw out & keep?' (also its not just for alts).
Comment: Isn't it the same question?
Comment: Btw, those voting it down - I'd like any suggestions to improve the question; my stash is getting crowded and I don't want to throw out the wrong items (ie. answers would be useful to me, I don't care about the contest & not asking just for some points)
Comment: Saving for main doesn't really make sense, either its better than what you have now and you use it immediately, or its not and you'll never use it.  Alternate gear sets for your main is kind of a niche case, and isn't even mentioned in your answer.  So your question ends up being about saving for alts too.
Comment: let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/3554/discussion-between-alok-and-bwarner)
Comment: Cleaned up some comments. I'd like any input on improving this question for those who think its not clear enough.
Answer: Here is my current, evolving strategy of what to keep & throw:
Things to not save

Most equipment below around level 15 or so; excluding good weapons & amulet/rings: you level too fast to care about it.
Items with good stat bonuses split between different main stats: e.g. armor with STR & DEX, without other good mods I pass it up since neither barb or DH/Monk will get full use out of it.
Amulets & rings with a single good stat (ooh look, 8% MF! but nothing else ...)
Blue armor just because it has 2 sockets

Things to save

Weapons with high dps, life steal/life on hit usable by most classes: better with sockets and any other useful properties.
Amulets or rings with a lot of +stats: quick boost to alt's followers
Amulets/rings with bonus to a single main stat; and maybe VIT, life regen etc.
I like to have atleast some items in various level ranges with life regen
Comment: This is sort of subjective; it really only applies to you.  What if you had a wizard, or focused on other items?
Comment: @fbueckert: If I had a good list, wouldn't be asking the question ;) I am only starting off with my own opinions (which ofc. are subjective!) and hoping for the input of some experts to improve :)
Comment: According to the FAQ, you shouldn't be asking questions such as 'Every answer is equally valid: "What's your favorite ______?".  This question is far too subjective.
Comment: Disagree that all answers are equally valid here; do you mean there is no constructive advice on picking the items to save? You can always specify the class in your answer, doesn't have to be generic to everyone.


If I demoted my arena, can I buy a chest by purchase right away?

Question: In clash royale, if I'm in arena 10, for example, I want to demote to arena 9. My question is, if I demote to arena 9, can I buy a legendary chest by purchase in the shop right away?
Comment: Needs confirmation - Legendary chests can appear below arena 10, but legendary cards will not
Comment: Due to a recent update I believe it's no longer possible to drop from your current arena, unless you are over 4k.
Answer: You can't, because legendary chests are only available in level 10. Besides, the newest update has made it impossible to demote from arenas. For example, when your trophies are 500, and the arena trophy requirements are 500, then when you lose, your won't get any loss on trophies.
Answer: Your arena does not restrict you in any way when buying chests. You can move around as much as you want trophies wise, and buy chests in the shop at the same time.
Comment: I am unsure of whether or not this works for 10 to 9, because only arena 10 allows for legendary chests.


Remote desktop from Windows to Lubuntu

Question: Is there a way to remote connect (via windows remote desktop) to my Ubuntu server which has the Lubuntu Desktop, just like is possible with Unity?
Answer: Other than in Ubuntu the leightweight Lubuntu desktop does not include a VNC server by default. We will have to install and configure a VNC server before we are able to view our Lubuntu desktop remotely.
This can be vino  (the Ubuntu default VNC server), or any other VNC server (I made good experiences with x11vnc ). A VNC server can be installed and configured through a SSH session in case you have no physical access to your server.
See also:

Ubuntu Wiki: Lubuntu Remote Desktop
What free Remote Desktop (server) solutions are there?
Run RDP server on Ubuntu 12.10 for access via RDP (e.g. from Windows)
Comment: I have no physical acces, it is a cloud server so it has to be via SSH. Does this mean that I need a VNC viewer, and can not use the build in remote desktop on windows?
Comment: See edit for RDP and other solutions in case you do not want to run a VNC viewer in Windows.
Answer: Please have a look here:
Remote desktop for multiple users
I have added useful information for this too.

Remote desktop from Windows to Lubuntu


Uniform continuity of a function $F:(0,1)\times (0,1)\to \mathbb R$

Question: Let, $f,g:(0,1)\times (0,1)\to \mathbb R$ be two continuous functions defined by $f(x,y)=\dfrac{1}{1+x(1-y)}$ and $g(x,y)=\dfrac{1}{1+x(y-1)}$. Then which is correct?

$f$ and $g$ both are uniformly continuous.
$f$ is uniformly continuous but $g$ is not.
$g$ is uniformly continuous but $f$ is not.
neither $f$ nor $g$ is uniformly continuous.

From definition, I can't show the uniform continuous. So how we can show the uniform continuity?
We know that for a function $F\colon (a,b)\to \mathbb R$ is uniformly continuous if $F$ is continuous in $(a,b)$ and the limit of $F$ exists at $a$ as well as at $b$.
Is it applicable for this problem?
That means , I want to say that both the functions are continuous on $(0,1)\times (0,1)$. If we can show that the limit exists at $(0,0)$ and at $(1,1)$ then can we say that the functions are uniformly continuous?
Please suggest me about the problem.
Comment: how did you prove that? "$F:(a,b):→ℝ$ is uniformly continuous if F is continuous in $(a,b)$ & the limit of F exists at a as well as at b" does not work here becasue then you should check existence of limit on whole boundary and not just on $(0,0)$ and $(1,1)$
Comment: Can you check whether they are continuous atleast?
Comment: Yes.they are continuous.
Comment: Seeing the functions we can say that there are no singularity in whole of the domain.
Answer: Let $(x_1,y_1),(x_2,y_2)\in(0,1)\times(0,1)$. Then
\begin{align*}
|f(x_1,y_1)-f(x_2,y_2)|&=\frac{|x_1(y_1-y_2)+(y_2-1)(x_1-x_2)|}{(1+x_1(1-y_1))(1+x_2(1-y_2))}\\
&\le\frac{x_1}{1+x_1(1-y_1)}|y_1-y_2|+\frac{1-y_2}{1+x_2(1-y_2)}|x_1-x_2|\\
&\le\frac{1}{1+x_1(1-y_1)}|y_1-y_2|+\frac{1}{1+x_2(1-y_2)}|x_1-x_2|\\
&\le|y_1-y_2|+|x_1-x_2|\\
&\le\sqrt{2}\|(x_1,y_1)-(x_2,y_2)\|.
\end{align*}
These inequalities show that $f$ is a Lipschitz function. Hence it is also uniformly continuous.
By the other hand $g$ is not uniformly continuous. We can use the well known characterization of uniform continuity via sequences. More precisely we will find sequences $(u_n)$ and $(v_n)$ auch that $u_n-v_n\to 0$ and $g(u_n)-g(v_n)\not\to 0$. Let $u_n=(1-\frac{1}{n},\frac{\sqrt{n}-1}{n-1})$ and $v_n=(1-\frac{1}{n},\frac{\sqrt{n}-2}{2(n-1)})$ ($n\ge 5$). Then
\begin{equation*}
\|u_n-v_n\|=\frac{\sqrt{n}}{2(n-1)}\to 0\text{ and }g(v_n)-g(u_n)=\sqrt{n}\to\infty.
\end{equation*}
The correct answer is (b).
Comment: I'm not so sure about $g$. It becomes unbounded near (1, 0).
Answer: Note that $x(1-y)\geq0$ on the compact set $K:=[0,1]^2$. It follows that
$$f(x,y):={1\over 1+x(1-y)}$$
is continuous on $K$, whence uniformly continuous on $K$. A fortiori $f$ is uniformly continuous on the interior of $K$.
Things are different with $g$: Consider the sequence ${\bf z}_n:=\left(1-{1\over n},{1\over n}\right)$ $\>(n\geq1)$. This sequence is obviously convergent with limit $(1,0)$. One computes
$$g({\bf z}_n)=g\left(1-{1\over n},{1\over n}\right)={1\over 1+\bigl(1-{1\over n}\bigr)\bigl({1\over n}-1\bigr)}={n\over2}{1\over 1-{1\over 2n}}\ .$$
This shows that $g({\bf z}_{n+1})-g({\bf z}_n)\geq1$ for all large enough $n$, whereas at the same time ${\bf z}_{n+1}-{\bf z}_n\to 0$. It follows that $g$ cannot be uniformly continuous on the interior of $K$.
Comment: As you may have noticed in my answer below $f$ is even a Lipschitz function.
Answer: Hints:

A uniformly continuous function on a bounded domain must be bounded (can you show why?)
See if you can bound one of your functions by something of the form $|h(x,y_0) - h(z,y_0)| < K_1|x-z|$ and $|h(x_0,y) - h(x_0,w)| < K_2|y-w|$.  Could you combine these inequalities to show your function is uniformly continuous?

Let's justify my first hint.  Suppose $h$ is a uniformly continuous function on a bounded domain $D \subset \mathbb{R}^n$ which maps to $\mathbb{R}$.  Then, there must exists a $\delta$ such that when $|x-y| < \delta$, $|h(x) - h(y)| < 1$.  Consider such a $\delta$.  Then, $\overline{D}$ is compact, so the cover $\{B_\delta(x)| x \in D\}$ consisting of balls of radius $\delta$ about every point in $D$ has a finite subcover, call it $U = \{B_\delta(x_1), \cdots, B_\delta(x_n)\}$.  But then, by construction, $$h(D) \subseteq \bigcup_{k=1}^n B_1(h(x_k)),$$ and since the left hand side is bounded, the image of $h$ is bounded.
Notice that $g$ is unbounded at $(x,y) \to (1,0)$.  From our previous argument, $g$ cannot be uniformly continuous.
For $f$, observe that we can extend $f$ to the function $\tilde{f}:[0,1]\times[0,1] \to \mathbb{R}$ (since $1+x(1-y)$ does not vanish on the boundary of the domain).  Then, $\tilde{f}$ is continuous, and since it is defined on a compact set, it is uniformly continuous.  Thus, $f$, which is the restriction of $\tilde{f}$ to $(0,1)\times(0,1)$, is also uniformly continuous.
(I probably thought you could use my second hint to prove $f$ was uniformly continuous when I posted it several months ago.  I still think you could, but I find the above argument much simpler).


How to tweak Python Sphinx so that I can have a fine site search result?

Question: I really like Python-Sphinx documentation tool but one thing annoys me is that I can barely get proper search result from the sphinx search box:

So I am wondering is there any trick so that I can have a better search performance from Sphinx search box? Also, is there any tool that allow me to replace Sphinx search box with a custom google search?
Thanks!
Edit: I just found out Scipy search box auto link to google. I am wondering if anyone knows how they achieve that?
Answer: The Sphinx search function is currently not very powerful/configurable.
To solve your problem, you can either

implement your own Sphinx search or

adjust your Sphinx template to support a custom Google search.

For 1), you might want to look into the non-stable Sphinx extension sphinxcontrib-lunrsearch 0.2.
For 2), read the Sphinx templating documentation.
There are some open issues in the Sphinx project on GitHub that might go into the direction of what you want, so you could try to contribute back to the project and get the support of the Sphinx community.
Comment: Thanks for the answer. I'll take a look at the links you suggested :D
Answer: The integration of the Google Searchbox is described in the Sphinx FAQ section at and you need to apply for a Google account. It worked for me as expected. Maybe you may need to tweak CSS Z-Index to avoid overlay of search results by contents depending on your theme.
from: https://www.sphinx-doc.org/en/master/faq.html?highlight=google%20search
Google Search
To replace Sphinx's built-in search function with Google Search, proceed as follows:

Go to https://cse.google.com/cse/all to create the Google Search code snippet.
Copy the code snippet and paste it into
_templates/searchbox.html in your Sphinx project:

{{ _('Quick search') }}

  <gcse:search></gcse:search>

Add searchbox.html to the html_sidebars configuration value.


Can't access Outlook REST API from within Outlook Add in

Question: I have created an Outlook addin project using yo office command. Inside it I'm trying to fetch list of mails, using the below code:
// Get access token
  Office.context.mailbox.getCallbackTokenAsync({isRest: true}, function(result){
    if (result.status === "succeeded") {
      var accessToken = result.value;
      console.log('Access token : ' + accessToken);
    } else {
      console.log('Unable to get access token :(');
    }

    // Get item id
    var itemId = Office.context.mailbox.convertToRestId(
      Office.context.mailbox.item.itemId,
      Office.MailboxEnums.RestVersion.v2_0
    );
    console.log('Item Id : ' + itemId);

    // Get messages now
    var messagesUrl = Office.context.mailbox.restUrl + 'v2.0/me/messages/' + itemId;
    console.log('Querying url : ' + messagesUrl);
    $.ajax({
      url: messagesUrl,
      dataType: 'json',
      headers: { 'Authorization': 'Bearer ' + accessToken }
    }).done(function(item){
      console.log(item);
    }).fail(function(error){
      console.log(error);
    });
  });

The problem is that on running the addin, I get the following error:
SEC7120: Origin https://localhost:3000 not found in Access-Control-Allow-Origin header.

SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.

Any help would be appreciated. The permission set in the manifest file is <Permissions>ReadWriteMailbox</Permissions>
Answer: Verify that you have CORS enabled on the server:
Access-Control-Allow-Origin: *
See https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS for more details.


How is border-style: inset supposed to look like?

Question: I'm trying to use border-style: inset; but it only renders a solid grey line. I was expecting it would render a nice inset looking line or something.
Comment: The rendering depends, somewhat, on the browser in question. It also depends on how thick the border is. You should see the effect if make the border really fat. You'll also have to play with the `border-color`, `inset` will adjust it in two directions to produce the inset effect.
Comment: Yeah!! I agree with @mu. If you wanna get more look about it you should use the image instead.
Answer: YOu can see various border styles in the image below:
Comment: @tahatmat I added the picture
Comment: Hey Caner, your link seems to be broken -- can you please fix it (or attach the image to the answer instead)? Thanks :)


TabBar on bottom of app with Column

Question: I am trying to put the TabBar on the bottom of the app.
It worked so far, yet I can't get the pages to work (TabBarView). It just looks black and unresponsive. The TabBar is unresponsive too. Have I taken the wrong approach?
Currently, it looks like that:

And the code looks like this:
import 'package:flutter/material.dart';

void main() => runApp(Bookkeeper());

class Bookkeeper extends StatelessWidget {
@override
Widget build(BuildContext context) {
    return MaterialApp(
        home: DefaultTabController(
            length: 4,

            child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    verticalDirection: VerticalDirection.up,
                    mainAxisSize: MainAxisSize.min,
                    children: [
                        AppBar(
                            backgroundColor: Color(0xFF3F5AA6),
                            title: Container(
                                padding: EdgeInsets.only(top: 8.0),
                                child: menu(),
                            ),
                        ),

                    TabBarView(
                        children: [
                            Icon(Icons.directions_car),
                            Icon(Icons.directions_transit),
                            Icon(Icons.directions_bike),
                            Icon(Icons.directions_bike),
                        ],
                    ),
                ],
            ),
        ),
    );
}

Widget menu() {
        return TabBar(
            tabs: [
                Tab(
                    child: Container(
                        height: 45.0,
                        child: Column(
                            children:
                            [
                                Icon(Icons.euro_symbol),
                                Text(
                                    "Transactions",
                                    style: new TextStyle(
                                        height: 1.5,
                                        fontSize: 9.8,
                                        color: Colors.white,
                                    ),
                                ),
                            ],
                        ),
                    ),
                ),
                Tab(
                    child: Container(
                        height: 45.0,
                        child: Column(
                            children:
                            [
                                Icon(Icons.assignment),
                                Text(
                                    "Bills",
                                    style: new TextStyle(
                                        height: 1.5,
                                        fontSize: 9.5,
                                        color: Colors.white,
                                    ),
                                ),
                            ],
                        ),
                    ),
                ),
                Tab(
                    child: Container(
                        height: 45.0,
                        child: Column(
                            children:
                            [
                                Icon(Icons.account_balance_wallet),
                                Text(
                                    "Balance",
                                    style: new TextStyle(
                                        height: 1.5,
                                        fontSize: 9.5,
                                        color: Colors.white,
                                    ),
                                ),
                            ],
                        ),
                    ),
                ),
                Tab(
                    child: Container(
                        height: 45.0,
                        child: Column(
                            children:
                            [
                                Icon(Icons.settings),
                                Text(
                                    "Options",
                                    style: new TextStyle(
                                        height: 1.5,
                                        fontSize: 9.5,
                                        color: Colors.white,
                                    ),
                                ),
                            ],
                        ),
                    ),
                ),
            ],
        );
    }
}

Comment: why do you use Container inside Tab,  tab has icon and text properties
Comment: Hey that is bad coding style, just ignore it. The main purpose is getting the tabbar to the bottom. I managed to do that but now TabBarView isn't working.
Answer: Use bottomNavigationBar to position the Tabs at the bottom of the screen
  class Bookkeeper extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        home: DefaultTabController(
          length: 4,
          child: Scaffold(
            appBar: AppBar(
              backgroundColor: Color(0xFF3F5AA6),
              title: Text("Title text"),
            ),
            bottomNavigationBar: menu(),
            body: TabBarView(
              children: [
                Container(child: Icon(Icons.directions_car)),
                Container(child: Icon(Icons.directions_transit)),
                Container(child: Icon(Icons.directions_bike)),
                Container(child: Icon(Icons.directions_bike)),
              ],
            ),
          ),
        ),
      );
    }

     Widget menu() {
return Container(
  color: Color(0xFF3F5AA6),
  child: TabBar(
    labelColor: Colors.white,
    unselectedLabelColor: Colors.white70,
    indicatorSize: TabBarIndicatorSize.tab,
    indicatorPadding: EdgeInsets.all(5.0),
    indicatorColor: Colors.blue,
    tabs: [
      Tab(
        text: "Transactions",
        icon: Icon(Icons.euro_symbol),
      ),
      Tab(
        text: "Bills",
        icon: Icon(Icons.assignment),
      ),
      Tab(
        text: "Balance",
        icon: Icon(Icons.account_balance_wallet),
      ),
      Tab(
        text: "Options",
        icon: Icon(Icons.settings),
      ),
    ],
  ),
);

}
}
Comment: Thanks man, I gave you an upvote and correct answer. I will work up from there on. Sorry for the problems, I'm new to this Flutter thing.
Comment: Hey, I want the AppBar on the bottom like on my screenshot. That is how I tried it and it did not work. Actually it did but the pages were unresponsive. Screenshot again: https://i.imgur.com/dTTcj2X.png - it should look like this.
Comment: Thank you but now the TabBar effects are gone.
Comment: what do you mean? could you put a screenshot?
Comment: I mean that the opacity / transparency of the other icons change when you change the page. This doesn't happen with your version anymore. Also the line under the selection doesn't have the same width. It's coming close though.
Comment: just change the properties bro, I updated my answer , check the menu() method
Comment: @diegoveloper Great job, but I have one question.. if we use bottomnavigation bar will I be able to save the state in each tab... I am hearing there are issues w.r.t state?

TabBar on bottom of app with Column


How does the career mode change when you have unlocked the entire tech tree?

Question: I've nearly unlocked all the science tech tree. How does the game change after that?
Specifically, is there any reason for more science when I've unlocked everything?
I've unlocked pretty much everything within Kerbin's SOI, is there any reason for conducting interplanetary science? Surely, I could fill out the entire tech tree with just 1 more planet. Why, then, would I do science all the way out to Eeloo if I've filled the tech tree? Is there an achievement, more parts, upgraded parts, anything?
Comment: Grab a mod like the interstellar mod(not actually about interstellar travel) which adds a whole lot more to the tech tree.
Answer: Currently (0.23), there is few practical difference between sandbox and career mode after you unlocked the whole tech tree. You have all parts available and are free to use them to do whatever you like.
The only difference is that you can still use experiments in career mode, while in sandbox mode all experiments are disabled. This doesn't give you any gameplay benefit, but it gives you the opportunity to read the flavor texts of the experiments performed on outer planets and moons. Some of them are quite interesting and/or entertaining. One EVA report on Eeloo is really cute, by the way.
Currently there is a lot more science to farm in the KSP solar system than you need to unlock the whole tech tree. And considering that it is planned that more planets than just Kerbin, Mun and Minmus will gain different biomes, the science output will just increase. If and how the developers will balance this in future updates (more tech tiers? Make later tiers more expensive? Scale down scientific values? New uses for science points?) is currently just guessing.
Comment: Not only that, but they've said that they made the research tree easily moddable, so mods can throw their parts somewhere in the tree, making it (theoretically) infinitely expandable.
Comment: That last line isn't needed; once the game gets updated, ideally the answer should get updated to keep up with it.
Answer: If you are using mods, like KSP Interstellar, playing career over sandbox has one advantage: there are more things you can spend Science points on, not only unlocking tech tree. You can upgrade your parts with it, too. Being able to collect them with core Kerbal experiments, not only with Science Lab is a huge advantage - for example, on Kerbin orbit lab produces only 0.017 science per day - you can harvest way more just by observing goo pretty much anywhere.
Comment: That was exactly the answer I was looking for. What to do next? I've stumbled upon KSP Interstellar and I'm amazed by the [Alcubierre Drive](https://github.com/FractalUK/KSPInterstellar/wiki/Alcubierre-Drive). So you confirm that this mod really works and adds many interesting things to do after the tech tree is complete! Thank you very much!
Answer: I haven't played 0.22 yet, but from what I've gathered from Scott Manley's video of 0.22 and interview with one of the devs, the tech tree is the only thing. There are no achievements or anything like that at this point.


Applying a Function to Similarly Named Columns of Different Dataframes and Concatenating Result

Question: Tried looking through previous questions and could not find one that matches my exact problem:
I have close to 300 Pandas dataframes named "df1" to "df300". They all have the following names and structure:
    X1  X2  X3  X4
0   3   8   4   9
1   3   5   3   6
2   4   7   7   3
3   10  1   10  6
4   4   4   7   9
5   6   4   1   3
6   10  8   6   3
7   7   1   1   10
8   7   6   9   8
9   10  3   4   6

To all the dataframes, I would like to apply this function:
def blend_data(dataframe):
   blend = (dataframe["X1"] + dataframe["X2"]) / (dataframe["X3"] * dataframe["X4"])
   return blend

And, concatenate the results in a new dataframe where the column "blend1" has the outputs from applying the function to "df1"; "blend2" has the outputs from applying the function to "df2" and so on. How would I do this?
Comment: `pd.concat([blend_data(d) for d in list_of_your_dataframes],axis=1)`?
Comment: can you load all 300 df into memory?
Comment: What is the issue, exactly? Have you tried anything, done any research?
Answer: You can concatenate the dataframes df1,df2,...,df300 first:
df_concat = pd.concat([df1, df2, ... , df300], axis=0)

Followed by applying the blend_data function on df_concat:
df_blend = blend_data(df_concat)


iOS 8 devices aren't being recognized by iPhone Configuration Utility

Question: With the recent update to iOS 8 I have been unable to load my test devices using the iPhone Configuration Utility.  Devices with iOS 8 are simply not recognized within the program.  When iOS 7 was released there was no required update for the iPCU,  though it did work with iOS 7.  The latest version on Apple's support site (3.6.2) says that it supports up to iOS 6.1.
Does anyone have any insight?  Alternatives?
Comment: Found this tip: https://discussions.apple.com/message/12039431#12039431 (didn't work for me)
Answer: Apple deprecated iPhone Configuration Utility, and released Apple Configurator for iOS device administration - https://itunes.apple.com/us/app/apple-configurator/id434433123?mt=12. However, some features (like managing provisioning profiles stored on mac) are not available in this new tool.
Comment: Sorry, there's no Apple Configurator for Windows.
Comment: What about options for windows?
Comment: Also it's OS X 10.10+ only.
Answer: You have to upgrade iTunes and it will work


Using existing CA-issued cert to sign OS X application and keep Gatekeeper happy

Question: I build an OSX app which is distributed as a DMG outside of the Mac App Store, and I'd like to continue to have it be that way once Gatekeeper enforcement begins.
From studying code signing documentation, it looks like the recommended approach is to get a "Developer ID" certificate and use that to codesign. However, you must be a registered OSX developer and pay Apple $99 each year. I already have a certificate from a recognized CA, and I would like to use it with codesign. I found documentation on how to do this, but I cannot tell whether Gatekeeper will allow applications signed using certs issued by other CAs, not Apple.
Does anyone know?
Answer: Gatekeeper only recognizes apps signed with Developer ID, not just any signature.  See this which also explains how to test Gatekeeper functionality under Lion.
The point is that if Apple owns the certificate authority, they can revoke the certificate if your app turns out to be a trojan or something.


Getting BSONArray from BSONElement in an direct way

Question: BSONElement class has an embeddedObject() method to return BSONObj "encoded" in the BSON element, e.g:
// being 'be' a BSONElement object
BSONObj b = be.embeddedObject();

However, sometimes the BSONElement object encodes a BSONArray (a derived class from BSONObj) and I would like to get it directly. Something like
// being 'be' a BSONElement object
BSONArray b = be.embeddedArray();

but I haven't find an embeddedArray() or similar in the MongoDB C++ driver documentation reference that I know.
I have found an Array() method in BSONElement class, but it returns std::vector<BSONElement> and composing the equivalent BSONArray based on vector content would be much more complicated (taking into account that each element in the vector could be of different kind, i.e. strings, numbers, other BSON objects or arrays, etc.).
Is there any way of getting the BSONArray "encoded" in a BSONElement in an direct way?
Answer: It seems that casting to BSONArray may work, in the following way:
BSONArray b = (BSONArray) be.embeddedObject();

This cast is unsafe in the general case, but combined with type() we can ensure that be is actually holding an embedded array.
However, I'm still wondering if a smarter way is possible... Feel free to add new answer to this question with alternative means, please.


How do I sum two variables together from different datasets in xarray while ensuring only data with the same coordinates and time get summed?

Question: I am currently working with precipitation data, and my goal is two add two different types of precipitation data together to get a result that is in effect, analogous to total precipitation. I am using xarray to manage this multi-dimensional data, and I want to ultimately end up with precipitation data plotted by coordinates on a map, with the time dimension averaged out. It is important that only data with the same coordinates and time be summed together. The three dimensions of the two variables are longitude, latitude, and time. Both variables have the same units. The two variables are contained within two separate datasets, and I want to end up with a single data array with the dimensions longitude, latitude, and time and the variable total precipitation. How would I go about summing these two data with respect to coordinates and time?
Very sorry if the context or question is jumbled and doesn't make sense, I am new to python and even newer to xarray. Any help would be appreciated.
Answer: As I understand it, you have two data sets and want to determine the sum of precipitation for each grid cell avergaged over the entire time to plot this?
Case 1
Assuming that your two data sets have the same dimension scales, it works like this
(In my example I use temperature data and calculate the difference. You can just replace the "-" with a "+" to get the sum):
import xarray as xr, numpy as np
import matplotlib, matplotlib.pyplot as plt
import cartopy.crs as ccrs
import cartopy.feature as cfeature
import cartopy.mpl.ticker as cticker # to have ticks
from cartopy.feature import NaturalEarthFeature #coastlines

ds_1 = xr.open_dataset("/PATH2yourFile/dataset1.nc")
ds_2 = xr.open_dataset("/PATH2yourFile/dataset2.nc")

res = ds_1['tsurf'].mean('time') - ds_2['tsurf'].mean('time')

Plotting:
plt.figure(figsize=(20,8))
ax = plt.subplot(projection=ccrs.PlateCarree())
res.plot.contourf(cmap="Spectral_r", transform=ccrs.PlateCarree(), levels=143)
ax.set_title("difference of mean temperatures", fontsize=18)
ax.set_yticks(np.arange(25,75,10)); plt.xticks(fontsize=16)
ax.set_xticks(np.arange(-45,65,15)); plt.yticks(fontsize=16)
ax.yaxis.set_major_formatter(cticker.LatitudeFormatter())
ax.xaxis.set_major_formatter(cticker.LongitudeFormatter())
ax.set_ylabel("latitude", fontsize=16)
ax.set_xlabel("longitude", fontsize=16)
ax.coastlines()

If you want to save the result:
res.to_netcdf("result.nc")

Case 2
If your datasets have different scales, than you can use cdo to get the sum for each grid cell like this:
cdo add -selvar,pr dataset1.nc -selvar,pr dataset2.nc pr_sum.nc

and then calculate the overall mean:
cdo timmean -selvar,pr pr_sum.nc pr_timmean.nc

After that you can simply load it into python with xarray and plot it as described above.


Avoid duplicating feedback that are already displayed through a ComponentFeedbackMessageFilter

Question: In my form, there is one feedback panel for general feedback messages, and two form input fields, each with its own feedback panel for validation feedback messages. However, when a form input fails to validate, the feedback message appears both in the panel for the field feedback message, and in the panel for general messages. This is not what I want, because the feedback messages are duplicated:

HTML:

The Form

<form wicket:id="loginForm">

Username: <input wicket:id="username" type="text"/>

Password: <input wicket:id="password" type="password"/>

    <input type="submit" name="Login" value="Login"/>
</form>

Java:
TextField usernameField = new TextField("username", Model.of(""));
usernameField.setRequired(true);
add(usernameField);

PasswordTextField passwordField = new PasswordTextField("password", Model.of(""));
add(passwordField);

add(new FeedbackPanel("allFeedback"));
add(new FeedbackPanel("usernameFeedback",
                      new ComponentFeedbackMessageFilter(usernameField)));
add(new FeedbackPanel("passwordFeedback",
                      new ComponentFeedbackMessageFilter(passwordField)));

Is there a way to prevent the duplication? I do not want the field-specific feedback messages to be duplicated in the general feedback panel.
Comment: See: https://jeremythomerson.com/2011/01/04/catching-all-feedback-messages-that-arent-rendered-by-other-feedback-panels/
Answer: check user guide to learn how to implement a custom feedback message filter. This might be useful for the general feedback panel to discard messages from usernameField and passwordField.


Error when installing dlib on Python 3.5 using Windows 10

Question: EDIT: Looks like I have to install Visual Studio 2015...Can I install dlib without VS 2015? I already have older versions pre-installed with Windows.
I am using Python 3.5, trying to install dlib on PyCharm in the terminal and this is what I am getting, and every search on these errors I do... I find stuff on Visual Studio which I don't have the GUI + I don't have vcvarsall.bat in the VC folder of any of the Visual Studio versions (8, 11, 12, 14). I have searched a good amount before posting this question on the Web.
Do I need to download Visual Studio latest version to get vcvarsall.bat ?
This is CMakeLists.txt:
cmake_minimum_required(VERSION ${CMAKE_VERSION})
project(IntelFortranImplicit Fortran)
add_custom_command(
  OUTPUT output.cmake
  COMMAND ${CMAKE_COMMAND} -P ${IntelFortranImplicit_SOURCE_DIR}/detect.cmake
  )
add_library(FortranLib hello.f output.cmake)

This is the error when I do: pip install dlib
  Collecting dlib
      Using cached dlib-19.6.1.tar.gz
    Building wheels for collected packages: dlib
      Running setup.py bdist_wheel for dlib ... error
      Complete output from command C:\Users\tiger\Anaconda3\envs\TensorFlowExample\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tiger\\AppDat
    a\\Local\\Temp\\pip-build-gjtgkl6a\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code
    , __file__, 'exec'))" bdist_wheel -d C:\Users\tiger\AppData\Local\Temp\tmprc21rnv_pip-wheel- --python-tag cp35:
      running bdist_wheel
      running build
      error: Cannot find cmake, ensure it is installed and in the path.
      You can install cmake using the instructions at https://cmake.org/install/
      You can also specify its path with --cmake parameter.

      ----------------------------------------
      Failed building wheel for dlib
      Running setup.py clean for dlib
    Failed to build dlib
    Installing collected packages: dlib
      Running setup.py install for dlib ... error
        Complete output from command C:\Users\tiger\Anaconda3\envs\TensorFlowExample\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tiger\\AppD
    ata\\Local\\Temp\\pip-build-gjtgkl6a\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(co
    de, __file__, 'exec'))" install --record C:\Users\tiger\AppData\Local\Temp\pip-dk1naa28-record\install-record.txt --single-version-externally-managed --compile
    :
        running install
        running build
        error: Cannot find cmake, ensure it is installed and in the path.
        You can install cmake using the instructions at https://cmake.org/install/
        You can also specify its path with --cmake parameter.

        ----------------------------------------
    Command "C:\Users\tiger\Anaconda3\envs\TensorFlowExample\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tiger\\AppData\\Local\\Temp\\pip-bu
    ild-gjtgkl6a\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))"
    install --record C:\Users\tiger\AppData\Local\Temp\pip-dk1naa28-record\install-record.txt --single-version-externally-managed --compile" failed with error code
     1 in C:\Users\tiger\AppData\Local\Temp\pip-build-gjtgkl6a\dlib\

Comment: Are you using Anaconda? If so, you should install `dlib` with the `conda` package manager. Otherwise, yes, you need Visual Studio 2015 (or at least it's C++ build tools).
Comment: I am using `PyCharm` but I have `Anaconda environment variable`, `conda `package manager? I'll have to find that... please comment if u know how to open `conda package manager`
Answer: Solution found here: Using Anaconda installing manager..!
Running the following in PyCharm Terminal: conda install -c conda-forge dlib=19.4
I was able to use dlib! :)
Huge thanks to birryree in the comments for letting me know!
Answer:
Open Anaconda Prompt in Administrative mode.
conda update conda 3. conda update anaconda
conda create -n dlib_env python=3.7
conda activate dlib_env
conda install -c conda-forge dlib
python
7.1 >>> import dlib 7.2 >>> dlib.version

Source


I am trying to re-install r in my ubuntu 14.04. But I keep getting this error always I try to install r as sudo apt-get install r-base

Question: The following packages have unmet dependencies:
 r-base : Depends: r-base-core (>= 3.2.1-1utopic0) but it is not going to be installed
          Depends: r-recommended (= 3.2.1-1utopic0) but it is not going to be installed
          Recommends: r-base-html but it is not going to be installed
 r-base-dev : Depends: r-base-core (>= 3.2.1-1utopic0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Answer: Run:
<code>sudo apt-get -f install
sudo apt-get update
sudo apt-get install r-base
</code>
This may fix the problem for you, otherwise check here for additional troubleshooting.


How to run Signal Desktop in the background?

Question: How is it possible to run Signal Desktop in the background on Ubuntu with a little icon in the taskbar at the top of the screen?
Answer: From the command line or as Startup Application:
signal-desktop --start-in-tray --no-sandbox

--no-sandbox is needed because the Debian package does not install the sandbox helper as SUID. It is taken directly from the .desktop file, i.e. Signal is run with that option when you start it normally from the launcher in your DE.
--start-in-tray instead of --use-tray-icon because the latter option opens the main window at startup.
It's going to use the same amount of RAM minimised to the tray as it would with the main window open, though. It's just for tidying up your active windows.
Source: Reddit post.
Comment: That `.` by the end is a mistake, is it?


When to use grids vs lists?

Question: In which cases are grids more useful? With grids I mean something like the homepage of youtube, where you have many rows of videos, and in which cases are lists better, such as the youtube search results, where you have only one video per row??
Answer: That depends on what you want the user to do with this information.
Lists are usually used to just display line item information so the user can select it to do something with it.
Grids, on the other hand, are usually used more for interacting, to let the user change a cell of information, etc.
The YouTube home page is less a grid and more of a ListView type of display with categories.
The search results are lists because the user is looking for a specific item and that makes it easier to find what they are looking for, while the home page allows the user to just "scan" the page to find anything interesting-- it's not as important that the user digest everything they see on the screen.

When to use grids vs lists?


Can I get the Swagger interface to appear on a deployed Azure web API?

Question: When one creates an ASP.NET Core Web API in Visual Studio 2022, and tests it locally, one gets a convenient Swagger page built upon an OpenAPI definition, to test all HTTP endpoints.
However, when deployed and trying to access {path-to-api}/swagger, it returns a 404 Not Found error, even while on localhost, when both the API and the database is sitting on my own machine. Even if the database is in the Azure cloud, for that matter, it also works, if I put the Azure SQL Database connection string into appsettings.json.
So is there a way to achieve this, preferably without too much hassle? Or am I wrong in wanting this, do developers mostly test their APIs locally? Because I want the Swagger API online only for testing.

The problem is getting and using the swagger functionality into the cloud. Is it possible and good practice?
Comment: Can you try to call the exact API from the URL? I guess this works. For example call `https://YOURSITE-webappstatic.azurewebsites.net/weatherforecast`
Comment: I removed the Weatherforecast altogether, but an endpoint which I have, /api/Course, works.
Comment: I checked your question and the answers . it's a good way to follow their steps to try it first. If the solution is indeed helpful, you could mark it as a correct answer to let other one know the solutions. If you have any questions and need help, we are happy to help you.
Answer: If you look at the startup, you will notice that the swagger is only loaded during a development session via an if check. Commenting that out, or expanding it based on evironment, will allow a published version to generate the page on the target host.
if (app.Environment.IsDevelopment())
{
    app.UseSwagger();
    app.UseSwaggerUI();
}

I generally do that for first publishes or to Dev/Test environments to see it running. Once it is not needed, I un-comment it back in.
Also it may be actually viable (turned on) in Dev or UAT server because one is also publishing the open api it to APIM (Azure api manager), which takes the api and generates its own development environment; away from an initial publish.

Also once published, it is not the default page, one still has to path to it such as .../swagger/index.html.
Comment: how do you "path" to it?
Comment: `http://{BaseUrl}/swagger/index.html`
Answer: I'm aborting this mission to deploy the Swagger interface to Azure along with my API. It's bad security practice to make the HTTP request methods so visually available to all. So the answer to my question do developers mostly test their APIs locally, is apparently yes.
I wondered if I should remove the question, but I would like to make it still stand, in case anyone else is contemplating about doing the same thing - exposing an API online with the Swagger UI.


Hadoop streaming: reporting error

Question: What is the best practice for reporting exceptions in Hadoop streaming with Python scripts?
I mean: let's say I have a mapper script that can't understand its input, how do I signal Hadoop to terminate the job & report an error message?
Do I use logging and finish off with sys.exit?
Answer: If you want to signal error, return a non-zero code from your python script. You can write any logging to stderr and hadoop will capture that in the task logs. You can also send status to the reporter and counters by prefixing the stderr lines with reporter:status:<msg> or reporter:counter:<group>,<name>,<increment>
Comment: Python returns 1 if a program terminates with an unhandled exception, so you can either raise an exception or call sys.exit(1).

Hadoop streaming: reporting error


Simple(r) proof that $\pi(2^n)\geq n$?

Question: We can clearly prove that $\pi(2^n)\geq n$ with Bertrand's postulate, but that seems like overkill.
Is there any simpler way one can prove that $\pi(2^n)\geq n$?
Note: $\pi(m)$ is the prime counting function - the number of primes $\leq m$.
Comment: Easy to show that $\pi(2^n)≥\frac n2$, does that help?
Comment: I'm guessing that $\pi$ here does not refer to the number that's approximately 3.14159, since if it did, the answer would be "do it by induction".
Comment: Edited to define $\pi(m)$. @JohnHughes
Comment: Thanks. I'd hate to see an eager high-school student say "Hey, finally a problem I can answer!" and ... :)
Comment: Well, the map $\pi$ cannot cause confusion within the theory of numbers...
Comment: @lulu, $\pi(2^n)≥\frac n2$ comes from the divergence of $\sum \frac1p$, right?
Comment: That would only require $\pi(2^n)\geq n/2$ for "enough" $n$. @lhf
Comment: @ThomasAndrews, right. I meant, from the proof in Hardy and Wright, that $\pi(x)\geqslant\frac{\log x}{2\log2}$ holds for all $x\ge 1$, as in http://math.stackexchange.com/questions/1502852/pix-geqslant-frac-log-x2-log2-for-all-x-geqslant2.
Comment: @lhf I hadn't seen that link, but sure.  That's the argument I had in mind.  Very simple...hard to strengthen.
Answer: I am going to answer my own question in the negative, and say that there is no apparent commonly known "simple" proof.
The existence and public knowledge of a nice proof for $\pi(2^n)\geq \frac{n}{2}$ would indicate if there was a similar-length similar-level proof for $\pi(2^n)\geq n$, someone would know of it.

From "Proofs From The Book," there is an easy proof that:
$$\pi(x)+1\geq \log_e x$$
This proof is easier than the proof that $\pi(2^n)\geq \frac{n}{2}.$
Specifically, if $n\leq x<n+1$ then:
$$\log_e(x)\leq \sum_{m=1}^{n}\frac{1}{m} \leq \prod_{i=1}^{\pi(x)}\frac{1}{1-1/p_i}=\prod_{i=1}^{\pi(x)}\frac{p_i}{p_i-1}\leq \prod_{i=1}^{\pi(x)}\frac{i+1}{i}=\pi(x)+1$$
This lets you prove, for example, that $\pi(x)\geq \log_3(x)$ for all $x$ simply by checking finitely many values - specifically, the $x$ such that $\log_e x -1 \leq \log_3 x,$ which amounts to $x\leq 68922.$
This doesn't get us much close to the desired $\pi(x)\geq\log_2(x).$
This proof does give us $\log_4(x)\leq \pi(x)$ just by checking the cases $x\leq 55$ since $\log_e(x)-1\geq \log_4(x)$ for $x>55.$
Comment: Perhaps you could reproduce the proof of $\pi(2^n)\geq \frac{n}{2}$ just for the record.
Comment: The proof is at http://math.stackexchange.com/questions/1502852/pix-geqslant-frac-log-x2-log2-for-all-x-geqslant2.
Comment: We get a simple proof of $\pi(2^n) \geqslant n-1$ by a small modification of Erdős' argument. Instead of the bound $Q(x) \geqslant \sqrt{x}$ for the squarefree numbers, one can use $Q(x) \geqslant x/2$, which is straightforward to prove. [It's far less neat than Erdős' "no computation needed" argument, and in terms of usefulness, $\pi(x) \geqslant \frac{\log x}{\log 2} - 1$ isn't really an improvement over $\pi(x) \geqslant \frac{\log x}{2\log 2}$. I guess that's why it's hardly ever mentioned.] Getting from that to $\pi(2^n) \geqslant n$ (or generally $\pi(x) \geqslant \frac{\log x}{\log 2}$)
Comment: does however seem to require more serious work, so that Erdős' proof of Bertrand's postulate would win. Or a Chebyshev-like proof of $\pi(x) \geqslant (\log 2 - \varepsilon)\frac{x}{\log x}$ for $x \geqslant x_0$ with manual verification for small $x$.

Simple(r) proof that $\pi(2^n)\geq n$?


Use geometry data type in dynamic query

Question: I am creating a function in PostgreSQL with PostGIS where I accept tables name and the geometry of point and I want to use them in a query inside the function......
CREATE OR REPLACE FUNCTION trial(tbl text[],tag text[],geo geometry)
RETURNS boolean AS
$BODY$
DECLARE i integer;
DECLARE len integer;
DECLARE result boolean;
DECLARE bool boolean;

BEGIN
    result=true;
    SELECT ARRAY_LENGTH(tbl,1) INTO len;
    FOR i IN 1..len LOOP
    EXECUTE format('select st_dwithin(geo::geography,geom::geography,1) from %s where name=any(array[%s]) and st_dwithin(geo::geography,geom::geography,1)=true',tbl[i],tag[i]) into bool;

        IF (bool!=true) THEN
        result=false;
        EXIT;
        END IF;

    END LOOP;
    return result;
END;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;

this shows me the error as
LINE 1: select st_dwithin(geo::geography,geom::geography,1) from grn...

when I use

%s for that geometry

I get the next error
ERROR:  syntax error at or near "AA40E9A0E5440F498329474092A40"
LINE 1: select st_dwithin(0101000020E6100000002AA40E9A0E5440F4983294...

I am a beginner in PostgreSQL... What format specifier can I use in this case?????
Comment: why not save the format result in a string to debug that value?
Answer: You have a few issues with your function.
First of all, in the format() function you can only splice in identifiers and literal values while you need to pass a geography and a text[], both parameters of your function. This basically means that you cannot use the format() function but you should instead use the USING clause. This, incidentally, is good news because format() produces a string and that is quite inefficient (you pass in a geometry which gets converted to a string by format() and then parsed back into a geometry in the server, once for each iteration of the loop). The geo parameter, being a PL/pgSQL variable, will not be resolved by EXECUTE so it must also be supplied through the USING clause.
The dynamic query itself is not particularly well written either. The logic says that you want to return true if at least 1 row having one of the tags is located within 1 meter from geo. Efficiently written, that query would be:
SELECT 1 FROM

WHERE name = ANY(<tags>)
  AND ST_DWithin(<geo>, geom::geography, 1, false)
LIMIT 1;

This obviously assumes that all tables have a name and geom column. If geom is of geography type you can omit the cast. Use false for calculations on the sphere, which is more than adequate for this short distance  and much faster to calculate.
Together with some flow logic improvements, your function then becomes:
CREATE OR REPLACE FUNCTION trial(tbl text[], tag text[], geo geography)
RETURNS boolean AS $BODY$
DECLARE
  t   text;
  res int;
BEGIN
  FOREACH t IN ARRAY tbl LOOP
    EXECUTE 'SELECT 1 FROM ' || quote_ident(t) ||
            '  WHERE name = ANY($1)' ||
            '    AND ST_DWithin($2, geom::geography, 1, false) ' ||
            'LIMIT 1'
        INTO res USING tags, geo;

    IF res IS NULL THEN     -- No value was returned so no nearby points
      RETURN false;
    END IF;
  END LOOP;
  RETURN true;              -- If we get here, all tables have at least 1 match
END;
$BODY$ LANGUAGE plpgsql;
This function takes an array of table names and then determines if all tables have at least 1 point with any of the supplied tags within 1 meter of a specified point. That does not sound too useful to me. Returning a set of text with each row giving the name of the table that does (or does not) meet that criterion looks far more useful, or perhaps even a RETURNS TABLE (tbl name, num int, tags text[]) version that gives for each table the number of points within 1 meter and the matching tags for that table.
Comment: ur suggestion were very much useful to solve my prob.can u tell why we use `select 1 from table`
Comment: What you are testing for is the presence of some data, not the data itself. So you return just the simplest piece of data possible to signal that data is there: 1. If the data is not there, the `EXECUTE` statement will put `NULL` as a result, hence the change in the `IF ... THEN` test.

Use geometry data type in dynamic query


mediastreamvalidator showing "Illegal MIME type" `application/x-mpegURL`

Question: I ran an m3u8 manifest through mediastreamvalidator and then through hlsreport and the first error under "Must Fix Issues" is this:
1. Illegal MIME type

    All Variants, MIME type: application/x-mpegURL
    All Renditions, MIME type: application/x-mpegURL
    Master Playlist, MIME type: application/x-mpegURL

I'm a bit confused because application/x-mpegURL is the apple-recommended MIME type for m3u8 streams. How do I make sense of this?
Answer: Same here, I think only audio/mpegURL and application/vnd.apple.mpegURL are accepted by the program.


Ethernet Network is disabled in 14.04LTS

Question: When I first used Ubuntu 14.04LTS, I could use the ethernet network option in the network menubar to connect with lan, use the ftp server or browse another pc to share anything. I just need to connect to the ethernet network.
Then I faced a problem. My Network icon went away and after a lot of searching on the net I was able to solve the problem.
Then I got this problem. In the network menu option, there is no "wired connection 1" option.I searched on the net, but can find no suitable solution.
So what I want is to get "Wired connection 1" back. Please see the image to understand what my problem really is.

UPD : Output of "lspci -knn | grep Eth -A2".
<code>02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
    Subsystem: Gigabyte Technology Co., Ltd Motherboard [1458:e000]
    Kernel driver in use: r8169
--
04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL-8100/8101L/8139 PCI Fast Ethernet Adapter [10ec:8139] (rev 10)
    Subsystem: Realtek Semiconductor Co., Ltd. RTL-8100/8101L/8139 PCI Fast Ethernet Adapter [10ec:8139]
    Kernel driver in use: 8139too
</code>
Comment: Please [edit] your question and add output of `lspci -knn | grep Eth -A2` terminal command.
Comment: I have updated as u say ...
Answer: Select "Edit Connections...", and rename the one you want (presumably the first one) to "Wired connection 1".
Comment: In edit connections the panel is like this http://postimg.org/image/b5hnkefqf/ if i add a ethernet connection from here, it won't work.              Note: IUT is my DSL connection by which I connect to Internet.


Scoreboard and testfor issues using commandblocks

Question: I'm building on a map in Minecraft, where a player (myself for example) will press a button and his status changes into "The Player is ready for the game to begin".
So, press button -> /scoreboard players set @p IsReady 1
Now I want to test if the player is ready, so
Redstone clock -> /testfor Untertreiberman[score_IsReady=1]
The command block tells me that it can't find the player, but I'm there with a status of "IsReady 1".
Comment: Welcome to StackExchange. I edited your question to improve its readability and (hopefully) clarified it a little bit.
Answer: When you use a /testfor command, you can't use specific usernames to test for people on the server/world.
When testing for people with your score IsReady, use:
/testfor <selector(@p)>[score_IsReady=1]
So when someone is near by the commandblock, it will return true only if someone has IsReady=1.


How to check PEX pipe for embrittlement

Question: As a part of a larger job, I have a plumber replacing water lines. He is going to use PEX. I read that sunlight exposure causes PEX to become brittle very quickly (on the order of a couple of weeks). Based on the I-know-it-all attitude that the plumber has showed on other parts of the project, I am worried that he might have stored the pipe improperly. Is there a way for me to check the state of the pipe before the walls are closed?
Comment: I don't know if there is a test for pex UV exposure. I've read 30 days is enough to cause harm. If your plumber brought the pipe to the job in cardboard boxes it probably was stored correctly.
Comment: https://diy.stackexchange.com/q/67214/46271. Related
Answer: Most water PEX pipe has a UV stable outer coating.
Check the brand and spec sheets. If it is UV stable, its fine unless the sheath is cut or damaged.
NOTE: gas PEX does not have this coating.
Comment: The UV coating is only meant for 30-60 days protection

How to check PEX pipe for embrittlement


which FD is garanteed to be satisfied by R?

Question: Pl explain the logic :
Let relation R(A,B,C,D,E,F,G,H) satisfy the following functional dependencies:
A  → B,
CH → A,
B  → E,
BD → C,
EG → H,
DE → F

Which of the following FDs is also guaranteed to be satisfied by R?
ACG → DH
CDE → AF
BCD → FH
BED → CF

Comment: Show what you've figured out so far and where you're stuck.  Don't expect us to do all your work for you.
Answer: To check whether a functional dependency is satisfied by R you need to take its left-hand side, calculate the closure with respect to the original set of the functional dependencies and then check whether the right-hand side is contained within the closure.
Example: Let us check whether ACG → DH is satisfied by R. We need to calculate the closure of ACG. Since A  → B we know that B should be in the closure of ACG. By the same token, since B  → E we know that E should also be in the closure of ACG. Moreover, since E is in the closure of ACG and trivially G is in the closure of ACG, H is also in the closure (EG → H). We stop here since no new attributes can be inferred and conclude that the closure of ACG is ABCEGH. However, D is not in the closure, so DH is not in the closure and therefore ACG → DH is not satisfied by R.
The remaining functional dependencies can be analysed in the same way.