text1
stringlengths 0
536k
| text2
stringlengths 0
536k
| label
int64 0
1
|
---|---|---|
<p dir="auto">pull request for the code - <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="233342440" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/16589" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/16589/hovercard?comment_id=41919702&comment_type=review" href="https://github.com/pandas-dev/pandas/pull/16589#pullrequestreview-41919702">#16589 (review)</a></p> | <p dir="auto">This is the same problem as described in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="183419690" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/14440" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/14440/hovercard" href="https://github.com/pandas-dev/pandas/issues/14440">#14440</a> but with Timestamp, and the fix should be similar.</p>
<p dir="auto">Probable source of error:<br>
</p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/pandas-dev/pandas/blob/093aa8231eae92ff6cf7ef9564d62289b458aaff/pandas/tslib.pyx#L438">pandas/pandas/tslib.pyx</a>
</p>
<p class="mb-0 color-fg-muted">
Line 438
in
<a data-pjax="true" class="commit-tease-sha" href="/pandas-dev/pandas/commit/093aa8231eae92ff6cf7ef9564d62289b458aaff">093aa82</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L438" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="438"></td>
<td id="LC438" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> result <span class="pl-k">=</span> Timestamp(unit <span class="pl-k">*</span> rounder(value <span class="pl-k">/</span> <span class="pl-k">float</span>(unit)), <span class="pl-smi">unit</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">'</span>ns<span class="pl-pds">'</span></span>) </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<h4 dir="auto">A small, complete example of the issue</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [1] import pandas as pd
In [2]: ts=pd.Timestamp('2016-03-06 18:43:45.950000')
In [3]: ts.floor('10L')
Out [3]: Timestamp('2016-03-06 18:43:45.950000128') "><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">1</span>] <span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-v">In</span> [<span class="pl-c1">2</span>]: <span class="pl-s1">ts</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-v">Timestamp</span>(<span class="pl-s">'2016-03-06 18:43:45.950000'</span>)
<span class="pl-v">In</span> [<span class="pl-c1">3</span>]: <span class="pl-s1">ts</span>.<span class="pl-en">floor</span>(<span class="pl-s">'10L'</span>)
<span class="pl-v">Out</span> [<span class="pl-c1">3</span>]: <span class="pl-v">Timestamp</span>(<span class="pl-s">'2016-03-06 18:43:45.950000128'</span>) </pre></div>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">Timestamp('2016-03-06 18:43:45.950000')</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/pandas-dev/pandas/commit/093aa8231eae92ff6cf7ef9564d62289b458aaff/hovercard" href="https://github.com/pandas-dev/pandas/commit/093aa8231eae92ff6cf7ef9564d62289b458aaff"><tt>093aa82</tt></a><br>
python: 2.7.6.final.0<br>
python-bits: 64<br>
OS: Linux<br>
OS-release: 3.16.0-46-generic<br>
machine: x86_64<br>
processor: x86_64<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: en_US.UTF-8<br>
LOCALE: None.None</p>
<p dir="auto">pandas: 0.19.0+63.g093aa82<br>
nose: 1.3.7<br>
pip: 9.0.0<br>
setuptools: 28.7.1<br>
Cython: 0.25.1<br>
numpy: 1.11.2<br>
scipy: None<br>
statsmodels: None<br>
xarray: None<br>
IPython: 5.1.0<br>
sphinx: None<br>
patsy: None<br>
dateutil: 2.5.3<br>
pytz: 2016.7<br>
blosc: None<br>
bottleneck: None<br>
tables: None<br>
numexpr: None<br>
matplotlib: None<br>
openpyxl: None<br>
xlrd: None<br>
xlwt: None<br>
xlsxwriter: None<br>
lxml: None<br>
bs4: None<br>
html5lib: None<br>
httplib2: None<br>
apiclient: None<br>
sqlalchemy: None<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: None<br>
boto: None<br>
pandas_datareader: None</p> | 0 |
<p dir="auto"><code class="notranslate">Ctrl + Click</code> on a symbol is a shortcut for "Go to definition". I would want to instead select / highlight the text (same as double clicking), just like in Visual Studio.</p>
<p dir="auto">I tried editing the keyboard shortcuts, but it doesn't look like I can use mouse inputs (<code class="notranslate">ctrl+click</code> or <code class="notranslate">ctrl+mouse1</code> or <code class="notranslate">ctrl+mouseleft</code> didn't work).</p>
<p dir="auto">Please consider setting this behavior as a built-in setting in settings.json, or allowing mouse input in keybindings. I realize this might not be very high priority, but if it's not too complex to implement, it would be a great quality of life improvement for me!</p> | <ul dir="auto">
<li>VSCode Version: 1.0.0</li>
<li>OS Version: Windows 10 1511 - 10586</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Generate a New Extension (yeoman -> TypeScript)</li>
<li>src/extension.ts</li>
<li><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/18439500/14579905/e8b8b1e2-03ed-11e6-892a-74223da1e721.png"><img src="https://cloud.githubusercontent.com/assets/18439500/14579905/e8b8b1e2-03ed-11e6-892a-74223da1e721.png" alt="image" style="max-width: 100%;"></a></li>
</ol> | 0 |
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">When interpolating a 2D heatmap on Windows, I get colored artifacts drawn over the 'bad' points. I am using LogNorm for normalization. I suspect it has something to do with the masked values caused by having 0s in a LogNorm. I set then to white with set_bad() function. On Linux, the interpolation looks entirely different (the white areas are not interpolated) and no artifacts can be seen.</p>
<p dir="auto">I've also tried different interpolating methods, all of them seem to create artifacts, except for nearest.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1119915/33780953-87285a06-dc07-11e7-8b87-fd72132b6836.png"><img src="https://user-images.githubusercontent.com/1119915/33780953-87285a06-dc07-11e7-8b87-fd72132b6836.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Zooming in creates more artifacts:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1119915/33780974-982d253e-dc07-11e7-90c9-9c2a9bed356a.png"><img src="https://user-images.githubusercontent.com/1119915/33780974-982d253e-dc07-11e7-90c9-9c2a9bed356a.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Zooming in to one of these artifacts, reveals this:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1119915/33780980-a4db3ea6-dc07-11e7-8dc6-067746dbbc06.png"><img src="https://user-images.githubusercontent.com/1119915/33780980-a4db3ea6-dc07-11e7-8dc6-067746dbbc06.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
import matplotlib.colors
heatmap = [[0] * 32 for _ in range(128)]
cnt = 0
last = 1
for lvl in range(127):
if lvl % 20 < 10:
for i in range(32):
heatmap[lvl][i] = 40
else:
for i in range(32):
heatmap[lvl][i] = 0
jet = plt.get_cmap('jet')
jet.set_bad('white', 1)
plt.imshow(heatmap, origin='lower', interpolation='gaussian', aspect='auto', cmap=jet,
norm=matplotlib.colors.LogNorm())
plt.show()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">colors</span>
<span class="pl-s1">heatmap</span> <span class="pl-c1">=</span> [[<span class="pl-c1">0</span>] <span class="pl-c1">*</span> <span class="pl-c1">32</span> <span class="pl-k">for</span> <span class="pl-s1">_</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">128</span>)]
<span class="pl-s1">cnt</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span>
<span class="pl-s1">last</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span>
<span class="pl-k">for</span> <span class="pl-s1">lvl</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">127</span>):
<span class="pl-k">if</span> <span class="pl-s1">lvl</span> <span class="pl-c1">%</span> <span class="pl-c1">20</span> <span class="pl-c1"><</span> <span class="pl-c1">10</span>:
<span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">32</span>):
<span class="pl-s1">heatmap</span>[<span class="pl-s1">lvl</span>][<span class="pl-s1">i</span>] <span class="pl-c1">=</span> <span class="pl-c1">40</span>
<span class="pl-k">else</span>:
<span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">32</span>):
<span class="pl-s1">heatmap</span>[<span class="pl-s1">lvl</span>][<span class="pl-s1">i</span>] <span class="pl-c1">=</span> <span class="pl-c1">0</span>
<span class="pl-s1">jet</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">get_cmap</span>(<span class="pl-s">'jet'</span>)
<span class="pl-s1">jet</span>.<span class="pl-en">set_bad</span>(<span class="pl-s">'white'</span>, <span class="pl-c1">1</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">imshow</span>(<span class="pl-s1">heatmap</span>, <span class="pl-s1">origin</span><span class="pl-c1">=</span><span class="pl-s">'lower'</span>, <span class="pl-s1">interpolation</span><span class="pl-c1">=</span><span class="pl-s">'gaussian'</span>, <span class="pl-s1">aspect</span><span class="pl-c1">=</span><span class="pl-s">'auto'</span>, <span class="pl-s1">cmap</span><span class="pl-c1">=</span><span class="pl-s1">jet</span>,
<span class="pl-s1">norm</span><span class="pl-c1">=</span><span class="pl-s1">matplotlib</span>.<span class="pl-s1">colors</span>.<span class="pl-v">LogNorm</span>())
<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating system: Windows</li>
<li>Matplotlib version: 2.1.0</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): TkAgg</li>
<li>Python version: 3.6</li>
<li>Jupyter version (if applicable):</li>
<li>Other libraries:</li>
</ul> | <h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">I am using Matplotlib with Basemap to create heatmaps of data.<br>
A change introduced between version 2.0.0 and 2.0.1 caused my code to:</p>
<ul dir="auto">
<li>Produce a different result</li>
<li>Run significantly slower</li>
</ul>
<p dir="auto">The problem still seems to exist in 2.0.2.</p>
<p dir="auto">I also ran some profiling to have a look at the differences, and the increase in time seems to be in the <code class="notranslate">resample</code> function (from 0.473s total time to 19.042s total time)</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import csv
import time
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from mpl_toolkits.basemap import Basemap
def create_basemap():
m = Basemap(projection='cyl', llcrnrlat=-90, urcrnrlat=90,
llcrnrlon=-180, urcrnrlon=180, resolution='c')
m.drawmapboundary(fill_color='#b4d0d0')
m.drawcoastlines(linewidth=0.25, color="#ffffff")
m.fillcontinents(color="grey", lake_color='#b4d0d0')
m.drawparallels(np.arange(-90., 91., 30.), linewidth="0.25", color="#333333")
m.drawmeridians(np.arange(-180., 181., 60.), linewidth="0.25", color="#555555")
return m
def create_heatmap(positions):
heatmap = np.zeros((180, 360))
extents = [[-90, 90], [-180, 180]]
lats, lons = map(list, zip(*positions))
subheatmap, xedges, yedges = np.histogram2d(lats, lons, bins=[180, 360], range=extents)
extent = [xedges[0], xedges[-1], yedges[0], yedges[-1]]
heatmap = np.add(heatmap, subheatmap)
fig = plt.figure()
m = create_basemap()
cmap = cm.jet
cmap.set_bad(alpha=0.0)
im = m.imshow(heatmap, cmap=cmap, interpolation='bicubic', extent=extent, origin='lower', alpha=1.0, norm=matplotlib.colors.LogNorm(), vmin=1, vmax=2, zorder=100)
cb = fig.colorbar(im, shrink=0.5, format="%d")
plt.title("Test")
plt.savefig("test.png", dpi=500, bbox_inches='tight', pad_inches=0.1)
plt.close()
positions = [(50, i) for i in range(50)]
start = time.time()
create_heatmap(positions)
print "Runtime: {0}".format(time.time() - start)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">csv</span>
<span class="pl-k">import</span> <span class="pl-s1">time</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">cm</span> <span class="pl-k">as</span> <span class="pl-s1">cm</span>
<span class="pl-k">from</span> <span class="pl-s1">mpl_toolkits</span>.<span class="pl-s1">basemap</span> <span class="pl-k">import</span> <span class="pl-v">Basemap</span>
<span class="pl-k">def</span> <span class="pl-en">create_basemap</span>():
<span class="pl-s1">m</span> <span class="pl-c1">=</span> <span class="pl-v">Basemap</span>(<span class="pl-s1">projection</span><span class="pl-c1">=</span><span class="pl-s">'cyl'</span>, <span class="pl-s1">llcrnrlat</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">90</span>, <span class="pl-s1">urcrnrlat</span><span class="pl-c1">=</span><span class="pl-c1">90</span>,
<span class="pl-s1">llcrnrlon</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">180</span>, <span class="pl-s1">urcrnrlon</span><span class="pl-c1">=</span><span class="pl-c1">180</span>, <span class="pl-s1">resolution</span><span class="pl-c1">=</span><span class="pl-s">'c'</span>)
<span class="pl-s1">m</span>.<span class="pl-en">drawmapboundary</span>(<span class="pl-s1">fill_color</span><span class="pl-c1">=</span><span class="pl-s">'#b4d0d0'</span>)
<span class="pl-s1">m</span>.<span class="pl-en">drawcoastlines</span>(<span class="pl-s1">linewidth</span><span class="pl-c1">=</span><span class="pl-c1">0.25</span>, <span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s">"#ffffff"</span>)
<span class="pl-s1">m</span>.<span class="pl-en">fillcontinents</span>(<span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s">"grey"</span>, <span class="pl-s1">lake_color</span><span class="pl-c1">=</span><span class="pl-s">'#b4d0d0'</span>)
<span class="pl-s1">m</span>.<span class="pl-en">drawparallels</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">-</span><span class="pl-c1">90.</span>, <span class="pl-c1">91.</span>, <span class="pl-c1">30.</span>), <span class="pl-s1">linewidth</span><span class="pl-c1">=</span><span class="pl-s">"0.25"</span>, <span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s">"#333333"</span>)
<span class="pl-s1">m</span>.<span class="pl-en">drawmeridians</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">-</span><span class="pl-c1">180.</span>, <span class="pl-c1">181.</span>, <span class="pl-c1">60.</span>), <span class="pl-s1">linewidth</span><span class="pl-c1">=</span><span class="pl-s">"0.25"</span>, <span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s">"#555555"</span>)
<span class="pl-k">return</span> <span class="pl-s1">m</span>
<span class="pl-k">def</span> <span class="pl-en">create_heatmap</span>(<span class="pl-s1">positions</span>):
<span class="pl-s1">heatmap</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">zeros</span>((<span class="pl-c1">180</span>, <span class="pl-c1">360</span>))
<span class="pl-s1">extents</span> <span class="pl-c1">=</span> [[<span class="pl-c1">-</span><span class="pl-c1">90</span>, <span class="pl-c1">90</span>], [<span class="pl-c1">-</span><span class="pl-c1">180</span>, <span class="pl-c1">180</span>]]
<span class="pl-s1">lats</span>, <span class="pl-s1">lons</span> <span class="pl-c1">=</span> <span class="pl-en">map</span>(<span class="pl-s1">list</span>, <span class="pl-en">zip</span>(<span class="pl-c1">*</span><span class="pl-s1">positions</span>))
<span class="pl-s1">subheatmap</span>, <span class="pl-s1">xedges</span>, <span class="pl-s1">yedges</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">histogram2d</span>(<span class="pl-s1">lats</span>, <span class="pl-s1">lons</span>, <span class="pl-s1">bins</span><span class="pl-c1">=</span>[<span class="pl-c1">180</span>, <span class="pl-c1">360</span>], <span class="pl-s1">range</span><span class="pl-c1">=</span><span class="pl-s1">extents</span>)
<span class="pl-s1">extent</span> <span class="pl-c1">=</span> [<span class="pl-s1">xedges</span>[<span class="pl-c1">0</span>], <span class="pl-s1">xedges</span>[<span class="pl-c1">-</span><span class="pl-c1">1</span>], <span class="pl-s1">yedges</span>[<span class="pl-c1">0</span>], <span class="pl-s1">yedges</span>[<span class="pl-c1">-</span><span class="pl-c1">1</span>]]
<span class="pl-s1">heatmap</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">add</span>(<span class="pl-s1">heatmap</span>, <span class="pl-s1">subheatmap</span>)
<span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>()
<span class="pl-s1">m</span> <span class="pl-c1">=</span> <span class="pl-en">create_basemap</span>()
<span class="pl-s1">cmap</span> <span class="pl-c1">=</span> <span class="pl-s1">cm</span>.<span class="pl-s1">jet</span>
<span class="pl-s1">cmap</span>.<span class="pl-en">set_bad</span>(<span class="pl-s1">alpha</span><span class="pl-c1">=</span><span class="pl-c1">0.0</span>)
<span class="pl-s1">im</span> <span class="pl-c1">=</span> <span class="pl-s1">m</span>.<span class="pl-en">imshow</span>(<span class="pl-s1">heatmap</span>, <span class="pl-s1">cmap</span><span class="pl-c1">=</span><span class="pl-s1">cmap</span>, <span class="pl-s1">interpolation</span><span class="pl-c1">=</span><span class="pl-s">'bicubic'</span>, <span class="pl-s1">extent</span><span class="pl-c1">=</span><span class="pl-s1">extent</span>, <span class="pl-s1">origin</span><span class="pl-c1">=</span><span class="pl-s">'lower'</span>, <span class="pl-s1">alpha</span><span class="pl-c1">=</span><span class="pl-c1">1.0</span>, <span class="pl-s1">norm</span><span class="pl-c1">=</span><span class="pl-s1">matplotlib</span>.<span class="pl-s1">colors</span>.<span class="pl-v">LogNorm</span>(), <span class="pl-s1">vmin</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">vmax</span><span class="pl-c1">=</span><span class="pl-c1">2</span>, <span class="pl-s1">zorder</span><span class="pl-c1">=</span><span class="pl-c1">100</span>)
<span class="pl-s1">cb</span> <span class="pl-c1">=</span> <span class="pl-s1">fig</span>.<span class="pl-en">colorbar</span>(<span class="pl-s1">im</span>, <span class="pl-s1">shrink</span><span class="pl-c1">=</span><span class="pl-c1">0.5</span>, <span class="pl-s1">format</span><span class="pl-c1">=</span><span class="pl-s">"%d"</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">title</span>(<span class="pl-s">"Test"</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">savefig</span>(<span class="pl-s">"test.png"</span>, <span class="pl-s1">dpi</span><span class="pl-c1">=</span><span class="pl-c1">500</span>, <span class="pl-s1">bbox_inches</span><span class="pl-c1">=</span><span class="pl-s">'tight'</span>, <span class="pl-s1">pad_inches</span><span class="pl-c1">=</span><span class="pl-c1">0.1</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">close</span>()
<span class="pl-s1">positions</span> <span class="pl-c1">=</span> [(<span class="pl-c1">50</span>, <span class="pl-s1">i</span>) <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">50</span>)]
<span class="pl-s1">start</span> <span class="pl-c1">=</span> <span class="pl-s1">time</span>.<span class="pl-en">time</span>()
<span class="pl-en">create_heatmap</span>(<span class="pl-s1">positions</span>)
<span class="pl-k">print</span> <span class="pl-s">"Runtime: {0}"</span>.<span class="pl-en">format</span>(<span class="pl-s1">time</span>.<span class="pl-en">time</span>() <span class="pl-c1">-</span> <span class="pl-s1">start</span>)</pre></div>
<p dir="auto"><strong>Version 2.0.0 outcome</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Runtime: 2.31200003624"><pre class="notranslate"><code class="notranslate">Runtime: 2.31200003624
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8438951/28690404-0c940b66-72e7-11e7-8589-de72d04283e2.png"><img src="https://user-images.githubusercontent.com/8438951/28690404-0c940b66-72e7-11e7-8589-de72d04283e2.png" alt="2 0 0" style="max-width: 100%;"></a></p>
<p dir="auto"><code class="notranslate">python -m cProfile --sort=tottime script.py</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" 667764 function calls (659117 primitive calls) in 3.555 seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
2 0.702 0.351 0.702 0.351 {matplotlib._png.write_png}
2 0.473 0.237 0.473 0.237 {matplotlib._image.resample}
1 0.138 0.138 0.138 0.138 {_tkinter.create}
890 0.117 0.000 0.117 0.000 {method 'is_valid' of '_geoslib.BaseGeometry' objects}
15 0.106 0.007 0.632 0.042 __init__.py:1(<module>)
1 0.090 0.090 0.135 0.135 __init__.py:14(<module>)
296 0.083 0.000 0.083 0.000 {method 'intersection' of '_geoslib.BaseGeometry' objects}
2 0.068 0.034 0.681 0.340 image.py:275(_make_image)
11413 0.055 0.000 0.058 0.000 {numpy.core.multiarray.array}
300 0.050 0.000 0.072 0.000 {method 'draw_path' of 'matplotlib.backends._backend_agg.RendererAgg' objects}
..."><pre class="notranslate"><code class="notranslate"> 667764 function calls (659117 primitive calls) in 3.555 seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
2 0.702 0.351 0.702 0.351 {matplotlib._png.write_png}
2 0.473 0.237 0.473 0.237 {matplotlib._image.resample}
1 0.138 0.138 0.138 0.138 {_tkinter.create}
890 0.117 0.000 0.117 0.000 {method 'is_valid' of '_geoslib.BaseGeometry' objects}
15 0.106 0.007 0.632 0.042 __init__.py:1(<module>)
1 0.090 0.090 0.135 0.135 __init__.py:14(<module>)
296 0.083 0.000 0.083 0.000 {method 'intersection' of '_geoslib.BaseGeometry' objects}
2 0.068 0.034 0.681 0.340 image.py:275(_make_image)
11413 0.055 0.000 0.058 0.000 {numpy.core.multiarray.array}
300 0.050 0.000 0.072 0.000 {method 'draw_path' of 'matplotlib.backends._backend_agg.RendererAgg' objects}
...
</code></pre></div>
<p dir="auto"><strong>Version 2.0.1 outcome</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Runtime: 21.0169999599"><pre class="notranslate"><code class="notranslate">Runtime: 21.0169999599
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8438951/28690462-4f7640a2-72e7-11e7-8688-4d9f7c729cf3.png"><img src="https://user-images.githubusercontent.com/8438951/28690462-4f7640a2-72e7-11e7-8688-4d9f7c729cf3.png" alt="2 0 1" style="max-width: 100%;"></a></p>
<p dir="auto"><code class="notranslate">python -m cProfile --sort=tottime script.py</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" 1763720 function calls (1754827 primitive calls) in 23.725 seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
4 19.042 4.761 19.043 4.761 {matplotlib._image.resample}
2 0.735 0.367 0.735 0.367 {matplotlib._png.write_png}
2 0.609 0.304 1.377 0.688 font_manager.py:558(createFontList)
60 0.138 0.002 0.336 0.006 afm.py:181(_parse_char_metrics)
1 0.135 0.135 0.135 0.135 {_tkinter.create}
2 0.133 0.067 19.309 9.655 image.py:275(_make_image)
890 0.115 0.000 0.115 0.000 {method 'is_valid' of '_geoslib.BaseGeometry' objects}
1 0.107 0.107 0.159 0.159 __init__.py:14(<module>)
15 0.106 0.007 0.637 0.042 __init__.py:1(<module>)
559 0.104 0.000 0.104 0.000 {method 'get_sfnt' of 'matplotlib.ft2font.FT2Font' objects}"><pre class="notranslate"><code class="notranslate"> 1763720 function calls (1754827 primitive calls) in 23.725 seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
4 19.042 4.761 19.043 4.761 {matplotlib._image.resample}
2 0.735 0.367 0.735 0.367 {matplotlib._png.write_png}
2 0.609 0.304 1.377 0.688 font_manager.py:558(createFontList)
60 0.138 0.002 0.336 0.006 afm.py:181(_parse_char_metrics)
1 0.135 0.135 0.135 0.135 {_tkinter.create}
2 0.133 0.067 19.309 9.655 image.py:275(_make_image)
890 0.115 0.000 0.115 0.000 {method 'is_valid' of '_geoslib.BaseGeometry' objects}
1 0.107 0.107 0.159 0.159 __init__.py:14(<module>)
15 0.106 0.007 0.637 0.042 __init__.py:1(<module>)
559 0.104 0.000 0.104 0.000 {method 'get_sfnt' of 'matplotlib.ft2font.FT2Font' objects}
</code></pre></div>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating System: Windows 10</li>
<li>Matplotlib Version: 2.0.0/2.0.1 (from pip)</li>
<li>Python Version: 2.7.13</li>
<li>Jupyter Version (if applicable): N/A</li>
<li>Other Libraries: basemap 1.1.0, numpy 1.13.1</li>
</ul> | 1 |
<h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">I have to create multilingual app but Marathi is not supported by flutter or not yet cooked by MaterialLocalizations.</p>
<p dir="auto">Help me for getting it work for Marathi language.<br>
or Provide Some Tutorial to generate language from arb files</p>
<h2 dir="auto">Logs</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" +179 ms] I/flutter (14098): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
[ +42 ms] I/flutter (14098): The following assertion was thrown building MyAppBar(dirty, state: _AppBarState#858f2):
[ ] I/flutter (14098): No MaterialLocalizations found.
[ ] I/flutter (14098): MyAppBar widgets require MaterialLocalizations to be provided by a Localizations widget ancestor.
[ ] I/flutter (14098): Localizations are used to generate many different messages, labels,and abbreviations which are used
[ ] I/flutter (14098): by the material library.
[ ] I/flutter (14098): To introduce a MaterialLocalizations, either use a MaterialApp at the root of your application to
[ ] I/flutter (14098): include them automatically, or add a Localization widget with a MaterialLocalizations delegate.
[ ] I/flutter (14098): The specific widget that could not find a MaterialLocalizations ancestor was:
[ ] I/flutter (14098): MyAppBar
[ ] I/flutter (14098): The ancestors of this widget were:
[ ] I/flutter (14098): _FlexibleSpaceBarSettings
[ ] I/flutter (14098): ConstrainedBox(BoxConstraints(0.0<=w<=Infinity, 0.0<=h<=79.9))
[ ] I/flutter (14098): MediaQuery(MediaQueryData(size: Size(423.5, 800.0), devicePixelRatio: 2.5, textScaleFactor: 1.0,
[ ] I/flutter (14098): padding: EdgeInsets(0.0, 23.9, 0.0, 0.0), viewInsets: EdgeInsets.zero, alwaysUse24HourFormat:
[ ] I/flutter (14098): false, accessibleNavigation: falsedisableAnimations: falseinvertColors: falseboldText: false))
[ ] I/flutter (14098): LayoutId-[<_ScaffoldSlot.appBar>](id: _ScaffoldSlot.appBar)
[ ] I/flutter (14098): CustomMultiChildLayout
[ ] I/flutter (14098): AnimatedBuilder(animation: AnimationController#7f51c(⏭ 1.000; paused))
[ ] I/flutter (14098): DefaultTextStyle(debugLabel: (englishLike body1).merge(blackMountainView body1), inherit: false,
[ ] I/flutter (14098): color: Color(0xdd000000), family: Roboto, size: 14.0, weight: 400, baseline: alphabetic,
[ ] I/flutter (14098): decoration: TextDecoration.none, softWrap: wrapping at box width, overflow: clip)
[ ] I/flutter (14098): AnimatedDefaultTextStyle(duration: 200ms, debugLabel: (englishLike body1).merge(blackMountainView
[ ] I/flutter (14098): body1), inherit: false, color: Color(0xdd000000), family: Roboto, size: 14.0, weight: 400,
[ ] I/flutter (14098): baseline: alphabetic, decoration: TextDecoration.none, softWrap: wrapping at box width, overflow:
[ ] I/flutter (14098): clip)
[ ] I/flutter (14098): _InkFeatures-[GlobalKey#2aaa0 ink renderer]
[ ] I/flutter (14098): NotificationListener<LayoutChangedNotification>
[ ] I/flutter (14098): PhysicalModel(shape: rectangle, borderRadius: BorderRadius.zero, elevation: 0.0, color:
[ ] I/flutter (14098): Color(0xfffafafa), shadowColor: Color(0xff000000))
[ ] I/flutter (14098): AnimatedPhysicalModel(duration: 200ms, shape: rectangle, borderRadius: BorderRadius.zero,
[ ] I/flutter (14098): elevation: 0.0, color: Color(0xfffafafa), animateColor: false, shadowColor: Color(0xff000000),
[ ] I/flutter (14098): animateShadowColor: true)
[ ] I/flutter (14098): Material(type: canvas, color: Color(0xfffafafa))
[ ] I/flutter (14098): PrimaryScrollController(ScrollController#b0626(one client, offset 0.0))
[ ] I/flutter (14098): _ScaffoldScope
[ ] I/flutter (14098): Scaffold-[LabeledGlobalKey<ScaffoldState>#ba591]
[ ] I/flutter (14098): HomeScreen
[ ] I/flutter (14098): Builder
[ ] I/flutter (14098): RepaintBoundary-[GlobalKey#d90cd]
[ ] I/flutter (14098): IgnorePointer(ignoring: false)
[ ] I/flutter (14098): FadeTransition(opacity: AnimationController#5a0f3(▶ 0.000; for
[ ] I/flutter (14098): PageRouteBuilder<dynamic>)➩ProxyAnimation)
[ ] I/flutter (14098): AnimatedBuilder(animation: Listenable.merge([AnimationController#5a0f3(▶ 0.000; for
[ ] I/flutter (14098): PageRouteBuilder<dynamic>)➩ProxyAnimation,
[ ] I/flutter (14098): kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation]))
[ ] I/flutter (14098): RepaintBoundary
[ +1 ms] I/flutter (14098): _FocusScopeMarker
[ ] I/flutter (14098): Semantics(container: false, properties: SemanticsProperties, label: null, value: null, hint: null,
[ ] I/flutter (14098): hintOverrides: null)
[ ] I/flutter (14098): FocusScope
[ ] I/flutter (14098): PageStorage
[ ] I/flutter (14098): Offstage(offstage: false)
[ ] I/flutter (14098): _ModalScopeStatus(active)
[ ] I/flutter (14098): _ModalScope<dynamic>-[LabeledGlobalKey<_ModalScopeState<dynamic>>#1e8e4]
[ ] I/flutter (14098): _OverlayEntry-[LabeledGlobalKey<_OverlayEntryState>#8527a]
[ ] I/flutter (14098): Stack(alignment: AlignmentDirectional.topStart, fit: expand, overflow: clip)
[ ] I/flutter (14098): _Theatre
[ ] I/flutter (14098): Overlay-[LabeledGlobalKey<OverlayState>#b7ad6]
[ ] I/flutter (14098): _FocusScopeMarker
[ ] I/flutter (14098): Semantics(container: false, properties: SemanticsProperties, label: null, value: null, hint: null,
[ ] I/flutter (14098): hintOverrides: null)
[ ] I/flutter (14098): FocusScope
[ ] I/flutter (14098): AbsorbPointer(absorbing: false)
[ ] I/flutter (14098): Listener(listeners: [down, up, cancel], behavior: deferToChild)
[ ] I/flutter (14098): Navigator-[GlobalObjectKey<NavigatorState> _WidgetsAppState#752c4]
[ ] I/flutter (14098): DefaultTextStyle(debugLabel: fallback style; consider putting your text in a Material, inherit:
[ ] I/flutter (14098): true, color: Color(0xd0ff0000), family: monospace, size: 48.0, weight: 900, decoration: double
[ ] I/flutter (14098): Color(0xffffff00) TextDecoration.underline, softWrap: wrapping at box width, overflow: clip)
[ ] I/flutter (14098): Title(title: "Adil Store", color: Color(0xff0288d1))
[ ] I/flutter (14098): Directionality(textDirection: ltr)
[ ] I/flutter (14098): _LocalizationsScope-[GlobalKey#e1a98]
[ ] I/flutter (14098): Semantics(container: false, properties: SemanticsProperties, label: null, value: null, hint: null,
[ ] I/flutter (14098): textDirection: ltr, hintOverrides: null)
[ ] I/flutter (14098): Localizations(locale: mr_IN, delegates: [TranslationsDelegate[Translations],
[ ] I/flutter (14098): _MaterialLocalizationsDelegate[MaterialLocalizations],
[ ] I/flutter (14098): _WidgetsLocalizationsDelegate[WidgetsLocalizations],
[ ] I/flutter (14098): _MaterialLocalizationsDelegate[MaterialLocalizations],
[ ] I/flutter (14098): _WidgetsLocalizationsDelegate[WidgetsLocalizations]])
[ ] I/flutter (14098): MediaQuery(MediaQueryData(size: Size(423.5, 800.0), devicePixelRatio: 2.5, textScaleFactor: 1.0,
[ ] I/flutter (14098): padding: EdgeInsets(0.0, 23.9, 0.0, 0.0), viewInsets: EdgeInsets.zero, alwaysUse24HourFormat:
[ ] I/flutter (14098): false, accessibleNavigation: falsedisableAnimations: falseinvertColors: falseboldText: false))
[ ] I/flutter (14098): WidgetsApp-[GlobalObjectKey _MaterialAppState#5934e]
[ ] I/flutter (14098): IconTheme(IconThemeData#2abdc(color: Color(0xdd000000)))
[ ] I/flutter (14098): _InheritedTheme
[ ] I/flutter (14098): Theme(ThemeData#ce7a6(primaryColor: Color(0xff0288d1), accentColor: MaterialColor(primary value:
[ ] I/flutter (14098): Color(0xfff44336)), indicatorColor: MaterialColor(primary value: Color(0xfff44336)),
[ ] I/flutter (14098): toggleableActiveColor: MaterialColor(primary value: Color(0xfff44336)), buttonTheme:
[ ] I/flutter (14098): ButtonThemeData#b7822, textTheme: TextTheme#9edf9, primaryTextTheme: TextTheme#60427(display4:
[ ] I/flutter (14098): TextStyle(debugLabel: whiteMountainView display4, inherit: true, color: Color(0xb3ffffff), family:
[ ] I/flutter (14098): Roboto, decoration: TextDecoration.none), display3: TextStyle(debugLabel: whiteMountainView
[ ] I/flutter (14098): display3, inherit: true, color: Color(0xb3ffffff), family: Roboto, decoration:
[ ] I/flutter (14098): TextDecoration.none), display2: TextStyle(debugLabel: whiteMountainView display2, inherit: true,
[ ] I/flutter (14098): color: Color(0xb3ffffff), family: Roboto, decoration: TextDecoration.none), display1:
[ ] I/flutter (14098): TextStyle(debugLabel: whiteMountainView display1, inherit: true, color: Color(0xb3ffffff), family:
[ ] I/flutter (14098): Roboto, decoration: TextDecoration.none), headline: TextStyle(debugLabel: whiteMountainView
[ ] I/flutter (14098): headline, inherit: true, color: Color(0xffffffff), family: Roboto, decoration:
[ ] I/flutter (14098): TextDecoration.none), title: TextStyle(debugLabel: whiteMountainView title, inherit: true, color:
[ ] I/flutter (14098): Color(0xffffffff), family: Roboto, decoration: TextDecoration.none), subhead:
[ ] I/flutter (14098): TextStyle(debugLabel: whiteMountainView subhead, inherit: true, color: Color(0xffffffff), family:
[ ] I/flutter (14098): Roboto, decoration: TextDecoration.none), body2: TextStyle(debugLabel: whiteMountainView body2,
[ ] I/flutter (14098): inherit: true, color: Color(0xffffffff), family: Roboto, decoration: TextDecoration.none), body1:
[ ] I/flutter (14098): TextStyle(debugLabel: whiteMountainView body1, inherit: true, color: Color(0xffffffff), family:
[ ] I/flutter (14098): Roboto, decoration: TextDecoration.none), caption: TextStyle(debugLabel: whiteMountainView
[ ] I/flutter (14098): caption, inherit: true, color: Color(0xb3ffffff), family: Roboto, decoration:
[ ] I/flutter (14098): TextDecoration.none), button: TextStyle(debugLabel: whiteMountainView button, inherit: true,
[ ] I/flutter (14098): color: Color(0xffffffff), family: Roboto, decoration: TextDecoration.none)), accentTextTheme:
[ ] I/flutter (14098): TextTheme#60427(display4: TextStyle(debugLabel: whiteMountainView display4, inherit: true, color:
[ ] I/flutter (14098): Color(0xb3ffffff), family: Roboto, decoration: TextDecoration.none), display3:
[ ] I/flutter (14098): TextStyle(debugLabel: whiteMountainView display3, inherit: true, color: Color(0xb3ffffff), family:
[ ] I/flutter (14098): Roboto, decoration: TextDecoration.none), display2: TextStyle(debugLabel: whiteMountainView
[ ] I/flutter (14098): display2, inherit: true, color: Color(0xb3ffffff), family: Roboto, decoration:
[ ] I/flutter (14098): TextDecoration.none), display1: TextStyle(debugLabel: whiteMountainView display1, inherit: true,
[ ] I/flutter (14098): color: Color(0xb3ffffff), family: Roboto, decoration: TextDecoration.none), headline:
[ ] I/flutter (14098): TextStyle(debugLabel: whiteMountainView headline, inherit: true, color: Color(0xffffffff), family:
[ ] I/flutter (14098): Roboto, decoration: TextDecoration.none), title: TextStyle(debugLabel: whiteMountainView title,
[ ] I/flutter (14098): inherit: true, color: Color(0xffffffff), family: Roboto, decoration: TextDecoration.none),
[ ] I/flutter (14098): subhead: TextStyle(debugLabel: whiteMountainView subhead, inherit: true, color: Color(0xffffffff),
[ ] I/flutter (14098): family: Roboto, decoration: TextDecoration.none), body2: TextStyle(debugLabel: whiteMountainView
[ ] I/flutter (14098): body2, inherit: true, color: Color(0xffffffff), family: Roboto, decoration: TextDecoration.none),
[ ] I/flutter (14098): body1: TextStyle(debugLabel: whiteMountainView body1, inherit: true, color: Color(0xffffffff),
[ +2 ms] I/flutter (14098): family: Roboto, decoration: TextDecoration.none), caption: TextStyle(debugLabel: whiteMountainView
[ +1 ms] I/flutter (14098): caption, inherit: true, color: Color(0xb3ffffff), family: Roboto, decoration:
[ ] I/flutter (14098): TextDecoration.none), button: TextStyle(debugLabel: whiteMountainView button, inherit: true,
[ ] I/flutter (14098): color: Color(0xffffffff), family: Roboto, decoration: TextDecoration.none)), inputDecorationTheme:
[ ] I/flutter (14098): InputDecorationTheme#5a215, iconTheme: IconThemeData#2abdc(color: Color(0xdd000000)),
[ ] I/flutter (14098): primaryIconTheme: IconThemeData#15fa8(color: Color(0xffffffff)), accentIconTheme:
[ ] I/flutter (14098): IconThemeData#15fa8(color: Color(0xffffffff)), sliderTheme:
[ ] I/flutter (14098): SliderThemeData#08b92(activeTrackColor: Color(0xff0288d1), inactiveTrackColor: Color(0x3d0288d1),
[ ] I/flutter (14098): inactiveTickMarkColor: Color(0x8a0288d1), thumbColor: Color(0xff0288d1), overlayColor:
[ ] I/flutter (14098): Color(0x290288d1), valueIndicatorColor: Color(0xff0288d1)), tabBarTheme: TabBarTheme#12410,
[ ] I/flutter (14098): chipTheme: ChipThemeData#ff3fc(secondarySelectedColor: Color(0x3d0288d1), secondaryLabelStyle:
[ ] I/flutter (14098): TextStyle(debugLabel: (blackMountainView body2).copyWith, inherit: true, color: Color(0xde0288d1),
[ ] I/flutter (14098): family: Roboto, decoration: TextDecoration.none)), materialTapTargetSize:
[ ] I/flutter (14098): MaterialTapTargetSize.padded, pageTransitionsTheme: PageTransitionsTheme#38f14))
[ ] I/flutter (14098): AnimatedTheme(duration: 200ms)
[ ] I/flutter (14098): ScrollConfiguration(behavior: _MaterialScrollBehavior)
[ ] I/flutter (14098): MaterialApp
[ ] I/flutter (14098): AuthProvider
[ ] I/flutter (14098): MyApp
[ ] I/flutter (14098): [root]
[ ] I/flutter (14098):
[ ] I/flutter (14098): When the exception was thrown, this was the stack:
[ ] I/flutter (14098): #0 debugCheckHasMaterialLocalizations.<anonymous closure> (package:flutter/src/material/debug.dart:124:7)
[ ] I/flutter (14098): #1 debugCheckHasMaterialLocalizations (package:flutter/src/material/debug.dart:127:4)
[ ] I/flutter (14098): #2 _AppBarState.build (package:flutter/src/material/app_bar.dart:336:12)
[ ] I/flutter (14098): #3 StatefulElement.build (package:flutter/src/widgets/framework.dart:3766:27)
[ ] I/flutter (14098): #4 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3678:15)
[ ] I/flutter (14098): #5 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #6 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #7 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #8 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #9 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #10 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #11 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #12 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ +2 ms] I/flutter (14098): #13 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #14 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #15 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #16 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #17 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #18 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #19 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #20 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ +1 ms] I/flutter (14098): #21 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #22 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #23 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #24 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #25 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #26 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #27 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #28 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #29 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #30 ParentDataElement.mount (package:flutter/src/widgets/framework.dart:3993:11)
[ +307 ms] DevFS: Sync finished
[ ] Syncing files to device Redmi Note 5 Pro... (completed)
[ +1 ms] Synced 2.4MB.
[ +2 ms] _flutter.listViews: {isolateId: isolates/596812039}
[ +15 ms] Connected to _flutterView/0x7e88b78d98.
[ +2 ms] 🔥 To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
[ ] An Observatory debugger and profiler on Redmi Note 5 Pro is available at: http://127.0.0.1:50524/
[ ] For a more detailed help message, press "h". To detach, press "d"; to quit, press "q".
[ +42 ms] W/Firestore(14098): (0.6.6-dev) [Firestore]: The behavior for java.util.Date objects stored in Firestore is going to change AND YOUR APP MAY BREAK.
[ ] W/Firestore(14098): To hide this warning and ensure your app does not break, you need to add the following code to your app before calling any other Cloud Firestore method
s:
[ ] W/Firestore(14098):
[ ] W/Firestore(14098): FirebaseFirestore firestore = FirebaseFirestore.getInstance();
[ ] W/Firestore(14098): FirebaseFirestoreSettings settings = new FirebaseFirestoreSettings.Builder()
[ ] W/Firestore(14098): .setTimestampsInSnapshotsEnabled(true)
[ ] W/Firestore(14098): .build();
[ ] W/Firestore(14098): firestore.setFirestoreSettings(settings);
[ ] W/Firestore(14098):
[ ] W/Firestore(14098): With this change, timestamps stored in Cloud Firestore will be read back as com.google.firebase.Timestamp objects instead of as system java.util.Date o
bjects. So you will also need to update code expecting a java.util.Date to instead expect a Timestamp. For example:
[ ] W/Firestore(14098):
[ ] W/Firestore(14098): // Old:
[ ] W/Firestore(14098): java.util.Date date = snapshot.getDate("created_at");
[ ] W/Firestore(14098): // New:
[ ] W/Firestore(14098): Timestamp timestamp = snapshot.getTimestamp("created_at");
[ ] W/Firestore(14098): java.util.Date date = timestamp.toDate();
[ ] W/Firestore(14098):
[ ] W/Firestore(14098): Please audit all existing usages of java.util.Date when you enable the new behavior. In a future release, the behavior will be changed to the new behav
ior, so if you do not follow these steps, YOUR APP MAY BREAK.
[ ] W/zygote64(14098): Unsupported class loader
[ +1 ms] W/zygote64(14098): Skipping duplicate class check due to unsupported classloader
[ +3 ms] I/DynamiteModule(14098): Considering local module com.google.android.gms.flags:3 and remote module com.google.android.gms.flags:3
[ +1 ms] I/DynamiteModule(14098): Selected local version of com.google.android.gms.flags
[ +5 ms] I/zygote64(14098): The ClassLoaderContext is a special shared library.
[ +17 ms] I/zygote64(14098): The ClassLoaderContext is a special shared library.
[ ] V/NativeCrypto(14098): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 287 native methods...
[ +67 ms] I/ProviderInstaller(14098): Installed default security provider GmsCore_OpenSSL
[ +620 ms] I/flutter (14098): hehe2 null
[ +3 ms] I/flutter (14098): #31 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ +2 ms] I/flutter (14098): #32 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4901:32)
[ ] I/flutter (14098): #33 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #34 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #35 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ +17 ms] I/flutter (14098): #36 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ +3 ms] I/flutter (14098): #37 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #38 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #39 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #40 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #41 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #42 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #43 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #44 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #45 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #46 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #47 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #48 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #49 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #50 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #51 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #52 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #53 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #54 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #55 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #56 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #57 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #58 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #59 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #60 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #61 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #62 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #63 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #64 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #65 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #66 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #67 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #68 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #69 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #70 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #71 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #72 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #73 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #74 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #75 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #76 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #77 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #78 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #79 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #80 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #81 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #82 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #83 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #84 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #85 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #86 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #87 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #88 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #89 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #90 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #91 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #92 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #93 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #94 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #95 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #96 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #97 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #98 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #99 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #100 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #101 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #102 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #103 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #104 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #105 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #106 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #107 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #108 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #109 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #110 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #111 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #112 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #113 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #114 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #115 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #116 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #117 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #118 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #119 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #120 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #121 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #122 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #123 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #124 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #125 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #126 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #127 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #128 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #129 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #130 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #131 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #132 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #133 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #134 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #135 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #136 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #137 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #138 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #139 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #140 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #141 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #142 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #143 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #144 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #145 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #146 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #147 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #148 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #149 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #150 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #151 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #152 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #153 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #154 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #155 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #156 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #157 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #158 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #159 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #160 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #161 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #162 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #163 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #164 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #165 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #166 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #167 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #168 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #169 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #170 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #171 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #172 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #173 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #174 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #175 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #176 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #177 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4579:32)
[ +672 ms] I/flutter (14098): hehe2 null
[ +10 ms] I/flutter (14098): 0
[ +278 ms] I/flutter (14098): #178 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4911:17)
[ +2 ms] I/flutter (14098): #179 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15)
[ +1 ms] I/flutter (14098): #180 _TheatreElement.update (package:flutter/src/widgets/overlay.dart:507:16)
[ ] I/flutter (14098): #181 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15)
[ +1 ms] I/flutter (14098): #182 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ +1 ms] I/flutter (14098): #183 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ +1 ms] I/flutter (14098): #184 StatefulElement.update (package:flutter/src/widgets/framework.dart:3835:5)
[ +1 ms] I/flutter (14098): #185 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15)
[ +1 ms] I/flutter (14098): #186 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #187 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #188 ProxyElement.update (package:flutter/src/widgets/framework.dart:3947:5)
[ +1 ms] I/flutter (14098): #189 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15)
[ +1 ms] I/flutter (14098): #190 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4803:14)
[ ] I/flutter (14098): #191 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15)
[ +2 ms] I/flutter (14098): #192 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ +1 ms] I/flutter (14098): #193 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #194 StatefulElement.update (package:flutter/src/widgets/framework.dart:3835:5)
[ ] I/flutter (14098): #195 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15)
[ ] I/flutter (14098): #196 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4803:14)
[ ] I/flutter (14098): #197 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15)
[ ] I/flutter (14098): #198 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4803:14)
[ ] I/flutter (14098): #199 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15)
[ ] I/flutter (14098): #200 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #201 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #202 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2273:33)
[ ] I/flutter (14098): #203 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBindi
ng.drawFrame (package:flutter/src/widgets/binding.dart:673:20)
[ ] I/flutter (14098): #204 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersi
stentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
[ ] I/flutter (14098): #205 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.d
art:990:15)
[ ] I/flutter (14098): #206 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:9
30:9)
[ ] I/flutter (14098): #207 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:
842:5)
[ ] I/flutter (14098): #208 _invoke (dart:ui/hooks.dart:139:13)
[ ] I/flutter (14098): #209 _drawFrame (dart:ui/hooks.dart:128:3)
[ ] I/flutter (14098): ════════════════════════════════════════════════════════════════════════════════════════════════════
[ ] I/flutter (14098): Another exception was thrown: No MaterialLocalizations found.
[+1321 ms] I/chatty (14098): uid=10315(com.adilstore.rakeshproject) 1.ui identical 1 line
[ ] I/flutter (14098): Another exception was thrown: No MaterialLocalizations found."><pre class="notranslate"><code class="notranslate"> +179 ms] I/flutter (14098): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
[ +42 ms] I/flutter (14098): The following assertion was thrown building MyAppBar(dirty, state: _AppBarState#858f2):
[ ] I/flutter (14098): No MaterialLocalizations found.
[ ] I/flutter (14098): MyAppBar widgets require MaterialLocalizations to be provided by a Localizations widget ancestor.
[ ] I/flutter (14098): Localizations are used to generate many different messages, labels,and abbreviations which are used
[ ] I/flutter (14098): by the material library.
[ ] I/flutter (14098): To introduce a MaterialLocalizations, either use a MaterialApp at the root of your application to
[ ] I/flutter (14098): include them automatically, or add a Localization widget with a MaterialLocalizations delegate.
[ ] I/flutter (14098): The specific widget that could not find a MaterialLocalizations ancestor was:
[ ] I/flutter (14098): MyAppBar
[ ] I/flutter (14098): The ancestors of this widget were:
[ ] I/flutter (14098): _FlexibleSpaceBarSettings
[ ] I/flutter (14098): ConstrainedBox(BoxConstraints(0.0<=w<=Infinity, 0.0<=h<=79.9))
[ ] I/flutter (14098): MediaQuery(MediaQueryData(size: Size(423.5, 800.0), devicePixelRatio: 2.5, textScaleFactor: 1.0,
[ ] I/flutter (14098): padding: EdgeInsets(0.0, 23.9, 0.0, 0.0), viewInsets: EdgeInsets.zero, alwaysUse24HourFormat:
[ ] I/flutter (14098): false, accessibleNavigation: falsedisableAnimations: falseinvertColors: falseboldText: false))
[ ] I/flutter (14098): LayoutId-[<_ScaffoldSlot.appBar>](id: _ScaffoldSlot.appBar)
[ ] I/flutter (14098): CustomMultiChildLayout
[ ] I/flutter (14098): AnimatedBuilder(animation: AnimationController#7f51c(⏭ 1.000; paused))
[ ] I/flutter (14098): DefaultTextStyle(debugLabel: (englishLike body1).merge(blackMountainView body1), inherit: false,
[ ] I/flutter (14098): color: Color(0xdd000000), family: Roboto, size: 14.0, weight: 400, baseline: alphabetic,
[ ] I/flutter (14098): decoration: TextDecoration.none, softWrap: wrapping at box width, overflow: clip)
[ ] I/flutter (14098): AnimatedDefaultTextStyle(duration: 200ms, debugLabel: (englishLike body1).merge(blackMountainView
[ ] I/flutter (14098): body1), inherit: false, color: Color(0xdd000000), family: Roboto, size: 14.0, weight: 400,
[ ] I/flutter (14098): baseline: alphabetic, decoration: TextDecoration.none, softWrap: wrapping at box width, overflow:
[ ] I/flutter (14098): clip)
[ ] I/flutter (14098): _InkFeatures-[GlobalKey#2aaa0 ink renderer]
[ ] I/flutter (14098): NotificationListener<LayoutChangedNotification>
[ ] I/flutter (14098): PhysicalModel(shape: rectangle, borderRadius: BorderRadius.zero, elevation: 0.0, color:
[ ] I/flutter (14098): Color(0xfffafafa), shadowColor: Color(0xff000000))
[ ] I/flutter (14098): AnimatedPhysicalModel(duration: 200ms, shape: rectangle, borderRadius: BorderRadius.zero,
[ ] I/flutter (14098): elevation: 0.0, color: Color(0xfffafafa), animateColor: false, shadowColor: Color(0xff000000),
[ ] I/flutter (14098): animateShadowColor: true)
[ ] I/flutter (14098): Material(type: canvas, color: Color(0xfffafafa))
[ ] I/flutter (14098): PrimaryScrollController(ScrollController#b0626(one client, offset 0.0))
[ ] I/flutter (14098): _ScaffoldScope
[ ] I/flutter (14098): Scaffold-[LabeledGlobalKey<ScaffoldState>#ba591]
[ ] I/flutter (14098): HomeScreen
[ ] I/flutter (14098): Builder
[ ] I/flutter (14098): RepaintBoundary-[GlobalKey#d90cd]
[ ] I/flutter (14098): IgnorePointer(ignoring: false)
[ ] I/flutter (14098): FadeTransition(opacity: AnimationController#5a0f3(▶ 0.000; for
[ ] I/flutter (14098): PageRouteBuilder<dynamic>)➩ProxyAnimation)
[ ] I/flutter (14098): AnimatedBuilder(animation: Listenable.merge([AnimationController#5a0f3(▶ 0.000; for
[ ] I/flutter (14098): PageRouteBuilder<dynamic>)➩ProxyAnimation,
[ ] I/flutter (14098): kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation]))
[ ] I/flutter (14098): RepaintBoundary
[ +1 ms] I/flutter (14098): _FocusScopeMarker
[ ] I/flutter (14098): Semantics(container: false, properties: SemanticsProperties, label: null, value: null, hint: null,
[ ] I/flutter (14098): hintOverrides: null)
[ ] I/flutter (14098): FocusScope
[ ] I/flutter (14098): PageStorage
[ ] I/flutter (14098): Offstage(offstage: false)
[ ] I/flutter (14098): _ModalScopeStatus(active)
[ ] I/flutter (14098): _ModalScope<dynamic>-[LabeledGlobalKey<_ModalScopeState<dynamic>>#1e8e4]
[ ] I/flutter (14098): _OverlayEntry-[LabeledGlobalKey<_OverlayEntryState>#8527a]
[ ] I/flutter (14098): Stack(alignment: AlignmentDirectional.topStart, fit: expand, overflow: clip)
[ ] I/flutter (14098): _Theatre
[ ] I/flutter (14098): Overlay-[LabeledGlobalKey<OverlayState>#b7ad6]
[ ] I/flutter (14098): _FocusScopeMarker
[ ] I/flutter (14098): Semantics(container: false, properties: SemanticsProperties, label: null, value: null, hint: null,
[ ] I/flutter (14098): hintOverrides: null)
[ ] I/flutter (14098): FocusScope
[ ] I/flutter (14098): AbsorbPointer(absorbing: false)
[ ] I/flutter (14098): Listener(listeners: [down, up, cancel], behavior: deferToChild)
[ ] I/flutter (14098): Navigator-[GlobalObjectKey<NavigatorState> _WidgetsAppState#752c4]
[ ] I/flutter (14098): DefaultTextStyle(debugLabel: fallback style; consider putting your text in a Material, inherit:
[ ] I/flutter (14098): true, color: Color(0xd0ff0000), family: monospace, size: 48.0, weight: 900, decoration: double
[ ] I/flutter (14098): Color(0xffffff00) TextDecoration.underline, softWrap: wrapping at box width, overflow: clip)
[ ] I/flutter (14098): Title(title: "Adil Store", color: Color(0xff0288d1))
[ ] I/flutter (14098): Directionality(textDirection: ltr)
[ ] I/flutter (14098): _LocalizationsScope-[GlobalKey#e1a98]
[ ] I/flutter (14098): Semantics(container: false, properties: SemanticsProperties, label: null, value: null, hint: null,
[ ] I/flutter (14098): textDirection: ltr, hintOverrides: null)
[ ] I/flutter (14098): Localizations(locale: mr_IN, delegates: [TranslationsDelegate[Translations],
[ ] I/flutter (14098): _MaterialLocalizationsDelegate[MaterialLocalizations],
[ ] I/flutter (14098): _WidgetsLocalizationsDelegate[WidgetsLocalizations],
[ ] I/flutter (14098): _MaterialLocalizationsDelegate[MaterialLocalizations],
[ ] I/flutter (14098): _WidgetsLocalizationsDelegate[WidgetsLocalizations]])
[ ] I/flutter (14098): MediaQuery(MediaQueryData(size: Size(423.5, 800.0), devicePixelRatio: 2.5, textScaleFactor: 1.0,
[ ] I/flutter (14098): padding: EdgeInsets(0.0, 23.9, 0.0, 0.0), viewInsets: EdgeInsets.zero, alwaysUse24HourFormat:
[ ] I/flutter (14098): false, accessibleNavigation: falsedisableAnimations: falseinvertColors: falseboldText: false))
[ ] I/flutter (14098): WidgetsApp-[GlobalObjectKey _MaterialAppState#5934e]
[ ] I/flutter (14098): IconTheme(IconThemeData#2abdc(color: Color(0xdd000000)))
[ ] I/flutter (14098): _InheritedTheme
[ ] I/flutter (14098): Theme(ThemeData#ce7a6(primaryColor: Color(0xff0288d1), accentColor: MaterialColor(primary value:
[ ] I/flutter (14098): Color(0xfff44336)), indicatorColor: MaterialColor(primary value: Color(0xfff44336)),
[ ] I/flutter (14098): toggleableActiveColor: MaterialColor(primary value: Color(0xfff44336)), buttonTheme:
[ ] I/flutter (14098): ButtonThemeData#b7822, textTheme: TextTheme#9edf9, primaryTextTheme: TextTheme#60427(display4:
[ ] I/flutter (14098): TextStyle(debugLabel: whiteMountainView display4, inherit: true, color: Color(0xb3ffffff), family:
[ ] I/flutter (14098): Roboto, decoration: TextDecoration.none), display3: TextStyle(debugLabel: whiteMountainView
[ ] I/flutter (14098): display3, inherit: true, color: Color(0xb3ffffff), family: Roboto, decoration:
[ ] I/flutter (14098): TextDecoration.none), display2: TextStyle(debugLabel: whiteMountainView display2, inherit: true,
[ ] I/flutter (14098): color: Color(0xb3ffffff), family: Roboto, decoration: TextDecoration.none), display1:
[ ] I/flutter (14098): TextStyle(debugLabel: whiteMountainView display1, inherit: true, color: Color(0xb3ffffff), family:
[ ] I/flutter (14098): Roboto, decoration: TextDecoration.none), headline: TextStyle(debugLabel: whiteMountainView
[ ] I/flutter (14098): headline, inherit: true, color: Color(0xffffffff), family: Roboto, decoration:
[ ] I/flutter (14098): TextDecoration.none), title: TextStyle(debugLabel: whiteMountainView title, inherit: true, color:
[ ] I/flutter (14098): Color(0xffffffff), family: Roboto, decoration: TextDecoration.none), subhead:
[ ] I/flutter (14098): TextStyle(debugLabel: whiteMountainView subhead, inherit: true, color: Color(0xffffffff), family:
[ ] I/flutter (14098): Roboto, decoration: TextDecoration.none), body2: TextStyle(debugLabel: whiteMountainView body2,
[ ] I/flutter (14098): inherit: true, color: Color(0xffffffff), family: Roboto, decoration: TextDecoration.none), body1:
[ ] I/flutter (14098): TextStyle(debugLabel: whiteMountainView body1, inherit: true, color: Color(0xffffffff), family:
[ ] I/flutter (14098): Roboto, decoration: TextDecoration.none), caption: TextStyle(debugLabel: whiteMountainView
[ ] I/flutter (14098): caption, inherit: true, color: Color(0xb3ffffff), family: Roboto, decoration:
[ ] I/flutter (14098): TextDecoration.none), button: TextStyle(debugLabel: whiteMountainView button, inherit: true,
[ ] I/flutter (14098): color: Color(0xffffffff), family: Roboto, decoration: TextDecoration.none)), accentTextTheme:
[ ] I/flutter (14098): TextTheme#60427(display4: TextStyle(debugLabel: whiteMountainView display4, inherit: true, color:
[ ] I/flutter (14098): Color(0xb3ffffff), family: Roboto, decoration: TextDecoration.none), display3:
[ ] I/flutter (14098): TextStyle(debugLabel: whiteMountainView display3, inherit: true, color: Color(0xb3ffffff), family:
[ ] I/flutter (14098): Roboto, decoration: TextDecoration.none), display2: TextStyle(debugLabel: whiteMountainView
[ ] I/flutter (14098): display2, inherit: true, color: Color(0xb3ffffff), family: Roboto, decoration:
[ ] I/flutter (14098): TextDecoration.none), display1: TextStyle(debugLabel: whiteMountainView display1, inherit: true,
[ ] I/flutter (14098): color: Color(0xb3ffffff), family: Roboto, decoration: TextDecoration.none), headline:
[ ] I/flutter (14098): TextStyle(debugLabel: whiteMountainView headline, inherit: true, color: Color(0xffffffff), family:
[ ] I/flutter (14098): Roboto, decoration: TextDecoration.none), title: TextStyle(debugLabel: whiteMountainView title,
[ ] I/flutter (14098): inherit: true, color: Color(0xffffffff), family: Roboto, decoration: TextDecoration.none),
[ ] I/flutter (14098): subhead: TextStyle(debugLabel: whiteMountainView subhead, inherit: true, color: Color(0xffffffff),
[ ] I/flutter (14098): family: Roboto, decoration: TextDecoration.none), body2: TextStyle(debugLabel: whiteMountainView
[ ] I/flutter (14098): body2, inherit: true, color: Color(0xffffffff), family: Roboto, decoration: TextDecoration.none),
[ ] I/flutter (14098): body1: TextStyle(debugLabel: whiteMountainView body1, inherit: true, color: Color(0xffffffff),
[ +2 ms] I/flutter (14098): family: Roboto, decoration: TextDecoration.none), caption: TextStyle(debugLabel: whiteMountainView
[ +1 ms] I/flutter (14098): caption, inherit: true, color: Color(0xb3ffffff), family: Roboto, decoration:
[ ] I/flutter (14098): TextDecoration.none), button: TextStyle(debugLabel: whiteMountainView button, inherit: true,
[ ] I/flutter (14098): color: Color(0xffffffff), family: Roboto, decoration: TextDecoration.none)), inputDecorationTheme:
[ ] I/flutter (14098): InputDecorationTheme#5a215, iconTheme: IconThemeData#2abdc(color: Color(0xdd000000)),
[ ] I/flutter (14098): primaryIconTheme: IconThemeData#15fa8(color: Color(0xffffffff)), accentIconTheme:
[ ] I/flutter (14098): IconThemeData#15fa8(color: Color(0xffffffff)), sliderTheme:
[ ] I/flutter (14098): SliderThemeData#08b92(activeTrackColor: Color(0xff0288d1), inactiveTrackColor: Color(0x3d0288d1),
[ ] I/flutter (14098): inactiveTickMarkColor: Color(0x8a0288d1), thumbColor: Color(0xff0288d1), overlayColor:
[ ] I/flutter (14098): Color(0x290288d1), valueIndicatorColor: Color(0xff0288d1)), tabBarTheme: TabBarTheme#12410,
[ ] I/flutter (14098): chipTheme: ChipThemeData#ff3fc(secondarySelectedColor: Color(0x3d0288d1), secondaryLabelStyle:
[ ] I/flutter (14098): TextStyle(debugLabel: (blackMountainView body2).copyWith, inherit: true, color: Color(0xde0288d1),
[ ] I/flutter (14098): family: Roboto, decoration: TextDecoration.none)), materialTapTargetSize:
[ ] I/flutter (14098): MaterialTapTargetSize.padded, pageTransitionsTheme: PageTransitionsTheme#38f14))
[ ] I/flutter (14098): AnimatedTheme(duration: 200ms)
[ ] I/flutter (14098): ScrollConfiguration(behavior: _MaterialScrollBehavior)
[ ] I/flutter (14098): MaterialApp
[ ] I/flutter (14098): AuthProvider
[ ] I/flutter (14098): MyApp
[ ] I/flutter (14098): [root]
[ ] I/flutter (14098):
[ ] I/flutter (14098): When the exception was thrown, this was the stack:
[ ] I/flutter (14098): #0 debugCheckHasMaterialLocalizations.<anonymous closure> (package:flutter/src/material/debug.dart:124:7)
[ ] I/flutter (14098): #1 debugCheckHasMaterialLocalizations (package:flutter/src/material/debug.dart:127:4)
[ ] I/flutter (14098): #2 _AppBarState.build (package:flutter/src/material/app_bar.dart:336:12)
[ ] I/flutter (14098): #3 StatefulElement.build (package:flutter/src/widgets/framework.dart:3766:27)
[ ] I/flutter (14098): #4 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3678:15)
[ ] I/flutter (14098): #5 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #6 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #7 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #8 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #9 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #10 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #11 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #12 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ +2 ms] I/flutter (14098): #13 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #14 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #15 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #16 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #17 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #18 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #19 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #20 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ +1 ms] I/flutter (14098): #21 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #22 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #23 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #24 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #25 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #26 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #27 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #28 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #29 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #30 ParentDataElement.mount (package:flutter/src/widgets/framework.dart:3993:11)
[ +307 ms] DevFS: Sync finished
[ ] Syncing files to device Redmi Note 5 Pro... (completed)
[ +1 ms] Synced 2.4MB.
[ +2 ms] _flutter.listViews: {isolateId: isolates/596812039}
[ +15 ms] Connected to _flutterView/0x7e88b78d98.
[ +2 ms] 🔥 To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
[ ] An Observatory debugger and profiler on Redmi Note 5 Pro is available at: http://127.0.0.1:50524/
[ ] For a more detailed help message, press "h". To detach, press "d"; to quit, press "q".
[ +42 ms] W/Firestore(14098): (0.6.6-dev) [Firestore]: The behavior for java.util.Date objects stored in Firestore is going to change AND YOUR APP MAY BREAK.
[ ] W/Firestore(14098): To hide this warning and ensure your app does not break, you need to add the following code to your app before calling any other Cloud Firestore method
s:
[ ] W/Firestore(14098):
[ ] W/Firestore(14098): FirebaseFirestore firestore = FirebaseFirestore.getInstance();
[ ] W/Firestore(14098): FirebaseFirestoreSettings settings = new FirebaseFirestoreSettings.Builder()
[ ] W/Firestore(14098): .setTimestampsInSnapshotsEnabled(true)
[ ] W/Firestore(14098): .build();
[ ] W/Firestore(14098): firestore.setFirestoreSettings(settings);
[ ] W/Firestore(14098):
[ ] W/Firestore(14098): With this change, timestamps stored in Cloud Firestore will be read back as com.google.firebase.Timestamp objects instead of as system java.util.Date o
bjects. So you will also need to update code expecting a java.util.Date to instead expect a Timestamp. For example:
[ ] W/Firestore(14098):
[ ] W/Firestore(14098): // Old:
[ ] W/Firestore(14098): java.util.Date date = snapshot.getDate("created_at");
[ ] W/Firestore(14098): // New:
[ ] W/Firestore(14098): Timestamp timestamp = snapshot.getTimestamp("created_at");
[ ] W/Firestore(14098): java.util.Date date = timestamp.toDate();
[ ] W/Firestore(14098):
[ ] W/Firestore(14098): Please audit all existing usages of java.util.Date when you enable the new behavior. In a future release, the behavior will be changed to the new behav
ior, so if you do not follow these steps, YOUR APP MAY BREAK.
[ ] W/zygote64(14098): Unsupported class loader
[ +1 ms] W/zygote64(14098): Skipping duplicate class check due to unsupported classloader
[ +3 ms] I/DynamiteModule(14098): Considering local module com.google.android.gms.flags:3 and remote module com.google.android.gms.flags:3
[ +1 ms] I/DynamiteModule(14098): Selected local version of com.google.android.gms.flags
[ +5 ms] I/zygote64(14098): The ClassLoaderContext is a special shared library.
[ +17 ms] I/zygote64(14098): The ClassLoaderContext is a special shared library.
[ ] V/NativeCrypto(14098): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 287 native methods...
[ +67 ms] I/ProviderInstaller(14098): Installed default security provider GmsCore_OpenSSL
[ +620 ms] I/flutter (14098): hehe2 null
[ +3 ms] I/flutter (14098): #31 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ +2 ms] I/flutter (14098): #32 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4901:32)
[ ] I/flutter (14098): #33 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #34 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #35 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ +17 ms] I/flutter (14098): #36 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ +3 ms] I/flutter (14098): #37 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #38 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #39 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #40 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #41 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #42 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #43 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #44 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #45 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #46 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #47 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #48 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #49 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #50 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #51 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #52 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #53 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #54 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #55 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #56 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #57 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #58 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #59 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #60 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #61 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #62 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #63 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #64 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #65 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #66 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #67 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #68 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #69 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #70 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #71 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #72 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #73 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #74 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #75 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #76 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #77 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #78 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #79 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #80 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #81 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #82 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #83 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #84 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #85 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #86 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #87 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #88 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #89 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #90 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #91 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #92 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #93 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #94 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #95 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #96 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #97 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #98 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #99 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #100 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #101 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #102 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #103 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #104 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #105 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #106 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #107 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #108 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #109 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #110 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #111 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #112 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #113 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #114 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #115 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #116 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #117 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #118 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #119 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #120 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #121 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #122 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #123 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #124 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #125 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #126 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #127 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #128 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #129 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #130 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #131 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #132 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #133 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #134 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #135 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #136 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #137 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #138 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #139 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #140 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #141 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #142 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #143 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #144 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #145 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #146 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #147 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #148 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #149 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #150 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #151 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #152 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #153 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #154 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4796:14)
[ ] I/flutter (14098): #155 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #156 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #157 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #158 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #159 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #160 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #161 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #162 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #163 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #164 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #165 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #166 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #167 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #168 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #169 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #170 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #171 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #172 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658:5)
[ ] I/flutter (14098): #173 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3805:11)
[ ] I/flutter (14098): #174 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653:5)
[ ] I/flutter (14098): #175 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937:14)
[ ] I/flutter (14098): #176 Element.updateChild (package:flutter/src/widgets/framework.dart:2740:12)
[ ] I/flutter (14098): #177 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4579:32)
[ +672 ms] I/flutter (14098): hehe2 null
[ +10 ms] I/flutter (14098): 0
[ +278 ms] I/flutter (14098): #178 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4911:17)
[ +2 ms] I/flutter (14098): #179 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15)
[ +1 ms] I/flutter (14098): #180 _TheatreElement.update (package:flutter/src/widgets/overlay.dart:507:16)
[ ] I/flutter (14098): #181 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15)
[ +1 ms] I/flutter (14098): #182 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ +1 ms] I/flutter (14098): #183 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ +1 ms] I/flutter (14098): #184 StatefulElement.update (package:flutter/src/widgets/framework.dart:3835:5)
[ +1 ms] I/flutter (14098): #185 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15)
[ +1 ms] I/flutter (14098): #186 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #187 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #188 ProxyElement.update (package:flutter/src/widgets/framework.dart:3947:5)
[ +1 ms] I/flutter (14098): #189 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15)
[ +1 ms] I/flutter (14098): #190 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4803:14)
[ ] I/flutter (14098): #191 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15)
[ +2 ms] I/flutter (14098): #192 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ +1 ms] I/flutter (14098): #193 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #194 StatefulElement.update (package:flutter/src/widgets/framework.dart:3835:5)
[ ] I/flutter (14098): #195 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15)
[ ] I/flutter (14098): #196 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4803:14)
[ ] I/flutter (14098): #197 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15)
[ ] I/flutter (14098): #198 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4803:14)
[ ] I/flutter (14098): #199 Element.updateChild (package:flutter/src/widgets/framework.dart:2729:15)
[ ] I/flutter (14098): #200 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3689:16)
[ ] I/flutter (14098): #201 Element.rebuild (package:flutter/src/widgets/framework.dart:3531:5)
[ ] I/flutter (14098): #202 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2273:33)
[ ] I/flutter (14098): #203 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBindi
ng.drawFrame (package:flutter/src/widgets/binding.dart:673:20)
[ ] I/flutter (14098): #204 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersi
stentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
[ ] I/flutter (14098): #205 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.d
art:990:15)
[ ] I/flutter (14098): #206 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:9
30:9)
[ ] I/flutter (14098): #207 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:
842:5)
[ ] I/flutter (14098): #208 _invoke (dart:ui/hooks.dart:139:13)
[ ] I/flutter (14098): #209 _drawFrame (dart:ui/hooks.dart:128:3)
[ ] I/flutter (14098): ════════════════════════════════════════════════════════════════════════════════════════════════════
[ ] I/flutter (14098): Another exception was thrown: No MaterialLocalizations found.
[+1321 ms] I/chatty (14098): uid=10315(com.adilstore.rakeshproject) 1.ui identical 1 line
[ ] I/flutter (14098): Another exception was thrown: No MaterialLocalizations found.
</code></pre></div>
<p dir="auto">///////////////////////////////////////////////Main.dart///////////////////////////////////////////////</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div> | <h2 dir="auto">Steps to Reproduce</h2>
<ol dir="auto">
<li>Follow <a href="https://flutter.io/docs/get-started/install/macos#get-the-flutter-sdk" rel="nofollow">Get the Flutter SDK</a></li>
<li>Copy Flutter to ~/.flutter</li>
<li>Add Flutter to $PATH</li>
<li>Run <code class="notranslate">flutter doctor -v</code></li>
</ol>
<h2 dir="auto">Logs</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Unhandled exception:
FileSystemException: Cannot create file, path = '/Users/<username>/.flutter' (OS Error: Is a directory, errno = 21)
#0 _File.throwIfError (dart:io/file_impl.dart:647:7)
#1 _File.createSync (dart:io/file_impl.dart:285:5)
#2 new IOPersistentProperties (package:usage/src/usage_impl_io.dart:119:13)
#3 new AnalyticsIO (package:usage/src/usage_impl_io.dart:30:17)
#4 new Usage (package:flutter_tools/src/usage.dart:29:18)
#5 runInContext.<anonymous closure> (package:flutter_tools/src/context_runner.dart:83:20)
#6 AppContext._generateIfNecessary.<anonymous closure> (package:flutter_tools/src/base/context.dart:99:41)
#7 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:284:23)
#8 AppContext._generateIfNecessary (package:flutter_tools/src/base/context.dart:87:20)
#9 AppContext.[] (package:flutter_tools/src/base/context.dart:114:32)
#10 Usage.instance (package:flutter_tools/src/usage.dart:53:39)
#11 flutterUsage (package:flutter_tools/src/usage.dart:21:33)
#12 _handleToolError (package:flutter_tools/runner.dart:107:7)
<asynchronous suspension>
#13 run.<anonymous closure> (package:flutter_tools/runner.dart:64:20)
<asynchronous suspension>
#14 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142:29)
<asynchronous suspension>
#15 _rootRun (dart:async/zone.dart:1124:13)
#16 _CustomZone.run (dart:async/zone.dart:1021:19)
#17 _runZoned (dart:async/zone.dart:1516:10)
#18 runZoned (dart:async/zone.dart:1463:12)
#19 AppContext.run (package:flutter_tools/src/base/context.dart:141:18)
<asynchronous suspension>
#20 runInContext (package:flutter_tools/src/context_runner.dart:43:24)
<asynchronous suspension>
#21 run (package:flutter_tools/runner.dart:51:10)
#22 main (package:flutter_tools/executable.dart:51:9)
<asynchronous suspension>
#23 main (file:///b/build/slave/Mac_Flutter_Packaging/build/archive/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#24 _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:287:32)
#25 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)"><pre class="notranslate"><code class="notranslate">Unhandled exception:
FileSystemException: Cannot create file, path = '/Users/<username>/.flutter' (OS Error: Is a directory, errno = 21)
#0 _File.throwIfError (dart:io/file_impl.dart:647:7)
#1 _File.createSync (dart:io/file_impl.dart:285:5)
#2 new IOPersistentProperties (package:usage/src/usage_impl_io.dart:119:13)
#3 new AnalyticsIO (package:usage/src/usage_impl_io.dart:30:17)
#4 new Usage (package:flutter_tools/src/usage.dart:29:18)
#5 runInContext.<anonymous closure> (package:flutter_tools/src/context_runner.dart:83:20)
#6 AppContext._generateIfNecessary.<anonymous closure> (package:flutter_tools/src/base/context.dart:99:41)
#7 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:284:23)
#8 AppContext._generateIfNecessary (package:flutter_tools/src/base/context.dart:87:20)
#9 AppContext.[] (package:flutter_tools/src/base/context.dart:114:32)
#10 Usage.instance (package:flutter_tools/src/usage.dart:53:39)
#11 flutterUsage (package:flutter_tools/src/usage.dart:21:33)
#12 _handleToolError (package:flutter_tools/runner.dart:107:7)
<asynchronous suspension>
#13 run.<anonymous closure> (package:flutter_tools/runner.dart:64:20)
<asynchronous suspension>
#14 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142:29)
<asynchronous suspension>
#15 _rootRun (dart:async/zone.dart:1124:13)
#16 _CustomZone.run (dart:async/zone.dart:1021:19)
#17 _runZoned (dart:async/zone.dart:1516:10)
#18 runZoned (dart:async/zone.dart:1463:12)
#19 AppContext.run (package:flutter_tools/src/base/context.dart:141:18)
<asynchronous suspension>
#20 runInContext (package:flutter_tools/src/context_runner.dart:43:24)
<asynchronous suspension>
#21 run (package:flutter_tools/runner.dart:51:10)
#22 main (package:flutter_tools/executable.dart:51:9)
<asynchronous suspension>
#23 main (file:///b/build/slave/Mac_Flutter_Packaging/build/archive/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#24 _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:287:32)
#25 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div> | 0 |
<p dir="auto">I install kubernetes 1.1.1 in ubuntu and check out the official url <a href="http://kubernetes.io/v1.1/examples/mysql-cinder-pd/README.html" rel="nofollow">http://kubernetes.io/v1.1/examples/mysql-cinder-pd/README.html</a> to create a cinder volume.</p>
<ol dir="auto">
<li>I config the following content in the path "/etc/kubernetes/cloud_config".<br>
[Global]<br>
auth-url=https://*****.v2.0<br>
username=user<br>
password=pass<br>
region=regionOne<br>
tenant-id=0c331a1df18571594d49fe68asa4e</li>
<li>I add the following contend in "/etc/default/kubelet"<br>
--cloud-provider=openstack --cloud-config=/etc/kubernetes/cloud_config</li>
<li>restart the kubernetes service.</li>
<li>create cinder</li>
<li>cluster/kubectl.sh create -f examples/mysql-cinder-pd/mysql.yaml<br>
The error information is following:<br>
It looks as if you don't have a compiled kubectl binary<br>
If you are running from a clone of the git repo, please run<br>
'./build/run.sh hack/build-cross.sh'. Note that this requires having<br>
Docker installed.<br>
If you are running from a binary release tarball, something is wrong.<br>
Look at <a href="http://kubernetes.io/" rel="nofollow">http://kubernetes.io/</a> for information on how to contact the<br>
development team for help.</li>
</ol> | <p dir="auto">I install kubernetes 1.1.1 in ubuntu and check out the official url <a href="http://kubernetes.io/v1.1/examples/mysql-cinder-pd/README.html" rel="nofollow">http://kubernetes.io/v1.1/examples/mysql-cinder-pd/README.html</a> to create a cinder volume.</p>
<p dir="auto">1.I config the following content in the path "/etc/kubernetes/cloud_config". [Global] auth-url=https://*****.v2.0 username=user password=pass region=regionOne tenant-id=0c331a1df18571594d49fe68asa4e<br>
2.I add the following contend in "/etc/default/kubelet"<br>
--cloud-provider=openstack --cloud-config=/etc/kubernetes/cloud_config</p>
<p dir="auto">3.restart the kubernetes service.</p>
<p dir="auto">4.create cinder<br>
5.cluster/kubectl.sh create -f examples/mysql-cinder-pd/mysql.yaml</p>
<p dir="auto">Now I can connect with openstack cinder. But when I create a mysql pod. The pod status is running first, then it changes to be error status.<br>
I check out the kubelet.log.<br>
I find the error Unable to find pair interface, setting up all interfaces: exec: "nsenter": executable file not found in $PATH</p> | 1 |
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/1815" rel="nofollow">http://projects.scipy.org/numpy/ticket/1815</a> on 2011-04-30 by trac user alex_lai, assigned to unknown.</em></p>
<p dir="auto">Hi experts,<br>
I’m wondering if anyone would look into this issue. While testing numpy package, Python crashed with the following error:</p>
<p dir="auto">sbtorsvr391:~ $ cd /home/dcottr/local/tests<br>
sbtorsvr391:<del>/local/tests $ export PYTHONPATH=$PYTHONPATH:</del>/local/lib/python3.1/site-packages</p>
<p dir="auto">sbtorsvr391:~/local/tests $ /usr/local/bin/python3 -c "import numpy; numpy.test()"<br>
Running unit tests for numpy<br>
NumPy version 1.5.1<br>
NumPy is installed in /home/dcottr/local/lib/python3.1/site-packages/numpy</p>
<p dir="auto">Python version 3.1.2 (r312:79147, Mar 23 2010, 02:42:06) [GCC 3.4.6]<br>
nose version 1.0.0<br>
..S...............................................................................................................................................S........Warning: invalid value encountered in isfinite<br>
............................................................................................................................................................................................Warning: invalid value encountered in isinf<br>
Warning: invalid value encountered in isinf<br>
......................................................................................................SSS........................K...........................................................K.....................................................................................................................................................F.F....................K.............................................................................................K...SK.F.......S...........................................................................................Segmentation Fault (core dumped)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Below is the stack trace from the core dump:"><pre class="notranslate"><code class="notranslate"> Below is the stack trace from the core dump:
</code></pre></div>
<h1 dir="auto">mdb core_sbtorsvr391_python3_10439_5000_1304101376_11246</h1>
<p dir="auto">Loading modules: [ libc.so.1 libavl.so.1 libuutil.so.1 ld.so.1 ]</p>
<blockquote>
<p dir="auto">::stack<br>
libc.so.1<code class="notranslate">strlen+0x50(fba55238, ffbf9ef8, ffbf9761, 0, 0, 0) libc.so.1</code>sprintf+0x40(ffbf9f18, 7fffffff, 7ffffc00, 2, 2, 1b74cc)<br>
test_array_from_pyobj_ext.so<code class="notranslate">array_from_pyobj+0x4e0(6, 17d3ec0, 1, 7, 16176c0, ff13a5a0) test_array_from_pyobj_ext.so</code>f2py_rout_wrap_call+0xbc(1, 1, 0, 17f000, fffffffe, fba65b94)<br>
PyCFunction_Call+0x90(15ff350, 1841900, 1844e90, 0, 1, 183df38)<br>
PyEval_EvalFrameEx+0x4f10(0, ffbfa1c0, 1615770, 1, 16491b0, 15ff350)<br>
PyEval_EvalCodeEx+0x874(1615770, 161ff60, 0, 160cf3c, 5, 0)<br>
function_call+0x8c(162e270, 160cf30, 0, 17f000, fffffffe, 40)<br>
PyObject_Call+0x44(162e270, 160cf30, 0, 160cf3c, 4, 16176c0)<br>
method_call+0x8c(162e270, 18418d0, 0, 1849f60, 1, 3f)<br>
PyObject_Call+0x44(176b620, 18418d0, 0, 2ed5c, 2efe0, 176b620)<br>
slot_tp_init+0x7c(176b620, 18418d0, 0, 2, 1, 16296d0)<br>
type_call+0xdc(16521a0, 18418d0, 0, 17f000, fffffffe, 3e)<br>
PyObject_Call+0x44(16521a0, 18418d0, 0, 18418d8, 1820030, 183ddbc)<br>
PyEval_EvalFrameEx+0x37b4(0, ffbfa688, 162e9b0, 1, 16259c0, 16521a0)<br>
PyEval_EvalFrameEx+0x5c98(0, ffbfa788, 16154e8, 1, 1626030, 162eb28)<br>
PyEval_EvalFrameEx+0x5c98(0, ffbfa888, 52b260, 1, 57ec00, 162e468)<br>
PyEval_EvalCodeEx+0x874(52b260, 5229c0, 0, 1808834, 2, 1ac03c)<br>
function_call+0x8c(5a36a8, 1808828, 0, 17f000, fffffffe, 3a)<br>
PyObject_Call+0x44(5a36a8, 1808828, 1825a50, 19b000, 163ab30, fe36c4)<br>
PyEval_EvalFrameEx+0x13bc(0, fe36c8, 52b2f0, 1, 526d50, 1808828)<br>
PyEval_EvalCodeEx+0x874(52b2f0, 1, 0, 1808c1c, 2, 0)<br>
function_call+0x8c(5a3738, 1808c10, 0, 17f000, fffffffe, 38)<br>
PyObject_Call+0x44(5a3738, 1808c10, 0, 1808c10, 1, 1849e50)<br>
method_call+0x8c(5a3738, 1630450, 0, 1630440, 9, 37)<br>
PyObject_Call+0x44(1612850, 1630450, 0, 193618, 2, 1612850)<br>
slot_tp_call+0x7c(163ab30, 1630450, 0, 17f000, fffffffe, 36)<br>
PyObject_Call+0x44(163ab30, 1630450, 0, 1630458, 1849e50, fe355c)<br>
PyEval_EvalFrameEx+0x37b4(0, ffbfaf78, b1e0f8, 1, a873a0, 163ab30)<br>
PyEval_EvalFrameEx+0x5c98(0, ffbfb078, b1e0b0, 1, b1db58, b1ed20)<br>
PyEval_EvalCodeEx+0x874(b1e0b0, b0e810, 0, 180b67c, 2, 1ac03c)<br>
function_call+0x8c(b1ecd8, 180b670, 0, 17f000, fffffffe, 33)<br>
PyObject_Call+0x44(b1ecd8, 180b670, 18258a0, 19b000, 163abf0, fe2f3c)<br>
PyEval_EvalFrameEx+0x13bc(0, fe2f40, b1ccc8, 1, b1a350, 180b670)<br>
PyEval_EvalCodeEx+0x874(b1ccc8, 1, 0, 1844dac, 2, 0)<br>
function_call+0x8c(b1ea50, 1844da0, 0, 17f000, fffffffe, 31)<br>
PyObject_Call+0x44(b1ea50, 1844da0, 0, 1844da0, 1, e4ddf0)<br>
method_call+0x8c(b1ea50, 16306d0, 0, 16306c0, b, 30)<br>
PyObject_Call+0x44(176b5a8, 16306d0, 0, 1ab728, 18f708, 176b5a8)<br>
slot_tp_call+0x7c(163abf0, 16306d0, 0, 17f000, fffffffe, 2f)<br>
PyObject_Call+0x44(163abf0, 16306d0, 0, 16306d8, e4ddf0, 18374d8)<br>
PyEval_EvalFrameEx+0x37b4(0, ffbfb768, b2e4e8, 1, ad9ce8, 163abf0)<br>
PyEval_EvalCodeEx+0x874(b2e4e8, b1b4b0, 0, 18087bc, 2, 1ac03c)<br>
function_call+0x8c(a00390, 18087b0, 0, 17f000, fffffffe, 2d)<br>
PyObject_Call+0x44(a00390, 18087b0, 176c810, 19b000, 165c450, 182ea24)<br>
PyEval_EvalFrameEx+0x13bc(0, 182ea28, b2e380, 1, b1ad50, 18087b0)<br>
PyEval_EvalCodeEx+0x874(b2e380, 1, 0, 176b8ac, 2, 0)<br>
function_call+0x8c(a002b8, 176b8a0, 0, 17f000, fffffffe, 2b)<br>
PyObject_Call+0x44(a002b8, 176b8a0, 0, 176b8a0, 1, e4ddf0)<br>
method_call+0x8c(a002b8, 16141b0, 0, 16141a0, 9, 2a)<br>
PyObject_Call+0x44(1612c10, 16141b0, 0, 1ab728, 18f708, 1612c10)<br>
slot_tp_call+0x7c(165c450, 16141b0, 0, 17f000, fffffffe, 29)<br>
PyObject_Call+0x44(165c450, 16141b0, 0, 16141b8, e4ddf0, 1645cf0)<br>
PyEval_EvalFrameEx+0x37b4(0, ffbfbe58, b2e4e8, 1, ad9ce8, 165c450)<br>
PyEval_EvalCodeEx+0x874(b2e4e8, b1b4b0, 0, 16296a4, 2, 1ac03c)<br>
function_call+0x8c(a00390, 1629698, 0, 17f000, fffffffe, 27)<br>
PyObject_Call+0x44(a00390, 1629698, 161f8a0, 19b000, 176a270, 124868c)<br>
PyEval_EvalFrameEx+0x13bc(0, 1248690, b2e380, 1, b1ad50, 1629698)<br>
PyEval_EvalCodeEx+0x874(b2e380, 1, 0, 16127bc, 2, 0)<br>
::quit</p>
</blockquote>
<p dir="auto">The C library used by Python is as follows:</p>
<p dir="auto">sbtorsvr391:~/local/tests $ ldd /usr/local/bin/python3|grep libc<br>
libc.so.1 => /lib/libc.so.1<br>
/platform/SUNW,Sun-Fire-V490/lib/libc_psr.so.1</p>
<p dir="auto">sbtorsvr391:~ $ ls -l /lib/libc.so.1<br>
-rwxr-xr-x 1 root bin 1640776 Aug 10 2010 /lib/libc.so.1</p>
<p dir="auto">sbtorsvr391:~ $ pkgchk -l -p /lib/libc.so.1<br>
NOTE: Couldn't lock the package database.<br>
Pathname: /lib/libc.so.1<br>
Type: regular file<br>
Expected mode: 0755<br>
Expected owner: root<br>
Expected group: bin<br>
Expected file size (bytes): 1640776<br>
Expected sum(1) of contents: 50250<br>
Expected last modification: Aug 10 13:55:34 2010<br>
Referenced by the following packages:<br>
SUNWcslr<br>
Current status: installed</p>
<p dir="auto">sbtorsvr391:~ $ pkginfo -l SUNWcslr<br>
PKGINST: SUNWcslr<br>
NAME: Core Solaris Libraries (Root)<br>
CATEGORY: system<br>
ARCH: sparc<br>
VERSION: 11.10.0,REV=2005.01.21.15.53<br>
BASEDIR: /<br>
VENDOR: Sun Microsystems, Inc.<br>
DESC: core software for a specific instruction-set architecture<br>
PSTAMP: on10-patch20100511083333<br>
INSTDATE: Jan 22 2011 16:10<br>
HOTLINE: Please contact your local service provider<br>
STATUS: completely installed<br>
FILES: 245 installed pathnames<br>
2 shared pathnames<br>
5 directories<br>
133 executables<br>
34303 blocks used (approx)</p>
<p dir="auto">The same problem doesn't occur when the command is run as root.</p>
<h2 dir="auto">I opened a ticket with Python support. they responsed with the comment:</h2>
<p dir="auto">The issue is actually in numpy. In numpy/f2py/src/fortranobject.c, function array_from_pyobj(), there is::</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" sprintf(mess,"failed to initialize intent(inout|inplace|cache) array"
" -- input must be array but got %s",
PyString_AsString(PyObject_Str(PyObject_Type(obj)))
);"><pre class="notranslate"><code class="notranslate"> sprintf(mess,"failed to initialize intent(inout|inplace|cache) array"
" -- input must be array but got %s",
PyString_AsString(PyObject_Str(PyObject_Type(obj)))
);
</code></pre></div>
<p dir="auto">(In numpy headers, PyString_AsString is aliased to PyBytes_AsString.) Besides the reference leaks, this function will fail when given the unicode string returned by PyObject_Str(), and sprintf receives the null string...</p>
<h2 dir="auto">Please report this to numpy.</h2>
<p dir="auto">I'm hoping I will find answer to this issue here...</p>
<p dir="auto">Thanks in advance,</p>
<p dir="auto">Alex</p> | <p dir="auto">There appears to be a bug in the reference documentation. Please check and rectify.</p>
<p dir="auto">There is a None on top of the page.</p>
<p dir="auto"><a href="https://docs.scipy.org/doc/numpy/" rel="nofollow">Numpy Documentation</a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13755676/32979294-88b950e4-cc78-11e7-8b96-f0519dac69cb.png"><img src="https://user-images.githubusercontent.com/13755676/32979294-88b950e4-cc78-11e7-8b96-f0519dac69cb.png" alt="numpy-none" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto"><strong>TypeScript Version:</strong><br>
1.8.0-1.8.7</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {Key} from 'types'; // Key is an interface
const Key = { test() {} };
Key.test();
export default Key;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-smi">Key</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'types'</span><span class="pl-kos">;</span> <span class="pl-c">// Key is an interface</span>
<span class="pl-k">const</span> <span class="pl-smi">Key</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-smi">Key</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-smi">Key</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Key.test();
exports.default = Key;"><pre class="notranslate"><span class="pl-smi">Key</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">exports</span><span class="pl-kos">.</span><span class="pl-c1">default</span> <span class="pl-c1">=</span> <span class="pl-smi">Key</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Actual behavior:</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="types_1.Key.test();
exports.default = types_1.Key;"><pre class="notranslate"><span class="pl-s1">types_1</span><span class="pl-kos">.</span><span class="pl-c1">Key</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">exports</span><span class="pl-kos">.</span><span class="pl-c1">default</span> <span class="pl-c1">=</span> <span class="pl-s1">types_1</span><span class="pl-kos">.</span><span class="pl-c1">Key</span><span class="pl-kos">;</span></pre></div> | <p dir="auto">It is incredibly easy to make a copy/paste error for <code class="notranslate">case</code> clauses in a <code class="notranslate">switch</code> statement.</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="switch (node.kind) {
// ...
case SyntaxKind.TupleType:
// Do something with tuple types.
case SyntaxKind.TupleType:
// Do something with union types.
// ...
}"><pre class="notranslate"><span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-s1">node</span><span class="pl-kos">.</span><span class="pl-c1">kind</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-c">// ...</span>
<span class="pl-k">case</span> <span class="pl-smi">SyntaxKind</span><span class="pl-kos">.</span><span class="pl-c1">TupleType</span>:
<span class="pl-c">// Do something with tuple types.</span>
<span class="pl-k">case</span> <span class="pl-smi">SyntaxKind</span><span class="pl-kos">.</span><span class="pl-c1">TupleType</span>:
<span class="pl-c">// Do something with union types.</span>
<span class="pl-c">// ...</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">While it is easily arguable that non-exhaustive cases can be allowed in TypeScript, there is no reason not to report duplicated cases.</p>
<p dir="auto">"Obvious" semantics for <code class="notranslate">case</code> clauses in a single <code class="notranslate">switch</code> statement are as follows:</p>
<ul dir="auto">
<li>Report when named entities with identical symbols are handled.</li>
<li>Report when equal string literals are handled.</li>
<li>Report when equal numeric literals (even 0.0 and 0) are handled.</li>
<li>Report when <code class="notranslate">null</code> is handled more than once.</li>
<li>Report when <code class="notranslate">undefined</code> is handled more than once.</li>
</ul>
<hr>
<p dir="auto"><del>One interesting question is whether exhaustive cases for an enum should report an error when there is a <code class="notranslate">default</code> clause.</del></p> | 0 |
<p dir="auto">Right now, VolumetricConvolution in THNN doesn't mark or handle bias=NULL cases</p> | <h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<p dir="auto">Ensure <code class="notranslate">tqdm</code> is not installed in your environment, verify that <code class="notranslate">python -c 'import tqdm'</code> <strong>raises an exception.</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import torch
torch.hub.load('willprice/pytorch-hub-bug', 'entry_point')"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">torch</span>
<span class="pl-s1">torch</span>.<span class="pl-s1">hub</span>.<span class="pl-en">load</span>(<span class="pl-s">'willprice/pytorch-hub-bug'</span>, <span class="pl-s">'entry_point'</span>)</pre></div>
<p dir="auto">(<a href="https://github.com/willprice/pytorch-hub-bug">repo here</a>)<br>
This errors with</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Using cache found in /home/will/.cache/torch/hub/willprice_pytorch-hub-bug_master
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.7/site-packages/torch/hub.py", line 336, in load
hub_module = import_module(MODULE_HUBCONF, repo_dir + '/' + MODULE_HUBCONF)
File "/usr/lib/python3.7/site-packages/torch/hub.py", line 70, in import_module
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/will/.cache/torch/hub/willprice_pytorch-hub-bug_master/hubconf.py", line 3, in <module>
from entry import entry_point
File "/home/will/.cache/torch/hub/willprice_pytorch-hub-bug_master/entry.py", line 1, in <module>
import tqdm
ModuleNotFoundError: No module named 'tqdm'"><pre class="notranslate"><code class="notranslate">Using cache found in /home/will/.cache/torch/hub/willprice_pytorch-hub-bug_master
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.7/site-packages/torch/hub.py", line 336, in load
hub_module = import_module(MODULE_HUBCONF, repo_dir + '/' + MODULE_HUBCONF)
File "/usr/lib/python3.7/site-packages/torch/hub.py", line 70, in import_module
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/will/.cache/torch/hub/willprice_pytorch-hub-bug_master/hubconf.py", line 3, in <module>
from entry import entry_point
File "/home/will/.cache/torch/hub/willprice_pytorch-hub-bug_master/entry.py", line 1, in <module>
import tqdm
ModuleNotFoundError: No module named 'tqdm'
</code></pre></div>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">I'd expect <code class="notranslate">torch</code> to raise an exception saying a dependency isn't installed, rather than an <code class="notranslate">ImportError</code>.</p>
<p dir="auto">I would expect <code class="notranslate">torch.hub.load</code> to check <code class="notranslate">dependencies</code> in <code class="notranslate">hubconf.py</code> before executing <code class="notranslate">hubconf.py</code> and actually loading in the entrypoints. It's not clear from examples of <code class="notranslate">hubconf.py</code> that to avoid this behaviour you'd have to wrap all your entrypoints in functions that import the dependencies within the function body and not at the top level. This is a pain as it involves adding a wrapper for every entrypoint and duplicating all the docstrings.</p>
<h2 dir="auto">Suggested fix</h2>
<p dir="auto">Rather than evaluating the module, it'd make more sense to pull out the AST node corresponding to the <code class="notranslate">dependencies</code> variable and evaluate that only, perform the dependency check and only then import the full module. It might be that people have complicated <code class="notranslate">hubconf.py</code> files that prevent this from happening. In that case things get a bit more tricky and it might make sense to fallback on the current implementation as at least the user still gets ImportError exceptions that are <em>useful</em> if not the most user friendly.</p>
<h2 dir="auto">Environment</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PyTorch version: 1.1.0
Is debug build: No
CUDA used to build PyTorch: Could not collect
OS: Arch Linux
GCC version: (GCC) 9.1.0
CMake version: version 3.15.1
Python version: 3.7
Is CUDA available: No
CUDA runtime version: 10.1.168
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: /usr/lib/libcudnn.so.7.6.1
Versions of relevant libraries:
[pip3] msgpack-numpy==0.4.3.2
[pip3] numpy==1.16.4
[pip3] pytorch-ignite==0.1.2
[pip3] torch==1.1.0
[pip3] torchaudio==0.2
[pip3] torchfile==0.1.0
[pip3] torchsummary==1.5.1
[pip3] torchvision==0.2.1
[pip3] torchviz==0.0.1
[conda] blas 1.0 mkl
[conda] mkl 2019.4 243
[conda] mkl_fft 1.0.12 py36ha843d7b_0
[conda] mkl_random 1.0.2 py36hd81dba3_0
[conda] pytorch-cpu 1.1.0 py3.6_cpu_0 pytorch
[conda] torchvision-cpu 0.3.0 py36_cuNone_1 pytorch"><pre class="notranslate"><code class="notranslate">PyTorch version: 1.1.0
Is debug build: No
CUDA used to build PyTorch: Could not collect
OS: Arch Linux
GCC version: (GCC) 9.1.0
CMake version: version 3.15.1
Python version: 3.7
Is CUDA available: No
CUDA runtime version: 10.1.168
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: /usr/lib/libcudnn.so.7.6.1
Versions of relevant libraries:
[pip3] msgpack-numpy==0.4.3.2
[pip3] numpy==1.16.4
[pip3] pytorch-ignite==0.1.2
[pip3] torch==1.1.0
[pip3] torchaudio==0.2
[pip3] torchfile==0.1.0
[pip3] torchsummary==1.5.1
[pip3] torchvision==0.2.1
[pip3] torchviz==0.0.1
[conda] blas 1.0 mkl
[conda] mkl 2019.4 243
[conda] mkl_fft 1.0.12 py36ha843d7b_0
[conda] mkl_random 1.0.2 py36hd81dba3_0
[conda] pytorch-cpu 1.1.0 py3.6_cpu_0 pytorch
[conda] torchvision-cpu 0.3.0 py36_cuNone_1 pytorch
</code></pre></div> | 0 |
<p dir="auto">Routing doesn't working in safari 10, I have some code like:<br>
onClick={() => route.push(tab.href, tab.href, { shallow: true })}</p>
back home
Both of them are not working, I don't know why, please help me | <p dir="auto">When using nextjs dynamic imports, each dynamic import is imported twice... one file seems to be the bundle for distribution. The other seems to for hot reloading?</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">I'm expecting to see just one file requested per dynamic import.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Instead I'm seeing two files requested per dynamic import.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Pull down this <a href="https://github.com/morgs32/with-dynamic-imports">example nextjs</a> app to reproduce</li>
<li><code class="notranslate">yarn dev</code> to see it working in dev</li>
<li><code class="notranslate">yarn build</code> then <code class="notranslate">yarn start</code> to spin up the production build</li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1364795/39022954-fa2a4b52-4405-11e8-9b40-2b51f82d9af9.png"><img src="https://user-images.githubusercontent.com/1364795/39022954-fa2a4b52-4405-11e8-9b40-2b51f82d9af9.png" alt="pasted_image_4_19_18__3_47_pm" style="max-width: 100%;"></a></p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>5.1.0 (latest)</td>
</tr>
<tr>
<td>node</td>
<td>9.7.1</td>
</tr>
<tr>
<td>OS</td>
<td>mac</td>
</tr>
<tr>
<td>browser</td>
<td>chrome</td>
</tr>
</tbody>
</table> | 0 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/Node</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>. (Please ask any appropriate questions there).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond.
<ul dir="auto">
<li>Authors: @....</li>
</ul>
</li>
</ul>
<p dir="auto">I wanted Node Typings in my Typescript project so I entered this command:</p>
<p dir="auto">npm install @types/node --save<br>
Which resulted in:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error TS2403: Subsequent variable declarations must have the same type.
Variable 'require' must be of type 'Require', but here has type 'NodeRequire'."><pre lang="c:/xyz/node_modules/@types/node/index.d.ts(89,13)" class="notranslate"><code class="notranslate">error TS2403: Subsequent variable declarations must have the same type.
Variable 'require' must be of type 'Require', but here has type 'NodeRequire'.
</code></pre></div>
<p dir="auto">My machine had node version 7.0.3 The installed types was for version + @types/[email protected]<br>
If I uninstall the typings my project compiles with no problems.</p>
<p dir="auto">It appears as if the typings content is not correct per the error message!<br>
The failing line of code in index.d.ts<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/10676026/26839642-43413762-4aa9-11e7-9542-78819504c9df.GIF"><img src="https://user-images.githubusercontent.com/10676026/26839642-43413762-4aa9-11e7-9542-78819504c9df.GIF" alt="noderequire" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto">This is the TSConfig content:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" "compilerOptions": {
"module": "amd",
"moduleResolution": "node",
"target": "es5",
"noImplicitAny": false,
"jsx": "react",
"sourceMap": false,
"baseUrl": ".",
"paths": {
"OfficeFabric/*": [
"node_modules/office-ui-fabric-react/lib-amd/*"
]
}
}
}"><pre lang="{" class="notranslate"><code class="notranslate"> "compilerOptions": {
"module": "amd",
"moduleResolution": "node",
"target": "es5",
"noImplicitAny": false,
"jsx": "react",
"sourceMap": false,
"baseUrl": ".",
"paths": {
"OfficeFabric/*": [
"node_modules/office-ui-fabric-react/lib-amd/*"
]
}
}
}
</code></pre></div>
<p dir="auto">Typescript version is 2.2.2</p>
<p dir="auto">Root Cause: Require.js had a var named Require in it's index.d.ts, and so did Node.js in it's index.d.ts. Renaming one of them fixed the problem. But there is the --types option for TSConfig too.</p> | <p dir="auto"><strong>TypeScript Version:</strong> 2.2.2</p>
<p dir="auto"><strong>Code</strong><br>
This is my TSCConfig file content</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"compilerOptions": {
"module": "amd",
"moduleResolution": "node",
"target": "es5",
"noImplicitAny": false,
"jsx": "react",
"sourceMap": false,
"baseUrl": ".",
"paths": {
"OfficeFabric/*": [
"node_modules/office-ui-fabric-react/lib-amd/*"
]
}
}
}"><pre class="notranslate"><span class="pl-kos">{</span>
<span class="pl-s">"compilerOptions"</span>: <span class="pl-kos">{</span>
<span class="pl-s">"module"</span>: <span class="pl-s">"amd"</span><span class="pl-kos">,</span>
<span class="pl-s">"moduleResolution"</span>: <span class="pl-s">"node"</span><span class="pl-kos">,</span>
<span class="pl-s">"target"</span>: <span class="pl-s">"es5"</span><span class="pl-kos">,</span>
<span class="pl-s">"noImplicitAny"</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-s">"jsx"</span>: <span class="pl-s">"react"</span><span class="pl-kos">,</span>
<span class="pl-s">"sourceMap"</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-s">"baseUrl"</span>: <span class="pl-s">"."</span><span class="pl-kos">,</span>
<span class="pl-s">"paths"</span>: <span class="pl-kos">{</span>
<span class="pl-s">"OfficeFabric/*"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"node_modules/office-ui-fabric-react/lib-amd/*"</span>
<span class="pl-kos">]</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
After running npm install @ types/node --save<br>
The project should compile ok.<br>
<strong>Actual behavior:</strong><br>
The error message TS2403 is indicated.<br>
Uninstalling the node types fixes the problem.</p>
<p dir="auto">Could this be a clash between : module:"amd" and moduleresolution: "node"</p>
<p dir="auto">Current Node version is 7.0.3<br>
The installed types was for version + @types/[email protected]</p> | 1 |
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong></p>
<p dir="auto">I am creating an editable table with add and remove row feature in the FormGroup with validation.<br>
The table works when the rows add or remove from last. When the row is removed from the middle of the table, angular throw an error "There is no FormControl instance attached to form control element with name name_2".<br>
On adding the row I have used the "addControl" method to add control in the group and on the removal of the row I am using "removeControl" method.<br>
<strong>Expected behavior</strong></p>
<p dir="auto">There should be no error, from whichever place I remove or add the row.<br>
<strong>Minimal reproduction of the problem with instructions</strong></p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<p dir="auto">Windows 10, IIS server 7, angular 2.1.0</p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.X</li>
</ul>
<ul dir="auto">
<li><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]</li>
</ul>
<p dir="auto">Chrome Version 54.0.2840.71 m (64-bit)</p>
<ul dir="auto">
<li><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5]<br>
Typescript 2.0.3</li>
<li><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =<br>
Node 6.0</li>
</ul> | <p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong></p>
<p dir="auto">The QueryEncoder encodes <code class="notranslate">%3D</code> to <code class="notranslate">;</code> instead of <code class="notranslate">=</code><br>
<a href="https://github.com/angular/angular/blob/master/modules/%40angular/http/src/url_search_params.ts#L44">https://github.com/angular/angular/blob/master/modules/%40angular/http/src/url_search_params.ts#L44</a></p>
<p dir="auto"><strong>Expected/desired behavior</strong></p>
<p dir="auto">The QueryEncoder should encode <code class="notranslate">%3D</code> to <code class="notranslate">=</code></p>
<p dir="auto">My comment on the PR that causes the bug:<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="162570254" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/9651" data-hovercard-type="pull_request" data-hovercard-url="/angular/angular/pull/9651/hovercard?comment_id=229953466&comment_type=issue_comment" href="https://github.com/angular/angular/pull/9651#issuecomment-229953466">#9651 (comment)</a></p>
<p dir="auto"><strong>Reproduction of the problem</strong><br>
<strong>What is the expected behavior?</strong><br>
<strong>What is the motivation / use case for changing the behavior?</strong><br>
<strong>Please tell us about your environment:</strong></p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.0-rc.4</li>
<li><strong>Browser:</strong> [all]</li>
<li><strong>Language:</strong> [TypeScript]</li>
</ul> | 0 |
<p dir="auto">How to configure IntelliSense in Visual Studio Code?</p>
<p dir="auto">For example, lets consider the below code snippet.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="'use strict';
import React from 'react';
import ReactDOMServer from 'react-dom/server';"><pre class="notranslate"><span class="pl-s">'use strict'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-v">ReactDOMServer</span> <span class="pl-k">from</span> <span class="pl-s">'react-dom/server'</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">I would like the IntelliSense to suggests the available methods on <code class="notranslate">React</code>, when I press <code class="notranslate">cmd + space</code> after typing <code class="notranslate">React.</code>.</p>
<p dir="auto">Is that possible? If yes any pointer would be of great help.</p>
<p dir="auto"><strong>PS:</strong></p>
<p dir="auto">I have already installed the <code class="notranslate">dependent modules</code> and updated the <code class="notranslate">package.json</code> and they are available at <code class="notranslate">./node_modules/</code></p>
<hr>
<p dir="auto"><em>Raised it at <a href="http://stackoverflow.com/questions/33924317/how-to-configure-intellisense-in-visual-studio-code" rel="nofollow">StackOverflow</a> a month ago.</em></p> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var express = require('express');
var app = express();
var port = process.env.PORT || 3000;
app.listen(port);"><pre class="notranslate"><code class="notranslate">var express = require('express');
var app = express();
var port = process.env.PORT || 3000;
app.listen(port);
</code></pre></div>
<p dir="auto">In the following code I required express but when I enter app and press crtl + space it shows no suggestions.</p>
<p dir="auto">It would be nice to have code assist for installed packages because nodejs developers always play with packages.</p> | 1 |
<p dir="auto">The Deno LSP gets confused by dynamic imports in weird ways it's easiest to demonstrate with screenshots...</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1754873/135978469-6b89e6bd-b2bf-4ac7-ba91-186e23822733.png"><img width="861" alt="Screen Shot 2021-10-05 at 6 24 20 pm" src="https://user-images.githubusercontent.com/1754873/135978469-6b89e6bd-b2bf-4ac7-ba91-186e23822733.png" style="max-width: 100%;"></a></p>
<p dir="auto">Notice that the type error is invalid (perhaps related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="941573895" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/11362" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/11362/hovercard?comment_id=933269561&comment_type=issue_comment" href="https://github.com/denoland/deno/issues/11362#issuecomment-933269561">#11362 (comment)</a>), and Deno seems to incorrectly think the type is scoped to the file of the first dynamic import later on in the function. Another weird thing is the <code class="notranslate">file://</code> path Deno is displaying in the error omits the <code class="notranslate">.js</code> file extension.</p>
<p dir="auto">Later in the same module, you can see that Deno incorrectly thinks each dynamic import is actually the next dynamic import:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1754873/135979234-57f1ada5-6ae5-4920-a319-4585bbfc6503.png"><img width="904" alt="Screen Shot 2021-10-05 at 6 29 25 pm" src="https://user-images.githubusercontent.com/1754873/135979234-57f1ada5-6ae5-4920-a319-4585bbfc6503.png" style="max-width: 100%;"></a></p>
<p dir="auto">The last dynamic import incorrectly has no intellisense when the path is hovered:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1754873/135979557-b67d3c6d-a722-4804-8cc9-4fe462e1ed25.png"><img width="736" alt="Screen Shot 2021-10-05 at 6 31 41 pm" src="https://user-images.githubusercontent.com/1754873/135979557-b67d3c6d-a722-4804-8cc9-4fe462e1ed25.png" style="max-width: 100%;"></a></p>
<p dir="auto">I've tried restarting the Deno LSP via the VS Code Deno extension command, and it doesn't help.</p> | <p dir="auto"><strong>Describe the bug</strong><br>
When the deno extension is enabled, typed imports via <code class="notranslate">/** @type {import("...</code> stop working.</p>
<p dir="auto"><strong>To Reproduce</strong></p>
<ol dir="auto">
<li>Create <code class="notranslate">Bar.js</code>:</li>
</ol>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export class Bar {}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-v">Bar</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<ol start="2" dir="auto">
<li>Create <code class="notranslate">Foo.js</code>:</li>
</ol>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/** @type {import("./Bar.js").Bar} */
const foo = null;"><pre class="notranslate"><span class="pl-c">/** <span class="pl-k">@type</span> {import("./Bar.js").Bar} */</span>
<span class="pl-k">const</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-c1">null</span><span class="pl-kos">;</span></pre></div>
<ol start="3" dir="auto">
<li>Hover over <code class="notranslate">foo</code> and note it's type is set to <code class="notranslate">Bar</code>.</li>
<li>Enable deno with <code class="notranslate">Deno: Initialize Workspace Configuration</code></li>
<li>Hover over <code class="notranslate">foo</code> again.</li>
</ol>
<p dir="auto"><strong>Expected behavior</strong><br>
The type remains set to <code class="notranslate">Bar</code>, rather than <code class="notranslate">any</code>.</p>
<p dir="auto"><strong>Screenshots</strong></p>
<p dir="auto">If applicable, add screenshots to help explain your problem.</p>
<p dir="auto"><strong>Versions</strong></p>
<p dir="auto">vscode: 1.62.3 deno: 1.16.3 extension: 3.9.2</p> | 1 |
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-local-scope-and-functions#?solution=function%20myFunction%28%29%20%7B%0A%20%20var%20myVar%20%3D%20%22loo%22%3B%0A%20%20console.log%28myVar%29%3B%0A%7D%0AmyFunction%28%29%3B%0A%0A%2F%2F%20run%20and%20check%20the%20console%20%0A%2F%2F%20myVar%20is%20not%20defined%20outside%20of%20myFunction%0A%0A%2F%2F%20now%20remove%20the%20console.log%20line%20to%20pass%20the%20test%0A%0A" rel="nofollow">Waypoint: Local Scope and Functions</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (X11; CrOS x86_64 5841.83.0) AppleWebKit/537.36 (KHTML like Gecko) Chrome/36.0.1985.138 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<p dir="auto">My code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function myFunction() {
var myVar = "loo";
console.log(myVar);
}
myFunction();
// run and check the console
// myVar is not defined outside of myFunction
// now remove the console.log line to pass the test"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">myFunction</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">myVar</span> <span class="pl-c1">=</span> <span class="pl-s">"loo"</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">myVar</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">myFunction</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// run and check the console </span>
<span class="pl-c">// myVar is not defined outside of myFunction</span>
<span class="pl-c">// now remove the console.log line to pass the test</span></pre></div>
<p dir="auto">checker responds:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Remove the second console log"><pre class="notranslate"><span class="pl-v">Remove</span> <span class="pl-s1">the</span> <span class="pl-s1">second</span> <span class="pl-smi">console</span> <span class="pl-s1">log</span></pre></div>
<p dir="auto">That's what's causing the issue, when the line is removed checker returns success:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// now remove the console.log line to pass the test"><pre class="notranslate"><span class="pl-c">// now remove the console.log line to pass the test</span></pre></div>
<p dir="auto">So it may be optimal to do it like this:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function myFunction() {
var myVar = "loo";
console.log(myVar);
}
myFunction();
// run and check the console
// myVar is not defined outside of myFunction
console.log(myVar); // now remove this whole line to pass the test"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">myFunction</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">myVar</span> <span class="pl-c1">=</span> <span class="pl-s">"loo"</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">myVar</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">myFunction</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// run and check the console </span>
<span class="pl-c">// myVar is not defined outside of myFunction</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">myVar</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// now remove this whole line to pass the test</span></pre></div>
<p dir="auto">By the way, commenting second console log line produces checker error also, but this is probably known, because of instructions to remove the line to pass the test.</p> | <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-local-scope-and-functions#?solution=function%20myFunction%28%29%20%7B%0A%20%20var%20myVar%20%3D%205%3B%20%20%0A%20%20console.log%28myVar%29%3B%0A%7D%0AmyFunction%28%29%3B%0A%0A%2F%2F%20run%20and%20check%20the%20console%20%0A%2F%2F%20myVar%20is%20not%20defined%20outside%20of%20myFunction%0A%0A%2F%2F%20now%20remove%20the%20console.log%20line%20to%20pass%20the%20test%0A%0A" rel="nofollow">Waypoint: Local Scope and Functions</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.48 Safari/537.36</code>.</p>
<p dir="auto">The test asks you to remove the second console.log() to pass. When you remove the second console.log() it still fails. You have to remove both console.log() calls to pass(including the one inside myFunction().)</p>
<p dir="auto">Reproducible every time by removing the console.log() outside of myFunction(), as asked by test. I'm assuming this is a bug in the test and not the text as there's no reason to remove the console.log() call within myFunction().</p> | 1 |
<p dir="auto">Why the MDS that is supplied does not supports weights in addition to the dissimilarity matrix?</p> | <p dir="auto">Hi!</p>
<p dir="auto">My name is Charles, and I would like to share my very first contribution to open-source project.</p>
<h4 dir="auto">Smacof from sklearn rules ! It only lacks the weighting</h4>
<p dir="auto">I regularly need the use of SMACOF algorithm, for sensor localization. In this field (and others), the weighting is mandatory to give more or less importance to pairwise distances. I send you to a well-known paper about it : <a href="https://scholar.google.fr/scholar?q=distributed+weighted-multidimensional+scaling+for+node+localization+in+sensor+networks&btnG=&hl=en&as_sdt=0%2C5" rel="nofollow">Costa2006</a></p>
<p dir="auto">So far I have been using a wrapping of smacof in R with rpy2, because it features the weighting. But everytime I update R or rpy2 I get errors, about types, etc.</p>
<p dir="auto">You added a very good implementation of smacof in the pull request <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="4292384" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/797" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/797/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/797">#797</a>. The idea of adding the weighting was proposed, but was not done, was there maybe a reason about it ?</p>
<h4 dir="auto">How to feature it</h4>
<p dir="auto">Today I tried to modify the source code of sklearn, and my tests on sensor localization, by adding weighting have shown consistent results so far.<br>
The idea could be to add a weight parameter at the fit method:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from sklearn.manifold import MDS
smacof = MDS(n_components=2, dissimilarity='precomputed')
# Let D be a n_sample x n_sample euclidean distance matrix
# and weighting be a n_sample x n_sample weight matrix
smacof.fit(D, weight=weight)
pl.scatter(*smacof.embedding_.T) # maps the sensors"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">manifold</span> <span class="pl-k">import</span> <span class="pl-v">MDS</span>
<span class="pl-s1">smacof</span> <span class="pl-c1">=</span> <span class="pl-v">MDS</span>(<span class="pl-s1">n_components</span><span class="pl-c1">=</span><span class="pl-c1">2</span>, <span class="pl-s1">dissimilarity</span><span class="pl-c1">=</span><span class="pl-s">'precomputed'</span>)
<span class="pl-c"># Let D be a n_sample x n_sample euclidean distance matrix</span>
<span class="pl-c"># and weighting be a n_sample x n_sample weight matrix</span>
<span class="pl-s1">smacof</span>.<span class="pl-en">fit</span>(<span class="pl-v">D</span>, <span class="pl-s1">weight</span><span class="pl-c1">=</span><span class="pl-s1">weight</span>)
<span class="pl-s1">pl</span>.<span class="pl-en">scatter</span>(<span class="pl-c1">*</span><span class="pl-s1">smacof</span>.<span class="pl-s1">embedding_</span>.<span class="pl-v">T</span>) <span class="pl-c"># maps the sensors</span></pre></div>
<h4 dir="auto">What to change?</h4>
<p dir="auto">Not that much actually! The way it was coded only need few modifications in the _smacof_single() function.</p>
<p dir="auto">As you can see in the <a href="https://www.google.fr/url?sa=t&rct=j&q=&esrc=s&source=web&cd=5&ved=0ahUKEwiW3fX07vfMAhUCJ5oKHRRJBqEQFghCMAQ&url=http%3A%2F%2Fstatistics.ucla.edu%2Fsystem%2Fresources%2FBAhbBlsHOgZmSSJYMjAxMi8wNS8xNi8xNV8xNl8yOF8yMDdfTXVsdGlkaW1lbnNpb25hbF9TY2FsaW5nX1VzaW5nX01ham9yaXphdGlvbl9TTUFDT0ZfaW5fUi5wZGYGOgZFVA%2FMultidimensional%2520Scaling%2520Using%2520Majorization%3A%2520SMACOF%2520in%2520R.pdf&usg=AFQjCNHAKeBatnwzXQqrRefrWGwdD5KqAA" rel="nofollow">algorithm description</a>, it needs to compute the matrix V and its pseudo inverse, for the final update (eq. (14)). And also, it needs to modify B, by weighting the <code class="notranslate">ratio</code> variable (=s_ij eq. (11) ).</p>
<p dir="auto">Are you interested in adding this feature to your main branch?</p>
<p dir="auto">Best,<br>
Charles</p> | 1 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Say Hello to HTML Elements Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Headline with the h2 Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Inform with the Paragraph Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Uncomment HTML Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Comment out HTML Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Fill in the Blank with Placeholder Text Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Delete HTML Elements Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Change the Color of Text Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use CSS Selectors to Style Elements Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use a CSS Class to Style an Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Style Multiple Elements with a CSS Class Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Change the Font Size of an Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Set the Font Family of an Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Import a Google Font Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Specify How Fonts Should Degrade Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Add Images to your Website Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Size your Images Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Add Borders Around your Elements Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Add Rounded Corners with a Border Radius Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Make Circular Images with a Border Radius Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Link to External Pages with Anchor Elements Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Nest an Anchor Element within a Paragraph Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Make Dead Links using the Hash Symbol Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Turn an Image into a Link Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Add Alt Text to an Image for Accessibility Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Create a Bulleted Unordered List Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Create an Ordered List Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Create a Text Field Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Add Placeholder Text to a Text Field Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Create a Form Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Add a Submit Button to a Form Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use HTML5 to Require a Field Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Create a Set of Radio Buttons Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Create a Set of Checkboxes Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Check Radio Buttons and Checkboxes by Default Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Nest Many Elements within a Single Div Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Give a Background Color to a Div Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Set the ID of an Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use an ID Attribute to Style an Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Adjusting the Padding of an Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Adjust the Margin of an Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Add a Negative Margin to an Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Add Different Padding to Each Side of an Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Add Different Margins to Each Side of an Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use Clockwise Notation to Specify the Padding of an Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use Clockwise Notation to Specify the Margin of an Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Style the HTML Body Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Inherit Styles from the Body Element Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Prioritize One Style Over Another Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Override Styles in Subsequent CSS Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Override Class Declarations by Styling ID Attributes Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Override Class Declarations with Inline Styles Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Override All Other Styles by using Important Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use Hex Code for Specific Colors Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use Hex Code to Color Elements White Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use Hex Code to Color Elements Red Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use Hex Code to Color Elements Green Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use Hex Code to Color Elements Blue Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use Hex Code to Mix Colors Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use Hex Code to Color Elements Gray Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use Hex Code for Specific Shades of Gray Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use Abbreviated Hex Code Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use RGB values to Color Elements Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use RGB to Color Elements White Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use RGB to Color Elements Red Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use RGB to Color Elements Green Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use RGB to Color Elements Blue Complete</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Use RGB to Mix Colors</li>
</ul>
<p dir="auto">Planning to finish translation tomorrow, inviting <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bugron/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bugron">@bugron</a> to do QA.</p> | <p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-remove-an-element-using-jquery" rel="nofollow">http://freecodecamp.com/challenges/waypoint-remove-an-element-using-jquery</a> has an issue.</p>
<p dir="auto">Starts of the challenge showing the .remove() method, but does not tell you what to remove unless you run the code.</p>
<p dir="auto">Screen after attempt at running the code:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/4343088/9481160/f179f7c4-4b55-11e5-9185-5b7cb41fcf4b.png"><img src="https://cloud.githubusercontent.com/assets/4343088/9481160/f179f7c4-4b55-11e5-9185-5b7cb41fcf4b.png" alt="jquery-remove" style="max-width: 100%;"></a></p> | 0 |
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>For English only</strong>, other languages will not accept.</p>
<p dir="auto">Before report a bug, make sure you have:</p>
<ul dir="auto">
<li>Searched open and closed <a href="https://github.com/apache/incubator-shardingsphere/issues">GitHub issues</a>.</li>
<li>Read documentation: <a href="https://shardingsphere.apache.org/document/current/en/overview" rel="nofollow">ShardingSphere Doc</a>.</li>
</ul>
<p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br>
If no response <strong>more than 7 days</strong> and we cannot reproduce it on current information, we will <strong>close it</strong>.</p>
<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">4.0.0-RC2</p>
<h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3>
<p dir="auto">Sharding-Proxy</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">Ability to discover data sources And Execute sql statement without error</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Execute sql statement error</p>
<h3 dir="auto">Reason analyze (If you can)</h3>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<p dir="auto">Environmental configuration:<br>
I have two mysql database instances And each instance of the database contains “order_tbl” table.<br>
My ss-proxy configuration:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="schemaName: cyberplus_meta
dataSources:
cyberplus_meta_instance_1:
url: jdbc:mysql://localhost:3306/cyberplus_meta_instance_1?useSSL=false&serverTimezone=UTC
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
cyberplus_meta_instance_2:
url: jdbc:mysql://localhost:3306/cyberplus_meta_instance_2?useSSL=false&serverTimezone=UTC
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
shardingRule:
tables:
order_tbl:
actualDataNodes: cyberplus_meta_instance_${1..2}.order_tbl
databaseStrategy:
inline:
shardingColumn: id
algorithmExpression: cyberplus_meta_instance_${id % 2 + 1}
defaultDatabaseStrategy:
none:
defaultTableStrategy:
none:
defaultDataSourceName: cyberplus_meta_instance_1"><pre class="notranslate"><code class="notranslate">schemaName: cyberplus_meta
dataSources:
cyberplus_meta_instance_1:
url: jdbc:mysql://localhost:3306/cyberplus_meta_instance_1?useSSL=false&serverTimezone=UTC
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
cyberplus_meta_instance_2:
url: jdbc:mysql://localhost:3306/cyberplus_meta_instance_2?useSSL=false&serverTimezone=UTC
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
shardingRule:
tables:
order_tbl:
actualDataNodes: cyberplus_meta_instance_${1..2}.order_tbl
databaseStrategy:
inline:
shardingColumn: id
algorithmExpression: cyberplus_meta_instance_${id % 2 + 1}
defaultDatabaseStrategy:
none:
defaultTableStrategy:
none:
defaultDataSourceName: cyberplus_meta_instance_1
</code></pre></div>
<p dir="auto">Error stack information:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Rule Type: sharding
Logic SQL: SELECT * FROM order_tbl LIMIT 1
SQLStatement: ShardingSelectOptimizedStatement(tables=Tables(tables=[Table(name=order_tbl, alias=Optional.absent())], schema=Optional.absent()), groupBy=org.apache.shardingsphere.core.optimize.sharding.segment.select.groupby.GroupBy@4683a848, orderBy=org.apache.shardingsphere.core.optimize.sharding.segment.select.orderby.OrderBy@6d56908d, selectItems=SelectItems(startIndex=7, stopIndex=7, distinctRow=false, items=[ShorthandSelectItem(owner=Optional.absent())], tables=[TableSegment(startIndex=14, stopIndex=22, name=order_tbl, quoteCharacter=NONE, owner=Optional.absent(), alias=Optional.absent())]), pagination=org.apache.shardingsphere.core.optimize.sharding.segment.select.pagination.Pagination@4225d0fc, containsSubquery=false)
Actual SQL: cyberplus_meta_instance_1 ::: SELECT * FROM order_tbl LIMIT 1
Actual SQL: cyberplus_meta_instance_2 ::: SELECT * FROM order_tbl LIMIT 1
Rule Type: sharding
Logic SQL: SHOW FULL TABLES FROM `cyberplus_meta` LIKE 'order_tbl'
SQLStatement: TransparentOptimizedStatement(tables=Tables(tables=[Table(name=order_tbl, alias=Optional.absent())], schema=Optional.absent()))
Actual SQL: cyberplus_meta_instance_1 ::: SHOW FULL TABLES LIKE 'order_tbl'
[ERROR] 15:34:04.170 [ShardingSphere-Command-14] o.a.s.s.f.c.CommandExecutorTask - Exception occur:
org.apache.shardingsphere.core.config.ShardingConfigurationException: Cannot find actual datasource intersection for logic tables: [order_tbl, %]
at org.apache.shardingsphere.core.route.type.unicast.UnicastRoutingEngine.route(UnicastRoutingEngine.java:92)
at org.apache.shardingsphere.core.route.router.sharding.ParsingSQLRouter.route(ParsingSQLRouter.java:78)
at org.apache.shardingsphere.core.route.StatementRoutingEngine.route(StatementRoutingEngine.java:56)
at org.apache.shardingsphere.core.SimpleQueryShardingEngine.route(SimpleQueryShardingEngine.java:60)
at org.apache.shardingsphere.core.BaseShardingEngine.executeRoute(BaseShardingEngine.java:86)
at org.apache.shardingsphere.core.BaseShardingEngine.shard(BaseShardingEngine.java:70)
at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.wrapper.StatementExecutorWrapper.doShardingRoute(StatementExecutorWrapper.java:75)
at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.wrapper.StatementExecutorWrapper.route(StatementExecutorWrapper.java:61)
at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:80)
at org.apache.shardingsphere.shardingproxy.backend.text.admin.UnicastBackendHandler.execute(UnicastBackendHandler.java:57)
at org.apache.shardingsphere.shardingproxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:72)
at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:86)
at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Rule Type: sharding
Logic SQL: SELECT * FROM order_tbl LIMIT 1
SQLStatement: ShardingSelectOptimizedStatement(tables=Tables(tables=[Table(name=order_tbl, alias=Optional.absent())], schema=Optional.absent()), groupBy=org.apache.shardingsphere.core.optimize.sharding.segment.select.groupby.GroupBy@53ea2899, orderBy=org.apache.shardingsphere.core.optimize.sharding.segment.select.orderby.OrderBy@747ee701, selectItems=SelectItems(startIndex=7, stopIndex=7, distinctRow=false, items=[ShorthandSelectItem(owner=Optional.absent())], tables=[TableSegment(startIndex=14, stopIndex=22, name=order_tbl, quoteCharacter=NONE, owner=Optional.absent(), alias=Optional.absent())]), pagination=org.apache.shardingsphere.core.optimize.sharding.segment.select.pagination.Pagination@12707aa3, containsSubquery=false)
Actual SQL: cyberplus_meta_instance_1 ::: SELECT * FROM order_tbl LIMIT 1
Actual SQL: cyberplus_meta_instance_2 ::: SELECT * FROM order_tbl LIMIT 1
Rule Type: sharding
Logic SQL: SHOW FULL TABLES FROM `cyberplus_meta` LIKE 'order_tbl'
SQLStatement: TransparentOptimizedStatement(tables=Tables(tables=[Table(name=order_tbl, alias=Optional.absent())], schema=Optional.absent()))
Actual SQL: cyberplus_meta_instance_1 ::: SHOW FULL TABLES LIKE 'order_tbl'
[ERROR] 15:34:04.184 [ShardingSphere-Command-2] o.a.s.s.f.c.CommandExecutorTask - Exception occur:
org.apache.shardingsphere.core.config.ShardingConfigurationException: Cannot find actual datasource intersection for logic tables: [order_tbl, %]
at org.apache.shardingsphere.core.route.type.unicast.UnicastRoutingEngine.route(UnicastRoutingEngine.java:92)
at org.apache.shardingsphere.core.route.router.sharding.ParsingSQLRouter.route(ParsingSQLRouter.java:78)
at org.apache.shardingsphere.core.route.StatementRoutingEngine.route(StatementRoutingEngine.java:56)
at org.apache.shardingsphere.core.SimpleQueryShardingEngine.route(SimpleQueryShardingEngine.java:60)
at org.apache.shardingsphere.core.BaseShardingEngine.executeRoute(BaseShardingEngine.java:86)
at org.apache.shardingsphere.core.BaseShardingEngine.shard(BaseShardingEngine.java:70)
at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.wrapper.StatementExecutorWrapper.doShardingRoute(StatementExecutorWrapper.java:75)
at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.wrapper.StatementExecutorWrapper.route(StatementExecutorWrapper.java:61)
at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:80)
at org.apache.shardingsphere.shardingproxy.backend.text.admin.UnicastBackendHandler.execute(UnicastBackendHandler.java:57)
at org.apache.shardingsphere.shardingproxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:72)
at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:86)
at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
````````````````````````````````````````````````
### Example codes for reproduce this issue (such as a github link).
Executing sql is
SHOW FULL TABLES FROM `cyberplus_meta` LIKE 'order_tbl'
"><pre class="notranslate"><code class="notranslate"> Rule Type: sharding
Logic SQL: SELECT * FROM order_tbl LIMIT 1
SQLStatement: ShardingSelectOptimizedStatement(tables=Tables(tables=[Table(name=order_tbl, alias=Optional.absent())], schema=Optional.absent()), groupBy=org.apache.shardingsphere.core.optimize.sharding.segment.select.groupby.GroupBy@4683a848, orderBy=org.apache.shardingsphere.core.optimize.sharding.segment.select.orderby.OrderBy@6d56908d, selectItems=SelectItems(startIndex=7, stopIndex=7, distinctRow=false, items=[ShorthandSelectItem(owner=Optional.absent())], tables=[TableSegment(startIndex=14, stopIndex=22, name=order_tbl, quoteCharacter=NONE, owner=Optional.absent(), alias=Optional.absent())]), pagination=org.apache.shardingsphere.core.optimize.sharding.segment.select.pagination.Pagination@4225d0fc, containsSubquery=false)
Actual SQL: cyberplus_meta_instance_1 ::: SELECT * FROM order_tbl LIMIT 1
Actual SQL: cyberplus_meta_instance_2 ::: SELECT * FROM order_tbl LIMIT 1
Rule Type: sharding
Logic SQL: SHOW FULL TABLES FROM `cyberplus_meta` LIKE 'order_tbl'
SQLStatement: TransparentOptimizedStatement(tables=Tables(tables=[Table(name=order_tbl, alias=Optional.absent())], schema=Optional.absent()))
Actual SQL: cyberplus_meta_instance_1 ::: SHOW FULL TABLES LIKE 'order_tbl'
[ERROR] 15:34:04.170 [ShardingSphere-Command-14] o.a.s.s.f.c.CommandExecutorTask - Exception occur:
org.apache.shardingsphere.core.config.ShardingConfigurationException: Cannot find actual datasource intersection for logic tables: [order_tbl, %]
at org.apache.shardingsphere.core.route.type.unicast.UnicastRoutingEngine.route(UnicastRoutingEngine.java:92)
at org.apache.shardingsphere.core.route.router.sharding.ParsingSQLRouter.route(ParsingSQLRouter.java:78)
at org.apache.shardingsphere.core.route.StatementRoutingEngine.route(StatementRoutingEngine.java:56)
at org.apache.shardingsphere.core.SimpleQueryShardingEngine.route(SimpleQueryShardingEngine.java:60)
at org.apache.shardingsphere.core.BaseShardingEngine.executeRoute(BaseShardingEngine.java:86)
at org.apache.shardingsphere.core.BaseShardingEngine.shard(BaseShardingEngine.java:70)
at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.wrapper.StatementExecutorWrapper.doShardingRoute(StatementExecutorWrapper.java:75)
at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.wrapper.StatementExecutorWrapper.route(StatementExecutorWrapper.java:61)
at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:80)
at org.apache.shardingsphere.shardingproxy.backend.text.admin.UnicastBackendHandler.execute(UnicastBackendHandler.java:57)
at org.apache.shardingsphere.shardingproxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:72)
at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:86)
at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Rule Type: sharding
Logic SQL: SELECT * FROM order_tbl LIMIT 1
SQLStatement: ShardingSelectOptimizedStatement(tables=Tables(tables=[Table(name=order_tbl, alias=Optional.absent())], schema=Optional.absent()), groupBy=org.apache.shardingsphere.core.optimize.sharding.segment.select.groupby.GroupBy@53ea2899, orderBy=org.apache.shardingsphere.core.optimize.sharding.segment.select.orderby.OrderBy@747ee701, selectItems=SelectItems(startIndex=7, stopIndex=7, distinctRow=false, items=[ShorthandSelectItem(owner=Optional.absent())], tables=[TableSegment(startIndex=14, stopIndex=22, name=order_tbl, quoteCharacter=NONE, owner=Optional.absent(), alias=Optional.absent())]), pagination=org.apache.shardingsphere.core.optimize.sharding.segment.select.pagination.Pagination@12707aa3, containsSubquery=false)
Actual SQL: cyberplus_meta_instance_1 ::: SELECT * FROM order_tbl LIMIT 1
Actual SQL: cyberplus_meta_instance_2 ::: SELECT * FROM order_tbl LIMIT 1
Rule Type: sharding
Logic SQL: SHOW FULL TABLES FROM `cyberplus_meta` LIKE 'order_tbl'
SQLStatement: TransparentOptimizedStatement(tables=Tables(tables=[Table(name=order_tbl, alias=Optional.absent())], schema=Optional.absent()))
Actual SQL: cyberplus_meta_instance_1 ::: SHOW FULL TABLES LIKE 'order_tbl'
[ERROR] 15:34:04.184 [ShardingSphere-Command-2] o.a.s.s.f.c.CommandExecutorTask - Exception occur:
org.apache.shardingsphere.core.config.ShardingConfigurationException: Cannot find actual datasource intersection for logic tables: [order_tbl, %]
at org.apache.shardingsphere.core.route.type.unicast.UnicastRoutingEngine.route(UnicastRoutingEngine.java:92)
at org.apache.shardingsphere.core.route.router.sharding.ParsingSQLRouter.route(ParsingSQLRouter.java:78)
at org.apache.shardingsphere.core.route.StatementRoutingEngine.route(StatementRoutingEngine.java:56)
at org.apache.shardingsphere.core.SimpleQueryShardingEngine.route(SimpleQueryShardingEngine.java:60)
at org.apache.shardingsphere.core.BaseShardingEngine.executeRoute(BaseShardingEngine.java:86)
at org.apache.shardingsphere.core.BaseShardingEngine.shard(BaseShardingEngine.java:70)
at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.wrapper.StatementExecutorWrapper.doShardingRoute(StatementExecutorWrapper.java:75)
at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.wrapper.StatementExecutorWrapper.route(StatementExecutorWrapper.java:61)
at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:80)
at org.apache.shardingsphere.shardingproxy.backend.text.admin.UnicastBackendHandler.execute(UnicastBackendHandler.java:57)
at org.apache.shardingsphere.shardingproxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:72)
at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:86)
at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
````````````````````````````````````````````````
### Example codes for reproduce this issue (such as a github link).
Executing sql is
SHOW FULL TABLES FROM `cyberplus_meta` LIKE 'order_tbl'
</code></pre></div> | <p dir="auto">sharding proxy version<br>
<a href="https://dist.apache.org/repos/dist/dev/incubator/shardingsphere/4.0.0-RC1/apache-shardingsphere-incubating-4.0.0-RC2-sharding-proxy-bin.tar.gz" rel="nofollow">https://dist.apache.org/repos/dist/dev/incubator/shardingsphere/4.0.0-RC1/apache-shardingsphere-incubating-4.0.0-RC2-sharding-proxy-bin.tar.gz</a></p>
<p dir="auto">(1)<br>
create table tbname1 (id int primary key,key_price decimal(16,2) DEFAULT NULL);</p>
<p dir="auto">(2)<br>
mysql> show full tables from <code class="notranslate">sharding_db</code> like 'tbname1'<br>
no return value<br>
受影响的行: 0<br>
<a href="https://user-images.githubusercontent.com/13394604/63440944-48945d80-c463-11e9-9b5a-13b8e492a043.png" rel="nofollow">https://user-images.githubusercontent.com/13394604/63440944-48945d80-c463-11e9-9b5a-13b8e492a043.png</a>)</p>
<p dir="auto">but sharding-proxy-3.1.0.tar.gz It supports this function.</p>
<p dir="auto">thanks</p> | 1 |
<p dir="auto">I all, very latest git pull on OS X 10.11.4, latest everything I get make clean; make:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
rm -f *# *~
rm -f pcre_h.jl
rm -f errno_h.jl
rm -f build_h.jl
rm -f build_h.jl.phony
rm -f fenv_constants.jl
rm -f uv_constants.jl
rm -f file_constants.jl
rm -f version_git.jl
rm -f version_git.jl.phony
rm -rf _build/*
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
rm -fr /usr/local/julia/usr/lib/libjulia* /usr/local/julia/usr/lib/libccalltest*
rm -f ./julia_flisp.boot ./julia_flisp.boot.inc
rm -f ./*.dbg.obj ./*.o *~ ./*.dylib ./*.a *#
rm -f ./julia_version.h
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
rm -f *.o *.dbg.obj
rm -f /usr/local/julia/usr/bin/julia*
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
rm -f *~
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C micro clean
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C shootout clean
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
rm -f *.txt *~
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
CC src/jltypes.o
CC src/gf.o
FLISP src/julia_flisp.boot
FLISP src/julia_flisp.boot.inc
CC src/ast.o
CC src/builtins.o
CC src/module.o
CC src/codegen.o
CC src/disasm.o
CC src/debuginfo.o
CC src/interpreter.o
CC src/alloc.o
CC src/dlload.o
CC src/sys.o
CC src/init.o
CC src/task.o
CC src/array.o
CC src/dump.o
CC src/toplevel.o
CC src/jl_uv.o
CC src/jlapi.o
CC src/signal-handling.o
CC src/llvm-simdloop.o
CC src/simplevector.o
CC src/gc.o
LINK usr/lib/libjulia.dylib
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
CC ui/repl.o
LINK usr/bin/julia
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
PERL base/pcre_h.jl
PERL base/errno_h.jl
PERL base/build_h.jl.phony
PERL base/fenv_constants.jl
PERL base/file_constants.jl
PERL base/uv_constants.jl
PERL base/version_git.jl.phony
Copying in usr/share/doc/julia/examples
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
JULIA usr/lib/julia/inference0.ji
essentials.jl
reflection.jl
options.jl
promotion.jl
tuple.jl
range.jl
expr.jl
error.jl
bool.jl
number.jl
int.jl
operators.jl
pointer.jl
abstractarray.jl
array.jl
hashing.jl
nofloat_hashing.jl
functors.jl
reduce.jl
intset.jl
dict.jl
iterator.jl
inference.jl
JULIA usr/lib/julia/inference.ji
essentials.jl
reflection.jl
options.jl
promotion.jl
tuple.jl
range.jl
expr.jl
error.jl
bool.jl
number.jl
int.jl
operators.jl
pointer.jl
abstractarray.jl
array.jl
hashing.jl
nofloat_hashing.jl
functors.jl
reduce.jl
intset.jl
dict.jl
iterator.jl
inference.jl
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
JULIA usr/lib/julia/sys.o
exports.jl
essentials.jl
docs/bootstrap.jl
base.jl
reflection.jl
build_h.jl
version_git.jl
c.jl
options.jl
promotion.jl
tuple.jl
range.jl
expr.jl
error.jl
bool.jl
number.jl
int.jl
operators.jl
pointer.jl
refpointer.jl
functors.jl
abstractarray.jl
subarray.jl
array.jl
hashing.jl
rounding.jl
float.jl
complex.jl
rational.jl
abstractarraymath.jl
arraymath.jl
simdloop.jl
reduce.jl
bitarray.jl
intset.jl
dict.jl
set.jl
iterator.jl
osutils.jl
char.jl
ascii.jl
iobuffer.jl
string.jl
strings/types.jl
strings/basic.jl
strings/search.jl
strings/util.jl
strings/io.jl
unicode.jl
unicode/UnicodeError.jl
unicode/types.jl
unicode/checkstring.jl
unicode/utf8.jl
unicode/utf16.jl
unicode/utf32.jl
unicode/utf8proc.jl
parse.jl
shell.jl
regex.jl
pcre.jl
base64.jl
io.jl
iostream.jl
libc.jl
libdl.jl
env.jl
path.jl
intfuncs.jl
nullable.jl
task.jl
lock.jl
show.jl
stream.jl
uv_constants.jl
socket.jl
stat.jl
fs.jl
process.jl
multimedia.jl
grisu.jl
file.jl
methodshow.jl
floatfuncs.jl
math.jl
float16.jl
cartesian.jl
multidimensional.jl
primes.jl
reducedim.jl
ordering.jl
collections.jl
sort.jl
version.jl
gmp.jl
mpfr.jl
combinatorics.jl
hashing2.jl
dSFMT.jl
random.jl
printf.jl
meta.jl
Enums.jl
serialize.jl
channels.jl
multi.jl
managers.jl
loading.jl
poll.jl
mmap.jl
sharedarray.jl
datafmt.jl
deepcopy.jl
interactiveutil.jl
replutil.jl
test.jl
i18n.jl
Terminals.jl
LineEdit.jl
REPLCompletions.jl
REPL.jl
client.jl
util.jl
linalg.jl
broadcast.jl
statistics.jl
sparse.jl
irrationals.jl
dft.jl
dsp.jl
sysinfo.jl
quadgk.jl
fastmath.jl
pkg.jl
profile.jl
Dates.jl
markdown/Markdown.jl
docs/Docs.jl
deprecated.jl
require.jl
docs/helpdb.jl
docs/basedocs.jl
/usr/local/julia/base/precompile.jl
LINK usr/lib/julia/sys.dylib
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
CC usr/lib/libccalltest.dylib"><pre class="notranslate"><code class="notranslate">dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
rm -f *# *~
rm -f pcre_h.jl
rm -f errno_h.jl
rm -f build_h.jl
rm -f build_h.jl.phony
rm -f fenv_constants.jl
rm -f uv_constants.jl
rm -f file_constants.jl
rm -f version_git.jl
rm -f version_git.jl.phony
rm -rf _build/*
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
rm -fr /usr/local/julia/usr/lib/libjulia* /usr/local/julia/usr/lib/libccalltest*
rm -f ./julia_flisp.boot ./julia_flisp.boot.inc
rm -f ./*.dbg.obj ./*.o *~ ./*.dylib ./*.a *#
rm -f ./julia_version.h
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
rm -f *.o *.dbg.obj
rm -f /usr/local/julia/usr/bin/julia*
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
rm -f *~
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C micro clean
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C shootout clean
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
rm -f *.txt *~
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
CC src/jltypes.o
CC src/gf.o
FLISP src/julia_flisp.boot
FLISP src/julia_flisp.boot.inc
CC src/ast.o
CC src/builtins.o
CC src/module.o
CC src/codegen.o
CC src/disasm.o
CC src/debuginfo.o
CC src/interpreter.o
CC src/alloc.o
CC src/dlload.o
CC src/sys.o
CC src/init.o
CC src/task.o
CC src/array.o
CC src/dump.o
CC src/toplevel.o
CC src/jl_uv.o
CC src/jlapi.o
CC src/signal-handling.o
CC src/llvm-simdloop.o
CC src/simplevector.o
CC src/gc.o
LINK usr/lib/libjulia.dylib
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
CC ui/repl.o
LINK usr/bin/julia
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
PERL base/pcre_h.jl
PERL base/errno_h.jl
PERL base/build_h.jl.phony
PERL base/fenv_constants.jl
PERL base/file_constants.jl
PERL base/uv_constants.jl
PERL base/version_git.jl.phony
Copying in usr/share/doc/julia/examples
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
JULIA usr/lib/julia/inference0.ji
essentials.jl
reflection.jl
options.jl
promotion.jl
tuple.jl
range.jl
expr.jl
error.jl
bool.jl
number.jl
int.jl
operators.jl
pointer.jl
abstractarray.jl
array.jl
hashing.jl
nofloat_hashing.jl
functors.jl
reduce.jl
intset.jl
dict.jl
iterator.jl
inference.jl
JULIA usr/lib/julia/inference.ji
essentials.jl
reflection.jl
options.jl
promotion.jl
tuple.jl
range.jl
expr.jl
error.jl
bool.jl
number.jl
int.jl
operators.jl
pointer.jl
abstractarray.jl
array.jl
hashing.jl
nofloat_hashing.jl
functors.jl
reduce.jl
intset.jl
dict.jl
iterator.jl
inference.jl
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
JULIA usr/lib/julia/sys.o
exports.jl
essentials.jl
docs/bootstrap.jl
base.jl
reflection.jl
build_h.jl
version_git.jl
c.jl
options.jl
promotion.jl
tuple.jl
range.jl
expr.jl
error.jl
bool.jl
number.jl
int.jl
operators.jl
pointer.jl
refpointer.jl
functors.jl
abstractarray.jl
subarray.jl
array.jl
hashing.jl
rounding.jl
float.jl
complex.jl
rational.jl
abstractarraymath.jl
arraymath.jl
simdloop.jl
reduce.jl
bitarray.jl
intset.jl
dict.jl
set.jl
iterator.jl
osutils.jl
char.jl
ascii.jl
iobuffer.jl
string.jl
strings/types.jl
strings/basic.jl
strings/search.jl
strings/util.jl
strings/io.jl
unicode.jl
unicode/UnicodeError.jl
unicode/types.jl
unicode/checkstring.jl
unicode/utf8.jl
unicode/utf16.jl
unicode/utf32.jl
unicode/utf8proc.jl
parse.jl
shell.jl
regex.jl
pcre.jl
base64.jl
io.jl
iostream.jl
libc.jl
libdl.jl
env.jl
path.jl
intfuncs.jl
nullable.jl
task.jl
lock.jl
show.jl
stream.jl
uv_constants.jl
socket.jl
stat.jl
fs.jl
process.jl
multimedia.jl
grisu.jl
file.jl
methodshow.jl
floatfuncs.jl
math.jl
float16.jl
cartesian.jl
multidimensional.jl
primes.jl
reducedim.jl
ordering.jl
collections.jl
sort.jl
version.jl
gmp.jl
mpfr.jl
combinatorics.jl
hashing2.jl
dSFMT.jl
random.jl
printf.jl
meta.jl
Enums.jl
serialize.jl
channels.jl
multi.jl
managers.jl
loading.jl
poll.jl
mmap.jl
sharedarray.jl
datafmt.jl
deepcopy.jl
interactiveutil.jl
replutil.jl
test.jl
i18n.jl
Terminals.jl
LineEdit.jl
REPLCompletions.jl
REPL.jl
client.jl
util.jl
linalg.jl
broadcast.jl
statistics.jl
sparse.jl
irrationals.jl
dft.jl
dsp.jl
sysinfo.jl
quadgk.jl
fastmath.jl
pkg.jl
profile.jl
Dates.jl
markdown/Markdown.jl
docs/Docs.jl
deprecated.jl
require.jl
docs/helpdb.jl
docs/basedocs.jl
/usr/local/julia/base/precompile.jl
LINK usr/lib/julia/sys.dylib
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
CC usr/lib/libccalltest.dylib
</code></pre></div> | <p dir="auto">updating command line tools gains us a new build warning and probably failure mode:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="~/julia/build-llvm37$ make -C deps
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Library/Developer/CommandLineTools/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
make: Nothing to be done for `default'."><pre class="notranslate"><code class="notranslate">~/julia/build-llvm37$ make -C deps
dsymutil: Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: /Library/Developer/CommandLineTools/usr/bin/dsymutil -help
/bin/sh: line 0: test: -gt: unary operator expected
make: Nothing to be done for `default'.
</code></pre></div>
<p dir="auto">indeed, it looks like apple is now bundling llvm's dsymutil (i think <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Keno/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Keno">@Keno</a> will like that), which wants a different invocation command:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="~/julia$ dsymutil -v -
LLVM (http://llvm.org/):
LLVM version 7.3.0
Optimized build.
Built Mar 8 2016 (10:26:42).
Default target: x86_64-apple-darwin15.3.0
Host CPU: broadwell
~/julia$ dsymutil --version
LLVM (http://llvm.org/):
LLVM version 7.3.0
Optimized build.
Built Mar 8 2016 (10:26:42).
Default target: x86_64-apple-darwin15.3.0
Host CPU: broadwell"><pre class="notranslate"><code class="notranslate">~/julia$ dsymutil -v -
LLVM (http://llvm.org/):
LLVM version 7.3.0
Optimized build.
Built Mar 8 2016 (10:26:42).
Default target: x86_64-apple-darwin15.3.0
Host CPU: broadwell
~/julia$ dsymutil --version
LLVM (http://llvm.org/):
LLVM version 7.3.0
Optimized build.
Built Mar 8 2016 (10:26:42).
Default target: x86_64-apple-darwin15.3.0
Host CPU: broadwell
</code></pre></div> | 1 |
<p dir="auto">There's a problem with the ES6 generated code when using inner classes. The code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Bug.ts
module Stuff {
export class Foo {
constructor (message: string) {
this.Message = "Hello, " + message
}
Message = ""
}
export module Foo {
export class Bar {
}
}
}
var foo = new Stuff.Foo("World")
console.log(foo.Message)"><pre class="notranslate"><span class="pl-c">// Bug.ts</span>
<span class="pl-smi">module</span> <span class="pl-v">Stuff</span> <span class="pl-kos">{</span>
<span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-v">Foo</span> <span class="pl-kos">{</span>
<span class="pl-en">constructor</span> <span class="pl-kos">(</span><span class="pl-s1">message</span>: <span class="pl-s1">string</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">Message</span> <span class="pl-c1">=</span> <span class="pl-s">"Hello, "</span> <span class="pl-c1">+</span> <span class="pl-s1">message</span>
<span class="pl-kos">}</span>
<span class="pl-c1">Message</span> <span class="pl-c1">=</span> <span class="pl-s">""</span>
<span class="pl-kos">}</span>
<span class="pl-k">export</span> <span class="pl-smi">module</span> <span class="pl-v">Foo</span> <span class="pl-kos">{</span>
<span class="pl-s1">export</span> <span class="pl-s1">class</span> <span class="pl-v">Bar</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">var</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Stuff</span><span class="pl-kos">.</span><span class="pl-c1">Foo</span><span class="pl-kos">(</span><span class="pl-s">"World"</span><span class="pl-kos">)</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">foo</span><span class="pl-kos">.</span><span class="pl-c1">Message</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">compiled with <code class="notranslate">tsc -t ES6 Bug.ts</code> and then by <code class="notranslate">babel --no-highlight-code Bug.js</code> produces error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: Bug.js: Line 10: Duplicate declaration "Foo"
8 | }
9 | Stuff.Foo = Foo;
> 10 | var Foo;
| ^
11 | (function (Foo) {
12 | class Bar {
13 | }"><pre class="notranslate"><code class="notranslate">TypeError: Bug.js: Line 10: Duplicate declaration "Foo"
8 | }
9 | Stuff.Foo = Foo;
> 10 | var Foo;
| ^
11 | (function (Foo) {
12 | class Bar {
13 | }
</code></pre></div> | <p dir="auto">Closely related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="63503889" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/2457" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/2457/hovercard" href="https://github.com/microsoft/TypeScript/issues/2457">#2457</a> and also in reference to <a class="commit-link" href="https://github.com/microsoft/TypeScript/commit/bd4d7fc9eedfb905313b173e284eddf95350e7dc#commitcomment-10328068"><tt>bd4d7fc</tt>#commitcomment-10328068</a></p>
<p dir="auto">A class merging with a module will not work in ES6, because you will end up redeclaring a class and a var (the var is what we emit for the module) in the same scope, which will cause a runtime error. So a class merging with a module needs to be renamed in a similar way as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="63503889" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/2457" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/2457/hovercard" href="https://github.com/microsoft/TypeScript/issues/2457">#2457</a>, except as a var instead of a let.</p> | 1 |
<h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://www.github.com/electron/electron/issues">issue tracker</a> for a feature request that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Electron Version</h3>
<p dir="auto">11.2.0 12.0.0</p>
<h3 dir="auto">What operating system are you using?</h3>
<p dir="auto">macOS</p>
<h3 dir="auto">Operating System Version</h3>
<p dir="auto">macos 11.2.3</p>
<h3 dir="auto">What arch are you using?</h3>
<p dir="auto">x64</p>
<h3 dir="auto">Last Known Working Electron version</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">clone the <code class="notranslate">electron-quick-start</code> example.</p>
<p dir="auto">Fill index.html with following content:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
We are using Node.js <span id="node-version"></span>,
Chromium <span id="chrome-version"></span>,
and Electron <span id="electron-version"></span>.
<form id="searchForm" action="http://www.africau.edu/images/default/sample.pdf" method="get">
<div class="btn-group form-inline">
<button name='submit'>open pdf window</button>
</div>
</form>
<!-- You can also require other files to run in this process -->
<script src="./renderer.js"></script>
</body>
</html>
"><pre class="notranslate"><code class="notranslate"><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
We are using Node.js <span id="node-version"></span>,
Chromium <span id="chrome-version"></span>,
and Electron <span id="electron-version"></span>.
<form id="searchForm" action="http://www.africau.edu/images/default/sample.pdf" method="get">
<div class="btn-group form-inline">
<button name='submit'>open pdf window</button>
</div>
</form>
<!-- You can also require other files to run in this process -->
<script src="./renderer.js"></script>
</body>
</html>
</code></pre></div>
<p dir="auto">open pdf window</p>
<p dir="auto">Then just execute <code class="notranslate">window.print()</code> within pdf_window. Print dialog model opened, click ok, content should be printed && the pdf_window can scroll normally.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">The <code class="notranslate">pdf_window</code> will been stalled with no response to any interaction.</p>
<h3 dir="auto">Testcase Gist URL</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto"><em>No response</em></p> | <h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>11.2.2</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>Windows 10</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>Unknown</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">printToPDF should finish</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Calling printToPDF in a window that contains a cross origin iframe will never resolve.<br>
<strong>Additionally all other calls to printToPDF never resolve as well, even for other windows and other partitions</strong></p>
<h3 dir="auto">To Reproduce</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const electron = require("electron");
function init() {
let browserWindow3 = new electron.BrowserWindow({
show: true,
x: 500,
y: 100,
width: 900,
height: 900,
webPreferences: {
partition: "persist:test1"
}
});
let browserWindow2 = new electron.BrowserWindow({
show: true,
x: 500,
y: 100,
width: 900,
height: 900,
webPreferences: {
partition: "persist:test2"
}
});
browserWindow2.webContents.loadURL("http://www.google.com")
browserWindow3.webContents.loadURL("http://localhost:9000/index.html").then(() => {
setTimeout(() => {
console.log("calling print to pdf");
// Comment out this one to make the other one work
browserWindow3.webContents.printToPDF({
}).then(() => {
console.log("done 1");
})
setTimeout(() => {
browserWindow2.webContents.printToPDF({
}).then(() => {
console.log("done 2");
})
}, 2000);
}, 2000);
});
}
electron.app.on("ready", () => {
init();
});"><pre class="notranslate"><code class="notranslate">const electron = require("electron");
function init() {
let browserWindow3 = new electron.BrowserWindow({
show: true,
x: 500,
y: 100,
width: 900,
height: 900,
webPreferences: {
partition: "persist:test1"
}
});
let browserWindow2 = new electron.BrowserWindow({
show: true,
x: 500,
y: 100,
width: 900,
height: 900,
webPreferences: {
partition: "persist:test2"
}
});
browserWindow2.webContents.loadURL("http://www.google.com")
browserWindow3.webContents.loadURL("http://localhost:9000/index.html").then(() => {
setTimeout(() => {
console.log("calling print to pdf");
// Comment out this one to make the other one work
browserWindow3.webContents.printToPDF({
}).then(() => {
console.log("done 1");
})
setTimeout(() => {
browserWindow2.webContents.printToPDF({
}).then(() => {
console.log("done 2");
})
}, 2000);
}, 2000);
});
}
electron.app.on("ready", () => {
init();
});
</code></pre></div>
<p dir="auto"><strong>index.html</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<!DOCTYPE html>
<html>
<body>
<iframe src="http://www.orf.at"/>
</body>
<script>
</script>
</html>"><pre class="notranslate"><code class="notranslate"><!DOCTYPE html>
<html>
<body>
<iframe src="http://www.orf.at"/>
</body>
<script>
</script>
</html>
</code></pre></div> | 1 |
<p dir="auto">In the table at <a href="http://twitter.github.com/bootstrap/#javascript">http://twitter.github.com/bootstrap/#javascript</a>, <code class="notranslate">bootstrap-button.js</code>'s description is a mere duplicate of <code class="notranslate">bootstrap-scrollspy.js</code>'s description</p> | <p dir="auto">When I open the bootstrap website in IE8 and go to the navbar section, when I click on the Dropdown link in the sample navbar, the dropdown menu has the position arrow at the top right of the dropdown.</p>
<p dir="auto">I cannot duplicate this in my own site with IE8. I have stripped down my code to a minimum so it's just the navbar and bootstrap.css/.js being loaded, but still nothing in IE8.</p>
<p dir="auto">Any ideas on what the bootstrap website is doing so that the position arrow appears in IE8 so that I can mimick that behavior on my own site? Can a note be added to indicate how to duplicate that behavior or possibly something added to the bootstrap.css code to enable that in IE8? Thanks.</p> | 0 |
<p dir="auto">Running <code class="notranslate">/opt/julia-1.0.2/bin/julia --output-o sys-all.o --sysimage /opt/julia-1.0.2/lib/julia/sys.so --startup-file=no --compile=all --eval nothing found 39977 uncompiled methods for compile-all</code> causes segemtation fault:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="found 39977 uncompiled methods for compile-all
11659 / 39977
signal (11): Segmentation fault
in expression starting at no file:0
jl_is_type_type at /buildworker/worker/package_linux64/build/src/julia.h:1058 [inlined]
emit_llvmcall at /buildworker/worker/package_linux64/build/src/ccall.cpp:977
emit_intrinsic at /buildworker/worker/package_linux64/build/src/intrinsics.cpp:921
emit_call at /buildworker/worker/package_linux64/build/src/codegen.cpp:3134
emit_expr at /buildworker/worker/package_linux64/build/src/codegen.cpp:3902
emit_ssaval_assign at /buildworker/worker/package_linux64/build/src/codegen.cpp:3615
emit_stmtpos at /buildworker/worker/package_linux64/build/src/codegen.cpp:3801 [inlined]
emit_function at /buildworker/worker/package_linux64/build/src/codegen.cpp:6254
jl_compile_linfo at /buildworker/worker/package_linux64/build/src/codegen.cpp:1159
_compile_all_deq at /buildworker/worker/package_linux64/build/src/precompile.c:262 [inlined]
jl_compile_all_defs at /buildworker/worker/package_linux64/build/src/precompile.c:303
jl_precompile at /buildworker/worker/package_linux64/build/src/precompile.c:365 [inlined]
jl_write_compiler_output at /buildworker/worker/package_linux64/build/src/precompile.c:34
jl_atexit_hook at /buildworker/worker/package_linux64/build/src/init.c:233
main at /buildworker/worker/package_linux64/build/ui/repl.c:234
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_start at /opt/julia-1.0.2/bin/julia (unknown line)
Allocations: 1254722 (Pool: 1254268; Big: 454); GC: 2
Segmentation fault"><pre class="notranslate"><code class="notranslate">found 39977 uncompiled methods for compile-all
11659 / 39977
signal (11): Segmentation fault
in expression starting at no file:0
jl_is_type_type at /buildworker/worker/package_linux64/build/src/julia.h:1058 [inlined]
emit_llvmcall at /buildworker/worker/package_linux64/build/src/ccall.cpp:977
emit_intrinsic at /buildworker/worker/package_linux64/build/src/intrinsics.cpp:921
emit_call at /buildworker/worker/package_linux64/build/src/codegen.cpp:3134
emit_expr at /buildworker/worker/package_linux64/build/src/codegen.cpp:3902
emit_ssaval_assign at /buildworker/worker/package_linux64/build/src/codegen.cpp:3615
emit_stmtpos at /buildworker/worker/package_linux64/build/src/codegen.cpp:3801 [inlined]
emit_function at /buildworker/worker/package_linux64/build/src/codegen.cpp:6254
jl_compile_linfo at /buildworker/worker/package_linux64/build/src/codegen.cpp:1159
_compile_all_deq at /buildworker/worker/package_linux64/build/src/precompile.c:262 [inlined]
jl_compile_all_defs at /buildworker/worker/package_linux64/build/src/precompile.c:303
jl_precompile at /buildworker/worker/package_linux64/build/src/precompile.c:365 [inlined]
jl_write_compiler_output at /buildworker/worker/package_linux64/build/src/precompile.c:34
jl_atexit_hook at /buildworker/worker/package_linux64/build/src/init.c:233
main at /buildworker/worker/package_linux64/build/ui/repl.c:234
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_start at /opt/julia-1.0.2/bin/julia (unknown line)
Allocations: 1254722 (Pool: 1254268; Big: 454); GC: 2
Segmentation fault
</code></pre></div>
<p dir="auto">I expect to get sys-all.so which then can be used for <code class="notranslate">cc -shared -o sys-all.so sys-all.o -ljulia</code>.</p> | <p dir="auto">It would be nice to have a <code class="notranslate">switch</code>-like statement, exploiting LLVM's built-in <a href="http://llvm.org/docs/LangRef.html#switch-instruction" rel="nofollow">switch instruction</a>, since this can greatly enhance performance of look-up tables (which are not uncommon in inner loops), compared to chains of <code class="notranslate">if-else</code> statements (or a <code class="notranslate">Dict</code> of functions).</p>
<p dir="auto">I feel like I've mentioned this to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/JeffBezanson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/JeffBezanson">@JeffBezanson</a>, before, but can't find an issue for it.</p> | 0 |
<ol dir="auto">
<li>I rebuild the opencv and</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="NVIDIA CUDA: YES (ver 10.0, CUFFT CUBLAS)
NVIDIA GPU arch: 30 35 37 50 52 60 61 70 75
NVIDIA PTX archs:
cuDNN: YES (ver 7.6.4)"><pre class="notranslate"><code class="notranslate">NVIDIA CUDA: YES (ver 10.0, CUFFT CUBLAS)
NVIDIA GPU arch: 30 35 37 50 52 60 61 70 75
NVIDIA PTX archs:
cuDNN: YES (ver 7.6.4)
</code></pre></div>
<ol start="2" dir="auto">
<li>
<p dir="auto">my config:NVIDIA GeForce MX150 CUDA:10.1 CUDNN:8.0.2</p>
</li>
<li>
<p dir="auto">the darknet can use gpu</p>
</li>
<li>
<p dir="auto">my code is :</p>
</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="auto net = cv::dnn::readNetFromDarknet("D://yolov4.cfg", "D://yolov4_last.weights");
net.setPreferableBackend(cv::dnn::DNN_BACKEND_CUDA);
net.setPreferableTarget(cv::dnn::DNN_TARGET_CUDA);
auto output_names = net.getUnconnectedOutLayersNames();
cv::Mat frame, blob;
std::vector<cv::Mat> detections;
frame = imread("D:/1.jpg");
auto total_start = std::chrono::steady_clock::now();
cv::dnn::blobFromImage(frame, blob, 1 / 255.0, cv::Size(416, 416));
net.setInput(blob);
auto dnn_start = std::chrono::steady_clock::now();
net.forward(detections, output_names);
auto dnn_end = std::chrono::steady_clock::now();"><pre class="notranslate"><code class="notranslate">auto net = cv::dnn::readNetFromDarknet("D://yolov4.cfg", "D://yolov4_last.weights");
net.setPreferableBackend(cv::dnn::DNN_BACKEND_CUDA);
net.setPreferableTarget(cv::dnn::DNN_TARGET_CUDA);
auto output_names = net.getUnconnectedOutLayersNames();
cv::Mat frame, blob;
std::vector<cv::Mat> detections;
frame = imread("D:/1.jpg");
auto total_start = std::chrono::steady_clock::now();
cv::dnn::blobFromImage(frame, blob, 1 / 255.0, cv::Size(416, 416));
net.setInput(blob);
auto dnn_start = std::chrono::steady_clock::now();
net.forward(detections, output_names);
auto dnn_end = std::chrono::steady_clock::now();
</code></pre></div>
<ol start="5" dir="auto">
<li>If i only use cpu,the time is 1.5 s . if i use the gpu ,the time is 5 s. i do not know why</li>
</ol>
<p dir="auto">hope giving me some tips . thank you</p> | <p dir="auto">1,i rebuild the opencv and</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="NVIDIA CUDA: YES (ver 10.0, CUFFT CUBLAS)
NVIDIA GPU arch: 30 35 37 50 52 60 61 70 75
NVIDIA PTX archs:"><pre class="notranslate"><code class="notranslate">NVIDIA CUDA: YES (ver 10.0, CUFFT CUBLAS)
NVIDIA GPU arch: 30 35 37 50 52 60 61 70 75
NVIDIA PTX archs:
</code></pre></div>
<p dir="auto">cuDNN: YES (ver 7.6.4)</p>
<p dir="auto">2,my config:NVIDIA GeForce MX150 CUDA:10.1 CUDNN:8.0.2</p>
<p dir="auto">3,the darknet can use gpu</p>
<p dir="auto">4.my code is :<br>
auto net = cv::dnn::readNetFromDarknet("D://yolov4.cfg", "D://yolov4_last.weights");<br>
net.setPreferableBackend(cv::dnn::DNN_BACKEND_CUDA);<br>
net.setPreferableTarget(cv::dnn::DNN_TARGET_CUDA);<br>
auto output_names = net.getUnconnectedOutLayersNames();</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cv::Mat frame, blob;
std::vector<cv::Mat> detections;
frame = imread("D:/1.jpg");
auto total_start = std::chrono::steady_clock::now();
cv::dnn::blobFromImage(frame, blob, 1 / 255.0, cv::Size(416, 416));
net.setInput(blob);
auto dnn_start = std::chrono::steady_clock::now();
net.forward(detections, output_names);
auto dnn_end = std::chrono::steady_clock::now();"><pre class="notranslate"><code class="notranslate">cv::Mat frame, blob;
std::vector<cv::Mat> detections;
frame = imread("D:/1.jpg");
auto total_start = std::chrono::steady_clock::now();
cv::dnn::blobFromImage(frame, blob, 1 / 255.0, cv::Size(416, 416));
net.setInput(blob);
auto dnn_start = std::chrono::steady_clock::now();
net.forward(detections, output_names);
auto dnn_end = std::chrono::steady_clock::now();
</code></pre></div>
<p dir="auto">5,if i only use cpu,the time is 1.5 s . if i use the gpu ,the time is 5 s. i do not know why</p>
<p dir="auto">hope giving me some tips . thank you</p> | 1 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import sklearn.tree
import numpy as np
clf = sklearn.tree.DecisionTreeClassifier()
X = np.array([[1],[10]])
y = np.array([1000,2000])
clf = clf.fit(X,y)
X2 = np.array([[1]]) # right shape
clf.predict(X2)
clf.predict_proba(X2)
X3 = np.array([1]) # wrong shape
clf.predict(X3)
clf.predict_proba(X3)
X4 = np.array([[np.nan]]) # nan inputs
clf.predict(X4)
clf.predict_proba(X4)"><pre class="notranslate"><code class="notranslate">import sklearn.tree
import numpy as np
clf = sklearn.tree.DecisionTreeClassifier()
X = np.array([[1],[10]])
y = np.array([1000,2000])
clf = clf.fit(X,y)
X2 = np.array([[1]]) # right shape
clf.predict(X2)
clf.predict_proba(X2)
X3 = np.array([1]) # wrong shape
clf.predict(X3)
clf.predict_proba(X3)
X4 = np.array([[np.nan]]) # nan inputs
clf.predict(X4)
clf.predict_proba(X4)
</code></pre></div>
<p dir="auto">Probably should throw an exception if the shape is wrong or <code class="notranslate">np.nan</code> is in the input.</p> | <p dir="auto">And add a test in the common tests.</p> | 1 |
<p dir="auto"><code class="notranslate">EventTarget</code> has not been fully ported over to use webidl. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1235849435" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/14601" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/14601/hovercard" href="https://github.com/denoland/deno/pull/14601">#14601</a> started the process with <code class="notranslate">addEventListener()</code>.</p> | <p dir="auto">Various minor issues arise from not doing this: <a href="https://wpt.fyi/results/dom/events/AddEventListenerOptions-signal.any.html?label=master&product=deno" rel="nofollow">https://wpt.fyi/results/dom/events/AddEventListenerOptions-signal.any.html?label=master&product=deno</a></p> | 1 |
<p dir="auto">While testing some playbooks with rpm_key module I have noticed that each time I run it it imports the same key. It would be good to have an native ansible option which would prevent importing already imported key.</p> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">ansible/lib/ansible/playbook/role/<strong>init</strong>.py<br>
ansible/lib/ansible/executor/play_iterator.py</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.1.0.0
"><pre class="notranslate"><code class="notranslate">ansible 2.1.0.0
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">No change</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">In official ansible document site,<br>
<a href="http://docs.ansible.com/ansible/playbooks_roles.html" rel="nofollow">http://docs.ansible.com/ansible/playbooks_roles.html</a><br>
It said,<br>
Roles dependencies are always executed before the role that includes them, and are recursive. By default, roles can also only be added as a dependency once - if another role also lists it as a dependency it will not be run again.<br>
but sometimes, it doesn't work as expected, the same role were executed multiple times. Maybe we need consider what role object is? the same role definition with different variable input may be considered different role object, but if we add conditional dependency for a role, that is we use "when", is the role with "when" different with role without "when"?</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Suppose we have a playbook, which has a role named csf that depends on csfA/csfB/csfC, and csfB and csfA depends on csfC in some condition,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# main playbook
#ls.yml
---
- name: play1
hosts: SSHproxy
remote_user: root
gather_facts: false
roles:
- {role: csf, taskN: task1 }
#csf role definition
#roles/csf/meta/main.yml
---
dependencies:
- role: csfC
- role: csfA
- role: csfB
# csfA role defintion
#roles/csfA/meta/main.yml
---
dependencies:
- {role: csfC, when: taskN=='task1'}
#roles/csfA/tasks/main.yml
- shell: ls
# csfB role definition
#roles/csfB/meta/main.yml
---
dependencies:
- {role: csfC, when: taskN=='task1'}
#roles/csfB/tasks/main.yml
- shell: ls
"><pre class="notranslate"><code class="notranslate"># main playbook
#ls.yml
---
- name: play1
hosts: SSHproxy
remote_user: root
gather_facts: false
roles:
- {role: csf, taskN: task1 }
#csf role definition
#roles/csf/meta/main.yml
---
dependencies:
- role: csfC
- role: csfA
- role: csfB
# csfA role defintion
#roles/csfA/meta/main.yml
---
dependencies:
- {role: csfC, when: taskN=='task1'}
#roles/csfA/tasks/main.yml
- shell: ls
# csfB role definition
#roles/csfB/meta/main.yml
---
dependencies:
- {role: csfC, when: taskN=='task1'}
#roles/csfB/tasks/main.yml
- shell: ls
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<!--- What did you expect to happen when running the steps above? -->
role csfC will be executed just one time
PLAY [play1] *******************************************************************
TASK [csfC : command] **********************************************************
changed: [SSHproxy]
TASK [csfA : command] **********************************************************
changed: [SSHproxy]
TASK [csfB : command] **********************************************************
changed: [SSHproxy]
PLAY RECAP *********************************************************************
SSHproxy : ok=3 changed=3 unreachable=0 failed=0"><pre class="notranslate"><code class="notranslate"><!--- What did you expect to happen when running the steps above? -->
role csfC will be executed just one time
PLAY [play1] *******************************************************************
TASK [csfC : command] **********************************************************
changed: [SSHproxy]
TASK [csfA : command] **********************************************************
changed: [SSHproxy]
TASK [csfB : command] **********************************************************
changed: [SSHproxy]
PLAY RECAP *********************************************************************
SSHproxy : ok=3 changed=3 unreachable=0 failed=0
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="role csfC were executed two times.
PLAY [play1] *******************************************************************
TASK [csfC : command] **********************************************************
changed: [SSHproxy]
TASK [csfC : command] **********************************************************
changed: [SSHproxy]
TASK [csfA : command] **********************************************************
changed: [SSHproxy]
TASK [csfB : command] **********************************************************
changed: [SSHproxy]
PLAY RECAP *********************************************************************
SSHproxy : ok=4 changed=4 unreachable=0 failed=0"><pre class="notranslate"><code class="notranslate">role csfC were executed two times.
PLAY [play1] *******************************************************************
TASK [csfC : command] **********************************************************
changed: [SSHproxy]
TASK [csfC : command] **********************************************************
changed: [SSHproxy]
TASK [csfA : command] **********************************************************
changed: [SSHproxy]
TASK [csfB : command] **********************************************************
changed: [SSHproxy]
PLAY RECAP *********************************************************************
SSHproxy : ok=4 changed=4 unreachable=0 failed=0
</code></pre></div> | 0 |
<p dir="auto">[Enter steps to reproduce below:]</p>
<ol dir="auto">
<li>...</li>
<li>...</li>
</ol>
<p dir="auto"><strong>Atom Version</strong>: 0.209.0<br>
<strong>System</strong>: Unknown Windows Version<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Stack Trace</h3>
<p dir="auto">Uncaught Error: Cannot find module './context-menu'<br>
Error: Cannot find module './context-menu'<br>
at Function.Module._resolveFilename (module.js:328:15)<br>
at Function.Module._load (module.js:270:25)<br>
at Module.require (module.js:357:17)<br>
at require (module.js:376:17)<br>
at BrowserWindow. (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\app.asar\src\browser\atom-window.js:152:27)<br>
at emitOne (events.js:77:13)<br>
at BrowserWindow.emit (events.js:166:7)<br>
at callFunction (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)<br>
at EventEmitter. (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)<br>
at emitMany (events.js:108:13)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\app.asar\src\browser\atom-window.js:152:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\app.asar\src\window-event-handler.js:148:33)
at HTMLDocument.handler (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)
"><pre class="notranslate"><code class="notranslate">At C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\app.asar\src\browser\atom-window.js:152:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\app.asar\src\window-event-handler.js:148:33)
at HTMLDocument.handler (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\ninesCTwoDuo\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)
</code></pre></div>
<h3 dir="auto">Commands</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" 2x -1:56.1.0 core:move-down (atom-text-editor.editor.is-focused)
-1:54.7.0 editor:newline (atom-text-editor.editor.is-focused)
2x -1:47.7.0 core:backspace (atom-text-editor.editor.is-focused)
2x -1:45.8.0 editor:newline (atom-text-editor.editor.is-focused)
-1:38.9.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
-1:37.7.0 editor:newline (atom-text-editor.editor.is-focused)
-1:35.5.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
-1:33.4.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
2x -1:32 editor:newline (atom-text-editor.editor.is-focused)
-1:30.3.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
-1:24.2.0 core:move-right (atom-text-editor.editor.is-focused)
-1:23.2.0 core:save (atom-text-editor.editor.is-focused)
3x -1:22.8.0 core:move-up (atom-text-editor.editor.is-focused)
11x -1:22.1.0 core:move-left (atom-text-editor.editor.is-focused)
2x -1:20.9.0 core:move-right (atom-text-editor.editor.is-focused)
6x -1:18.9.0 core:save (atom-text-editor.editor.is-focused.autocomplete-active)"><pre class="notranslate"><code class="notranslate"> 2x -1:56.1.0 core:move-down (atom-text-editor.editor.is-focused)
-1:54.7.0 editor:newline (atom-text-editor.editor.is-focused)
2x -1:47.7.0 core:backspace (atom-text-editor.editor.is-focused)
2x -1:45.8.0 editor:newline (atom-text-editor.editor.is-focused)
-1:38.9.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
-1:37.7.0 editor:newline (atom-text-editor.editor.is-focused)
-1:35.5.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
-1:33.4.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
2x -1:32 editor:newline (atom-text-editor.editor.is-focused)
-1:30.3.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
-1:24.2.0 core:move-right (atom-text-editor.editor.is-focused)
-1:23.2.0 core:save (atom-text-editor.editor.is-focused)
3x -1:22.8.0 core:move-up (atom-text-editor.editor.is-focused)
11x -1:22.1.0 core:move-left (atom-text-editor.editor.is-focused)
2x -1:20.9.0 core:move-right (atom-text-editor.editor.is-focused)
6x -1:18.9.0 core:save (atom-text-editor.editor.is-focused.autocomplete-active)
</code></pre></div>
<h3 dir="auto">Config</h3>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"core": {},
"editor": {
"invisibles": {}
}
}"><pre class="notranslate">{
<span class="pl-ent">"core"</span>: {},
<span class="pl-ent">"editor"</span>: {
<span class="pl-ent">"invisibles"</span>: {}
}
}</pre></div>
<h3 dir="auto">Installed Packages</h3>
<div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User
.bin, vundefined
atom-typescript, v4.5.9
linter, v0.12.7
# Dev
No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span>
.<span class="pl-smi">bin</span>, vundefined
atom<span class="pl-k">-</span>typescript, v4.<span class="pl-ii">5</span>.<span class="pl-ii">9</span>
linter, v0.<span class="pl-ii">12</span>.<span class="pl-ii">7</span>
<span class="pl-c"><span class="pl-c">#</span> Dev</span>
<span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div> | <p dir="auto">I right-clicked on a folder in the tree view</p>
<p dir="auto"><strong>Atom Version</strong>: 0.194.0<br>
<strong>System</strong>: Windows 7 Entreprise<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Stack Trace</h3>
<p dir="auto">Uncaught Error: Cannot find module './context-menu'<br>
Error: Cannot find module './context-menu'<br>
at Function.Module._resolveFilename (module.js:328:15)<br>
at Function.Module._load (module.js:270:25)<br>
at Module.require (module.js:357:17)<br>
at require (module.js:376:17)<br>
at BrowserWindow. (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\browser\atom-window.js:152:27)<br>
at emitOne (events.js:77:13)<br>
at BrowserWindow.emit (events.js:166:7)<br>
at callFunction (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)<br>
at EventEmitter. (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)<br>
at emitMany (events.js:108:13)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\browser\atom-window.js:152:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\window-event-handler.js:149:33)
at HTMLDocument.handler (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)
"><pre class="notranslate"><code class="notranslate">At C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\browser\atom-window.js:152:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\window-event-handler.js:149:33)
at HTMLDocument.handler (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)
</code></pre></div>
<h3 dir="auto">Commands</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -4:55.5.0 editor:checkout-head-revision (atom-text-editor.editor.is-focused)
2x -3:41.6.0 window:focus-pane-on-right (atom-text-editor.editor)
-3:17.5.0 application:add-project-folder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-2:47.4.0 editor:newline (atom-text-editor.editor.is-focused)
-2:38.2.0 core:cut (atom-text-editor.editor)
-2:36.5.0 core:paste (atom-text-editor.editor.is-focused)
-2:26.6.0 core:save (atom-text-editor.editor.is-focused)
-2:20.6.0 core:move-down (atom-text-editor.editor)
-2:20.4.0 autocomplete-plus:confirm (atom-text-editor.editor)
-2:15.8.0 core:save (atom-text-editor.editor)
-2:08.7.0 core:copy (atom-text-editor.editor.is-focused)
-2:01.2.0 core:paste (atom-text-editor.editor.is-focused)
-1:59.7.0 core:save (atom-text-editor.editor.is-focused)
-1:52.2.0 core:paste (atom-text-editor.editor.is-focused)
-1:51.6.0 core:save (atom-text-editor.editor.is-focused)
-1:30.6.0 core:backspace (atom-text-editor.editor)"><pre class="notranslate"><code class="notranslate"> -4:55.5.0 editor:checkout-head-revision (atom-text-editor.editor.is-focused)
2x -3:41.6.0 window:focus-pane-on-right (atom-text-editor.editor)
-3:17.5.0 application:add-project-folder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-2:47.4.0 editor:newline (atom-text-editor.editor.is-focused)
-2:38.2.0 core:cut (atom-text-editor.editor)
-2:36.5.0 core:paste (atom-text-editor.editor.is-focused)
-2:26.6.0 core:save (atom-text-editor.editor.is-focused)
-2:20.6.0 core:move-down (atom-text-editor.editor)
-2:20.4.0 autocomplete-plus:confirm (atom-text-editor.editor)
-2:15.8.0 core:save (atom-text-editor.editor)
-2:08.7.0 core:copy (atom-text-editor.editor.is-focused)
-2:01.2.0 core:paste (atom-text-editor.editor.is-focused)
-1:59.7.0 core:save (atom-text-editor.editor.is-focused)
-1:52.2.0 core:paste (atom-text-editor.editor.is-focused)
-1:51.6.0 core:save (atom-text-editor.editor.is-focused)
-1:30.6.0 core:backspace (atom-text-editor.editor)
</code></pre></div>
<h3 dir="auto">Config</h3>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"core": {
"ignoredNames": [
"node_modules"
],
"themes": [
"atom-dark-ui",
"seti-syntax"
],
"disabledPackages": [
"Tern"
],
"projectHome": "Y:\\app-tfoumax"
},
"editor": {
"invisibles": {},
"softWrap": true,
"showIndentGuide": true
}
}"><pre class="notranslate">{
<span class="pl-ent">"core"</span>: {
<span class="pl-ent">"ignoredNames"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>node_modules<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"themes"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>atom-dark-ui<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>seti-syntax<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"disabledPackages"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>Tern<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"projectHome"</span>: <span class="pl-s"><span class="pl-pds">"</span>Y:<span class="pl-cce">\\</span>app-tfoumax<span class="pl-pds">"</span></span>
},
<span class="pl-ent">"editor"</span>: {
<span class="pl-ent">"invisibles"</span>: {},
<span class="pl-ent">"softWrap"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"showIndentGuide"</span>: <span class="pl-c1">true</span>
}
}</pre></div>
<h3 dir="auto">Installed Packages</h3>
<div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User
autocomplete-plus, v2.12.0
autocomplete-snippets, v1.2.0
javascript-snippets, v1.0.0
jshint, v1.3.5
language-ejs, v0.1.0
linter, v0.12.1
pretty-json, v0.3.3
save-session, v0.14.0
Search, v0.4.0
seti-syntax, v0.4.0
# Dev
No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span>
autocomplete<span class="pl-k">-</span>plus, v2.<span class="pl-ii">12</span>.<span class="pl-ii">0</span>
autocomplete<span class="pl-k">-</span>snippets, v1.<span class="pl-ii">2</span>.<span class="pl-ii">0</span>
javascript<span class="pl-k">-</span>snippets, v1.<span class="pl-ii">0</span>.<span class="pl-ii">0</span>
jshint, v1.<span class="pl-ii">3</span>.<span class="pl-ii">5</span>
language<span class="pl-k">-</span>ejs, v0.<span class="pl-ii">1</span>.<span class="pl-ii">0</span>
linter, v0.<span class="pl-ii">12</span>.<span class="pl-ii">1</span>
pretty<span class="pl-k">-</span>json, v0.<span class="pl-ii">3</span>.<span class="pl-ii">3</span>
save<span class="pl-k">-</span>session, v0.<span class="pl-ii">14</span>.<span class="pl-ii">0</span>
Search, v0.<span class="pl-ii">4</span>.<span class="pl-ii">0</span>
seti<span class="pl-k">-</span>syntax, v0.<span class="pl-ii">4</span>.<span class="pl-ii">0</span>
<span class="pl-c"><span class="pl-c">#</span> Dev</span>
<span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div> | 1 |
<p dir="auto">The pluralization of rest resource names in URL paths is mostly human conceit that complicates every interaction from clients and leads to little practical benefit for end users. In addition, it's an arbitrary transformation that cannot lead to predictable results.</p>
<p dir="auto">The use of pluralization is entirely historical, and is not based on any pattern other than making readable urls for bookmarking in a web browser. That is not the same use case as a well constructed API - the set of end users who create urls against our API are extremely limited.</p>
<p dir="auto">I believe for v2 versions of our APIs and new API resources we should abandon pluralization in our URL paths. We can continue to support the old paths as aliases throughout each published API version, but removing the arbitrary process of generating a plurals will allow future api logic to be simpler.</p>
<p dir="auto">Ie:</p>
<p dir="auto">/api/v1/namespace/foo/pod/bar/subresource</p> | <p dir="auto">Today the resync interval on a controller forces a LIST, and then as a consequence sends all objects down the reflector. However, for most controllers LIST is necessary because</p>
<ol dir="auto">
<li>Watch is reliable</li>
<li>They do not mutate the store themselves and thus might have data out of sync with etcd</li>
<li>They do not "drop" events when failures happen (instead they requeue)</li>
<li>Their source of data is relatively up to date, or isn't vulnerable to event reordering (B happens before A and is therefore ignored).</li>
</ol>
<p dir="auto">We should split "sync" into "sync" (send all events to listeners) and "list" (clear the cache and fetch from etcd).</p>
<p dir="auto">All reflectors against etcd should have long "list" intervals (12-24h). Controllers that don't mutate the store or drop events should have long relist intervals AND resync intervals. For controllers that drop events or mutate the store in a potentially inconsistent way, we should relist infrequently and resync frequently.</p>
<p dir="auto">The following reflectors are "fast" - every 30s</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="*api.Service from controller/endpoint/endpoints_controller.go:129
*extensions.Job from controller/job/controller.go:140
*api.ReplicationController from controller/replication/replication_controller.go:209
*extensions.DaemonSet from controller/daemon/controller.go:210
*extensions.HorizontalPodAutoscaler from controller/podautoscaler/horizontal.go:121"><pre class="notranslate"><code class="notranslate">*api.Service from controller/endpoint/endpoints_controller.go:129
*extensions.Job from controller/job/controller.go:140
*api.ReplicationController from controller/replication/replication_controller.go:209
*extensions.DaemonSet from controller/daemon/controller.go:210
*extensions.HorizontalPodAutoscaler from controller/podautoscaler/horizontal.go:121
</code></pre></div>
<p dir="auto">These reflectors should have a 24h relist. We should separate resync, then tune each appropriately.</p> | 0 |
<p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):</p>
<p dir="auto">Yes</p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):</p>
<p dir="auto">runtime.go:64] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)</p>
<p dir="auto">kubernetes arm invalid memory etcdWatcher</p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):</p>
<p dir="auto">BUG REPORT</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p>
<p dir="auto">1.4</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: Raspbery Pi 3</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): Ubuntu 16.04.1 LTS</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): 4.1.19-v7 armv7l</li>
<li><strong>Install tools</strong>: kubeadm</li>
<li><strong>Others</strong>: Had to add /boot/cmdline.txt added cgroup_enable=memory</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto">When kubeadm starts the api server it starts, begins listening then fails with the following message:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I0929 15:21:31.213981 1 genericapiserver.go:717] Serving securely on 0.0.0.0:443
I0929 15:21:31.214120 1 genericapiserver.go:762] Serving insecurely on 127.0.0.1:8080
I0929 15:21:31.227785 1 reflector.go:249] Listing and watching *api.LimitRange from k8s.io/kubernetes/plugin/pkg/admission/limitranger/admission.go:154
I0929 15:21:31.233122 1 handlers.go:162] GET /api/v1/limitranges?resourceVersion=0: (2.872585ms) 200 [[kube-apiserver/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47712]
I0929 15:21:31.233647 1 reflector.go:249] Listing and watching *api.ServiceAccount from k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/admission.go:103
I0929 15:21:31.234397 1 reflector.go:249] Listing and watching *storage.StorageClass from k8s.io/kubernetes/plugin/pkg/admission/storageclass/default/admission.go:62
I0929 15:21:31.234689 1 reflector.go:249] Listing and watching *api.ResourceQuota from k8s.io/kubernetes/plugin/pkg/admission/resourcequota/resource_access.go:83
I0929 15:21:31.235308 1 reflector.go:249] Listing and watching *api.Secret from k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/admission.go:119
I0929 15:21:31.240989 1 handlers.go:162] GET /api/v1/resourcequotas?resourceVersion=0: (2.16535ms) 200 [[kube-apiserver/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47712]
I0929 15:21:31.241224 1 handlers.go:162] GET /api/v1/serviceaccounts?resourceVersion=0: (3.223572ms) 200 [[kube-apiserver/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47713]
I0929 15:21:31.242460 1 handlers.go:162] GET /apis/storage.k8s.io/v1beta1/storageclasses?resourceVersion=0: (3.584299ms) 200 [[kube-apiserver/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47714]
I0929 15:21:31.243120 1 handlers.go:162] GET /api/v1/secrets?fieldSelector=type%3Dkubernetes.io%2Fservice-account-token&resourceVersion=0: (2.397484ms) 200 [[kube-apiserver/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47717]
I0929 15:21:31.385736 1 handlers.go:162] GET /api/v1/nodes?resourceVersion=0: (2.577587ms) 200 [[kube-scheduler/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47720]
I0929 15:21:31.398981 1 handlers.go:162] GET /api/v1/services?resourceVersion=0: (1.901341ms) 200 [[kube-scheduler/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47721]
I0929 15:21:31.429622 1 logs.go:41] http: TLS handshake error from 192.168.3.50:44034: read tcp 192.168.3.50:443->192.168.3.50:44034: read: connection reset by peer
I0929 15:21:31.526282 1 handlers.go:162] GET /api/v1/replicationcontrollers?resourceVersion=0: (4.753822ms) 200 [[kube-scheduler/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47723]
I0929 15:21:31.596865 1 handlers.go:162] GET /api/v1/persistentvolumes?resourceVersion=0: (5.896991ms) 200 [[kube-scheduler/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47724]
I0929 15:21:31.598638 1 handlers.go:162] GET /api/v1/pods?fieldSelector=spec.nodeName%21%3D%2Cstatus.phase%21%3DFailed%2Cstatus.phase%21%3DSucceeded&resourceVersion=0: (7.20141ms) 200 [[kube-scheduler/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47727]
I0929 15:21:31.605112 1 handlers.go:162] GET /api/v1/pods?fieldSelector=spec.nodeName%3D%2Cstatus.phase%21%3DFailed%2Cstatus.phase%21%3DSucceeded&resourceVersion=0: (6.404489ms) 200 [[kube-scheduler/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47726]
I0929 15:21:31.646091 1 handlers.go:162] GET /apis/extensions/v1beta1/replicasets?resourceVersion=0: (43.100753ms) 200 [[kube-scheduler/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47725]
I0929 15:21:31.692673 1 reflector.go:249] Listing and watching *api.Namespace from ????
I0929 15:21:31.703559 1 handlers.go:162] GET /api/v1/namespaces?resourceVersion=0: (6.497352ms) 200 [[kube-apiserver/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47716]
I0929 15:21:31.743619 1 logs.go:41] http: TLS handshake error from 192.168.3.50:44037: read tcp 192.168.3.50:443->192.168.3.50:44037: read: connection reset by peer
I0929 15:21:31.822912 1 logs.go:41] http: TLS handshake error from 192.168.3.50:44043: read tcp 192.168.3.50:443->192.168.3.50:44043: read: connection reset by peer
I0929 15:21:32.223161 1 handlers.go:162] GET /api/v1/persistentvolumeclaims?resourceVersion=0: (4.613355ms) 200 [[kube-scheduler/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47729]
I0929 15:21:32.355696 1 handlers.go:162] GET /api/v1/namespaces/kube-system/endpoints/kube-controller-manager: (6.227823ms) 200 [[kube-controller-manager/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47730]
I0929 15:21:32.380576 1 handlers.go:162] PUT /api/v1/namespaces/kube-system/endpoints/kube-controller-manager: (16.689993ms) 200 [[kube-controller-manager/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47730]
E0929 15:21:32.380501 1 runtime.go:64] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:70
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:63
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:49
/usr/local/go_k8s_patched/src/runtime/asm_arm.s:429
/usr/local/go_k8s_patched/src/runtime/panic.go:458
/usr/local/go_k8s_patched/src/runtime/panic.go:62
/usr/local/go_k8s_patched/src/runtime/sigpanic_unix.go:24
/usr/local/go_k8s_patched/src/sync/atomic/asm_linux_arm.s:109
/usr/local/go_k8s_patched/src/sync/atomic/64bit_arm.go:10
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/storage/etcd/etcd_watcher.go:57
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/storage/etcd/etcd_watcher.go:316
/usr/local/go_k8s_patched/src/runtime/asm_arm.s:998
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x4 pc=0x11fa64]
goroutine 212 [running]:
panic(0x2799878, 0x14022008)
/usr/local/go_k8s_patched/src/runtime/panic.go:500 +0x3f4
k8s.io/kubernetes/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:56 +0x170
panic(0x2799878, 0x14022008)
/usr/local/go_k8s_patched/src/runtime/panic.go:458 +0x51c
sync/atomic.loadUint64(0x1435d764, 0x0, 0x0)
/usr/local/go_k8s_patched/src/sync/atomic/64bit_arm.go:10 +0x58
k8s.io/kubernetes/pkg/storage/etcd.(*HighWaterMark).Update(0x1435d764, 0x0, 0x0, 0x147066a8)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/storage/etcd/etcd_watcher.go:57 +0x24
k8s.io/kubernetes/pkg/storage/etcd.(*etcdWatcher).translate(0x1435d700)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/storage/etcd/etcd_watcher.go:316 +0x564
created by k8s.io/kubernetes/pkg/storage/etcd.newEtcdWatcher
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/storage/etcd/etcd_watcher.go:172 +0x2fc"><pre class="notranslate"><code class="notranslate">I0929 15:21:31.213981 1 genericapiserver.go:717] Serving securely on 0.0.0.0:443
I0929 15:21:31.214120 1 genericapiserver.go:762] Serving insecurely on 127.0.0.1:8080
I0929 15:21:31.227785 1 reflector.go:249] Listing and watching *api.LimitRange from k8s.io/kubernetes/plugin/pkg/admission/limitranger/admission.go:154
I0929 15:21:31.233122 1 handlers.go:162] GET /api/v1/limitranges?resourceVersion=0: (2.872585ms) 200 [[kube-apiserver/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47712]
I0929 15:21:31.233647 1 reflector.go:249] Listing and watching *api.ServiceAccount from k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/admission.go:103
I0929 15:21:31.234397 1 reflector.go:249] Listing and watching *storage.StorageClass from k8s.io/kubernetes/plugin/pkg/admission/storageclass/default/admission.go:62
I0929 15:21:31.234689 1 reflector.go:249] Listing and watching *api.ResourceQuota from k8s.io/kubernetes/plugin/pkg/admission/resourcequota/resource_access.go:83
I0929 15:21:31.235308 1 reflector.go:249] Listing and watching *api.Secret from k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/admission.go:119
I0929 15:21:31.240989 1 handlers.go:162] GET /api/v1/resourcequotas?resourceVersion=0: (2.16535ms) 200 [[kube-apiserver/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47712]
I0929 15:21:31.241224 1 handlers.go:162] GET /api/v1/serviceaccounts?resourceVersion=0: (3.223572ms) 200 [[kube-apiserver/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47713]
I0929 15:21:31.242460 1 handlers.go:162] GET /apis/storage.k8s.io/v1beta1/storageclasses?resourceVersion=0: (3.584299ms) 200 [[kube-apiserver/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47714]
I0929 15:21:31.243120 1 handlers.go:162] GET /api/v1/secrets?fieldSelector=type%3Dkubernetes.io%2Fservice-account-token&resourceVersion=0: (2.397484ms) 200 [[kube-apiserver/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47717]
I0929 15:21:31.385736 1 handlers.go:162] GET /api/v1/nodes?resourceVersion=0: (2.577587ms) 200 [[kube-scheduler/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47720]
I0929 15:21:31.398981 1 handlers.go:162] GET /api/v1/services?resourceVersion=0: (1.901341ms) 200 [[kube-scheduler/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47721]
I0929 15:21:31.429622 1 logs.go:41] http: TLS handshake error from 192.168.3.50:44034: read tcp 192.168.3.50:443->192.168.3.50:44034: read: connection reset by peer
I0929 15:21:31.526282 1 handlers.go:162] GET /api/v1/replicationcontrollers?resourceVersion=0: (4.753822ms) 200 [[kube-scheduler/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47723]
I0929 15:21:31.596865 1 handlers.go:162] GET /api/v1/persistentvolumes?resourceVersion=0: (5.896991ms) 200 [[kube-scheduler/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47724]
I0929 15:21:31.598638 1 handlers.go:162] GET /api/v1/pods?fieldSelector=spec.nodeName%21%3D%2Cstatus.phase%21%3DFailed%2Cstatus.phase%21%3DSucceeded&resourceVersion=0: (7.20141ms) 200 [[kube-scheduler/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47727]
I0929 15:21:31.605112 1 handlers.go:162] GET /api/v1/pods?fieldSelector=spec.nodeName%3D%2Cstatus.phase%21%3DFailed%2Cstatus.phase%21%3DSucceeded&resourceVersion=0: (6.404489ms) 200 [[kube-scheduler/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47726]
I0929 15:21:31.646091 1 handlers.go:162] GET /apis/extensions/v1beta1/replicasets?resourceVersion=0: (43.100753ms) 200 [[kube-scheduler/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47725]
I0929 15:21:31.692673 1 reflector.go:249] Listing and watching *api.Namespace from ????
I0929 15:21:31.703559 1 handlers.go:162] GET /api/v1/namespaces?resourceVersion=0: (6.497352ms) 200 [[kube-apiserver/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47716]
I0929 15:21:31.743619 1 logs.go:41] http: TLS handshake error from 192.168.3.50:44037: read tcp 192.168.3.50:443->192.168.3.50:44037: read: connection reset by peer
I0929 15:21:31.822912 1 logs.go:41] http: TLS handshake error from 192.168.3.50:44043: read tcp 192.168.3.50:443->192.168.3.50:44043: read: connection reset by peer
I0929 15:21:32.223161 1 handlers.go:162] GET /api/v1/persistentvolumeclaims?resourceVersion=0: (4.613355ms) 200 [[kube-scheduler/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47729]
I0929 15:21:32.355696 1 handlers.go:162] GET /api/v1/namespaces/kube-system/endpoints/kube-controller-manager: (6.227823ms) 200 [[kube-controller-manager/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47730]
I0929 15:21:32.380576 1 handlers.go:162] PUT /api/v1/namespaces/kube-system/endpoints/kube-controller-manager: (16.689993ms) 200 [[kube-controller-manager/v1.4.0 (linux/arm) kubernetes/a16c0a7] 127.0.0.1:47730]
E0929 15:21:32.380501 1 runtime.go:64] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:70
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:63
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:49
/usr/local/go_k8s_patched/src/runtime/asm_arm.s:429
/usr/local/go_k8s_patched/src/runtime/panic.go:458
/usr/local/go_k8s_patched/src/runtime/panic.go:62
/usr/local/go_k8s_patched/src/runtime/sigpanic_unix.go:24
/usr/local/go_k8s_patched/src/sync/atomic/asm_linux_arm.s:109
/usr/local/go_k8s_patched/src/sync/atomic/64bit_arm.go:10
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/storage/etcd/etcd_watcher.go:57
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/storage/etcd/etcd_watcher.go:316
/usr/local/go_k8s_patched/src/runtime/asm_arm.s:998
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x4 pc=0x11fa64]
goroutine 212 [running]:
panic(0x2799878, 0x14022008)
/usr/local/go_k8s_patched/src/runtime/panic.go:500 +0x3f4
k8s.io/kubernetes/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:56 +0x170
panic(0x2799878, 0x14022008)
/usr/local/go_k8s_patched/src/runtime/panic.go:458 +0x51c
sync/atomic.loadUint64(0x1435d764, 0x0, 0x0)
/usr/local/go_k8s_patched/src/sync/atomic/64bit_arm.go:10 +0x58
k8s.io/kubernetes/pkg/storage/etcd.(*HighWaterMark).Update(0x1435d764, 0x0, 0x0, 0x147066a8)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/storage/etcd/etcd_watcher.go:57 +0x24
k8s.io/kubernetes/pkg/storage/etcd.(*etcdWatcher).translate(0x1435d700)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/storage/etcd/etcd_watcher.go:316 +0x564
created by k8s.io/kubernetes/pkg/storage/etcd.newEtcdWatcher
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/storage/etcd/etcd_watcher.go:172 +0x2fc
</code></pre></div>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto">kubeadm finished installing</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p>
<ol dir="auto">
<li>Deploy ubuntu mate on raspberry pi 3</li>
<li>apt-get update, apt-get upgrade</li>
<li>add cgroup_enable=memory to /boot/cmdline.txt</li>
<li>install packages per <a href="http://kubernetes.io/docs/getting-started-guides/kubeadm/" rel="nofollow">http://kubernetes.io/docs/getting-started-guides/kubeadm/</a></li>
</ol>
<p dir="auto"><strong>Anything else do we need to know</strong>:</p> | <p dir="auto">Kubernetes scheduler schedules based on resources managed by Kubernetes. Scheduling based on opaque resource counting helps extending this further. But when there is a need for contextual scheduling for resources managed outside of kubernetes(example: place a pod where its storage is), there is no mechanism to do it today.</p>
<p dir="auto">The proposal is to make kubernetes scheduler extensible by adding the capability to make http calls out to another endpoint to help achieve this functionality. I am curious whether you think the cloud provider abstraction is the right abstraction for implementation.</p>
<p dir="auto">Here is a rough draft of what I am thinking about. Would like to solicit community feedback</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="type SchedulerExtension interface {
// Filter based on provider implemented predicate functions.
Filter(pod *api.Pod, nodes *api.NodeList) (*api.NodeList, error)
// Prioritize based on provider implemented priority functions. Weight*priority is added up for each
// such priority function. The returned score is added to the score computed by Kubernetes
// scheduler. The total score is used to do the host selection.
Prioritize(pod *api.Pod, nodes *api.NodeList) (*scheduler/api.HostPriorityList, error)
// Inform the provider about the scheduling decision. This could also be done by the provider
// watching apiserver pods/binding endpoint.
Bind(pod *api.Pod, host string) error
// Inform the provider about the unbind. To be called by apiserver in pod deletion path. This could
// also be accomplished by watching apiserver pods endpoint.
Unbind(pod *api.Pod, host string) error
}"><pre class="notranslate"><code class="notranslate">type SchedulerExtension interface {
// Filter based on provider implemented predicate functions.
Filter(pod *api.Pod, nodes *api.NodeList) (*api.NodeList, error)
// Prioritize based on provider implemented priority functions. Weight*priority is added up for each
// such priority function. The returned score is added to the score computed by Kubernetes
// scheduler. The total score is used to do the host selection.
Prioritize(pod *api.Pod, nodes *api.NodeList) (*scheduler/api.HostPriorityList, error)
// Inform the provider about the scheduling decision. This could also be done by the provider
// watching apiserver pods/binding endpoint.
Bind(pod *api.Pod, host string) error
// Inform the provider about the unbind. To be called by apiserver in pod deletion path. This could
// also be accomplished by watching apiserver pods endpoint.
Unbind(pod *api.Pod, host string) error
}
</code></pre></div> | 0 |
<p dir="auto">Reproduction steps:</p>
<ol dir="auto">
<li><code class="notranslate">flutter create test</code></li>
<li>replace the <code class="notranslate">lib/main.dart</code> with:</li>
</ol>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import 'package:flutter/widgets.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const Placeholderrr(); // Typo is intentional!
}
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s">'package:flutter/widgets.dart'</span>;
<span class="pl-k">void</span> <span class="pl-en">main</span>() <span class="pl-k">=></span> <span class="pl-en">runApp</span>(<span class="pl-k">new</span> <span class="pl-c1">MyApp</span>());
<span class="pl-k">class</span> <span class="pl-c1">MyApp</span> <span class="pl-k">extends</span> <span class="pl-c1">StatelessWidget</span> {
<span class="pl-k">@override</span>
<span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) {
<span class="pl-k">return</span> <span class="pl-k">const</span> <span class="pl-c1">Placeholderrr</span>(); <span class="pl-c">// Typo is intentional!</span>
}
}</pre></div>
<ol start="3" dir="auto">
<li>compile it once with <code class="notranslate">flutter build apk --debug</code> and see an error message.</li>
<li>compile it again with the same command, and see it succeed (as below)</li>
</ol>
<p dir="auto">This will really help with fixing syntax errors while coding! We just have to compile twice! 👍</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(home/gspencer:master) -- test > flutter build apk --debug
Running "flutter packages get" in test_reload... 0.6s
Initializing gradle... 1.0s
Resolving dependencies... 1.0s
Running 'gradlew assembleDebug'...
compiler message: lib/main.dart:9:18: Error: Method not found: 'Placeholderrr'.
compiler message: return const Placeholderrr();
compiler message: ^
Compiler failed on lib/main.dart
FAILURE: Build failed with an exception.
* Where:
Script '/usr/local/google/home/gspencer/code/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 450
* What went wrong:
Execution failed for task ':app:flutterBuildDebug'.
> Process 'command '/usr/local/google/home/gspencer/code/flutter/bin/flutter'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
Gradle build failed: 1
(home/gspencer:master) -- test > flutter build apk --debug
Initializing gradle... 1.0s
Resolving dependencies... 1.0s
Running 'gradlew assembleDebug'... 8.5s
Built build/app/outputs/apk/debug/app-debug.apk.
"><pre class="notranslate"><code class="notranslate">(home/gspencer:master) -- test > flutter build apk --debug
Running "flutter packages get" in test_reload... 0.6s
Initializing gradle... 1.0s
Resolving dependencies... 1.0s
Running 'gradlew assembleDebug'...
compiler message: lib/main.dart:9:18: Error: Method not found: 'Placeholderrr'.
compiler message: return const Placeholderrr();
compiler message: ^
Compiler failed on lib/main.dart
FAILURE: Build failed with an exception.
* Where:
Script '/usr/local/google/home/gspencer/code/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 450
* What went wrong:
Execution failed for task ':app:flutterBuildDebug'.
> Process 'command '/usr/local/google/home/gspencer/code/flutter/bin/flutter'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
Gradle build failed: 1
(home/gspencer:master) -- test > flutter build apk --debug
Initializing gradle... 1.0s
Resolving dependencies... 1.0s
Running 'gradlew assembleDebug'... 8.5s
Built build/app/outputs/apk/debug/app-debug.apk.
</code></pre></div> | <h2 dir="auto">Steps to Reproduce</h2>
<ol dir="auto">
<li>Modify <code class="notranslate">flutter/examples/hello_world/lib/main.dart</code> to add a line: <code class="notranslate">import foo.dart;</code></li>
<li>Add a <code class="notranslate">flutter/examples/hello_world/lib/foo.dart</code> file. Add some garbage to it that won't compile (e.g. a single line containing <code class="notranslate">asdf</code>).</li>
<li>Invoke <code class="notranslate">flutter run</code>. It reports a compilation error and fails, as expected:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ flutter run
Using hardware rendering with device Android SDK built for x86. If you get
graphics artifacts, consider enabling software rendering with
"--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle... 0.7s
Resolving dependencies... 1.3s
Gradle task 'assembleDebug'...
Compiler message:
lib/foo.dart:1:1: Error: Variables must be declared using the keywords 'const',
'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
asdf
^^^^
lib/foo.dart:1:1: Error: Expected ';' after this.
asdf
^^^^
Compiler failed on
/home/jamesdlin/git/flutter/flutter/examples/hello_world/lib/main.dart
6.3s
Gradle task assembleDebug failed with exit code 1"><pre class="notranslate"><code class="notranslate">$ flutter run
Using hardware rendering with device Android SDK built for x86. If you get
graphics artifacts, consider enabling software rendering with
"--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle... 0.7s
Resolving dependencies... 1.3s
Gradle task 'assembleDebug'...
Compiler message:
lib/foo.dart:1:1: Error: Variables must be declared using the keywords 'const',
'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
asdf
^^^^
lib/foo.dart:1:1: Error: Expected ';' after this.
asdf
^^^^
Compiler failed on
/home/jamesdlin/git/flutter/flutter/examples/hello_world/lib/main.dart
6.3s
Gradle task assembleDebug failed with exit code 1
</code></pre></div>
<ol start="4" dir="auto">
<li>Without modifying any files, invoke <code class="notranslate">flutter run</code> again.</li>
</ol>
<h2 dir="auto">Result</h2>
<p dir="auto">I expect to see the same failure as in step 3. Instead <code class="notranslate">flutter run</code> syncs files to the emulator, runs the app, and doesn't show the error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ flutter run
Using hardware rendering with device Android SDK built for x86. If you get
graphics artifacts, consider enabling software rendering with
"--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle... 0.7s
Resolving dependencies... 1.2s
Gradle task 'assembleDebug'... 8.4s
Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk... 0.6s
D/ ( 4463): HostConnection::get() New Host Connection established
0xe9e08bc0, tid 4484
D/EGL_emulation( 4463): eglMakeCurrent: 0xebc2dae0: ver 2 0 (tinfo 0xe9e036d0)
Syncing files to device Android SDK built for x86... 1.0s
🔥 To hot reload changes while running, press "r". To hot restart (and rebuild
state), press "R".
An Observatory debugger and profiler on Android SDK built for x86 is available
at: http://127.0.0.1:38847/
For a more detailed help message, press "h". To detach, press "d"; to quit,
press "q"."><pre class="notranslate"><code class="notranslate">$ flutter run
Using hardware rendering with device Android SDK built for x86. If you get
graphics artifacts, consider enabling software rendering with
"--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle... 0.7s
Resolving dependencies... 1.2s
Gradle task 'assembleDebug'... 8.4s
Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk... 0.6s
D/ ( 4463): HostConnection::get() New Host Connection established
0xe9e08bc0, tid 4484
D/EGL_emulation( 4463): eglMakeCurrent: 0xebc2dae0: ver 2 0 (tinfo 0xe9e036d0)
Syncing files to device Android SDK built for x86... 1.0s
🔥 To hot reload changes while running, press "r". To hot restart (and rebuild
state), press "R".
An Observatory debugger and profiler on Android SDK built for x86 is available
at: http://127.0.0.1:38847/
For a more detailed help message, press "h". To detach, press "d"; to quit,
press "q".
</code></pre></div>
<p dir="auto">I see this behavior only with compilation errors in imported files; if I instead introduce compilation errors into <code class="notranslate">main.dart</code>, <code class="notranslate">flutter run</code> consistently fails.</p>
<h2 dir="auto">Doctor</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel master, v0.10.1-pre.43, on Linux, locale en_US.UTF-8)
• Flutter version 0.10.1-pre.43 at /home/jamesdlin/git/flutter/flutter
• Framework revision 4f4005ee65 (2 hours ago), 2018-10-15 12:18:13 -0700
• Engine revision 50c2e69daf
• Dart version 2.1.0-dev.7.0.flutter-b99bcfd309
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /home/jamesdlin/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling
support)
• Platform android-28, build-tools 27.0.3
• Java binary at: /home/jamesdlin/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[✓] Android Studio (version 3.2)
• Android Studio at /home/jamesdlin/android-studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1136-b06)
[✓] VS Code (version 1.27.2)
• VS Code at /usr/share/code
• Flutter extension version 2.19.0
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API
28) (emulator)
• No issues found!"><pre class="notranslate"><code class="notranslate">[✓] Flutter (Channel master, v0.10.1-pre.43, on Linux, locale en_US.UTF-8)
• Flutter version 0.10.1-pre.43 at /home/jamesdlin/git/flutter/flutter
• Framework revision 4f4005ee65 (2 hours ago), 2018-10-15 12:18:13 -0700
• Engine revision 50c2e69daf
• Dart version 2.1.0-dev.7.0.flutter-b99bcfd309
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /home/jamesdlin/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling
support)
• Platform android-28, build-tools 27.0.3
• Java binary at: /home/jamesdlin/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[✓] Android Studio (version 3.2)
• Android Studio at /home/jamesdlin/android-studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1136-b06)
[✓] VS Code (version 1.27.2)
• VS Code at /usr/share/code
• Flutter extension version 2.19.0
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API
28) (emulator)
• No issues found!
</code></pre></div> | 1 |
<p dir="auto">In 0.16 I am seeing that my components that are set to change detection onPush not updating the UI upon mouse clicks... is anyone else seeing the same issue?</p>
<p dir="auto">FYI<br>
I am using Redux and my updates come from the store using Immutable.js models<br>
Up to 0.15 all was great!</p>
<p dir="auto">regards</p>
<p dir="auto">Sean.</p> | <p dir="auto"><strong>Steps to reproduce and a minimal demo of the problem</strong></p>
<p dir="auto"><a href="http://plnkr.co/edit/hDagJbhXpwI8213PmCva?p=preview" rel="nofollow">http://plnkr.co/edit/hDagJbhXpwI8213PmCva?p=preview</a></p>
<p dir="auto">Click on a page number (1..10) and observe that a highlighted page doesn't change</p>
<p dir="auto"><strong>Expected/desired behavior</strong></p>
<p dir="auto">Click on a page number (1..10) should change active page.</p>
<p dir="auto"><strong>Other information</strong></p>
<ul dir="auto">
<li>used to work in beta.15</li>
<li>observe that clicking on prev / next <em>changes</em> an active page</li>
<li>the only difference between page no links and prev / next links is that page no links are generated using ngFor</li>
<li>problem doesn't show up if we remove <code class="notranslate">changeDetection: ChangeDetectionStrategy.OnPush,</code></li>
<li>switching dev / prod mode doesn't make any difference</li>
</ul> | 1 |
<p dir="auto">Currently you can parametrize a container via environment variables passed in the Pod spec. Some applications expect their configuration in the form of config files. The gap can be bridged by a helper script in the container that reads the config from an environment variable and writes it to a file before executing the app, but this is somewhat hackish for large configs. While Linux support very large environment variables, it would be more natural to pass the config to the container via a file, as the app expects.</p>
<p dir="auto">I propose a new mechanism that would allow you to specify a config file within the spec and have the file mounted at the specified location within the container. This would work similar to a hostPath volume, but it would not require that the file pre-exist in the node the Pod executes in, and would delete the file once the Pod no longer runs.</p>
<p dir="auto">Maybe something like:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="apiVersion: v1
kind: Pod
metadata:
name: test
spec:
containers:
- image: gcr.io/google_containers/test-webserver
name: test-container
volumeMounts:
- mountPath: /etc/some.config
name: config-file
volumes:
- name: config-file
inlineFile:
content: |
foo = bar
x = y"><pre class="notranslate"><span class="pl-ent">apiVersion</span>: <span class="pl-c1">v1</span>
<span class="pl-ent">kind</span>: <span class="pl-s">Pod</span>
<span class="pl-ent">metadata</span>:
<span class="pl-ent">name</span>: <span class="pl-s">test</span>
<span class="pl-ent">spec</span>:
<span class="pl-ent">containers</span>:
- <span class="pl-ent">image</span>: <span class="pl-s">gcr.io/google_containers/test-webserver</span>
<span class="pl-ent">name</span>: <span class="pl-s">test-container</span>
<span class="pl-ent">volumeMounts</span>:
- <span class="pl-ent">mountPath</span>: <span class="pl-s">/etc/some.config</span>
<span class="pl-ent">name</span>: <span class="pl-s">config-file</span>
<span class="pl-ent">volumes</span>:
- <span class="pl-ent">name</span>: <span class="pl-s">config-file</span>
<span class="pl-ent">inlineFile</span>:
<span class="pl-ent">content</span>: <span class="pl-s">|</span>
<span class="pl-s"> foo = bar</span>
<span class="pl-s"> x = y</span></pre></div> | <p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.): No</p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.): pod status failed volume</p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one): BUG REPORT</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>): 1.3.5</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: AWS</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): CoreOS</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): <code class="notranslate">Linux ip-10-20-8-69.us-west-2.compute.internal 4.3.3-coreos #2 SMP Thu Dec 17 23:57:55 UTC 2015 x86_64 Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz GenuineIntel GNU/Linux</code></li>
<li><strong>Install tools</strong>: Custom</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:<br>
A pod entered the "Failed" status because the node ran out of disk:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" status:
message: Pod cannot be started due to lack of disk space.
phase: Failed
reason: OutOfDisk
startTime: 2016-09-27T21:23:04Z"><pre class="notranslate"><code class="notranslate"> status:
message: Pod cannot be started due to lack of disk space.
phase: Failed
reason: OutOfDisk
startTime: 2016-09-27T21:23:04Z
</code></pre></div>
<p dir="auto">A new pod was started (it is part of a deployment), but the failed pod was still holding on to the EBS volume, which the kubelet didn't release until I explicitly deleted the failed pod with <code class="notranslate">kubectl delete</code>.</p>
<p dir="auto"><strong>What you expected to happen</strong>:<br>
The failed pod should not hold on to the volume or otherwise prevent the new pod from running in any way.</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):<br>
I have not tried to reproduce it.</p>
<p dir="auto"><strong>Anything else do we need to know</strong>:</p> | 0 |
<p dir="auto">using Michael's idea to create nodes uniquely,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def prepare_add_user(id)
# returns 0 when created and 1 if it was already there
{:query=>
"start n=node:node_auto_index(name={id})
with count(*) as c
where c=0
create x={name:{id}}
return c",
:params => {:id => id}}
end"><pre class="notranslate"><code class="notranslate">def prepare_add_user(id)
# returns 0 when created and 1 if it was already there
{:query=>
"start n=node:node_auto_index(name={id})
with count(*) as c
where c=0
create x={name:{id}}
return c",
:params => {:id => id}}
end
</code></pre></div>
<p dir="auto">If you run this fast enough, you can manage to occasionally create two nodes with the same id. This is not supposed to happen, right?</p> | <p dir="auto">A relatively simple query is causing me some major headaches! It's easy enough to rewrite this query to get it to work, but I cannot figure out why it's returning the wrong results in the first place.</p>
<ul dir="auto">
<li>Neo4j version: 3.0.1-enterprise (via Docker)</li>
<li>Ubuntu 14.04</li>
<li>cypher query via browser interface</li>
</ul>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Unfortunately, this doesn't actually reproduce the issue :( I have no clue why not</p>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="CREATE p=(n:Titled {matchable_title: "left"})-[:of_group]->(g:Group)<-[:of_group]-(m:Titled {matchable_title: "right"})
RETURN p;
CREATE p=(n:Titled {matchable_title: "same"})-[:of_group]->(g:Group)<-[:of_group]-(m:Titled {matchable_title: "same"})
RETURN p;
CREATE INDEX ON :Titled(matchable_title);"><pre class="notranslate">CREATE p<span class="pl-k">=</span>(n:Titled {matchable_title: <span class="pl-s"><span class="pl-pds">"</span>left<span class="pl-pds">"</span></span>})<span class="pl-k">-</span>[:of_group]<span class="pl-k">-</span><span class="pl-k">></span>(g:Group)<span class="pl-k"><</span><span class="pl-k">-</span>[:of_group]<span class="pl-k">-</span>(m:Titled {matchable_title: <span class="pl-s"><span class="pl-pds">"</span>right<span class="pl-pds">"</span></span>})
RETURN p;
CREATE p<span class="pl-k">=</span>(n:Titled {matchable_title: <span class="pl-s"><span class="pl-pds">"</span>same<span class="pl-pds">"</span></span>})<span class="pl-k">-</span>[:of_group]<span class="pl-k">-</span><span class="pl-k">></span>(g:Group)<span class="pl-k"><</span><span class="pl-k">-</span>[:of_group]<span class="pl-k">-</span>(m:Titled {matchable_title: <span class="pl-s"><span class="pl-pds">"</span>same<span class="pl-pds">"</span></span>})
RETURN p;
<span class="pl-k">CREATE</span> <span class="pl-k">INDEX</span> <span class="pl-en">ON</span> :Titled(matchable_title);</pre></div>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="MATCH p=(n:Titled)-[:of_group]-(g)-[:of_group]-(m:Titled)
WHERE m.matchable_title = n.matchable_title
RETURN m.matchable_title, n.matchable_title, p LIMIT 25;"><pre class="notranslate">MATCH p<span class="pl-k">=</span>(n:Titled)<span class="pl-k">-</span>[:of_group]<span class="pl-k">-</span>(g)<span class="pl-k">-</span>[:of_group]<span class="pl-k">-</span>(m:Titled)
<span class="pl-k">WHERE</span> <span class="pl-c1">m</span>.<span class="pl-c1">matchable_title</span> <span class="pl-k">=</span> <span class="pl-c1">n</span>.<span class="pl-c1">matchable_title</span>
RETURN <span class="pl-c1">m</span>.<span class="pl-c1">matchable_title</span>, <span class="pl-c1">n</span>.<span class="pl-c1">matchable_title</span>, p <span class="pl-k">LIMIT</span> <span class="pl-c1">25</span>;</pre></div>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">For each row of results, m.matchable_title will be the same as n.matchable_title</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">n.matchable_title and m.matchable_title do not match. According to PROFILE, the query starts with a NodeIndexScan to find <code class="notranslate">m</code>. There are multiple different values for m.matchable_title across different rows (as expected). Some of the returned nodes should be in the result set (although the row is wrong, n/m should appear in rows in the correct results) but some m/n nodes would not appear in the correct results.</p>
<p dir="auto">Interestingly, although the query plan is not the same, the rows are returned in the same order as when the WHERE clause is removed.</p>
<p dir="auto">It seems like n is found by an index scan, but the index values are not being checked, or something like that. If I remove the index on matchable_title, then the query starts with a NodeByLabelScan and then proceeds correctly. Adding the index back again results in incorrect rows. If I try to specify to use the matchable_title index, neo4j complains that this is not allowed.</p>
<p dir="auto">The query can be corrected in many different ways. One example is to add a WITH clause:</p>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="MATCH p=(n:Titled)-[:of_group]-(g)-[:of_group]-(m:Titled)
WITH p, n, m
WHERE m.matchable_title = n.matchable_title
RETURN m.matchable_title, n.matchable_title, p LIMIT 25;"><pre class="notranslate">MATCH p<span class="pl-k">=</span>(n:Titled)<span class="pl-k">-</span>[:of_group]<span class="pl-k">-</span>(g)<span class="pl-k">-</span>[:of_group]<span class="pl-k">-</span>(m:Titled)
WITH p, n, m
<span class="pl-k">WHERE</span> <span class="pl-c1">m</span>.<span class="pl-c1">matchable_title</span> <span class="pl-k">=</span> <span class="pl-c1">n</span>.<span class="pl-c1">matchable_title</span>
RETURN <span class="pl-c1">m</span>.<span class="pl-c1">matchable_title</span>, <span class="pl-c1">n</span>.<span class="pl-c1">matchable_title</span>, p <span class="pl-k">LIMIT</span> <span class="pl-c1">25</span>;</pre></div>
<p dir="auto">This causes the query plan to change, starting with NodeByLabelScan, then expanding and filtering. This query produces correct results.</p> | 0 |
<p dir="auto">It would be great to see the <a href="https://en.wikipedia.org/wiki/Canny_edge_detector" rel="nofollow">Canny edge detector</a> available in <code class="notranslate">scipy.ndimage</code>.</p>
<p dir="auto">Implementations exist in</p>
<ul dir="auto">
<li><code class="notranslate">cv2</code> (<a href="https://github.com/opencv/opencv/blob/master/modules/imgproc/src/canny.cpp">https://github.com/opencv/opencv/blob/master/modules/imgproc/src/canny.cpp</a>)</li>
<li><code class="notranslate">scikit-image</code> (<a href="https://github.com/scikit-image/scikit-image/blob/master/skimage/feature/_canny.py">https://github.com/scikit-image/scikit-image/blob/master/skimage/feature/_canny.py</a>)</li>
</ul>
<p dir="auto">Perhaps one of these could be ported here?</p> | <p dir="auto">When a wav file contains 24-bit audio, wavfile tries to read it via <code class="notranslate">dtype('<i3')</code>. However, there is no such native integer type, and it ends up trying to read <code class="notranslate">dtype('<i4')</code>, which of course doesn't work as the byte counts don't match.</p>
<p dir="auto">This should be fixed in <code class="notranslate">wavfile</code>.</p>
<p dir="auto"><a href="http://stackoverflow.com/questions/19780983/scipy-wavfile-music-in-garbage-out" rel="nofollow">http://stackoverflow.com/questions/19780983/scipy-wavfile-music-in-garbage-out</a></p> | 0 |
<p dir="auto">Original title: <em><strong>"Cosine" affinity type in FeatureAgglomeration somehow casue memory overflow in a particular dataset</strong></em></p>
<h4 dir="auto">Description</h4>
<p dir="auto">Please carefully test the codes below! Using "cosine" affinity type in FeatureAgglomeration, the codes will cause memory overflow with a particular dataset (<a href="http://gleason.case.edu/webdata/tpot/" rel="nofollow">Download here</a>). It is all right with other affinity types. And this issue cannot be reproduced using simulation data (like using make_classification in sci-kit learn). Not sure why it happened.</p>
<h4 dir="auto">Steps/Code to Reproduce</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sklearn.cluster import FeatureAgglomeration
import numpy as np
import time
train_data = np.genfromtxt('fold_2_trainFeatVec.csv', delimiter=',')
train_labels= np.genfromtxt('fold_2_trainLabels.csv', delimiter=',')
fa = FeatureAgglomeration(affinity="cosine", linkage="average") # no matter linage ="average" or "complete"
time_start= time.time()
fa.fit(train_data, train_labels) # memory keeps increasing here
time_end = time.time()
print('Time usage:',time_end-time_start)
"><pre class="notranslate"><code class="notranslate">from sklearn.cluster import FeatureAgglomeration
import numpy as np
import time
train_data = np.genfromtxt('fold_2_trainFeatVec.csv', delimiter=',')
train_labels= np.genfromtxt('fold_2_trainLabels.csv', delimiter=',')
fa = FeatureAgglomeration(affinity="cosine", linkage="average") # no matter linage ="average" or "complete"
time_start= time.time()
fa.fit(train_data, train_labels) # memory keeps increasing here
time_end = time.time()
print('Time usage:',time_end-time_start)
</code></pre></div> | <p dir="auto">Via <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="520559841" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/15583" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/15583/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/15583">#15583</a>:<br>
it would be nice to have <code class="notranslate">sample_weight</code> support in <code class="notranslate">StandardScaler</code>. I don't see how to do that for sparse data right now, though (without touching the Cython code).</p> | 0 |
<p dir="auto">Bootstrap JS 2.3.0 is causing fancybox 2 to stop working.</p>
<p dir="auto">When I removed bootstrap.js, it started working. So switched back to Bootstrap.js 2.2.2 and issue solved.</p> | <p dir="auto">Hi,</p>
<p dir="auto">I've just noticed that jQuery fancyBox isn't working anymore in conjunction with Bootstrap 2.3.<br>
When reverting back to Bootstrap 2.2.2 everything is fine again.<br>
Here are two jsfiddles to demonstrate the issue:</p>
<ol dir="auto">
<li>with Bootstrap 2.3 .js File: <a href="http://jsfiddle.net/XmDXJ/" rel="nofollow">http://jsfiddle.net/XmDXJ/</a> <-- fancyBox doesn't open</li>
<li>without the Bootstrap js file: <a href="http://jsfiddle.net/yzJVH/" rel="nofollow">http://jsfiddle.net/yzJVH/</a> <-- fancyBox opens as it should</li>
</ol> | 1 |
<p dir="auto">After update VSC to 0.10.5, it crashed so many times. I use VSC nothing special, like usual.</p>
<p dir="auto">By the way, the new JavaScript Syntax Highlighting is ...................</p> | <p dir="auto">After update 0.10.5, VSCode crashes during startup.<br>
I deleted it once with AppCleaner, and <code class="notranslate">rm -rf ~/.vscode/</code>, it did not recover.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1060011/11910432/a7ebaad2-a639-11e5-881c-ef7fa2fb6584.png"><img src="https://cloud.githubusercontent.com/assets/1060011/11910432/a7ebaad2-a639-11e5-881c-ef7fa2fb6584.png" alt="2015-12-19 10 10 05" style="max-width: 100%;"></a></p>
<p dir="auto">MacOSX:10.11.1<br>
keyboard:JIS</p> | 1 |
<h2 dir="auto">Summary</h2>
<p dir="auto">It would be great to have a simple way to change the field names for the output.</p>
<h2 dir="auto">Motivation</h2>
<p dir="auto">When we define an item class we usually use <a href="https://docs.scrapy.org/en/latest/topics/items.html#declaring-item-subclasses" rel="nofollow">Python variables for the names of the fields</a>.<br>
However in the output files we'd rather have correctly spelled headers.<br>
But if we use the current approach, we only have the variables names as headers by default:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/49591562/170603916-98f3fda5-d444-4301-a749-d1022a619eaa.png"><img src="https://user-images.githubusercontent.com/49591562/170603916-98f3fda5-d444-4301-a749-d1022a619eaa.png" alt="header of result speadsheet from scrapy" style="max-width: 100%;"></a></p>
<h2 dir="auto">Describe alternatives you've considered</h2>
<p dir="auto">I wondered if <a href="https://stackoverflow.com/a/69675451" rel="nofollow">using an <strong>init</strong> function for the item class</a> would be the recommended way.<br>
Or are there other options?</p> | <p dir="auto">Sometimes we may require defining field names that are not valid Python variables (for example containing spaces). I believe the correct way of doing this right now is that the developer needs to add a Pipeline that maps the internal name to the name we wan't to export. Scrapy could ship with a Pipeline (maybe enabled by default) that does this mapping for fields that define a field parameter. For example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class MyItem(Item):
date_from = Field(export_name='Initial date')"><pre class="notranslate"><code class="notranslate">class MyItem(Item):
date_from = Field(export_name='Initial date')
</code></pre></div>
<p dir="auto">This is a very simple pipeline. However, since this is a very common use case, I think it is something that could be shipped by default. I'm happy to provide a PR for this.</p> | 1 |
<p dir="auto">From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/8191/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/8191">@8191</a> on 2016-09-13T18:12:42Z</p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">git</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.0"><pre class="notranslate"><code class="notranslate">ansible 2.2.0
</code></pre></div>
<p dir="auto">(current <code class="notranslate">devel</code> branch)</p>
<h5 dir="auto">CONFIGURATION</h5>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Host: CentOS 7, Target: CentOS 7</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">If a submodule's checked out commit is different than the SHA-1 commited to the super-repository, an update attempt of the super-repository using the git module always fails with <code class="notranslate">Local modifications exist</code>, even if <code class="notranslate">force=yes</code> was given.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<h6 dir="auto">Preconditions</h6>
<ul dir="auto">
<li>Repo <code class="notranslate">repo.git</code>, which contains submodules, has already been cloned</li>
<li>At least one submodule has been checked out at a different commit than commited to the repo <code class="notranslate">repo.git</code>; i.e. the instance of the checked out repo is "dirty" and <code class="notranslate">git status</code> shows something like:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# On branch master
# Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
# (use "git pull" to update your local branch)
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: <submodule> (new commits)"><pre class="notranslate"><code class="notranslate"># On branch master
# Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
# (use "git pull" to update your local branch)
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: <submodule> (new commits)
</code></pre></div>
<h6 dir="auto">Example playbook to reproduce</h6>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- hosts: all
gather_facts: False
tasks:
- name: checkout repo
git:
repo: user@host:/var/lib/git/repo.git
dest: /tmp/repo.git
accept_hostkey: yes
ssh_opts: "-o StrictHostKeyChecking=no"
force: yes
update: yes"><pre class="notranslate"><code class="notranslate">- hosts: all
gather_facts: False
tasks:
- name: checkout repo
git:
repo: user@host:/var/lib/git/repo.git
dest: /tmp/repo.git
accept_hostkey: yes
ssh_opts: "-o StrictHostKeyChecking=no"
force: yes
update: yes
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">The super-repository should be updated and submodules shall be checkedout to the stored SHA-1 reference within the super-repository.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [cali]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_name": "git"
},
"module_stderr": "OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /home/mf/.ssh/config\r\ndebug1: /home/mf/.ssh/config line 1: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 25086\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to cali closed.\r\n",
"module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_rYIDTj/ansible_module_git.py\", line 1022, in <module>\r\n main()\r\n File \"/tmp/ansible_rYIDTj/ansible_module_git.py\", line 973, in main\r\n result.update(changed=True, after=remote_head, msg='Local modifications exist')\r\nUnboundLocalError: local variable 'remote_head' referenced before assignment\r\n",
"msg": "MODULE FAILURE"
}"><pre class="notranslate"><code class="notranslate">fatal: [cali]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_name": "git"
},
"module_stderr": "OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /home/mf/.ssh/config\r\ndebug1: /home/mf/.ssh/config line 1: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 25086\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to cali closed.\r\n",
"module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_rYIDTj/ansible_module_git.py\", line 1022, in <module>\r\n main()\r\n File \"/tmp/ansible_rYIDTj/ansible_module_git.py\", line 973, in main\r\n result.update(changed=True, after=remote_head, msg='Local modifications exist')\r\nUnboundLocalError: local variable 'remote_head' referenced before assignment\r\n",
"msg": "MODULE FAILURE"
}
</code></pre></div>
<p dir="auto">Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="176711177" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/4817" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/4817/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/4817">ansible/ansible-modules-core#4817</a></p> | <p dir="auto">From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/8191/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/8191">@8191</a> on 2016-09-13T18:12:42Z</p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">git</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.0"><pre class="notranslate"><code class="notranslate">ansible 2.2.0
</code></pre></div>
<p dir="auto">(current <code class="notranslate">devel</code> branch)</p>
<h5 dir="auto">CONFIGURATION</h5>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Host: CentOS 7, Target: CentOS 7</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">If a submodule's checked out commit is different than the SHA-1 commited to the super-repository, an update attempt of the super-repository using the git module always fails with <code class="notranslate">Local modifications exist</code>, even if <code class="notranslate">force=yes</code> was given.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<h6 dir="auto">Preconditions</h6>
<ul dir="auto">
<li>Repo <code class="notranslate">repo.git</code>, which contains submodules, has already been cloned</li>
<li>At least one submodule has been checked out at a different commit than commited to the repo <code class="notranslate">repo.git</code>; i.e. the instance of the checked out repo is "dirty" and <code class="notranslate">git status</code> shows something like:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# On branch master
# Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
# (use "git pull" to update your local branch)
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: <submodule> (new commits)"><pre class="notranslate"><code class="notranslate"># On branch master
# Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
# (use "git pull" to update your local branch)
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: <submodule> (new commits)
</code></pre></div>
<h6 dir="auto">Example playbook to reproduce</h6>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- hosts: all
gather_facts: False
tasks:
- name: checkout repo
git:
repo: user@host:/var/lib/git/repo.git
dest: /tmp/repo.git
accept_hostkey: yes
ssh_opts: "-o StrictHostKeyChecking=no"
force: yes
update: yes"><pre class="notranslate"><code class="notranslate">- hosts: all
gather_facts: False
tasks:
- name: checkout repo
git:
repo: user@host:/var/lib/git/repo.git
dest: /tmp/repo.git
accept_hostkey: yes
ssh_opts: "-o StrictHostKeyChecking=no"
force: yes
update: yes
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">The super-repository should be updated and submodules shall be checkedout to the stored SHA-1 reference within the super-repository.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [cali]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_name": "git"
},
"module_stderr": "OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /home/mf/.ssh/config\r\ndebug1: /home/mf/.ssh/config line 1: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 25086\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to cali closed.\r\n",
"module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_rYIDTj/ansible_module_git.py\", line 1022, in <module>\r\n main()\r\n File \"/tmp/ansible_rYIDTj/ansible_module_git.py\", line 973, in main\r\n result.update(changed=True, after=remote_head, msg='Local modifications exist')\r\nUnboundLocalError: local variable 'remote_head' referenced before assignment\r\n",
"msg": "MODULE FAILURE"
}"><pre class="notranslate"><code class="notranslate">fatal: [cali]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_name": "git"
},
"module_stderr": "OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /home/mf/.ssh/config\r\ndebug1: /home/mf/.ssh/config line 1: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 25086\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to cali closed.\r\n",
"module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_rYIDTj/ansible_module_git.py\", line 1022, in <module>\r\n main()\r\n File \"/tmp/ansible_rYIDTj/ansible_module_git.py\", line 973, in main\r\n result.update(changed=True, after=remote_head, msg='Local modifications exist')\r\nUnboundLocalError: local variable 'remote_head' referenced before assignment\r\n",
"msg": "MODULE FAILURE"
}
</code></pre></div>
<p dir="auto">Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="176711177" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/4817" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/4817/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/4817">ansible/ansible-modules-core#4817</a></p> | 1 |
<p dir="auto">Tensorflow 1.11.0<br>
Keras 2.2.4<br>
Keras-Preprocessing 1.0.5<br>
Ubuntu 16.04<br>
Python 2.7.12</p>
<p dir="auto">Example code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from keras import models, layers
from keras_preprocessing.image import ImageDataGenerator
from keras_applications.imagenet_utils import preprocess_input
train_dir = '/tmp/workspace/Pet_Dataset/train/'
height, width, channels = (128, 128, 3)
batch_size=32
train_datagen = ImageDataGenerator(rescale=1.0/255)
train_generator = train_datagen.flow_from_directory(
train_dir, target_size=(height, width),
batch_size=batch_size, class_mode='categorical')
network = models.Sequential()
network.add(layers.Conv2D(32, (3, 3), activation='relu', input_shape=(height, width, channels)))
network.add(layers.MaxPooling2D((2, 2)))
network.add(layers.Conv2D(64, (3, 3), activation='relu'))
network.add(layers.MaxPooling2D((2, 2)))
network.add(layers.Conv2D(128, (3, 3), activation='relu'))
network.add(layers.MaxPooling2D((2, 2)))
network.add(layers.Conv2D(256, (3, 3), activation='relu'))
network.add(layers.GlobalAveragePooling2D())
network.add(layers.Dense(train_generator.num_classes, activation='softmax'))
network.compile(optimizer='RMSProp',
loss='categorical_crossentropy',
metrics=['accuracy'])
network.summary()
history = network.fit_generator(train_generator, epochs=10) "><pre class="notranslate"><code class="notranslate">from keras import models, layers
from keras_preprocessing.image import ImageDataGenerator
from keras_applications.imagenet_utils import preprocess_input
train_dir = '/tmp/workspace/Pet_Dataset/train/'
height, width, channels = (128, 128, 3)
batch_size=32
train_datagen = ImageDataGenerator(rescale=1.0/255)
train_generator = train_datagen.flow_from_directory(
train_dir, target_size=(height, width),
batch_size=batch_size, class_mode='categorical')
network = models.Sequential()
network.add(layers.Conv2D(32, (3, 3), activation='relu', input_shape=(height, width, channels)))
network.add(layers.MaxPooling2D((2, 2)))
network.add(layers.Conv2D(64, (3, 3), activation='relu'))
network.add(layers.MaxPooling2D((2, 2)))
network.add(layers.Conv2D(128, (3, 3), activation='relu'))
network.add(layers.MaxPooling2D((2, 2)))
network.add(layers.Conv2D(256, (3, 3), activation='relu'))
network.add(layers.GlobalAveragePooling2D())
network.add(layers.Dense(train_generator.num_classes, activation='softmax'))
network.compile(optimizer='RMSProp',
loss='categorical_crossentropy',
metrics=['accuracy'])
network.summary()
history = network.fit_generator(train_generator, epochs=10)
</code></pre></div>
<p dir="auto">breaks with Tensorflow 1.11.0 with <code class="notranslate">ValueError: steps_per_epoch=None is only valid for a generator based on the keras.utils.Sequence class. Please specify steps_per_epoch or use the keras.utils.Sequence class.</code>.</p>
<p dir="auto">Tensorflow 1.10.0 and below works.</p>
<p dir="auto">Furthermore, providing steps_per_epoch and applying multiprocessing with workers > 1:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="history = network.fit_generator(train_generator, epochs=10,
steps_per_epoch=train_generator.n/batch_size,
use_multiprocessing=True, workers=2)"><pre class="notranslate"><code class="notranslate">history = network.fit_generator(train_generator, epochs=10,
steps_per_epoch=train_generator.n/batch_size,
use_multiprocessing=True, workers=2)
</code></pre></div>
<p dir="auto">causes a UserWarning about multiple workers duplicate data.</p>
<p dir="auto">I think this is caused by wrong inheritance of ImageDataGenerator.</p>
<p dir="auto">When printing the exact class that is used in <code class="notranslate">keras_preprocessing/image.py</code>, I get <code class="notranslate"><class 'tensorflow.python.keras.utils.data_utils.Sequence'></code>.</p>
<p dir="auto">But <code class="notranslate">fit_generator()</code> checks if the generator is a subclass of <code class="notranslate"><class 'keras.utils.data_utils.Sequence'></code>, so it seems to assume that the ImageDataGenerator instance is not of type Sequence, causing above problems.</p> | <p dir="auto">I notice there is a difference in how images are pre-processed in the <a href="https://github.com/fchollet/keras/blob/master/examples/neural_style_transfer.py">neural_style_transfer example</a> and the <a href="https://gist.github.com/baraldilorenzo/07d7802847aaad0a35d3">recommended way</a> of using VGG16 model. Specially,</p>
<ul dir="auto">
<li>The color channels in neural_style_transfer example is RGB (as read by scipy.misc.imread), whereas the order in original VGG is expected to be BGR.</li>
<li>The mean-centering step is not performed in the example, i.e.,</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="im[:,:,0] -= 103.939
im[:,:,1] -= 116.779
im[:,:,2] -= 123.68"><pre class="notranslate"><code class="notranslate">im[:,:,0] -= 103.939
im[:,:,1] -= 116.779
im[:,:,2] -= 123.68
</code></pre></div>
<p dir="auto">Some of my experiments showed that these differences could result in sub-optimal results in image classification, e.g., <a href="https://www.google.com.sg/?ion=1&espv=2#q=red%20fox" rel="nofollow">red fox</a> misclassified to <a href="https://www.google.com.sg/?ion=1&espv=2#q=grey%20fox" rel="nofollow">grey fox</a> due to the wrong order of color channel.</p>
<p dir="auto">However, when it comes to generating "artistic" images as in the neural_style_transfer example, it seems that the results caused by the difference are not so different. I can understand there are probably some reasons behind this,</p>
<ul dir="auto">
<li>
<ol dir="auto">
<li>The "content loss" and "total variation loss" defined in the example don't depend on the order of color channels.</li>
</ol>
</li>
<li>
<ol start="2" dir="auto">
<li>The "style loss" might depend on the color orders, because it depends on the difference of "styles" in the original and the generated image. And this style is measured by the inner-product distribution of different vgg filters (Gram matrix). However, it should be expected that most of vgg filters will be based on a mix of colors (e.g., edges, corners) rather than a single color alone (e.g, blue color for sea).</li>
</ol>
</li>
</ul>
<p dir="auto">Those could be the reasons why I don't see many differences when experimenting with the different color channel encoding in the neural_style_transfer example. <em>But I really want to know whether we can come up with some contrived cases where the different color channel order will result in a difference for the neural_style_transfer example.</em></p>
<p dir="auto">I post this question here because it might lead to a potential bug report to the above example code.</p> | 0 |
<h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">Create a static final:</p>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="final sampleLocks = [
new Lock("L1", 5.0, "flo"),
new Lock("L2", 2.5, "flo"),
new Lock("L3", 4.0, "chris"),
new Lock("L4", 1.1, "flo"),
new Lock("L5", 4.2, "chris"),
];"><pre class="notranslate"><span class="pl-k">final</span> sampleLocks <span class="pl-k">=</span> [
<span class="pl-k">new</span> <span class="pl-c1">Lock</span>(<span class="pl-s">"L1"</span>, <span class="pl-c1">5.0</span>, <span class="pl-s">"flo"</span>),
<span class="pl-k">new</span> <span class="pl-c1">Lock</span>(<span class="pl-s">"L2"</span>, <span class="pl-c1">2.5</span>, <span class="pl-s">"flo"</span>),
<span class="pl-k">new</span> <span class="pl-c1">Lock</span>(<span class="pl-s">"L3"</span>, <span class="pl-c1">4.0</span>, <span class="pl-s">"chris"</span>),
<span class="pl-k">new</span> <span class="pl-c1">Lock</span>(<span class="pl-s">"L4"</span>, <span class="pl-c1">1.1</span>, <span class="pl-s">"flo"</span>),
<span class="pl-k">new</span> <span class="pl-c1">Lock</span>(<span class="pl-s">"L5"</span>, <span class="pl-c1">4.2</span>, <span class="pl-s">"chris"</span>),
];</pre></div>
<p dir="auto">Modify it (changing the individual numbers).<br>
Do a hot reload.</p>
<p dir="auto">Due to limitations of the VM, the value is not updated in the program, and the hot reload "doesn't work".<br>
There should be a warning somewhere, that a static final has been updated and that the hot-reload will not necessarily take these changes into account.</p> | <p dir="auto">Add infrastructure to check for program elements changed in the last reload and not executed. Use this facility in flutter tools to figure out situations where the user makes changes that will not be reflected after a hot reload and warn users about the need to do a hot restart for the changes to take effect.</p> | 1 |
<p dir="auto"><strong>Context:</strong></p>
<ul dir="auto">
<li>Playwright Version: [1.16.3]</li>
<li>Operating System: [Mac]</li>
<li>Node.js version: [16.12.0]</li>
<li>Browser: [Chrome]</li>
<li>Extra: [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1047930313" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright/issues/10150" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright/issues/10150/hovercard" href="https://github.com/microsoft/playwright/issues/10150">#10150</a>]</li>
</ul>
<p dir="auto">This bug is follow up of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1047930313" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright/issues/10150" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright/issues/10150/hovercard" href="https://github.com/microsoft/playwright/issues/10150">#10150</a></p>
<p dir="auto">I ran into issues while doing further testing with the suggested approach.</p>
<p dir="auto"><strong>Code Snippet</strong></p>
<p dir="auto">Issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="524783024" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright/issues/1" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/playwright/pull/1/hovercard" href="https://github.com/microsoft/playwright/pull/1">#1</a></p>
<p dir="auto">If i have same title in multiple spec files, i get warning message, although i have different spec files, i see this warning when i run the test with suggested approach.<br>
` duplicate test titles are not allowed.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="title: pw1_test test
test/pw1_test_spec.js:6
test/pw2_test_spec.js:6
`"><pre class="notranslate"><code class="notranslate">title: pw1_test test
test/pw1_test_spec.js:6
test/pw2_test_spec.js:6
`
</code></pre></div>
<p dir="auto">Issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="524784715" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright/issues/2" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/playwright/pull/2/hovercard" href="https://github.com/microsoft/playwright/pull/2">#2</a></p>
<p dir="auto">storageState in test.use is not respected, if i have different storage states in each spec file, it doesn't load the storageState when the test runs</p>
<p dir="auto">playwright.config</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// playwright.config.js
// @ts-check
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
workers: 1,
globalTimeout: 0,
globalSetup: './global-setup.js',
reporter: [
['list']
],
reportSlowTests: null,
projects: [
{
name: 'Test1',
testDir: './test',
testMatch: 'sequence1.spec.js',
retries: 0,
use: {
browserName: 'chromium',
channel: 'chrome',
headless: false,
viewport: {width: 1600, height: 825},
ignoreHTTPSErrors: true,
trace: "off",
screenshot: "only-on-failure",
acceptDownloads:true,
},
},
]
};
module.exports = config;"><pre class="notranslate"><span class="pl-c">// playwright.config.js</span>
<span class="pl-c">// <span class="pl-k">@ts</span>-check</span>
<span class="pl-c">/** <span class="pl-k">@type</span> {import('@playwright/test').PlaywrightTestConfig} */</span>
<span class="pl-k">const</span> <span class="pl-s1">config</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-c1">workers</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span>
<span class="pl-c1">globalTimeout</span>: <span class="pl-c1">0</span><span class="pl-kos">,</span>
<span class="pl-c1">globalSetup</span>: <span class="pl-s">'./global-setup.js'</span><span class="pl-kos">,</span>
<span class="pl-c1">reporter</span>: <span class="pl-kos">[</span>
<span class="pl-kos">[</span><span class="pl-s">'list'</span><span class="pl-kos">]</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">reportSlowTests</span>: <span class="pl-c1">null</span><span class="pl-kos">,</span>
<span class="pl-c1">projects</span>: <span class="pl-kos">[</span>
<span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-s">'Test1'</span><span class="pl-kos">,</span>
<span class="pl-c1">testDir</span>: <span class="pl-s">'./test'</span><span class="pl-kos">,</span>
<span class="pl-c1">testMatch</span>: <span class="pl-s">'sequence1.spec.js'</span><span class="pl-kos">,</span>
<span class="pl-c1">retries</span>: <span class="pl-c1">0</span><span class="pl-kos">,</span>
<span class="pl-c1">use</span>: <span class="pl-kos">{</span>
<span class="pl-c1">browserName</span>: <span class="pl-s">'chromium'</span><span class="pl-kos">,</span>
<span class="pl-c1">channel</span>: <span class="pl-s">'chrome'</span><span class="pl-kos">,</span>
<span class="pl-c1">headless</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-c1">viewport</span>: <span class="pl-kos">{</span><span class="pl-c1">width</span>: <span class="pl-c1">1600</span><span class="pl-kos">,</span> <span class="pl-c1">height</span>: <span class="pl-c1">825</span><span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">ignoreHTTPSErrors</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-c1">trace</span>: <span class="pl-s">"off"</span><span class="pl-kos">,</span>
<span class="pl-c1">screenshot</span>: <span class="pl-s">"only-on-failure"</span><span class="pl-kos">,</span>
<span class="pl-c1">acceptDownloads</span>:<span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-s1">config</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">global-setup.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const { chromium, Browser, BrowserContext } = require('@playwright/test');
module.exports = async () => {
const browser = await chromium.launch({
headless: false
});
const context = await browser.newContext();
// Open new page
const page = await context.newPage();
await page.context().storageState({path: 'empty_storage.json'});
// Go to https://github.com/
await page.goto('https://github.com/');
// Click text=Sign in
await page.click('text=Sign in');
// assert.equal(page.url(), 'https://github.com/login');
// Fill input[name="login"]
await page.fill('input[name="login"]', '');
// Fill input[name="password"]
await page.fill('input[name="password"]', '');
// Click input:has-text("Sign in")
await page.click('input:has-text("Sign in")');
// assert.equal(page.url(), 'https://github.com/');
await page.context().storageState({path: 'login_storage.json'});
// ---------------------
await context.close();
await browser.close();
}"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span> chromium<span class="pl-kos">,</span> Browser<span class="pl-kos">,</span> BrowserContext <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'@playwright/test'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-en">exports</span> <span class="pl-c1">=</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">browser</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">chromium</span><span class="pl-kos">.</span><span class="pl-en">launch</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">headless</span>: <span class="pl-c1">false</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">context</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">newContext</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// Open new page</span>
<span class="pl-k">const</span> <span class="pl-s1">page</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-en">newPage</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">context</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">storageState</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">path</span>: <span class="pl-s">'empty_storage.json'</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// Go to https://github.com/</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">'https://github.com/'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// Click text=Sign in</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">click</span><span class="pl-kos">(</span><span class="pl-s">'text=Sign in'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// assert.equal(page.url(), 'https://github.com/login');</span>
<span class="pl-c">// Fill input[name="login"]</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">fill</span><span class="pl-kos">(</span><span class="pl-s">'input[name="login"]'</span><span class="pl-kos">,</span> <span class="pl-s">''</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// Fill input[name="password"]</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">fill</span><span class="pl-kos">(</span><span class="pl-s">'input[name="password"]'</span><span class="pl-kos">,</span> <span class="pl-s">''</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// Click input:has-text("Sign in")</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">click</span><span class="pl-kos">(</span><span class="pl-s">'input:has-text("Sign in")'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// assert.equal(page.url(), 'https://github.com/');</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">context</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">storageState</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">path</span>: <span class="pl-s">'login_storage.json'</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// ---------------------</span>
<span class="pl-k">await</span> <span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">sequence1.spec.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="require('./pw1_test_spec.js');
require('./pw2_test_spec.js');"><pre class="notranslate"><span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'./pw1_test_spec.js'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'./pw2_test_spec.js'</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">pw1_test_spec.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const {test,expect} = require("@playwright/test");
test.use({storageState: 'login_storage.json'});
test.describe('pw1_test', () => {
test('test', async ({ page }) => {
// Go to https://github.com/
await page.goto('https://github.com/');
// Click text=Pull requests
await page.click('text=Pull requests');
await expect(page).toHaveURL('https://github.com/pulls');
});
});"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span>test<span class="pl-kos">,</span>expect<span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"@playwright/test"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-en">use</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">storageState</span>: <span class="pl-s">'login_storage.json'</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-en">describe</span><span class="pl-kos">(</span><span class="pl-s">'pw1_test'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'test'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-c">// Go to https://github.com/</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">'https://github.com/'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// Click text=Pull requests</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">click</span><span class="pl-kos">(</span><span class="pl-s">'text=Pull requests'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">page</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toHaveURL</span><span class="pl-kos">(</span><span class="pl-s">'https://github.com/pulls'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">pw2_test_spec.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
const {test,expect} = require("@playwright/test");
test.use({storageState: 'empty_storage.json'});
test.describe('pw2_test', () => {
test('test', async ({ page }) => {
// Go to https://github.com/
await page.goto('https://gmail.com/');
});
});"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span>test<span class="pl-kos">,</span>expect<span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"@playwright/test"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-en">use</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">storageState</span>: <span class="pl-s">'empty_storage.json'</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-en">describe</span><span class="pl-kos">(</span><span class="pl-s">'pw2_test'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'test'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-c">// Go to https://github.com/</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">'https://gmail.com/'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Describe the bug</strong></p>
<ul dir="auto">
<li>Provide login credentials to GitHub in global-setup.js</li>
<li>global-setup will create two storageState files, one for GitHub and other for empty storageState</li>
<li>When pw1_test_spec.js is executed, it will redirect to login page instead of using the storageState</li>
<li>If i exclude pw2_test_spec.js from the sequence file, i won't be redirected to login page</li>
</ul>
<p dir="auto">Kindly let me know if you need any other information.</p> | <p dir="auto"><strong>Context:</strong></p>
<ul dir="auto">
<li>Playwright Version: 1.17.1</li>
<li>Operating System: Windows</li>
<li>Node.js version: 17.0.1</li>
<li>Browser: Chromium</li>
</ul>
<p dir="auto"><strong>Describe the bug</strong><br>
A first step for migrating our Protractor tests most likely will be to migrate them 1:1.<br>
Lengthy tests depending on the previous tests, also doing UI-based login and some other setup steps in beforeAll blocks. So not nearly as isolated as we'd like.</p>
<p dir="auto">I noticed the tracing behaves a bit odd for when the <a href="https://playwright.dev/docs/test-auth#reuse-the-signed-in-page-in-multiple-tests" rel="nofollow">page was created in the beforeAll like this</a>.</p>
<p dir="auto">I've attached <a href="https://github.com/microsoft/playwright/files/7719514/playwright-beforeall-trace-strangeness.zip">playwright-beforeall-trace-strangeness.zip</a> with source code and html report with traces.</p>
<p dir="auto">When viewing the report and navigating to the traces:</p>
<ul dir="auto">
<li>The filmstrips for both test 1 and test 2 are mostly dominated by the beforeAll step.</li>
<li>The first action of the actual test (page.goto) occupies a large part of the timeline bar.<br>
But the filmstrip for the same time period shows only screenshots of the beforeAll step.</li>
<li>Further to the right, the timeline bars are also out of sync with the film strip.</li>
<li>The actions pane is showing only the actual test actions (nothing from the beforeAll).</li>
</ul>
<p dir="auto">(Hard to describe, but hope it's clear like this)</p>
<p dir="auto">My preferred fix would be one of:</p>
<ul dir="auto">
<li>beforeAll and first test combined in one trace, but with also the beforeAll actions shown, and timeline bars and filmstrip properly aligned/in sync.</li>
<li>a separate trace for beforeAll (ideally also with a separate beforeAll item in the report).</li>
</ul> | 0 |
<p dir="auto">According to the docs <a href="https://code.visualstudio.com/docs/editor/tasks#_autodetecting-gulp-grunt-and-jake-tasks" rel="nofollow">"Autodetecting Gulp, Grunt and Jake Tasks"</a>, <strong><code class="notranslate">gulpfile.js</code> at project root</strong> is loaded and tasks in that are listed automatically.</p>
<p dir="auto"><code class="notranslate">gulpfile.js</code>:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var gulp = require('gulp');
gulp.task('gulpfileTASK1', function() {});
gulp.task('gulpfileTASK2', function() {});
gulp.task('gulpfileTASK3', function() {});"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">gulp</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'gulp'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">gulp</span><span class="pl-kos">.</span><span class="pl-en">task</span><span class="pl-kos">(</span><span class="pl-s">'gulpfileTASK1'</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">gulp</span><span class="pl-kos">.</span><span class="pl-en">task</span><span class="pl-kos">(</span><span class="pl-s">'gulpfileTASK2'</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">gulp</span><span class="pl-kos">.</span><span class="pl-en">task</span><span class="pl-kos">(</span><span class="pl-s">'gulpfileTASK3'</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">VS Code Command <code class="notranslate">>Tasks: Run Task</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="gulpfileTASK1
gulpfileTASK2
gulpfileTASK3"><pre class="notranslate"><code class="notranslate">gulpfileTASK1
gulpfileTASK2
gulpfileTASK3
</code></pre></div>
<p dir="auto">This autodetecting is disabled (<code class="notranslate">gulpfile.js</code> is ignored) if tasks are defined in <code class="notranslate">.vscode/tasks.json</code>, right?</p>
<p dir="auto"><code class="notranslate">tasks.json</code>:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"version": "0.1.0",
"command": "something",
"isShellCommand": true,
"tasks": [
{
"taskName": "tasksjsonTASK1",
"args": []
},
{
"taskName": "tasksjsonTASK2",
"args": []
},
{
"taskName": "tasksjsonTASK3",
"args": []
}
]
}"><pre class="notranslate">{
<span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>0.1.0<span class="pl-pds">"</span></span>,
<span class="pl-ent">"command"</span>: <span class="pl-s"><span class="pl-pds">"</span>something<span class="pl-pds">"</span></span>,
<span class="pl-ent">"isShellCommand"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"tasks"</span>: [
{
<span class="pl-ent">"taskName"</span>: <span class="pl-s"><span class="pl-pds">"</span>tasksjsonTASK1<span class="pl-pds">"</span></span>,
<span class="pl-ent">"args"</span>: []
},
{
<span class="pl-ent">"taskName"</span>: <span class="pl-s"><span class="pl-pds">"</span>tasksjsonTASK2<span class="pl-pds">"</span></span>,
<span class="pl-ent">"args"</span>: []
},
{
<span class="pl-ent">"taskName"</span>: <span class="pl-s"><span class="pl-pds">"</span>tasksjsonTASK3<span class="pl-pds">"</span></span>,
<span class="pl-ent">"args"</span>: []
}
]
}</pre></div>
<p dir="auto">VS Code Command <code class="notranslate">>Tasks: Run Task</code> (tasks in <code class="notranslate">gulpfile.js</code> are not listed):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tasksjsonTASK1
tasksjsonTASK2
tasksjsonTASK3"><pre class="notranslate"><code class="notranslate">tasksjsonTASK1
tasksjsonTASK2
tasksjsonTASK3
</code></pre></div>
<p dir="auto">It seems that behavior above is right.<br>
But if <code class="notranslate">gulp</code> is specified to the <code class="notranslate">command</code> above (<code class="notranslate">"command": "gulp"</code>), tasks in both files are listed.</p>
<p dir="auto">VS Code Command <code class="notranslate">>Tasks: Run Task</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="gulpfileTASK1
gulpfileTASK2
gulpfileTASK3
tasksjsonTASK1
tasksjsonTASK2
tasksjsonTASK3"><pre class="notranslate"><code class="notranslate">gulpfileTASK1
gulpfileTASK2
gulpfileTASK3
tasksjsonTASK1
tasksjsonTASK2
tasksjsonTASK3
</code></pre></div>
<p dir="auto">Of course the tasks in <code class="notranslate">tasks.json</code> are gulp tasks because <code class="notranslate">command</code> is <code class="notranslate">gulp</code>. <code class="notranslate">gulpfileTASK*</code> tasks should not be listed.</p>
<p dir="auto">When <code class="notranslate">--gulpfile</code> is specified, these tasks are listed even if <code class="notranslate">gulpfile.js</code> is another named and it is in outside of project root.</p>
<p dir="auto"><code class="notranslate">tasks.json</code>:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"version": "0.1.0",
"command": "gulp",
"isShellCommand": true,
"args": [
"--gulpfile", "PATH/TO/OUTSIDE/OF/PROJECT/ANOTHER_NAME.js"
],
"tasks": [
{
"taskName": "tasksjsonTASK1",
"args": []
},
{
"taskName": "tasksjsonTASK2",
"args": []
},
{
"taskName": "tasksjsonTASK3",
"args": []
}
]
}"><pre class="notranslate">{
<span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>0.1.0<span class="pl-pds">"</span></span>,
<span class="pl-ent">"command"</span>: <span class="pl-s"><span class="pl-pds">"</span>gulp<span class="pl-pds">"</span></span>,
<span class="pl-ent">"isShellCommand"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"args"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>--gulpfile<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>PATH/TO/OUTSIDE/OF/PROJECT/ANOTHER_NAME.js<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"tasks"</span>: [
{
<span class="pl-ent">"taskName"</span>: <span class="pl-s"><span class="pl-pds">"</span>tasksjsonTASK1<span class="pl-pds">"</span></span>,
<span class="pl-ent">"args"</span>: []
},
{
<span class="pl-ent">"taskName"</span>: <span class="pl-s"><span class="pl-pds">"</span>tasksjsonTASK2<span class="pl-pds">"</span></span>,
<span class="pl-ent">"args"</span>: []
},
{
<span class="pl-ent">"taskName"</span>: <span class="pl-s"><span class="pl-pds">"</span>tasksjsonTASK3<span class="pl-pds">"</span></span>,
<span class="pl-ent">"args"</span>: []
}
]
}</pre></div>
<p dir="auto">VS Code Command <code class="notranslate">>Tasks: Run Task</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="gulpfileTASK1
gulpfileTASK2
gulpfileTASK3
tasksjsonTASK1
tasksjsonTASK2
tasksjsonTASK3"><pre class="notranslate"><code class="notranslate">gulpfileTASK1
gulpfileTASK2
gulpfileTASK3
tasksjsonTASK1
tasksjsonTASK2
tasksjsonTASK3
</code></pre></div>
<p dir="auto">It seems that the autodetecting is enabled always when <code class="notranslate">command</code> is <code class="notranslate">gulp</code> even if there is not <code class="notranslate">gulpfile.js</code> at project root.</p> | <p dir="auto">Testing <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="128546969" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/2230" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/2230/hovercard" href="https://github.com/microsoft/vscode/issues/2230">#2230</a></p>
<p dir="auto">Can you try to remove the arrows?</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5047891/12607999/525f58d4-c4d9-11e5-92bb-9ad14c3c9f2f.png"><img src="https://cloud.githubusercontent.com/assets/5047891/12607999/525f58d4-c4d9-11e5-92bb-9ad14c3c9f2f.png" alt="image" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto">If I'm not at the right place for this issue, I apologize. Not sure where to get started to solve this error message.</p>
<h3 dir="auto">Problem description</h3>
<ul dir="auto">
<li>a nextjs app which was made from <a href="https://github.com/zeit/next.js/tree/master/examples/with-material-ui-next">with-material-ui-next</a>, you can find the app having the issue here <a href="https://github.com/astenmies/next-library-starter">next-library-starter</a></li>
<li>a npm package called <a href="https://github.com/astenmies/next.js-library">next-library</a> which depends on material-ui and is a dependency of next-library-starter (see The Goal below)</li>
<li>everything works great, except I'm receiving an error message for each material-ui component.</li>
</ul>
<h3 dir="auto">Error messages</h3>
<p dir="auto"><strong>Warning: Failed context type: Invalid context <code class="notranslate">64a55d578f856d258dc345b094a2a2b3</code> of type <code class="notranslate">Jss</code> supplied to <code class="notranslate">withStyles(ButtonBase)</code>, expected instance of <code class="notranslate">Jss</code>.</strong></p>
<p dir="auto"><strong>Warning: Failed context type: Invalid context <code class="notranslate">d4bd0baacbc52bbd48bbb9eb24344ecd</code> of type <code class="notranslate">SheetsRegistry</code> supplied to <code class="notranslate">withStyles(TouchRipple)</code>, expected instance of <code class="notranslate">SheetsRegistry</code>.</strong></p>
<h3 dir="auto">The goal</h3>
<p dir="auto">The goal is to have that npm library with material-ui in order to quickly get started with new projects. This stuff is slightly beyond my understanding of npm packages & webpack and I might not be doing it the right way, if so, please kindly advise.</p>
<h3 dir="auto">Steps to reproduce</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="git clone https://github.com/astenmies/next-library-starter.git && cd next-library-starter && yarn && yarn run dev"><pre class="notranslate"><code class="notranslate">git clone https://github.com/astenmies/next-library-starter.git && cd next-library-starter && yarn && yarn run dev
</code></pre></div>
<h3 dir="auto">Versions</h3>
<ul dir="auto">
<li>Material-UI: next</li>
<li>React: 15.6.1</li>
<li>Browser: Chrome</li>
</ul> | <h2 dir="auto">Context</h2>
<p dir="auto">According to <a href="https://material-ui-1dab0.firebaseapp.com/customization/css-in-js/#jss" rel="nofollow">docs</a>, Material-UI uses the <code class="notranslate">jss-preset-default</code> module. Which is not true since <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="273727444" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/9129" data-hovercard-type="pull_request" data-hovercard-url="/mui/material-ui/pull/9129/hovercard" href="https://github.com/mui/material-ui/pull/9129">#9129</a> was merged.</p>
<p dir="auto">Also, <code class="notranslate">jss-preset-default</code> plugin is <a href="https://github.com/mui-org/material-ui/blob/v1-beta/package.json#L72">listed in package.json</a> - it suggests that all <code class="notranslate">jss-preset-default</code> plugins are supported, which is not true.</p>
<p dir="auto">My suggestion is to remove <code class="notranslate">jss-preset-default</code> from package.json and add <a href="https://github.com/mui-org/material-ui/blob/v1-beta/src/styles/withStyles.js#L8">list plugins which are used</a> instead.<br>
Also, docs should be updated and probably examples too (e.g. <a href="https://github.com/mui-org/material-ui/blob/5d3fb197da4c79cf2ef1272c3c248dcbf2875bae/examples/create-react-app-with-jss/src/withRoot.js">this one</a>).</p>
<p dir="auto">I can submit a PR if needed</p> | 0 |
<p dir="auto">I am working with bidimensional arrays on Numpy. One of my arrays, H, is random, and I want to compute its pseudoinverse. If I use scipy.linalg.pinv2 everything runs smoothly. However, if I use scipy.linalg.pinv, sometimes problems arise.</p>
<p dir="auto">The problem is that, if the j-th column of H is all 1s, pinv(H) has huge coefficients at the j-th row. This is in turn a problem because, in such cases, np.dot(pinv(H), Y) contains some nan values (Y is an array of small integers).</p>
<p dir="auto">Now, I am not into linear algebra and numeric computation enough to understand if this is a bug or some precision related property of the two functions. If this is not a bug, please close this issue and I apologize.</p>
<p dir="auto">I saved the arrays with np.savetxt(fn, a, '%.2e', ';'): please, see <a href="https://dl.dropboxusercontent.com/u/48242012/example.tar.gz" rel="nofollow">https://dl.dropboxusercontent.com/u/48242012/example.tar.gz</a> to find them.</p>
<p dir="auto">In the provided file, you can see in pinv(H).csv that rows 14, 33, 55, 56 and 99 have huge values, while in pinv2(H) the same rows have more decent values.</p>
<p dir="auto">(I posted the same question on StackOverflow yesterday, but it did not receive much attention: <a href="http://stackoverflow.com/questions/27775986/numpy-scipy-pinv-and-pinv2-behave-differently" rel="nofollow">http://stackoverflow.com/questions/27775986/numpy-scipy-pinv-and-pinv2-behave-differently</a> . I am reposting here just to signal this behaviour and to suggest that it may be documented - I can survive with pinv2.)</p>
<p dir="auto">I appreciate your efforts.</p> | <p dir="auto">it is currently not possible to install scipy on MacOs 12 + M1 Max</p>
<p dir="auto">python: 3.9.7</p>
<p dir="auto">Running</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="OPENBLAS="$(brew --prefix openblas)" python3 -m pip install scipy"><pre class="notranslate"><code class="notranslate">OPENBLAS="$(brew --prefix openblas)" python3 -m pip install scipy
</code></pre></div>
<p dir="auto">yields</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" 2 warnings generated.
/opt/homebrew/bin/gfortran -Wall -g -Wall -g -undefined dynamic_lookup -bundle build/temp.macosx-12.0-arm64-3.9/scipy/integrate/_quadpackmodule.o -L/opt/homebrew/opt/openblas/lib -L/opt/homebrew/Cellar/gcc/11.2.0/lib/gcc/11/gcc/aarch64-apple-darwin20/11.1.0 -L/opt/homebrew/Cellar/gcc/11.2.0/lib/gcc/11/gcc/aarch64-apple-darwin20/11.1.0/../../.. -L/opt/homebrew/Cellar/gcc/11.2.0/lib/gcc/11/gcc/aarch64-apple-darwin20/11.1.0/../../.. -Lbuild/temp.macosx-12.0-arm64-3.9 -Wl,-rpath,/opt/homebrew/opt/openblas/lib -lquadpack -lmach -lopenblas -lopenblas -lgfortran -o build/lib.macosx-12.0-arm64-3.9/scipy/integrate/_quadpack.cpython-39-darwin.so
gfortran: warning: could not understand version 12.0
ld: -rpath can only be used when targeting Mac OS X 10.5 or later
collect2: error: ld returned 1 exit status
error: Command "/opt/homebrew/bin/gfortran -Wall -g -Wall -g -undefined dynamic_lookup -bundle build/temp.macosx-12.0-arm64-3.9/scipy/integrate/_quadpackmodule.o -L/opt/homebrew/opt/openblas/lib -L/opt/homebrew/Cellar/gcc/11.2.0/lib/gcc/11/gcc/aarch64-apple-darwin20/11.1.0 -L/opt/homebrew/Cellar/gcc/11.2.0/lib/gcc/11/gcc/aarch64-apple-darwin20/11.1.0/../../.. -L/opt/homebrew/Cellar/gcc/11.2.0/lib/gcc/11/gcc/aarch64-apple-darwin20/11.1.0/../../.. -Lbuild/temp.macosx-12.0-arm64-3.9 -Wl,-rpath,/opt/homebrew/opt/openblas/lib -lquadpack -lmach -lopenblas -lopenblas -lgfortran -o build/lib.macosx-12.0-arm64-3.9/scipy/integrate/_quadpack.cpython-39-darwin.so" failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy, which is required to install pyproject.toml-based projects"><pre class="notranslate"><code class="notranslate"> 2 warnings generated.
/opt/homebrew/bin/gfortran -Wall -g -Wall -g -undefined dynamic_lookup -bundle build/temp.macosx-12.0-arm64-3.9/scipy/integrate/_quadpackmodule.o -L/opt/homebrew/opt/openblas/lib -L/opt/homebrew/Cellar/gcc/11.2.0/lib/gcc/11/gcc/aarch64-apple-darwin20/11.1.0 -L/opt/homebrew/Cellar/gcc/11.2.0/lib/gcc/11/gcc/aarch64-apple-darwin20/11.1.0/../../.. -L/opt/homebrew/Cellar/gcc/11.2.0/lib/gcc/11/gcc/aarch64-apple-darwin20/11.1.0/../../.. -Lbuild/temp.macosx-12.0-arm64-3.9 -Wl,-rpath,/opt/homebrew/opt/openblas/lib -lquadpack -lmach -lopenblas -lopenblas -lgfortran -o build/lib.macosx-12.0-arm64-3.9/scipy/integrate/_quadpack.cpython-39-darwin.so
gfortran: warning: could not understand version 12.0
ld: -rpath can only be used when targeting Mac OS X 10.5 or later
collect2: error: ld returned 1 exit status
error: Command "/opt/homebrew/bin/gfortran -Wall -g -Wall -g -undefined dynamic_lookup -bundle build/temp.macosx-12.0-arm64-3.9/scipy/integrate/_quadpackmodule.o -L/opt/homebrew/opt/openblas/lib -L/opt/homebrew/Cellar/gcc/11.2.0/lib/gcc/11/gcc/aarch64-apple-darwin20/11.1.0 -L/opt/homebrew/Cellar/gcc/11.2.0/lib/gcc/11/gcc/aarch64-apple-darwin20/11.1.0/../../.. -L/opt/homebrew/Cellar/gcc/11.2.0/lib/gcc/11/gcc/aarch64-apple-darwin20/11.1.0/../../.. -Lbuild/temp.macosx-12.0-arm64-3.9 -Wl,-rpath,/opt/homebrew/opt/openblas/lib -lquadpack -lmach -lopenblas -lopenblas -lgfortran -o build/lib.macosx-12.0-arm64-3.9/scipy/integrate/_quadpack.cpython-39-darwin.so" failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy, which is required to install pyproject.toml-based projects
</code></pre></div> | 0 |
<p dir="auto">I'm grouping rows by column investor id. within apply, when a group has more than 1 row, i'm copying a value in the second row in the group into the a column of the first row in that group. I'm using groupby with apply but the assembled result is incorrect - all rows except row 1 show the same investor B - seems like a bug?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [1]: import pandas as pd
In [2]: import numpy as np
In [3]: df=pd.DataFrame({'InvestorID':[6,6,17,17,19,19,30,40],
...: 'Investor':['AAA','AAA','BBB','BBB','CCC','CCC','EEE','FFF'],
...: 'CurrentPeriodEnd':['7/31/2014','5/31/2014','7/31/2014','5/31/2014','7/31/2014','5/31/2014','7/31/2014','7/31/2014'],
...: 'PriorPeriodEnd':np.nan*8})
In [4]: df
Out[4]:
CurrentPeriodEnd Investor InvestorID PriorPeriodEnd
0 7/31/2014 AAA 6 NaN
1 5/31/2014 AAA 6 NaN
2 7/31/2014 BBB 17 NaN
3 5/31/2014 BBB 17 NaN
4 7/31/2014 CCC 19 NaN
5 5/31/2014 CCC 19 NaN
6 7/31/2014 EEE 30 NaN
7 7/31/2014 FFF 40 NaN"><pre class="notranslate"><code class="notranslate">In [1]: import pandas as pd
In [2]: import numpy as np
In [3]: df=pd.DataFrame({'InvestorID':[6,6,17,17,19,19,30,40],
...: 'Investor':['AAA','AAA','BBB','BBB','CCC','CCC','EEE','FFF'],
...: 'CurrentPeriodEnd':['7/31/2014','5/31/2014','7/31/2014','5/31/2014','7/31/2014','5/31/2014','7/31/2014','7/31/2014'],
...: 'PriorPeriodEnd':np.nan*8})
In [4]: df
Out[4]:
CurrentPeriodEnd Investor InvestorID PriorPeriodEnd
0 7/31/2014 AAA 6 NaN
1 5/31/2014 AAA 6 NaN
2 7/31/2014 BBB 17 NaN
3 5/31/2014 BBB 17 NaN
4 7/31/2014 CCC 19 NaN
5 5/31/2014 CCC 19 NaN
6 7/31/2014 EEE 30 NaN
7 7/31/2014 FFF 40 NaN
</code></pre></div>
<p dir="auto">this function updates the first positional row in a group with values from the second row<br>
where a group has 2 rows or more</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [5]: def f(x):
...: if len(x) >1:
...: x.iloc[0,x.columns.get_loc('PriorPeriodEnd')]=x.iloc[1,x.columns.get_loc('CurrentPeriodEnd')]
...: return x.iloc[0]
In [6]: df.groupby(['InvestorID']).apply(f).reset_index(drop=True)"><pre class="notranslate"><code class="notranslate">In [5]: def f(x):
...: if len(x) >1:
...: x.iloc[0,x.columns.get_loc('PriorPeriodEnd')]=x.iloc[1,x.columns.get_loc('CurrentPeriodEnd')]
...: return x.iloc[0]
In [6]: df.groupby(['InvestorID']).apply(f).reset_index(drop=True)
</code></pre></div>
<p dir="auto">this is not an expected result - the investor column should not have repeating BBB values</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Out[6]:
CurrentPeriodEnd Investor InvestorID PriorPeriodEnd
0 7/31/2014 AAA 6 5/31/2014
1 7/31/2014 BBB 17 5/31/2014
2 7/31/2014 BBB 19 5/31/2014
3 7/31/2014 BBB 30 5/31/2014
4 7/31/2014 BBB 40 5/31/2014"><pre class="notranslate"><code class="notranslate">Out[6]:
CurrentPeriodEnd Investor InvestorID PriorPeriodEnd
0 7/31/2014 AAA 6 5/31/2014
1 7/31/2014 BBB 17 5/31/2014
2 7/31/2014 BBB 19 5/31/2014
3 7/31/2014 BBB 30 5/31/2014
4 7/31/2014 BBB 40 5/31/2014
</code></pre></div>
<p dir="auto">the function below copies the first row first before making updates and it works as expected</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [7]: def f(x):
...: top_row=pd.Series(x.iloc[0])
...: if len(x) >1:
...: top_row.iloc[x.columns.get_loc('PriorPeriodEnd')]=x.iloc[1,x.columns.get_loc('CurrentPeriodEnd')]
...: return top_row"><pre class="notranslate"><code class="notranslate">In [7]: def f(x):
...: top_row=pd.Series(x.iloc[0])
...: if len(x) >1:
...: top_row.iloc[x.columns.get_loc('PriorPeriodEnd')]=x.iloc[1,x.columns.get_loc('CurrentPeriodEnd')]
...: return top_row
</code></pre></div>
<p dir="auto">this is what the result should look like</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [8]: df.groupby(['InvestorID']).apply(f).reset_index(drop=True)
Out[8]:
CurrentPeriodEnd Investor InvestorID PriorPeriodEnd
0 7/31/2014 AAA 6 5/31/2014
1 7/31/2014 BBB 17 5/31/2014
2 7/31/2014 CCC 19 5/31/2014
3 7/31/2014 EEE 30 NaN
4 7/31/2014 FFF 40 NaN"><pre class="notranslate"><code class="notranslate">In [8]: df.groupby(['InvestorID']).apply(f).reset_index(drop=True)
Out[8]:
CurrentPeriodEnd Investor InvestorID PriorPeriodEnd
0 7/31/2014 AAA 6 5/31/2014
1 7/31/2014 BBB 17 5/31/2014
2 7/31/2014 CCC 19 5/31/2014
3 7/31/2014 EEE 30 NaN
4 7/31/2014 FFF 40 NaN
</code></pre></div> | <p dir="auto">When trying to insert/append a subclass (or composition) of a pandas Series into a DataFrame, any and all of the 'extra' functions that come with my subclass (or composition) are stripped and a Series is created:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [7]: df = read_csv('some/data/from/file.csv')
In [8]: sp = SpatialSeries(df.the_geom) # SpatialSeries is subclass, the_geom is spatial location (WKT)
In [9]: type(sp)
Out[9]: spseries.SpatialSeries
In [10]: type(df)
Out[10]: pandas.core.frame.DataFrame
In [11]: df['geoms'] = sp
In [12]: type(df['geoms'])
Out[12]: pandas.core.series.Series"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">7</span>]: <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-en">read_csv</span>(<span class="pl-s">'some/data/from/file.csv'</span>)
<span class="pl-v">In</span> [<span class="pl-c1">8</span>]: <span class="pl-s1">sp</span> <span class="pl-c1">=</span> <span class="pl-v">SpatialSeries</span>(<span class="pl-s1">df</span>.<span class="pl-s1">the_geom</span>) <span class="pl-c"># SpatialSeries is subclass, the_geom is spatial location (WKT)</span>
<span class="pl-v">In</span> [<span class="pl-c1">9</span>]: <span class="pl-en">type</span>(<span class="pl-s1">sp</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">9</span>]: <span class="pl-s1">spseries</span>.<span class="pl-v">SpatialSeries</span>
<span class="pl-v">In</span> [<span class="pl-c1">10</span>]: <span class="pl-en">type</span>(<span class="pl-s1">df</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">10</span>]: <span class="pl-s1">pandas</span>.<span class="pl-s1">core</span>.<span class="pl-s1">frame</span>.<span class="pl-v">DataFrame</span>
<span class="pl-v">In</span> [<span class="pl-c1">11</span>]: <span class="pl-s1">df</span>[<span class="pl-s">'geoms'</span>] <span class="pl-c1">=</span> <span class="pl-s1">sp</span>
<span class="pl-v">In</span> [<span class="pl-c1">12</span>]: <span class="pl-en">type</span>(<span class="pl-s1">df</span>[<span class="pl-s">'geoms'</span>])
<span class="pl-v">Out</span>[<span class="pl-c1">12</span>]: <span class="pl-s1">pandas</span>.<span class="pl-s1">core</span>.<span class="pl-s1">series</span>.<span class="pl-v">Series</span></pre></div>
<p dir="auto">I suspect that for the most part, this kind of behaviour is useful, however, I need the extra functions and classes associated with SpatialSeries, and I'd rather not have to subclass DataFrame to create a special DataFrame that allows this. It looks like the culprit is here in frame.py at lines 1761-1772:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" def _set_item(self, key, value):
"""
Add series to DataFrame in specified column.
If series is a numpy-array (not a Series/TimeSeries), it must be the
same length as the DataFrame's index or an error will be thrown.
Series/TimeSeries will be conformed to the DataFrame's index to
ensure homogeneity.
"""
value = self._sanitize_column(key, value)
NDFrame._set_item(self, key, value)"><pre class="notranslate"> <span class="pl-k">def</span> <span class="pl-en">_set_item</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>, <span class="pl-s1">value</span>):
<span class="pl-s">"""</span>
<span class="pl-s"> Add series to DataFrame in specified column.</span>
<span class="pl-s"></span>
<span class="pl-s"> If series is a numpy-array (not a Series/TimeSeries), it must be the</span>
<span class="pl-s"> same length as the DataFrame's index or an error will be thrown.</span>
<span class="pl-s"></span>
<span class="pl-s"> Series/TimeSeries will be conformed to the DataFrame's index to</span>
<span class="pl-s"> ensure homogeneity.</span>
<span class="pl-s"> """</span>
<span class="pl-s1">value</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_sanitize_column</span>(<span class="pl-s1">key</span>, <span class="pl-s1">value</span>)
<span class="pl-v">NDFrame</span>.<span class="pl-en">_set_item</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>, <span class="pl-s1">value</span>)</pre></div>
<p dir="auto">I particular, I'm looking at <code class="notranslate">value = self._sanitize_column(key, value)</code>, which appears to use <code class="notranslate">np.asarray(value)</code> before it returns the input array (even if the input column is a Series). Is there any way to avoid this behaviour? Or alternatively, a better way to implement this so that useful subclasses can be used within a DataFrame? I hope I'm not missing something simple/vital here?</p>
<p dir="auto">FYI:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [13]: pandas.__version__
Out[13]: '0.8.0b1'"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">13</span>]: <span class="pl-s1">pandas</span>.<span class="pl-s1">__version__</span>
<span class="pl-v">Out</span>[<span class="pl-c1">13</span>]: <span class="pl-s">'0.8.0b1'</span></pre></div> | 0 |
<p dir="auto">Right now i64 unifies with int on 64-bit platforms, etc, and it's a source of errors like in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/d65df5d4d4a1d46434944482ae92bf1b162c6985/hovercard" href="https://github.com/rust-lang/rust/commit/d65df5d4d4a1d46434944482ae92bf1b162c6985"><tt>d65df5d</tt></a>. I believe they should be different types.</p> | <p dir="auto">Hi,</p>
<p dir="auto">The following compiler error is not particularly clear or helpful (formatted to show the non-clarity).</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: mismatched types: expected
`core::option::Option<&'r Job>` but found
`core::option::Option<&'r Job>` (lifetime mismatch)"><pre class="notranslate"><code class="notranslate">error: mismatched types: expected
`core::option::Option<&'r Job>` but found
`core::option::Option<&'r Job>` (lifetime mismatch)
</code></pre></div>
<p dir="auto">While I understand there's a mismatch here, it's not really helpful in grasping what has to happen in my code to correct the error. In particular, if I passed type "X" but got "X", I'm not led towards a clear solution.</p>
<p dir="auto">I've included below a fuller scroll, which is an error I have gotten a lot but don't really grok how to avoid yet.</p>
<p dir="auto">Basically, I'm confused by the errors here and don't find them clarifying, only that I'm doing something vaguely wrong with lifetimes.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="newton.rs:211:5: 213:6 note: consider using an explicit lifetime parameter as shown: fn take_job<'r>(&'r mut self, job: &'r Job)
newton.rs:211 fn take_job<'r>(&'r mut self, job: &'r Job) -> () {
newton.rs:212 self.job = Some(job);
newton.rs:213 }
newton.rs:212:20: 212:29 error: cannot infer an appropriate lifetime due to conflicting requirements
newton.rs:212 self.job = Some(job);
^~~~~~~~~
newton.rs:212:20: 212:29 error: mismatched types: expected `core::option::Option<&'r Job>` but found `core::option::Option<&Job>` (lifetime mismatch)
newton.rs:212 self.job = Some(job);
^~~~~~~~~"><pre class="notranslate"><code class="notranslate">newton.rs:211:5: 213:6 note: consider using an explicit lifetime parameter as shown: fn take_job<'r>(&'r mut self, job: &'r Job)
newton.rs:211 fn take_job<'r>(&'r mut self, job: &'r Job) -> () {
newton.rs:212 self.job = Some(job);
newton.rs:213 }
newton.rs:212:20: 212:29 error: cannot infer an appropriate lifetime due to conflicting requirements
newton.rs:212 self.job = Some(job);
^~~~~~~~~
newton.rs:212:20: 212:29 error: mismatched types: expected `core::option::Option<&'r Job>` but found `core::option::Option<&Job>` (lifetime mismatch)
newton.rs:212 self.job = Some(job);
^~~~~~~~~
</code></pre></div> | 0 |
<p dir="auto">Transferred from <a href="http://code.opencv.org/issues/2461" rel="nofollow">http://code.opencv.org/issues/2461</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="|| Walter Blume on 2012-10-19 17:20
|| Priority: Normal
|| Affected: None
|| Category: imgproc, video
|| Tracker: Bug
|| Difficulty: None
|| PR: None
|| Platform: None / None"><pre class="notranslate"><code class="notranslate">|| Walter Blume on 2012-10-19 17:20
|| Priority: Normal
|| Affected: None
|| Category: imgproc, video
|| Tracker: Bug
|| Difficulty: None
|| PR: None
|| Platform: None / None
</code></pre></div>
<h2 dir="auto">hough circle detection not symmetric, misses obvious circle</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="For some reason the Hough circle detection misses an obvious circle, but if I flip the image, the circle is detected. One would think that results would be similar with flipped image, but they are not.
Attached is source code and test input image that exhibited the problem. Also screenshot with arrow showing the obvious circle miss.
Using OpenCV 2.4.2, built with TBB on Windows7 64 bit machine"><pre class="notranslate"><code class="notranslate">For some reason the Hough circle detection misses an obvious circle, but if I flip the image, the circle is detected. One would think that results would be similar with flipped image, but they are not.
Attached is source code and test input image that exhibited the problem. Also screenshot with arrow showing the obvious circle miss.
Using OpenCV 2.4.2, built with TBB on Windows7 64 bit machine
</code></pre></div>
<h2 dir="auto">History</h2>
<h5 dir="auto">Daniil Osokin on 2012-10-22 06:34</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Thank you, we will check it.
- Category set to imgproc, video"><pre class="notranslate"><code class="notranslate">Thank you, we will check it.
- Category set to imgproc, video
</code></pre></div>
<h5 dir="auto">Jason Harper on 2014-02-22 23:04</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="The problem is in the non-maxima suppression. It is only checking if a value that passes the threshold is also larger (but not equal) than all of it's neighbors. In the first case there are two pixels with equal values next to each other. When that happens neither pixel is set as a possible center and the circle is ignored. When the image is flipped one of these pixels gets an extra count leaving a single peak which gets labeled as a possible center.
I changed the check to >= and it fixed the problem and will submit a pull request soon."><pre class="notranslate"><code class="notranslate">The problem is in the non-maxima suppression. It is only checking if a value that passes the threshold is also larger (but not equal) than all of it's neighbors. In the first case there are two pixels with equal values next to each other. When that happens neither pixel is set as a possible center and the circle is ignored. When the image is flipped one of these pixels gets an extra count leaving a single peak which gets labeled as a possible center.
I changed the check to >= and it fixed the problem and will submit a pull request soon.
</code></pre></div>
<h5 dir="auto">leonardo bocchi on 2015-06-01 15:59</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I faced the same problem, and found the same solution.
To avoid duplication, I changed lines 1112-1113 of hough.cpp to read:
adata[base] >= adata[base-1] && adata[base] > adata[base+1] &&
adata[base] >= adata[base-acols-2] && adata[base] > adata[base+acols+2] )
It seems working and no duplicate detections."><pre class="notranslate"><code class="notranslate">I faced the same problem, and found the same solution.
To avoid duplication, I changed lines 1112-1113 of hough.cpp to read:
adata[base] >= adata[base-1] && adata[base] > adata[base+1] &&
adata[base] >= adata[base-acols-2] && adata[base] > adata[base+acols+2] )
It seems working and no duplicate detections.
</code></pre></div> | <h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => 4.0.0</li>
<li>Operating System / Platform => Ubuntu 16.04</li>
<li>GPU => NVIDIA GeForce GTX 1080</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">As I read the changelog for opencv 4.0.0 the dnn module option <code class="notranslate">setPreferableTarget(DNN_TARGET_OPENCL)</code> was fixed.<br>
For this, I installed and test the version 4.0.0 and test that openCL backend is using my gpu. But, when I run my code with this option the code is still running on cpu. I looked htop with and without ````setPreferableTarget``` and both ways load the cpu equals. Also, measure time and it is the same for both ways. For this I searched about openCL and check that Opencv is really using my gpu. When I run</p>
<div class="highlight highlight-source-c++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="std::vector< cv::ocl::PlatformInfo > platform_info;
if (!cv::ocl::haveOpenCL())
{
cout << "OpenCL is not available..." << endl;
//return;
}
cv::ocl::setUseOpenCL(true);
ocl::getPlatfomsInfo(platform_info);
for(int i = 0; i < platform_info.size(); i++){
ocl::PlatformInfo sdk = platform_info.at(i);
for (int j = 0; j < sdk.deviceNumber(); j++) {
ocl::Device device;
sdk.getDevice(device, j);
cout << "\n\n*********************\n Device " << i + 1 << endl;
cout << "Vendor ID: " << device.vendorID() << endl;
cout << "Vendor name: " << device.vendorName() << endl;
cout << "Name: " << device.name() << endl;
cout << "Driver version: " << device.driverVersion() << endl;
cout << "available: " << device.available() << endl;
if (device.isAMD()) cout << "Is an AMD device" << endl;
if (device.isIntel()) cout << "Is a Intel device" << endl;
cout << "Global Memory size: " << device.globalMemSize() << endl;
cout << "Memory cache size: " << device.globalMemCacheSize() << endl;
cout << "Memory cache type: " << device.globalMemCacheType() << endl;
cout << "Local Memory size: " << device.localMemSize() << endl;
cout << "Local Memory type: " << device.localMemType() << endl;
cout << "Max Clock frequency: " << device.maxClockFrequency() << endl;
}
}"><pre class="notranslate">std::vector< cv::ocl::PlatformInfo > platform_info;
<span class="pl-k">if</span> (!cv::ocl::haveOpenCL())
{
cout << <span class="pl-s"><span class="pl-pds">"</span>OpenCL is not available...<span class="pl-pds">"</span></span> << endl;
<span class="pl-c"><span class="pl-c">//</span>return;</span>
}
<span class="pl-en">cv::ocl::setUseOpenCL</span>(<span class="pl-c1">true</span>);
<span class="pl-en">ocl::getPlatfomsInfo</span>(platform_info);
<span class="pl-k">for</span>(<span class="pl-k">int</span> i = <span class="pl-c1">0</span>; i < platform_info.size(); i++){
ocl::PlatformInfo sdk = platform_info.<span class="pl-c1">at</span>(i);
<span class="pl-k">for</span> (<span class="pl-k">int</span> j = <span class="pl-c1">0</span>; j < sdk.<span class="pl-c1">deviceNumber</span>(); j++) {
ocl::Device device;
sdk.<span class="pl-c1">getDevice</span>(device, j);
cout << <span class="pl-s"><span class="pl-pds">"</span><span class="pl-cce">\n\n</span>*********************<span class="pl-cce">\n</span> Device <span class="pl-pds">"</span></span> << i + <span class="pl-c1">1</span> << endl;
cout << <span class="pl-s"><span class="pl-pds">"</span>Vendor ID: <span class="pl-pds">"</span></span> << device.<span class="pl-c1">vendorID</span>() << endl;
cout << <span class="pl-s"><span class="pl-pds">"</span>Vendor name: <span class="pl-pds">"</span></span> << device.<span class="pl-c1">vendorName</span>() << endl;
cout << <span class="pl-s"><span class="pl-pds">"</span>Name: <span class="pl-pds">"</span></span> << device.<span class="pl-c1">name</span>() << endl;
cout << <span class="pl-s"><span class="pl-pds">"</span>Driver version: <span class="pl-pds">"</span></span> << device.<span class="pl-c1">driverVersion</span>() << endl;
cout << <span class="pl-s"><span class="pl-pds">"</span>available: <span class="pl-pds">"</span></span> << device.<span class="pl-c1">available</span>() << endl;
<span class="pl-k">if</span> (device.<span class="pl-c1">isAMD</span>()) cout << <span class="pl-s"><span class="pl-pds">"</span>Is an AMD device<span class="pl-pds">"</span></span> << endl;
<span class="pl-k">if</span> (device.<span class="pl-c1">isIntel</span>()) cout << <span class="pl-s"><span class="pl-pds">"</span>Is a Intel device<span class="pl-pds">"</span></span> << endl;
cout << <span class="pl-s"><span class="pl-pds">"</span>Global Memory size: <span class="pl-pds">"</span></span> << device.<span class="pl-c1">globalMemSize</span>() << endl;
cout << <span class="pl-s"><span class="pl-pds">"</span>Memory cache size: <span class="pl-pds">"</span></span> << device.<span class="pl-c1">globalMemCacheSize</span>() << endl;
cout << <span class="pl-s"><span class="pl-pds">"</span>Memory cache type: <span class="pl-pds">"</span></span> << device.<span class="pl-c1">globalMemCacheType</span>() << endl;
cout << <span class="pl-s"><span class="pl-pds">"</span>Local Memory size: <span class="pl-pds">"</span></span> << device.<span class="pl-c1">localMemSize</span>() << endl;
cout << <span class="pl-s"><span class="pl-pds">"</span>Local Memory type: <span class="pl-pds">"</span></span> << device.<span class="pl-c1">localMemType</span>() << endl;
cout << <span class="pl-s"><span class="pl-pds">"</span>Max Clock frequency: <span class="pl-pds">"</span></span> << device.<span class="pl-c1">maxClockFrequency</span>() << endl;
}
}</pre></div>
<p dir="auto">output is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="*********************
Device 1
Vendor ID: 2
Vendor name: Intel(R) Corporation
Name: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
Driver version: 1.2.0.37
available: 1
Is a Intel device
Global Memory size: 16782102528
Memory cache size: 262144
Memory cache type: 2
Local Memory size: 32768
Local Memory type: 2
Max Clock frequency: 3400
*********************
Device 2
Vendor ID: 3
Vendor name: NVIDIA Corporation
Name: GeForce GTX 1080
Driver version: 384.130
available: 1
Global Memory size: 8499691520
Memory cache size: 327680
Memory cache type: 2
Local Memory size: 49152
Local Memory type: 1
Max Clock frequency: 1733"><pre class="notranslate"><code class="notranslate">*********************
Device 1
Vendor ID: 2
Vendor name: Intel(R) Corporation
Name: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
Driver version: 1.2.0.37
available: 1
Is a Intel device
Global Memory size: 16782102528
Memory cache size: 262144
Memory cache type: 2
Local Memory size: 32768
Local Memory type: 2
Max Clock frequency: 3400
*********************
Device 2
Vendor ID: 3
Vendor name: NVIDIA Corporation
Name: GeForce GTX 1080
Driver version: 384.130
available: 1
Global Memory size: 8499691520
Memory cache size: 327680
Memory cache type: 2
Local Memory size: 49152
Local Memory type: 1
Max Clock frequency: 1733
</code></pre></div>
<p dir="auto">OpenCL detect the gpu, this is good. But when run this,</p>
<div class="highlight highlight-source-c++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="cv::ocl::Context context;
if (!context.create(cv::ocl::Device::TYPE_ALL))
{
cout << "Failed creating the context..." << endl;
//return;
}
cout << "**********************"<<endl;
cout << context.ndevices() << " GPU devices are detected." << endl; //This bit provides an overview of the OpenCL devices you have in your computer
for (int i = 0; i < context.ndevices(); i++)
{
cv::ocl::Device device = context.device(i);
cout << "name: " << device.name() << endl;
cout << "available: " << device.available() << endl;
cout << "imageSupport: " << device.imageSupport() << endl;
cout << "OpenCL_C_Version: " << device.OpenCL_C_Version() << endl;
cout << endl;
}
"><pre class="notranslate">cv::ocl::Context context;
<span class="pl-k">if</span> (!context.create(cv::ocl::Device::TYPE_ALL))
{
cout << <span class="pl-s"><span class="pl-pds">"</span>Failed creating the context...<span class="pl-pds">"</span></span> << endl;
<span class="pl-c"><span class="pl-c">//</span>return;</span>
}
cout << <span class="pl-s"><span class="pl-pds">"</span>**********************<span class="pl-pds">"</span></span><<endl;
cout << context.ndevices() << <span class="pl-s"><span class="pl-pds">"</span> GPU devices are detected.<span class="pl-pds">"</span></span> << endl; <span class="pl-c"><span class="pl-c">//</span>This bit provides an overview of the OpenCL devices you have in your computer</span>
<span class="pl-k">for</span> (<span class="pl-k">int</span> i = <span class="pl-c1">0</span>; i < context.ndevices(); i++)
{
cv::ocl::Device device = context.<span class="pl-c1">device</span>(i);
cout << <span class="pl-s"><span class="pl-pds">"</span>name: <span class="pl-pds">"</span></span> << device.<span class="pl-c1">name</span>() << endl;
cout << <span class="pl-s"><span class="pl-pds">"</span>available: <span class="pl-pds">"</span></span> << device.<span class="pl-c1">available</span>() << endl;
cout << <span class="pl-s"><span class="pl-pds">"</span>imageSupport: <span class="pl-pds">"</span></span> << device.<span class="pl-c1">imageSupport</span>() << endl;
cout << <span class="pl-s"><span class="pl-pds">"</span>OpenCL_C_Version: <span class="pl-pds">"</span></span> << device.<span class="pl-c1">OpenCL_C_Version</span>() << endl;
cout << endl;
}
</pre></div>
<p dir="auto">In the output only detect the intel gpu.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="**********************
1 GPU devices are detected.
name: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
available: 1
imageSupport: 1
OpenCL_C_Version: OpenCL C 2.0 "><pre class="notranslate"><code class="notranslate">**********************
1 GPU devices are detected.
name: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
available: 1
imageSupport: 1
OpenCL_C_Version: OpenCL C 2.0
</code></pre></div>
<p dir="auto">I don't know how to <strong>set openCL for use Nvidia Gpu</strong> and after that check if dnnTarget is using it in forward.</p>
<h5 dir="auto">Steps to reproduce</h5> | 0 |
<p dir="auto">I'm new to less but when I try and compile the less files, I get an error on line 578 of the mixins file. Any ideas what might be going wrong?</p>
<p dir="auto">Thanks,<br>
Andy</p> | <p dir="auto">I got this error on line <code class="notranslate">578</code> when i try to compile mixins.less file (latest<code class="notranslate">master</code>) :</p>
<div class="highlight highlight-source-css-less notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" .spanX (@index) when (@index > 0) {
.span{@index} { .span(@index); } // Here is the error
.spanX(@index - 1);
}"><pre class="notranslate"> <span class="pl-e">.spanX</span> (<span class="pl-smi">@index</span>) <span class="pl-k">when</span> (<span class="pl-smi">@index</span> <span class="pl-k">></span> <span class="pl-c1">0</span>) {
<span class="pl-e">.span</span>{<span class="pl-smi">@index</span>} { <span class="pl-e">.span</span>(<span class="pl-smi">@index</span>); } <span class="pl-c"><span class="pl-c">//</span> Here is the error</span>
<span class="pl-e">.spanX</span>(<span class="pl-smi">@index</span> <span class="pl-k">-</span> <span class="pl-c1">1</span>);
}</pre></div>
<p dir="auto">I tried to compile with differents tools (<a href="http://less2css.org/" rel="nofollow">http://less2css.org/</a>, lessphp...) but it always return the same error.</p> | 1 |
<p dir="auto">Hello,</p>
<p dir="auto">please can you add an <code class="notranslate">exclude_from_weight_decay</code> parameter to AdamW? Some parameters during weight decay must be excluded.</p>
<p dir="auto">For more details please look <a href="https://github.com/tensorflow/addons/issues/2681" data-hovercard-type="issue" data-hovercard-url="/tensorflow/addons/issues/2681/hovercard">here</a>.</p>
<p dir="auto">Thanks a lot.<br>
Have a nice day.</p> | <p dir="auto">Hello,</p>
<p dir="auto">Would be interested to port <code class="notranslate">RectifiedAdam</code> from <strong>tensorflow/addon</strong> with addding exclude_from_weight_decay extension?</p>
<p dir="auto">For more details <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1161977617" data-permission-text="Title is private" data-url="https://github.com/tensorflow/addons/issues/2681" data-hovercard-type="issue" data-hovercard-url="/tensorflow/addons/issues/2681/hovercard" href="https://github.com/tensorflow/addons/issues/2681">tensorflow/addons#2681</a></p>
<p dir="auto">Thanks a lot.<br>
Have a nice day.</p> | 1 |
<p dir="auto">First I just indexed 2 documents:<br>
curl -XPUT <a href="http://192.168.0.118:9200/test/company/apple" rel="nofollow">http://192.168.0.118:9200/test/company/apple</a> -d '{data:"Apple corp"}'<br>
curl -XPUT <a href="http://192.168.0.118:9200/test/fruit/apple" rel="nofollow">http://192.168.0.118:9200/test/fruit/apple</a> -d '{data:"Just red apple"}'</p>
<p dir="auto">According to example above we have test index with 2 documents (both with "apple" id) in different types.<br>
When we make curl -XGET <a href="http://192.168.0.118:9200/test/_mget?pretty" rel="nofollow">http://192.168.0.118:9200/test/_mget?pretty</a> -d '{ids:["apple","apple"]}'<br>
We see this:<br>
{<br>
"docs" : [ {<br>
"_index" : "test",<br>
"_type" : "fruit",<br>
"_id" : "apple",<br>
"_version" : 1,<br>
"found" : true, "_source" : {data:"Just red apple"}<br>
}, {<br>
"_index" : "test",<br>
"_type" : "fruit",<br>
"_id" : "apple",<br>
"_version" : 1,<br>
"found" : true, "_source" : {data:"Just red apple"}<br>
} ]<br>
}</p>
<p dir="auto">As you can see documents are duplicated.<br>
So if we request curl -XGET <a href="http://192.168.0.118:9200/test/_mget?pretty" rel="nofollow">http://192.168.0.118:9200/test/_mget?pretty</a> -d '{ids:["apple","apple","apple"]}' we will see 3 documents in result set and so on.</p>
<p dir="auto">I think the right way to resolve this issue is to ignore duplicate identificators in "ids" parameter.</p> | <p dir="auto">First I just indexed 2 documents:<br>
curl -XPUT <a href="http://192.168.0.118:9200/test/company/apple" rel="nofollow">http://192.168.0.118:9200/test/company/apple</a> -d '{data:"Apple corp"}'<br>
curl -XPUT <a href="http://192.168.0.118:9200/test/fruit/apple" rel="nofollow">http://192.168.0.118:9200/test/fruit/apple</a> -d '{data:"Just red apple"}'</p>
<p dir="auto">As you can see, they have same id and placed in same index,but different types.<br>
Ok, next I perform multi get request:</p>
<p dir="auto">curl -XGET <a href="http://192.168.0.118:9200/test/_mget?pretty" rel="nofollow">http://192.168.0.118:9200/test/_mget?pretty</a> -d '{ids:["apple"]}'</p>
<p dir="auto">Response:</p>
<p dir="auto">{<br>
"docs" : [ {<br>
"_index" : "test",<br>
"_type" : "fruit",<br>
"_id" : "apple",<br>
"_version" : 1,<br>
"found" : true, "_source" : {data:"Just red apple"}<br>
} ]<br>
}</p>
<p dir="auto">As you can see only one document returned. Why not both? I find such behavior very ambiguous. I think if we request whole index, so all documents with given id should be returned regardless of type.</p> | 1 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.3-SNAPSHOT</li>
<li>Operating System version: macOs</li>
<li>Java version: JDK 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>Assume Demo interface have sayHello and sayHi method.</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<dubbo:reference id="demoService" interface="com.ctrip.Demo" timeout="1000">
<dubbo:method name="sayHello">
<dubbo:parameter key="timeout" value="800"/>
</dubbo:method>
</dubbo:reference>"><pre class="notranslate"><code class="notranslate"><dubbo:reference id="demoService" interface="com.ctrip.Demo" timeout="1000">
<dubbo:method name="sayHello">
<dubbo:parameter key="timeout" value="800"/>
</dubbo:method>
</dubbo:reference>
</code></pre></div>
<ol start="2" dir="auto">
<li>Make a sync call to sayHello, the timeout is 800 but not 1000. We have not get method timeout from the url.</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="asyncResult.get(getUrl().getParameter(TIMEOUT_KEY, DEFAULT_TIMEOUT), TimeUnit.MILLISECONDS);"><pre class="notranslate"><code class="notranslate">asyncResult.get(getUrl().getParameter(TIMEOUT_KEY, DEFAULT_TIMEOUT), TimeUnit.MILLISECONDS);
</code></pre></div>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">The timeout should be 1000 for sayHello.</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">The timeout is 800 for sayHello.</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div> | <ul dir="auto">
<li>[√] I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li>[√] I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.5.7</li>
<li>Operating System version: win10</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Step to reproduce this issue</h3>
<p dir="auto">有A、B两个服务,相互依赖时会造成事务失效,简要代码如下:</p>
<blockquote>
<p dir="auto">AServiceImpl</p>
</blockquote>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@Service(interfaceClass=IAService.class,group="test",version="1.0.0")
@Transactional
public class AServiceImpl implements IAService {
@Autowired
private ITestService testService;
@Autowired
private IBService bService;
@Override
public void test(String string) {
TestEntity testEntity = new TestEntity();
testEntity.setTest("A-"+string);
testEntity = testService.save(testEntity);
if(!Objects.isNull(testEntity.getId())){
throw new RuntimeException("AService test....a...");
}
}
}"><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">Service</span>(<span class="pl-s1">interfaceClass</span>=<span class="pl-smi">IAService</span>.<span class="pl-k">class</span>,<span class="pl-s1">group</span>=<span class="pl-s">"test"</span>,<span class="pl-s1">version</span>=<span class="pl-s">"1.0.0"</span>)
<span class="pl-c1">@</span><span class="pl-c1">Transactional</span>
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">AServiceImpl</span> <span class="pl-k">implements</span> <span class="pl-smi">IAService</span> {
<span class="pl-c1">@</span><span class="pl-c1">Autowired</span>
<span class="pl-k">private</span> <span class="pl-smi">ITestService</span> <span class="pl-s1">testService</span>;
<span class="pl-c1">@</span><span class="pl-c1">Autowired</span>
<span class="pl-k">private</span> <span class="pl-smi">IBService</span> <span class="pl-s1">bService</span>;
<span class="pl-c1">@</span><span class="pl-c1">Override</span>
<span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">test</span>(<span class="pl-smi">String</span> <span class="pl-s1">string</span>) {
<span class="pl-smi">TestEntity</span> <span class="pl-s1">testEntity</span> = <span class="pl-k">new</span> <span class="pl-smi">TestEntity</span>();
<span class="pl-s1">testEntity</span>.<span class="pl-en">setTest</span>(<span class="pl-s">"A-"</span>+<span class="pl-s1">string</span>);
<span class="pl-s1">testEntity</span> = <span class="pl-s1">testService</span>.<span class="pl-en">save</span>(<span class="pl-s1">testEntity</span>);
<span class="pl-k">if</span>(!<span class="pl-smi">Objects</span>.<span class="pl-en">isNull</span>(<span class="pl-s1">testEntity</span>.<span class="pl-en">getId</span>())){
<span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-smi">RuntimeException</span>(<span class="pl-s">"AService test....a..."</span>);
}
}
}</pre></div>
<blockquote>
<p dir="auto">BServiceImpl</p>
</blockquote>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@Service(interfaceClass=IBService.class,group="test",version="1.0.0")
@Transactional
public class BServiceImpl implements IBService {
@Autowired
private ITestService testService;
@Autowired
private IAService aService;//相互引用,但实际并未使用
@Override
public void test(String string) {
TestEntity testEntity = new TestEntity();
testEntity.setTest("B-"+string);
testEntity = testService.save(testEntity);
if(!Objects.isNull(testEntity.getId())){
throw new RuntimeException("BService test...b....");
}
}
}"><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">Service</span>(<span class="pl-s1">interfaceClass</span>=<span class="pl-smi">IBService</span>.<span class="pl-k">class</span>,<span class="pl-s1">group</span>=<span class="pl-s">"test"</span>,<span class="pl-s1">version</span>=<span class="pl-s">"1.0.0"</span>)
<span class="pl-c1">@</span><span class="pl-c1">Transactional</span>
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">BServiceImpl</span> <span class="pl-k">implements</span> <span class="pl-smi">IBService</span> {
<span class="pl-c1">@</span><span class="pl-c1">Autowired</span>
<span class="pl-k">private</span> <span class="pl-smi">ITestService</span> <span class="pl-s1">testService</span>;
<span class="pl-c1">@</span><span class="pl-c1">Autowired</span>
<span class="pl-k">private</span> <span class="pl-smi">IAService</span> <span class="pl-s1">aService</span>;<span class="pl-c">//相互引用,但实际并未使用</span>
<span class="pl-c1">@</span><span class="pl-c1">Override</span>
<span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">test</span>(<span class="pl-smi">String</span> <span class="pl-s1">string</span>) {
<span class="pl-smi">TestEntity</span> <span class="pl-s1">testEntity</span> = <span class="pl-k">new</span> <span class="pl-smi">TestEntity</span>();
<span class="pl-s1">testEntity</span>.<span class="pl-en">setTest</span>(<span class="pl-s">"B-"</span>+<span class="pl-s1">string</span>);
<span class="pl-s1">testEntity</span> = <span class="pl-s1">testService</span>.<span class="pl-en">save</span>(<span class="pl-s1">testEntity</span>);
<span class="pl-k">if</span>(!<span class="pl-smi">Objects</span>.<span class="pl-en">isNull</span>(<span class="pl-s1">testEntity</span>.<span class="pl-en">getId</span>())){
<span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-smi">RuntimeException</span>(<span class="pl-s">"BService test...b...."</span>);
}
}
}</pre></div>
<blockquote>
<p dir="auto">test</p>
</blockquote>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@RunWith(SpringRunner.class)
@SpringBootTest
public class SpringbootDubboDemoApplicationTests {
@Autowired
private ITestService testService;
@Reference(group = "test", version = "1.0.0")
private IAService iaService;
@Reference(group = "test", version = "1.0.0")
private IBService ibService;
@Test
public void testDubbo(){
System.out.println("start......");
try {
iaService.test("aaaa");
}catch (Exception e){
e.printStackTrace();
}
try {
ibService.test("bbbbb");
}catch (Exception e){
e.printStackTrace();
}
}
}"><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">RunWith</span>(<span class="pl-smi">SpringRunner</span>.<span class="pl-k">class</span>)
<span class="pl-c1">@</span><span class="pl-c1">SpringBootTest</span>
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">SpringbootDubboDemoApplicationTests</span> {
<span class="pl-c1">@</span><span class="pl-c1">Autowired</span>
<span class="pl-k">private</span> <span class="pl-smi">ITestService</span> <span class="pl-s1">testService</span>;
<span class="pl-c1">@</span><span class="pl-c1">Reference</span>(<span class="pl-s1">group</span> = <span class="pl-s">"test"</span>, <span class="pl-s1">version</span> = <span class="pl-s">"1.0.0"</span>)
<span class="pl-k">private</span> <span class="pl-smi">IAService</span> <span class="pl-s1">iaService</span>;
<span class="pl-c1">@</span><span class="pl-c1">Reference</span>(<span class="pl-s1">group</span> = <span class="pl-s">"test"</span>, <span class="pl-s1">version</span> = <span class="pl-s">"1.0.0"</span>)
<span class="pl-k">private</span> <span class="pl-smi">IBService</span> <span class="pl-s1">ibService</span>;
<span class="pl-c1">@</span><span class="pl-c1">Test</span>
<span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">testDubbo</span>(){
<span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">"start......"</span>);
<span class="pl-k">try</span> {
<span class="pl-s1">iaService</span>.<span class="pl-en">test</span>(<span class="pl-s">"aaaa"</span>);
}<span class="pl-k">catch</span> (<span class="pl-smi">Exception</span> <span class="pl-s1">e</span>){
<span class="pl-s1">e</span>.<span class="pl-en">printStackTrace</span>();
}
<span class="pl-k">try</span> {
<span class="pl-s1">ibService</span>.<span class="pl-en">test</span>(<span class="pl-s">"bbbbb"</span>);
}<span class="pl-k">catch</span> (<span class="pl-smi">Exception</span> <span class="pl-s1">e</span>){
<span class="pl-s1">e</span>.<span class="pl-en">printStackTrace</span>();
}
}
}</pre></div>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">正常执行过后,事务应该回滚,数据库中没有保存数据</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">实际结果,a服务执行,数据库中存在记录</p>
<p dir="auto">A-aaaa 被插入数据库</p>
<p dir="auto">当注释掉A/B的循环依赖时,结果正常,数据库中没有数据</p>
<p dir="auto">详细代码见:<a href="https://github.com/softxiang/springboot-dubbo-demo">https://github.com/softxiang/springboot-dubbo-demo</a></p>
<p dir="auto">另有一个问题如下:<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/service/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/service">@service</a>(interfaceClass=IAService.class,group="test",version="1.0.0")<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/transactional/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/transactional">@transactional</a><br>
public class AServiceImpl implements IAService</p>
<p dir="auto">此种情况定义了一个dubbo service,是否还需要spring扫描这个service 看代码情况是不需要spring再做相应操作,但看网上很多文章包括issues中依然有人提类似问题 <a href="https://github.com/apache/incubator-dubbo/issues/2093" data-hovercard-type="issue" data-hovercard-url="/apache/dubbo/issues/2093/hovercard">#2093</a><br>
一个服务既是dubbo服务又是本地服务时,是否只需要注册为dubbo的service即可?</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Autowired/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Autowired">@Autowired</a><br>
private IBService bService;</p>
<p dir="auto">是否会自动区分本地service调用 还是dubbo service?</p> | 0 |
<p dir="auto">Is it possible to add option batch_first = True for MultiheadAttention and transformer modules like it is done for RNN ?<br>
Batch x Sequence x Embedding<br>
I find it more understandable and intuitive when batch_first is true</p> | <h2 dir="auto">🚀 Feature</h2>
<p dir="auto">Like recurrent nets (nn.RNN, nn.GRU, nn.LSTM etc) nn.Transformer is missing <strong>batch_first</strong> defualt parameter</p>
<h2 dir="auto">Motivation</h2>
<p dir="auto">torchtext BuckterIteror also has batch_first default parameter hence if nn.Transformer would have batch_first, it will save the dimension permutation</p>
<h2 dir="auto">Pitch</h2>
<p dir="auto">A conditional statement inside the nn.Transformer's forward method to check whether batch_first is True or not we can permute inside the nn.Transformer module if required</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/albanD/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/albanD">@albanD</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mruberry/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mruberry">@mruberry</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zhangguanheng66/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zhangguanheng66">@zhangguanheng66</a></p> | 1 |
<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">When the <code class="notranslate">title</code> tag is created in a sub-component inside the <code class="notranslate">Head</code> tag it get's set to nothing after the client side bundle takes over. When disabling the JS in the devtools you can see that when the SSR code is used the <code class="notranslate">title</code> tag is used correctly.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Use the code below, load up the index page and you will see the title change from <code class="notranslate">My title is set here</code> to an empty string when the client side bundle takes over.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// Pages/index.js
import React from 'react';
import Head from "next/head";
import MetaTags from "./../components/MetaTags";
export default () => (
<Head>
<MetaTags />
</Head>
);
// components/MetaTags.js
import React, { Fragment } from 'react';
export default () => (
<Fragment>
<title>My title is set here</title>
</Fragment>
);"><pre class="notranslate"><code class="notranslate">// Pages/index.js
import React from 'react';
import Head from "next/head";
import MetaTags from "./../components/MetaTags";
export default () => (
<Head>
<MetaTags />
</Head>
);
// components/MetaTags.js
import React, { Fragment } from 'react';
export default () => (
<Fragment>
<title>My title is set here</title>
</Fragment>
);
</code></pre></div>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Expect the client side code to behave like the SSR code when nesting a <code class="notranslate">title</code> tag in the <code class="notranslate">Head</code> component.</p>
<h2 dir="auto">Screenshots</h2>
<p dir="auto"><strong>Example of loading the page from a new tab</strong><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17417414/48201646-0fbb4a00-e363-11e8-9cdf-c2136d8d06fe.gif"><img src="https://user-images.githubusercontent.com/17417414/48201646-0fbb4a00-e363-11e8-9cdf-c2136d8d06fe.gif" alt="title tag" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Screenshot of DOM tree (JS turned off via Chrome devtools)</strong><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17417414/48201720-3e392500-e363-11e8-8242-6a67558762ea.png"><img src="https://user-images.githubusercontent.com/17417414/48201720-3e392500-e363-11e8-8242-6a67558762ea.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Screenshot of DOM tree (JS turned on)</strong><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17417414/48201741-54df7c00-e363-11e8-95f1-82f37e7b9d1b.png"><img src="https://user-images.githubusercontent.com/17417414/48201741-54df7c00-e363-11e8-95f1-82f37e7b9d1b.png" alt="image" style="max-width: 100%;"></a></p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>Version of Next.js: <code class="notranslate">7.0.2</code></li>
</ul>
<h2 dir="auto">Additional information</h2>
<p dir="auto">When putting the <code class="notranslate">title</code> tag directly in the <code class="notranslate">Head</code> component it works as expected</p> | <h1 dir="auto">Bug report</h1>
<p dir="auto">When using <code class="notranslate">React.Fragment</code> or an<code class="notranslate">Array</code> as a child of the <code class="notranslate">next/head</code> component, all the tags that are inside of them are not being rendered/parsed correctly into the DOM.</p>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">I have an use case where I need to create a component that wraps head elements.</p>
<p dir="auto">This component lives in a repository that is <code class="notranslate">agnostic</code> to NextJS, so I cannot encapsulate those head elements with the Head component provided by <code class="notranslate">next/head</code> directly.</p>
<p dir="auto">Currently I'm returning those elements wrapped by a React.Fragment element, so it looks something like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<React.Fragment>
<title>{props.title}</title>
<meta name="description" content={props.description} />
</React.Fragment>"><pre class="notranslate"><code class="notranslate"><React.Fragment>
<title>{props.title}</title>
<meta name="description" content={props.description} />
</React.Fragment>
</code></pre></div>
<p dir="auto">And in the repository where I'm using NextJS, I'm using that component like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<div>
<Head> // This comes from next/head
<ComponentThatRendersHeadTags title="Title" description="description" />
</Head>
...
</div>"><pre class="notranslate"><code class="notranslate"><div>
<Head> // This comes from next/head
<ComponentThatRendersHeadTags title="Title" description="description" />
</Head>
...
</div>
</code></pre></div>
<p dir="auto">However, when I mount that component and go to the head tag in my DOM, I can see that the title tag is being rendered with empty content (looks something like this: <code class="notranslate"><title></title></code> and the meta tags are being rendered correctly but they don't have the <code class="notranslate">next-head</code> class that should be applied to them (don't know if this can cause problems when using Links or the Router itself).</p>
<p dir="auto">I'm currently doing a workaround to this where I'm sending the next/head component as a prop to the component rendering the tags, so it looks something like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const { WrapperComponent } = props
return (
<WrapperComponent>
<title>{props.title}</title>
<meta name="description" content={props.description} />
</WrapperComponent>
)"><pre class="notranslate"><code class="notranslate">const { WrapperComponent } = props
return (
<WrapperComponent>
<title>{props.title}</title>
<meta name="description" content={props.description} />
</WrapperComponent>
)
</code></pre></div>
<p dir="auto">And this approach is working correctly, filling the title tag with content and applying the <code class="notranslate">next-head</code> class to all of them.</p>
<p dir="auto">P.S.: I actually don't know if this behavior of not accepting React.Fragment in Head is expected <g-emoji class="g-emoji" alias="sweat_smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f605.png">😅</g-emoji></p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Even though the workaround is working correctly, it would be cool if the next/head component supports <code class="notranslate">React.Fragment</code> or even an <code class="notranslate">Array</code> as a child.</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: macOS</li>
<li>Browser (if applies): Chrome</li>
<li>Version of Next.js:<code class="notranslate">7.0.2</code></li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">Heys guys, I have been using NextJS for over a year now and I really love it ❤️<br>
Keep the hard work <g-emoji class="g-emoji" alias="muscle" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4aa.png">💪</g-emoji> thanks for everything <g-emoji class="g-emoji" alias="smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f604.png">😄</g-emoji></p> | 1 |
<h3 dir="auto">What problem does this feature solve?</h3>
<p dir="auto">I am trying to integrate Vue with Meteor Blaze and am working on rendering of Vue components from Blaze templates. I would like to programmatically create an Vue instance (<code class="notranslate">new Vue(...)</code>) and pass it props and args which would be equivalent to doing <code class="notranslate"><vue-component :prop="propValue" :arg="argValue"></code>. So an object of key/values which would then be mapped to props, if keys are among props, or be set as element attributes otherwise. But the important part is to also be able to update all of them afterwards. So if any of the props or args change, allowing to call a function to update them would be great.</p>
<h3 dir="auto">What does the proposed API look like?</h3>
<p dir="auto">I propose that <code class="notranslate">propData</code> could be a function. So that I could provide a reactive function which would be used to populate both props and args (so any keys returned from the function which are not props would become args).</p>
<p dir="auto">Alternatively. we could have <code class="notranslate">vm.$propsUpdate</code> function which I could run to update props and args in a more imperative way.</p> | <h3 dir="auto">Version</h3>
<p dir="auto">2.6.14</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://codesandbox.io/s/gallant-feather-wxyot?file=/src/my-element.js" rel="nofollow">codesandbox.io</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">View the codesandbox render result</p>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">The custom element render the json content</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">The custom element render "[object Object]"</p>
<hr>
<p dir="auto">Accorading to source code:<br>
</p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/vuejs/vue/blob/0603ff695d2f41286239298210113cbe2b209e28/src/platforms/web/runtime/modules/dom-props.js#L49">vue/src/platforms/web/runtime/modules/dom-props.js</a>
</p>
<p class="mb-0 color-fg-muted">
Line 49
in
<a data-pjax="true" class="commit-tease-sha" href="/vuejs/vue/commit/0603ff695d2f41286239298210113cbe2b209e28">0603ff6</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L49" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="49"></td>
<td id="LC49" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">elm</span><span class="pl-kos">.</span><span class="pl-c1">value</span> <span class="pl-c1">=</span> <span class="pl-s1">strCur</span> </td>
</tr>
</tbody></table>
</div>
</div>
<br>
, any prop name 'value' on dom element will be stringified, but when using custom elements, the 'value' prop may be an object or number and it should not be stringified.<p></p> | 0 |
<p dir="auto">Using Typescript 1.7.3.</p>
<p dir="auto">Here is some sample code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var MainMenu:React.StatelessComponent<{}> = (props)=>(<div>
<h3>Main Menu</h3>
</div>);
var App:React.StatelessComponent<{children}> = ({children}) => (
<div >
<MainMenu/>
</div>
);"><pre class="notranslate"><code class="notranslate">var MainMenu:React.StatelessComponent<{}> = (props)=>(<div>
<h3>Main Menu</h3>
</div>);
var App:React.StatelessComponent<{children}> = ({children}) => (
<div >
<MainMenu/>
</div>
);
</code></pre></div>
<p dir="auto">The line containing <code class="notranslate"><MainMenu/></code> inside <code class="notranslate">App</code> will throw this error msg:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error:(5, 3) TS2605: JSX element type 'ReactElement<any>' is not a constructor function for JSX elements.
Property 'render' is missing in type 'ReactElement<any>'."><pre class="notranslate"><code class="notranslate">Error:(5, 3) TS2605: JSX element type 'ReactElement<any>' is not a constructor function for JSX elements.
Property 'render' is missing in type 'ReactElement<any>'.
</code></pre></div>
<p dir="auto">At first I thought this was <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="124864800" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/6349" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/6349/hovercard" href="https://github.com/microsoft/TypeScript/issues/6349">#6349</a> but even assigning a type to props in <code class="notranslate">MainMenu</code> doesnt help.</p> | <p dir="auto">Not that I want to do that. But just for creating a quick demo I did that and it fails to compile:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const Foo = (props:any) => <div/>;
const foo = <Foo/>; // Error : render is missing"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-smi">Foo</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">props</span>:<span class="pl-smi">any</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos"><</span><span class="pl-smi">div</span><span class="pl-kos"></span><span class="pl-c1">/</span>>;
<span class="pl-s1">const</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-kos"><</span><span class="pl-smi">Foo</span><span class="pl-kos"></span><span class="pl-c1">/</span>>; <span class="pl-c">// Error : render is missing</span></pre></div>
<p dir="auto">Of master from yesterday <g-emoji class="g-emoji" alias="rose" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f339.png">🌹</g-emoji></p> | 1 |
<p dir="auto"><em>Please make sure that this is a bug. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template</em></p>
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes</li>
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MacOS 10.14.4</li>
<li>TensorFlow installed from (source or binary): Binary from pip/PyPi</li>
<li>TensorFlow version (use command below): 1.13.1</li>
<li>Python version: 3.7</li>
<li>CUDA/cuDNN version: CPU only</li>
<li>GPU model and memory: MacPro integrated</li>
</ul>
<p dir="auto">You can collect some of this information using our environment capture <a href="https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh">script</a><br>
You can also obtain the TensorFlow version with<br>
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"</p>
<p dir="auto"><strong>Describe the current behavior</strong><br>
I have previously running code that explodes on import prior to any runtime execution. Reports the error above.</p>
<p dir="auto"><strong>Describe the expected behavior</strong><br>
This library needs to run and not choke on its own imports.</p>
<p dir="auto"><strong>Code to reproduce the issue</strong><br>
Provide a reproducible test case that is the bare minimum necessary to generate the problem.</p>
<p dir="auto"><strong>Other info / logs</strong><br>
Using TensorFlow backend.<br>
Traceback (most recent call last):<br>
File "/Users/raymond/Depot/ai-worker/duplicate_ai/test.py", line 1, in <br>
from model import SiameseDream<br>
File "/Users/raymond/Depot/ai-worker/duplicate_ai/model.py", line 1, in <br>
import keras.backend as K<br>
File "/Users/raymond/env/ai-worker/lib/python3.7/site-packages/keras/<strong>init</strong>.py", line 3, in <br>
from . import utils<br>
File "/Users/raymond/env/ai-worker/lib/python3.7/site-packages/keras/utils/<strong>init</strong>.py", line 6, in <br>
from . import conv_utils<br>
File "/Users/raymond/env/ai-worker/lib/python3.7/site-packages/keras/utils/conv_utils.py", line 9, in <br>
from .. import backend as K<br>
File "/Users/raymond/env/ai-worker/lib/python3.7/site-packages/keras/backend/<strong>init</strong>.py", line 89, in <br>
from .tensorflow_backend import *<br>
File "/Users/raymond/env/ai-worker/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py", line 5, in <br>
import tensorflow as tf<br>
File "/Users/raymond/env/ai-worker/lib/python3.7/site-packages/tensorflow/<strong>init</strong>.py", line 24, in <br>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import<br>
File "/Users/raymond/env/ai-worker/lib/python3.7/site-packages/tensorflow/python/<strong>init</strong>.py", line 52, in <br>
from tensorflow.core.framework.graph_pb2 import *<br>
File "/Users/raymond/env/ai-worker/lib/python3.7/site-packages/tensorflow/core/framework/graph_pb2.py", line 15, in <br>
from tensorflow.core.framework import node_def_pb2 as tensorflow_dot_core_dot_framework_dot_node__def__pb2<br>
File "/Users/raymond/env/ai-worker/lib/python3.7/site-packages/tensorflow/core/framework/node_def_pb2.py", line 15, in <br>
from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2<br>
File "/Users/raymond/env/ai-worker/lib/python3.7/site-packages/tensorflow/core/framework/attr_value_pb2.py", line 15, in <br>
from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2<br>
File "/Users/raymond/env/ai-worker/lib/python3.7/site-packages/tensorflow/core/framework/tensor_pb2.py", line 15, in <br>
from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2<br>
File "/Users/raymond/env/ai-worker/lib/python3.7/site-packages/tensorflow/core/framework/resource_handle_pb2.py", line 22, in <br>
serialized_pb=_b('\n/tensorflow/core/framework/resource_handle.proto\x12\ntensorflow"r\n\x13ResourceHandleProto\x12\x0e\n\x06\x64\x65vice\x18\x01 \x01(\t\x12\x11\n\tcontainer\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x11\n\thash_code\x18\x04 \x01(\x04\x12\x17\n\x0fmaybe_type_name\x18\x05 \x01(\tBn\n\x18org.tensorflow.frameworkB\x0eResourceHandleP\x01Z=github.com/tensorflow/tensorflow/tensorflow/go/core/framework\xf8\x01\x01\x62\x06proto3')<br>
TypeError: <strong>init</strong>() got an unexpected keyword argument 'serialized_options'</p> | <p dir="auto">Would you like to <a href="https://github.com/tensorflow/tensorflow/blob/31849e0a44a1c9c99c4524a65c9ee90e80c41499/tensorflow/core/common_runtime/device.h#L35">replace any double quotes</a> by <a href="http://stackoverflow.com/questions/21593/what-is-the-difference-between-include-filename-and-include-filename" rel="nofollow">angle brackets around file names for include statements</a>?</p> | 0 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=nomadium" rel="nofollow">Miguel Landaeta</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7351?redirect=false" rel="nofollow">SPR-7351</a></strong> and commented</p>
<p dir="auto">The Debian Java team is preparing a package for Spring Framework 3.0.<br>
<a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=575877" rel="nofollow">http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=575877</a></p>
<p dir="auto">However, before this can be completed, all the dependences of Spring have to be packaged. In particular, we found that spring-build (<a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586523" rel="nofollow">http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586523</a>) doesn't include a file indicating the license and the copyright of this subproject.</p>
<p dir="auto">Inspecting the source code available at <a href="https://src.springframework.org/svn/spring-build/trunk/" rel="nofollow">https://src.springframework.org/svn/spring-build/trunk/</a>, we found many files without a clear license, some are licensed under GPL, others are licensed under Apache 2.0, etc.</p>
<p dir="auto">It's very important to have unambiguous copyright and license conditions for the Debian packages, otherwise they cannot be accepted and distributed.</p>
<p dir="auto">It would be very nice if you could provide a LICENSE file in the root directory of this subproject clearly indicating the license and the copyright statements for that software.</p>
<p dir="auto">Thanks in advance,</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0.4</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398106097" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12011" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12011/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12011">#12011</a> Debian : Spring Build system has no licence / copyright (<em><strong>"duplicates"</strong></em>)</li>
</ul> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=geniusgroup" rel="nofollow">G</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4396?redirect=false" rel="nofollow">SPR-4396</a></strong> and commented</p>
<p dir="auto">Autowiring failed when one of the bean contains factory-method (Static setter). Even we don't apply autowire in that bean, it will also crash the whole framework.</p>
<p dir="auto">Reference: <a href="http://forum.springframework.org/showthread.php?t=48399" rel="nofollow">http://forum.springframework.org/showthread.php?t=48399</a></p>
<p dir="auto">Partial XML:</p>
<p dir="auto"><?xml version="1.0" encoding="UTF-8"?></p>
<p dir="auto"><beans xmlns="<a href="http://www.springframework.org/schema/beans" rel="nofollow">http://www.springframework.org/schema/beans</a>"<br>
xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow">http://www.w3.org/2001/XMLSchema-instance</a>"<br>
xmlns:context="<a href="http://www.springframework.org/schema/context" rel="nofollow">http://www.springframework.org/schema/context</a>"<br>
xsi:schemaLocation="<a href="http://www.springframework.org/schema/beans" rel="nofollow">http://www.springframework.org/schema/beans</a> <a href="http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" rel="nofollow">http://www.springframework.org/schema/beans/spring-beans-2.5.xsd</a><br>
<a href="http://www.springframework.org/schema/context" rel="nofollow">http://www.springframework.org/schema/context</a> <a href="http://www.springframework.org/schema/context/spring-context-2.5.xsd%22%3E" rel="nofollow">http://www.springframework.org/schema/context/spring-context-2.5.xsd"></a></p>
<p dir="auto"><context:annotation-config /></p>
<p dir="auto"><bean id="hibernateUtil" class="com.foo.hibernate.HibernateUtil"<br>
factory-method="setSessionFactory"><br>
<constructor-arg ref="sessionFactory" /><br>
</bean><br>
</beans></p>
<p dir="auto">Java:<br>
package com.foo.hibernate;</p>
<p dir="auto">import org.hibernate.SessionFactory;</p>
<p dir="auto">public class HibernateUtil {</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="private static SessionFactory sessionFactory_;
public static SessionFactory getSessionFactory() { return sessionFactory_; }
public static void setSessionFactory(SessionFactory sessionFactory) { sessionFactory_ = sessionFactory; }"><pre class="notranslate"><code class="notranslate">private static SessionFactory sessionFactory_;
public static SessionFactory getSessionFactory() { return sessionFactory_; }
public static void setSessionFactory(SessionFactory sessionFactory) { sessionFactory_ = sessionFactory; }
</code></pre></div>
<p dir="auto">}</p>
<p dir="auto">Error:<br>
ERROR|14:45:57,234| ContextLoader:215 - Context initialization failed<br>
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateUtil' defined in ServletContext resource [/WEB-INF/conf/applicationContext-hibernate.xml]: Initialization of bean failed; nested exception is java.lang.NullPointerException<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:445)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)<br>
at java.security.AccessController.doPrivileged(Native Method)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)<br>
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)<br>
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:400)<br>
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:736)<br>
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)<br>
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)<br>
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)<br>
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)<br>
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)<br>
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)<br>
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)<br>
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)<br>
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)<br>
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)<br>
at org.apache.catalina.core.StandardService.start(StandardService.java:516)<br>
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)<br>
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br>
at java.lang.reflect.Method.invoke(Unknown Source)<br>
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)<br>
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)<br>
Caused by: java.lang.NullPointerException<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:876)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:437)<br>
... 28 more</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5.1</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398084830" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9045" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9045/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9045">#9045</a> Autowiring failed when one of the bean contains factory-method (<em><strong>"duplicates"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398084676" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9024" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9024/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9024">#9024</a> NPE in AbstractAutowireCapableBeanFactory#populateBean() if bean wrapper is null and InstantiationAwareBeanPostProcessor are registered (<em><strong>"duplicates"</strong></em>)</li>
</ul> | 0 |
<p dir="auto">The nomenclatures Bootstrap 3 relating to the sizes of the buttons remain the same Bootstrap 2. By placing <code class="notranslate">btn-xs</code> does not, however, put the <code class="notranslate">btn-mini</code> works perfectly.</p>
<p dir="auto">Look: <a href="http://jsfiddle.net/theus/jFsG7/2/" rel="nofollow">http://jsfiddle.net/theus/jFsG7/2/</a></p> | <p dir="auto">To increase/decrease the size of form controls, you can add the classes input-lg or input-sm (at least according to the website [http://getbootstrap.com/css/#forms] - which is the most consistent solution). In the css code, however, the classes are called input-large and input-small.</p> | 1 |
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.35.1</li>
<li>Operating System: Windows 10</li>
<li>Browser: Chrominum</li>
<li>Other info:</li>
</ul>
<p dir="auto"><strong>Config file</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { defineConfig, devices } from '@playwright/test';
import GlobalConstant from './commons/GlobalConstant';
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './tests',
/* Run tests in files in parallel */
timeout: GlobalConstant.testTimeout * 1000,
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: GlobalConstant.shortTimeout * 1000,
toHaveScreenshot: {
maxDiffPixelRatio: GlobalConstant.maxPixelDiffRatio,
threshold: 0.3
}
},
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: GlobalConstant.workers,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: GlobalConstant.mediumTimeout * 1000,
navigationTimeout: GlobalConstant.mediumTimeout * 1000,
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://127.0.0.1:3000',
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'off',
video: 'off',
screenshot: 'off',
headless: true,
userAgent: GlobalConstant.userAgent,
contextOptions: {
ignoreHTTPSErrors: true,
},
extraHTTPHeaders: {
'User-Agent': GlobalConstant.userAgent
}
},
/* Configure projects for major browsers */
projects: [
{
name: 'Desktop Edge',
snapshotPathTemplate: './screenshots/{testFilePath}/{arg}-Desktop{ext}',
use: {
...devices['Desktop Edge'],
channel: 'chrome',
browserName: 'chromium',
},
},
// {
// name: 'firefox',
// use: { ...devices['Desktop Firefox'] },
// },
// {
// name: 'webkit',
// use: { ...devices['Desktop Safari'] },
// },
/* Test against mobile viewports. */
{
name: 'Mobile Edge',
snapshotPathTemplate: './screenshots/{testFilePath}/{arg}-Mobile{ext}',
use: {
...devices['Pixel 5'],
channel: 'chrome',
browserName: 'chromium',
},
},
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },
/* Test against tablet viewports. */
{
name: 'Tablet Edge',
snapshotPathTemplate: './screenshots/{testFilePath}/{arg}-Tablet{ext}',
use: {
...devices['Galaxy Tab S4 landscape'],
channel: 'chrome',
browserName: 'chromium'
},
},
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },
/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { ..devices['Desktop Chrome'], channel: 'chrome' },
// },
],
/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// url: 'http://127.0.0.1:3000',
// reuseExistingServer: !process.env.CI,
// },
});
"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">defineConfig</span><span class="pl-kos">,</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-v">GlobalConstant</span> <span class="pl-k">from</span> <span class="pl-s">'./commons/GlobalConstant'</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Read environment variables from file.</span>
<span class="pl-c"> * https://github.com/motdotla/dotenv</span>
<span class="pl-c"> */</span>
<span class="pl-c">// require('dotenv').config();</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * See https://playwright.dev/docs/test-configuration.</span>
<span class="pl-c"> */</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-en">defineConfig</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">testDir</span>: <span class="pl-s">'./tests'</span><span class="pl-kos">,</span>
<span class="pl-c">/* Run tests in files in parallel */</span>
<span class="pl-c1">timeout</span>: <span class="pl-v">GlobalConstant</span><span class="pl-kos">.</span><span class="pl-c1">testTimeout</span> <span class="pl-c1">*</span> <span class="pl-c1">1000</span><span class="pl-kos">,</span>
<span class="pl-c1">expect</span>: <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Maximum time expect() should wait for the condition to be met.</span>
<span class="pl-c"> * For example in `await expect(locator).toHaveText();`</span>
<span class="pl-c"> */</span>
<span class="pl-c1">timeout</span>: <span class="pl-v">GlobalConstant</span><span class="pl-kos">.</span><span class="pl-c1">shortTimeout</span> <span class="pl-c1">*</span> <span class="pl-c1">1000</span><span class="pl-kos">,</span>
<span class="pl-c1">toHaveScreenshot</span>: <span class="pl-kos">{</span>
<span class="pl-c1">maxDiffPixelRatio</span>: <span class="pl-v">GlobalConstant</span><span class="pl-kos">.</span><span class="pl-c1">maxPixelDiffRatio</span><span class="pl-kos">,</span>
<span class="pl-c1">threshold</span>: <span class="pl-c1">0.3</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">fullyParallel</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-c">/* Fail the build on CI if you accidentally left test.only in the source code. */</span>
<span class="pl-c1">forbidOnly</span>: <span class="pl-c1">!</span><span class="pl-c1">!</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span><span class="pl-kos">,</span>
<span class="pl-c">/* Retry on CI only */</span>
<span class="pl-c1">retries</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-c1">2</span> : <span class="pl-c1">0</span><span class="pl-kos">,</span>
<span class="pl-c">/* Opt out of parallel tests on CI. */</span>
<span class="pl-c1">workers</span>: <span class="pl-v">GlobalConstant</span><span class="pl-kos">.</span><span class="pl-c1">workers</span><span class="pl-kos">,</span>
<span class="pl-c">/* Reporter to use. See https://playwright.dev/docs/test-reporters */</span>
<span class="pl-c1">reporter</span>: <span class="pl-s">'html'</span><span class="pl-kos">,</span>
<span class="pl-c">/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */</span>
<span class="pl-c1">use</span>: <span class="pl-kos">{</span>
<span class="pl-c">/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */</span>
<span class="pl-c1">actionTimeout</span>: <span class="pl-v">GlobalConstant</span><span class="pl-kos">.</span><span class="pl-c1">mediumTimeout</span> <span class="pl-c1">*</span> <span class="pl-c1">1000</span><span class="pl-kos">,</span>
<span class="pl-c1">navigationTimeout</span>: <span class="pl-v">GlobalConstant</span><span class="pl-kos">.</span><span class="pl-c1">mediumTimeout</span> <span class="pl-c1">*</span> <span class="pl-c1">1000</span><span class="pl-kos">,</span>
<span class="pl-c">/* Base URL to use in actions like `await page.goto('/')`. */</span>
<span class="pl-c">// baseURL: 'http://127.0.0.1:3000',</span>
<span class="pl-c">/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */</span>
<span class="pl-c1">trace</span>: <span class="pl-s">'off'</span><span class="pl-kos">,</span>
<span class="pl-c1">video</span>: <span class="pl-s">'off'</span><span class="pl-kos">,</span>
<span class="pl-c1">screenshot</span>: <span class="pl-s">'off'</span><span class="pl-kos">,</span>
<span class="pl-c1">headless</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-c1">userAgent</span>: <span class="pl-v">GlobalConstant</span><span class="pl-kos">.</span><span class="pl-c1">userAgent</span><span class="pl-kos">,</span>
<span class="pl-c1">contextOptions</span>: <span class="pl-kos">{</span>
<span class="pl-c1">ignoreHTTPSErrors</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">extraHTTPHeaders</span>: <span class="pl-kos">{</span>
<span class="pl-s">'User-Agent'</span>: <span class="pl-v">GlobalConstant</span><span class="pl-kos">.</span><span class="pl-c1">userAgent</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c">/* Configure projects for major browsers */</span>
<span class="pl-c1">projects</span>: <span class="pl-kos">[</span>
<span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-s">'Desktop Edge'</span><span class="pl-kos">,</span>
<span class="pl-c1">snapshotPathTemplate</span>: <span class="pl-s">'./screenshots/{testFilePath}/{arg}-Desktop{ext}'</span><span class="pl-kos">,</span>
<span class="pl-c1">use</span>: <span class="pl-kos">{</span>
...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Edge'</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">channel</span>: <span class="pl-s">'chrome'</span><span class="pl-kos">,</span>
<span class="pl-c1">browserName</span>: <span class="pl-s">'chromium'</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c">// {</span>
<span class="pl-c">// name: 'firefox',</span>
<span class="pl-c">// use: { ...devices['Desktop Firefox'] },</span>
<span class="pl-c">// },</span>
<span class="pl-c">// {</span>
<span class="pl-c">// name: 'webkit',</span>
<span class="pl-c">// use: { ...devices['Desktop Safari'] },</span>
<span class="pl-c">// },</span>
<span class="pl-c">/* Test against mobile viewports. */</span>
<span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-s">'Mobile Edge'</span><span class="pl-kos">,</span>
<span class="pl-c1">snapshotPathTemplate</span>: <span class="pl-s">'./screenshots/{testFilePath}/{arg}-Mobile{ext}'</span><span class="pl-kos">,</span>
<span class="pl-c1">use</span>: <span class="pl-kos">{</span>
...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Pixel 5'</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">channel</span>: <span class="pl-s">'chrome'</span><span class="pl-kos">,</span>
<span class="pl-c1">browserName</span>: <span class="pl-s">'chromium'</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c">// {</span>
<span class="pl-c">// name: 'Mobile Safari',</span>
<span class="pl-c">// use: { ...devices['iPhone 12'] },</span>
<span class="pl-c">// },</span>
<span class="pl-c">/* Test against tablet viewports. */</span>
<span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-s">'Tablet Edge'</span><span class="pl-kos">,</span>
<span class="pl-c1">snapshotPathTemplate</span>: <span class="pl-s">'./screenshots/{testFilePath}/{arg}-Tablet{ext}'</span><span class="pl-kos">,</span>
<span class="pl-c1">use</span>: <span class="pl-kos">{</span>
...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Galaxy Tab S4 landscape'</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">channel</span>: <span class="pl-s">'chrome'</span><span class="pl-kos">,</span>
<span class="pl-c1">browserName</span>: <span class="pl-s">'chromium'</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c">// {</span>
<span class="pl-c">// name: 'Mobile Safari',</span>
<span class="pl-c">// use: { ...devices['iPhone 12'] },</span>
<span class="pl-c">// },</span>
<span class="pl-c">/* Test against branded browsers. */</span>
<span class="pl-c">// {</span>
<span class="pl-c">// name: 'Microsoft Edge',</span>
<span class="pl-c">// use: { ...devices['Desktop Edge'], channel: 'msedge' },</span>
<span class="pl-c">// },</span>
<span class="pl-c">// {</span>
<span class="pl-c">// name: 'Google Chrome',</span>
<span class="pl-c">// use: { ..devices['Desktop Chrome'], channel: 'chrome' },</span>
<span class="pl-c">// },</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c">/* Run your local dev server before starting the tests */</span>
<span class="pl-c">// webServer: {</span>
<span class="pl-c">// command: 'npm run start',</span>
<span class="pl-c">// url: 'http://127.0.0.1:3000',</span>
<span class="pl-c">// reuseExistingServer: !process.env.CI,</span>
<span class="pl-c">// },</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>Run the test with command line for all of projects: desktop, mobile, tablet</li>
<li>Check result</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">With the first running, it should show error below:<br>
"Error: A snapshot doesn't exist at xxxxxx" for all three projects (correct behaviour)</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">It only shows "Error: A snapshot doesn't exist at xxxxxx" for desktop and mobile project.<br>
With tablet project, it do not capture screenshot for tablet and in test-results folder, it generate three files:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""xxx-actual.png
xxx-diff.png
xxx-previous.png""><pre class="notranslate"><code class="notranslate">"xxx-actual.png
xxx-diff.png
xxx-previous.png"
</code></pre></div>
<p dir="auto">I do not know where did the "xxx-previous.png" image comming from? As I run visual comparison many times, from the second running, it should generate three files instead.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""xxx-actual.png
xxx-diff.png
xxx-expected.png""><pre class="notranslate"><code class="notranslate">"xxx-actual.png
xxx-diff.png
xxx-expected.png"
</code></pre></div> | <h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: v1.33</li>
<li>Operating System: Windows, Ubuntu22</li>
<li>Browser: All</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li>
</ul>
<p dir="auto">Sorry, but I deviated a bit from the issue template.<br>
So, I am interested in page.unroute method.<br>
I had a look at the playwright tests<br>
</p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/microsoft/playwright/blob/52feff39b3fedfb1eb7a6ff1b33e53a50d114fe7/tests/page/page-route.spec.ts#L42">playwright/tests/page/page-route.spec.ts</a>
</p>
<p class="mb-0 color-fg-muted">
Line 42
in
<a data-pjax="true" class="commit-tease-sha" href="/microsoft/playwright/commit/52feff39b3fedfb1eb7a6ff1b33e53a50d114fe7">52feff3</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L42" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="42"></td>
<td id="LC42" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-en">it</span><span class="pl-kos">(</span><span class="pl-s">'should unroute'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page<span class="pl-kos">,</span> server <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span> </td>
</tr>
</tbody></table>
</div>
</div>
<br>
what I see it is only tested with strings as url.<br>
What I want to achieve is to unroute registered routes after each test.<br>
We are using regex for that.<p></p>
<p dir="auto">In our POM<br>
we have this</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="registerRoutes(page: Page): Promise<void> {
return page.route(/(test\.local\/)|(domain2)/, this.testRouteHandler.bind(this));
}
async destroy(): Promise<void> {
await this.page.unroute(/(test\.local\/)|(domain2)/);
}"><pre class="notranslate"><span class="pl-en">registerRoutes</span><span class="pl-kos">(</span><span class="pl-s1">page</span>: <span class="pl-smi">Page</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">route</span><span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span><span class="pl-kos">(</span>test<span class="pl-cce">\.</span>local<span class="pl-cce">\/</span><span class="pl-kos">)</span><span class="pl-c1">|</span><span class="pl-kos">(</span>domain2<span class="pl-kos">)</span><span class="pl-c1">/</span></span><span class="pl-kos">,</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">testRouteHandler</span><span class="pl-kos">.</span><span class="pl-en">bind</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">async</span> <span class="pl-s1">destroy</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-k">await</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">page</span><span class="pl-kos">.</span><span class="pl-en">unroute</span><span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span><span class="pl-kos">(</span>test<span class="pl-cce">\.</span>local<span class="pl-cce">\/</span><span class="pl-kos">)</span><span class="pl-c1">|</span><span class="pl-kos">(</span>domain2<span class="pl-kos">)</span><span class="pl-c1">/</span></span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Looking at the implementation in pw<br>
</p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/microsoft/playwright/blob/52feff39b3fedfb1eb7a6ff1b33e53a50d114fe7/packages/playwright-core/src/client/page.ts#L460">playwright/packages/playwright-core/src/client/page.ts</a>
</p>
<p class="mb-0 color-fg-muted">
Line 460
in
<a data-pjax="true" class="commit-tease-sha" href="/microsoft/playwright/commit/52feff39b3fedfb1eb7a6ff1b33e53a50d114fe7">52feff3</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L460" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="460"></td>
<td id="LC460" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">async</span> <span class="pl-en">unroute</span><span class="pl-kos">(</span><span class="pl-s1">url</span>: <span class="pl-smi">URLMatch</span><span class="pl-kos">,</span> <span class="pl-s1">handler</span>?: <span class="pl-smi">RouteHandlerCallback</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">></span> <span class="pl-kos">{</span> </td>
</tr>
</tbody></table>
</div>
</div>
<br>
it compares urls by strict equality, and then filters out page._routes.<br>
So I guess for pure regexes it wont work.<br>
What I did is that I saved the url regex into an instance field, so I can pass in a reference<br>
Like this:<p></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="readonly routeUrl = /(test\.local\/)|(domain2)/;
registerRoutes(page: Page): Promise<void> {
return page.route(this.routeUrl, this.testRouteHandler.bind(this));
}
async destroy(): Promise<void> {
await this.page.unroute(this.routeUrl);
}"><pre class="notranslate"><span class="pl-k">readonly</span> <span class="pl-s1">routeUrl</span> <span class="pl-c1">=</span> <span class="pl-pds"><span class="pl-c1">/</span><span class="pl-kos">(</span>test<span class="pl-cce">\.</span>local<span class="pl-cce">\/</span><span class="pl-kos">)</span><span class="pl-c1">|</span><span class="pl-kos">(</span>domain2<span class="pl-kos">)</span><span class="pl-c1">/</span></span><span class="pl-kos">;</span>
<span class="pl-en">registerRoutes</span><span class="pl-kos">(</span><span class="pl-s1">page</span>: <span class="pl-smi">Page</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">route</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">routeUrl</span><span class="pl-kos">,</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">testRouteHandler</span><span class="pl-kos">.</span><span class="pl-en">bind</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">async</span> <span class="pl-s1">destroy</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-k">await</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">page</span><span class="pl-kos">.</span><span class="pl-en">unroute</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">routeUrl</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">After awaiting the destroy method, page object still has a length of one in _routes, and points to the registered handlers.<br>
Our goal is to get rid for all registered routes on the page in destroy method.<br>
How to achieve it in regex?<br>
can unroute also return a new length or something, or a boolean that confirms that routes are indeed unregistered?</p>
<p dir="auto">Another thing we have is that sometimes there is a request in route handler that takes some time, and eventually throws<br>
It happens that at that time another test is running, and route handler from previous test throws in another test, and then urelated test fails.</p>
<p dir="auto">What I thought is to collect pending promises from route handles into a local array on POM instance, since we use POM as a fixture, and after <code class="notranslate">use(POMfixture)</code> to await that all promises from that array are resolved before fixture can be teared down.<br>
Not sure if you guys have a better advice on how to approach it?</p> | 0 |
<p dir="auto">This is likely related to, or the same issue as these 3: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="653253994" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/6687" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/6687/hovercard" href="https://github.com/denoland/deno/issues/6687">#6687</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="660616433" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/6802" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/6802/hovercard" href="https://github.com/denoland/deno/issues/6802">#6802</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="646643098" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/6516" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/6516/hovercard" href="https://github.com/denoland/deno/issues/6516">#6516</a></p>
<p dir="auto">It appears that using compiler hints for types causes issues with bundle.</p>
<p dir="auto">Take this example:</p>
<p dir="auto">index.ts</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// @deno-types="./foo.d.ts"
import * as Foo from './foo.js';
console.log(Foo.bar);"><pre class="notranslate"><span class="pl-c">// <span class="pl-k">@deno</span>-types="./foo.d.ts"</span>
<span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-smi">Foo</span> <span class="pl-k">from</span> <span class="pl-s">'./foo.js'</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-smi">Foo</span><span class="pl-kos">.</span><span class="pl-c1">bar</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">foo.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export const bar = 'string';"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">bar</span> <span class="pl-c1">=</span> <span class="pl-s">'string'</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">foo.d.ts</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export as namespace Foo;
export const bar: string;"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">as</span> <span class="pl-k">namespace</span> <span class="pl-smi">Foo</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">bar</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">If I just do <code class="notranslate">deno run index.ts</code> it runs without error.</p>
<p dir="auto">If I do <code class="notranslate">deno bundle index.ts app.js && deno run app.js</code>, then I get this output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Bundle file:///home/mcpqndq/repos/typeHintTest/index.ts
Emit "app.js" (2.51 KB)
error: Uncaught TypeError: Cannot read property 'bar' of undefined
console.log(Foo.bar);
^
at execute (file:///home/mcpqndq/repos/typeHintTest/app.js:112:29)
at gExp (file:///home/mcpqndq/repos/typeHintTest/app.js:90:7)
at __instantiate (file:///home/mcpqndq/repos/typeHintTest/app.js:97:27)
at file:///home/mcpqndq/repos/typeHintTest/app.js:117:1"><pre class="notranslate"><code class="notranslate">Bundle file:///home/mcpqndq/repos/typeHintTest/index.ts
Emit "app.js" (2.51 KB)
error: Uncaught TypeError: Cannot read property 'bar' of undefined
console.log(Foo.bar);
^
at execute (file:///home/mcpqndq/repos/typeHintTest/app.js:112:29)
at gExp (file:///home/mcpqndq/repos/typeHintTest/app.js:90:7)
at __instantiate (file:///home/mcpqndq/repos/typeHintTest/app.js:97:27)
at file:///home/mcpqndq/repos/typeHintTest/app.js:117:1
</code></pre></div>
<p dir="auto">Not going to go through it of course, but removing the hint the error goes away.</p> | <p dir="auto"><a href="https://eslint.org/docs/rules/require-await" rel="nofollow">https://eslint.org/docs/rules/require-await</a></p>
<blockquote>
<p dir="auto">There is an eslint rule of <a href="https://eslint.org/docs/rules/require-await" rel="nofollow"><code class="notranslate">require-await</code></a> which would catch this as well. With TypeScript checking the return type it is very unlikely enforcing this would cause incorrect behaviour.</p>
</blockquote>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kitsonk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kitsonk">@kitsonk</a> I did a quick check and we'd have to add a lot of supressions to tests (because there's a lot of mocks that assert async functions were called). I'm open to that change, but I'd open a new issue for that.</p>
<p dir="auto"><em>Originally posted by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bartlomieju/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bartlomieju">@bartlomieju</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="581746019" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/4384" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/4384/hovercard?comment_id=599469694&comment_type=issue_comment" href="https://github.com/denoland/deno/pull/4384#issuecomment-599469694">#4384 (comment)</a></em></p>
<p dir="auto">A new rule "require-await" should be added to <code class="notranslate">.eslintrc.json</code>; then code in <code class="notranslate">core/</code>, <code class="notranslate">cli/</code> and <code class="notranslate">std/</code> should be linted accordingly.</p> | 0 |
<p dir="auto">Thanks for next.js , I think it's awesome and has enabled me to progress a universal website much quicker than I could of done trying to build it out from scratch!</p>
<p dir="auto">I have added an entry point in my config for a component that ends up in the /static folder, this is a script that I am loading onto a script tag on componentDidMount and accessed via a Web Worker:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
const { ANALYZE } = process.env
const path = require('path');
module.exports = {
webpack: function (config) {
console.log(config);
if (ANALYZE) {
config.plugins.push(new BundleAnalyzerPlugin({
analyzerMode: 'server',
analyzerPort: 8888,
openAnalyzer: true
}))
}
return Object.assign({}, config, { entry: function() {
return config.entry().then((entry) => {
return Object.assign({}, entry, { '../static/components/canvasAnim.js': './components/CanvasAnim'})
})
}})
return config;
}
}"><pre class="notranslate"><code class="notranslate">const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
const { ANALYZE } = process.env
const path = require('path');
module.exports = {
webpack: function (config) {
console.log(config);
if (ANALYZE) {
config.plugins.push(new BundleAnalyzerPlugin({
analyzerMode: 'server',
analyzerPort: 8888,
openAnalyzer: true
}))
}
return Object.assign({}, config, { entry: function() {
return config.entry().then((entry) => {
return Object.assign({}, entry, { '../static/components/canvasAnim.js': './components/CanvasAnim'})
})
}})
return config;
}
}
</code></pre></div>
<p dir="auto">My script is working in dev, but when I build it does not seem to get touched. I was expecting this to end up all minified. So when I run the code in prod, React complains with: Error: Minified React error <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="185863194" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/130" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/130/hovercard" href="https://github.com/vercel/next.js/issues/130">#130</a>;</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">I don't think I am describing a bug here, probably something I am missing around the way next.js config works!</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">During build the entry does not seem to be touched.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Add an entry point that maps to static and then build</li>
</ol>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>latest</td>
</tr>
<tr>
<td>node</td>
<td>8.6.0</td>
</tr>
<tr>
<td>OS</td>
<td>macOs 10.12.6</td>
</tr>
<tr>
<td>browser</td>
<td>chrome 61</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | <p dir="auto">The client bundle always includes <code class="notranslate">node-libs-browser</code>, even if it is unnecessary. Removing it would reduce a hello world Next.js app page load by 19.62 KB (2.02 KB min gzip):</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1754873/38538707-5aa8a382-3cd8-11e8-8993-995a1f01eca5.png"><img width="658" alt="screen shot 2018-04-10 at 3 58 45 pm" src="https://user-images.githubusercontent.com/1754873/38538707-5aa8a382-3cd8-11e8-8993-995a1f01eca5.png" style="max-width: 100%;"></a></p>
<p dir="auto">This package is necessary if using <code class="notranslate">process.browser</code>, but this is currently only <a href="https://github.com/zeit/next.js/blob/6.0.0-canary.3/examples/with-apollo/lib/initApollo.js#L9">used in examples</a> and can be replaced easily with <code class="notranslate">typeof window !== 'undefined'</code>.</p>
<p dir="auto">I don't know the best way to remove it, as it is included by Webpack. Here are some related links:</p>
<ul dir="auto">
<li><a href="https://medium.com/walmartlabs/webpack-optimization-a-case-study-92b130334b6c" rel="nofollow">https://medium.com/walmartlabs/webpack-optimization-a-case-study-92b130334b6c</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="232723424" data-permission-text="Title is private" data-url="https://github.com/webpack/webpack/issues/4976" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack/issues/4976/hovercard" href="https://github.com/webpack/webpack/issues/4976">webpack/webpack#4976</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="233349207" data-permission-text="Title is private" data-url="https://github.com/webpack/webpack/issues/4995" data-hovercard-type="pull_request" data-hovercard-url="/webpack/webpack/pull/4995/hovercard" href="https://github.com/webpack/webpack/pull/4995">webpack/webpack#4995</a></li>
</ul>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">The client bundle does not include <code class="notranslate">node-libs-browser</code> if it's unnecessary.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The client bundle includes <code class="notranslate">node-libs-browser</code> even if it's unnecessary.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">Follow the basic Next.js setup instructions.</p>
<p dir="auto">Follow the basic <code class="notranslate">@zeit/next-bundle-analyzer</code> setup instructions to see the problem visually.</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>v5.1.0 (or v6.0.0-canary.3)</td>
</tr>
<tr>
<td>node</td>
<td>v9.10.0</td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">I have a user entity, which has a password field with several validation constraints attached.</p>
<p dir="auto">If some of my validation constraint failed, the error message got assigned to the parent form, which should not happen, as the error_bubbling is turned off.</p>
<p dir="auto">While tracking the problem down, I've came upon this conclusion:</p>
<p dir="auto">Since it's a registration process, I would like the user to confirm the password he types in order to avoid any mistyping:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$builder->add('password', 'repeated', array(
'type' => 'password',
'invalid_message' => 'The password fields must match.',
'options' => array(
'label' => 'label.password',
'attr' => array(
'class' => 'large_width valid',
)
),
'error_bubbling' => false,
));"><pre class="notranslate"><code class="notranslate">$builder->add('password', 'repeated', array(
'type' => 'password',
'invalid_message' => 'The password fields must match.',
'options' => array(
'label' => 'label.password',
'attr' => array(
'class' => 'large_width valid',
)
),
'error_bubbling' => false,
));
</code></pre></div>
<p dir="auto">I also have some validation constraints about the size of the password and its complexity inside the validation.yml file:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- NotBlank: { groups: [change_password, registration] }
- MinLength: { limit: 6, groups: [change_password, registration] }
- MaxLength: { limit: 200, groups: [change_password, registration ] }"><pre class="notranslate"><code class="notranslate">- NotBlank: { groups: [change_password, registration] }
- MinLength: { limit: 6, groups: [change_password, registration] }
- MaxLength: { limit: 200, groups: [change_password, registration ] }
</code></pre></div>
<p dir="auto">Now, the problem is that the error messages from any validation constraints are not processed as it should - instead of being assigned to the element, they are assigned directly to its form. The reason for this follows:</p>
<p dir="auto">Symfony\Component\Form\Extension\Validator\Validator\DelegatingValidator:80</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="foreach ($violations as $violation) {
$propertyPath = $violation->getPropertyPath();
$template = $violation->getMessageTemplate();
$parameters = $violation->getMessageParameters();
$error = new FormError($template, $parameters);
foreach ($mapping as $mappedPath => $child) {
if (preg_match($mappedPath, $propertyPath)) {
$child->addError($error);
continue 2;
}
}
$form->addError($error);
}"><pre class="notranslate"><code class="notranslate">foreach ($violations as $violation) {
$propertyPath = $violation->getPropertyPath();
$template = $violation->getMessageTemplate();
$parameters = $violation->getMessageParameters();
$error = new FormError($template, $parameters);
foreach ($mapping as $mappedPath => $child) {
if (preg_match($mappedPath, $propertyPath)) {
$child->addError($error);
continue 2;
}
}
$form->addError($error);
}
</code></pre></div>
<p dir="auto">In my case, I'm using a main form which has a subform - the one with the user entity attached, thus the $propertyPath value:<br>
<code class="notranslate">$propertyPath = "children[user].data.password"</code></p>
<p dir="auto">The important checked paths are:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""/^children\.data\.(?!\w)/"
"/^children\[user\]\.data\.(?!\w)/"
"/^children\[user\]\.data\.username(?!\w)/"
"/^children\[user\]\[password\]\.data\.(?!\w)/"
"/^children\[user\]\[password\]\.data\.first(?!\w)/"
"/^children\[user\]\[password\]\.data\.second(?!\w)/"
"/^children\[user\]\[password\](?!\w)/"
.. some other fields
"/^children\[user\](?!\w)/""><pre class="notranslate"><code class="notranslate">"/^children\.data\.(?!\w)/"
"/^children\[user\]\.data\.(?!\w)/"
"/^children\[user\]\.data\.username(?!\w)/"
"/^children\[user\]\[password\]\.data\.(?!\w)/"
"/^children\[user\]\[password\]\.data\.first(?!\w)/"
"/^children\[user\]\[password\]\.data\.second(?!\w)/"
"/^children\[user\]\[password\](?!\w)/"
.. some other fields
"/^children\[user\](?!\w)/"
</code></pre></div>
<p dir="auto">Note that the user.password.first and user.password.second fields are being checked, but not user.password.<br>
Perhaps this case should be added as well:<br>
<code class="notranslate">"/^children\[user\]\.data\.password(?!\w)/"</code></p>
<p dir="auto">The last one matched, which obviously is not correct. The reason for the issue seems like that either the repeat form element type was not designed to work with this, either this class was not written with having the repeat field in mind.</p> | <p dir="auto">When RepeatedType is nested inside another form, error messages such as "This value should not be blank" bubble up to the root form, instead of appearing above the field in the nested form.</p>
<p dir="auto">To illustrate this issue, I have put together the following example:</p>
<ul dir="auto">
<li>Two types where one is nested in the other (child inside parent).</li>
<li>Both types have the RepeatedType field.</li>
<li>Both RepeatedType fields are NotBlank.</li>
</ul>
<p dir="auto">As you can see, the error message for the RepeatedType in the main type, appears right above the fields, but this doesn't happen for the nested type.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/10af27d7464a434029fe17612d696887a04771579701b22f03794d512d3f4888/68747470733a2f2f6c68342e676f6f676c6575736572636f6e74656e742e636f6d2f2d4a2d66435f5353494c714d2f546b6838486b61464139492f41414141414141414142672f726852505035326e697a512f73637265656e73686f742e706e67"><img src="https://camo.githubusercontent.com/10af27d7464a434029fe17612d696887a04771579701b22f03794d512d3f4888/68747470733a2f2f6c68342e676f6f676c6575736572636f6e74656e742e636f6d2f2d4a2d66435f5353494c714d2f546b6838486b61464139492f41414141414141414142672f726852505035326e697a512f73637265656e73686f742e706e67" alt="Screenshot" data-canonical-src="https://lh4.googleusercontent.com/-J-fC_SSILqM/Tkh8HkaFA9I/AAAAAAAAABg/rhRPP52nizQ/screenshot.png" style="max-width: 100%;"></a></p>
<p dir="auto">Here are the types and models that can be used to demonstrate the issue:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class RegistrationParent
{
public $registrationChild;
/**
* @Assert\NotBlank()
*/
public $plainPassword;
}
class RegistrationChild
{
/**
* @Assert\NotBlank()
*/
public $plainPassword;
}
class RegistrationParentFormType extends AbstractType
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('registrationChild', new RegistrationChildFormType())
->add('plainPassword', 'repeated', array(
'type' => 'password',
))
;
}
class RegistrationChildFormType extends AbstractType
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('plainPassword', 'repeated', array(
'type' => 'password',
))
;
}"><pre class="notranslate"><code class="notranslate">class RegistrationParent
{
public $registrationChild;
/**
* @Assert\NotBlank()
*/
public $plainPassword;
}
class RegistrationChild
{
/**
* @Assert\NotBlank()
*/
public $plainPassword;
}
class RegistrationParentFormType extends AbstractType
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('registrationChild', new RegistrationChildFormType())
->add('plainPassword', 'repeated', array(
'type' => 'password',
))
;
}
class RegistrationChildFormType extends AbstractType
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('plainPassword', 'repeated', array(
'type' => 'password',
))
;
}
</code></pre></div> | 1 |
<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.6</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {Component} from 'angular2/core';
@Component({
selector: 'igx-test',
directives: [Test],
templateUrl: 'app/ngTest/Templates/Test.html'
})
export class Test {
//test
constructor() {
console.log("ng2 is working");
}
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-smi">Component</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'angular2/core'</span><span class="pl-kos">;</span>
@<span class="pl-smi">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">selector</span>: <span class="pl-s">'igx-test'</span><span class="pl-kos">,</span>
<span class="pl-c1">directives</span>: <span class="pl-kos">[</span><span class="pl-smi">Test</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">templateUrl</span>: <span class="pl-s">'app/ngTest/Templates/Test.html'</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">Test</span> <span class="pl-kos">{</span>
<span class="pl-c">//test</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">"ng2 is working"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<TypeScriptNoImplicitAny>False</TypeScriptNoImplicitAny>
<TypeScriptGeneratesDeclarations>False</TypeScriptGeneratesDeclarations>
<TypeScriptModuleKind>none</TypeScriptModuleKind>
<TypeScriptTarget>ES5</TypeScriptTarget>
<TypeScriptRemoveComments>False</TypeScriptRemoveComments>
<TypeScriptCompileOnSaveEnabled>True</TypeScriptCompileOnSaveEnabled>
<TypeScriptSourceMap>False</TypeScriptSourceMap>
<TypeScriptModuleResolution>node</TypeScriptModuleResolution>
<TypeScriptOutFile />
<TypeScriptOutDir />
<TypeScriptNoEmitOnError>False</TypeScriptNoEmitOnError>
<TypeScriptMapRoot />
<TypeScriptSourceRoot />
<TypeScriptExperimentalDecorators>true</TypeScriptExperimentalDecorators>
</PropertyGroup>"><pre class="notranslate"> <<span class="pl-ent">PropertyGroup</span> <span class="pl-e">Condition</span>=<span class="pl-s"><span class="pl-pds">"</span>'$(Configuration)' == 'Debug'<span class="pl-pds">"</span></span>>
<<span class="pl-ent">TypeScriptNoImplicitAny</span>>False</<span class="pl-ent">TypeScriptNoImplicitAny</span>>
<<span class="pl-ent">TypeScriptGeneratesDeclarations</span>>False</<span class="pl-ent">TypeScriptGeneratesDeclarations</span>>
<<span class="pl-ent">TypeScriptModuleKind</span>>none</<span class="pl-ent">TypeScriptModuleKind</span>>
<<span class="pl-ent">TypeScriptTarget</span>>ES5</<span class="pl-ent">TypeScriptTarget</span>>
<<span class="pl-ent">TypeScriptRemoveComments</span>>False</<span class="pl-ent">TypeScriptRemoveComments</span>>
<<span class="pl-ent">TypeScriptCompileOnSaveEnabled</span>>True</<span class="pl-ent">TypeScriptCompileOnSaveEnabled</span>>
<<span class="pl-ent">TypeScriptSourceMap</span>>False</<span class="pl-ent">TypeScriptSourceMap</span>>
<<span class="pl-ent">TypeScriptModuleResolution</span>>node</<span class="pl-ent">TypeScriptModuleResolution</span>>
<<span class="pl-ent">TypeScriptOutFile</span> />
<<span class="pl-ent">TypeScriptOutDir</span> />
<<span class="pl-ent">TypeScriptNoEmitOnError</span>>False</<span class="pl-ent">TypeScriptNoEmitOnError</span>>
<<span class="pl-ent">TypeScriptMapRoot</span> />
<<span class="pl-ent">TypeScriptSourceRoot</span> />
<<span class="pl-ent">TypeScriptExperimentalDecorators</span>>true</<span class="pl-ent">TypeScriptExperimentalDecorators</span>>
</<span class="pl-ent">PropertyGroup</span>></pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
Visual studio finds the module ''angular2/core' with:</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<TypeScriptModuleResolution>node</TypeScriptModuleResolution>"><pre class="notranslate"><<span class="pl-ent">TypeScriptModuleResolution</span>>node</<span class="pl-ent">TypeScriptModuleResolution</span>></pre></div>
<p dir="auto">has full IntelliSense and no build errors.<br>
<strong>Actual behavior:</strong><br>
There is a IntelliSense error ("Cannot fine module angular2/core") and no auto completion; the msbuild and build on save both work fine however. The IntelliSense works fine when I put:</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<TypeScriptModuleResolution>NodeJs</TypeScriptModuleResolution>"><pre class="notranslate"><<span class="pl-ent">TypeScriptModuleResolution</span>>NodeJs</<span class="pl-ent">TypeScriptModuleResolution</span>></pre></div>
<p dir="auto">in the proj xml. If I do this I get the must be 'node' or 'classic' error when I use msbuild. Build on save works fine still.</p> | <p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">nightly (1.9.0-dev.20160422)</p>
<p dir="auto"><strong>Current code in tslint.json:</strong></p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"rules": {
"semicolon": true
}
}"><pre class="notranslate">{
<span class="pl-ent">"rules"</span>: {
<span class="pl-ent">"semicolon"</span>: <span class="pl-c1">true</span>
}
}</pre></div>
<p dir="auto"><strong>Desirable code:</strong></p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"rules": {
"semicolon": [true,
"always"
]
}
}"><pre class="notranslate">{
<span class="pl-ent">"rules"</span>: {
<span class="pl-ent">"semicolon"</span>: [<span class="pl-c1">true</span>,
<span class="pl-s"><span class="pl-pds">"</span>always<span class="pl-pds">"</span></span>
]
}
}</pre></div>
<p dir="auto"><strong>Description:</strong><br>
According to the <a href="http://palantir.github.io/tslint/rules/semicolon/" rel="nofollow">TSLint spec</a> and their <a href="http://json.schemastore.org/tslint" rel="nofollow">json scheme</a>, value of semicolon option should be array. So, When I use <a href="https://github.com/Microsoft/vscode-tslint">vscode-tslint</a>, vscode show error message. this is noizy.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/9623009/14736743/6e549c02-08b3-11e6-9bab-3564fea2b0aa.png"><img src="https://cloud.githubusercontent.com/assets/9623009/14736743/6e549c02-08b3-11e6-9bab-3564fea2b0aa.png" alt="semicolonoption" style="max-width: 100%;"></a></p> | 0 |
<h2 dir="auto"></h2>
<ol dir="auto">
<li>Have an old Flutter SDK</li>
<li>Run <code class="notranslate">flutter upgrade</code></li>
</ol>
<p dir="auto">=> we recommend running <code class="notranslate">flutter upgrade</code> <g-emoji class="g-emoji" alias="smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f604.png">😄</g-emoji></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="C:\Users\mit\dev>flutter upgrade
Updating flutter tool...
╔════════════════════════════════════════════════════════════════════════════╗
║ WARNING: your installation of Flutter is 44 days old. ║
║ ║
║ To update to the latest version, run "flutter upgrade". ║
╚════════════════════════════════════════════════════════════════════════════╝
Upgrading Flutter from C:\Users\mit\dev\github\flutter..."><pre class="notranslate"><code class="notranslate">C:\Users\mit\dev>flutter upgrade
Updating flutter tool...
╔════════════════════════════════════════════════════════════════════════════╗
║ WARNING: your installation of Flutter is 44 days old. ║
║ ║
║ To update to the latest version, run "flutter upgrade". ║
╚════════════════════════════════════════════════════════════════════════════╝
Upgrading Flutter from C:\Users\mit\dev\github\flutter...
</code></pre></div> | <h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">When using the CLI to upgrade the local Flutter installation (using <code class="notranslate">flutter upgrade</code>), the CLI provides a warning that the installations is XY days old and that <code class="notranslate">flutter upgrade</code> should be run in order to update the installation.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/160543/32729147-13316058-c883-11e7-9d1d-f8404a7ff59f.png"><img width="568" alt="screen shot 2017-11-13 at 2 51 38 pm" src="https://user-images.githubusercontent.com/160543/32729147-13316058-c883-11e7-9d1d-f8404a7ff59f.png" style="max-width: 100%;"></a></p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">When running <code class="notranslate">flutter upgrade</code> this warning should be suppressed.</p> | 1 |
<ul dir="auto">
<li>VSCode Version: 0.10.11</li>
<li>OS Version: OS X El Capitan 10.11.4</li>
<li>Node Version: 5.10.1</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Launch code from terminal <code class="notranslate">code .</code>. It fails with the following error -</li>
</ol>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="File "<string>", line 1
import os,sys; print os.path.realpath(sys.argv[1])
^
SyntaxError: invalid syntax
/usr/local/bin/code: line 10: ./MacOS/Electron: No such file or directory"><pre class="notranslate">File <span class="pl-s"><span class="pl-pds">"</span><string><span class="pl-pds">"</span></span>, line 1
import os,sys<span class="pl-k">;</span> print os.path.realpath(sys.argv[1])
^
SyntaxError: invalid syntax
/usr/local/bin/code: line 10: ./MacOS/Electron: No such file or directory</pre></div>
<p dir="auto">It used to work perfectly alright before the OS X upgrade to 10.11.4. Just to be sure, I uninstalled code from PATH and installed it again through command palette but no luck.</p> | <p dir="auto">Just installed 0.10.10 and installed the <code class="notranslate">code</code> shell command:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ code --help
File "<string>", line 1
import os,sys; print os.path.realpath(sys.argv[1])
^
SyntaxError: invalid syntax
/usr/local/bin/code: line 10: ./MacOS/Electron: No such file or directory"><pre class="notranslate"><code class="notranslate">$ code --help
File "<string>", line 1
import os,sys; print os.path.realpath(sys.argv[1])
^
SyntaxError: invalid syntax
/usr/local/bin/code: line 10: ./MacOS/Electron: No such file or directory
</code></pre></div>
<p dir="auto">VS Code itself works fine if I launch it via Spotlight.</p>
<p dir="auto">I believe the problem is that I had a Python virtual environment active, and <code class="notranslate">python</code> points to Python 3. If I try <code class="notranslate">code</code> outside of that virtualenv, where <code class="notranslate">python</code> means Python 2, everything works fine.</p>
<p dir="auto">I guess the options are:</p>
<ol dir="auto">
<li>Make the launch script Python 2/3 compatible. (Step one would probably be to add <code class="notranslate">from __future__ import print_function</code> and update the <code class="notranslate">print</code> statements accordingly.)</li>
<li>Do some extra work to guarantee that you launch the system Python and not the user's configured Python, though this is probably not a viable long-term approach since distributions like Fedora now <a href="https://fedoraproject.org/wiki/Changes/Python_3_as_Default" rel="nofollow">default to Python 3</a> and don't even install Python 2 by default.</li>
</ol> | 1 |
<h3 dir="auto">Numpy/Python version information: 1.19.1</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.8 from "/usr/local/bin/uwsgi"
* The NumPy version is: "1.19.1"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/local/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-x86_64-linux-gnu.so)
"><pre class="notranslate">We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
<span class="pl-k">*</span> The Python version is: Python3.8 from <span class="pl-s"><span class="pl-pds">"</span>/usr/local/bin/uwsgi<span class="pl-pds">"</span></span>
<span class="pl-k">*</span> The NumPy version is: <span class="pl-s"><span class="pl-pds">"</span>1.19.1<span class="pl-pds">"</span></span>
and make sure that they are the versions you expect.
Please carefully study the documentation linked above <span class="pl-k">for</span> further help.
Original error was: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/local/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-x86_64-linux-gnu.so)
</pre></div> | <p dir="auto">I'm trying to deploy a Flask-based application (Python 3) in AWS EC2 using Apache and mod_wsgi with all the necessary packages being installed in a miniconda environment.</p>
<p dir="auto">Bellow you can find my app.wsgi file:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import sys
import logging
import site
site.addsitedir('/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/')
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/var/www/html/flaskapp/")
sys.stdout = sys.stderr
from app import app as application"><pre class="notranslate"><code class="notranslate">import sys
import logging
import site
site.addsitedir('/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/')
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/var/www/html/flaskapp/")
sys.stdout = sys.stderr
from app import app as application
</code></pre></div>
<p dir="auto">Also, here's my Apache config file:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
WSGIDaemonProcess flaskapp threads=5 python-home=/home/ubuntu/miniconda3/envs/app_env
WSGIScriptAlias / /var/www/html/flaskapp/app.wsgi
<Directory flaskapp>
WSGIProcessGroup flaskapp
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined"><pre class="notranslate"><code class="notranslate">ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
WSGIDaemonProcess flaskapp threads=5 python-home=/home/ubuntu/miniconda3/envs/app_env
WSGIScriptAlias / /var/www/html/flaskapp/app.wsgi
<Directory flaskapp>
WSGIProcessGroup flaskapp
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</code></pre></div>
<p dir="auto">However, when I reload my server, I keep getting the same error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[Wed Jul 18 12:24:12.897534 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] mod_wsgi (pid=10224): Target WSGI script '/var/www/html/flaskapp/app.wsgi' cannot be loaded as Python module., referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.897592 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] mod_wsgi (pid=10224): Exception occurred processing WSGI script '/var/www/html/flaskapp/app.wsgi'., referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900007 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] Traceback (most recent call last):, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900033 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/core/__init__.py", line 16, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900045 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from . import multiarray, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900062 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] ImportError: cannot import name 'multiarray', referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900072 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900075 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] During handling of the above exception, another exception occurred:, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900078 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900083 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] Traceback (most recent call last):, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900171 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/var/www/html/flaskapp/app.wsgi", line 10, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900176 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from app import app as application, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900181 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/var/www/html/flaskapp/app.py", line 4, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900184 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] app = create_app(), referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900189 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/var/www/html/flaskapp/app/__init__.py", line 33, in create_app, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900192 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from app.data import bp as data_bp, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900197 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/var/www/html/flaskapp/app/data/__init__.py", line 18, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900200 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from app.data import views, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900205 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/var/www/html/flaskapp/app/data/views.py", line 7, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900207 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from app.lca import mongo, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900212 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/var/www/html/flaskapp/app/lca/__init__.py", line 3, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900215 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] import brightway2 as bw2, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900223 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/brightway2/__init__.py", line 2, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900226 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from bw2data import *, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900231 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/bw2data/__init__.py", line 33, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900234 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from .project import projects, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900239 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/bw2data/project.py", line 9, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900242 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from .utils import python_2_unicode_compatible, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900246 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/bw2data/utils.py", line 19, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900249 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] import stats_arrays as sa, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900254 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/stats_arrays/__init__.py", line 5, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900257 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from .distributions import *, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900262 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/stats_arrays/distributions/__init__.py", line 1, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900265 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from .base import UncertaintyBase, BoundedUncertaintyBase, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900270 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/stats_arrays/distributions/base.py", line 5, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900273 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from ..utils import one_row_params_array, construct_params_array, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900277 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/stats_arrays/utils.py", line 3, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900280 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] import numpy as np, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900287 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/__init__.py", line 142, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900290 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from . import add_newdocs, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900295 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/add_newdocs.py", line 13, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900298 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from numpy.lib import add_newdoc, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900302 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/lib/__init__.py", line 8, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900305 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from .type_check import *, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900310 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/lib/type_check.py", line 11, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900313 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] import numpy.core.numeric as _nx, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900318 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/core/__init__.py", line 26, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900321 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] raise ImportError(msg), referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900336 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] ImportError: , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900352 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] Importing the multiarray numpy extension module failed. Most, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900355 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] likely you are trying to import a failed build of numpy., referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900357 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] If you're working with a numpy git repo, try `git clean -xdf` (removes all, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900360 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] files not under version control). Otherwise reinstall numpy., referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900362 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900365 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] Original error was: cannot import name 'multiarray', referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900369 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/"><pre class="notranslate"><code class="notranslate">[Wed Jul 18 12:24:12.897534 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] mod_wsgi (pid=10224): Target WSGI script '/var/www/html/flaskapp/app.wsgi' cannot be loaded as Python module., referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.897592 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] mod_wsgi (pid=10224): Exception occurred processing WSGI script '/var/www/html/flaskapp/app.wsgi'., referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900007 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] Traceback (most recent call last):, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900033 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/core/__init__.py", line 16, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900045 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from . import multiarray, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900062 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] ImportError: cannot import name 'multiarray', referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900072 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900075 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] During handling of the above exception, another exception occurred:, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900078 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900083 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] Traceback (most recent call last):, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900171 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/var/www/html/flaskapp/app.wsgi", line 10, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900176 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from app import app as application, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900181 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/var/www/html/flaskapp/app.py", line 4, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900184 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] app = create_app(), referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900189 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/var/www/html/flaskapp/app/__init__.py", line 33, in create_app, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900192 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from app.data import bp as data_bp, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900197 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/var/www/html/flaskapp/app/data/__init__.py", line 18, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900200 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from app.data import views, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900205 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/var/www/html/flaskapp/app/data/views.py", line 7, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900207 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from app.lca import mongo, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900212 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/var/www/html/flaskapp/app/lca/__init__.py", line 3, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900215 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] import brightway2 as bw2, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900223 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/brightway2/__init__.py", line 2, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900226 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from bw2data import *, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900231 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/bw2data/__init__.py", line 33, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900234 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from .project import projects, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900239 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/bw2data/project.py", line 9, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900242 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from .utils import python_2_unicode_compatible, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900246 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/bw2data/utils.py", line 19, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900249 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] import stats_arrays as sa, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900254 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/stats_arrays/__init__.py", line 5, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900257 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from .distributions import *, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900262 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/stats_arrays/distributions/__init__.py", line 1, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900265 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from .base import UncertaintyBase, BoundedUncertaintyBase, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900270 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/stats_arrays/distributions/base.py", line 5, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900273 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from ..utils import one_row_params_array, construct_params_array, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900277 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/stats_arrays/utils.py", line 3, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900280 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] import numpy as np, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900287 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/__init__.py", line 142, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900290 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from . import add_newdocs, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900295 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/add_newdocs.py", line 13, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900298 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from numpy.lib import add_newdoc, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900302 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/lib/__init__.py", line 8, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900305 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] from .type_check import *, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900310 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/lib/type_check.py", line 11, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900313 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] import numpy.core.numeric as _nx, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900318 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] File "/home/ubuntu/miniconda3/envs/app_env/lib/python3.6/site-packages/numpy/core/__init__.py", line 26, in <module>, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900321 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] raise ImportError(msg), referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900336 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] ImportError: , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900352 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] Importing the multiarray numpy extension module failed. Most, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900355 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] likely you are trying to import a failed build of numpy., referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900357 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] If you're working with a numpy git repo, try `git clean -xdf` (removes all, referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900360 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] files not under version control). Otherwise reinstall numpy., referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900362 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900365 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] Original error was: cannot import name 'multiarray', referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
[Wed Jul 18 12:24:12.900369 2018] [wsgi:error] [pid 10224:tid 140691482736384] [client 89.115.58.201:23351] , referer: http://ec2-52-47-138-159.eu-west-3.compute.amazonaws.com/
</code></pre></div>
<p dir="auto">I've tried multiple times to reinstall numpy and create a new conda environment but the problem seems to be persisting. Moreover, if I activate my conda env I can import directly multiarray (<code class="notranslate">from numpy.core import multiarray</code>). The app also runs perfectly if I load it directly as a localhost (<code class="notranslate">python app.py</code>). Is there some peculiarity when trying to import numpy via mod_wsgi?</p>
<p dir="auto">Thanks!</p> | 1 |
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report"><pre class="notranslate"><code class="notranslate">[x] bug report
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
Change detections running outside of zones have no effect.</p>
<p dir="auto"><strong>Expected behavior</strong><br>
Either the change detection should succeed or an explicit error should be thrown.</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></p>
<p dir="auto">Demo: <a href="http://plnkr.co/edit/wtB971qbdZivPSyTkpvj" rel="nofollow">http://plnkr.co/edit/wtB971qbdZivPSyTkpvj</a></p>
<ul dir="auto">
<li>Cause an event to occur outside of Zone.js</li>
<li>Attempts to effect changes resulting from that event in an Angular component</li>
<li>(note: this also happens when the change detection strategy on <code class="notranslate">OnPush</code>)</li>
</ul>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p>
<p dir="auto">In general, any events that happen outside of Zones. My situation came about as a result of listening to <code class="notranslate">paused</code> / <code class="notranslate">play</code> events on a video element, which apparently Zone.js does not wrap properly or did not wrap in this situation. It could also easily happen if a first or third-party module initializes some routine when it is first imported on which events can be fired.</p>
<p dir="auto">This would have been substantially more difficult to debug if it happened deep in some such 3rd party dependency <g-emoji class="g-emoji" alias="stuck_out_tongue" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f61b.png">😛</g-emoji></p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<p dir="auto">Irrelevant. OSX Sierra, VS Code.</p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.2</li>
<li><strong>Browser:</strong> all</li>
<li><strong>Language:</strong> all</li>
</ul> | <p dir="auto">Hello!<br>
On directives I have detected the following problem:</p>
<p dir="auto">If you include <code class="notranslate">coreDirectives</code> and <code class="notranslate">NgFor</code> in the same component, the ng-for instruction will be executed two times.</p>
<p dir="auto">Example in this plunker: <a href="http://plnkr.co/edit/tFGJVjO3z78GEXCTKFh4?p=preview" rel="nofollow">http://plnkr.co/edit/tFGJVjO3z78GEXCTKFh4?p=preview</a></p>
<p dir="auto">I think the framework need report an error with this info or render only one time the ng-for...</p>
<p dir="auto">Thanks and sorry my bad english <g-emoji class="g-emoji" alias="smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f604.png">😄</g-emoji></p> | 0 |
<p dir="auto">Installing any package causes this error. I am currently using Windows 10 and NodeJS v17.</p> | <h3 dir="auto">Is there an existing issue for this?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li>
</ul>
<h3 dir="auto">This issue exists in the latest npm version</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I am using the latest npm</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">npm install doesn't work either way. After upgrading Node JS to v17.4.0 and npm to v8.4.0 npm install gives two errors with different packages every time which completely halts or crashes the process.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PS E:\VS projs\react-app> npx create-react-app app
Creating a new React app in E:\VS projs\react-app\app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! code ERR_SSL_CIPHER_OPERATION_FAILED
npm ERR! A4250000:error:1C800066:Provider routines:ossl_gcm_stream_update:cipher operation
failed:c:\ws\deps\openssl\openssl\providers\implementations\ciphers\ciphercommon_gcm.c:312:
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ruturaj_k\AppData\Local\npm-cache\_logs\2022-01-30T09_11_05_521Z-debug-0.log
Aborting installation.
npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... node_modules
Deleting generated file... package.json
Deleting app/ from E:\VS projs\react-app
Done."><pre class="notranslate"><code class="notranslate">PS E:\VS projs\react-app> npx create-react-app app
Creating a new React app in E:\VS projs\react-app\app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! code ERR_SSL_CIPHER_OPERATION_FAILED
npm ERR! A4250000:error:1C800066:Provider routines:ossl_gcm_stream_update:cipher operation
failed:c:\ws\deps\openssl\openssl\providers\implementations\ciphers\ciphercommon_gcm.c:312:
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ruturaj_k\AppData\Local\npm-cache\_logs\2022-01-30T09_11_05_521Z-debug-0.log
Aborting installation.
npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... node_modules
Deleting generated file... package.json
Deleting app/ from E:\VS projs\react-app
Done.
</code></pre></div>
<p dir="auto">I felt I had this issue only on my machine so I checked out on different machine with macOS platform and firstly it produces the above error and then when ran second time it give the SOCKET_TIMEOUT error.</p>
<p dir="auto">There's still more to this<br>
I checked with another machine with windows platform and sadly it doesn't work there either. I tested it with a highspeed connection and it's still the same :( .<br>
<a href="https://github.com/npm/cli/files/7971163/2022-01-31T09_34_56_431Z-debug-0.log">2022-01-31T09_34_56_431Z-debug-0.log</a></p>
<h3 dir="auto">Expected Behavior</h3>
<blockquote>
<ol dir="auto">
<li>Expected to install the required packages and create a react app.</li>
<li>Expected to install global modules without any error</li>
</ol>
</blockquote>
<p dir="auto">Expected output</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/65947291/151805817-aca37524-177e-43e7-a113-65e21114e1cf.png"><img src="https://user-images.githubusercontent.com/65947291/151805817-aca37524-177e-43e7-a113-65e21114e1cf.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>Open Terminal / Command Prompt</li>
<li>Type <code class="notranslate">npm install -g nodemon</code> or <code class="notranslate">npx create-react-app my-app</code></li>
<li>Fetches some packages.</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Creating a new React app in E:\VS projs\react-app\app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template..."><pre class="notranslate"><code class="notranslate">Creating a new React app in E:\VS projs\react-app\app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
</code></pre></div>
<ol start="4" dir="auto">
<li>Then suddenly logs an error stoping the install.</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm ERR! code ERR_SSL_CIPHER_OPERATION_FAILED
npm ERR! A4250000:error:1C800066:Provider routines:ossl_gcm_stream_update:cipher operation
failed:c:\ws\deps\openssl\openssl\providers\implementations\ciphers\ciphercommon_gcm.c:312:
npm ERR!"><pre class="notranslate"><code class="notranslate">npm ERR! code ERR_SSL_CIPHER_OPERATION_FAILED
npm ERR! A4250000:error:1C800066:Provider routines:ossl_gcm_stream_update:cipher operation
failed:c:\ws\deps\openssl\openssl\providers\implementations\ciphers\ciphercommon_gcm.c:312:
npm ERR!
</code></pre></div>
<p dir="auto">and sometimes</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="verbose npm v8.4.0
4743 error code ERR_SOCKET_TIMEOUT
4744 error errno ERR_SOCKET_TIMEOUT
4745 error network Invalid response body while trying to fetch https://registry.npmjs.org/dotenv: Socket timeout
4746 error network This is a problem related to network connectivity.
4746 error network In most cases you are behind a proxy or have bad network settings.
4746 error network
4746 error network If you are behind a proxy, please make sure that the
4746 error network 'proxy' config is set properly. See: 'npm help config"><pre class="notranslate"><code class="notranslate">verbose npm v8.4.0
4743 error code ERR_SOCKET_TIMEOUT
4744 error errno ERR_SOCKET_TIMEOUT
4745 error network Invalid response body while trying to fetch https://registry.npmjs.org/dotenv: Socket timeout
4746 error network This is a problem related to network connectivity.
4746 error network In most cases you are behind a proxy or have bad network settings.
4746 error network
4746 error network If you are behind a proxy, please make sure that the
4746 error network 'proxy' config is set properly. See: 'npm help config
</code></pre></div>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>npm: v8.4.0</li>
<li>Node.js: v17.4.0</li>
<li>OS Name: Windows 10 Pro Build 9043.1503 Version 21H1</li>
<li>npm config:</li>
</ul>
<div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="npm config ls `; "builtin" config from C:\Users\ruturaj_k\AppData\Roaming\npm\node_modules\npm\npmrc
prefix = "C:\\Users\\ruturaj_k\\AppData\\Roaming\\npm"
; node bin location = C:\Program Files\nodejs\node.exe
; cwd = C:\WINDOWS\system32
; HOME = C:\Users\ruturaj_k
; Run `npm config ls -l` to show all defaults.` here
"><pre class="notranslate">npm config ls `<span class="pl-c"><span class="pl-c">;</span> "builtin" config from C:\Users\ruturaj_k\AppData\Roaming\npm\node_modules\npm\npmrc</span>
<span class="pl-k">prefix</span> = <span class="pl-s"><span class="pl-pds">"</span>C:\\Users\\ruturaj_k\\AppData\\Roaming\\npm<span class="pl-pds">"</span></span>
<span class="pl-c"><span class="pl-c">;</span> node bin location = C:\Program Files\nodejs\node.exe</span>
<span class="pl-c"><span class="pl-c">;</span> cwd = C:\WINDOWS\system32</span>
<span class="pl-c"><span class="pl-c">;</span> HOME = C:\Users\ruturaj_k</span>
<span class="pl-c"><span class="pl-c">;</span> Run `npm config ls -l` to show all defaults.` here</span>
</pre></div> | 1 |
<h3 dir="auto">Version</h3>
<p dir="auto">2.5.13</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://jsfiddle.net/x78pz6u1/7/" rel="nofollow">https://jsfiddle.net/x78pz6u1/7/</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<ol dir="auto">
<li>click emit1, alert something, no problem.</li>
<li>click switch.</li>
<li>click emit2, alert again, not expected!</li>
</ol>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">not alert when I click the button emit2</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">alert when I click the button emit2</p>
<hr>
<p dir="auto">not considering the edge case: listeners are removed on component reuse.<br>
perhaps a bug at line 260 in v2.5.13/src/core/instance/lifecycle.js</p> | <h3 dir="auto">Version</h3>
<p dir="auto">2.5.13</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://codepen.io/posva/pen/baeJzd?editors=1111" rel="nofollow">https://codepen.io/posva/pen/baeJzd?editors=1111</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">define a custom component witch emit custom event;<br>
use v-if v-else create 2 component instances;<br>
on first instance use v-on listen the custom event, the second DONOT;<br>
toggle the v-if condition;<br>
emit the custom event on the second instance</p>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">the listener on the first instance not been triggered</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">the listener on the first instance been triggered</p> | 1 |
<p dir="auto">EDIT: title was change from 'HTML Widget' to 'Support for styling text with html markup' after the discussion</p>
<hr>
<p dir="auto">Hello,<br>
I know that the question has been asked before about the possible support for rendering html content simirarly as the native platforms do, and that the answer was that it wasn't planned: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="85864779" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/25" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/25/hovercard" href="https://github.com/flutter/flutter/issues/25">#25</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="197576863" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/7311" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/7311/hovercard" href="https://github.com/flutter/flutter/issues/7311">#7311</a></p>
<p dir="auto">But I've also seen the comment by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/DaveShuckerow/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/DaveShuckerow">@DaveShuckerow</a> from Dec 2017 <a href="https://github.com/flutter/flutter_markdown/issues/19#issuecomment-350358715">https://github.com/flutter/flutter_markdown/issues/19#issuecomment-350358715</a> that there is a plan to release a widget that is being used and developed internally at Google.</p>
<p dir="auto">Being able to show html content is a critical part of our small project now and we don't really have the resources to develop this on our own.<br>
So I would like to ask whether it would be possible for you guys to make that widget available in it's current state? Like a preview version, or even just a gist that we could use clearly at our own risk without any guarantees. It would be a big help for us.</p>
<p dir="auto">(If you didn't want to publish it publicly yet, but maybe can send it in private, my email is: edit: removed)</p>
<p dir="auto">Thanks for any response in advance</p> | <p dir="auto">Presumably this requires some compositor work, similar to maps or video?</p> | 1 |
<p dir="auto">I opened this thread at StackOverflow and had my worst suspicions enforced that this is not idea for my personal private vision (aka use case) for THREE in general.<br>
<a href="http://stackoverflow.com/questions/35075432/how-to-change-a-boxs-dimensions-size-after-creation" rel="nofollow">http://stackoverflow.com/questions/35075432/how-to-change-a-boxs-dimensions-size-after-creation</a></p>
<p dir="auto">I think it would be nice that if in any new THREE<a href="">type</a> declaration you could simple pass it an Object aka JSON with standard format for values and have it create and/or assign them that way is idea for a more transparent implementation (I aspire to achieve).</p>
<p dir="auto">So for BoxGeometry passing an object to the constructor like {dim:{width:1, height:1, depth:1}} (and castShadow etc. would work as well as passing the 3 arguments (+ any others, a benefit). I think it actually exists in "parameters:" and not dim.<br>
This reminds me of what might be another change request where object merging got an error when setting position (in that case doing it per key works [x, y, z] but I still have to check every key for "position" and handle it differently) of a light with this way of constructing the object.</p>
<p dir="auto">I think they should all be callable with nothing THREE<a href="">type</a> and just have defaults. For box it would be 1, 1, 1 and I guess you could scale to size and have that become potentially animated too.<br>
So the question is would the scaling effect children (but I guess that's suppose to go back to StackOverflow where there's a special way to turn that off or something I am recalling), except I'm asking about a better solution for constructors and wondering what superior alternative I'm missing otherwise.</p>
<p dir="auto">Anyway I'm thinking one bit of code can generate all object types from an like so.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="let item = {type:"BoxGemoetry", size:{w:2, h:1, d:5}};
let thing = new THREE[item.type](item);"><pre class="notranslate"><code class="notranslate">let item = {type:"BoxGemoetry", size:{w:2, h:1, d:5}};
let thing = new THREE[item.type](item);
</code></pre></div>
<p dir="auto">and have it skip things it doesn't know like type, maybe a second array of skipKeys, which is self explanatory.</p>
<p dir="auto">Also I feel ideally you should be able to adjust them later, call it reuse. One case might be to pool created objects and then be able to re-purpose and reuse them. Sounds like that's impossible in cases with Geometry without blotting code but would be a nice idea. Geometry like a box should be able to change it's dimensions, no? I'd argue animate, but I'm sensing the confines of GL say otherwise.</p> | <p dir="auto">I was trying to instance a geometry, but i find it too hard to manipulate. The scenario is this. I have a geometry & shader of some over-used thing in my game. But having to manage a lot of instances separately is really difficult when every attribute of every instance is somewhere on an array, and it's even more difficult when you want to destroy some instances and create new ones still drawing the ones you need. I came to the conclusion that is better to add some abstraction layer to this cases, in which i'm interested of program it.</p>
<p dir="auto">I made some idea of the API that i think would be good, to make more developer-friendly instances, that manages by itself all the memory exchange to the GPU. <a href="https://gist.github.com/BrianCraig/9583e688206089f96bbdb5d6735cf0cf">Here</a></p>
<p dir="auto">:)</p> | 0 |
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1296500/5640185/3bbc1552-961a-11e4-9a45-b2145acc2a97.png"><img src="https://cloud.githubusercontent.com/assets/1296500/5640185/3bbc1552-961a-11e4-9a45-b2145acc2a97.png" alt="untitled" style="max-width: 100%;"></a></p> | <p dir="auto">Pasting something like this in the Find box displays incorrectly</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
'use strict';
"><pre class="notranslate"><code class="notranslate">
'use strict';
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/127535/5308709/f7235d2a-7bce-11e4-90c9-a2f6b2f092b8.png"><img src="https://cloud.githubusercontent.com/assets/127535/5308709/f7235d2a-7bce-11e4-90c9-a2f6b2f092b8.png" alt="paste" style="max-width: 100%;"></a></p>
<p dir="auto">It seems like the box gets the height of the content so the overflow hidden doesnt happen.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/127535/5308745/6c95c1ba-7bcf-11e4-9e50-0f76dfc586eb.png"><img src="https://cloud.githubusercontent.com/assets/127535/5308745/6c95c1ba-7bcf-11e4-9e50-0f76dfc586eb.png" alt="css" style="max-width: 100%;"></a></p>
<p dir="auto">Mac 0.152.0</p> | 1 |
<p dir="auto">Hopefully you can see a demonstration here, although it may depend on your browser font sizes: <a href="http://jsbin.com/hofeg/2/edit" rel="nofollow">http://jsbin.com/hofeg/2/edit</a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/754175/3360485/5a8415c4-faf3-11e3-8961-7ebf526d8500.png"><img src="https://cloud.githubusercontent.com/assets/754175/3360485/5a8415c4-faf3-11e3-8961-7ebf526d8500.png" alt="screenshot from 2014-06-23 17 26 24" style="max-width: 100%;"></a></p>
<p dir="auto">If the tooltip appears too close to the edge of the container, then the browser reshapes it to stay inside the container. Tooltip doesn't properly account for this change in size.</p>
<p dir="auto">It seems to attempt to; at the end of applyPlacement it tried to reposition the arrow:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], arrowPosition)"><pre class="notranslate"><code class="notranslate">this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], arrowPosition)
</code></pre></div>
<p dir="auto">Before this line, the arrow is actually in the right place. After it, the arrow has moved to somewhere behind the tooltip, so it's not visible.</p> | <p dir="auto">The placement of the tooltip arrow appears to get cached in some situations, meaning it won't always be centered. Please see a reduced test case: <a href="http://jsfiddle.net/ytD5t/8/" rel="nofollow">http://jsfiddle.net/ytD5t/8/</a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2069528/2751283/3fce9944-c8c0-11e3-9f2b-6d348fde31c7.png"><img src="https://cloud.githubusercontent.com/assets/2069528/2751283/3fce9944-c8c0-11e3-9f2b-6d348fde31c7.png" alt="example" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">For many applications, common metrics are between 0 and 1. e.g. frequency, percentage, proportion, probability. The ability to perform histogram aggregation on decimal values would be great.</p> | <p dir="auto">Fork of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="20297343" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/3810" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/3810/hovercard" href="https://github.com/elastic/elasticsearch/issues/3810">#3810</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="20215776" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/3799" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/3799/hovercard" href="https://github.com/elastic/elasticsearch/issues/3799">#3799</a>. Decimal intervals would be useful for certain data types such as currencies, temperatures, lengths ...</p> | 1 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
import matplotlib.patches as mpatch
fig, ax = plt.subplots()
arrow = mpatch.FancyArrowPatch((0, 0), (0.8, 0.8))
ax.add_artist(arrow)
plt.show()"><pre class="notranslate"><code class="notranslate">import matplotlib.pyplot as plt
import matplotlib.patches as mpatch
fig, ax = plt.subplots()
arrow = mpatch.FancyArrowPatch((0, 0), (0.8, 0.8))
ax.add_artist(arrow)
plt.show()
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6197628/24082308/71201bca-0cbb-11e7-9918-d01673e89db9.png"><img src="https://cloud.githubusercontent.com/assets/6197628/24082308/71201bca-0cbb-11e7-9918-d01673e89db9.png" alt="figure_1" style="max-width: 100%;"></a></p>
<p dir="auto">FancyArrowPatch defaults to <code class="notranslate">arrowstyle='simple'</code>, which according to the docstring should set</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" head_length=0.5,head_width=0.5,tail_width=0.2"><pre class="notranslate"><code class="notranslate"> head_length=0.5,head_width=0.5,tail_width=0.2
</code></pre></div>
<p dir="auto">however, this definitely isn't the case.</p>
<p dir="auto">Current <code class="notranslate">master</code> branch installed from source, python 3.6, OSX.</p> | <h3 dir="auto">Bug report</h3>
<p dir="auto">Adding a <code class="notranslate">FancyArrowPatch</code> to an axis changes the result returned by <code class="notranslate">get_path()</code>. I would expect adding an artist to an axis to have no effect on its path in data co-ordinates.</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
import matplotlib.patches as mpatch
# Create arrow patch
arrow = mpatch.FancyArrowPatch((0, 0), (0, 1))
# Print original path
print(arrow.get_path())
# Add to an axis
fig, ax = plt.subplots()
ax.add_artist(arrow)
# Print new path
print(arrow.get_path())"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">patches</span> <span class="pl-k">as</span> <span class="pl-s1">mpatch</span>
<span class="pl-c"># Create arrow patch</span>
<span class="pl-s1">arrow</span> <span class="pl-c1">=</span> <span class="pl-s1">mpatch</span>.<span class="pl-v">FancyArrowPatch</span>((<span class="pl-c1">0</span>, <span class="pl-c1">0</span>), (<span class="pl-c1">0</span>, <span class="pl-c1">1</span>))
<span class="pl-c"># Print original path</span>
<span class="pl-en">print</span>(<span class="pl-s1">arrow</span>.<span class="pl-en">get_path</span>())
<span class="pl-c"># Add to an axis</span>
<span class="pl-s1">fig</span>, <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>()
<span class="pl-s1">ax</span>.<span class="pl-en">add_artist</span>(<span class="pl-s1">arrow</span>)
<span class="pl-c"># Print new path</span>
<span class="pl-en">print</span>(<span class="pl-s1">arrow</span>.<span class="pl-en">get_path</span>())</pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Path(array([[-0.1 , 0. ],
[-0.1 , 0.25195312],
[-0.1 , 0.50390625],
[-0.25 , 0.50390625],
[-0.125 , 0.75195312],
[ 0. , 1. ],
[ 0.125 , 0.75195312],
[ 0.25 , 0.50390625],
[ 0.1 , 0.50390625],
[ 0.1 , 0.25195312],
[ 0.1 , 0. ],
[-0.1 , 0. ],
[-0.1 , 0. ]]), array([ 1, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 2, 79], dtype=uint8))
Path(array([[ -2.01612903e-04, 5.40924072e-03],
[ -2.01612903e-04, 4.99324011e-01],
[ -2.01612903e-04, 9.93238781e-01],
[ -5.04032258e-04, 9.93238781e-01],
[ -2.52016129e-04, 9.93914224e-01],
[ 0.00000000e+00, 9.94589667e-01],
[ 2.52016129e-04, 9.93914224e-01],
[ 5.04032258e-04, 9.93238781e-01],
[ 2.01612903e-04, 9.93238781e-01],
[ 2.01612903e-04, 4.99324011e-01],
[ 2.01612903e-04, 5.40924072e-03],
[ -2.01612903e-04, 5.40924072e-03],
[ -2.01612903e-04, 5.40924072e-03]]), array([ 1, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 2, 79], dtype=uint8))"><pre class="notranslate"><code class="notranslate">Path(array([[-0.1 , 0. ],
[-0.1 , 0.25195312],
[-0.1 , 0.50390625],
[-0.25 , 0.50390625],
[-0.125 , 0.75195312],
[ 0. , 1. ],
[ 0.125 , 0.75195312],
[ 0.25 , 0.50390625],
[ 0.1 , 0.50390625],
[ 0.1 , 0.25195312],
[ 0.1 , 0. ],
[-0.1 , 0. ],
[-0.1 , 0. ]]), array([ 1, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 2, 79], dtype=uint8))
Path(array([[ -2.01612903e-04, 5.40924072e-03],
[ -2.01612903e-04, 4.99324011e-01],
[ -2.01612903e-04, 9.93238781e-01],
[ -5.04032258e-04, 9.93238781e-01],
[ -2.52016129e-04, 9.93914224e-01],
[ 0.00000000e+00, 9.94589667e-01],
[ 2.52016129e-04, 9.93914224e-01],
[ 5.04032258e-04, 9.93238781e-01],
[ 2.01612903e-04, 9.93238781e-01],
[ 2.01612903e-04, 4.99324011e-01],
[ 2.01612903e-04, 5.40924072e-03],
[ -2.01612903e-04, 5.40924072e-03],
[ -2.01612903e-04, 5.40924072e-03]]), array([ 1, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 2, 79], dtype=uint8))
</code></pre></div>
<p dir="auto"><strong>Expected outcome</strong><br>
Clearly the two paths are different - I expected them to be the same (and I would expect the first one to be the correct one based on the <code class="notranslate">FancyArrowPatch</code> docstring).</p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating System: OSX</li>
<li>Matplotlib Version: master branch</li>
<li>Python Version: 3.6.1</li>
</ul> | 1 |
<p dir="auto">I think the impl is just necessary to get Rust to try to instantiate it (otherwise it assumes it's unused). This may be a duplicate of issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="9721437" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/4363" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/4363/hovercard" href="https://github.com/rust-lang/rust/issues/4363">#4363</a>.</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use std::sync::Mutex;
struct Foo {
foo: Mutex<Option<Foo>>,
}
impl Foo {
fn bar(self) {}
}
fn main() {}"><pre class="notranslate"><span class="pl-k">use</span> std<span class="pl-kos">::</span>sync<span class="pl-kos">::</span><span class="pl-v">Mutex</span><span class="pl-kos">;</span>
<span class="pl-k">struct</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
<span class="pl-c1">foo</span><span class="pl-kos">:</span> <span class="pl-smi">Mutex</span><span class="pl-kos"><</span><span class="pl-smi">Option</span><span class="pl-kos"><</span><span class="pl-smi">Foo</span><span class="pl-kos">></span><span class="pl-kos">></span><span class="pl-kos">,</span>
<span class="pl-kos">}</span>
<span class="pl-k">impl</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
<span class="pl-k">fn</span> <span class="pl-en">bar</span><span class="pl-kos">(</span><span class="pl-smi">self</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<hr>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="task 'rustc' has overflowed its stack"><pre class="notranslate"><span class="pl-c1">task 'rustc' has overflowed its stack</span></pre></div> | <p dir="auto">A struct inside an enum generates a type identifier (as it does outside when used outside an enum).</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="enum S { C {a:int, b:int}};
enum C {};
t.rs:10:4: 10:13 error: duplicate definition of type `C`
t.rs:10 enum C {};
^~~~~~~~~
t.rs:9:13: 9:29 note: first definition of type `C` here
t.rs:9 enum S { C {a:int, b:int}};
^~~~~~~~~~~~~~~~"><pre class="notranslate"><code class="notranslate">enum S { C {a:int, b:int}};
enum C {};
t.rs:10:4: 10:13 error: duplicate definition of type `C`
t.rs:10 enum C {};
^~~~~~~~~
t.rs:9:13: 9:29 note: first definition of type `C` here
t.rs:9 enum S { C {a:int, b:int}};
^~~~~~~~~~~~~~~~
</code></pre></div>
<p dir="auto">In particular the following declaration doesn't typecheck.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="enum S { S {a:int, b:int}};
t.rs:6:13: 6:29 error: duplicate definition of type `S`
t.rs:6 enum S { S {a:int, b:int}};
^~~~~~~~~~~~~~~~
t.rs:6:4: 6:30 note: first definition of type `S` here
t.rs:6 enum S { S {a:int, b:int}}; "><pre class="notranslate"><code class="notranslate">enum S { S {a:int, b:int}};
t.rs:6:13: 6:29 error: duplicate definition of type `S`
t.rs:6 enum S { S {a:int, b:int}};
^~~~~~~~~~~~~~~~
t.rs:6:4: 6:30 note: first definition of type `S` here
t.rs:6 enum S { S {a:int, b:int}};
</code></pre></div>
<p dir="auto">This is inconsistent with the general case in which such is allowed. E.g., both declarations below type check, despite type and value constructors having the same identifier:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="enum S { S(int, int) }
struct S {a:int, b:int};"><pre class="notranslate"><code class="notranslate">enum S { S(int, int) }
struct S {a:int, b:int};
</code></pre></div>
<p dir="auto">As a sidenote, we can't create values of these generated types even if wished to do so for some reason, since the value constructor associated with the struct field is set to create values of the enum type.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="enum S { C {a:int, b:int} };
let k : C = C{a:0, b:0};
t.rs:10:12: 10:13 error: found value name used as a type: DefVariant(syntax::ast::DefId{crate: 0, node: 7}, syntax::ast::DefId{crate: 0, node: 14}, true)
t.rs:10 let k : C = C{a:0, b:0};"><pre class="notranslate"><code class="notranslate">enum S { C {a:int, b:int} };
let k : C = C{a:0, b:0};
t.rs:10:12: 10:13 error: found value name used as a type: DefVariant(syntax::ast::DefId{crate: 0, node: 7}, syntax::ast::DefId{crate: 0, node: 14}, true)
t.rs:10 let k : C = C{a:0, b:0};
</code></pre></div>
<h2 dir="auto"></h2>
<p dir="auto">My tests were performed on v0.8, but the bug was confirmed to be present in 0.9pre. Using Linux, OpenSUSE 13.1</p> | 0 |
<p dir="auto">Apologies in advance if this is a duplicate.</p>
<p dir="auto">This is more about the aesthetics of the notifications (functionally, no problems). Even when I try to create them manually with <code class="notranslate">new Notification("abc")</code>, I get an alert box instead of the notification one.</p>
<p dir="auto">This does not seem like an OS issue as <code class="notranslate">$ notify-send abc xyz</code> and other applications give notifications as expected.</p> | <p dir="auto">Notifications on Ubuntu are shown as alerts instead of regular notification.<br>
Is this how notifications are supposed to look on ubuntu ?<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3478693/3498423/2fdc7930-05f5-11e4-8b37-1d51ac4b4947.png"><img src="https://cloud.githubusercontent.com/assets/3478693/3498423/2fdc7930-05f5-11e4-8b37-1d51ac4b4947.png" alt="ubuntu____running_" style="max-width: 100%;"></a></p> | 1 |
<h2 dir="auto">Bug Report</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I would like to work on a fix!<br>
I have close to zero experience with Babel's internals though. I would not be offended, if you think you can fix it yourself quicklier.</li>
</ul>
<p dir="auto"><strong>Current Behavior</strong><br>
The <code class="notranslate">typescript</code> preset is incompatible with <a href="https://github.com/d3/d3-array/blob/master/src/cumsum.js"><code class="notranslate">d3-array/cumsum.js</code></a>. The issue seems to only occur for arrow functions using the <code class="notranslate">+=</code> operator, nested inside a ternary. When <code class="notranslate">typescript</code> is disabled, the code compiled without any issues.</p>
<p dir="auto"><strong>Input Code</strong></p>
<ul dir="auto">
<li>Original broken <code class="notranslate">d3-array/cumsum.js</code>: <a href="https://babeljs.io/en/repl#?browsers=&build=&builtIns=false&spec=false&loose=true&code_lz=KYDwDg9gTgLgBAE2AMwIYFcA29noHYDGMAlhHnAegLYDO1AFAG6qbrA0A0czrwEyASjgBvAFBxuqKHDpU4AXjgAGLsTxIQC5QG5xcKMBjoo5AGKYIqGADYALAEEoUVAE8AdMigQqTFm06SvPwK8or4SMhqwAh6EgD83AoAfHD0snAA1IoZjHAAPnnKArFwAFyJ8ilp1JnZPGz8TKrqoBkZXPXsQgVFAroAvkA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=es2015%2Ctypescript&prettier=true&targets=&version=7.8.3&externalPlugins=" rel="nofollow">REPL</a></li>
<li>Minimal reproduction: <a href="https://babeljs.io/en/repl#?browsers=&build=&builtIns=false&spec=false&loose=true&code_lz=AwAg_CBuILwHwgBQGcCuBbEBqGUCUIAXFLAsANxA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=es2015%2Ctypescript&prettier=true&targets=&version=7.8.3&externalPlugins=" rel="nofollow">REPL</a></li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="0 ? v => (sum += v) : v => 0;"><pre class="notranslate"><span class="pl-c1">0</span> ? <span class="pl-s1">v</span> <span class="pl-c1">=></span> <span class="pl-kos">(</span><span class="pl-s1">sum</span> <span class="pl-c1">+=</span> <span class="pl-s1">v</span><span class="pl-kos">)</span> : <span class="pl-s1">v</span> <span class="pl-c1">=></span> <span class="pl-c1">0</span><span class="pl-kos">;</span></pre></div>
<blockquote>
<p dir="auto">/repl.ts: Only '=' operator can be used for specifying default value. (1:13)</p>
<blockquote>
<p dir="auto">1 | 0 ? v => (sum += v) : v => 0;</p>
</blockquote>
</blockquote>
<p dir="auto"><strong>Expected behavior/code</strong><br>
Babel should compile the above code with <code class="notranslate">typescript</code> enabled.</p> | <p dir="auto">I use rollup to bundle my app (contains many <code class="notranslate">async</code> functions) to work on IE11 or Safari 10. Here is my babel plugin setting in rollup.config:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="plugins: [
...
resolve(),
commonjs(),
babel({
"babelrc": false,
"runtimeHelpers": true,
exclude: 'node_modules/**',
"plugins": [
"@babel/plugin-external-helpers",
"@babel/plugin-transform-runtime"
],
"presets": [
['@babel/preset-env', {
modules: false,
targets: {
ie: 11,
browsers: 'last 5 versions'
},
useBuiltIns: 'usage',
debug: true,
}]
]
}),
...
]"><pre class="notranslate"><code class="notranslate">plugins: [
...
resolve(),
commonjs(),
babel({
"babelrc": false,
"runtimeHelpers": true,
exclude: 'node_modules/**',
"plugins": [
"@babel/plugin-external-helpers",
"@babel/plugin-transform-runtime"
],
"presets": [
['@babel/preset-env', {
modules: false,
targets: {
ie: 11,
browsers: 'last 5 versions'
},
useBuiltIns: 'usage',
debug: true,
}]
]
}),
...
]
</code></pre></div>
<p dir="auto">Since <code class="notranslate">debug</code> is enabled, I can see the console output has:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Using targets:
{
"android": "4.1",
"chrome": "67",
"edge": "14",
"firefox": "60",
"ie": "11",
"ios": "10",
"opera": "53",
"safari": "10"
}
Using modules transform: false
Using plugins:
transform-template-literals { "android":"4.1", "ie":"11" }
transform-literals { "android":"4.1", "ie":"11" }
transform-function-name { "android":"4.1", "edge":"14", "ie":"11" }
transform-arrow-functions { "android":"4.1", "ie":"11" }
transform-block-scoped-functions { "android":"4.1" }
transform-classes { "android":"4.1", "ie":"11" }
transform-object-super { "android":"4.1", "ie":"11" }
transform-shorthand-properties { "android":"4.1", "ie":"11" }
transform-duplicate-keys { "android":"4.1", "ie":"11" }
transform-computed-properties { "android":"4.1", "ie":"11" }
transform-for-of { "android":"4.1", "edge":"14", "ie":"11" }
transform-sticky-regex { "android":"4.1", "ie":"11" }
transform-dotall-regex { "android":"4.1", "edge":"14", "firefox":"60", "ie":"11", "ios":"10", "safari":"10" }
transform-unicode-regex { "android":"4.1", "ie":"11", "ios":"10", "safari":"10" }
transform-spread { "android":"4.1", "ie":"11" }
transform-parameters { "android":"4.1", "edge":"14", "ie":"11" }
transform-destructuring { "android":"4.1", "edge":"14", "ie":"11" }
transform-block-scoping { "android":"4.1", "ie":"11", "ios":"10", "safari":"10" }
transform-typeof-symbol { "android":"4.1", "ie":"11" }
transform-new-target { "android":"4.1", "ie":"11" }
transform-regenerator { "android":"4.1", "ie":"11" }
transform-exponentiation-operator { "android":"4.1", "ie":"11", "ios":"10", "safari":"10" }
transform-async-to-generator { "android":"4.1", "edge":"14", "ie":"11", "ios":"10", "safari":"10" }
proposal-async-generator-functions { "android":"4.1", "edge":"14", "ie":"11", "ios":"10", "safari":"10" }
proposal-object-rest-spread { "android":"4.1", "edge":"14", "ie":"11", "ios":"10", "safari":"10" }
proposal-unicode-property-regex { "android":"4.1", "edge":"14", "firefox":"60", "ie":"11", "ios":"10", "safari":"10" }
proposal-json-strings { "android":"4.1", "chrome":"67", "edge":"14", "firefox":"60", "ie":"11", "ios":"10", "opera":"53", "safari":"10" }
proposal-optional-catch-binding { "android":"4.1", "edge":"14", "ie":"11", "ios":"10", "safari":"10" }
...
[/Users/rbx0999/project/scilab/src/api/fetch.js] Added following polyfills:
es6.object.keys { "android":"4.1", "ie":"11" }
es6.array.iterator { "android":"4.1", "ie":"11" }
web.dom.iterable { "android":"4.1", "chrome":"67", "edge":"14", "firefox":"60", "ie":"11", "ios":"10", "opera":"53", "safari":"10" }
regenerator-runtime { "android":"4.1", "chrome":"67", "edge":"14", "firefox":"60", "ie":"11", "ios":"10", "opera":"53", "safari":"10" }
..."><pre class="notranslate"><code class="notranslate">Using targets:
{
"android": "4.1",
"chrome": "67",
"edge": "14",
"firefox": "60",
"ie": "11",
"ios": "10",
"opera": "53",
"safari": "10"
}
Using modules transform: false
Using plugins:
transform-template-literals { "android":"4.1", "ie":"11" }
transform-literals { "android":"4.1", "ie":"11" }
transform-function-name { "android":"4.1", "edge":"14", "ie":"11" }
transform-arrow-functions { "android":"4.1", "ie":"11" }
transform-block-scoped-functions { "android":"4.1" }
transform-classes { "android":"4.1", "ie":"11" }
transform-object-super { "android":"4.1", "ie":"11" }
transform-shorthand-properties { "android":"4.1", "ie":"11" }
transform-duplicate-keys { "android":"4.1", "ie":"11" }
transform-computed-properties { "android":"4.1", "ie":"11" }
transform-for-of { "android":"4.1", "edge":"14", "ie":"11" }
transform-sticky-regex { "android":"4.1", "ie":"11" }
transform-dotall-regex { "android":"4.1", "edge":"14", "firefox":"60", "ie":"11", "ios":"10", "safari":"10" }
transform-unicode-regex { "android":"4.1", "ie":"11", "ios":"10", "safari":"10" }
transform-spread { "android":"4.1", "ie":"11" }
transform-parameters { "android":"4.1", "edge":"14", "ie":"11" }
transform-destructuring { "android":"4.1", "edge":"14", "ie":"11" }
transform-block-scoping { "android":"4.1", "ie":"11", "ios":"10", "safari":"10" }
transform-typeof-symbol { "android":"4.1", "ie":"11" }
transform-new-target { "android":"4.1", "ie":"11" }
transform-regenerator { "android":"4.1", "ie":"11" }
transform-exponentiation-operator { "android":"4.1", "ie":"11", "ios":"10", "safari":"10" }
transform-async-to-generator { "android":"4.1", "edge":"14", "ie":"11", "ios":"10", "safari":"10" }
proposal-async-generator-functions { "android":"4.1", "edge":"14", "ie":"11", "ios":"10", "safari":"10" }
proposal-object-rest-spread { "android":"4.1", "edge":"14", "ie":"11", "ios":"10", "safari":"10" }
proposal-unicode-property-regex { "android":"4.1", "edge":"14", "firefox":"60", "ie":"11", "ios":"10", "safari":"10" }
proposal-json-strings { "android":"4.1", "chrome":"67", "edge":"14", "firefox":"60", "ie":"11", "ios":"10", "opera":"53", "safari":"10" }
proposal-optional-catch-binding { "android":"4.1", "edge":"14", "ie":"11", "ios":"10", "safari":"10" }
...
[/Users/rbx0999/project/scilab/src/api/fetch.js] Added following polyfills:
es6.object.keys { "android":"4.1", "ie":"11" }
es6.array.iterator { "android":"4.1", "ie":"11" }
web.dom.iterable { "android":"4.1", "chrome":"67", "edge":"14", "firefox":"60", "ie":"11", "ios":"10", "opera":"53", "safari":"10" }
regenerator-runtime { "android":"4.1", "chrome":"67", "edge":"14", "firefox":"60", "ie":"11", "ios":"10", "opera":"53", "safari":"10" }
...
</code></pre></div>
<p dir="auto">However, <code class="notranslate">async function</code> is still there in the final bundle.js.</p>
<p dir="auto">Here is the devDependencies part of my package.json:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" "@babel/core": "^7.2.2",
"@babel/plugin-external-helpers": "^7.2.0",
"@babel/plugin-transform-runtime": "^7.1.0",
"@babel/preset-env": "^7.2.3",
"rollup": "^0.66.2",
"rollup-plugin-babel": "^4.2.0",
"rollup-plugin-commonjs": "^9.1.8",
"rollup-plugin-node-resolve": "^3.4.0",
..."><pre class="notranslate"><code class="notranslate"> "@babel/core": "^7.2.2",
"@babel/plugin-external-helpers": "^7.2.0",
"@babel/plugin-transform-runtime": "^7.1.0",
"@babel/preset-env": "^7.2.3",
"rollup": "^0.66.2",
"rollup-plugin-babel": "^4.2.0",
"rollup-plugin-commonjs": "^9.1.8",
"rollup-plugin-node-resolve": "^3.4.0",
...
</code></pre></div> | 0 |
<p dir="auto">Right now, this is not supported, but I'm not yet sure if there's a reason behind that. TODO(julie): investigate</p> | <p dir="auto">After <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/angular/angular/commit/a9b1270a5abea7bbbe34a9c357036a6bf3240ae4/hovercard" href="https://github.com/angular/angular/commit/a9b1270a5abea7bbbe34a9c357036a6bf3240ae4"><tt>a9b1270</tt></a> landed, http no longer imports <code class="notranslate">Observable</code> from <code class="notranslate">@reactivex</code> but rather uses one exported by <code class="notranslate">angular2/angular2</code>. This is good since it limits http dependency.</p>
<p dir="auto">Unfortunately we still got a place where Rx is dependent upon directly: in <a href="https://github.com/angular/angular/blob/f54ba3cc1bc6d8f489ff8b56d05e2f47d416c16e/modules/angular2/src/http/backends/mock_backend.ts#L8-L9">mock_backend.ts</a></p>
<p dir="auto">mock_backend imports <code class="notranslate">Subject</code> and <code class="notranslate">ReplaySubject</code>. While we re-exporting <code class="notranslate">Subject</code> on <code class="notranslate">angular2\angular2</code> this is not the case for <code class="notranslate">ReplaySubject</code>. The current situation means that we need to either bundle entire RxJS with http or approach it as an external dependency: neither of the 2 is ideal.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/robwormald/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/robwormald">@robwormald</a> do you see any quick-wins here?</p> | 0 |
<p dir="auto">Testing <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="128487208" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/2218" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/2218/hovercard" href="https://github.com/microsoft/vscode/issues/2218">#2218</a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5047891/12610786/ce4c15da-c4e9-11e5-881c-9ec51d344a9e.png"><img src="https://cloud.githubusercontent.com/assets/5047891/12610786/ce4c15da-c4e9-11e5-881c-9ec51d344a9e.png" alt="image" style="max-width: 100%;"></a></p> | <p dir="auto">I think pretty early on we will get the feature request to support multiple terminals. As soon as you run a program from the terminal, you cannot use it anymore.</p>
<p dir="auto">Maybe we just allow to create new terminals with an action from the terminal panel and show all opened terminals from a dropdown similar to output channels?</p>
<p dir="auto">We did this in Monaco on Azure:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/900690/15492968/e747b8e8-2180-11e6-999f-0e6a822cb5c3.png"><img src="https://cloud.githubusercontent.com/assets/900690/15492968/e747b8e8-2180-11e6-999f-0e6a822cb5c3.png" alt="image" style="max-width: 100%;"></a></p> | 0 |
<h4 dir="auto">Description</h4>
<p dir="auto">Unfortunately, I am not 100% sure, that this is a bug, but the LeaveOneOut cross-validation is at least not behaving as I'd expect.</p>
<h4 dir="auto">Steps/Code to Reproduce</h4>
<p dir="auto">I use this matrix:<br>
R A B C D E F G H<br>
0 149 1 0 0 0 0 0 1 0<br>
1 98 0 1 0 0 0 0 1 0<br>
2 72 0 0 1 0 0 0 1 0<br>
3 74 0 0 0 1 0 0 1 0<br>
4 124 1 0 0 0 0 0 0 1<br>
5 71 0 1 0 0 0 0 0 1<br>
6 53 0 0 1 0 0 0 0 1<br>
7 64 0 0 0 1 0 0 0 1<br>
8 186 1 0 0 0 1 1 1 0<br>
9 127 0 1 0 0 1 1 1 0<br>
10 121 0 0 1 0 1 1 1 0<br>
11 104 0 0 0 1 1 1 1 0<br>
12 98 1 0 0 0 0 1 1 1<br>
13 64 0 1 0 0 0 1 1 1<br>
14 38 0 0 1 0 0 1 1 1<br>
15 17 0 0 0 1 0 1 1 1</p>
<p dir="auto">and this code to fit R by using A-H:</p>
<p dir="auto">import pandas as pd<br>
import numpy as np<br>
import sklearn<br>
from sklearn.cross_decomposition import PLSRegression<br>
from sklearn.metrics import mean_squared_error<br>
from math import sqrt<br>
from sklearn.model_selection import LeaveOneOut<br>
from sklearn.model_selection import cross_val_score</p>
<p dir="auto">df = pd.read_csv('PSLR.csv', delimiter=';') # I read the matrix from file. This is the matrix given above<br>
y = df['R']<br>
X = df[['A','B','C','D','E','F','G','H']]<br>
pls2 = PLSRegression(n_components=3)</p>
<p dir="auto">num_folds = 3<br>
num_instances = len(X)</p>
<p dir="auto">loocv = LeaveOneOut()<br>
results = cross_val_score(pls2, X, y, cv=loocv)<br>
print("Accuracy: %.3f%% (%.3f%%)" % (results.mean()*100.0, results.std()*100.0))<br>
print(results)</p>
<h4 dir="auto">Expected Results</h4>
<p dir="auto">I expected to get a numerical result from the cross validation</p>
<h4 dir="auto">Actual Results</h4>
<p dir="auto">Accuracy: 0.000% (0.000%)<br>
[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]</p>
<h4 dir="auto">Versions</h4>
<p dir="auto">System:<br>
python: 3.7.0 (default, Oct 2 2018, 09:18:58) [Clang 10.0.0 (clang-1000.11.45.2)]<br>
executable: /usr/local/opt/python/bin/python3.7<br>
machine: Darwin-18.2.0-x86_64-i386-64bit</p>
<p dir="auto">BLAS:<br>
macros: NO_ATLAS_INFO=3, HAVE_CBLAS=None<br>
lib_dirs:<br>
cblas_libs: cblas</p>
<p dir="auto">Python deps:<br>
pip: 18.1<br>
setuptools: 40.4.3<br>
sklearn: 0.20.1<br>
numpy: 1.15.4<br>
scipy: 1.1.0<br>
Cython: None<br>
pandas: 0.23.4</p> | <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from sklearn.datasets import make_regression
from sklearn.cross_validation import cross_val_score, LeaveOneOut
from sklearn.linear_model import Ridge
X, y, coef_ = make_regression(random_state=42, noise=1, n_samples=200, coef=True)
cross_val_score(Ridge(), X, y, cv=LeaveOneOut(len(X)))"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">datasets</span> <span class="pl-k">import</span> <span class="pl-s1">make_regression</span>
<span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">cross_validation</span> <span class="pl-k">import</span> <span class="pl-s1">cross_val_score</span>, <span class="pl-v">LeaveOneOut</span>
<span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">linear_model</span> <span class="pl-k">import</span> <span class="pl-v">Ridge</span>
<span class="pl-v">X</span>, <span class="pl-s1">y</span>, <span class="pl-s1">coef_</span> <span class="pl-c1">=</span> <span class="pl-en">make_regression</span>(<span class="pl-s1">random_state</span><span class="pl-c1">=</span><span class="pl-c1">42</span>, <span class="pl-s1">noise</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">n_samples</span><span class="pl-c1">=</span><span class="pl-c1">200</span>, <span class="pl-s1">coef</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-en">cross_val_score</span>(<span class="pl-v">Ridge</span>(), <span class="pl-v">X</span>, <span class="pl-s1">y</span>, <span class="pl-s1">cv</span><span class="pl-c1">=</span><span class="pl-v">LeaveOneOut</span>(<span class="pl-en">len</span>(<span class="pl-v">X</span>)))</pre></div>
<blockquote>
<p dir="auto">array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,<br>
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,<br>
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,<br>
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,<br>
0., 0., 0., 0., 0., 0., 0., 0.])</p>
</blockquote>
<p dir="auto">Maybe the single sample in the LOO is not interpreted correctly? :-/</p> | 1 |
<p dir="auto">The FancyZones zone editor should show the dimensions of each zone in pixels.</p>
<p dir="auto">FancyZones is a tool for perfectionists and my OCD was seriously triggered, when I just had to eyeball the dimensions of the zones.</p> | <h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">Sizing of custom zones in editor by dragging mouse is a little bit coarse (hit and miss) in terms of getting close to edges of screen symmetrically and allowing window edges of multiple zones to line up neatly. Some possible solutions are suggested for consideration.</p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<ol dir="auto">
<li>
<p dir="auto">Perhaps have an option for the editor to snap to a grid of user specified n pixels.</p>
</li>
<li>
<p dir="auto">Perhaps have optional ability to input window dimension and position directly in both absolute terms (n x n pixels) and in terms of percentage of screen width and height.</p>
</li>
</ol> | 1 |
<p dir="auto">Hi,</p>
<p dir="auto">I know this an already open/closed issue but I think bootstrap MUST have a convenient way to load ajax content into modals (and popovers).</p>
<p dir="auto">At the moment I use <a href="https://github.com/Nikku/jquery-bootstrap-scripting">https://github.com/Nikku/jquery-bootstrap-scripting</a> (even done some minor recently merged modifications into it).</p>
<p dir="auto">Could it be the starting point for a further and better integrated work into bootstrap ?</p>
<p dir="auto">A markup driven ajax content loading into modals is definitively a good user experience and an unobtrusive way to do the work without writing pain in the ass javascript code.</p>
<p dir="auto">Please, let's discuss that.</p> | <p dir="auto">Hello,</p>
<p dir="auto">Tabs do not seem to be working for me when used within Popover.</p>
<p dir="auto">What happens is following:</p>
<ol dir="auto">
<li>Popover opens</li>
<li>Active tab on click changes</li>
<li>Tab content is not changing <-- PROBLEM</li>
</ol>
<p dir="auto">Tabs are created correctly and if you try them outside of popover they work fine.</p>
<p dir="auto">Here's live demo: <a href="http://jsfiddle.net/iboros/nCfBf/" rel="nofollow">http://jsfiddle.net/iboros/nCfBf/</a></p>
<p dir="auto">What seems to happen is that elements get duplicated, however it is not clear to me how to effectively eliminate this issue. What I was doing in past is cloning content and changing ids and hrefs but this is ineffective if you want to apply select2.js or something similar on the elements within tab content.</p>
<p dir="auto">I hope somebody provides a solid and effective workaround.</p> | 0 |
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/546ff1d4326a3bba9b892b4fd9a3afaf289c67a74cdae5233da3f583f69dbd31/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313639313438392f39383134302f31666531343730632d363731352d313165322d383930352d6462326366383237353936362e706e67"><img src="https://camo.githubusercontent.com/546ff1d4326a3bba9b892b4fd9a3afaf289c67a74cdae5233da3f583f69dbd31/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313639313438392f39383134302f31666531343730632d363731352d313165322d383930352d6462326366383237353936362e706e67" alt="DB 1 " data-canonical-src="https://f.cloud.github.com/assets/1691489/98140/1fe1470c-6715-11e2-8905-db2cf8275966.png" style="max-width: 100%;"></a></p>
<p dir="auto">Check-boxes in that picture establish CategoryGroupAttr relation. that mean if attr 3 is checked than new entity CategoryGroupAttr should be created with category where we currently in and group 1 and attr 3. what's the best way to create that form. right now i do that in CategoryType:</p>
<p dir="auto">$builder->addEventListener(FormEvents::BIND, function(FormEvent $event) {<br>
$data = $event->getData();<br>
if(null == $data) return;<br>
$form = $event->getForm();</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" $data->removeAllGroupedAttrs();
foreach ($form->get('categorilizedGroups') as $categorilizedGroup)
{
$group = $categorilizedGroup->get('group');
foreach ($group->get('groupedAttributes') as $groupedAttr)
{
$attr = $groupedAttr->get('attribute');
if($attr->get('actived')->getData())
{
// estabilish relation
$categoryGroupAttrReference = new CategoryGroupAttributeRef();
$categoryGroupAttrReference->setAttribute($attr->getData());
$categoryGroupAttrReference->setGroup($group->getData());
$categoryGroupAttrReference->setFiltered((bool)$attr->get('filtered')->getData());
$data->addGroupedAttribute($categoryGroupAttrReference);
}
}
}
});"><pre class="notranslate"><code class="notranslate"> $data->removeAllGroupedAttrs();
foreach ($form->get('categorilizedGroups') as $categorilizedGroup)
{
$group = $categorilizedGroup->get('group');
foreach ($group->get('groupedAttributes') as $groupedAttr)
{
$attr = $groupedAttr->get('attribute');
if($attr->get('actived')->getData())
{
// estabilish relation
$categoryGroupAttrReference = new CategoryGroupAttributeRef();
$categoryGroupAttrReference->setAttribute($attr->getData());
$categoryGroupAttrReference->setGroup($group->getData());
$categoryGroupAttrReference->setFiltered((bool)$attr->get('filtered')->getData());
$data->addGroupedAttribute($categoryGroupAttrReference);
}
}
}
});
</code></pre></div>
<p dir="auto">what's the best way to save that form</p> | <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/f8afddd76dcad51ea9ebd1cbad7a6cd6fa5fc205573deb1a21bf0fc3108417cb/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313639313438392f39383130392f37636437646536652d363731332d313165322d393061632d3161656231616438626463302e706e67"><img src="https://camo.githubusercontent.com/f8afddd76dcad51ea9ebd1cbad7a6cd6fa5fc205573deb1a21bf0fc3108417cb/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313639313438392f39383130392f37636437646536652d363731332d313165322d393061632d3161656231616438626463302e706e67" alt="DB 1 " data-canonical-src="https://f.cloud.github.com/assets/1691489/98109/7cd7de6e-6713-11e2-90ac-1aeb1ad8bdc0.png" style="max-width: 100%;"></a></p>
<p dir="auto">Check-boxes in that picture establish CategoryGroupAttr relation. that mean if attr 3 is checked than new entity CategoryGroupAttr should be created with category where we currently in and group 1 and attr 3. what's the best way to create that form. right now i do that in CategoryType:</p>
<p dir="auto">$builder->addEventListener(FormEvents::BIND, function(FormEvent $event) {<br>
$data = $event->getData();<br>
if(null == $data) return;<br>
$form = $event->getForm();</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" $data->removeAllGroupedAttrs();
foreach ($form->get('categorilizedGroups') as $categorilizedGroup)
{
$group = $categorilizedGroup->get('group');
foreach ($group->get('groupedAttributes') as $groupedAttr)
{
$attr = $groupedAttr->get('attribute');
if($attr->get('actived')->getData())
{
// estabilish relation
$categoryGroupAttrReference = new CategoryGroupAttributeRef();
$categoryGroupAttrReference->setAttribute($attr->getData());
$categoryGroupAttrReference->setGroup($group->getData());
$categoryGroupAttrReference->setFiltered((bool)$attr->get('filtered')->getData());
$data->addGroupedAttribute($categoryGroupAttrReference);
}
}
}
});"><pre class="notranslate"><code class="notranslate"> $data->removeAllGroupedAttrs();
foreach ($form->get('categorilizedGroups') as $categorilizedGroup)
{
$group = $categorilizedGroup->get('group');
foreach ($group->get('groupedAttributes') as $groupedAttr)
{
$attr = $groupedAttr->get('attribute');
if($attr->get('actived')->getData())
{
// estabilish relation
$categoryGroupAttrReference = new CategoryGroupAttributeRef();
$categoryGroupAttrReference->setAttribute($attr->getData());
$categoryGroupAttrReference->setGroup($group->getData());
$categoryGroupAttrReference->setFiltered((bool)$attr->get('filtered')->getData());
$data->addGroupedAttribute($categoryGroupAttrReference);
}
}
}
});
</code></pre></div>
<p dir="auto">what's the best way to save that form</p> | 1 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=gshanky" rel="nofollow">Gowrishankar V</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-5719?redirect=false" rel="nofollow">SPR-5719</a></strong> and commented</p>
<p dir="auto">In my webapp I have multiple PPC configured in different context files. The primary context file is initialized through ContextLoaderListener and others are imported into the primary context xml file.</p>
<p dir="auto">In the primary context file, I have a PPC, which is initializing. Then there are other PPC in context files that are in jars which are initialized through imports. The PPC in those context files are not being initialized. If I remove the PPC from the primary context file, then one of the other PPC is being initialized. From my meddling around the code, it seems like only one PPC would be initialized per Application context, with or without imported context xml files.</p>
<p dir="auto">Currently I am including all the files though the PPC in my primary context file.</p>
<p dir="auto">I am wondering if this is a bug or is this how it is supposed to work?</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5.6</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398099799" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11094" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11094/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11094">#11094</a> Placeholders not resolved when using multiple PropertyPlaceHolderConfigurers (<em><strong>"duplicates"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398099799" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11094" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11094/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11094">#11094</a> Placeholders not resolved when using multiple PropertyPlaceHolderConfigurers</li>
</ul>
<p dir="auto">3 votes, 4 watchers</p> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=gizit" rel="nofollow">Gisbert van Rossum</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6428?redirect=false" rel="nofollow">SPR-6428</a></strong> and commented</p>
<p dir="auto">When using 2 PropertyPlaceHolderConfigurers, placeholders declared (and given a value) in the first PPC are not resolved in the second PPC.</p>
<p dir="auto"><bean id="configurer1" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"><br>
<property name="properties"><br>
<bean class="java.util.Properties"><br>
<constructor-arg><br>
<map><br>
<entry key="resourceDirPlaceHolder"><br>
<value>myResourceDir</value><br>
</entry><br>
</map><br>
</constructor-arg><br>
</bean><br>
</property><br>
<property name="order" value="1"/><br>
<property name="ignoreUnresolvablePlaceholders" value="true"/><br>
</bean><br>
<bean id="configurer2" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"><br>
<property name="locations"><br>
<list><br>
<value>classpath:${resourceDirPlaceHolder}/props.properties</value><br>
</list><br>
</property><br>
</bean></p>
<p dir="auto">this configuration results in:</p>
<p dir="auto">java.io.FileNotFoundException: class path resource [${resourceDirPlaceHolder}/props.properties] cannot be opened because it does not exist</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5.6</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/15954/multiplePPCs.zip" rel="nofollow">multiplePPCs.zip</a> (<em>4.84 kB</em>)</li>
</ul>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398094795" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10389" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10389/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10389">#10389</a> only the first PropertyPlaceHolderConfigurer is initialized. Others are not (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398094795" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10389" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10389/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10389">#10389</a> only the first PropertyPlaceHolderConfigurer is initialized. Others are not</li>
</ul>
<p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-attic/spring-framework-issues/commit/09aea36859bb0d806eb4085a2c154cb781bd8345/hovercard" href="https://github.com/spring-attic/spring-framework-issues/commit/09aea36859bb0d806eb4085a2c154cb781bd8345">spring-attic/spring-framework-issues@<tt>09aea36</tt></a></p>
<p dir="auto">2 votes, 2 watchers</p> | 1 |
<p dir="auto">I installed Superset 2.0.0 via pip. I get the following error when running <code class="notranslate">superset</code> after installation:</p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ superset
...
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'"><pre class="notranslate">$ <span class="pl-s1">superset</span>
<span class="pl-c1">...</span>
<span class="pl-c1">ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'</span></pre></div>
<h4 dir="auto">How to reproduce the bug</h4>
<p dir="auto">I installed Superset via pip in a clean Python 3.8 virtual environment on Linux:</p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ mkdir superset-2.0.0
$ cd superset-2.0.0
$ python3.8 -m venv venv
$ source ./venv/bin/activate
$ pip install --upgrade setuptools pip wheel
$ pip install apache-superset==2.0.0
$ pip install pillow mysqlclient gevent
$ vim superset_config.py
$ export PYTHONPATH=/home/superset/superset-2.0.0
$ export FLASK_APP=superset
$ superset
...
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'"><pre class="notranslate">$ <span class="pl-s1">mkdir superset-2.0.0</span>
$ <span class="pl-s1"><span class="pl-c1">cd</span> superset-2.0.0</span>
$ <span class="pl-s1">python3.8 -m venv venv</span>
$ <span class="pl-s1"><span class="pl-c1">source</span> ./venv/bin/activate</span>
$ <span class="pl-s1">pip install --upgrade setuptools pip wheel</span>
$ <span class="pl-s1">pip install apache-superset==2.0.0</span>
$ <span class="pl-s1">pip install pillow mysqlclient gevent</span>
$ <span class="pl-s1">vim superset_config.py</span>
$ <span class="pl-s1"><span class="pl-k">export</span> PYTHONPATH=/home/superset/superset-2.0.0</span>
$ <span class="pl-s1"><span class="pl-k">export</span> FLASK_APP=superset</span>
$ <span class="pl-s1">superset</span>
<span class="pl-c1">...</span>
<span class="pl-c1">ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'</span></pre></div>
<h3 dir="auto">Expected results</h3>
<p dir="auto">Superset runs without error.</p>
<h3 dir="auto">Actual results</h3>
<p dir="auto">Superset crashes with Python <code class="notranslate">ModuleNotFoundError</code>.</p>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>superset version: Superset 2.0.0</li>
<li>python version: Python 3.8.10</li>
</ul>
<h3 dir="auto">Checklist</h3>
<p dir="auto">Make sure to follow these steps before submitting your issue - thank you!</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the superset logs for python stacktraces and included it here as text if there are any.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have reproduced the issue with at least the latest released version of superset.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the issue tracker for the same issue and I haven't found one similar.</li>
</ul>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">I notice that <code class="notranslate">requirements/base.txt</code> lists <code class="notranslate">werkzeug==2.0.3</code> so I installed that manually and superset runs fine after.</p> | <p dir="auto"><strong>Is your feature request related to a problem? Please describe.</strong><br>
My problem arises when I want to create a chart that responds to filters in the dashboard in a customized way, making use of the templating engine and the filter_values() function.<br>
I usually know what SQL query I need, so I go to SQL Lab, write the query with the filter_values() function already included, and... no values are returned. I can't "explore" the results and create my chart!<br>
What I usually do (which is what frustrates me) is: I create a version of the query which returns some results (with placeholder values for the filters), and then in the chart I edit my datasource and add all the filter_values() lines.</p>
<p dir="auto"><strong>Describe the solution you'd like</strong><br>
I would like it to be possible to add datasources directly from SQL code, with a better interface for changing these datasources (currently it's a tiny text box when I click the grey Datasource box in the Chart tab).<br>
I would also like to be able to name these datasources something other than <em>null.my_username-query_name-random_string</em>.</p>
<p dir="auto"><strong>Describe alternatives you've considered</strong><br>
An alternative would be allowing the user to "explore" queries that return no results directly from SQL Lab, because queries with the filter_values() function can only ever return results when inside a dashboard with the respective filters.</p>
<p dir="auto"><strong>Additional context</strong><br>
None.</p> | 0 |
<p dir="auto">font family is :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Monaco,Droid Sans Mono, Droid Sans Fallback"><pre class="notranslate"><code class="notranslate">Monaco,Droid Sans Mono, Droid Sans Fallback
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/4103690/8471948/9665208a-20cf-11e5-9c5c-919ba15714d2.png"><img src="https://cloud.githubusercontent.com/assets/4103690/8471948/9665208a-20cf-11e5-9c5c-919ba15714d2.png" alt="deepinscrot-3111" style="max-width: 100%;"></a></p> | <p dir="auto">My OS openSUSE 13.2 (Harlequin) (x86_64) 64 位 with GNOME 3.14.2<br>
Atom is 0.190.0<br>
markdown-preview 0.148.0</p>
<div class="highlight highlight-text-md notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#ymsWebClient
###build dist
1. 手工删当前的额dist文件夹
2. 项目根目录下执行命令
`
gulp build
`"><pre class="notranslate">#ymsWebClient
###build dist
<span class="pl-s">1</span><span class="pl-v">.</span> 手工删当前的额dist文件夹
<span class="pl-s">2</span><span class="pl-v">.</span> 项目根目录下执行命令
`
gulp build
`</pre></div>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<h1 id="ymswebclient">ymsWebClient</h1>
<h3 id="build-dist">build dist</h3>
<ol>
<li><p>手工删当前的额dist文件夹</p>
</li>
<li><p>项目根目录下执行命令
<code style="font-family: DejaVu Sans Mono,Source Code Pro,WenQuanYi Micro Hei;">gulp build</code></p>
</li>
</ol>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">h1</span> <span class="pl-c1">id</span>="<span class="pl-s">ymswebclient</span>"<span class="pl-kos">></span>ymsWebClient<span class="pl-kos"></</span><span class="pl-ent">h1</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h3</span> <span class="pl-c1">id</span>="<span class="pl-s">build-dist</span>"<span class="pl-kos">></span>build dist<span class="pl-kos"></</span><span class="pl-ent">h3</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">ol</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span><span class="pl-kos"><</span><span class="pl-ent">p</span><span class="pl-kos">></span>手工删当前的额dist文件夹<span class="pl-kos"></</span><span class="pl-ent">p</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span><span class="pl-kos"><</span><span class="pl-ent">p</span><span class="pl-kos">></span>项目根目录下执行命令
<span class="pl-kos"><</span><span class="pl-ent">code</span> <span class="pl-c1">style</span>="<span class="pl-s">font-family: DejaVu Sans Mono,Source Code Pro,WenQuanYi Micro Hei;</span>"<span class="pl-kos">></span>gulp build<span class="pl-kos"></</span><span class="pl-ent">code</span><span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">p</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">ol</span><span class="pl-kos">></span></pre></div>
<p dir="auto">But privew is <a target="_blank" rel="noopener noreferrer nofollow" href="https://raw.githubusercontent.com/mingjunyang/myvimconf4c/master/2015-04-08.png"><img src="https://raw.githubusercontent.com/mingjunyang/myvimconf4c/master/2015-04-08.png" alt="image" style="max-width: 100%;"></a><br>
config.cson</p>
<div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""*":
"exception-reporting":
userId: "3c3323ae-d7b7-8749-bdce-32c65bf202da"
welcome:
showOnStartup: false
core:
disabledPackages: [
"welcome"
"language-r"
"javascript-snippets"
"git-diff-details"
]
themes: [
"atom-dark-ui"
"solarized-dark-syntax"
]
projectHome: "/home/mingjunyang/git"
editor:
invisibles: {}
showIndentGuide: true
tabLength: 4
zoomFontWhenCtrlScrolling: false
softWrap: true
fontFamily: "DejaVu Sans Mono,Source Code Pro,WenQuanYi Micro Hei"
fontSize: 22
"atom-beautify":
_analyticsUserId: "9821831b-a2aa-4903-a52f-3599aea0f6c0"
js_keep_function_indentation: true
css_newline_between_rules: true
css_selector_separator_newline: true
minimap:
plugins:
"git-diff": false
"language-context-free":
variation: "A"
"todo-show":
ignoreThesePaths: [
"/node_modules/"
"/.git/"
"/app/bower_components/"
"/app/dist/"
]
"tree-view":
hideVcsIgnoredFiles: true
"css-color-highlight": {}
"atom-color-highlight": {}
"autocomplete-plus": {}
"autocomplete-clang":
preCompiledHeaders: {}
std: {}
"markdown-preview": {}"><pre class="notranslate"><span class="pl-s"><span class="pl-pds">"</span>*<span class="pl-pds">"</span></span><span class="pl-k">:</span>
<span class="pl-s"><span class="pl-pds">"</span>exception-reporting<span class="pl-pds">"</span></span><span class="pl-k">:</span>
<span class="pl-v">userId</span><span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">"</span>3c3323ae-d7b7-8749-bdce-32c65bf202da<span class="pl-pds">"</span></span>
<span class="pl-v">welcome</span><span class="pl-k">:</span>
<span class="pl-v">showOnStartup</span><span class="pl-k">:</span> <span class="pl-c1">false</span>
<span class="pl-v">core</span><span class="pl-k">:</span>
<span class="pl-v">disabledPackages</span><span class="pl-k">:</span> [
<span class="pl-s"><span class="pl-pds">"</span>welcome<span class="pl-pds">"</span></span>
<span class="pl-s"><span class="pl-pds">"</span>language-r<span class="pl-pds">"</span></span>
<span class="pl-s"><span class="pl-pds">"</span>javascript-snippets<span class="pl-pds">"</span></span>
<span class="pl-s"><span class="pl-pds">"</span>git-diff-details<span class="pl-pds">"</span></span>
]
<span class="pl-v">themes</span><span class="pl-k">:</span> [
<span class="pl-s"><span class="pl-pds">"</span>atom-dark-ui<span class="pl-pds">"</span></span>
<span class="pl-s"><span class="pl-pds">"</span>solarized-dark-syntax<span class="pl-pds">"</span></span>
]
<span class="pl-v">projectHome</span><span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">"</span>/home/mingjunyang/git<span class="pl-pds">"</span></span>
<span class="pl-v">editor</span><span class="pl-k">:</span>
<span class="pl-v">invisibles</span><span class="pl-k">:</span> {}
<span class="pl-v">showIndentGuide</span><span class="pl-k">:</span> <span class="pl-c1">true</span>
<span class="pl-v">tabLength</span><span class="pl-k">:</span> <span class="pl-c1">4</span>
<span class="pl-v">zoomFontWhenCtrlScrolling</span><span class="pl-k">:</span> <span class="pl-c1">false</span>
<span class="pl-v">softWrap</span><span class="pl-k">:</span> <span class="pl-c1">true</span>
<span class="pl-v">fontFamily</span><span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">"</span>DejaVu Sans Mono,Source Code Pro,WenQuanYi Micro Hei<span class="pl-pds">"</span></span>
<span class="pl-v">fontSize</span><span class="pl-k">:</span> <span class="pl-c1">22</span>
<span class="pl-s"><span class="pl-pds">"</span>atom-beautify<span class="pl-pds">"</span></span><span class="pl-k">:</span>
<span class="pl-v">_analyticsUserId</span><span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">"</span>9821831b-a2aa-4903-a52f-3599aea0f6c0<span class="pl-pds">"</span></span>
<span class="pl-v">js_keep_function_indentation</span><span class="pl-k">:</span> <span class="pl-c1">true</span>
<span class="pl-v">css_newline_between_rules</span><span class="pl-k">:</span> <span class="pl-c1">true</span>
<span class="pl-v">css_selector_separator_newline</span><span class="pl-k">:</span> <span class="pl-c1">true</span>
<span class="pl-v">minimap</span><span class="pl-k">:</span>
<span class="pl-v">plugins</span><span class="pl-k">:</span>
<span class="pl-s"><span class="pl-pds">"</span>git-diff<span class="pl-pds">"</span></span><span class="pl-k">:</span> <span class="pl-c1">false</span>
<span class="pl-s"><span class="pl-pds">"</span>language-context-free<span class="pl-pds">"</span></span><span class="pl-k">:</span>
<span class="pl-v">variation</span><span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">"</span>A<span class="pl-pds">"</span></span>
<span class="pl-s"><span class="pl-pds">"</span>todo-show<span class="pl-pds">"</span></span><span class="pl-k">:</span>
<span class="pl-v">ignoreThesePaths</span><span class="pl-k">:</span> [
<span class="pl-s"><span class="pl-pds">"</span>/node_modules/<span class="pl-pds">"</span></span>
<span class="pl-s"><span class="pl-pds">"</span>/.git/<span class="pl-pds">"</span></span>
<span class="pl-s"><span class="pl-pds">"</span>/app/bower_components/<span class="pl-pds">"</span></span>
<span class="pl-s"><span class="pl-pds">"</span>/app/dist/<span class="pl-pds">"</span></span>
]
<span class="pl-s"><span class="pl-pds">"</span>tree-view<span class="pl-pds">"</span></span><span class="pl-k">:</span>
<span class="pl-v">hideVcsIgnoredFiles</span><span class="pl-k">:</span> <span class="pl-c1">true</span>
<span class="pl-s"><span class="pl-pds">"</span>css-color-highlight<span class="pl-pds">"</span></span><span class="pl-k">:</span> {}
<span class="pl-s"><span class="pl-pds">"</span>atom-color-highlight<span class="pl-pds">"</span></span><span class="pl-k">:</span> {}
<span class="pl-s"><span class="pl-pds">"</span>autocomplete-plus<span class="pl-pds">"</span></span><span class="pl-k">:</span> {}
<span class="pl-s"><span class="pl-pds">"</span>autocomplete-clang<span class="pl-pds">"</span></span><span class="pl-k">:</span>
<span class="pl-v">preCompiledHeaders</span><span class="pl-k">:</span> {}
<span class="pl-v">std</span><span class="pl-k">:</span> {}
<span class="pl-s"><span class="pl-pds">"</span>markdown-preview<span class="pl-pds">"</span></span><span class="pl-k">:</span> {}</pre></div> | 1 |
<h5 dir="auto">Description of the problem</h5>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="267376966" data-permission-text="Title is private" data-url="https://github.com/mrdoob/three.js/issues/12458" data-hovercard-type="pull_request" data-hovercard-url="/mrdoob/three.js/pull/12458/hovercard" href="https://github.com/mrdoob/three.js/pull/12458">#12458</a> "Fix FileLoader duplicate request issues" seems to have introduced a new problem. When the same file is loaded with high frequency and ArrayBuffers are used then this message is likely to appear:</p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Uncaught DOMException ... ArrayBuffer at index 0 is already neutered."><pre class="notranslate"><span class="pl-c1">Uncaught DOMException ... ArrayBuffer at index 0 is already neutered.</span></pre></div>
<p dir="auto">You can reproduce this easily with example <code class="notranslate">webgl_loader_obj2_run_director</code>. Select a high worker count; minimum 4 better 8 or 12. Watch the log for the appearance of the error. Due to the DOMException the worker feed gets stalled.</p>
<p dir="auto">When I revert to r87 the issue is gone. I have a potential fix, but I am not 100% sure why it works:<br>
<a href="https://github.com/kaisalmen/three.js/blob/FileLoaderRegression/src/loaders/FileLoader.js">https://github.com/kaisalmen/three.js/blob/FileLoaderRegression/src/loaders/FileLoader.js</a></p>
<p dir="auto">I made <code class="notranslate">loading</code> a member of <code class="notranslate">FileLoader</code> and I think due to the now existing dependency memory of the two objects is no longer released independently. <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/takahirox/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/takahirox">@takahirox</a> do you mind have a look?</p>
<p dir="auto">Kai</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r89</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r88</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
</ul>
<h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5> | <p dir="auto"><code class="notranslate">ConvexGeometry</code> appears to be generating extra internal faces.</p>
<p dir="auto">There are calls to <code class="notranslate">Math.random()</code> in the algorithm, so the output is not deterministic. Several refreshes may be required to see the issue.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1000017/22177846/9443983c-dff4-11e6-98c0-e17d0300c5ab.png"><img src="https://cloud.githubusercontent.com/assets/1000017/22177846/9443983c-dff4-11e6-98c0-e17d0300c5ab.png" alt="screen shot 2017-01-21 at 4 07 37 pm" style="max-width: 100%;"></a></p>
<p dir="auto">Only tested on macOS.</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> r82 and later</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li>
</ul>
<p dir="auto">/ping <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Mugen87/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Mugen87">@Mugen87</a> Maybe this problem would interest you? ;-)</p> | 0 |
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => 3.4.2</li>
<li>Operating System / Platform => Any</li>
<li>Compiler => Any</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Is there any developer discussion about not only including OpenVino's inference engine, but making it the default back-end when it is included? I went to enable this back end and ended up swimming in legal documents using scary terms about patent rights and such. So, I'm trying to figure out where the developer discussion about this took place to maybe help me understand the legal implications of leaning on apparently proprietary and patent-encumbered dependencies.</p>
<p dir="auto">I wasn't sure whether to discuss this here or on the answer site, but just in case, I've opened the same discussion <a href="http://answers.opencv.org/question/197273/license-discussion-around-including-intel-reference-engine/" rel="nofollow">there as well</a>.</p>
<p dir="auto">Please feel free to close this out if the answers site is the better site.</p>
<h5 dir="auto">Steps to reproduce</h5>
<ul dir="auto">
<li>Try to enable Intel inference engine.</li>
<li>Start a gofundme to go back to school for the next decade to become a lawyer in order to determine how much of your soul the engine requires, how many of your descendants it includes, or if you'll be filing for bankruptcy soon.</li>
</ul> | <p dir="auto">Hi, all<br>
I'm trying to detect if the camera is unplugged, I tried to use the result of <code class="notranslate">VideoCaputre::grab()</code>, <code class="notranslate">VideoCaputre::retrieve()</code> and <code class="notranslate">VideoCaputre::isOpened()</code>, but not work. The return values are both true when I unplug the camera. Here is the program:</p>
<div class="highlight highlight-source-c++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#include <iostream>
#include <signal.h>
#include <unistd.h>
#include <exception>
#include <opencv2/opencv.hpp>
bool running;
cv::VideoCapture camera;
void clear(int signo)
{
std::cout << std::endl;
std::cout << "faceDetect exit....." << std::endl;
running = false;
camera.release();
std::cout << "done!\n" << std::endl;
exit(0);
}
int main()
{
cv::Mat rawImage, bImage;
signal(SIGINT, clear);
signal(SIGTERM, clear);
camera.open(1);
if(!camera.isOpened())
{
std::cout << "Error, camera is not connected!" << std::endl;
}
running = true;
int result;
while(running)
{
result = camera.isOpened();
std::cout << "isOpened: " << result << " ";
result = camera.grab();
std::cout << "Grab: " << result << " ";
result = camera.retrieve(rawImage);
std::cout << "Retrieve: " << result << " ";
result = rawImage.empty();
std::cout << "isEmpty: " << result << std::endl;
cv::imshow("la", rawImage);
cv::waitKey(100);
}
return 0;
}"><pre class="notranslate">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds"><</span>iostream<span class="pl-pds">></span></span>
#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds"><</span>signal.h<span class="pl-pds">></span></span>
#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds"><</span>unistd.h<span class="pl-pds">></span></span>
#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds"><</span>exception<span class="pl-pds">></span></span>
#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds"><</span>opencv2/opencv.hpp<span class="pl-pds">></span></span>
<span class="pl-k">bool</span> running;
cv::VideoCapture camera;
<span class="pl-k">void</span> <span class="pl-en">clear</span>(<span class="pl-k">int</span> signo)
{
std::cout << std::endl;
std::cout << <span class="pl-s"><span class="pl-pds">"</span>faceDetect exit.....<span class="pl-pds">"</span></span> << std::endl;
running = <span class="pl-c1">false</span>;
camera.<span class="pl-c1">release</span>();
std::cout << <span class="pl-s"><span class="pl-pds">"</span>done!<span class="pl-cce">\n</span><span class="pl-pds">"</span></span> << std::endl;
<span class="pl-c1">exit</span>(<span class="pl-c1">0</span>);
}
<span class="pl-k">int</span> <span class="pl-en">main</span>()
{
cv::Mat rawImage, bImage;
<span class="pl-c1">signal</span>(SIGINT, clear);
<span class="pl-c1">signal</span>(SIGTERM, clear);
camera.<span class="pl-c1">open</span>(<span class="pl-c1">1</span>);
<span class="pl-k">if</span>(!camera.<span class="pl-c1">isOpened</span>())
{
std::cout << <span class="pl-s"><span class="pl-pds">"</span>Error, camera is not connected!<span class="pl-pds">"</span></span> << std::endl;
}
running = <span class="pl-c1">true</span>;
<span class="pl-k">int</span> result;
<span class="pl-k">while</span>(running)
{
result = camera.<span class="pl-c1">isOpened</span>();
std::cout << <span class="pl-s"><span class="pl-pds">"</span>isOpened: <span class="pl-pds">"</span></span> << result << <span class="pl-s"><span class="pl-pds">"</span> <span class="pl-pds">"</span></span>;
result = camera.<span class="pl-c1">grab</span>();
std::cout << <span class="pl-s"><span class="pl-pds">"</span>Grab: <span class="pl-pds">"</span></span> << result << <span class="pl-s"><span class="pl-pds">"</span> <span class="pl-pds">"</span></span>;
result = camera.<span class="pl-c1">retrieve</span>(rawImage);
std::cout << <span class="pl-s"><span class="pl-pds">"</span>Retrieve: <span class="pl-pds">"</span></span> << result << <span class="pl-s"><span class="pl-pds">"</span> <span class="pl-pds">"</span></span>;
result = rawImage.<span class="pl-c1">empty</span>();
std::cout << <span class="pl-s"><span class="pl-pds">"</span>isEmpty: <span class="pl-pds">"</span></span> << result << std::endl;
<span class="pl-c1">cv::imshow</span>(<span class="pl-s"><span class="pl-pds">"</span>la<span class="pl-pds">"</span></span>, rawImage);
<span class="pl-c1">cv::waitKey</span>(<span class="pl-c1">100</span>);
}
<span class="pl-k">return</span> <span class="pl-c1">0</span>;
}</pre></div>
<h3 dir="auto">result:</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0"><pre class="notranslate">isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0</pre></div>
<p dir="auto">when I unplug the camera:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0"><pre class="notranslate">isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1 Grab: 1 Retrieve: 1 isEmpty: 0</pre></div>
<p dir="auto">Did I use wrong way to get status of camera??</p> | 0 |
<p dir="auto"><strong>Apache Airflow version</strong>: 1.10.12<br>
<strong>Environment</strong>: VMware VM<br>
<strong>Cloud provider or hardware configuration</strong>: 8 G RAM, 50G HDD, 4Cores<br>
<strong>OS</strong>:<br>
NAME="CentOS Linux"<br>
VERSION="7 (Core)"<br>
ID="centos"<br>
ID_LIKE="rhel fedora"<br>
VERSION_ID="7"<br>
PRETTY_NAME="CentOS Linux 7 (Core)"<br>
ANSI_COLOR="0;31"<br>
CPE_NAME="cpe:/o:centos:centos:7"<br>
HOME_URL="<a href="https://www.centos.org/" rel="nofollow">https://www.centos.org/</a>"<br>
BUG_REPORT_URL="<a href="https://bugs.centos.org/" rel="nofollow">https://bugs.centos.org/</a>"</p>
<p dir="auto">CENTOS_MANTISBT_PROJECT="CentOS-7"<br>
CENTOS_MANTISBT_PROJECT_VERSION="7"<br>
REDHAT_SUPPORT_PRODUCT="centos"<br>
REDHAT_SUPPORT_PRODUCT_VERSION="7"<br>
<strong>Kernel</strong>:<br>
Linux mycentosvm 3.10.0-1160.6.1.el7.x86_64 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="69689814" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/1" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/1/hovercard" href="https://github.com/apache/airflow/pull/1">#1</a> SMP Tue Nov 17 13:59:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux<br>
<strong>Install tools</strong>:<br>
yum groupinstall "Development tools"<br>
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel python3-devel wget gcc gcc-c++ libffi-devel cyrus-sasl-devel<br>
yum install mysql-server [version8]<br>
[set global_explicit, create airflow database and user then give permissions]<br>
alternative python 3.7 [pip 20.2.4 setuptools 47.1.0 ]</p>
<p dir="auto"><strong>What happened</strong>:<br>
All kinds of errors:<br>
I copied <code class="notranslate">https://raw.githubusercontent.com/apache/airflow/constraints-1.10.12/constraints-3.7.txt</code> to a file called <code class="notranslate">req.txt</code> to be able to change the dependencies</p>
<ol dir="auto">
<li>Error1:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: Could not satisfy constraints for 'pyhive': installation from path or url cannot be constrained to a version"><pre class="notranslate"><code class="notranslate">ERROR: Could not satisfy constraints for 'pyhive': installation from path or url cannot be constrained to a version
</code></pre></div>
<p dir="auto">My solution1:<br>
Install specified pyhive manually</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip install PyHive==0.6.3"><pre class="notranslate"><code class="notranslate">pip install PyHive==0.6.3
</code></pre></div>
<ol start="2" dir="auto">
<li>Error2:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: Cannot install apache-airflow, apache-airflow and apache-airflow because these package versions have conflicting dependencies.
The conflict is caused by:
email-validator 1.1.1 depends on idna>=2.0.0
requests 2.24.0 depends on idna<3 and >=2.5
moto 1.3.14 depends on idna<2.9 and >=2.5
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies"><pre class="notranslate"><code class="notranslate">ERROR: Cannot install apache-airflow, apache-airflow and apache-airflow because these package versions have conflicting dependencies.
The conflict is caused by:
email-validator 1.1.1 depends on idna>=2.0.0
requests 2.24.0 depends on idna<3 and >=2.5
moto 1.3.14 depends on idna<2.9 and >=2.5
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
</code></pre></div>
<p dir="auto">My solution2:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip install idna==2.9"><pre class="notranslate"><code class="notranslate">pip install idna==2.9
</code></pre></div>
<ol start="3" dir="auto">
<li>Error3:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: Cannot install apache-airflow[async,celery,devel,devel-hadoop,druid,hdfs,hive,jdbc,mysql,rabbitmq,ssh] 1.10.12, apache-airflow and apache-airflow because these package versions have conflicting dependencies.
The conflict is caused by:
apache-airflow[async,celery,devel,devel-hadoop,druid,hdfs,hive,jdbc,mysql,rabbitmq,ssh] 1.10.12 depends on pytest<6.0.0; extra == "devel_hadoop"
pytest-rerunfailures 9.0 depends on pytest>=5.0
pytest-xdist 2.0.0 depends on pytest>=6.0.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies"><pre class="notranslate"><code class="notranslate">ERROR: Cannot install apache-airflow[async,celery,devel,devel-hadoop,druid,hdfs,hive,jdbc,mysql,rabbitmq,ssh] 1.10.12, apache-airflow and apache-airflow because these package versions have conflicting dependencies.
The conflict is caused by:
apache-airflow[async,celery,devel,devel-hadoop,druid,hdfs,hive,jdbc,mysql,rabbitmq,ssh] 1.10.12 depends on pytest<6.0.0; extra == "devel_hadoop"
pytest-rerunfailures 9.0 depends on pytest>=5.0
pytest-xdist 2.0.0 depends on pytest>=6.0.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
</code></pre></div>
<p dir="auto">My solution3:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip install pytest==6.0.0"><pre class="notranslate"><code class="notranslate">pip install pytest==6.0.0
</code></pre></div>
<ol start="4" dir="auto">
<li>Error4:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Downloading eventlet-0.14.0.tar.gz (279 kB)
|████████████████████████████████| 279 kB 404 kB/s
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ozxuwjov/eventlet_711991891ddc448ba8dd97630910301c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ozxuwjov/eventlet_711991891ddc448ba8dd97630910301c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-aw4qpa8h
cwd: /tmp/pip-install-ozxuwjov/eventlet_711991891ddc448ba8dd97630910301c/
Complete output (8 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-ozxuwjov/eventlet_711991891ddc448ba8dd97630910301c/setup.py", line 3, in <module>
from eventlet import __version__
File "/tmp/pip-install-ozxuwjov/eventlet_711991891ddc448ba8dd97630910301c/eventlet/__init__.py", line 42
except ImportError, e:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output."><pre class="notranslate"><code class="notranslate"> Downloading eventlet-0.14.0.tar.gz (279 kB)
|████████████████████████████████| 279 kB 404 kB/s
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ozxuwjov/eventlet_711991891ddc448ba8dd97630910301c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ozxuwjov/eventlet_711991891ddc448ba8dd97630910301c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-aw4qpa8h
cwd: /tmp/pip-install-ozxuwjov/eventlet_711991891ddc448ba8dd97630910301c/
Complete output (8 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-ozxuwjov/eventlet_711991891ddc448ba8dd97630910301c/setup.py", line 3, in <module>
from eventlet import __version__
File "/tmp/pip-install-ozxuwjov/eventlet_711991891ddc448ba8dd97630910301c/eventlet/__init__.py", line 42
except ImportError, e:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
</code></pre></div>
<p dir="auto">My solution4:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" pip install eventlet==0.29.1 "><pre class="notranslate"><code class="notranslate"> pip install eventlet==0.29.1
</code></pre></div>
<ol start="5" dir="auto">
<li>Error5:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bitmq,ssh]==1.10.12) (0.4.17)
ERROR: Could not find a version that satisfies the requirement pytest<6.0.0; extra == "devel_hadoop" (from apache-airflow[async,celery,devel,devel-hadoop,druid,hdfs,hive,jdbc,mysql,rabbitmq,ssh])
ERROR: No matching distribution found for pytest<6.0.0; extra == "devel_hadoop""><pre class="notranslate"><code class="notranslate">bitmq,ssh]==1.10.12) (0.4.17)
ERROR: Could not find a version that satisfies the requirement pytest<6.0.0; extra == "devel_hadoop" (from apache-airflow[async,celery,devel,devel-hadoop,druid,hdfs,hive,jdbc,mysql,rabbitmq,ssh])
ERROR: No matching distribution found for pytest<6.0.0; extra == "devel_hadoop"
</code></pre></div>
<p dir="auto">then install older version and i get this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Downloading paramiko-2.7.1-py2.py3-none-any.whl (206 kB)
|████████████████████████████████| 206 kB 377 kB/s
Collecting pytest-xdist
Using cached pytest_xdist-2.0.0-py2.py3-none-any.whl (36 kB)
ERROR: Cannot install apache-airflow[async,celery,devel,devel-hadoop,druid,hdfs,hive,jdbc,mysql,rabbitmq,ssh] 1.10.12 and apache-airflow because these package versions have conflicting dependencies.
The conflict is caused by:
apache-airflow[async,celery,devel,devel-hadoop,druid,hdfs,hive,jdbc,mysql,rabbitmq,ssh] 1.10.12 depends on pytest<6.0.0; extra == "devel_hadoop"
pytest-xdist 2.0.0 depends on pytest>=6.0.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies"><pre class="notranslate"><code class="notranslate"> Downloading paramiko-2.7.1-py2.py3-none-any.whl (206 kB)
|████████████████████████████████| 206 kB 377 kB/s
Collecting pytest-xdist
Using cached pytest_xdist-2.0.0-py2.py3-none-any.whl (36 kB)
ERROR: Cannot install apache-airflow[async,celery,devel,devel-hadoop,druid,hdfs,hive,jdbc,mysql,rabbitmq,ssh] 1.10.12 and apache-airflow because these package versions have conflicting dependencies.
The conflict is caused by:
apache-airflow[async,celery,devel,devel-hadoop,druid,hdfs,hive,jdbc,mysql,rabbitmq,ssh] 1.10.12 depends on pytest<6.0.0; extra == "devel_hadoop"
pytest-xdist 2.0.0 depends on pytest>=6.0.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
</code></pre></div>
<p dir="auto">I even don't know any of my solutions even work!</p>
<p dir="auto"><strong>How to reproduce it</strong>:<br>
Run this command</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pip install \
apache-airflow[async,celery,devel,devel_hadoop,druid,hdfs,hive,jdbc,mysql,rabbitmq,ssh]==1.10.12 \
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-1.10.12/constraints-3.7.txt" \
--use-feature=2020-resolver"><pre class="notranslate">pip install \
apache-airflow[async,celery,devel,devel_hadoop,druid,hdfs,hive,jdbc,mysql,rabbitmq,ssh]==1.10.12 \
--constraint <span class="pl-s"><span class="pl-pds">"</span>https://raw.githubusercontent.com/apache/airflow/constraints-1.10.12/constraints-3.7.txt<span class="pl-pds">"</span></span> \
--use-feature=2020-resolver</pre></div>
<p dir="auto"><strong>Anything else we need to know</strong>:<br>
According to the announcement linked below, pip will introduce a new dependency resolver in October 2020, which will be more robust but might break some existing setups. Therefore they are suggesting users to try running their pip install scripts at least once (in dev mode) with this option: --use-feature=2020-resolver to anticipate any potential issue before the new resolver becomes the default in October 2020 with pip version 20.3.<br>
<a href="https://discuss.python.org/t/announcement-pip-20-2-release/4863" rel="nofollow"></a></p>
<p dir="auto">How often does this problem occur? Once? Every time etc?<br>
Everytime, the dependency problem is a nightmare, especially with adding hadoop extras</p> | <p dir="auto"><strong>Description</strong></p>
<p dir="auto">We should consider adding <code class="notranslate">pip check</code> command in our CI system to verify that dependencies that we use (together with constrains) are fully compatible. This should be run for biggest possible user-installation (<code class="notranslate">apache-airflow[all]</code>).</p>
<p dir="auto"><strong>Use case / motivation</strong></p>
<p dir="auto">Successful <code class="notranslate">pip check</code> is often a business requirement for releasing new version of Airflow. It assure us that all dependencies we use to build and run Airflow are compatible and we won't face any unexpected errors.</p>
<p dir="auto"><strong>Related Issues</strong></p>
<p dir="auto">N/A</p> | 1 |
<p dir="auto">Make sure these boxes are checked before submitting your issue - thank you!</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the superset logs for python stacktraces and included it here as text if any</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have reproduced the issue with at least the latest released version of superset</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the issue tracker for the same issue and I haven't found one similar</li>
</ul>
<h3 dir="auto">Superset version</h3>
<p dir="auto">0.19.0</p>
<h3 dir="auto">Expected results</h3>
<p dir="auto">Want the ability to filter the dashboard with an array rather than string values only. Example:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11141144/29151699-f3e848b8-7d7a-11e7-8a5b-241f76250b43.png"><img src="https://user-images.githubusercontent.com/11141144/29151699-f3e848b8-7d7a-11e7-8a5b-241f76250b43.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Actual results</h3>
<p dir="auto">Only able to filter based on set string values<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11141144/29151710-ffcc238e-7d7a-11e7-86f9-7d152c18ec37.png"><img src="https://user-images.githubusercontent.com/11141144/29151710-ffcc238e-7d7a-11e7-86f9-7d152c18ec37.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">As shown above</p> | <p dir="auto">It is difficult to find any meaningful information about the deckgl charts.</p>
<p dir="auto">Would it please be possible to add at least rudimentary documentation providing a brief overview of the accepted geospatial formats (e.g. GeoJSON) and any requirements such as coordinate reference system (e.g. epsg 4326?), geometry types (e.g. do Multipolygons work or only Polygons?) etc.</p>
<p dir="auto">Thanks.</p> | 0 |
<p dir="auto">This is a bit newbie-unfriendly:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> def f(params, data):
... return (...)
>>> minimize(f, x0, args=mydata)
...
TypeError: can only concatenate tuple (not "list") to tuple"><pre class="notranslate"><code class="notranslate">>>> def f(params, data):
... return (...)
>>> minimize(f, x0, args=mydata)
...
TypeError: can only concatenate tuple (not "list") to tuple
</code></pre></div>
<p dir="auto">This could use similar logic as in <code class="notranslate">scipy.integrate.quad</code>, which has</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if not isinstance(args, tuple):
args = (args,)"><pre class="notranslate"><code class="notranslate">if not isinstance(args, tuple):
args = (args,)
</code></pre></div> | <p dir="auto">I was a bit unexpected behavior using gaussian_filter, especially on image boundaries - corners. I have generated a noisy image with a Gaussian distribution and that I was expecting that using a Gaussian filter with sufficient sigma I get an image with zeros. But I got high positive values in top-left, and bottom-right corner and negative values in top-right and bottom-left corner; and this values go up to 0.5 of initial sigma used for generating.</p>
<h3 dir="auto">Reproducing code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
import matplotlib.pyplot as plt
from scipy import ndimage
np.random.seed(0)
im = np.random.normal(loc=0, scale=0.3, size=(300, 250))
im_blur1 = ndimage.gaussian_filter(im, sigma=50, order=0, mode='nearest')
plt.figure(figsize=(12, 5))
plt.subplot(121), plt.title('image')
plt.imshow(im, plt.cm.gray), plt.colorbar()
plt.subplot(122), plt.title('scipy')
plt.imshow(im_blur1, plt.cm.gray), plt.colorbar()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">from</span> <span class="pl-s1">scipy</span> <span class="pl-k">import</span> <span class="pl-s1">ndimage</span>
<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">seed</span>(<span class="pl-c1">0</span>)
<span class="pl-s1">im</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">normal</span>(<span class="pl-s1">loc</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">scale</span><span class="pl-c1">=</span><span class="pl-c1">0.3</span>, <span class="pl-s1">size</span><span class="pl-c1">=</span>(<span class="pl-c1">300</span>, <span class="pl-c1">250</span>))
<span class="pl-s1">im_blur1</span> <span class="pl-c1">=</span> <span class="pl-s1">ndimage</span>.<span class="pl-en">gaussian_filter</span>(<span class="pl-s1">im</span>, <span class="pl-s1">sigma</span><span class="pl-c1">=</span><span class="pl-c1">50</span>, <span class="pl-s1">order</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">mode</span><span class="pl-c1">=</span><span class="pl-s">'nearest'</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">figure</span>(<span class="pl-s1">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">12</span>, <span class="pl-c1">5</span>))
<span class="pl-s1">plt</span>.<span class="pl-en">subplot</span>(<span class="pl-c1">121</span>), <span class="pl-s1">plt</span>.<span class="pl-en">title</span>(<span class="pl-s">'image'</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">imshow</span>(<span class="pl-s1">im</span>, <span class="pl-s1">plt</span>.<span class="pl-s1">cm</span>.<span class="pl-s1">gray</span>), <span class="pl-s1">plt</span>.<span class="pl-en">colorbar</span>()
<span class="pl-s1">plt</span>.<span class="pl-en">subplot</span>(<span class="pl-c1">122</span>), <span class="pl-s1">plt</span>.<span class="pl-en">title</span>(<span class="pl-s">'scipy'</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">imshow</span>(<span class="pl-s1">im_blur1</span>, <span class="pl-s1">plt</span>.<span class="pl-s1">cm</span>.<span class="pl-s1">gray</span>), <span class="pl-s1">plt</span>.<span class="pl-en">colorbar</span>()</pre></div>
<h3 dir="auto">Output</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6035284/41107229-38a6d908-6a72-11e8-9c37-8f9bf557c19a.png"><img src="https://user-images.githubusercontent.com/6035284/41107229-38a6d908-6a72-11e8-9c37-8f9bf557c19a.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Scipy/Numpy/Python version information:</h3>
<p dir="auto">Scipy - 0.18.1<br>
Numpy - 1.12.1<br>
Python - 2.7.13<br>
('Linux', 'knuth', '4.9.0-6-amd64', '<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="661052" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/1" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/1/hovercard" href="https://github.com/scipy/scipy/pull/1">#1</a> SMP Debian 4.9.88-1+deb9u1 (2018-05-07)', 'x86_64')</p> | 0 |
<h2 dir="auto">Environment info</h2>
<ul dir="auto">
<li><code class="notranslate">transformers</code> version: 4.4.2</li>
<li>Platform: Linux-5.4.0-1041-aws-x86_64-with-debian-buster-sid</li>
<li>Python version: 3.7.10</li>
<li>PyTorch version (GPU?): 1.7.1 (True)</li>
<li>Tensorflow version (GPU?): not installed (NA)</li>
<li>Using GPU in script?: no</li>
<li>Using distributed or parallel set-up in script?: no</li>
</ul>
<h3 dir="auto">Who can help</h3>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/LysandreJik/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/LysandreJik">@LysandreJik</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sgugger/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sgugger">@sgugger</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/patrickvonplaten/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/patrickvonplaten">@patrickvonplaten</a></p>
<h2 dir="auto">Information</h2>
<p dir="auto">Model I am using (Bert, XLNet ...): ProphetNet</p>
<p dir="auto">The problem arises when using:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> the official example scripts: (give details below)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> my own modified scripts: (give details below)</li>
</ul>
<p dir="auto">The tasks I am working on is:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> an official GLUE/SQUaD task: (give the name)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> my own task or dataset: (give details below)</li>
</ul>
<h2 dir="auto">To reproduce</h2>
<p dir="auto">I am using ProphetNet for some question generation work. I ran into a bug where I sampled from ProphetNet to generate a question generation using the <code class="notranslate">generate</code> function. I then took the outputted question and tokenized it and saw that the token_ids produced were different than the ones returned by the <code class="notranslate">generate</code> function. Here is a sample of the example I found to be inconsistent.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=">>> from transformers import ProphetNetTokenizer
>>> tokenizer = ProphetNetTokenizer.from_pretrained("microsoft/prophetnet-large-uncased-squad-qg")
>>> tokenizer.decode([2054, 2828, 1997, 6922, 2003, 1037, 12702, 5054, 17119, 1037, 2828, 1997, 1029, 102])
'what type of component is a microsencer a type of? [SEP]'
>>> tokenizer.decode([2054, 2828, 1997, 6922, 2003, 1037, 12702, 3366, 5897, 2099, 1037, 2828, 1997, 1029, 102])
'what type of component is a microsencer a type of? [SEP]'
>>> tokenizer.decode([3366, 5897, 2099])
'##sencer'
>>> tokenizer.decode([5054, 17119])
'##sencer'
>>> tokenizer.decode([5054, 17119]) == tokenizer.decode([3366, 5897, 2099])
True
>>> tokenizer("what type of component is a microsencer a type of? [SEP]")["input_ids"]
[2054, 2828, 1997, 6922, 2003, 1037, 12702, 5054, 17119, 1037, 2828, 1997, 1029, 102, 102]"><pre class="notranslate"><span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-k">from</span> <span class="pl-s1">transformers</span> <span class="pl-k">import</span> <span class="pl-v">ProphetNetTokenizer</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">tokenizer</span> <span class="pl-c1">=</span> <span class="pl-v">ProphetNetTokenizer</span>.<span class="pl-en">from_pretrained</span>(<span class="pl-s">"microsoft/prophetnet-large-uncased-squad-qg"</span>)
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">tokenizer</span>.<span class="pl-en">decode</span>([<span class="pl-c1">2054</span>, <span class="pl-c1">2828</span>, <span class="pl-c1">1997</span>, <span class="pl-c1">6922</span>, <span class="pl-c1">2003</span>, <span class="pl-c1">1037</span>, <span class="pl-c1">12702</span>, <span class="pl-c1">5054</span>, <span class="pl-c1">17119</span>, <span class="pl-c1">1037</span>, <span class="pl-c1">2828</span>, <span class="pl-c1">1997</span>, <span class="pl-c1">1029</span>, <span class="pl-c1">102</span>])
<span class="pl-s">'what type of component is a microsencer a type of? [SEP]'</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">tokenizer</span>.<span class="pl-en">decode</span>([<span class="pl-c1">2054</span>, <span class="pl-c1">2828</span>, <span class="pl-c1">1997</span>, <span class="pl-c1">6922</span>, <span class="pl-c1">2003</span>, <span class="pl-c1">1037</span>, <span class="pl-c1">12702</span>, <span class="pl-c1">3366</span>, <span class="pl-c1">5897</span>, <span class="pl-c1">2099</span>, <span class="pl-c1">1037</span>, <span class="pl-c1">2828</span>, <span class="pl-c1">1997</span>, <span class="pl-c1">1029</span>, <span class="pl-c1">102</span>])
<span class="pl-s">'what type of component is a microsencer a type of? [SEP]'</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">tokenizer</span>.<span class="pl-en">decode</span>([<span class="pl-c1">3366</span>, <span class="pl-c1">5897</span>, <span class="pl-c1">2099</span>])
<span class="pl-s">'##sencer'</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">tokenizer</span>.<span class="pl-en">decode</span>([<span class="pl-c1">5054</span>, <span class="pl-c1">17119</span>])
<span class="pl-s">'##sencer'</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">tokenizer</span>.<span class="pl-en">decode</span>([<span class="pl-c1">5054</span>, <span class="pl-c1">17119</span>]) <span class="pl-c1">==</span> <span class="pl-s1">tokenizer</span>.<span class="pl-en">decode</span>([<span class="pl-c1">3366</span>, <span class="pl-c1">5897</span>, <span class="pl-c1">2099</span>])
<span class="pl-c1">True</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-en">tokenizer</span>(<span class="pl-s">"what type of component is a microsencer a type of? [SEP]"</span>)[<span class="pl-s">"input_ids"</span>]
[<span class="pl-c1">2054</span>, <span class="pl-c1">2828</span>, <span class="pl-c1">1997</span>, <span class="pl-c1">6922</span>, <span class="pl-c1">2003</span>, <span class="pl-c1">1037</span>, <span class="pl-c1">12702</span>, <span class="pl-c1">5054</span>, <span class="pl-c1">17119</span>, <span class="pl-c1">1037</span>, <span class="pl-c1">2828</span>, <span class="pl-c1">1997</span>, <span class="pl-c1">1029</span>, <span class="pl-c1">102</span>, <span class="pl-c1">102</span>]</pre></div>
<p dir="auto">It seems odd there are these two different sets of token_ids that reproduce the same sentence. I am having trouble reproducing the second sequence of tokens. I was training the model when it produced this second sequence through sampling but I didn't save the model at that exact time.</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">I would expect the tokenizer to always return the same sequence of tokens. I am not too familiar with how the tokenizers work, so I might be wrong in this assumption. Is this behavior expected and should I just try to avoid re-tokenizing whenever possible?</p> | <p dir="auto">I have used BERT NextSentencePredictor to find similar sentences or similar news, However, It's super slow. Even on Tesla V100 which is the fastest GPU till now. It takes around 10secs for a query title with around 3,000 articles. Is there a way to use BERT better for finding similar sentences or similar news given a corpus of news articles?</p> | 0 |
<p dir="auto">Go Version: go version go1.4 windows/amd64</p>
<p dir="auto">I was editing a file with Windows line endings, and I was unable to make it work.</p>
<p dir="auto">It seems like the \r character is added as part of the last parameter, which makes commands fail.</p>
<p dir="auto">It should be re-producible with all files using \r\n as line endings, but here is the actual command I used.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="//go:generate ffjson $GOFILE"><pre class="notranslate"><code class="notranslate">//go:generate ffjson $GOFILE
</code></pre></div>
<p dir="auto">Using quoting also makes it fail.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="//go:generate ffjson "file.go""><pre class="notranslate"><code class="notranslate">//go:generate ffjson "file.go"
</code></pre></div>
<p dir="auto">Will exit with "expect space after quoted argument", because the next character check in the following code fails:</p>
<div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" // Check the next character is space or end of line.
if len(line) > 0 && line[0] != ' ' && line[0] != '\t' {
g.errorf("expect space after quoted argument")
}"><pre class="notranslate"> <span class="pl-c">// Check the next character is space or end of line.</span>
<span class="pl-k">if</span> <span class="pl-en">len</span>(<span class="pl-s1">line</span>) <span class="pl-c1">></span> <span class="pl-c1">0</span> <span class="pl-c1">&&</span> <span class="pl-s1">line</span>[<span class="pl-c1">0</span>] <span class="pl-c1">!=</span> <span class="pl-s">' '</span> <span class="pl-c1">&&</span> <span class="pl-s1">line</span>[<span class="pl-c1">0</span>] <span class="pl-c1">!=</span> <span class="pl-s">'\t'</span> {
<span class="pl-s1">g</span>.<span class="pl-en">errorf</span>(<span class="pl-s">"expect space after quoted argument"</span>)
}</pre></div>
<p dir="auto">line[0] is '\r'</p> | <p dir="auto">Just tested the new "go generate" command. I'm using a windows machine and so my line endings are \r\n and not just \n.<br>
so if I put "//go:generate dosomething" in my source code and run "go generate" it executed "dosomething\r" which can not be found. (Tested with go1.4.windows-amd64 release)<br>
Sorry for submitting if this is expected behavior...</p> | 1 |
<p dir="auto">This feature is best suited to tablet/desktop.</p>
<p dir="auto">From <a href="https://www.google.com/design/spec/components/menus.html" rel="nofollow">https://www.google.com/design/spec/components/menus.html</a></p> | <p dir="auto">For some embeddings (macOS, Windows, Linux, ChromeOS, Fuschia), an application-level menu bar widget is necessary. It should be able to display keyboard accelerators, menu item separators, and have cascading menus.</p>
<p dir="auto">The design doc is here: <a href="https://flutter.dev/go/cascading-menus" rel="nofollow">https://flutter.dev/go/cascading-menus</a><br>
The draft Framework PR is here: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1332420104" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/109179" data-hovercard-type="pull_request" data-hovercard-url="/flutter/flutter/pull/109179/hovercard" href="https://github.com/flutter/flutter/pull/109179">#109179</a><br>
The draft Engine PR is here: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1116896403" data-permission-text="Title is private" data-url="https://github.com/flutter/engine/issues/31124" data-hovercard-type="pull_request" data-hovercard-url="/flutter/engine/pull/31124/hovercard" href="https://github.com/flutter/engine/pull/31124">flutter/engine#31124</a><br>
This PR is part of the overall effort to support Material 3 - <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1022701974" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/91605" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/91605/hovercard" href="https://github.com/flutter/flutter/issues/91605">#91605</a></p>
<p dir="auto">The current burndown list for implementing the Material menu bar:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Basic prototype, menus can be defined, open and close.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Design doc update</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Convert overlay usage into regular <code class="notranslate">Stack</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Figure out how to add all menus offstage initially to allow activator registration.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Hover support</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Activator support</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Keyboard navigation support</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> RTL support</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Visual Density support</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Platform system menu plugin support for macOS</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Platform default menu item support (basic)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Screen placement and scrolling on small windows.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1726435500" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/127617" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/127617/hovercard" href="https://github.com/flutter/flutter/issues/127617">#127617</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> unit tests x1000</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> API docs update</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Final formatting pass</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Add examples and example tests</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Connect activators and keyboard support with Shortcuts and Actions?</li>
</ul> | 1 |
<p dir="auto">At the moment SingleBucketAggregator extends BucketAggregator and MultiBucketAggregation is a separate interface. This means that single bucket Aggregations are different from multi bucket aggregations which can lead to problems when traversing the aggregation response. The reason for this is that single bucket aggregations don't render the same way as multi-bucket ones and so while parsing a response you need to work out what type of aggregation you are looking at before you know how to parse it.</p>
<p dir="auto">If would be better if SingleBucketAggregator was a multi-bucket aggregator which just happened to only have a single bucket. In the response there would still be a 'buckets' field but it would only contain a single entry for single-bucket aggregations. This would mean that single and multi bucket aggregation could be treated the same both by users of the REST API and users of the JAVA API.</p> | <p dir="auto"><code class="notranslate">SingleBucketAggregations</code> (like filter aggregation) have no method <code class="notranslate">getBuckets()</code> and also the json response contains no buckets array. This saves some space but also makes it harder to traverse the aggregation tree because when looking at the result one always has to know if the aggregation that produced the current level was a <code class="notranslate">SingleBucketAggregation</code> or a <code class="notranslate">MultiBucketAggregation</code> (like terms agg).</p>
<p dir="auto">Example for json:</p>
<p dir="auto">Request with top level multi bucket agg:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="POST testidx/_search?size=0
{
"aggs": {
"terms": {
"terms": {
"field": "label",
"size": 10
},
"aggs": {
"histogram": {
"histogram": {
"field": "num",
"interval": 1
}
}
}
}
}
}"><pre class="notranslate"><code class="notranslate">POST testidx/_search?size=0
{
"aggs": {
"terms": {
"terms": {
"field": "label",
"size": 10
},
"aggs": {
"histogram": {
"histogram": {
"field": "num",
"interval": 1
}
}
}
}
}
}
</code></pre></div>
<p dir="auto">Request with top level single bucket agg:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="POST testidx/_search?size=0
{
"aggs": {
"terms": {
"filter": {
"term": {
"label": "label_a"
}
},
"aggs": {
"histogram": {
"histogram": {
"field": "num",
"interval": 1
}
}
}
}
}
}
"><pre class="notranslate"><code class="notranslate">POST testidx/_search?size=0
{
"aggs": {
"terms": {
"filter": {
"term": {
"label": "label_a"
}
},
"aggs": {
"histogram": {
"histogram": {
"field": "num",
"interval": 1
}
}
}
}
}
}
</code></pre></div>
<p dir="auto">multi bucket yields:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""aggregations": {
"terms": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": "label_a",
"doc_count": 3,
"histogram": {
"buckets": [
{
"key": 1,
"doc_count": 1
},
...
"><pre class="notranslate"><code class="notranslate">"aggregations": {
"terms": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": "label_a",
"doc_count": 3,
"histogram": {
"buckets": [
{
"key": 1,
"doc_count": 1
},
...
</code></pre></div>
<p dir="auto">single bucket yields:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
"aggregations": {
"terms": {
"doc_count": 3,
"histogram": {
"buckets": [
{
"key": 1,
"doc_count": 1
},
...
"><pre class="notranslate"><code class="notranslate">
"aggregations": {
"terms": {
"doc_count": 3,
"histogram": {
"buckets": [
{
"key": 1,
"doc_count": 1
},
...
</code></pre></div>
<p dir="auto">although the two requests have the same level of "nestedness". If I was to post process the result I would have to change whichever application is consuming it when I change the top level aggregation from single to multibucket or the other way round.</p>
<p dir="auto">The following would be more convenient for the second request:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""aggregations": {
"terms": {
"doc_count": 3,
"buckets": [
{
"key": "some_key_that_makes_sense",
"histogram": {
"buckets": [
{
"key": 1,
"doc_count": 1
},
...
"><pre class="notranslate"><code class="notranslate">"aggregations": {
"terms": {
"doc_count": 3,
"buckets": [
{
"key": "some_key_that_makes_sense",
"histogram": {
"buckets": [
{
"key": 1,
"doc_count": 1
},
...
</code></pre></div>
<p dir="auto">This also affects the coming soon <code class="notranslate">getProperty</code> method for aggregations which is currently implemented to be consistent with the different behavior of single and multi buckets: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="48253172" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/8421" data-hovercard-type="pull_request" data-hovercard-url="/elastic/elasticsearch/pull/8421/hovercard?comment_id=20424480&comment_type=review_comment" href="https://github.com/elastic/elasticsearch/pull/8421#discussion_r20424480">#8421 (comment)</a></p> | 1 |
<p dir="auto">Content-Length header is duplicated if specified on Python3, leading to 400 responses:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Python 3.3.0 (default, Apr 30 2013, 06:45:58)
[GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.post("http://httpbin.org/post", headers={"Content-Length": 0})
<Response [400]>"><pre class="notranslate"><code class="notranslate">Python 3.3.0 (default, Apr 30 2013, 06:45:58)
[GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.post("http://httpbin.org/post", headers={"Content-Length": 0})
<Response [400]>
</code></pre></div>
<p dir="auto">We need to go deeper:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> import six
>>> six.moves.http_client.HTTPConnection.debuglevel = 1
>>> requests.post("http://httpbin.org/post", headers={"Content-Length": 0})
send: b'POST /post HTTP/1.1\r\nHost: httpbin.org\r\nAccept-Encoding: identity\r\nContent-Length: 0\r\nUser-Agent: python-requests/1.2.0 CPython/3.3.0 Darwin/12.3.0\r\nContent-Length: 0\r\nAccept: */*\r\nAccept-Encoding: gzip, deflate, compress\r\n\r\n'
reply: 'HTTP/1.1 400 BAD_REQUEST\r\n'
header: Content-Length header: Connection <Response [400]>"><pre class="notranslate"><code class="notranslate">>>> import six
>>> six.moves.http_client.HTTPConnection.debuglevel = 1
>>> requests.post("http://httpbin.org/post", headers={"Content-Length": 0})
send: b'POST /post HTTP/1.1\r\nHost: httpbin.org\r\nAccept-Encoding: identity\r\nContent-Length: 0\r\nUser-Agent: python-requests/1.2.0 CPython/3.3.0 Darwin/12.3.0\r\nContent-Length: 0\r\nAccept: */*\r\nAccept-Encoding: gzip, deflate, compress\r\n\r\n'
reply: 'HTTP/1.1 400 BAD_REQUEST\r\n'
header: Content-Length header: Connection <Response [400]>
</code></pre></div>
<p dir="auto">That's what happens:</p>
<div class="highlight highlight-source-httpspec notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="POST /post HTTP/1.1
Host: httpbin.org
Accept-Encoding: identity
Content-Length: 0
User-Agent: python-requests/1.2.0 CPython/3.3.0 Darwin/12.3.0
Content-Length: 0
Accept: */*
Accept-Encoding: gzip, deflate, compress"><pre class="notranslate"><span class="pl-k">POST</span><span class="pl-c1"> /post HTTP/1.1</span>
<span class="pl-s"><span class="pl-v">Host:</span> httpbin.org</span>
<span class="pl-s"><span class="pl-v">Accept-Encoding:</span> identity</span>
<span class="pl-s"><span class="pl-v">Content-Length:</span> 0</span>
<span class="pl-s"><span class="pl-v">User-Agent:</span> python-requests/1.2.0 CPython/3.3.0 Darwin/12.3.0</span>
<span class="pl-s"><span class="pl-v">Content-Length:</span> 0</span>
<span class="pl-s"><span class="pl-v">Accept:</span> */*</span>
<span class="pl-s"><span class="pl-v">Accept-Encoding:</span> gzip, deflate, compress</span></pre></div>
<p dir="auto">Two content-lengths, one 400 response :-(<br>
On Python2 everything's OK.</p> | <p dir="auto">Spaces are not allowed in header names: <a href="https://www.rfc-editor.org/rfc/rfc9112.html#name-field-line-parsing" rel="nofollow">https://www.rfc-editor.org/rfc/rfc9112.html#name-field-line-parsing</a><br>
When requests encounters such invalid header names, it will not only throw away the invalid header, but also stops parsing all following headers.<br>
When the invalid header comes before headers such as <code class="notranslate">Content-Length</code>, this can lead to requests getting stuck indefinitely.</p>
<h2 dir="auto">Expected Result</h2>
<p dir="auto">Requests ignores the invalid header (or shows/fixes it; the RFC is only defining behavior for servers and proxies, it is unclear what the correct behavior for clients is and different clients behave differently) and continues parsing of the response.</p>
<h2 dir="auto">Actual Result</h2>
<p dir="auto">Requests ignores the invalid header and all headers after the invalid one. This can lead to requests getting stuck.</p>
<h2 dir="auto">Reproduction Steps</h2>
<ul dir="auto">
<li><code class="notranslate">pip install wptserve</code>: server that allows us to send invalid responses</li>
<li><code class="notranslate">python test.py</code></li>
</ul>
<p dir="auto"><code class="notranslate">test.py</code>:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import wptserve
from wptserve.handlers import handler, as_is_handler
import requests
from requests.exceptions import ConnectionError
import subprocess
http1 = wptserve.WebTestHttpd(port=8081,
routes=[("*", "*.asis", as_is_handler)],
use_ssl=False,
key_file=None,
certificate=None,
)
http1.start()
@handler
def space_after_length(request, response):
return 200, [("Content-Length", 14), ("SPACE ",'space'), ("hidden", "hidden")], '<div>ABC</div>'
http1.router.register("*", "/space_after_length", space_after_length)
@handler
def space_first(request, response):
return 200, [("SPACE ",'space'), ("Content-Length", 14), ("hidden", "hidden")], '<div>ABC</div>'
http1.router.register("*", "/space_first", space_first)
for path in ["/space_first", "/space_after_length"]:
url = f"http://localhost:8081{path}"
curl = subprocess.check_output(["curl", "-s", "-I", url]).decode("utf-8")
try:
r = requests.get(url, timeout=1)
# r = requests.get(url) # Stuck forever
headers = r.headers
except ConnectionError:
headers = "Hangs forever or timeout"
finally:
print(f"{path}\ncurl output:\n{curl}requests output:\n{headers}\n")
"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">wptserve</span>
<span class="pl-k">from</span> <span class="pl-s1">wptserve</span>.<span class="pl-s1">handlers</span> <span class="pl-k">import</span> <span class="pl-s1">handler</span>, <span class="pl-s1">as_is_handler</span>
<span class="pl-k">import</span> <span class="pl-s1">requests</span>
<span class="pl-k">from</span> <span class="pl-s1">requests</span>.<span class="pl-s1">exceptions</span> <span class="pl-k">import</span> <span class="pl-v">ConnectionError</span>
<span class="pl-k">import</span> <span class="pl-s1">subprocess</span>
<span class="pl-s1">http1</span> <span class="pl-c1">=</span> <span class="pl-s1">wptserve</span>.<span class="pl-v">WebTestHttpd</span>(<span class="pl-s1">port</span><span class="pl-c1">=</span><span class="pl-c1">8081</span>,
<span class="pl-s1">routes</span><span class="pl-c1">=</span>[(<span class="pl-s">"*"</span>, <span class="pl-s">"*.asis"</span>, <span class="pl-s1">as_is_handler</span>)],
<span class="pl-s1">use_ssl</span><span class="pl-c1">=</span><span class="pl-c1">False</span>,
<span class="pl-s1">key_file</span><span class="pl-c1">=</span><span class="pl-c1">None</span>,
<span class="pl-s1">certificate</span><span class="pl-c1">=</span><span class="pl-c1">None</span>,
)
<span class="pl-s1">http1</span>.<span class="pl-en">start</span>()
<span class="pl-en">@<span class="pl-s1">handler</span></span>
<span class="pl-k">def</span> <span class="pl-en">space_after_length</span>(<span class="pl-s1">request</span>, <span class="pl-s1">response</span>):
<span class="pl-k">return</span> <span class="pl-c1">200</span>, [(<span class="pl-s">"Content-Length"</span>, <span class="pl-c1">14</span>), (<span class="pl-s">"SPACE "</span>,<span class="pl-s">'space'</span>), (<span class="pl-s">"hidden"</span>, <span class="pl-s">"hidden"</span>)], <span class="pl-s">'<div>ABC</div>'</span>
<span class="pl-s1">http1</span>.<span class="pl-s1">router</span>.<span class="pl-en">register</span>(<span class="pl-s">"*"</span>, <span class="pl-s">"/space_after_length"</span>, <span class="pl-s1">space_after_length</span>)
<span class="pl-en">@<span class="pl-s1">handler</span></span>
<span class="pl-k">def</span> <span class="pl-en">space_first</span>(<span class="pl-s1">request</span>, <span class="pl-s1">response</span>):
<span class="pl-k">return</span> <span class="pl-c1">200</span>, [(<span class="pl-s">"SPACE "</span>,<span class="pl-s">'space'</span>), (<span class="pl-s">"Content-Length"</span>, <span class="pl-c1">14</span>), (<span class="pl-s">"hidden"</span>, <span class="pl-s">"hidden"</span>)], <span class="pl-s">'<div>ABC</div>'</span>
<span class="pl-s1">http1</span>.<span class="pl-s1">router</span>.<span class="pl-en">register</span>(<span class="pl-s">"*"</span>, <span class="pl-s">"/space_first"</span>, <span class="pl-s1">space_first</span>)
<span class="pl-k">for</span> <span class="pl-s1">path</span> <span class="pl-c1">in</span> [<span class="pl-s">"/space_first"</span>, <span class="pl-s">"/space_after_length"</span>]:
<span class="pl-s1">url</span> <span class="pl-c1">=</span> <span class="pl-s">f"http://localhost:8081<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">path</span><span class="pl-kos">}</span></span>"</span>
<span class="pl-s1">curl</span> <span class="pl-c1">=</span> <span class="pl-s1">subprocess</span>.<span class="pl-en">check_output</span>([<span class="pl-s">"curl"</span>, <span class="pl-s">"-s"</span>, <span class="pl-s">"-I"</span>, <span class="pl-s1">url</span>]).<span class="pl-en">decode</span>(<span class="pl-s">"utf-8"</span>)
<span class="pl-k">try</span>:
<span class="pl-s1">r</span> <span class="pl-c1">=</span> <span class="pl-s1">requests</span>.<span class="pl-en">get</span>(<span class="pl-s1">url</span>, <span class="pl-s1">timeout</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)
<span class="pl-c"># r = requests.get(url) # Stuck forever</span>
<span class="pl-s1">headers</span> <span class="pl-c1">=</span> <span class="pl-s1">r</span>.<span class="pl-s1">headers</span>
<span class="pl-k">except</span> <span class="pl-v">ConnectionError</span>:
<span class="pl-s1">headers</span> <span class="pl-c1">=</span> <span class="pl-s">"Hangs forever or timeout"</span>
<span class="pl-k">finally</span>:
<span class="pl-en">print</span>(<span class="pl-s">f"<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">path</span><span class="pl-kos">}</span></span><span class="pl-cce">\n</span>curl output:<span class="pl-cce">\n</span><span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">curl</span><span class="pl-kos">}</span></span>requests output:<span class="pl-cce">\n</span><span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">headers</span><span class="pl-kos">}</span></span><span class="pl-cce">\n</span>"</span>)</pre></div>
<p dir="auto"><code class="notranslate">Output</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/space_first
curl output:
HTTP/1.1 200 OK
SPACE : space
Content-Length: 14
hidden: hidden
Server: BaseHTTP/0.6 Python/3.9.6
Date: Thu, 29 Sep 2022 13:46:58 GMT
requests output:
Hangs forever or timeout
/space_after_length
curl output:
HTTP/1.1 200 OK
Content-Length: 14
SPACE : space
hidden: hidden
Server: BaseHTTP/0.6 Python/3.9.6
Date: Thu, 29 Sep 2022 13:46:59 GMT
requests output:
{'Content-Length': '14'}"><pre class="notranslate"><code class="notranslate">/space_first
curl output:
HTTP/1.1 200 OK
SPACE : space
Content-Length: 14
hidden: hidden
Server: BaseHTTP/0.6 Python/3.9.6
Date: Thu, 29 Sep 2022 13:46:58 GMT
requests output:
Hangs forever or timeout
/space_after_length
curl output:
HTTP/1.1 200 OK
Content-Length: 14
SPACE : space
hidden: hidden
Server: BaseHTTP/0.6 Python/3.9.6
Date: Thu, 29 Sep 2022 13:46:59 GMT
requests output:
{'Content-Length': '14'}
</code></pre></div>
<h2 dir="auto">System Information</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python -m requests.help"><pre class="notranslate"><code class="notranslate">$ python -m requests.help
</code></pre></div>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.1.1"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.4"
},
"implementation": {
"name": "CPython",
"version": "3.9.6"
},
"platform": {
"release": "21.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010111f"
},
"urllib3": {
"version": "1.26.12"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}"><pre class="notranslate">{
<span class="pl-ent">"chardet"</span>: {
<span class="pl-ent">"version"</span>: <span class="pl-c1">null</span>
},
<span class="pl-ent">"charset_normalizer"</span>: {
<span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>2.1.1<span class="pl-pds">"</span></span>
},
<span class="pl-ent">"cryptography"</span>: {
<span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span><span class="pl-pds">"</span></span>
},
<span class="pl-ent">"idna"</span>: {
<span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>3.4<span class="pl-pds">"</span></span>
},
<span class="pl-ent">"implementation"</span>: {
<span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>CPython<span class="pl-pds">"</span></span>,
<span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>3.9.6<span class="pl-pds">"</span></span>
},
<span class="pl-ent">"platform"</span>: {
<span class="pl-ent">"release"</span>: <span class="pl-s"><span class="pl-pds">"</span>21.6.0<span class="pl-pds">"</span></span>,
<span class="pl-ent">"system"</span>: <span class="pl-s"><span class="pl-pds">"</span>Darwin<span class="pl-pds">"</span></span>
},
<span class="pl-ent">"pyOpenSSL"</span>: {
<span class="pl-ent">"openssl_version"</span>: <span class="pl-s"><span class="pl-pds">"</span><span class="pl-pds">"</span></span>,
<span class="pl-ent">"version"</span>: <span class="pl-c1">null</span>
},
<span class="pl-ent">"requests"</span>: {
<span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>2.28.1<span class="pl-pds">"</span></span>
},
<span class="pl-ent">"system_ssl"</span>: {
<span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>1010111f<span class="pl-pds">"</span></span>
},
<span class="pl-ent">"urllib3"</span>: {
<span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>1.26.12<span class="pl-pds">"</span></span>
},
<span class="pl-ent">"using_charset_normalizer"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"using_pyopenssl"</span>: <span class="pl-c1">false</span>
}</pre></div> | 0 |
<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-give-your-javascript-slot-machine-some-stylish-images" rel="nofollow">http://freecodecamp.com/challenges/waypoint-give-your-javascript-slot-machine-some-stylish-images</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">This challenge will allow you to pass even if your code for which section an image is forgotten. (The correct way to say this is passing me so I'll add some code).</p>
<p dir="auto">Ex:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" $($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">');
$($('.slot')[0]).html('<img src = "' + images[slotTwo-1] + '">');
$($('.slot')[0]).html('<img src = "' + images[slotThree-1] + '">');"><pre class="notranslate"><code class="notranslate"> $($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">');
$($('.slot')[0]).html('<img src = "' + images[slotTwo-1] + '">');
$($('.slot')[0]).html('<img src = "' + images[slotThree-1] + '">');
</code></pre></div>
<p dir="auto">**Passes and allows you to go to the next challenge.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" $($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">');
$($('.slot')[1]).html('<img src = "' + images[slotTwo-1] + '">');
$($('.slot')[2]).html('<img src = "' + images[slotThree-1] + '">');"><pre class="notranslate"><code class="notranslate"> $($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">');
$($('.slot')[1]).html('<img src = "' + images[slotTwo-1] + '">');
$($('.slot')[2]).html('<img src = "' + images[slotThree-1] + '">');
</code></pre></div>
<p dir="auto">** But this is correct.</p>
<p dir="auto">I understand the [#] isn't the focus here, but I wanted to say something just to avoid developing bad practices. Also I believe the previous Waypoint may have this issue as well.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/10967047/9418961/637ef9e6-481d-11e5-8427-e304f5d4c376.png"><img src="https://cloud.githubusercontent.com/assets/10967047/9418961/637ef9e6-481d-11e5-8427-e304f5d4c376.png" alt="image" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/10967047/9418994/9c8f92f4-481d-11e5-8667-26bd23605223.png"><img src="https://cloud.githubusercontent.com/assets/10967047/9418994/9c8f92f4-481d-11e5-8667-26bd23605223.png" alt="basic javascript 40 error" style="max-width: 100%;"></a></p>
<p dir="auto">I sincerely appreciate all of the support FCC. Your application is pure awesome. 👍</p> | <p dir="auto">The tests are not covering the task fully. One can pass it by updating only slot 0 three times:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5458077/9340230/6d98125e-45a3-11e5-990d-11f572af3cd5.png"><img src="https://cloud.githubusercontent.com/assets/5458077/9340230/6d98125e-45a3-11e5-990d-11f572af3cd5.png" alt="slot_zero_three" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">The page isn't recognizing that I have specified a border width and style. The code is rendered properly in the "Cat Photo App", but I can't advance to the next challenge. The code in question:</p>
<p dir="auto">.thick-green-border {<br>
border-color: green;<br>
border-style: solid;<br>
border-width: 10px;<br>
}</p> | <p dir="auto">The following HTML is not working for this challenge:</p>
<style>
.smaller-image {
width: 100px;
}
.thick-green-border{
border-width: 10px;
border-color: green;
border-style: solid;
}
</style>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/f1ba009cb2b5e79d9cba610fbc92f8aead0c3e4f49d07d666f81d2557c1b1f16/68747470733a2f2f6269742e6c792f6663632d6b697474656e73"><img src="https://camo.githubusercontent.com/f1ba009cb2b5e79d9cba610fbc92f8aead0c3e4f49d07d666f81d2557c1b1f16/68747470733a2f2f6269742e6c792f6663632d6b697474656e73" data-canonical-src="https://bit.ly/fcc-kittens" style="max-width: 100%;"></a></p>
<p dir="auto">I'm not sure what I'm doing wrong?</p> | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.