text1
stringlengths 0
536k
| text2
stringlengths 0
536k
| label
int64 0
1
|
---|---|---|
<p dir="auto"><a href="http://twitter.github.io/bootstrap/customize.html" rel="nofollow">http://twitter.github.io/bootstrap/customize.html</a> clicked on the 'Customize and Download button.</p>
<p dir="auto">Its not responding.</p>
<p dir="auto">please provide alternative link for customize download if possible.</p> | <p dir="auto">when the user try to download a custom version only without the responsive 1200, the navbar, and the hero unit, the download get an error ><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/a833b492623744c08cac234ce7e1fb244d8d916418ddc35e8cde0d02b55c225a/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313039393538392f3532313734322f64333762313564302d626664312d313165322d393836652d6433363863333032343961612e706e67"><img src="https://camo.githubusercontent.com/a833b492623744c08cac234ce7e1fb244d8d916418ddc35e8cde0d02b55c225a/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313039393538392f3532313734322f64333762313564302d626664312d313165322d393836652d6433363863333032343961612e706e67" alt="captura de pantalla 2013-05-18 a la s 10 42 15" data-canonical-src="https://f.cloud.github.com/assets/1099589/521742/d37b15d0-bfd1-11e2-986e-d368c30249aa.png" style="max-width: 100%;"></a></p>
<p dir="auto">"""<br>
A less error occured trying to build your bundle. You've likely entered an invalid input into the less variable field. Check your syntax and try again!</p>
<p dir="auto">thanks!</p>
<p dir="auto">{}</p>
<p dir="auto">"""</p> | 1 |
<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>4.0.0</td>
</tr>
</tbody>
</table>
<p dir="auto">Hi, sorry if the question looks silly but I am stucked for hours since the 4.0 version of Symfony.<br>
In my <code class="notranslate">AuthController</code> I am trying to redirect the user to the homepage by using <code class="notranslate">$this->redirectToRoute('home')</code> but I get the following error : <br><br>
<code class="notranslate">The "router" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.</code></p>
<p dir="auto">with these details :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException:
The "router" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.
at vendor/symfony/dependency-injection/Container.php:252
at Symfony\Component\DependencyInjection\Container->get('router')
(vendor/symfony/framework-bundle/Controller/ControllerTrait.php:73)
at Symfony\Bundle\FrameworkBundle\Controller\Controller->generateUrl('home', array())
(vendor/symfony/framework-bundle/Controller/ControllerTrait.php:110)
at Symfony\Bundle\FrameworkBundle\Controller\Controller->redirectToRoute('home')
(src/Controller/AuthController.php:33)
at App\Controller\AuthController->login()
at call_user_func_array(array(object(AuthController), 'login'), array())
(vendor/symfony/http-kernel/HttpKernel.php:151)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:66)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:190)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(public/index.php:30)"><pre class="notranslate"><code class="notranslate">
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException:
The "router" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.
at vendor/symfony/dependency-injection/Container.php:252
at Symfony\Component\DependencyInjection\Container->get('router')
(vendor/symfony/framework-bundle/Controller/ControllerTrait.php:73)
at Symfony\Bundle\FrameworkBundle\Controller\Controller->generateUrl('home', array())
(vendor/symfony/framework-bundle/Controller/ControllerTrait.php:110)
at Symfony\Bundle\FrameworkBundle\Controller\Controller->redirectToRoute('home')
(src/Controller/AuthController.php:33)
at App\Controller\AuthController->login()
at call_user_func_array(array(object(AuthController), 'login'), array())
(vendor/symfony/http-kernel/HttpKernel.php:151)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:66)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:190)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(public/index.php:30)
</code></pre></div>
<p dir="auto">I installed the framework extra bundle, and of course extended my class to <code class="notranslate">Controller</code>.</p>
<p dir="auto">It worked well before I upgraded to this new version.</p>
<p dir="auto">Any ideas please ? :(</p>
<p dir="auto">Thank you</p> | <table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>yes/no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>3.4</td>
</tr>
</tbody>
</table>
<p dir="auto">I got the following deprecation after updating to Symfony 3.4:</p>
<blockquote>
<p dir="auto">User Deprecated: The "router" service is private, getting it from the container is deprecated since Symfony 3.2 and will fail in 4.0. You should either make the service public, or stop using the container directly and use dependency injection instead.</p>
</blockquote>
<p dir="auto">Error:</p>
<blockquote>
<p dir="auto">"exception" => ErrorException {<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1787430" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/2303" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/2303/hovercard" href="https://github.com/symfony/symfony/issues/2303">#2303</a> ▼<br>
#message: "User Deprecated: The "router" service is private, getting it from the container is deprecated since Symfony 3.2 and will fail in 4.0. You should either make the service public, or stop using the container directly and use dependency injection instead."<br>
#code: 0<br>
#file: "vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php"<br>
#line: 275<br>
#severity: E_USER_DEPRECATED<br>
trace: {▼<br>
vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:275 {<g-emoji class="g-emoji" alias="arrow_forward" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/25b6.png">▶</g-emoji>}<br>
vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php:85 {<g-emoji class="g-emoji" alias="arrow_forward" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/25b6.png">▶</g-emoji>}<br>
src/AppBundle/Controller/Backend/DashboardController.php:16 {▼<br>
› ->setPageTitle('Dashboard')<br>
› ->addBreadcrumb('Dashboard', $this->generateUrl('backend.dashboard'), 'dashboard')<br>
› ;<br>
}<br>
AppBundle\Controller\Backend\DashboardController->indexAction() {}<br>
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:153 {<g-emoji class="g-emoji" alias="arrow_forward" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/25b6.png">▶</g-emoji>}<br>
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68 {▶}<br>
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:202 {<g-emoji class="g-emoji" alias="arrow_forward" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/25b6.png">▶</g-emoji>}<br>
web/app_dev.php:33 {<g-emoji class="g-emoji" alias="arrow_forward" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/25b6.png">▶</g-emoji>}<br>
}<br>
}</p>
</blockquote> | 1 |
<p dir="auto">Hi,</p>
<p dir="auto">I found problem in<br>
parentLocation = self.locations[parentTask.locationID]</p>
<p dir="auto">In python script:<br>
<a href="https://github.com/opencv/opencv/blob/master/modules/ts/misc/trace_profiler.py">https://github.com/opencv/opencv/blob/master/modules/ts/misc/trace_profiler.py</a></p>
<ul dir="auto">
<li>Read the documentation to test with the latest developer build.</li>
<li>Check if other person has already created the same issue to avoid duplicates. You can comment on it if there already is an issue.</li>
<li>Try to be as detailed as possible in your report.</li>
<li>Report only one problem per created issue.</li>
</ul>
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => 3.4.1</li>
<li>Operating System / Platform =linux 64 Bit</li>
<li>Compiler =GCC<br>
--></li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">I found problem in<br>
parentLocation = self.locations[parentTask.locationID]</p>
<p dir="auto">In python script:<br>
<a href="https://github.com/opencv/opencv/blob/master/modules/ts/misc/trace_profiler.py">https://github.com/opencv/opencv/blob/master/modules/ts/misc/trace_profiler.py</a></p>
<p dir="auto">first I found problem in read file string<br>
<a href="https://github.com/opencv/opencv/blob/3.4.1/modules/ts/misc/trace_profiler.py#L164">https://github.com/opencv/opencv/blob/3.4.1/modules/ts/misc/trace_profiler.py#L164</a><br>
This I fix by put whole name in variable:<br>
filename = 'OpenCVTrace-000.txt'; before was '/OpenCVTrace-000.txt'<br>
But after that I still get error<br>
Traceback (most recent call last):<br>
File "trace_profiler.py", line 442, in <br>
trace.process()<br>
File "trace_profiler.py", line 287, in process<br>
parentLocation = self.locations[parentTask.locationID]<br>
KeyError: 1</p>
<p dir="auto">It show that dict is empty.<br>
Test report file can by find in attachment.</p>
<p dir="auto">--></p>
<p dir="auto">used command:<br>
python trace_profiler.py /home/root/opencv_dnn_bench/trace/OpenCVTrace.txt<br>
<a href="https://github.com/opencv/opencv/files/2580605/OpenCVTrace.txt">OpenCVTrace.txt</a><br>
<a href="https://github.com/opencv/opencv/files/2580606/OpenCVTrace-000.txt">OpenCVTrace-000.txt</a></p> | <h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => 4.2.0</li>
<li>Operating System / Platform => Ubuntu 18.04, macOS 10.14, Windows 64 Bit</li>
<li>Compiler => gcc-7.2, Apple Clang XCode 11.3, Visual Studio 2017, Visual Studio 2019</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">I've found that some of my non-OpenCV thirdparty libraries are copied to the installation directory into <code class="notranslate">lib/opencv4/3rdparty/</code>. This is breaking my build because I can no longer resolve duplicate linking. Some libraries from <code class="notranslate">lib/opencv4/3rdparty/</code> where copied from <code class="notranslate">lib/</code> and exist now twice under different names. When they get pulled into the build by different dependencies then I can not easily resolve the duplication.</p>
<p dir="auto">What is the purpose of <code class="notranslate">lib/opencv4/3rdparty/</code>? And can it be disabled/avoided/removed?</p> | 0 |
<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>master (likely 3.x and 2.x as well)</td>
</tr>
</tbody>
</table>
<p dir="auto">Consider a basic data class:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class MyClass
{
private $value = '';
public function setValue(string $value)
{
$this->value = $value;
}
public function getValue(): string
{
return $this->value;
}
}"><pre class="notranslate"><code class="notranslate">class MyClass
{
private $value = '';
public function setValue(string $value)
{
$this->value = $value;
}
public function getValue(): string
{
return $this->value;
}
}
</code></pre></div>
<p dir="auto">Map a basic form with the field optional:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$form = $this->createFormBuilder(new MyClass())
->add('value', TextareaType::class, [
'required' => false,
])
->add('create', SubmitType::class)
->getForm();
// etc."><pre class="notranslate"><code class="notranslate">$form = $this->createFormBuilder(new MyClass())
->add('value', TextareaType::class, [
'required' => false,
])
->add('create', SubmitType::class)
->getForm();
// etc.
</code></pre></div>
<p dir="auto">Submit the form with the field empty and we get an <code class="notranslate">InvalidArgumentException</code>:</p>
<blockquote>
<p dir="auto">Expected argument of type "string", "NULL" given<br>
in vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php at line 275</p>
</blockquote>
<p dir="auto">As the value itself is empty, the Form sets its <code class="notranslate">$modelData</code> to <code class="notranslate">NULL</code>, while <code class="notranslate">$normData</code> and <code class="notranslate">$viewData</code> are correctly the empty string. <code class="notranslate">PropertyPathMapper::mapFormsToData</code> subsequently attempts to set the property to null, which would have been fine if not for the type hinting in the setter, causing the exception.</p>
<p dir="auto"><em>edit</em>: if I remove the type hint from the setter I then get a Doctrine error as the field itself is mandatory yet <code class="notranslate">NULL</code> was inserted. I most definitely want users to be able to have the empty string in there, not null. So this is in the Form component, not the PropertyAccess end doing as it's told.</p> | <table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Symfony version</td>
<td>3.2.4</td>
</tr>
</tbody>
</table>
<p dir="auto">Hello.</p>
<p dir="auto">I am getting null value after passing empty string to symfony form field.<br>
After defining empty_data in form builder, the problem has gone:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" $builder
->add('name', TextType::class, [
'empty_data' => '',
])"><pre class="notranslate"><code class="notranslate"> $builder
->add('name', TextType::class, [
'empty_data' => '',
])
</code></pre></div>
<p dir="auto">But documentation claims that empty_data is empty string ('') by default. So either the documentation should be changed or behavior of form field type.</p>
<p dir="auto">Link to docs: <a href="http://symfony.com/doc/current/reference/forms/types/text.html#empty-data" rel="nofollow">http://symfony.com/doc/current/reference/forms/types/text.html#empty-data</a></p>
<p dir="auto">Thanks.</p> | 1 |
<p dir="auto">Following <code class="notranslate">https://github.com/zeit/next.js/tree/v3-beta/examples/with-styled-components</code></p>
<p dir="auto">Then I get this error when launching<br>
<code class="notranslate">Nesting detected at 1:757. Unfortunately nesting is not supported by styled-jsx.</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="500
Internal Server Error.
Nesting detected at 1:757. Unfortunately nesting is not supported by styled-jsx.
Error: Nesting detected at 1:757. Unfortunately nesting is not supported by styled-jsx.
at Function.disableNestingPlugin (/node_modules/styled-jsx/dist/lib/style-transform.js:19:13)
at proxy (/node_modules/stylis/stylis.js:1133:30)
at compile (/node_modules/stylis/stylis.js:679:10)
at compile (/node_modules/stylis/stylis.js:319:17)
at stylis (/node_modules/stylis/stylis.js:1270:16)
at stringifyRules (/node_modules/styled-components/lib/utils/stringifyRules.js:27:31)
at ComponentStyle.generateAndInjectStyles (/node_modules/styled-components/lib/models/ComponentStyle.js:59:24)
at StyledComponent.generateAndInjectStyles (/node_modules/styled-components/lib/models/StyledComponent.js:121:38)
at StyledComponent.componentWillMount (/node_modules/styled-components/lib/models/StyledComponent.js:150:39)"><pre class="notranslate"><code class="notranslate">500
Internal Server Error.
Nesting detected at 1:757. Unfortunately nesting is not supported by styled-jsx.
Error: Nesting detected at 1:757. Unfortunately nesting is not supported by styled-jsx.
at Function.disableNestingPlugin (/node_modules/styled-jsx/dist/lib/style-transform.js:19:13)
at proxy (/node_modules/stylis/stylis.js:1133:30)
at compile (/node_modules/stylis/stylis.js:679:10)
at compile (/node_modules/stylis/stylis.js:319:17)
at stylis (/node_modules/stylis/stylis.js:1270:16)
at stringifyRules (/node_modules/styled-components/lib/utils/stringifyRules.js:27:31)
at ComponentStyle.generateAndInjectStyles (/node_modules/styled-components/lib/models/ComponentStyle.js:59:24)
at StyledComponent.generateAndInjectStyles (/node_modules/styled-components/lib/models/StyledComponent.js:121:38)
at StyledComponent.componentWillMount (/node_modules/styled-components/lib/models/StyledComponent.js:150:39)
</code></pre></div> | <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>
<p dir="auto">I'm playing with next 3.2.2 and am quite enjoying its simplicity and the plentifulness of examples. Awesome experience, even compared with other boilerplates I've used before!</p>
<p dir="auto">After building a simple demo website based on the <a href="https://github.com/zeit/next.js/tree/master/examples/with-apollo"><code class="notranslate">with-apollo</code></a> example, I noticed a behaviour previously mentioned in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="226570050" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/1888" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/1888/hovercard" href="https://github.com/vercel/next.js/issues/1888">#1888</a>/<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="236740682" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/2305" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/2305/hovercard" href="https://github.com/vercel/next.js/issues/2305">#2305</a> and fixed in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="239993362" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/2437" data-hovercard-type="pull_request" data-hovercard-url="/vercel/next.js/pull/2437/hovercard" href="https://github.com/vercel/next.js/pull/2437">#2437</a>.</p>
<h2 dir="auto">Expected vs Current Behavior</h2>
<p dir="auto">My sandbox project has got three pages: <code class="notranslate">index</code>, <code class="notranslate">about</code> and <code class="notranslate">_error</code>, all wrapped into <code class="notranslate">withData</code> HOC that helps init and reuse the apollo client. There is also a custom <code class="notranslate">_document</code> page that enables <a href="https://github.com/zeit/next.js/tree/master/examples/with-react-intl">i18n</a> and <a href="https://github.com/zeit/next.js/tree/master/examples/with-styled-components">styled-components</a>. When I navigate between <code class="notranslate">index</code> and <code class="notranslate">about</code>, GraphQL cache persists and so there is no <code class="notranslate">loading...</code> message showing up after the data has been loaded for the first time (no matter if on the server or on the client). However, when visit a 404 page and then return to an existing page, the redux cache appears to be reset and so apollo does the data fetching again. Also when I click on a link that leads to a 404 error, Chrome's history of network requests wipes out, thus suggesting that the 404 page shows up after a full reload.</p>
<p dir="auto"><s>I deployed a built version of my experiment to <a href="https://example.com/" rel="nofollow">https://example.com/</a>, but this URI is likely to be deleted or replaced in a few days. Quite an ugly demo, but should be enough to reproduce what I mean.</s> The sources are in a private gitlab repo, but I can upload them to github if necessary.</p>
<p dir="auto">How could I avoid this refresh behaviour and thus provide future users with a smoother UX?</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>3.2.2</td>
</tr>
<tr>
<td>node</td>
<td>8.5.0</td>
</tr>
<tr>
<td>OS</td>
<td>macos / alpine linux (docker)</td>
</tr>
<tr>
<td>browser</td>
<td>latest chrome</td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">What is not entirely clear to me in the "with-redux" example, how would I go about having an action dispatched on server render, that consists of thunks that fetch data from some api?</p> | <h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">If a module used in a polyfill becomes a separate chunk, any page that doesn't import the same module will break in production, because the chunk is added to main.js webpack dependencies but isn't added as a script tag.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">I've created a repo which reproduces the bug: <a href="https://github.com/jmswrnr/next-9.2.0-chunk-bug">https://github.com/jmswrnr/next-9.2.0-chunk-bug</a></p>
<p dir="auto">The bug only occurs in a production build, so: <code class="notranslate">npm run build</code> and <code class="notranslate">npm run start</code></p>
<ul dir="auto">
<li><a href="http://localhost:3000/" rel="nofollow">http://localhost:3000/</a> - Simple page - <strong>fails mount</strong></li>
<li><a href="http://localhost:3000/dynamic" rel="nofollow">http://localhost:3000/dynamic</a> - Dynamic import with <code class="notranslate">{ ssr: false }</code> - <strong>fails mount</strong></li>
<li><a href="http://localhost:3000/import" rel="nofollow">http://localhost:3000/import</a> - Import polyfill dependency - <strong>successfully mounts</strong></li>
</ul>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">All pages should trigger <code class="notranslate">useEffect</code> and display <code class="notranslate">Mounted: true</code></p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: Windows</li>
<li>Browser: chrome</li>
<li>Version of Next.js: <strong>9.2.0</strong> and <strong>9.2.1-canary.2</strong></li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">Using polyfill method from example: <a href="https://github.com/zeit/next.js/blob/master/examples/with-polyfills/next.config.js">https://github.com/zeit/next.js/blob/master/examples/with-polyfills/next.config.js</a></p> | 0 |
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Feature Idea</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">Module <code class="notranslate">apt_key</code></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.1.0
config file = ./ansible.cfg
configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.2.1.0
config file = ./ansible.cfg
configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[defaults]
inventory = local.ini
remote_user = ansible
hash_behaviour = merge
[ssh_connection]
ssh_args = -o ControlMaster=auto -o ControlPersist=90s
control_path = .ssh/%%h-%%p-%%r.master"><pre class="notranslate"><code class="notranslate">[defaults]
inventory = local.ini
remote_user = ansible
hash_behaviour = merge
[ssh_connection]
ssh_args = -o ControlMaster=auto -o ControlPersist=90s
control_path = .ssh/%%h-%%p-%%r.master
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Ansible runs from Debian Stretch and is managing Debian Jessie nodes.</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">I am reopening <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="30171721" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/6693" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/6693/hovercard" href="https://github.com/ansible/ansible/issues/6693">#6693</a> which was closed due to repos migration.</p>
<p dir="auto">I have encountered the same issue: a apt key gets expired and Ansible won't update it. Due to lack of the update feature apt wasn't possible to update cache and install/upgrade packages.</p>
<p dir="auto">I need to workaround this feature by running <code class="notranslate">ansible</code> ad-hoc command removing this apt key and then running the <em>playbook</em> again.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" - name: Fusion directory apt key
apt_key:
id: 62B4981F
keyserver: 'keys.gnupg.net' "><pre class="notranslate"> - <span class="pl-ent">name</span>: <span class="pl-s">Fusion directory apt key</span>
<span class="pl-ent">apt_key</span>:
<span class="pl-ent">id</span>: <span class="pl-s">62B4981F</span>
<span class="pl-ent">keyserver</span>: <span class="pl-s"><span class="pl-pds">'</span>keys.gnupg.net<span class="pl-pds">'</span></span> </pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">When the key expires, download it again to check if new one is available.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">Nothing changed, Ansible reports <code class="notranslate">OK</code>.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [ldap : Fusion directory apt key] *************************************
ok: [node-jessie]"><pre class="notranslate"><code class="notranslate">TASK [ldap : Fusion directory apt key] *************************************
ok: [node-jessie]
</code></pre></div> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto"><code class="notranslate">apt_key_module</code></p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.3.0.0
config file = /Users/raulcuza/dev/cg/transit/transit/infra/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.13 (default, Dec 18 2016, 07:03:34) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]"><pre class="notranslate"><code class="notranslate">ansible 2.3.0.0
config file = /Users/raulcuza/dev/cg/transit/transit/infra/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.13 (default, Dec 18 2016, 07:03:34) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[defaults]
ansible_managed = ixntransit ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
inventory = inventories/dev
roles_path = ./roles
retry_files_enabled = False
transport = ssh
vault_password_file = ~/.vault_pass
[ssh_connection]
ssh_args = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=30m
control_path = ~/.ssh/ansible-%%r@%%h:%%p
pipelining = True"><pre class="notranslate"><code class="notranslate">[defaults]
ansible_managed = ixntransit ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
inventory = inventories/dev
roles_path = ./roles
retry_files_enabled = False
transport = ssh
vault_password_file = ~/.vault_pass
[ssh_connection]
ssh_args = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=30m
control_path = ~/.ssh/ansible-%%r@%%h:%%p
pipelining = True
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">ubuntu 16.04</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">When I run a playbook that installs a new key, it is not able to install packages from the repo that is also added. If I manually ssh into the box and run <del><code class="notranslate">sudo apt-key update</code></del> <code class="notranslate">sudo apt-get update</code>, I can then run the playbook successfully.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<ul dir="auto">
<li>Start with a stock Ubuntu 16.04 with only <code class="notranslate">sudo apt-get install -y python python-apt</code> run on it.</li>
<li>Run the below role against it.</li>
</ul>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---
- name: install esl-erlang apt repo
apt_repository:
filename: erlang-solutions
repo: deb http://binaries.erlang-solutions.com/debian xenial contrib
state: present
update_cache: yes
- name: install esl-erlang apt signing key
apt_key:
url: "https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc"
state: present
- name: install apt packages
apt:
autoremove: yes
cache_valid_time: 300
name: "{{ item }}"
state: present
update_cache: yes
with_items:
- esl-erlang
- elixir"><pre class="notranslate">---
- <span class="pl-ent">name</span>: <span class="pl-s">install esl-erlang apt repo</span>
<span class="pl-ent">apt_repository</span>:
<span class="pl-ent">filename</span>: <span class="pl-s">erlang-solutions</span>
<span class="pl-ent">repo</span>: <span class="pl-s">deb http://binaries.erlang-solutions.com/debian xenial contrib</span>
<span class="pl-ent">state</span>: <span class="pl-s">present</span>
<span class="pl-ent">update_cache</span>: <span class="pl-s">yes</span>
- <span class="pl-ent">name</span>: <span class="pl-s">install esl-erlang apt signing key</span>
<span class="pl-ent">apt_key</span>:
<span class="pl-ent">url</span>: <span class="pl-s"><span class="pl-pds">"</span>https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc<span class="pl-pds">"</span></span>
<span class="pl-ent">state</span>: <span class="pl-s">present</span>
- <span class="pl-ent">name</span>: <span class="pl-s">install apt packages</span>
<span class="pl-ent">apt</span>:
<span class="pl-ent">autoremove</span>: <span class="pl-s">yes</span>
<span class="pl-ent">cache_valid_time</span>: <span class="pl-c1">300</span>
<span class="pl-ent">name</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ item }}<span class="pl-pds">"</span></span>
<span class="pl-ent">state</span>: <span class="pl-s">present</span>
<span class="pl-ent">update_cache</span>: <span class="pl-s">yes</span>
<span class="pl-ent">with_items</span>:
- <span class="pl-s">esl-erlang</span>
- <span class="pl-s">elixir</span></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">I expect all the packages from the new repo to be installed with authentication verified.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">I get an error stating that the packages cannot be installed because they are not verified.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [eucalyptus : install apt packages] *******************************************************************************************************************************************
failed: [10.0.0.12] (item=[u'esl-erlang', u'elixir', u'libssl1.0.0', u'locales', u'postgresql-client']) => {"cache_update_time": 1495847381, "cache_updated": false, "failed": true, "item": ["esl-erlang", "elixir", "libssl1.0.0", "locales", "postgresql-client"], "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\" --auto-remove install 'esl-erlang' 'elixir' 'postgresql-client'' failed: E: There were unauthenticated packages and -y was used without --allow-unauthenticated\n", "stderr": "E: There were unauthenticated packages and -y was used without --allow-unauthenticated\n", "stderr_lines": ["E: There were unauthenticated packages and -y was used without --allow-unauthenticated"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following additional packages will be installed:\n adwaita-icon-theme at-spi2-core colord colord-data dconf-gsettings-backend\n dconf-service emacsen-common erlang-mode fontconfig fontconfig-config\n fonts-dejavu-core glib-networking glib-networking-common\n glib-networking-services gsettings-desktop-schemas hicolor-icon-theme\n humanity-icon-theme libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data\n libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3\n libboost-filesystem1.58.0 libboost-system1.58.0 libcairo-gobject2 libcairo2\n libcolord2 libcolorhug2 libcroco3 libcups2 libdatrie1 libdconf1\n libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libegl1-mesa\n libepoxy0 libexif12 libfontconfig1 libgbm1 libgd3 libgdk-pixbuf2.0-0\n libgdk-pixbuf2.0-common libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa\n libgphoto2-6 libgphoto2-l10n libgphoto2-port12 libgraphite2-3 libgtk-3-0\n libgtk-3-bin libgtk-3-common libgtk2.0-0 libgtk2.0-bin libgtk2.0-common\n libgudev-1.0-0 libgusb2 libharfbuzz0b libice6 libieee1284-3 libjbig0\n libjpeg-turbo8 libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common\n liblcms2-2 libllvm3.8 libltdl7 libmirclient9 libmircommon5 libmirprotobuf3\n libnotify4 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0\n libpciaccess0 libpixman-1-0 libpq5 libprotobuf-lite9v5 libproxy1v5\n librest-0.7-0 librsvg2-2 librsvg2-common libsane libsane-common libsctp1\n libsm6 libsoup-gnome2.4-1 libsoup2.4-1 libthai-data libthai0 libtiff5\n libtxc-dxtn-s2tc0 libvpx3 libwayland-client0 libwayland-cursor0\n libwayland-egl1-mesa libwayland-server0 libwxbase3.0-0v5 libwxgtk3.0-0v5\n libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0\n libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcomposite1\n libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxpm4\n libxrandr2 libxrender1 libxshmfence1 libxtst6 libxxf86vm1\n notification-daemon postgresql-client-9.5 postgresql-client-common\n ubuntu-mono x11-common\nSuggested packages:\n colord-sensor-argyll erlang erlang-manpages erlang-doc default-jre-headless\n | java2-runtime-headless | java1-runtime-headless | java2-runtime\n | java1-runtime cups-common libgd-tools gphoto2 gvfs liblcms2-utils\n librsvg2-bin avahi-daemon hplip libsane-extras sane-utils lksctp-tools\n postgresql-9.5 postgresql-doc-9.5\nThe following NEW packages will be installed:\n adwaita-icon-theme at-spi2-core colord colord-data dconf-gsettings-backend\n dconf-service elixir emacsen-common erlang-mode esl-erlang fontconfig\n fontconfig-config fonts-dejavu-core glib-networking glib-networking-common\n glib-networking-services gsettings-desktop-schemas hicolor-icon-theme\n humanity-icon-theme libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data\n libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3\n libboost-filesystem1.58.0 libboost-system1.58.0 libcairo-gobject2 libcairo2\n libcolord2 libcolorhug2 libcroco3 libcups2 libdatrie1 libdconf1\n libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libegl1-mesa\n libepoxy0 libexif12 libfontconfig1 libgbm1 libgd3 libgdk-pixbuf2.0-0\n libgdk-pixbuf2.0-common libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa\n libgphoto2-6 libgphoto2-l10n libgphoto2-port12 libgraphite2-3 libgtk-3-0\n libgtk-3-bin libgtk-3-common libgtk2.0-0 libgtk2.0-bin libgtk2.0-common\n libgudev-1.0-0 libgusb2 libharfbuzz0b libice6 libieee1284-3 libjbig0\n libjpeg-turbo8 libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common\n liblcms2-2 libllvm3.8 libltdl7 libmirclient9 libmircommon5 libmirprotobuf3\n libnotify4 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0\n libpciaccess0 libpixman-1-0 libpq5 libprotobuf-lite9v5 libproxy1v5\n librest-0.7-0 librsvg2-2 librsvg2-common libsane libsane-common libsctp1\n libsm6 libsoup-gnome2.4-1 libsoup2.4-1 libthai-data libthai0 libtiff5\n libtxc-dxtn-s2tc0 libvpx3 libwayland-client0 libwayland-cursor0\n libwayland-egl1-mesa libwayland-server0 libwxbase3.0-0v5 libwxgtk3.0-0v5\n libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0\n libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcomposite1\n libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxpm4\n libxrandr2 libxrender1 libxshmfence1 libxtst6 libxxf86vm1\n notification-daemon postgresql-client postgresql-client-9.5\n postgresql-client-common ubuntu-mono x11-common\n0 upgraded, 134 newly installed, 0 to remove and 19 not upgraded.\nNeed to get 84.2 MB of archives.\nAfter this operation, 285 MB of additional disk space will be used.\nWARNING: The following packages cannot be authenticated!\n esl-erlang elixir erlang-mode\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following additional packages will be installed:", " adwaita-icon-theme at-spi2-core colord colord-data dconf-gsettings-backend", " dconf-service emacsen-common erlang-mode fontconfig fontconfig-config", " fonts-dejavu-core glib-networking glib-networking-common", " glib-networking-services gsettings-desktop-schemas hicolor-icon-theme", " humanity-icon-theme libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data", " libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3", " libboost-filesystem1.58.0 libboost-system1.58.0 libcairo-gobject2 libcairo2", " libcolord2 libcolorhug2 libcroco3 libcups2 libdatrie1 libdconf1", " libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libegl1-mesa", " libepoxy0 libexif12 libfontconfig1 libgbm1 libgd3 libgdk-pixbuf2.0-0", " libgdk-pixbuf2.0-common libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa", " libgphoto2-6 libgphoto2-l10n libgphoto2-port12 libgraphite2-3 libgtk-3-0", " libgtk-3-bin libgtk-3-common libgtk2.0-0 libgtk2.0-bin libgtk2.0-common", " libgudev-1.0-0 libgusb2 libharfbuzz0b libice6 libieee1284-3 libjbig0", " libjpeg-turbo8 libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common", " liblcms2-2 libllvm3.8 libltdl7 libmirclient9 libmircommon5 libmirprotobuf3", " libnotify4 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0", " libpciaccess0 libpixman-1-0 libpq5 libprotobuf-lite9v5 libproxy1v5", " librest-0.7-0 librsvg2-2 librsvg2-common libsane libsane-common libsctp1", " libsm6 libsoup-gnome2.4-1 libsoup2.4-1 libthai-data libthai0 libtiff5", " libtxc-dxtn-s2tc0 libvpx3 libwayland-client0 libwayland-cursor0", " libwayland-egl1-mesa libwayland-server0 libwxbase3.0-0v5 libwxgtk3.0-0v5", " libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0", " libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcomposite1", " libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxpm4", " libxrandr2 libxrender1 libxshmfence1 libxtst6 libxxf86vm1", " notification-daemon postgresql-client-9.5 postgresql-client-common", " ubuntu-mono x11-common", "Suggested packages:", " colord-sensor-argyll erlang erlang-manpages erlang-doc default-jre-headless", " | java2-runtime-headless | java1-runtime-headless | java2-runtime", " | java1-runtime cups-common libgd-tools gphoto2 gvfs liblcms2-utils", " librsvg2-bin avahi-daemon hplip libsane-extras sane-utils lksctp-tools", " postgresql-9.5 postgresql-doc-9.5", "The following NEW packages will be installed:", " adwaita-icon-theme at-spi2-core colord colord-data dconf-gsettings-backend", " dconf-service elixir emacsen-common erlang-mode esl-erlang fontconfig", " fontconfig-config fonts-dejavu-core glib-networking glib-networking-common", " glib-networking-services gsettings-desktop-schemas hicolor-icon-theme", " humanity-icon-theme libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data", " libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3", " libboost-filesystem1.58.0 libboost-system1.58.0 libcairo-gobject2 libcairo2", " libcolord2 libcolorhug2 libcroco3 libcups2 libdatrie1 libdconf1", " libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libegl1-mesa", " libepoxy0 libexif12 libfontconfig1 libgbm1 libgd3 libgdk-pixbuf2.0-0", " libgdk-pixbuf2.0-common libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa", " libgphoto2-6 libgphoto2-l10n libgphoto2-port12 libgraphite2-3 libgtk-3-0", " libgtk-3-bin libgtk-3-common libgtk2.0-0 libgtk2.0-bin libgtk2.0-common", " libgudev-1.0-0 libgusb2 libharfbuzz0b libice6 libieee1284-3 libjbig0", " libjpeg-turbo8 libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common", " liblcms2-2 libllvm3.8 libltdl7 libmirclient9 libmircommon5 libmirprotobuf3", " libnotify4 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0", " libpciaccess0 libpixman-1-0 libpq5 libprotobuf-lite9v5 libproxy1v5", " librest-0.7-0 librsvg2-2 librsvg2-common libsane libsane-common libsctp1", " libsm6 libsoup-gnome2.4-1 libsoup2.4-1 libthai-data libthai0 libtiff5", " libtxc-dxtn-s2tc0 libvpx3 libwayland-client0 libwayland-cursor0", " libwayland-egl1-mesa libwayland-server0 libwxbase3.0-0v5 libwxgtk3.0-0v5", " libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0", " libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcomposite1", " libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxpm4", " libxrandr2 libxrender1 libxshmfence1 libxtst6 libxxf86vm1", " notification-daemon postgresql-client postgresql-client-9.5", " postgresql-client-common ubuntu-mono x11-common", "0 upgraded, 134 newly installed, 0 to remove and 19 not upgraded.", "Need to get 84.2 MB of archives.", "After this operation, 285 MB of additional disk space will be used.", "WARNING: The following packages cannot be authenticated!", " esl-erlang elixir erlang-mode"]}"><pre class="notranslate"><code class="notranslate">TASK [eucalyptus : install apt packages] *******************************************************************************************************************************************
failed: [10.0.0.12] (item=[u'esl-erlang', u'elixir', u'libssl1.0.0', u'locales', u'postgresql-client']) => {"cache_update_time": 1495847381, "cache_updated": false, "failed": true, "item": ["esl-erlang", "elixir", "libssl1.0.0", "locales", "postgresql-client"], "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\" --auto-remove install 'esl-erlang' 'elixir' 'postgresql-client'' failed: E: There were unauthenticated packages and -y was used without --allow-unauthenticated\n", "stderr": "E: There were unauthenticated packages and -y was used without --allow-unauthenticated\n", "stderr_lines": ["E: There were unauthenticated packages and -y was used without --allow-unauthenticated"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following additional packages will be installed:\n adwaita-icon-theme at-spi2-core colord colord-data dconf-gsettings-backend\n dconf-service emacsen-common erlang-mode fontconfig fontconfig-config\n fonts-dejavu-core glib-networking glib-networking-common\n glib-networking-services gsettings-desktop-schemas hicolor-icon-theme\n humanity-icon-theme libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data\n libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3\n libboost-filesystem1.58.0 libboost-system1.58.0 libcairo-gobject2 libcairo2\n libcolord2 libcolorhug2 libcroco3 libcups2 libdatrie1 libdconf1\n libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libegl1-mesa\n libepoxy0 libexif12 libfontconfig1 libgbm1 libgd3 libgdk-pixbuf2.0-0\n libgdk-pixbuf2.0-common libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa\n libgphoto2-6 libgphoto2-l10n libgphoto2-port12 libgraphite2-3 libgtk-3-0\n libgtk-3-bin libgtk-3-common libgtk2.0-0 libgtk2.0-bin libgtk2.0-common\n libgudev-1.0-0 libgusb2 libharfbuzz0b libice6 libieee1284-3 libjbig0\n libjpeg-turbo8 libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common\n liblcms2-2 libllvm3.8 libltdl7 libmirclient9 libmircommon5 libmirprotobuf3\n libnotify4 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0\n libpciaccess0 libpixman-1-0 libpq5 libprotobuf-lite9v5 libproxy1v5\n librest-0.7-0 librsvg2-2 librsvg2-common libsane libsane-common libsctp1\n libsm6 libsoup-gnome2.4-1 libsoup2.4-1 libthai-data libthai0 libtiff5\n libtxc-dxtn-s2tc0 libvpx3 libwayland-client0 libwayland-cursor0\n libwayland-egl1-mesa libwayland-server0 libwxbase3.0-0v5 libwxgtk3.0-0v5\n libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0\n libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcomposite1\n libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxpm4\n libxrandr2 libxrender1 libxshmfence1 libxtst6 libxxf86vm1\n notification-daemon postgresql-client-9.5 postgresql-client-common\n ubuntu-mono x11-common\nSuggested packages:\n colord-sensor-argyll erlang erlang-manpages erlang-doc default-jre-headless\n | java2-runtime-headless | java1-runtime-headless | java2-runtime\n | java1-runtime cups-common libgd-tools gphoto2 gvfs liblcms2-utils\n librsvg2-bin avahi-daemon hplip libsane-extras sane-utils lksctp-tools\n postgresql-9.5 postgresql-doc-9.5\nThe following NEW packages will be installed:\n adwaita-icon-theme at-spi2-core colord colord-data dconf-gsettings-backend\n dconf-service elixir emacsen-common erlang-mode esl-erlang fontconfig\n fontconfig-config fonts-dejavu-core glib-networking glib-networking-common\n glib-networking-services gsettings-desktop-schemas hicolor-icon-theme\n humanity-icon-theme libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data\n libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3\n libboost-filesystem1.58.0 libboost-system1.58.0 libcairo-gobject2 libcairo2\n libcolord2 libcolorhug2 libcroco3 libcups2 libdatrie1 libdconf1\n libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libegl1-mesa\n libepoxy0 libexif12 libfontconfig1 libgbm1 libgd3 libgdk-pixbuf2.0-0\n libgdk-pixbuf2.0-common libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa\n libgphoto2-6 libgphoto2-l10n libgphoto2-port12 libgraphite2-3 libgtk-3-0\n libgtk-3-bin libgtk-3-common libgtk2.0-0 libgtk2.0-bin libgtk2.0-common\n libgudev-1.0-0 libgusb2 libharfbuzz0b libice6 libieee1284-3 libjbig0\n libjpeg-turbo8 libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common\n liblcms2-2 libllvm3.8 libltdl7 libmirclient9 libmircommon5 libmirprotobuf3\n libnotify4 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0\n libpciaccess0 libpixman-1-0 libpq5 libprotobuf-lite9v5 libproxy1v5\n librest-0.7-0 librsvg2-2 librsvg2-common libsane libsane-common libsctp1\n libsm6 libsoup-gnome2.4-1 libsoup2.4-1 libthai-data libthai0 libtiff5\n libtxc-dxtn-s2tc0 libvpx3 libwayland-client0 libwayland-cursor0\n libwayland-egl1-mesa libwayland-server0 libwxbase3.0-0v5 libwxgtk3.0-0v5\n libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0\n libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcomposite1\n libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxpm4\n libxrandr2 libxrender1 libxshmfence1 libxtst6 libxxf86vm1\n notification-daemon postgresql-client postgresql-client-9.5\n postgresql-client-common ubuntu-mono x11-common\n0 upgraded, 134 newly installed, 0 to remove and 19 not upgraded.\nNeed to get 84.2 MB of archives.\nAfter this operation, 285 MB of additional disk space will be used.\nWARNING: The following packages cannot be authenticated!\n esl-erlang elixir erlang-mode\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following additional packages will be installed:", " adwaita-icon-theme at-spi2-core colord colord-data dconf-gsettings-backend", " dconf-service emacsen-common erlang-mode fontconfig fontconfig-config", " fonts-dejavu-core glib-networking glib-networking-common", " glib-networking-services gsettings-desktop-schemas hicolor-icon-theme", " humanity-icon-theme libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data", " libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3", " libboost-filesystem1.58.0 libboost-system1.58.0 libcairo-gobject2 libcairo2", " libcolord2 libcolorhug2 libcroco3 libcups2 libdatrie1 libdconf1", " libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libegl1-mesa", " libepoxy0 libexif12 libfontconfig1 libgbm1 libgd3 libgdk-pixbuf2.0-0", " libgdk-pixbuf2.0-common libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa", " libgphoto2-6 libgphoto2-l10n libgphoto2-port12 libgraphite2-3 libgtk-3-0", " libgtk-3-bin libgtk-3-common libgtk2.0-0 libgtk2.0-bin libgtk2.0-common", " libgudev-1.0-0 libgusb2 libharfbuzz0b libice6 libieee1284-3 libjbig0", " libjpeg-turbo8 libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common", " liblcms2-2 libllvm3.8 libltdl7 libmirclient9 libmircommon5 libmirprotobuf3", " libnotify4 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0", " libpciaccess0 libpixman-1-0 libpq5 libprotobuf-lite9v5 libproxy1v5", " librest-0.7-0 librsvg2-2 librsvg2-common libsane libsane-common libsctp1", " libsm6 libsoup-gnome2.4-1 libsoup2.4-1 libthai-data libthai0 libtiff5", " libtxc-dxtn-s2tc0 libvpx3 libwayland-client0 libwayland-cursor0", " libwayland-egl1-mesa libwayland-server0 libwxbase3.0-0v5 libwxgtk3.0-0v5", " libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0", " libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcomposite1", " libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxpm4", " libxrandr2 libxrender1 libxshmfence1 libxtst6 libxxf86vm1", " notification-daemon postgresql-client-9.5 postgresql-client-common", " ubuntu-mono x11-common", "Suggested packages:", " colord-sensor-argyll erlang erlang-manpages erlang-doc default-jre-headless", " | java2-runtime-headless | java1-runtime-headless | java2-runtime", " | java1-runtime cups-common libgd-tools gphoto2 gvfs liblcms2-utils", " librsvg2-bin avahi-daemon hplip libsane-extras sane-utils lksctp-tools", " postgresql-9.5 postgresql-doc-9.5", "The following NEW packages will be installed:", " adwaita-icon-theme at-spi2-core colord colord-data dconf-gsettings-backend", " dconf-service elixir emacsen-common erlang-mode esl-erlang fontconfig", " fontconfig-config fonts-dejavu-core glib-networking glib-networking-common", " glib-networking-services gsettings-desktop-schemas hicolor-icon-theme", " humanity-icon-theme libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data", " libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3", " libboost-filesystem1.58.0 libboost-system1.58.0 libcairo-gobject2 libcairo2", " libcolord2 libcolorhug2 libcroco3 libcups2 libdatrie1 libdconf1", " libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libegl1-mesa", " libepoxy0 libexif12 libfontconfig1 libgbm1 libgd3 libgdk-pixbuf2.0-0", " libgdk-pixbuf2.0-common libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa", " libgphoto2-6 libgphoto2-l10n libgphoto2-port12 libgraphite2-3 libgtk-3-0", " libgtk-3-bin libgtk-3-common libgtk2.0-0 libgtk2.0-bin libgtk2.0-common", " libgudev-1.0-0 libgusb2 libharfbuzz0b libice6 libieee1284-3 libjbig0", " libjpeg-turbo8 libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common", " liblcms2-2 libllvm3.8 libltdl7 libmirclient9 libmircommon5 libmirprotobuf3", " libnotify4 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0", " libpciaccess0 libpixman-1-0 libpq5 libprotobuf-lite9v5 libproxy1v5", " librest-0.7-0 librsvg2-2 librsvg2-common libsane libsane-common libsctp1", " libsm6 libsoup-gnome2.4-1 libsoup2.4-1 libthai-data libthai0 libtiff5", " libtxc-dxtn-s2tc0 libvpx3 libwayland-client0 libwayland-cursor0", " libwayland-egl1-mesa libwayland-server0 libwxbase3.0-0v5 libwxgtk3.0-0v5", " libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0", " libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcomposite1", " libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxpm4", " libxrandr2 libxrender1 libxshmfence1 libxtst6 libxxf86vm1", " notification-daemon postgresql-client postgresql-client-9.5", " postgresql-client-common ubuntu-mono x11-common", "0 upgraded, 134 newly installed, 0 to remove and 19 not upgraded.", "Need to get 84.2 MB of archives.", "After this operation, 285 MB of additional disk space will be used.", "WARNING: The following packages cannot be authenticated!", " esl-erlang elixir erlang-mode"]}
</code></pre></div> | 1 |
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="python3 setup.py test
"><pre class="notranslate"><span class="pl-s1">python3</span> <span class="pl-s1">setup</span>.<span class="pl-s1">py</span> <span class="pl-s1">test</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">table_schema (unittest.loader._FailedTest) ... ERROR<br>
json (unittest.loader._FailedTest) ... ERROR<br>
normalize (unittest.loader._FailedTest) ... ERROR</p>
<h2 dir="auto">======================================================================<br>
ERROR: table_schema (unittest.loader._FailedTest)</h2>
<p dir="auto">AttributeError: module 'pandas.io.json' has no attribute 'table_schema'</p>
<h2 dir="auto">======================================================================<br>
ERROR: json (unittest.loader._FailedTest)</h2>
<p dir="auto">AttributeError: module 'pandas.io.json' has no attribute 'json'</p>
<h2 dir="auto">======================================================================<br>
ERROR: normalize (unittest.loader._FailedTest)</h2>
<p dir="auto">AttributeError: module 'pandas.io.json' has no attribute 'normalize'</p>
<hr>
<p dir="auto"><strong>Note</strong>: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!</p>
<p dir="auto"><strong>Note</strong>: Many problems can be resolved by simply upgrading <code class="notranslate">pandas</code> to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if <code class="notranslate">master</code> addresses this issue, but that is not necessary.</p>
<p dir="auto">For documentation-related issues, you can check the latest versions of the docs on <code class="notranslate">master</code> here:</p>
<p dir="auto"><a href="https://pandas-docs.github.io/pandas-docs-travis/" rel="nofollow">https://pandas-docs.github.io/pandas-docs-travis/</a></p>
<p dir="auto">If the issue has not been resolved there, go ahead and file it in the issue tracker.</p>
<h4 dir="auto">Expected Output</h4>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<p dir="auto">[paste the output of <code class="notranslate">pd.show_versions()</code> here below this line]</p>
</details> | <h4 dir="auto">Code Sample</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd
start_end_idx = pd.IntervalIndex.from_arrays(start, end)
start_end_idx.name = 'port_time'
mm = mm.set_index(['imo','port_id', start_end_idx])
global_bins = mm.index
global_bins.get_loc((8801527, 5610.0, pd.to_datetime('2016-10-16 16:57:44.316')))"><pre class="notranslate"><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-s1">start_end_idx</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">IntervalIndex</span>.<span class="pl-en">from_arrays</span>(<span class="pl-s1">start</span>, <span class="pl-s1">end</span>)
<span class="pl-s1">start_end_idx</span>.<span class="pl-s1">name</span> <span class="pl-c1">=</span> <span class="pl-s">'port_time'</span>
<span class="pl-s1">mm</span> <span class="pl-c1">=</span> <span class="pl-s1">mm</span>.<span class="pl-en">set_index</span>([<span class="pl-s">'imo'</span>,<span class="pl-s">'port_id'</span>, <span class="pl-s1">start_end_idx</span>])
<span class="pl-s1">global_bins</span> <span class="pl-c1">=</span> <span class="pl-s1">mm</span>.<span class="pl-s1">index</span>
<span class="pl-s1">global_bins</span>.<span class="pl-en">get_loc</span>((<span class="pl-c1">8801527</span>, <span class="pl-c1">5610.0</span>, <span class="pl-s1">pd</span>.<span class="pl-en">to_datetime</span>(<span class="pl-s">'2016-10-16 16:57:44.316'</span>)))</pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/anaconda3/envs/mariquant/lib/python3.6/site-packages/pandas/core/indexes/interval.py in _engine(self)
283 @cache_readonly
284 def _engine(self):
--> 285 return IntervalTree(self.left, self.right, closed=self.closed)
286
287 @property
pandas/_libs/intervaltree.pxi in pandas._libs.interval.IntervalTree.__init__()
KeyError: ('datetime64[ns]', 'right')"><pre class="notranslate"><code class="notranslate">/anaconda3/envs/mariquant/lib/python3.6/site-packages/pandas/core/indexes/interval.py in _engine(self)
283 @cache_readonly
284 def _engine(self):
--> 285 return IntervalTree(self.left, self.right, closed=self.closed)
286
287 @property
pandas/_libs/intervaltree.pxi in pandas._libs.interval.IntervalTree.__init__()
KeyError: ('datetime64[ns]', 'right')
</code></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">It is impossible to use non unique IntervalIndex with datetimes as start-end points. Both index.get_loc and DataFrame.loc produce the same error in IntervalTree.</p>
<h4 dir="auto">Expected Output</h4>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<p dir="auto">[paste the output of <code class="notranslate">pd.show_versions()</code> here below this line]</p>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None</p>
<p dir="auto">pandas: 0.22.0<br>
pytest: None<br>
pip: 9.0.1<br>
setuptools: 38.5.1<br>
Cython: None<br>
numpy: 1.14.2<br>
scipy: 1.0.0<br>
pyarrow: None<br>
xarray: 0.10.2<br>
IPython: 6.2.1<br>
sphinx: 1.7.1<br>
patsy: 0.5.0<br>
dateutil: 2.7.0<br>
pytz: 2018.3<br>
blosc: None<br>
bottleneck: 1.2.1<br>
tables: None<br>
numexpr: None<br>
feather: None<br>
matplotlib: 2.2.2<br>
openpyxl: None<br>
xlrd: None<br>
xlwt: None<br>
xlsxwriter: None<br>
lxml: None<br>
bs4: None<br>
html5lib: 1.0.1<br>
sqlalchemy: 1.2.5<br>
pymysql: None<br>
psycopg2: 2.7.4 (dt dec pq3 ext lo64)<br>
jinja2: 2.10<br>
s3fs: None<br>
fastparquet: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details> | 0 |
<p dir="auto">Using ansible 1.9.4. reconfirmed by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/global/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/global">@global</a> on 2.2.0.0</p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2.2.0.0"><pre class="notranslate"><code class="notranslate">2.2.0.0
</code></pre></div>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">tags</p>
<p dir="auto">If I have a role - <code class="notranslate">example-3</code> which depends on <code class="notranslate">example-1</code> then provisioning using <code class="notranslate">--tags=example-3</code> will only run <code class="notranslate">example-1</code> if <code class="notranslate">example-3</code> is the first role in the list of roles.</p>
<p dir="auto">Below are is the output for each case:</p>
<h3 dir="auto">Dependencies do not run for <code class="notranslate">--tags=example-3</code></h3>
<p dir="auto">Playbook:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
---
- name: Demo with role tagging
hosts: vagrant
sudo: yes
roles:
- { role: 'example-2', tags: 'example-2' }
- { role: 'example-3', tags: 'example-3' }"><pre class="notranslate"><code class="notranslate">
---
- name: Demo with role tagging
hosts: vagrant
sudo: yes
roles:
- { role: 'example-2', tags: 'example-2' }
- { role: 'example-3', tags: 'example-3' }
</code></pre></div>
<p dir="auto">Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [Demo with role tagging] *************************************************
GATHERING FACTS ***************************************************************
ok: [192.168.12.148]
TASK: [example-3 | Running example 3] *****************************************
ok: [192.168.12.148] => {
"msg": "Example 3"
}
PLAY RECAP ********************************************************************
192.168.12.148 : ok=2 changed=0 unreachable=0 failed=0"><pre class="notranslate"><code class="notranslate">PLAY [Demo with role tagging] *************************************************
GATHERING FACTS ***************************************************************
ok: [192.168.12.148]
TASK: [example-3 | Running example 3] *****************************************
ok: [192.168.12.148] => {
"msg": "Example 3"
}
PLAY RECAP ********************************************************************
192.168.12.148 : ok=2 changed=0 unreachable=0 failed=0
</code></pre></div>
<h3 dir="auto">Dependencies do run for <code class="notranslate">--tags=example-3</code></h3>
<p dir="auto">Playbook:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
---
- name: Demo with role tagging
hosts: vagrant
sudo: yes
roles:
- { role: 'example-3', tags: 'example-3' }"><pre class="notranslate"><code class="notranslate">
---
- name: Demo with role tagging
hosts: vagrant
sudo: yes
roles:
- { role: 'example-3', tags: 'example-3' }
</code></pre></div>
<p dir="auto">Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [Demo with role tagging] *************************************************
GATHERING FACTS ***************************************************************
ok: [192.168.12.148]
TASK: [example-1 | Running example 1] *****************************************
ok: [192.168.12.148] => {
"msg": "Example 1"
}
TASK: [example-3 | Running example 3] *****************************************
ok: [192.168.12.148] => {
"msg": "Example 3"
}
PLAY RECAP ********************************************************************
192.168.12.148 : ok=3 changed=0 unreachable=0 failed=0"><pre class="notranslate"><code class="notranslate">PLAY [Demo with role tagging] *************************************************
GATHERING FACTS ***************************************************************
ok: [192.168.12.148]
TASK: [example-1 | Running example 1] *****************************************
ok: [192.168.12.148] => {
"msg": "Example 1"
}
TASK: [example-3 | Running example 3] *****************************************
ok: [192.168.12.148] => {
"msg": "Example 3"
}
PLAY RECAP ********************************************************************
192.168.12.148 : ok=3 changed=0 unreachable=0 failed=0
</code></pre></div>
<p dir="auto">There is a sample repo <a href="https://github.com/pajtai/ansible-tags-example">here</a> which runs the <code class="notranslate">example-3</code> tag on vagrant provisioning. If you run <code class="notranslate">vagrant up</code> or subsequently <code class="notranslate">vagrant provision</code> or <code class="notranslate">ansible-playbook</code> against the VM box, then you can see the case where the dependencies do not run. To get the dependencies to run comment out <a href="https://github.com/pajtai/ansible-tags-example/blob/master/ansible/site.yml#L6">the first role</a>.</p>
<p dir="auto">This problem is referenced by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ghostwords/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ghostwords">@ghostwords</a> <a href="https://github.com/ansible/ansible/issues/4339#issuecomment-160677433" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/4339/hovercard">here</a></p> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Feature Idea</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">roles + tags</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
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.1.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">Irrelevant</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">It will be very convenient have possibility run only part of role.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Come from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="134308687" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/14525" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/14525/hovercard" href="https://github.com/ansible/ansible/issues/14525">#14525</a>.</p>
<p dir="auto">Playbook:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- hosts: localhost
connection: local
roles:
- testdep"><pre class="notranslate"><code class="notranslate">- hosts: localhost
connection: local
roles:
- testdep
</code></pre></div>
<p dir="auto">role <code class="notranslate">test</code>/tasks/main.yml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Task with tag1
raw: echo Run task with tag1
tags: tag1
- name: Task with tag2
raw: echo Run task with tag2
tags: tag2"><pre class="notranslate"><code class="notranslate">- name: Task with tag1
raw: echo Run task with tag1
tags: tag1
- name: Task with tag2
raw: echo Run task with tag2
tags: tag2
</code></pre></div>
<p dir="auto">It will be very helpful use it in dependency a <em>part of other role</em> in similar to <code class="notranslate">ansible-playbook</code> run way:</p>
<p dir="auto">role <code class="notranslate">testdep</code>/meta/main.yml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dependencies:
- { role: test, only-tags: tag1 }
- { role: test, skip-tags: [ 'tag1' ] }"><pre class="notranslate"><code class="notranslate">dependencies:
- { role: test, only-tags: tag1 }
- { role: test, skip-tags: [ 'tag1' ] }
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<ul dir="auto">
<li>For case of</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" - { role: test, only-tags: tag1 }"><pre class="notranslate"><code class="notranslate"> - { role: test, only-tags: tag1 }
</code></pre></div>
<p dir="auto">expected what only tasks with <code class="notranslate">tag1</code> from role <code class="notranslate">test</code> will be applied.</p>
<ul dir="auto">
<li>Vise versa for case of</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" - { role: test, skip-tags: [ 'tag1' ] }"><pre class="notranslate"><code class="notranslate"> - { role: test, skip-tags: [ 'tag1' ] }
</code></pre></div>
<p dir="auto">all tasks without tag <code class="notranslate">tag1</code> will be run.</p> | 0 |
<p dir="auto">Hello,</p>
<p dir="auto">I upgraded from 2.0.0-alpha.45 to 2.0.0-alpha.47 and the folder angular2\bundles\typings\angular2 is not available any more. I need the bundled typings in order to compile my project.</p>
<p dir="auto">Regards,</p>
<p dir="auto">Vasil</p> | <p dir="auto">Please see the following gist:<br>
<a href="https://gist.github.com/fuzing/ae762b795dd3376edf78">https://gist.github.com/fuzing/ae762b795dd3376edf78</a></p>
<p dir="auto">'dmodel' is simply an object that holds values for the fields in the form.</p>
<p dir="auto">Angular 2 version: 2.0.0-beta.2<br>
I have the following relevant js files loaded in the browser:</p>
<p dir="auto">es6-shim<br>
angular2-polyfills.js<br>
system.src.js<br>
Rx.min.js<br>
angular2.js<br>
router.dev.js<br>
http.dev.js</p>
<p dir="auto">Thanks!</p> | 0 |
<p dir="auto">I'm trying to perform hierarchical clustering on sparse observation matrix. The matrix represents movie ratings for a number of users. However, running <code class="notranslate">linkage([ndarray], method='single')</code><br>
causes infinite recursion and <code class="notranslate">linkage([ndarray], method='single', metric='cosine')</code> crashes. <code class="notranslate">ward</code> works fine.</p>
<p dir="auto">Cheers.</p>
<h3 dir="auto">Reproducing code example:</h3>
<p dir="auto">Data source: <a href="https://www.librec.net/datasets/filmtrust.zip" rel="nofollow">https://www.librec.net/datasets/filmtrust.zip</a><br>
Data format (<code class="notranslate">ratings.dat</code>):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[...]
36 6 4
36 250 3.5
36 219 3.5
36 234 3
36 211 4
[...]"><pre class="notranslate"><code class="notranslate">[...]
36 6 4
36 250 3.5
36 219 3.5
36 234 3
36 211 4
[...]
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np
from scipy.sparse import dok_matrix
from scipy.cluster import hierarchy
def load_ratings(path):
ratings = {}
items = set([])
with open(path, 'r') as data:
for line in data.readlines():
rating = [e for e in line.replace('\n', '').split(' ')]
items.add(int(rating[1]))
if not int(rating[0]) in ratings:
ratings[int(rating[0])] = {}
ratings[int(rating[0])][int(rating[1])] = float(rating[2])
return (ratings, items)
ratings, items = load_ratings('ratings.txt')
R = dok_matrix((max(items) + 1, max(ratings) + 1), dtype=np.float32)
for user in ratings:
for item in ratings[user]:
R[item, user] = ratings[user][item]
R = R.transpose().toarray()
Z = hierarchy.linkage(R, method='single')
# This exceeds maximum recursion depth
hierarchy.dendrogram(Z)"><pre class="notranslate"><code class="notranslate">import numpy as np
from scipy.sparse import dok_matrix
from scipy.cluster import hierarchy
def load_ratings(path):
ratings = {}
items = set([])
with open(path, 'r') as data:
for line in data.readlines():
rating = [e for e in line.replace('\n', '').split(' ')]
items.add(int(rating[1]))
if not int(rating[0]) in ratings:
ratings[int(rating[0])] = {}
ratings[int(rating[0])][int(rating[1])] = float(rating[2])
return (ratings, items)
ratings, items = load_ratings('ratings.txt')
R = dok_matrix((max(items) + 1, max(ratings) + 1), dtype=np.float32)
for user in ratings:
for item in ratings[user]:
R[item, user] = ratings[user][item]
R = R.transpose().toarray()
Z = hierarchy.linkage(R, method='single')
# This exceeds maximum recursion depth
hierarchy.dendrogram(Z)
</code></pre></div>
<p dir="auto">Input matrix (<code class="notranslate">R</code>):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[[ 0. 0. 0. ..., 0. 0. 0. ]
[ 0. 2. 4. ..., 0. 0. 0. ]
[ 0. 0. 0. ..., 0. 0. 0. ]
...,
[ 0. 0. 0. ..., 0. 0. 0. ]
[ 0. 0. 4. ..., 0. 0. 0. ]
[ 0. 1.5 3. ..., 0. 0. 0. ]]"><pre class="notranslate"><code class="notranslate">[[ 0. 0. 0. ..., 0. 0. 0. ]
[ 0. 2. 4. ..., 0. 0. 0. ]
[ 0. 0. 0. ..., 0. 0. 0. ]
...,
[ 0. 0. 0. ..., 0. 0. 0. ]
[ 0. 0. 4. ..., 0. 0. 0. ]
[ 0. 1.5 3. ..., 0. 0. 0. ]]
</code></pre></div>
<h3 dir="auto">Error message 1</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[...]
651, in _dendrogram_calculate_info
above_threshold_color=above_threshold_color)
File "/home/siegmeyer/.local/lib/python3.5/site-packages/scipy/cluster/hierarchy.py", line 2651, in _dendrogram_calculate_info
above_threshold_color=above_threshold_color)
File "/home/siegmeyer/.local/lib/python3.5/site-packages/scipy/cluster/hierarchy.py", line 2651, in _dendrogram_calculate_info
above_threshold_color=above_threshold_color)
File "/home/siegmeyer/.local/lib/python3.5/site-packages/scipy/cluster/hierarchy.py", line 2618, in _dendrogram_calculate_info
above_threshold_color=above_threshold_color)
File "/home/siegmeyer/.local/lib/python3.5/site-packages/scipy/cluster/hierarchy.py", line 2530, in _dendrogram_calculate_info
leaf_label_func, i, labels)
File "/home/siegmeyer/.local/lib/python3.5/site-packages/scipy/cluster/hierarchy.py", line 2403, in _append_singleton_leaf_node
ivl.append(str(int(i)))
RecursionError: maximum recursion depth exceeded while getting the str of an object"><pre class="notranslate"><code class="notranslate">[...]
651, in _dendrogram_calculate_info
above_threshold_color=above_threshold_color)
File "/home/siegmeyer/.local/lib/python3.5/site-packages/scipy/cluster/hierarchy.py", line 2651, in _dendrogram_calculate_info
above_threshold_color=above_threshold_color)
File "/home/siegmeyer/.local/lib/python3.5/site-packages/scipy/cluster/hierarchy.py", line 2651, in _dendrogram_calculate_info
above_threshold_color=above_threshold_color)
File "/home/siegmeyer/.local/lib/python3.5/site-packages/scipy/cluster/hierarchy.py", line 2618, in _dendrogram_calculate_info
above_threshold_color=above_threshold_color)
File "/home/siegmeyer/.local/lib/python3.5/site-packages/scipy/cluster/hierarchy.py", line 2530, in _dendrogram_calculate_info
leaf_label_func, i, labels)
File "/home/siegmeyer/.local/lib/python3.5/site-packages/scipy/cluster/hierarchy.py", line 2403, in _append_singleton_leaf_node
ivl.append(str(int(i)))
RecursionError: maximum recursion depth exceeded while getting the str of an object
</code></pre></div>
<h3 dir="auto">Error message 2 (with <code class="notranslate">metric='cosine'</code>)</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "cosine_similarity.py", line 100, in <module>
Z = hierarchy.linkage(R, metric='cosine')
File "/home/siegmeyer/.local/lib/python3.5/site-packages/scipy/cluster/hierarchy.py", line 676, in linkage
raise ValueError("The condensed distance matrix must contain only finite values.")
ValueError: The condensed distance matrix must contain only finite values."><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
File "cosine_similarity.py", line 100, in <module>
Z = hierarchy.linkage(R, metric='cosine')
File "/home/siegmeyer/.local/lib/python3.5/site-packages/scipy/cluster/hierarchy.py", line 676, in linkage
raise ValueError("The condensed distance matrix must contain only finite values.")
ValueError: The condensed distance matrix must contain only finite values.
</code></pre></div>
<h3 dir="auto">Scipy/Numpy/Python version information:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0.19.0 1.12.1 sys.version_info(major=3, minor=5, micro=2, releaselevel='final', serial=0)"><pre class="notranslate"><code class="notranslate">0.19.0 1.12.1 sys.version_info(major=3, minor=5, micro=2, releaselevel='final', serial=0)
</code></pre></div> | <p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/612" rel="nofollow">http://projects.scipy.org/scipy/ticket/612</a> on 2008-02-26 by trac user rspringuel, assigned to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/cournape/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/cournape">@cournape</a>.</em></p>
<p dir="auto">The current cluster package for scipy implements only k-means clustering for a euclidean distance metric with centroids computed as the mean of the members of each cluster.</p>
<p dir="auto">Pycluster implements 8 different distance metrics, three different centroid methods (mean, median, and medoid) and four different clustering algorithms (k-means, agglomerative hierarchical, SOM, and PCA) but contains non-BSD style license compatible elements and so cannot be incorporated into scipy.</p>
<p dir="auto">Using Pycluster as a model, I have written a clustering package from scratch that duplicates most of its functionality and expands on it in certain areas as well.</p>
<p dir="auto">I have also endevored to design the package to make future expansions easy and straight forward.</p>
<p dir="auto">To date what I have written supports the following:</p>
<p dir="auto">Distances:<br>
euclidean<br>
normalized euclidean<br>
city block (aka manhattan)<br>
normalized city block<br>
hamming (aka simple mapping coefficient)<br>
pearson<br>
absolute pearson<br>
uncentered pearson<br>
arccosine of pearson<br>
absolute uncentered pearson<br>
spearman<br>
kendall<br>
modified simple matching coefficent of Rogers and Tanimoto<br>
modified simple matching coefficent of Sokal and Sneath<br>
jaccard coefficent<br>
modified jaccard coefficent of Dice<br>
modified jaccard coefficent of Sokal and Sneath<br>
general Minkowski metric<br>
Chebychev distance</p>
<p dir="auto">Centroids:<br>
arithmetic mean<br>
median<br>
absolute mean<br>
geometric mean<br>
harmonic mean<br>
quadratic mean<br>
mediod (using any of the above distances)</p>
<p dir="auto">Clustering algorithms:<br>
k-means<br>
c-means (fuzzy clustering)<br>
agglomerative hierarchical</p>
<p dir="auto">Additional distances, centroid methods, and clustering algorithms may be added as my work requires them.</p>
<p dir="auto">Since I have written all of this code from scratch, I control the license to it and have elected to release it under a BSD-style license so that it can be incorporated into scipy.</p>
<p dir="auto">What I have written obviously greatly expands on the functionality of the current cluster package, but it is written entirely in python as so may be slower than what is currently present where the functionality overlaps (hence the quotation marks around "better" in the title of this ticket).</p>
<p dir="auto">Note: All of the centroid methods are based on my statistical functions submitted in ticket <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="13649624" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/1131" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/1131/hovercard" href="https://github.com/scipy/scipy/issues/1131">gh-1131</a> and so the code would have to be revised should those stats functions not be incorporated into scipy.</p> | 0 |
<p dir="auto">I'm tried to use *Profilter tool on Chrome browser, but i got this error when i review the rank of list Elements. I don't know what is that ?</p>
<p dir="auto">DevTools version: 4.2.1-3816ae7c3</p>
<p dir="auto">Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157108<br>
at Map.forEach ()<br>
at commitIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157054)<br>
at e.getRankedChartData (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157577)<br>
at vl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:314907)<br>
at gi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59907)<br>
at jl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:107381)<br>
at Lc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:92715)<br>
at Pc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:92640)<br>
at wc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:89544)</p>
<p dir="auto">Component stack: in vl<br>
in div<br>
in div<br>
in div<br>
in wo<br>
in Unknown<br>
in n<br>
in Unknown<br>
in div<br>
in div<br>
in Li<br>
in $e<br>
in dn<br>
in Ca<br>
in Pc</p> | <h2 dir="auto">Should Do Soon</h2>
<ul class="contains-task-list">
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Having a package called <code class="notranslate">react-native</code> is weird.</p>
<p dir="auto">Maybe we can just rename it to <code class="notranslate">react-native-renderer</code> to clarify the difference.</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Better strategy for shared code?</p>
<p dir="auto">Currently we just pile code into <code class="notranslate">shared</code> without particular structure, and then import directly through Haste. This is the same as we do in master though, so it’s at least no worse. We might want to tighten that up a little bit in the future, and maybe have some first-class entry points into it. We need to be clear <code class="notranslate">shared</code> code will be duplicated between any renderers using those modules.</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Server shouldn't depend on reconciler modules.</p>
<p dir="auto">I noticed <code class="notranslate">warnValidStyle</code> depends on <code class="notranslate">ReactDebugCurrentFiber</code>. This seems like it will always miss <code class="notranslate">owner</code> in warnings on server. Maybe it should depend on some other shared file instead? Regardless, this is <em>already</em> an issue on master so it’s not a regression.</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Find a more solid way to avoid Jest skipping our own modules (current hack is gross).</p>
<p dir="auto">The hack being <code class="notranslate">"transformIgnorePatterns": ["/node_modules/(?!react)"],</code> in <code class="notranslate">package.json</code>. Otherwise Jest skips our own code thinking it doesn’t need to be compiled because it was resolved through <code class="notranslate">node_modules</code>.</p>
<p dir="auto">The hack is not dangerous and can’t cause false positives with third-party code because I specifically check the resolved symlink path in the Jest transformer. Still, it means that if we add a package whose name doesn’t start with <code class="notranslate">react</code>, it will not be Babel-ed in tests until we add another exceptional case there.</p>
<p dir="auto">We can live with this hack for a little bit since we don’t plan to publish packages that don’t start with <code class="notranslate">react</code> in near future. We should file an issue with Jest though and come up with a better solution.</p>
<p dir="auto">Update: fixed via <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="268773495" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/11372" data-hovercard-type="pull_request" data-hovercard-url="/facebook/react/pull/11372/hovercard" href="https://github.com/facebook/react/pull/11372">#11372</a>.</p>
</li>
</ul>
<h2 dir="auto">Should Do Later</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Get rid of <code class="notranslate">useFiber</code> flag in bundle config</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Rename entry points to be more intuitive (e.g. <code class="notranslate">React</code> should be React entry point etc)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Make internal folder structure more sensible</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Move requires around to be prettier</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Fix relative requires in tests</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Get rid of <code class="notranslate">fbEntry</code> in bundle config</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Why are we bundling <code class="notranslate">lowPriorityWarning</code> into PROD bundle?</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> In general, remove anything in bundle config that can now be determined using package folder</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Fix the gross hack <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="271540543" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/11472" data-hovercard-type="pull_request" data-hovercard-url="/facebook/react/pull/11472/hovercard" href="https://github.com/facebook/react/pull/11472">#11472</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Forbid importing from other packages? <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="267265840" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/11303" data-hovercard-type="pull_request" data-hovercard-url="/facebook/react/pull/11303/hovercard?comment_id=146703577&comment_type=review_comment" href="https://github.com/facebook/react/pull/11303#discussion_r146703577">#11303 (comment)</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Move some Flow types</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> It is odd that package-level deps must be at top level too <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="267707155" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/11341" data-hovercard-type="pull_request" data-hovercard-url="/facebook/react/pull/11341/hovercard?comment_id=338707660&comment_type=issue_comment" href="https://github.com/facebook/react/pull/11341#issuecomment-338707660">#11341 (comment)</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Split bundle config per package and "autodiscover" packages for bundling and version check</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Autogenerate "simple" entry point files for npm (<code class="notranslate">react-dom/npm/index.js</code> being the exception)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Move some of <code class="notranslate">scripts</code> into packages too?</li>
</ul> | 0 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=gmazza" rel="nofollow">Glen Mazza</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2177?redirect=false" rel="nofollow">SPR-2177</a></strong> and commented</p>
<p dir="auto">The 2.0 Spring form:errors tag will expand an error message, if a validation error is found in the command bean property, as follows:</p>
<p dir="auto"><form:errors path="password"/> becomes:<br>
<span id="password.errors" name="password.errors">Password is missing</span></p>
<p dir="auto">An "id" and a "name" attribute is added to the span, both with the same value of "{commandbeanname}.errors".</p>
<p dir="auto">Two suggestions:</p>
<p dir="auto">1.) One problem with having an "id" attribute automatically added to the span is that id's are supposed to be unique in an HTML document[1]. Although a rare use case, one could duplicate the form:errors tag for the same command bean property, with the result that the output HTML will have a duplicated ID. Also, I'm unsure what additional benefits "id" buys the user that the already present "name" does not, so removing "id" might make sense.</p>
<p dir="auto">2.) It might be beneficial to add a class attribute with the same value to all spans (regardless of property), perhaps called "formErrors". This will allow one to conveniently use a CSS selector to specify that class value in order to apply common formatting (such as red fonts) to <strong>all</strong> error messages:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="*.formErrors {
color: red
}"><pre class="notranslate"><code class="notranslate">*.formErrors {
color: red
}
</code></pre></div>
<p dir="auto">Glen</p>
<p dir="auto">[1] <a href="http://www.w3.org/TR/REC-CSS2/selector.html#id-selectors" rel="nofollow">http://www.w3.org/TR/REC-CSS2/selector.html#id-selectors</a></p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0 RC1</p> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=cam" rel="nofollow">Cameron Clarke</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-1216?redirect=false" rel="nofollow">SPR-1216</a></strong>* and commented</p>
<p dir="auto">Specific scenario, running JUnit test cases extending {<code class="notranslate">@link</code> org.springframework.test.AbstractTransactionalSpringContextTests} where the application utilises org.hibernate.jmx.StatisticsService as defined in spring-data-access-context.xml (see below), test fail due to :</p>
<p dir="auto"><testcase classname="TestActionTypeDaoImpl" name="testGetAll" time="17.375"><br>
<error message="Error creating bean with name 'jmxExporter' defined in class path resource [spring-data-access-context.xml]: Initialization of bean failed; nested exception is javax.management.InstanceAlreadyExistsException: Hibernate:name=hbmStats" type="org.springframework.beans.factory.BeanCreationException">org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmxExporter' defined in class path resource [spring-data-access-context.xml]: Initialization of bean failed; nested exception is javax.management.InstanceAlreadyExistsException: Hibernate:name=hbmStats<br>
javax.management.InstanceAlreadyExistsException: Hibernate:name=hbmStats<br>
at com.sun.jmx.mbeanserver.RepositorySupport.addMBean(RepositorySupport.java:452)<br>
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1410)<br>
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:936)<br>
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:337)<br>
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:497)<br>
at org.springframework.jmx.export.MBeanExporter.registerMBean(MBeanExporter.java:413)<br>
at org.springframework.jmx.export.MBeanExporter.registerBeanInstance(MBeanExporter.java:389)<br>
at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:369)<br>
at org.springframework.jmx.export.MBeanExporter.registerBeans(MBeanExporter.java:296)<br>
at org.springframework.jmx.export.MBeanExporter.afterPropertiesSet(MBeanExporter.java:240)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1003)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:348)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)<br>
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)<br>
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:317)<br>
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:80)<br>
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65)<br>
at org.springframework.test.AbstractSpringContextTests.loadContextLocations(AbstractSpringContextTests.java:121)<br>
at org.springframework.test.AbstractDependencyInjectionSpringContextTests.loadContextLocations(AbstractDependencyInjectionSpringContextTests.java:159)<br>
at org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:101)<br>
at org.springframework.test.AbstractDependencyInjectionSpringContextTests.setUp(AbstractDependencyInjectionSpringContextTests.java:127)<br>
</error></p>
<p dir="auto">spring-data-access-context.xml defined as ....</p>
<p dir="auto">...<br>
<bean id="jmxExporter"<br>
class="org.springframework.jmx.export.MBeanExporter"<br>
depends-on="jmxServer"><br>
<property name="beans"><br>
<map><br>
<entry key="Hibernate:name=hbmStats"><br>
<ref bean="hibernateStatisticsJMXBean"/><br>
</entry><br>
</map><br>
</property><br>
</bean></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<bean id="hibernateStatisticsJMXBean" class="org.hibernate.jmx.StatisticsService">
<property name="statisticsEnabled">
<value>true</value>
</property>
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
</bean>
<bean id="jmxServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
<property name="defaultDomain">
<value>dummyDomain</value>
</property>
</bean>"><pre class="notranslate"><code class="notranslate"><bean id="hibernateStatisticsJMXBean" class="org.hibernate.jmx.StatisticsService">
<property name="statisticsEnabled">
<value>true</value>
</property>
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
</bean>
<bean id="jmxServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
<property name="defaultDomain">
<value>dummyDomain</value>
</property>
</bean>
</code></pre></div>
<p dir="auto">...</p>
<p dir="auto">My current work around class....</p>
<p dir="auto">/** The SpringFrameworks (v.1.2.3) {<code class="notranslate">@link</code> org.springframework.jmx.export.MBeanExporter} does not detect</p>
<ul dir="auto">
<li>MBeans already registered and may attempt to register duplicate MBeans. Either a unique / dynamic</li>
<li>object naming convention could be employed to avoid this or alternatively, simply ignore</li>
<li>{<code class="notranslate">@link</code> javax.management.InstanceAlreadyExistsException} exceptions which is the policy</li>
<li>employed by this class.</li>
<li>
</li><li>
<code class="notranslate">@author</code> Cameron Clarke</li>
<li>
<code class="notranslate">@version</code> <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="80849d621c70a0beebd8a845941f7719">$Id: $</math-renderer><br>
*/</li>
</ul>
<p dir="auto">import org.springframework.beans.factory.BeanFactoryAware;<br>
import org.springframework.beans.factory.DisposableBean;<br>
import org.springframework.beans.factory.InitializingBean;<br>
import org.springframework.jmx.export.MBeanExporter;</p>
<p dir="auto">import javax.management.JMException;<br>
import javax.management.InstanceAlreadyExistsException;</p>
<p dir="auto">public class SpringMBeanExporter extends MBeanExporter implements BeanFactoryAware, InitializingBean, DisposableBean<br>
{<br>
protected void registerBeans() throws JMException<br>
{<br>
try<br>
{<br>
super.registerBeans();<br>
} catch (InstanceAlreadyExistsException ex)<br>
{<br>
logger.error("Instance already exists, registering JMX bean failed.", ex);<br>
}<br>
}<br>
}</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 1.2.3</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="398059319" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/5921" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/5921/hovercard" href="https://github.com/spring-projects/spring-framework/issues/5921">#5921</a> JMX InstanceAlreadyExistsException when deploying same app twice (<em><strong>"is duplicated by"</strong></em>)</li>
</ul> | 0 |
<h1 dir="auto">Description of the new feature/enhancement</h1>
<h1 dir="auto">Proposed technical implementation details (optional)</h1> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 18363,418
Windows Terminal version (if applicable):
Any other software?"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 18363,418
Windows Terminal version (if applicable):
Any other software?
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Call <code class="notranslate">ResizePseudoConsole</code> with negative values stored in the passed <code class="notranslate">COORD</code> structure.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">returned HRESULT should indicate failure since a pty cannot have a negative size</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">returned HRESULT indicates success.</p> | 0 |
<p dir="auto">Ok, this is a (relatively) simple one: when there's no hits for text in the run bar, provide an option to web search. Of course, PowerToys should have configuration for search engines and include at least Google, DuckDuckGo, Bing and Yahoo. Or perhaps just provide an url input with replacement text, so I could, for instance, configure:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="https://https://duckduckgo.com/?q=%q%"><pre class="notranslate"><code class="notranslate">https://https://duckduckgo.com/?q=%q%
</code></pre></div>
<p dir="auto">and have <code class="notranslate">%q%</code> replaced by my search text</p> | <h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">I want to be able to start a web search from the launcher.<br>
Ideally, I'd type <code class="notranslate">bing power toys</code> and it would navigate to <code class="notranslate">https://www.bing.com/search?q=power+toys</code> in my default browser.<br>
<code class="notranslate">google power toys</code> would go to the equivalent.</p>
<p dir="auto">The ability to specify the keyword/search engine to use and the domain it goes to would also be necessary. Not only would this enable supporting other search engines, but it would also allow for people to adjust for different TLD versions of search engines.</p>
<p dir="auto"><em>This would be similar to functionality that used to be available in Enso launcher.</em></p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">This would presumably require some settings for determining which words are identified as initiating the search and the URL to submit the query to.<br>
This could also be the base for similar functionality where a keyword could launch an app and pass other values as command-line arguments. Without additional arguments, this could also serve as a way to create aliases for apps so they could be launched with a small number of keystrokes.</p>
<p dir="auto"><strong>crutkas:</strong> possible solution to this issue in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="851600669" data-permission-text="Title is private" data-url="https://github.com/microsoft/PowerToys/issues/10619" data-hovercard-type="issue" data-hovercard-url="/microsoft/PowerToys/issues/10619/hovercard" href="https://github.com/microsoft/PowerToys/issues/10619">#10619</a>. It defers to default browser + user's search engine. Lets PT Run be generic</p> | 1 |
<p dir="auto">When compiling the current version of wtftw (<a href="https://github.com/Kintaro/wtftw/tree/1e6e3315a8576db3629ff019f62ff34be20f181d">https://github.com/Kintaro/wtftw/tree/1e6e3315a8576db3629ff019f62ff34be20f181d</a>) I get the following internal compiler error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/home/rootnode/programs/src/rust/src/libstd/sync/rwlock.rs:104:40: 107:2 error: internal compiler error: debuginfo: Could not find scope info for node NodeExpr(Expr { id: 40089, node: ExprStruct(Path { span: Span { lo: BytePos(4687163), hi: BytePos(4687175), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: StaticRwLock#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }, [Field { ident: Spanned { node: lock#0, span: Span { lo: BytePos(1799419), hi: BytePos(1799423), expn_id: ExpnId(4294967295) } }, expr: Expr { id: 40090, node: ExprPath(None, Path { span: Span { lo: BytePos(4687188), hi: BytePos(4687204), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: sys#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }, PathSegment { identifier: RWLOCK_INIT#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }), span: Span { lo: BytePos(4687188), hi: BytePos(4687204), expn_id: ExpnId(4294967295) } }, span: Span { lo: BytePos(4687182), hi: BytePos(4687204), expn_id: ExpnId(4294967295) } }, Field { ident: Spanned { node: poison#0, span: Span { lo: BytePos(1799447), hi: BytePos(1799453), expn_id: ExpnId(4294967295) } }, expr: Expr { id: 40091, node: ExprPath(None, Path { span: Span { lo: BytePos(4687218), hi: BytePos(4687235), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: poison#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }, PathSegment { identifier: FLAG_INIT#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }), span: Span { lo: BytePos(4687218), hi: BytePos(4687235), expn_id: ExpnId(4294967295) } }, span: Span { lo: BytePos(4687210), hi: BytePos(4687235), expn_id: ExpnId(4294967295) } }], None), span: Span { lo: BytePos(4687163), hi: BytePos(4687238), expn_id: ExpnId(4294967295) } })
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/rootnode/programs/src/rust/src/libsyntax/diagnostic.rs:129"><pre class="notranslate"><code class="notranslate">/home/rootnode/programs/src/rust/src/libstd/sync/rwlock.rs:104:40: 107:2 error: internal compiler error: debuginfo: Could not find scope info for node NodeExpr(Expr { id: 40089, node: ExprStruct(Path { span: Span { lo: BytePos(4687163), hi: BytePos(4687175), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: StaticRwLock#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }, [Field { ident: Spanned { node: lock#0, span: Span { lo: BytePos(1799419), hi: BytePos(1799423), expn_id: ExpnId(4294967295) } }, expr: Expr { id: 40090, node: ExprPath(None, Path { span: Span { lo: BytePos(4687188), hi: BytePos(4687204), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: sys#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }, PathSegment { identifier: RWLOCK_INIT#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }), span: Span { lo: BytePos(4687188), hi: BytePos(4687204), expn_id: ExpnId(4294967295) } }, span: Span { lo: BytePos(4687182), hi: BytePos(4687204), expn_id: ExpnId(4294967295) } }, Field { ident: Spanned { node: poison#0, span: Span { lo: BytePos(1799447), hi: BytePos(1799453), expn_id: ExpnId(4294967295) } }, expr: Expr { id: 40091, node: ExprPath(None, Path { span: Span { lo: BytePos(4687218), hi: BytePos(4687235), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: poison#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }, PathSegment { identifier: FLAG_INIT#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }), span: Span { lo: BytePos(4687218), hi: BytePos(4687235), expn_id: ExpnId(4294967295) } }, span: Span { lo: BytePos(4687210), hi: BytePos(4687235), expn_id: ExpnId(4294967295) } }], None), span: Span { lo: BytePos(4687163), hi: BytePos(4687238), expn_id: ExpnId(4294967295) } })
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/rootnode/programs/src/rust/src/libsyntax/diagnostic.rs:129
</code></pre></div>
<p dir="auto">and here's the backtrace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="stack backtrace:
1: 0x7f0aa15420a2 - sys::backtrace::write::h93e0c407e5be85e9OBA
2: 0x7f0aa1567fb2 - panicking::on_panic::h5d3ee2ae46f4245bhHJ
3: 0x7f0aa14ae6f9 - rt::unwind::begin_unwind_inner::hdd1b1743003be980knJ
4: 0x7f0a9eae8d9d - rt::unwind::begin_unwind::h1216767661413277895
5: 0x7f0a9eae8d43 - diagnostic::SpanHandler::span_bug::h1ce6cb39303d61eb00D
6: 0x7f0a9f3a0d13 - session::Session::span_bug::h7805e8a4f4e8c9d0MUp
7: 0x7f0aa0d16b2d - trans::debuginfo::scope_metadata::h00e19dfb6c4b02ebDlE
8: 0x7f0aa0c47f90 - trans::debuginfo::set_source_location::he257d690abcc014ewPD
9: 0x7f0aa0c0a2d3 - trans::expr::trans_into::h69c28702bd894f7fVph
10: 0x7f0aa0c0a67d - trans::expr::trans_into::h69c28702bd894f7fVph
11: 0x7f0aa0c5baaf - trans::expr::trans_uniq_expr::h1e7bbe7dc18f4250Qmj
12: 0x7f0aa0c5c4ac - trans::expr::trans_unary::h8d164a089e59c2725ij
13: 0x7f0aa0c49ee1 - trans::expr::trans_unadjusted::h2faf595f2e8601eaV6h
14: 0x7f0aa0c0a870 - trans::expr::trans_into::h69c28702bd894f7fVph
15: 0x7f0aa0c7bf47 - trans::expr::trans_adt::h2173f5860571ca7ea9i
16: 0x7f0aa0c7e31d - trans::expr::trans_struct::closure.42023
17: 0x7f0aa0c656d6 - trans::expr::trans_struct::h2169294176dbf44c64i
18: 0x7f0aa0c4b787 - trans::expr::trans_rvalue_dps_unadjusted::hf14ed712f5450052qCi
19: 0x7f0aa0c0a84f - trans::expr::trans_into::h69c28702bd894f7fVph
20: 0x7f0aa0c0b3c7 - trans::controlflow::trans_block::hbc9259590e405231x7d
21: 0x7f0aa0cc7770 - trans::base::trans_closure::h095d981b15ea3f776mt
22: 0x7f0aa0bfaaab - trans::base::trans_fn::ha9cca8b03cf052edZxt
23: 0x7f0aa0bfbbfd - trans::monomorphize::monomorphic_fn::h5d300ef1047f1ceeQud
24: 0x7f0aa0c3223f - trans::callee::trans_fn_ref_with_substs::h75ab89a75157f2acqng
25: 0x7f0aa0c30da9 - trans::callee::trans_fn_ref::h7c5fa4ceb6f4bcba0bg
26: 0x7f0aa0c2edb2 - trans::callee::trans::h43f5e14039e3fae2h1f
27: 0x7f0aa0c41e22 - trans::callee::trans_call_inner::h9374352419014354991
28: 0x7f0aa0c4bbf7 - trans::expr::trans_rvalue_dps_unadjusted::hf14ed712f5450052qCi
29: 0x7f0aa0c49d3b - trans::expr::trans_unadjusted::h2faf595f2e8601eaV6h
30: 0x7f0aa0c0bb20 - trans::expr::trans::h48d78d7fbe71c04d3vh
31: 0x7f0aa0c3d35b - trans::callee::trans_args::hec90a9a2bce964abI3g
32: 0x7f0aa0c42d2c - trans::callee::trans_call_inner::h9374352419014354991
33: 0x7f0aa0c4bbf7 - trans::expr::trans_rvalue_dps_unadjusted::hf14ed712f5450052qCi
34: 0x7f0aa0c0a84f - trans::expr::trans_into::h69c28702bd894f7fVph
35: 0x7f0aa0cf754e - trans::_match::mk_binding_alloca::h10767932601642127626
36: 0x7f0aa0c09c0d - trans::base::init_local::he9cc792daa88d20dyBs
37: 0x7f0aa0c0b0a2 - trans::controlflow::trans_block::hbc9259590e405231x7d
38: 0x7f0aa0cc7770 - trans::base::trans_closure::h095d981b15ea3f776mt
39: 0x7f0aa0bfaaab - trans::base::trans_fn::ha9cca8b03cf052edZxt
40: 0x7f0aa0bf6996 - trans::base::trans_item::he8649670fcd69308RVt
41: 0x7f0aa0bf6b1c - trans::base::trans_item::he8649670fcd69308RVt
42: 0x7f0aa0ccdfdc - trans::base::trans_crate::h533185929d36025f2Ru
43: 0x7f0aa1b6c9d2 - driver::phase_4_translate_to_llvm::h1cd3df14fce3d4a6ENa
44: 0x7f0aa1b4839a - driver::compile_input::h6259eba5094d4b1bNba
45: 0x7f0aa1c0c5ed - run_compiler::hce3b84eedbd241b1V5b
46: 0x7f0aa1c0a35c - thunk::F.Invoke<A, R>::invoke::h8006868353939210570
47: 0x7f0aa1c08fb0 - rt::unwind::try::try_fn::h13111521890980263456
48: 0x7f0aa15dc938 - rust_try_inner
49: 0x7f0aa15dc925 - rust_try
50: 0x7f0aa1c0973b - thunk::F.Invoke<A, R>::invoke::h267800211576463002
51: 0x7f0aa15557b5 - sys::thread::thread_start::h5ed88ddeeb2bf9c3r8E
52: 0x7f0a9b66d373 - start_thread
53: 0x7f0aa113627c - __clone
54: 0x0 - <unknown>"><pre class="notranslate"><code class="notranslate">stack backtrace:
1: 0x7f0aa15420a2 - sys::backtrace::write::h93e0c407e5be85e9OBA
2: 0x7f0aa1567fb2 - panicking::on_panic::h5d3ee2ae46f4245bhHJ
3: 0x7f0aa14ae6f9 - rt::unwind::begin_unwind_inner::hdd1b1743003be980knJ
4: 0x7f0a9eae8d9d - rt::unwind::begin_unwind::h1216767661413277895
5: 0x7f0a9eae8d43 - diagnostic::SpanHandler::span_bug::h1ce6cb39303d61eb00D
6: 0x7f0a9f3a0d13 - session::Session::span_bug::h7805e8a4f4e8c9d0MUp
7: 0x7f0aa0d16b2d - trans::debuginfo::scope_metadata::h00e19dfb6c4b02ebDlE
8: 0x7f0aa0c47f90 - trans::debuginfo::set_source_location::he257d690abcc014ewPD
9: 0x7f0aa0c0a2d3 - trans::expr::trans_into::h69c28702bd894f7fVph
10: 0x7f0aa0c0a67d - trans::expr::trans_into::h69c28702bd894f7fVph
11: 0x7f0aa0c5baaf - trans::expr::trans_uniq_expr::h1e7bbe7dc18f4250Qmj
12: 0x7f0aa0c5c4ac - trans::expr::trans_unary::h8d164a089e59c2725ij
13: 0x7f0aa0c49ee1 - trans::expr::trans_unadjusted::h2faf595f2e8601eaV6h
14: 0x7f0aa0c0a870 - trans::expr::trans_into::h69c28702bd894f7fVph
15: 0x7f0aa0c7bf47 - trans::expr::trans_adt::h2173f5860571ca7ea9i
16: 0x7f0aa0c7e31d - trans::expr::trans_struct::closure.42023
17: 0x7f0aa0c656d6 - trans::expr::trans_struct::h2169294176dbf44c64i
18: 0x7f0aa0c4b787 - trans::expr::trans_rvalue_dps_unadjusted::hf14ed712f5450052qCi
19: 0x7f0aa0c0a84f - trans::expr::trans_into::h69c28702bd894f7fVph
20: 0x7f0aa0c0b3c7 - trans::controlflow::trans_block::hbc9259590e405231x7d
21: 0x7f0aa0cc7770 - trans::base::trans_closure::h095d981b15ea3f776mt
22: 0x7f0aa0bfaaab - trans::base::trans_fn::ha9cca8b03cf052edZxt
23: 0x7f0aa0bfbbfd - trans::monomorphize::monomorphic_fn::h5d300ef1047f1ceeQud
24: 0x7f0aa0c3223f - trans::callee::trans_fn_ref_with_substs::h75ab89a75157f2acqng
25: 0x7f0aa0c30da9 - trans::callee::trans_fn_ref::h7c5fa4ceb6f4bcba0bg
26: 0x7f0aa0c2edb2 - trans::callee::trans::h43f5e14039e3fae2h1f
27: 0x7f0aa0c41e22 - trans::callee::trans_call_inner::h9374352419014354991
28: 0x7f0aa0c4bbf7 - trans::expr::trans_rvalue_dps_unadjusted::hf14ed712f5450052qCi
29: 0x7f0aa0c49d3b - trans::expr::trans_unadjusted::h2faf595f2e8601eaV6h
30: 0x7f0aa0c0bb20 - trans::expr::trans::h48d78d7fbe71c04d3vh
31: 0x7f0aa0c3d35b - trans::callee::trans_args::hec90a9a2bce964abI3g
32: 0x7f0aa0c42d2c - trans::callee::trans_call_inner::h9374352419014354991
33: 0x7f0aa0c4bbf7 - trans::expr::trans_rvalue_dps_unadjusted::hf14ed712f5450052qCi
34: 0x7f0aa0c0a84f - trans::expr::trans_into::h69c28702bd894f7fVph
35: 0x7f0aa0cf754e - trans::_match::mk_binding_alloca::h10767932601642127626
36: 0x7f0aa0c09c0d - trans::base::init_local::he9cc792daa88d20dyBs
37: 0x7f0aa0c0b0a2 - trans::controlflow::trans_block::hbc9259590e405231x7d
38: 0x7f0aa0cc7770 - trans::base::trans_closure::h095d981b15ea3f776mt
39: 0x7f0aa0bfaaab - trans::base::trans_fn::ha9cca8b03cf052edZxt
40: 0x7f0aa0bf6996 - trans::base::trans_item::he8649670fcd69308RVt
41: 0x7f0aa0bf6b1c - trans::base::trans_item::he8649670fcd69308RVt
42: 0x7f0aa0ccdfdc - trans::base::trans_crate::h533185929d36025f2Ru
43: 0x7f0aa1b6c9d2 - driver::phase_4_translate_to_llvm::h1cd3df14fce3d4a6ENa
44: 0x7f0aa1b4839a - driver::compile_input::h6259eba5094d4b1bNba
45: 0x7f0aa1c0c5ed - run_compiler::hce3b84eedbd241b1V5b
46: 0x7f0aa1c0a35c - thunk::F.Invoke<A, R>::invoke::h8006868353939210570
47: 0x7f0aa1c08fb0 - rt::unwind::try::try_fn::h13111521890980263456
48: 0x7f0aa15dc938 - rust_try_inner
49: 0x7f0aa15dc925 - rust_try
50: 0x7f0aa1c0973b - thunk::F.Invoke<A, R>::invoke::h267800211576463002
51: 0x7f0aa15557b5 - sys::thread::thread_start::h5ed88ddeeb2bf9c3r8E
52: 0x7f0a9b66d373 - start_thread
53: 0x7f0aa113627c - __clone
54: 0x0 - <unknown>
</code></pre></div>
<p dir="auto">Compiled with rustc 1.0.0-dev (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/68740b405404a3f885e388c8d31722797d519c30/hovercard" href="https://github.com/rust-lang/rust/commit/68740b405404a3f885e388c8d31722797d519c30"><tt>68740b4</tt></a> 2015-03-05) (built 2015-03-05)</p> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ RUST_BACKTRACE=1 cargo build --verbose
Fresh gcc v0.2.1
Fresh pkg-config v0.2.1
Compiling openssl-sys v0.4.0 (file:///tmp/rust-openssl/openssl-sys)
Running `rustc src/lib.rs --crate-name openssl-sys --crate-type lib -g -C metadata=dd0e973e71d408a3 -C extra-filename=-dd0e973e71d408a3 --out-dir /tmp/rust-openssl/openssl-sys/target --emit=dep-info,link -L dependency=/tmp/rust-openssl/openssl-sys/target -L dependency=/tmp/rust-openssl/openssl-sys/target/deps -L native=/usr/lib64 -L native=/tmp/rust-openssl/openssl-sys/target/build/openssl-sys-dd0e973e71d408a3/out -l ssl -l crypto -l static=old_openssl_shim`
src/lib.rs:1:1: 1:1 error: internal compiler error: debuginfo: Could not find scope info for node NodeExpr(Expr { id: 5326, node: ExprStruct(Path { span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: StaticMutex#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }, [Field { ident: Spanned { node: lock#0, span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) } }, expr: Expr { id: 5327, node: ExprPath(Path { span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: sys#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }, PathSegment { identifier: MUTEX_INIT#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }), span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) } }, span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) } }, Field { ident: Spanned { node: poison#0, span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) } }, expr: Expr { id: 5328, node: ExprPath(Path { span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: poison#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }, PathSegment { identifier: FLAG_INIT#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }), span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) } }, span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) } }], None), span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) } })
src/lib.rs:1 #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
^
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /mnt/trash1/tmp/portage/dev-lang/rust-9999/work/rust-9999/src/libsyntax/diagnostic.rs:129
stack backtrace:
1: 0x7fa97995e8e0 - sys::backtrace::write::he6b1641fd079577cfmB
2: 0x7fa979984760 - <unknown>
3: 0x7fa9798d60f0 - rt::unwind::begin_unwind_inner::h634afd378febd66detK
4: 0x7fa976e432b0 - <unknown>
5: 0x7fa976e43240 - diagnostic::SpanHandler::span_bug::h189abf680a7a28f874E
6: 0x7fa97793d500 - session::Session::span_bug::h720ba33852c899b7rSs
7: 0x7fa9787a8a10 - <unknown>
8: 0x7fa9786d9700 - <unknown>
9: 0x7fa978698f50 - <unknown>
10: 0x7fa978698f50 - <unknown>
11: 0x7fa9786999b0 - <unknown>
12: 0x7fa978756fc0 - <unknown>
13: 0x7fa97870d900 - <unknown>
14: 0x7fa97873aef0 - <unknown>
15: 0x7fa9786d9d30 - <unknown>
16: 0x7fa97869a200 - <unknown>
17: 0x7fa9786cea00 - <unknown>
18: 0x7fa9786d50f0 - <unknown>
19: 0x7fa9786dbb30 - <unknown>
20: 0x7fa9786db080 - <unknown>
21: 0x7fa97869a200 - <unknown>
22: 0x7fa9786cea00 - <unknown>
23: 0x7fa9786d50f0 - <unknown>
24: 0x7fa9786dbb30 - <unknown>
25: 0x7fa9786db080 - <unknown>
26: 0x7fa97869a200 - <unknown>
27: 0x7fa9786cea00 - <unknown>
28: 0x7fa9786d3a90 - <unknown>
29: 0x7fa9786dbb30 - <unknown>
30: 0x7fa978698f50 - <unknown>
31: 0x7fa978787d40 - <unknown>
32: 0x7fa978698830 - <unknown>
33: 0x7fa9786999b0 - <unknown>
34: 0x7fa9786dbb30 - <unknown>
35: 0x7fa978698f50 - <unknown>
36: 0x7fa9786999b0 - <unknown>
37: 0x7fa978756fc0 - <unknown>
38: 0x7fa97870d900 - <unknown>
39: 0x7fa9786dbb30 - <unknown>
40: 0x7fa9786db080 - <unknown>
41: 0x7fa97869a200 - <unknown>
42: 0x7fa9786cea00 - <unknown>
43: 0x7fa9786d50f0 - <unknown>
44: 0x7fa9786dbb30 - <unknown>
45: 0x7fa978698f50 - <unknown>
46: 0x7fa9786999b0 - <unknown>
47: 0x7fa9786dbb30 - <unknown>
48: 0x7fa978698f50 - <unknown>
49: 0x7fa9786999b0 - <unknown>
50: 0x7fa978756fc0 - <unknown>
51: 0x7fa9786887a0 - <unknown>
52: 0x7fa978684210 - <unknown>
53: 0x7fa97875dd80 - trans::base::trans_crate::ha8556e563b91ec61fQv
54: 0x7fa979f5f250 - driver::phase_4_translate_to_llvm::hc334bfd7f2b08e6d2Oa
55: 0x7fa979f384b0 - driver::compile_input::h6a09d1f5442479b9Eba
56: 0x7fa97a007770 - run_compiler::h940da8caa9037102Bbc
57: 0x7fa97a005d00 - <unknown>
58: 0x7fa97a004be0 - <unknown>
59: 0x7fa9799e1770 - <unknown>
60: 0x7fa9799e1760 - rust_try
61: 0x7fa97a004e90 - <unknown>
62: 0x7fa979971e00 - <unknown>
63: 0x7fa974614f70 - <unknown>
64: 0x7fa97955d389 - clone
65: 0x0 - <unknown>
Could not compile `openssl-sys`.
Caused by:
Process didn't exit successfully: `rustc src/lib.rs --crate-name openssl-sys --crate-type lib -g -C metadata=dd0e973e71d408a3 -C extra-filename=-dd0e973e71d408a3 --out-dir /tmp/rust-openssl/openssl-sys/target --emit=dep-info,link -L dependency=/tmp/rust-openssl/openssl-sys/target -L dependency=/tmp/rust-openssl/openssl-sys/target/deps -L native=/usr/lib64 -L native=/tmp/rust-openssl/openssl-sys/target/build/openssl-sys-dd0e973e71d408a3/out -l ssl -l crypto -l static=old_openssl_shim` (status=101)"><pre class="notranslate"><code class="notranslate">$ RUST_BACKTRACE=1 cargo build --verbose
Fresh gcc v0.2.1
Fresh pkg-config v0.2.1
Compiling openssl-sys v0.4.0 (file:///tmp/rust-openssl/openssl-sys)
Running `rustc src/lib.rs --crate-name openssl-sys --crate-type lib -g -C metadata=dd0e973e71d408a3 -C extra-filename=-dd0e973e71d408a3 --out-dir /tmp/rust-openssl/openssl-sys/target --emit=dep-info,link -L dependency=/tmp/rust-openssl/openssl-sys/target -L dependency=/tmp/rust-openssl/openssl-sys/target/deps -L native=/usr/lib64 -L native=/tmp/rust-openssl/openssl-sys/target/build/openssl-sys-dd0e973e71d408a3/out -l ssl -l crypto -l static=old_openssl_shim`
src/lib.rs:1:1: 1:1 error: internal compiler error: debuginfo: Could not find scope info for node NodeExpr(Expr { id: 5326, node: ExprStruct(Path { span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: StaticMutex#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }, [Field { ident: Spanned { node: lock#0, span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) } }, expr: Expr { id: 5327, node: ExprPath(Path { span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: sys#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }, PathSegment { identifier: MUTEX_INIT#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }), span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) } }, span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) } }, Field { ident: Spanned { node: poison#0, span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) } }, expr: Expr { id: 5328, node: ExprPath(Path { span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: poison#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }, PathSegment { identifier: FLAG_INIT#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }), span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) } }, span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) } }], None), span: Span { lo: BytePos(0), hi: BytePos(0), expn_id: ExpnId(4294967295) } })
src/lib.rs:1 #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
^
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /mnt/trash1/tmp/portage/dev-lang/rust-9999/work/rust-9999/src/libsyntax/diagnostic.rs:129
stack backtrace:
1: 0x7fa97995e8e0 - sys::backtrace::write::he6b1641fd079577cfmB
2: 0x7fa979984760 - <unknown>
3: 0x7fa9798d60f0 - rt::unwind::begin_unwind_inner::h634afd378febd66detK
4: 0x7fa976e432b0 - <unknown>
5: 0x7fa976e43240 - diagnostic::SpanHandler::span_bug::h189abf680a7a28f874E
6: 0x7fa97793d500 - session::Session::span_bug::h720ba33852c899b7rSs
7: 0x7fa9787a8a10 - <unknown>
8: 0x7fa9786d9700 - <unknown>
9: 0x7fa978698f50 - <unknown>
10: 0x7fa978698f50 - <unknown>
11: 0x7fa9786999b0 - <unknown>
12: 0x7fa978756fc0 - <unknown>
13: 0x7fa97870d900 - <unknown>
14: 0x7fa97873aef0 - <unknown>
15: 0x7fa9786d9d30 - <unknown>
16: 0x7fa97869a200 - <unknown>
17: 0x7fa9786cea00 - <unknown>
18: 0x7fa9786d50f0 - <unknown>
19: 0x7fa9786dbb30 - <unknown>
20: 0x7fa9786db080 - <unknown>
21: 0x7fa97869a200 - <unknown>
22: 0x7fa9786cea00 - <unknown>
23: 0x7fa9786d50f0 - <unknown>
24: 0x7fa9786dbb30 - <unknown>
25: 0x7fa9786db080 - <unknown>
26: 0x7fa97869a200 - <unknown>
27: 0x7fa9786cea00 - <unknown>
28: 0x7fa9786d3a90 - <unknown>
29: 0x7fa9786dbb30 - <unknown>
30: 0x7fa978698f50 - <unknown>
31: 0x7fa978787d40 - <unknown>
32: 0x7fa978698830 - <unknown>
33: 0x7fa9786999b0 - <unknown>
34: 0x7fa9786dbb30 - <unknown>
35: 0x7fa978698f50 - <unknown>
36: 0x7fa9786999b0 - <unknown>
37: 0x7fa978756fc0 - <unknown>
38: 0x7fa97870d900 - <unknown>
39: 0x7fa9786dbb30 - <unknown>
40: 0x7fa9786db080 - <unknown>
41: 0x7fa97869a200 - <unknown>
42: 0x7fa9786cea00 - <unknown>
43: 0x7fa9786d50f0 - <unknown>
44: 0x7fa9786dbb30 - <unknown>
45: 0x7fa978698f50 - <unknown>
46: 0x7fa9786999b0 - <unknown>
47: 0x7fa9786dbb30 - <unknown>
48: 0x7fa978698f50 - <unknown>
49: 0x7fa9786999b0 - <unknown>
50: 0x7fa978756fc0 - <unknown>
51: 0x7fa9786887a0 - <unknown>
52: 0x7fa978684210 - <unknown>
53: 0x7fa97875dd80 - trans::base::trans_crate::ha8556e563b91ec61fQv
54: 0x7fa979f5f250 - driver::phase_4_translate_to_llvm::hc334bfd7f2b08e6d2Oa
55: 0x7fa979f384b0 - driver::compile_input::h6a09d1f5442479b9Eba
56: 0x7fa97a007770 - run_compiler::h940da8caa9037102Bbc
57: 0x7fa97a005d00 - <unknown>
58: 0x7fa97a004be0 - <unknown>
59: 0x7fa9799e1770 - <unknown>
60: 0x7fa9799e1760 - rust_try
61: 0x7fa97a004e90 - <unknown>
62: 0x7fa979971e00 - <unknown>
63: 0x7fa974614f70 - <unknown>
64: 0x7fa97955d389 - clone
65: 0x0 - <unknown>
Could not compile `openssl-sys`.
Caused by:
Process didn't exit successfully: `rustc src/lib.rs --crate-name openssl-sys --crate-type lib -g -C metadata=dd0e973e71d408a3 -C extra-filename=-dd0e973e71d408a3 --out-dir /tmp/rust-openssl/openssl-sys/target --emit=dep-info,link -L dependency=/tmp/rust-openssl/openssl-sys/target -L dependency=/tmp/rust-openssl/openssl-sys/target/deps -L native=/usr/lib64 -L native=/tmp/rust-openssl/openssl-sys/target/build/openssl-sys-dd0e973e71d408a3/out -l ssl -l crypto -l static=old_openssl_shim` (status=101)
</code></pre></div>
<p dir="auto">Rust version:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc 1.0.0-dev (81bce5290 2015-02-16) (built 2015-02-17)
binary: rustc
commit-hash: 81bce5290ff55b9a2eddd83d31b0778180904d7f
commit-date: 2015-02-16
build-date: 2015-02-17
host: x86_64-unknown-linux-gnu
release: 1.0.0-dev"><pre class="notranslate"><code class="notranslate">rustc 1.0.0-dev (81bce5290 2015-02-16) (built 2015-02-17)
binary: rustc
commit-hash: 81bce5290ff55b9a2eddd83d31b0778180904d7f
commit-date: 2015-02-16
build-date: 2015-02-17
host: x86_64-unknown-linux-gnu
release: 1.0.0-dev
</code></pre></div>
<p dir="auto">OS: Gentoo Linux AMD64</p> | 1 |
<h1 dir="auto">Summary of the new feature/enhancement</h1>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
I would like to see the Thinkorswim windows recognized by FancyZones. Thanks for the help! | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 10.0.17763.1039]
PowerToys version: 0.14 - 0.15
PowerToy module for which you are reporting the bug (if applicable): FancyZones"><pre class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.17763.1039]
PowerToys version: 0.14 - 0.15
PowerToy module for which you are reporting the bug (if applicable): FancyZones
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Create FancyZone layout, use mouse to drag-and-drop "Solution Explorer" or any other window from Visual Studio (except main window) into a zone.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The window resizes to the zone accordingly, works in v0.13 of PowerToys.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">The window does not resize to the zone.</p>
<p dir="auto">In version 0.14 it is still possible to arrange the window by activating the "Override Windows snap hotkeys..."-option and using hotkeys to arrange it into place. Drag-and-drop does not work.</p>
<p dir="auto">In version 0.15+ there is no option to arrange these windows into a zone.</p> | 1 |
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-record-collection#?solution=%2F%2F%20Setup%0Avar%20collection%20%3D%20%7B%0A%20%20%20%202548%3A%20%7B%0A%20%20%20%20%20%20album%3A%20%22Slippery%20When%20Wet%22%2C%0A%20%20%20%20%20%20artist%3A%20%22Bon%20Jovi%22%2C%0A%20%20%20%20%20%20tracks%3A%20%5B%20%0A%20%20%20%20%20%20%20%20%22Let%20It%20Rock%22%2C%20%0A%20%20%20%20%20%20%20%20%22You%20Give%20Love%20a%20Bad%20Name%22%20%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%202468%3A%20%7B%0A%20%20%20%20%20%20album%3A%20%221999%22%2C%0A%20%20%20%20%20%20artist%3A%20%22Prince%22%2C%0A%20%20%20%20%20%20tracks%3A%20%5B%20%0A%20%20%20%20%20%20%20%20%221999%22%2C%20%0A%20%20%20%20%20%20%20%20%22Little%20Red%20Corvette%22%20%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%201245%3A%20%7B%0A%20%20%20%20%20%20artist%3A%20%22Robert%20Palmer%22%2C%0A%20%20%20%20%20%20tracks%3A%20%5B%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%205439%3A%20%7B%0A%20%20%20%20%20%20album%3A%20%22ABBA%20Gold%22%0A%20%20%20%20%7D%0A%7D%3B%0A%2F%2F%20Keep%20a%20copy%20of%20the%20collection%20for%20tests%0Avar%20collectionCopy%20%3D%20JSON.parse%28JSON.stringify%28collection%29%29%3B%0A%0A%2F%2F%20Only%20change%20code%20below%20this%20line%0Afunction%20update%28id%2C%20prop%2C%20value%29%20%7B%0A%0A%20%20if%20%28value%20!%3D%3D%20%22%22%29%20%7B%0A%20%20%20%20if%20%28prop%20%3D%3D%3D%20%22tracks%22%29%20%7B%0A%20%20%20%20%20%20collection%5Bid%5D.tracks.push%28value%29%3B%0A%20%20%20%20%20%20return%3B%0A%20%20%20%20%7D%0A%20%20%20%20collection%5Bid%5D%5Bprop%5D%20%3D%20value%3B%0A%20%20%7D%20else%20%7B%0A%20%20%20%20delete%20collection%5Bid%5D%5Bprop%5D%3B%0A%20%20%7D%0A%7D%0A%0A%2F%2F%20Alter%20values%20below%20to%20test%20your%20code%0Aupdate%285439%2C%20%22artist%22%2C%20%22ABBA%22%29%3B%0Aupdate%281245%2C%20%22tracks%22%2C%20%22Addicted%20to%20Love%22%29%3B%0Aconsole.log%28collection%5B5439%5D.artist%29%3B%0A%0A" rel="nofollow">Waypoint: Record Collection</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/47.0.2526.106 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="// Setup
var collection = {
2548: {
album: "Slippery When Wet",
artist: "Bon Jovi",
tracks: [
"Let It Rock",
"You Give Love a Bad Name"
]
},
2468: {
album: "1999",
artist: "Prince",
tracks: [
"1999",
"Little Red Corvette"
]
},
1245: {
artist: "Robert Palmer",
tracks: [ ]
},
5439: {
album: "ABBA Gold"
}
};
// Keep a copy of the collection for tests
var collectionCopy = JSON.parse(JSON.stringify(collection));
// Only change code below this line
function update(id, prop, value) {
if (value !== "") {
if (prop === "tracks") {
collection[id].tracks.push(value);
return;
}
collection[id][prop] = value;
} else {
delete collection[id][prop];
}
}
// Alter values below to test your code
update(5439, "artist", "ABBA");
update(1245, "tracks", "Addicted to Love");
console.log(collection[5439].artist);
"><pre class="notranslate"><span class="pl-c">// Setup</span>
<span class="pl-k">var</span> <span class="pl-s1">collection</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-c1">2548</span>: <span class="pl-kos">{</span>
<span class="pl-c1">album</span>: <span class="pl-s">"Slippery When Wet"</span><span class="pl-kos">,</span>
<span class="pl-c1">artist</span>: <span class="pl-s">"Bon Jovi"</span><span class="pl-kos">,</span>
<span class="pl-c1">tracks</span>: <span class="pl-kos">[</span>
<span class="pl-s">"Let It Rock"</span><span class="pl-kos">,</span>
<span class="pl-s">"You Give Love a Bad Name"</span>
<span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">2468</span>: <span class="pl-kos">{</span>
<span class="pl-c1">album</span>: <span class="pl-s">"1999"</span><span class="pl-kos">,</span>
<span class="pl-c1">artist</span>: <span class="pl-s">"Prince"</span><span class="pl-kos">,</span>
<span class="pl-c1">tracks</span>: <span class="pl-kos">[</span>
<span class="pl-s">"1999"</span><span class="pl-kos">,</span>
<span class="pl-s">"Little Red Corvette"</span>
<span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">1245</span>: <span class="pl-kos">{</span>
<span class="pl-c1">artist</span>: <span class="pl-s">"Robert Palmer"</span><span class="pl-kos">,</span>
<span class="pl-c1">tracks</span>: <span class="pl-kos">[</span> <span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">5439</span>: <span class="pl-kos">{</span>
<span class="pl-c1">album</span>: <span class="pl-s">"ABBA Gold"</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-c">// Keep a copy of the collection for tests</span>
<span class="pl-k">var</span> <span class="pl-s1">collectionCopy</span> <span class="pl-c1">=</span> <span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">parse</span><span class="pl-kos">(</span><span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-s1">collection</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// Only change code below this line</span>
<span class="pl-k">function</span> <span class="pl-en">update</span><span class="pl-kos">(</span><span class="pl-s1">id</span><span class="pl-kos">,</span> <span class="pl-s1">prop</span><span class="pl-kos">,</span> <span class="pl-s1">value</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">value</span> <span class="pl-c1">!==</span> <span class="pl-s">""</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">prop</span> <span class="pl-c1">===</span> <span class="pl-s">"tracks"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">collection</span><span class="pl-kos">[</span><span class="pl-s1">id</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">tracks</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">return</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-s1">collection</span><span class="pl-kos">[</span><span class="pl-s1">id</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s1">prop</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span>
<span class="pl-k">delete</span> <span class="pl-s1">collection</span><span class="pl-kos">[</span><span class="pl-s1">id</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s1">prop</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">// Alter values below to test your code</span>
<span class="pl-en">update</span><span class="pl-kos">(</span><span class="pl-c1">5439</span><span class="pl-kos">,</span> <span class="pl-s">"artist"</span><span class="pl-kos">,</span> <span class="pl-s">"ABBA"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">update</span><span class="pl-kos">(</span><span class="pl-c1">1245</span><span class="pl-kos">,</span> <span class="pl-s">"tracks"</span><span class="pl-kos">,</span> <span class="pl-s">"Addicted to Love"</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-s1">collection</span><span class="pl-kos">[</span><span class="pl-c1">5439</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">artist</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
</pre></div> | <p dir="auto">Using this function:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/9350920/12065128/39550cba-afd2-11e5-84db-ff9ad175a8d3.png"><img src="https://cloud.githubusercontent.com/assets/9350920/12065128/39550cba-afd2-11e5-84db-ff9ad175a8d3.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I am getting corrrect behaviour, but tests return as if it was wrong.<br>
ie. When i test with:<br>
update(1245, "tracks", "Addicted to Love");<br>
both Chrome and built-in console shows correct output</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/9350920/12065196/0a6d4e2a-afd3-11e5-9060-dbe303c56d3c.png"><img src="https://cloud.githubusercontent.com/assets/9350920/12065196/0a6d4e2a-afd3-11e5-9060-dbe303c56d3c.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">but tests</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/9350920/12065159/9f70b0ee-afd2-11e5-9134-b147f362e606.png"><img src="https://cloud.githubusercontent.com/assets/9350920/12065159/9f70b0ee-afd2-11e5-9134-b147f362e606.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Same with other input:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/9350920/12065176/ccfa24e6-afd2-11e5-8e08-e7b000e50777.png"><img src="https://cloud.githubusercontent.com/assets/9350920/12065176/ccfa24e6-afd2-11e5-8e08-e7b000e50777.png" alt="image" style="max-width: 100%;"></a></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="[ ] bug report => search github for a similar issue or PR before submitting
[x] 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">[ ] bug report => search github for a similar issue or PR before submitting
[x] 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">now schemas are not extendable, only hard-coded <code class="notranslate">CUSTOM_ELEMENT_SCHEMA</code> and <code class="notranslate">NO_ERRORS_SCHEMA</code> available. if a user want to add new schema, they have to modify <code class="notranslate">DomElementSchemaRegistry.hasElement</code>,<code class="notranslate">DomElementSchemaRegistry.prototype.hasProperty</code> or other compiler methods to do it. like this<br>
<a href="https://github.com/moecube/electron-schema/blob/master/index.ts">https://github.com/moecube/electron-schema/blob/master/index.ts</a></p>
<p dir="auto"><strong>Expected behavior</strong></p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/angular/angular/blob/5b141fbf2789e6629083afd1d4678a2ba1ae6ab3/packages/compiler/src/schema/dom_element_schema_registry.ts#L287">angular/packages/compiler/src/schema/dom_element_schema_registry.ts</a>
</p>
<p class="mb-0 color-fg-muted">
Line 287
in
<a data-pjax="true" class="commit-tease-sha" href="/angular/angular/commit/5b141fbf2789e6629083afd1d4678a2ba1ae6ab3">5b141fb</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="L287" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="287"></td>
<td id="LC287" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">schemaMetas</span><span class="pl-kos">.</span><span class="pl-en">some</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">schema</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-s1">schema</span><span class="pl-kos">.</span><span class="pl-c1">name</span> <span class="pl-c1">===</span> <span class="pl-smi">NO_ERRORS_SCHEMA</span><span class="pl-kos">.</span><span class="pl-c1">name</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<p dir="auto">make <code class="notranslate">DomElementSchemaRegistry.hasElement</code>,<code class="notranslate">DomElementSchemaRegistry.prototype.hasProperty</code> and other compiler methods to read schemaMetas not only name, but also some contents, for example, a <code class="notranslate">string[]</code> like SCHEMA defined in </p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/angular/angular/blob/5b141fbf2789e6629083afd1d4678a2ba1ae6ab3/packages/compiler/src/schema/dom_element_schema_registry.ts#L79">angular/packages/compiler/src/schema/dom_element_schema_registry.ts</a>
</p>
<p class="mb-0 color-fg-muted">
Line 79
in
<a data-pjax="true" class="commit-tease-sha" href="/angular/angular/commit/5b141fbf2789e6629083afd1d4678a2ba1ae6ab3">5b141fb</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="L79" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="79"></td>
<td id="LC79" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">const</span> <span class="pl-smi">SCHEMA</span>: </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<p dir="auto">then user can just declare something like</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const ELECTRON_SCHEMA = ['webview^[HTMLElement]|src,...']"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-smi">ELECTRON_SCHEMA</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-s">'webview^[HTMLElement]|src,...'</span><span class="pl-kos">]</span></pre></div>
<p dir="auto">then put it in ngModule.schemas .</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@NgModule({
// ...
schemas: [ELECTRON_SCHEMA]
})
export class AppModule {
}"><pre class="notranslate">@<span class="pl-smi">NgModule</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c">// ...</span>
<span class="pl-c1">schemas</span>: <span class="pl-kos">[</span><span class="pl-smi">ELECTRON_SCHEMA</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">class</span> <span class="pl-smi">AppModule</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">for more clearly, it could be a interface rather than a string, like..</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface SchemaData {
tagName: string
type: string
attributes: string[]
... // other security-related fields
}"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">SchemaData</span> <span class="pl-kos">{</span>
<span class="pl-c1">tagName</span>: <span class="pl-smi">string</span>
<span class="pl-c1">type</span>: <span class="pl-smi">string</span>
<span class="pl-c1">attributes</span>: <span class="pl-smi">string</span><span class="pl-kos">[</span><span class="pl-kos">]</span>
... <span class="pl-c">// other security-related fields</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">for more dynamic use, it could also be a function-based interface, it can combined with normal SchemaMetadata interface, for example:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface SchemaMeta {
name: string
hasElement?(tagName, schemaMetas): boolean
hasProperty?(tagName, propName, schemaMetas): boolean
... // other security-related methods
}"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">SchemaMeta</span> <span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-smi">string</span>
<span class="pl-c1">hasElement</span>?<span class="pl-kos">(</span><span class="pl-s1">tagName</span><span class="pl-kos">,</span> <span class="pl-s1">schemaMetas</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span>
<span class="pl-c1">hasProperty</span>?<span class="pl-kos">(</span><span class="pl-s1">tagName</span><span class="pl-kos">,</span> <span class="pl-s1">propName</span><span class="pl-kos">,</span> <span class="pl-s1">schemaMetas</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span>
... <span class="pl-c">// other security-related methods</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">then <code class="notranslate">CUSTOM_ELEMENTS_SCHEMA</code> and <code class="notranslate">NO_ERROES_SCHEMA</code> could also be a normal SchemaMeta, and don't need hard-code in compiler, like</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class NO_ERROES_SCHEMA implements SchemaMetadata {
name: 'no-errors-schema'
hasElement(tagName, schemaMetas) {return true}
hasProperty(tagName, propName, schemaMetas) {return true}
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">NO_ERROES_SCHEMA</span> <span class="pl-k">implements</span> <span class="pl-smi">SchemaMetadata</span> <span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-s">'no-errors-schema'</span>
<span class="pl-en">hasElement</span><span class="pl-kos">(</span><span class="pl-s1">tagName</span><span class="pl-kos">,</span> <span class="pl-s1">schemaMetas</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-k">return</span> <span class="pl-c1">true</span><span class="pl-kos">}</span>
<span class="pl-en">hasProperty</span><span class="pl-kos">(</span><span class="pl-s1">tagName</span><span class="pl-kos">,</span> <span class="pl-s1">propName</span><span class="pl-kos">,</span> <span class="pl-s1">schemaMetas</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-k">return</span> <span class="pl-c1">true</span><span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div> | <p dir="auto">I have two projects (SPA) using two different ports (front: 4200, Back : 8000):</p>
<ul dir="auto">
<li><strong>Project 1:</strong></li>
<li><em>Front :</em> Angular 1</li>
<li><em>Back :</em> Django / Django-rest-framework.</li>
<li><strong>Project 2:</strong></li>
<li><em>Front :</em> Angular 2+</li>
<li><em>Back :</em> Django / Django-rest-framework.</li>
</ul>
<p dir="auto">The problem I am facing <strong>(only)</strong> with project 2 <em>(3 days trying to solve it)</em> is that Angular 2+ can't receive cookies sent by the back.</p>
<p dir="auto"><em><strong>Additional information :</strong></em></p>
<ul dir="auto">
<li>Project 1 => cookies received <strong>OK</strong></li>
<li>Project 2 => no cookies <strong>Problem</strong></li>
<li>Back of project 1 with front of project 2 => no cookies <strong>Problem</strong></li>
<li>Back of project 2 with front of project 1 => cookies received <strong>OK</strong></li>
<li>withCredentials is configured in both projects.</li>
<li>cors configured for both projects.</li>
<li>Response for both projects contains set-cookie header attribute.</li>
</ul> | 0 |
<p dir="auto">OS: win8 + 64<br>
Electron: 0.35.4</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="app.commandLine.appendSwitch('ppapi-flash-path', __dirname + '/pepflashplayer.dll');
app.commandLine.appendSwitch('ppapi-flash-version', '10.0.0.245');"><pre class="notranslate"><span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-c1">commandLine</span><span class="pl-kos">.</span><span class="pl-en">appendSwitch</span><span class="pl-kos">(</span><span class="pl-s">'ppapi-flash-path'</span><span class="pl-kos">,</span> <span class="pl-s1">__dirname</span> <span class="pl-c1">+</span> <span class="pl-s">'/pepflashplayer.dll'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-c1">commandLine</span><span class="pl-kos">.</span><span class="pl-en">appendSwitch</span><span class="pl-kos">(</span><span class="pl-s">'ppapi-flash-version'</span><span class="pl-kos">,</span> <span class="pl-s">'10.0.0.245'</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">when open a page which have flash object. a cmd window show 'NOT SANDBOXED' than quickly closed auto.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/9499016/11710010/0dad245c-9f57-11e5-8508-937361bd19c1.png"><img src="https://cloud.githubusercontent.com/assets/9499016/11710010/0dad245c-9f57-11e5-8508-937361bd19c1.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">how can i configure to stop show the cmd window</p> | <ol dir="auto">
<li>Create a Win32 Electron app that sets up Pepper Flash</li>
<li>Run the EXE from Explorer (you won't see this if you run Electron from a console)</li>
<li>Be very observant</li>
</ol>
<p dir="auto">You'll notice a DOS box flash open then immediately close. If we use Image File Execution Options to set a dummy EXE as our Debugger for "Cmd.exe" (I used Notepad), we can see what's happening:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/021999aee00ba57770973fa43813d3b6a1eb99352c280e5a25dff1b56388dbb1/687474703a2f2f636c2e6c792f696d6167652f3249336130323267317033672f636f6e74656e7423706e67"><img src="https://camo.githubusercontent.com/021999aee00ba57770973fa43813d3b6a1eb99352c280e5a25dff1b56388dbb1/687474703a2f2f636c2e6c792f696d6167652f3249336130323267317033672f636f6e74656e7423706e67" alt="" data-canonical-src="http://cl.ly/image/2I3a022g1p3g/content#png" style="max-width: 100%;"></a></p>
<p dir="auto">PPAPI process is trying to echo "NOT SANDBOXED", but because we don't have an attached Console, it creates one</p> | 1 |
<p dir="auto">This is not a very common situation, but it's one that we did observe, so I'm opening this ticket to document this potential behavior. We were relying on active_queues() to provide an accurate look at the workers, and these a the following log messages in the log concerned us.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="py.warnings:WARNING: /home/bmbouter/Documents/qpidkombu/repos/celery/celery/app/control.py:34: DuplicateNodenameWarning: Received multiple replies from node name True.
py.warnings:WARNING: Please make sure you give each node a unique nodename using the `-n` option.
py.warnings:WARNING: W_DUPNODE.format(dup),
py.warnings:WARNING:"><pre class="notranslate"><code class="notranslate">py.warnings:WARNING: /home/bmbouter/Documents/qpidkombu/repos/celery/celery/app/control.py:34: DuplicateNodenameWarning: Received multiple replies from node name True.
py.warnings:WARNING: Please make sure you give each node a unique nodename using the `-n` option.
py.warnings:WARNING: W_DUPNODE.format(dup),
py.warnings:WARNING:
</code></pre></div>
<p dir="auto">We saw this output exactly once from each worker some time after each restart. In our case we had a task that uses inspect, such as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="controller = control.Control(app=app)
@task
def my_task():
active_queues = controller.inspect().active_queues()"><pre class="notranslate"><code class="notranslate">controller = control.Control(app=app)
@task
def my_task():
active_queues = controller.inspect().active_queues()
</code></pre></div>
<p dir="auto">To reproduce, start 8 workers with unique names, and have them ready to run the my_task. Then dispatch 50 my_task using:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="for i in range(50):
my_task.delay()"><pre class="notranslate"><code class="notranslate">for i in range(50):
my_task.delay()
</code></pre></div>
<p dir="auto">We do not have any duplicate workers. We have exactly 8, and each one gets a different name. We verified this manually, yet we saw the warnings about duplicate workers.</p>
<p dir="auto">When turning on debug logging, I saw a many output lines like this one:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kombu.pidbox:DEBUG: pidbox received method active_queues() [reply_to:{u'routing_key': u'37ff7c3e-8007-38c4-a836-544cfe8380e6', u'exchange': u'reply.celery.pidbox'} ticket:6f2aa08e-68bc-4750-849c-7f02b98da7b6"><pre class="notranslate"><code class="notranslate">kombu.pidbox:DEBUG: pidbox received method active_queues() [reply_to:{u'routing_key': u'37ff7c3e-8007-38c4-a836-544cfe8380e6', u'exchange': u'reply.celery.pidbox'} ticket:6f2aa08e-68bc-4750-849c-7f02b98da7b6
</code></pre></div>
<p dir="auto">Each pid showed that it received a pidbox request (the active_queues command) with a reply_to routing key of '37ff7c3e-8007-38c4-a836-544cfe8380e6'. I believe the root cause of this issue is that this routing key does not change with pidbox command to pidbox command. It also cannot correlate one the responses with the requests.</p>
<p dir="auto">If I issue an active_queue command with reply_to = 'foo', and I wait 1 second to timeout, and 1 worker responds later than 1 second, it's reply is going to go into my queue and not be read by my active_queue command. Then if I issue a second active_queue() command, and use the same reply_to = 'foo', and the worker responds in time this time, as I process the replies I'll see a duplicate reply from the worker.</p>
<p dir="auto">This causes the active_queues() information to be incorrect.</p>
<p dir="auto">A correlation value could be introduced that correlates replies with requests, or the reply queue could be different with each pidbox command potentially.</p>
<p dir="auto">The fact that the logs were only printed once I is also interesting. I verified that this actually happens a lot more than once, but the logging warning is only shown once! That <a href="https://github.com/celery/celery/blob/master/celery/app/control.py#L33">logging occurs here</a>.</p> | <p dir="auto">The python 3.7 jobs of our CI started failing today. To reproduce the issue, <code class="notranslate">pip install celery</code> in a fresh environment and you get this</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="python -c "from celery import current_app"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: cannot import name 'current_app' from 'celery' (/users/denolf/virtualenvs/pybox_c5ZgMc/ubuntu_20_04/py37/lib/python3.7/site-packages/celery/__init__.py)"><pre class="notranslate"><code class="notranslate">python -c "from celery import current_app"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: cannot import name 'current_app' from 'celery' (/users/denolf/virtualenvs/pybox_c5ZgMc/ubuntu_20_04/py37/lib/python3.7/site-packages/celery/__init__.py)
</code></pre></div>
<p dir="auto">Upon further investigation is seems <code class="notranslate">STATICA_HACK == False</code> despite this</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# ...lib/python3.7/site-packages/celery/__init__.py
# This is never executed, but tricks static analyzers (PyDev, PyCharm,
# pylint, etc.) into knowing the types of these symbols, and what
# they contain.
STATICA_HACK = True
globals()['kcah_acitats'[::-1].upper()] = False
breakpoint()
if STATICA_HACK: # pragma: no cover
from celery._state import current_app, current_task
from celery.app import shared_task
from celery.app.base import Celery
from celery.app.task import Task
from celery.app.utils import bugreport
from celery.canvas import (chain, chord, chunks, group, # noqa
maybe_signature, signature, subtask, xmap,
xstarmap)
from celery.utils import uuid"><pre class="notranslate"><span class="pl-c"># ...lib/python3.7/site-packages/celery/__init__.py</span>
<span class="pl-c"># This is never executed, but tricks static analyzers (PyDev, PyCharm,</span>
<span class="pl-c"># pylint, etc.) into knowing the types of these symbols, and what</span>
<span class="pl-c"># they contain.</span>
<span class="pl-v">STATICA_HACK</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>
<span class="pl-en">globals</span>()[<span class="pl-s">'kcah_acitats'</span>[::<span class="pl-c1">-</span><span class="pl-c1">1</span>].<span class="pl-en">upper</span>()] <span class="pl-c1">=</span> <span class="pl-c1">False</span>
<span class="pl-en">breakpoint</span>()
<span class="pl-k">if</span> <span class="pl-v">STATICA_HACK</span>: <span class="pl-c"># pragma: no cover</span>
<span class="pl-k">from</span> <span class="pl-s1">celery</span>.<span class="pl-s1">_state</span> <span class="pl-k">import</span> <span class="pl-s1">current_app</span>, <span class="pl-s1">current_task</span>
<span class="pl-k">from</span> <span class="pl-s1">celery</span>.<span class="pl-s1">app</span> <span class="pl-k">import</span> <span class="pl-s1">shared_task</span>
<span class="pl-k">from</span> <span class="pl-s1">celery</span>.<span class="pl-s1">app</span>.<span class="pl-s1">base</span> <span class="pl-k">import</span> <span class="pl-v">Celery</span>
<span class="pl-k">from</span> <span class="pl-s1">celery</span>.<span class="pl-s1">app</span>.<span class="pl-s1">task</span> <span class="pl-k">import</span> <span class="pl-v">Task</span>
<span class="pl-k">from</span> <span class="pl-s1">celery</span>.<span class="pl-s1">app</span>.<span class="pl-s1">utils</span> <span class="pl-k">import</span> <span class="pl-s1">bugreport</span>
<span class="pl-k">from</span> <span class="pl-s1">celery</span>.<span class="pl-s1">canvas</span> <span class="pl-k">import</span> (<span class="pl-s1">chain</span>, <span class="pl-s1">chord</span>, <span class="pl-s1">chunks</span>, <span class="pl-s1">group</span>, <span class="pl-c"># noqa</span>
<span class="pl-s1">maybe_signature</span>, <span class="pl-s1">signature</span>, <span class="pl-s1">subtask</span>, <span class="pl-s1">xmap</span>,
<span class="pl-s1">xstarmap</span>)
<span class="pl-k">from</span> <span class="pl-s1">celery</span>.<span class="pl-s1">utils</span> <span class="pl-k">import</span> <span class="pl-s1">uuid</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="python --version
Python 3.7.9
pip list
Package Version
------------------ -------
amqp 5.1.1
billiard 3.6.4.0
cached-property 1.5.2
celery 5.2.7
click 8.1.3
click-didyoumean 0.3.0
click-plugins 1.1.1
click-repl 0.2.0
importlib-metadata 5.0.0
kombu 5.2.4
pip 22.2.2
prompt-toolkit 3.0.31
pytz 2022.4
setuptools 65.4.1
six 1.16.0
typing_extensions 4.3.0
vine 5.0.0
wcwidth 0.2.5
wheel 0.37.1
zipp 3.8.1"><pre class="notranslate"><code class="notranslate">python --version
Python 3.7.9
pip list
Package Version
------------------ -------
amqp 5.1.1
billiard 3.6.4.0
cached-property 1.5.2
celery 5.2.7
click 8.1.3
click-didyoumean 0.3.0
click-plugins 1.1.1
click-repl 0.2.0
importlib-metadata 5.0.0
kombu 5.2.4
pip 22.2.2
prompt-toolkit 3.0.31
pytz 2022.4
setuptools 65.4.1
six 1.16.0
typing_extensions 4.3.0
vine 5.0.0
wcwidth 0.2.5
wheel 0.37.1
zipp 3.8.1
</code></pre></div>
<p dir="auto">I don't see this issue with python 3.8 (and perhaps higher as well, didn't check)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="python --version
Python 3.8.5
pip list
Package Version
---------------- -------
amqp 5.1.1
billiard 3.6.4.0
celery 5.2.7
click 8.1.3
click-didyoumean 0.3.0
click-plugins 1.1.1
click-repl 0.2.0
kombu 5.2.4
pip 22.2.2
prompt-toolkit 3.0.31
pytz 2022.4
setuptools 65.4.1
six 1.16.0
vine 5.0.0
wcwidth 0.2.5
wheel 0.37.1"><pre class="notranslate"><code class="notranslate">python --version
Python 3.8.5
pip list
Package Version
---------------- -------
amqp 5.1.1
billiard 3.6.4.0
celery 5.2.7
click 8.1.3
click-didyoumean 0.3.0
click-plugins 1.1.1
click-repl 0.2.0
kombu 5.2.4
pip 22.2.2
prompt-toolkit 3.0.31
pytz 2022.4
setuptools 65.4.1
six 1.16.0
vine 5.0.0
wcwidth 0.2.5
wheel 0.37.1
</code></pre></div> | 0 |
<h4 dir="auto">code below is scene that issue happened.</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" for user_id, row in pending_data_df.iterrows():
df = DataFrame(
columns=[
Names.call.same_call_counts,
Names.call.phonebook_detail
],
index=[user_id]
)
phoneBookPath = row[Names.app.phonebookpath]
call_number_list = row.get(Names.call.call_number_list)"><pre class="notranslate"> <span class="pl-k">for</span> <span class="pl-s1">user_id</span>, <span class="pl-s1">row</span> <span class="pl-c1">in</span> <span class="pl-s1">pending_data_df</span>.<span class="pl-en">iterrows</span>():
<span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-v">DataFrame</span>(
<span class="pl-s1">columns</span><span class="pl-c1">=</span>[
<span class="pl-v">Names</span>.<span class="pl-s1">call</span>.<span class="pl-s1">same_call_counts</span>,
<span class="pl-v">Names</span>.<span class="pl-s1">call</span>.<span class="pl-s1">phonebook_detail</span>
],
<span class="pl-s1">index</span><span class="pl-c1">=</span>[<span class="pl-s1">user_id</span>]
)
<span class="pl-s1">phoneBookPath</span> <span class="pl-c1">=</span> <span class="pl-s1">row</span>[<span class="pl-v">Names</span>.<span class="pl-s1">app</span>.<span class="pl-s1">phonebookpath</span>]
<span class="pl-s1">call_number_list</span> <span class="pl-c1">=</span> <span class="pl-s1">row</span>.<span class="pl-en">get</span>(<span class="pl-v">Names</span>.<span class="pl-s1">call</span>.<span class="pl-s1">call_number_list</span>)</pre></div>
<h4 dir="auto">Problem description</h4>
<h4 dir="auto">when I wanted to get a set from a Series , it happended.</h4>
<h4 dir="auto">it has worked well for a long time,but suddenly it broke out. raise Traceback like this:</h4>
<p dir="auto">Traceback (most recent call last):<br>
File "/usr/local/lib/python3.5/threading.py", line 914, in _bootstrap_inner<br>
self.run()<br>
File "/home/datascience/zh/suijiesuihuan/datascience/my_threads.py", line 87, in run<br>
ret_data, result = make_decision(int(self.layerId), df_input)<br>
File "/home/datascience/zh/suijiesuihuan/datascience/layered_decision.py", line 52, in make_decision<br>
data_df, result_df = load_features_group_loader(features_group_loader_id, mocking)(data_df)<br>
File "/home/datascience/zh/suijiesuihuan/datascience/dynamic_content_loader.py", line 166, in inner<br>
return load_and_make_decision(data_df, config_new)<br>
File "/home/datascience/zh/suijiesuihuan/datascience/dynamic_content_loader.py", line 111, in load_and_make_decision<br>
new_feature_group_df, error_df = _load_data(pending_df, features_loader_id, features_loader, mocking)<br>
File "/home/datascience/zh/suijiesuihuan/datascience/dynamic_content_loader.py", line 76, in _load_data<br>
data_df, result_df = features_loader(data_df)<br>
File "/home/datascience/zh/suijiesuihuan/dynamic_contents/feature_group_loader/feature_group_loader_0003/feature_group_loader.py", line 55, in load<br>
call_number_list = row.get(Names.call.call_number_list)<br>
File "/home/datascience/zh/venv/lib/python3.5/site-packages/pandas/core/generic.py", line 1633, in get<br>
return self[key]<br>
File "/home/datascience/zh/venv/lib/python3.5/site-packages/pandas/core/series.py", line 611, in <strong>getitem</strong><br>
dtype=self.dtype).<strong>finalize</strong>(self)<br>
File "/home/datascience/zh/venv/lib/python3.5/site-packages/pandas/core/series.py", line 227, in <strong>init</strong><br>
"".format(data.<strong>class</strong>.<strong>name</strong>))<br>
TypeError: 'set' type is unordered</p>
<h4 dir="auto">someone knows what happened?</h4> | <p dir="auto">this fails because we are putmasking on a dtype=int ndarray<br>
need to cast if this is the case (in series.where)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pandas
df = pandas.DataFrame(index=[1,2])
df['test'] = [1,2]
df['test'][[True, False]] = pandas.Series([0],index=[1])
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-9-7738933c68bb> in <module>()
----> 1 df['test'][[True,False]] = pandas.Series([0],index=[1])
/mnt/home/jreback/pandas/pandas/core/series.pyc in __setitem__(self, key, value)
677 if _is_bool_indexer(key):
678 key = self._check_bool_indexer(key)
--> 679 self.where(~key,value,inplace=True)
680 else:
681 self._set_with(key, value)
/mnt/home/jreback/pandas/pandas/core/series.pyc in where(self, cond, other, inplace)
630 raise ValueError('Length of replacements must equal series length')
631
--> 632 np.putmask(ser, ~cond, other)
633
634 return None if inplace else ser
TypeError: array cannot be safely cast to required type
"><pre class="notranslate"><code class="notranslate">import pandas
df = pandas.DataFrame(index=[1,2])
df['test'] = [1,2]
df['test'][[True, False]] = pandas.Series([0],index=[1])
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-9-7738933c68bb> in <module>()
----> 1 df['test'][[True,False]] = pandas.Series([0],index=[1])
/mnt/home/jreback/pandas/pandas/core/series.pyc in __setitem__(self, key, value)
677 if _is_bool_indexer(key):
678 key = self._check_bool_indexer(key)
--> 679 self.where(~key,value,inplace=True)
680 else:
681 self._set_with(key, value)
/mnt/home/jreback/pandas/pandas/core/series.pyc in where(self, cond, other, inplace)
630 raise ValueError('Length of replacements must equal series length')
631
--> 632 np.putmask(ser, ~cond, other)
633
634 return None if inplace else ser
TypeError: array cannot be safely cast to required type
</code></pre></div> | 0 |
<h4 dir="auto">Code Sample, a copy-pastable example</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Your code here
df = pd.DataFrame([[pd.Timestamp(2017,12,17), pd.Timestamp(2017,12,18)], [pd.Timestamp(2017,12,31), pd.NaT]])
In [7]: df
Out[7]:
0 1
0 2017-12-17 2017-12-18
1 2017-12-31 NaT
In [8]: df < pd.Timestamp(2017,1,1)
Out[8]:
0 1
0 False False
1 False True
In [9]: df[1] < pd.Timestamp(2017,1,1)
Out[9]:
0 False
1 False
"><pre class="notranslate"><span class="pl-c"># Your code here</span>
<span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>([[<span class="pl-s1">pd</span>.<span class="pl-v">Timestamp</span>(<span class="pl-c1">2017</span>,<span class="pl-c1">12</span>,<span class="pl-c1">17</span>), <span class="pl-s1">pd</span>.<span class="pl-v">Timestamp</span>(<span class="pl-c1">2017</span>,<span class="pl-c1">12</span>,<span class="pl-c1">18</span>)], [<span class="pl-s1">pd</span>.<span class="pl-v">Timestamp</span>(<span class="pl-c1">2017</span>,<span class="pl-c1">12</span>,<span class="pl-c1">31</span>), <span class="pl-s1">pd</span>.<span class="pl-v">NaT</span>]])
<span class="pl-v">In</span> [<span class="pl-c1">7</span>]: <span class="pl-s1">df</span>
<span class="pl-v">Out</span>[<span class="pl-c1">7</span>]:
<span class="pl-c1">0</span> <span class="pl-c1">1</span>
<span class="pl-c1">0</span> <span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">12</span><span class="pl-c1">-</span><span class="pl-c1">17</span> <span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">12</span><span class="pl-c1">-</span><span class="pl-c1">18</span>
<span class="pl-c1">1</span> <span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">12</span><span class="pl-c1">-</span><span class="pl-c1">31</span> <span class="pl-v">NaT</span>
<span class="pl-v">In</span> [<span class="pl-c1">8</span>]: <span class="pl-s1">df</span> <span class="pl-c1"><</span> <span class="pl-s1">pd</span>.<span class="pl-v">Timestamp</span>(<span class="pl-c1">2017</span>,<span class="pl-c1">1</span>,<span class="pl-c1">1</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">8</span>]:
<span class="pl-c1">0</span> <span class="pl-c1">1</span>
<span class="pl-c1">0</span> <span class="pl-v">False</span> <span class="pl-c1">False</span>
<span class="pl-c1">1</span> <span class="pl-v">False</span> <span class="pl-c1">True</span>
<span class="pl-v">In</span> [<span class="pl-c1">9</span>]: <span class="pl-s1">df</span>[<span class="pl-c1">1</span>] <span class="pl-c1"><</span> <span class="pl-s1">pd</span>.<span class="pl-v">Timestamp</span>(<span class="pl-c1">2017</span>,<span class="pl-c1">1</span>,<span class="pl-c1">1</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">9</span>]:
<span class="pl-c1">0</span> <span class="pl-c1">False</span>
<span class="pl-c1">1</span> <span class="pl-c1">False</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">When comparing a dataframe of dtype Timestamp to a scalar value (Timestamp or datetime), the result to NaT is always True no matter what operator is used(==, <, >, ...).</p>
<p dir="auto">But it is not the case when compares a series of Timestamps.</p>
<h4 dir="auto">Expected Output</h4>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.2.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 70 Stepping 1, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
<p dir="auto">pandas: 0.21.1<br>
pytest: 3.0.5<br>
pip: 9.0.1<br>
setuptools: 27.2.0<br>
Cython: 0.25.2<br>
numpy: 1.13.3<br>
scipy: 0.18.1<br>
pyarrow: None<br>
xarray: 0.9.6<br>
IPython: 6.1.0<br>
sphinx: 1.5.1<br>
patsy: 0.4.1<br>
dateutil: 2.6.1<br>
pytz: 2017.3<br>
blosc: None<br>
bottleneck: 1.2.0<br>
tables: 3.4.2<br>
numexpr: 2.6.1<br>
feather: None<br>
matplotlib: 2.1.0<br>
openpyxl: 2.4.1<br>
xlrd: 1.0.0<br>
xlwt: 1.2.0<br>
xlsxwriter: 0.9.6<br>
lxml: 3.7.2<br>
bs4: 4.5.3<br>
html5lib: None<br>
sqlalchemy: 1.1.5<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.9.4<br>
s3fs: None<br>
fastparquet: None<br>
pandas_gbq: None<br>
pandas_datareader: 0.5.0</p>
</details> | <h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=">>> import pandas as pd
>>> nat = pd.NaT
>>> x = pd.Series([nat])
>>> x.eq(nat)
0 False
dtype: bool
>>> x == nat
0 False
dtype: bool
>>> y = pd.DataFrame(dict(x=x))
>>> y.eq(nat)
x
0 NaT
>>> y == nat
x
0 True"><pre class="notranslate"><span class="pl-c1">>></span><span class="pl-c1">></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-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">nat</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">NaT</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-s1">nat</span>])
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">x</span>.<span class="pl-en">eq</span>(<span class="pl-s1">nat</span>)
<span class="pl-c1">0</span> <span class="pl-c1">False</span>
<span class="pl-s1">dtype</span>: <span class="pl-s1">bool</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">x</span> <span class="pl-c1">==</span> <span class="pl-s1">nat</span>
<span class="pl-c1">0</span> <span class="pl-c1">False</span>
<span class="pl-s1">dtype</span>: <span class="pl-s1">bool</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-en">dict</span>(<span class="pl-s1">x</span><span class="pl-c1">=</span><span class="pl-s1">x</span>))
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">y</span>.<span class="pl-en">eq</span>(<span class="pl-s1">nat</span>)
<span class="pl-s1">x</span>
<span class="pl-c1">0</span> <span class="pl-v">NaT</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">y</span> <span class="pl-c1">==</span> <span class="pl-s1">nat</span>
<span class="pl-s1">x</span>
<span class="pl-c1">0</span> <span class="pl-c1">True</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">Comparisons in a dataframe containing a single nat give incorrect answers. Note this occurs with both datetime and timedelta nats.</p>
<h4 dir="auto">Expected Output</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="0 False
dtype: bool
0 False
dtype: bool
x
0 False
x
0 False"><pre class="notranslate"><span class="pl-c1">0</span> <span class="pl-c1">False</span>
<span class="pl-s1">dtype</span>: <span class="pl-s1">bool</span>
<span class="pl-c1">0</span> <span class="pl-c1">False</span>
<span class="pl-s1">dtype</span>: <span class="pl-s1">bool</span>
<span class="pl-s1">x</span>
<span class="pl-c1">0</span> <span class="pl-c1">False</span>
<span class="pl-s1">x</span>
<span class="pl-c1">0</span> <span class="pl-c1">False</span></pre></div>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 3.5.2.final.0<br>
python-bits: 64<br>
OS: Linux<br>
OS-release: 4.9.8-100.fc24.x86_64<br>
machine: x86_64<br>
processor: x86_64<br>
byteorder: little<br>
LC_ALL: C<br>
LANG: C<br>
LOCALE: None.None</p>
<p dir="auto">pandas: 0.19.0+579.g4ce9c0c<br>
pytest: 3.0.5<br>
pip: 9.0.1<br>
setuptools: 27.2.0<br>
Cython: 0.25.2<br>
numpy: 1.11.3<br>
scipy: 0.18.1<br>
xarray: 0.9.1<br>
IPython: 4.2.0<br>
sphinx: 1.5.1<br>
patsy: 0.4.1<br>
dateutil: 2.6.0<br>
pytz: 2016.10<br>
blosc: None<br>
bottleneck: 1.2.0<br>
tables: 3.3.0<br>
numexpr: 2.6.2<br>
feather: None<br>
matplotlib: 2.0.0<br>
openpyxl: 2.4.1<br>
xlrd: 1.0.0<br>
xlwt: 1.2.0<br>
xlsxwriter: 0.9.6<br>
lxml: 3.7.2<br>
bs4: 4.5.3<br>
html5lib: 0.999<br>
sqlalchemy: 1.1.5<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.9.4<br>
s3fs: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details> | 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/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 custom-server-typescript example should work as expected on next.js 5.1.0. All routes should resolve to their respective pages in the pages/ folder.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The custom-server-typescript example's routes all return 404 on next.js 5.1.0 but work fine on 5.0.0</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>clone the custom-server-typescript example</li>
<li>follow steps to install dependencies and run example</li>
<li>navigate to the index, a or b routes</li>
<li>all routes return 404 instead of their respective pages</li>
<li>downgrade next.js to 5.0.0 (eg. npm install [email protected] --save)</li>
<li>rerun the example (eg. npm run dev)</li>
<li>navigate to the index, a and b routes and they work as expected</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>v5.1.0</td>
</tr>
<tr>
<td>node</td>
<td>v9.9.0 x64</td>
</tr>
<tr>
<td>OS</td>
<td>Windows 10 x64</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome 65.0.3325.181</td>
</tr>
</tbody>
</table> | <p dir="auto">There is an integration between Next Router and Redux like react-router-redux?</p> | 0 |
<p dir="auto">Should it be possible to define a network in stax without setting a non-batch dimension?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import jax.numpy as np
from jax import random
from jax.experimental import stax
from jax.experimental.stax import Dense, Relu, Flatten, LogSoftmax
# Use stax to set up network initialization and evaluation functions
net_init, net_apply = stax.serial(Dense(128), Relu, Dense(10), LogSoftmax)
rng = random.PRNGKey(0)
# Initialize parameters, not committing to a batch shape
# works
in_shape = (-1, 1)
out_shape, net_params = net_init(rng, in_shape)
# doesn't work (fails with ValueError: all elements of broadcast shape must be non-negative)
in_shape = (-1,)
out_shape, net_params = net_init(rng, in_shape)"><pre class="notranslate"><code class="notranslate">import jax.numpy as np
from jax import random
from jax.experimental import stax
from jax.experimental.stax import Dense, Relu, Flatten, LogSoftmax
# Use stax to set up network initialization and evaluation functions
net_init, net_apply = stax.serial(Dense(128), Relu, Dense(10), LogSoftmax)
rng = random.PRNGKey(0)
# Initialize parameters, not committing to a batch shape
# works
in_shape = (-1, 1)
out_shape, net_params = net_init(rng, in_shape)
# doesn't work (fails with ValueError: all elements of broadcast shape must be non-negative)
in_shape = (-1,)
out_shape, net_params = net_init(rng, in_shape)
</code></pre></div>
<p dir="auto">As a workaround, I can of course add a fake 1 dimension on the end, and then remove it later, but I was a little surprised that this doesn't automatically work.</p> | <p dir="auto">The following code snippet shows that Stax MLPs can be defined w.r.t. unbatched examples (input_size = (1,)) while Convnets seem to require a batch size (though it can be -1). Is this intended behavior?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Works
net_init, net_apply = stax.serial(
Conv(32, (3, 3), padding='SAME'), Relu,
Conv(64, (3, 3), padding='SAME'), Relu,
MaxPool((2, 2)), Flatten,
Dense(128), Relu,
Dense(10), LogSoftmax,
)
# Initialize parameters, not committing to a batch shape
in_shape = (-1, 28, 28, 1)
out_shape, net_params = net_init(in_shape)
# Works
net_init, net_apply = stax.serial(
Dense(40), Relu,
Dense(40), Relu,
Dense(1)
)
in_shape = (1,)
out_shape, net_params = net_init(in_shape)
# Doesn't Work
net_init, net_apply = stax.serial(
Conv(32, (3, 3), padding='SAME'), Relu,
Conv(64, (3, 3), padding='SAME'), Relu,
MaxPool((2, 2)), Flatten,
Dense(128), Relu,
Dense(10), LogSoftmax,
)
in_shape = (28, 28, 1)
out_shape, net_params = net_init(in_shape)"><pre class="notranslate"><code class="notranslate"># Works
net_init, net_apply = stax.serial(
Conv(32, (3, 3), padding='SAME'), Relu,
Conv(64, (3, 3), padding='SAME'), Relu,
MaxPool((2, 2)), Flatten,
Dense(128), Relu,
Dense(10), LogSoftmax,
)
# Initialize parameters, not committing to a batch shape
in_shape = (-1, 28, 28, 1)
out_shape, net_params = net_init(in_shape)
# Works
net_init, net_apply = stax.serial(
Dense(40), Relu,
Dense(40), Relu,
Dense(1)
)
in_shape = (1,)
out_shape, net_params = net_init(in_shape)
# Doesn't Work
net_init, net_apply = stax.serial(
Conv(32, (3, 3), padding='SAME'), Relu,
Conv(64, (3, 3), padding='SAME'), Relu,
MaxPool((2, 2)), Flatten,
Dense(128), Relu,
Dense(10), LogSoftmax,
)
in_shape = (28, 28, 1)
out_shape, net_params = net_init(in_shape)
</code></pre></div>
<p dir="auto">The last one returns the following error:<br>
IndexError Traceback (most recent call last)<br>
in ()<br>
9 # Initialize parameters, not committing to a batch shape<br>
10 in_shape = (28, 28, 1)<br>
---> 11 out_shape, net_params = net_init(in_shape)</p>
<p dir="auto">google3/third_party/py/jax/experimental/stax.py in init_fun(input_shape)<br>
269 params = []<br>
270 for init_fun in init_funs:<br>
--> 271 input_shape, param = init_fun(input_shape)<br>
272 params.append(param)<br>
273 return input_shape, params</p>
<p dir="auto">google3/third_party/py/jax/experimental/stax.py in init_fun(input_shape)<br>
109 kernel_shape = [out_chan if c == 'O' else<br>
110 input_shape[lhs_spec.index('C')] if c == 'I' else<br>
--> 111 next(filter_shape_iter) for c in rhs_spec]<br>
112 output_shape = lax.conv_general_shape_tuple(<br>
113 input_shape, kernel_shape, strides, padding, dimension_numbers)</p>
<p dir="auto">IndexError: tuple index out of range</p> | 1 |
<p dir="auto">compiler error with python3.8, but works with python3.7.<br>
the error information is: cannot convert nullptr to Py_ssize_t for the file with /<em>tp_print</em>/:</p>
<p dir="auto">For example:</p>
<blockquote>
<p dir="auto">torch\csrc\Dtype.cpp --> line65, nullptr /<em>tp_print</em>/</p>
</blockquote>
<p dir="auto">could you help to solve this bug for all the files with /<em>tp_print</em>/ ?</p> | <p dir="auto">When use Python3.8.0, it's impossible to compile Pytorch1.3 directly. Wish that could be repaired later and thanks a lot!</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ezyang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ezyang">@ezyang</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gchanan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gchanan">@gchanan</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zou3519/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zou3519">@zou3519</a></p> | 1 |
<p dir="auto"><strong>Section/Content To Improve</strong><br>
<a href="https://github.com/axios/axios#axioscreateconfig">https://github.com/axios/axios#axioscreateconfig</a></p>
<p dir="auto"><strong>Suggested Improvement</strong><br>
<em>Shouldn't the doc be clearer about which parameters are intended to be used with axios.create?</em></p>
<p dir="auto">Until version 0.19 I used to pass the request url to axios.create without using baseURL:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const instance = axios.create({
data,
headers,
method,
url: derivedUrl,
...omit(options, 'resource', 'headers', 'customErrorInterceptor'),
});
instance.interceptors.response.use(
response => response,
(error) => {
if (options.customErrorInterceptor) {
if (typeof options.customErrorInterceptor === 'function') {
options.customErrorInterceptor(error);
}
} else globalXHRErrorHandling(error);
return Promise.reject(error);
},
);
return instance.request();"><pre class="notranslate"><code class="notranslate">const instance = axios.create({
data,
headers,
method,
url: derivedUrl,
...omit(options, 'resource', 'headers', 'customErrorInterceptor'),
});
instance.interceptors.response.use(
response => response,
(error) => {
if (options.customErrorInterceptor) {
if (typeof options.customErrorInterceptor === 'function') {
options.customErrorInterceptor(error);
}
} else globalXHRErrorHandling(error);
return Promise.reject(error);
},
);
return instance.request();
</code></pre></div>
<p dir="auto">The reason of this strange choice is I want a global interceptor that sometimes is overridden by a specific one.</p>
<p dir="auto">With 0.19 release the url param is totally ignored by axios.create. I have to pass it to instance.request.</p>
<p dir="auto">Thanks!</p> | <p dir="auto"><strong>Describe the bug</strong></p>
<p dir="auto">Specific request params do not get merged with the instance default params.</p>
<p dir="auto"><strong>To Reproduce</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const instance = axios.create({
baseURL: "http://www.example.com",
params: {
q: "question",
}
});"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">instance</span> <span class="pl-c1">=</span> <span class="pl-s1">axios</span><span class="pl-kos">.</span><span class="pl-en">create</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">baseURL</span>: <span class="pl-s">"http://www.example.com"</span><span class="pl-kos">,</span>
<span class="pl-c1">params</span>: <span class="pl-kos">{</span>
<span class="pl-c1">q</span>: <span class="pl-s">"question"</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>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="instance.get("/page",
{
params: {
page: 2
}
}
)"><pre class="notranslate"><span class="pl-s1">instance</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">"/page"</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span>
<span class="pl-c1">params</span>: <span class="pl-kos">{</span>
<span class="pl-c1">page</span>: <span class="pl-c1">2</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-kos">)</span></pre></div>
<p dir="auto">What happens is that the request param object overrides the instance default param object. The instance no longer has a query param of <code class="notranslate">q</code>.</p>
<p dir="auto"><strong>Expected behavior</strong></p>
<p dir="auto">According to the docs, all configuration options are <em>merged</em>. <a href="https://github.com/axios/axios#instance-methods">https://github.com/axios/axios#instance-methods</a></p>
<p dir="auto">I expected request to contain both <code class="notranslate">q</code> and <code class="notranslate">page</code> params. This is also how it was working in version 0.18.0, which is how I noticed.</p>
<p dir="auto"><strong>Environment:</strong></p>
<ul dir="auto">
<li>Axios Version: 0.19.0</li>
<li>OS: 10.14.5 (18F132)</li>
<li>Browser: Node Express, and Chrome</li>
<li>Browser: Node 10.15.0, Chrome Version 74.0.3729.169 (Official Build) (64-bit)</li>
</ul> | 1 |
<h3 dir="auto">Website or app</h3>
<p dir="auto">local running intranet web app</p>
<h3 dir="auto">Repro steps</h3>
<p dir="auto">1 . start intranet web app<br>
2. call in DevTools from React DevTools "Components"</p>
<h3 dir="auto">How often does this bug happen?</h3>
<p dir="auto">Every time</p>
<h3 dir="auto">DevTools package (automated)</h3>
<p dir="auto">react-devtools-extensions</p>
<h3 dir="auto">DevTools version (automated)</h3>
<p dir="auto">4.23.0-e28a0db22</p>
<h3 dir="auto">Error message (automated)</h3>
<p dir="auto">Cannot add node "1" because a node with that id is already in the Store.</p>
<h3 dir="auto">Error call stack (automated)</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26229:41
at bridge_Bridge.emit (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:24415:22)
at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:24581:14
at listener (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:54033:39)"><pre lang="text" class="notranslate"><code class="notranslate">at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26229:41
at bridge_Bridge.emit (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:24415:22)
at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:24581:14
at listener (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:54033:39)
</code></pre></div>
<h3 dir="auto">Error component stack (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">GitHub query string (automated)</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="https://api.github.com/search/issues?q=Cannot add node because a node with that id is already in the Store. in:title is:issue is:open is:public label:"Component: Developer Tools" repo:facebook/react"><pre lang="text" class="notranslate"><code class="notranslate">https://api.github.com/search/issues?q=Cannot add node because a node with that id is already in the Store. in:title is:issue is:open is:public label:"Component: Developer Tools" repo:facebook/react
</code></pre></div> | <h3 dir="auto">Repro steps</h3>
<p dir="auto">"react": "17.0.2",<br>
"react-native": "0.66.3",<br>
"react-devtools": "^4.22.0",<br>
"@react-navigation/devtools": "^6.0.5",<br>
"@react-navigation/bottom-tabs": "^6.1.0",<br>
"@react-navigation/core": "^6.1.1",<br>
"@react-navigation/elements": "^1.3.0",<br>
"@react-navigation/native": "^6.0.7",<br>
"@react-navigation/native-stack": "^6.3.0",<br>
"@react-navigation/routers": "^6.1.0",<br>
"@react-navigation/stack": "^6.1.0",</p>
<h3 dir="auto">How often does this bug happen?</h3>
<p dir="auto">Every time</p>
<h3 dir="auto">DevTools package (automated)</h3>
<p dir="auto">react-devtools-core</p>
<h3 dir="auto">DevTools version (automated)</h3>
<p dir="auto">4.14.0-d0ec283819</p>
<h3 dir="auto">Error message (automated)</h3>
<p dir="auto">Cannot add node "1" because a node with that id is already in the Store.</p>
<h3 dir="auto">Error call stack (automated)</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="at /Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:48:140545
at c.emit (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:48:89515)
at /Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:48:90986
at /Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:48:347787
at Array.forEach (<anonymous>)
at S.Gc.e.onmessage (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:48:347771)
at S.n (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:40:3009)
at S.emit (events.js:315:20)
at e.exports.P (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:8:9318)
at e.exports.emit (events.js:315:20)
at e.exports.dataMessage (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:8:15409)
at e.exports.getData (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:8:14651)
at e.exports.startLoop (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:8:12066)
at e.exports._write (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:8:11421)
at doWrite (_stream_writable.js:403:12)
at writeOrBuffer (_stream_writable.js:387:5)"><pre lang="text" class="notranslate"><code class="notranslate">at /Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:48:140545
at c.emit (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:48:89515)
at /Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:48:90986
at /Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:48:347787
at Array.forEach (<anonymous>)
at S.Gc.e.onmessage (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:48:347771)
at S.n (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:40:3009)
at S.emit (events.js:315:20)
at e.exports.P (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:8:9318)
at e.exports.emit (events.js:315:20)
at e.exports.dataMessage (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:8:15409)
at e.exports.getData (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:8:14651)
at e.exports.startLoop (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:8:12066)
at e.exports._write (/Applications/React Native Debugger.app/Contents/Resources/app.asar/node_modules/react-devtools-core/dist/standalone.js:8:11421)
at doWrite (_stream_writable.js:403:12)
at writeOrBuffer (_stream_writable.js:387:5)
</code></pre></div>
<h3 dir="auto">Error component stack (automated)</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">GitHub query string (automated)</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="https://api.github.com/search/issues?q=Cannot add node because a node with that id is already in the Store. in:title is:issue is:open is:public label:"Component: Developer Tools" repo:facebook/react"><pre lang="text" class="notranslate"><code class="notranslate">https://api.github.com/search/issues?q=Cannot add node because a node with that id is already in the Store. in:title is:issue is:open is:public label:"Component: Developer Tools" repo:facebook/react
</code></pre></div> | 1 |
<p dir="auto">"Waypoint: Use jQuery to Modify the Entire Page" not accepting solution statement (below), even though performing function in mobile emulator. Per 'Report a Bug' page, attempted the following:</p>
<ul dir="auto">
<li>Hard Refresh by clearing cache</li>
<li>Logging out and back in</li>
<li>Searching for solution online (<a href="https://github.com/ATSlade/FCC-Workspace/wiki/jQuery">https://github.com/ATSlade/FCC-Workspace/wiki/jQuery</a>)</li>
<li>Asked in Chat / Gitter. Issue was confirmed by user @phoenixlaef shortly before this report at 23:10 on 11/30/15.</li>
</ul>
<p dir="auto">Statement Solutions Used:<br>
$("body").addClass("animated hinge");<br>
$("body").addClass("animated hinge")<br>
$('body').addClass('animated hinge');</p>
<p dir="auto">Will move on to JavaScript waypoints tomorrow, but would like to come back and complete this. Thanks!</p>
<hr>
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-use-jquery-to-modify-the-entire-page#?solution=fccss%0A%20%20%24%28document%29.ready%28function%28%29%20%7B%0A%20%20%20%20%24%28%22%23target1%22%29.css%28%22color%22%2C%20%22red%22%29%3B%0A%20%20%20%20%24%28%22%23target1%22%29.prop%28%22disabled%22%2C%20true%29%3B%0A%20%20%20%20%24%28%22%23target4%22%29.remove%28%29%3B%0A%20%20%20%20%24%28%22%23target2%22%29.appendTo%28%22%23right-well%22%29%3B%0A%20%20%20%20%24%28%22%23target5%22%29.clone%28%29.appendTo%28%22%23left-well%22%29%3B%0A%20%20%20%20%24%28%22%23target1%22%29.parent%28%29.css%28%22background-color%22%2C%20%22red%22%29%3B%0A%20%20%20%20%24%28%22%23right-well%22%29.children%28%29.css%28%22color%22%2C%20%22green%22%29%3B%0A%20%20%20%20%24%28%22%23left-well%22%29.children%28%29.css%28%22color%22%2C%20%22green%22%29%3B%0A%20%20%20%20%24%28%22.target%3Anth-child%282%29%22%29.addClass%28%22animated%20bounce%22%29%3B%0A%20%20%20%20%24%28%22.target%3Aeven%22%29.addClass%28%22animated%20shake%22%29%3B%0A%20%20%20%20%24%28%22body%22%29.addClass%28%22animated%20hinge%22%29%3B%0A%20%20%7D%29%3B%0Afcces%0A%0A%3C!--%20Only%20change%20code%20above%20this%20line.%20--%3E%0A%0A%3Cdiv%20class%3D%22container-fluid%22%3E%0A%20%20%3Ch3%20class%3D%22text-primary%20text-center%22%3EjQuery%20Playground%3C%2Fh3%3E%0A%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23left-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22left-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target1%22%3E%23target1%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target2%22%3E%23target2%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target3%22%3E%23target3%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23right-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22right-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target4%22%3E%23target4%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target5%22%3E%23target5%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target6%22%3E%23target6%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A" rel="nofollow">Waypoint: Use jQuery to Modify the Entire Page</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 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-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<script>
$(document).ready(function() {
$("#target1").css("color", "red");
$("#target1").prop("disabled", true);
$("#target4").remove();
$("#target2").appendTo("#right-well");
$("#target5").clone().appendTo("#left-well");
$("#target1").parent().css("background-color", "red");
$("#right-well").children().css("color", "green");
$("#left-well").children().css("color", "green");
$(".target:nth-child(2)").addClass("animated bounce");
$(".target:even").addClass("animated shake");
$("body").addClass("animated hinge");
});
</script>
<!-- Only change code above this line. -->
<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>
"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">script</span><span class="pl-kos">></span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-smi">document</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">ready</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-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target1"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">css</span><span class="pl-kos">(</span><span class="pl-s">"color"</span><span class="pl-kos">,</span> <span class="pl-s">"red"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target1"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">prop</span><span class="pl-kos">(</span><span class="pl-s">"disabled"</span><span class="pl-kos">,</span> <span class="pl-c1">true</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target4"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">remove</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target2"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">appendTo</span><span class="pl-kos">(</span><span class="pl-s">"#right-well"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target5"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">clone</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">appendTo</span><span class="pl-kos">(</span><span class="pl-s">"#left-well"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target1"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">parent</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">css</span><span class="pl-kos">(</span><span class="pl-s">"background-color"</span><span class="pl-kos">,</span> <span class="pl-s">"red"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#right-well"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">children</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">css</span><span class="pl-kos">(</span><span class="pl-s">"color"</span><span class="pl-kos">,</span> <span class="pl-s">"green"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#left-well"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">children</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">css</span><span class="pl-kos">(</span><span class="pl-s">"color"</span><span class="pl-kos">,</span> <span class="pl-s">"green"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">".target:nth-child(2)"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">addClass</span><span class="pl-kos">(</span><span class="pl-s">"animated bounce"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">".target:even"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">addClass</span><span class="pl-kos">(</span><span class="pl-s">"animated shake"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"body"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">addClass</span><span class="pl-kos">(</span><span class="pl-s">"animated hinge"</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-ent">script</span><span class="pl-kos">></span>
<span class="pl-c"><!-- Only change code above this line. --></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">container-fluid</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h3</span> <span class="pl-c1">class</span>="<span class="pl-s">text-primary text-center</span>"<span class="pl-kos">></span>jQuery Playground<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">div</span> <span class="pl-c1">class</span>="<span class="pl-s">row</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-6</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h4</span><span class="pl-kos">></span>#left-well<span class="pl-kos"></</span><span class="pl-ent">h4</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">well</span>" <span class="pl-c1">id</span>="<span class="pl-s">left-well</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target1</span>"<span class="pl-kos">></span>#target1<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target2</span>"<span class="pl-kos">></span>#target2<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target3</span>"<span class="pl-kos">></span>#target3<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-6</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h4</span><span class="pl-kos">></span>#right-well<span class="pl-kos"></</span><span class="pl-ent">h4</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">well</span>" <span class="pl-c1">id</span>="<span class="pl-s">right-well</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target4</span>"<span class="pl-kos">></span>#target4<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target5</span>"<span class="pl-kos">></span>#target5<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target6</span>"<span class="pl-kos">></span>#target6<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span></pre></div> | <p dir="auto">This will be the central issue for tracking this problem. So far it appears to be effecting tests that look for the <code class="notranslate">style</code> element or that test for specific style elements on <code class="notranslate">body</code>. Please let us know if you see cases that break from this pattern.</p> | 1 |
<ul dir="auto">
<li>Electron version: v1.6.0 beta</li>
<li>Operating system: macOS Sierra 10.12.3</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">The OS "traffic light" buttons are inset.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/121766/22999361/c9c8f98a-f38f-11e6-81d1-7a970b29e733.png"><img src="https://cloud.githubusercontent.com/assets/121766/22999361/c9c8f98a-f38f-11e6-81d1-7a970b29e733.png" alt="screen shot 2017-02-15 at 3 02 29 pm" style="max-width: 100%;"></a></p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">The OS "traffic light" buttons are not inset. It's as if the option <code class="notranslate">'hidden-inset'</code> is interpreted as <code class="notranslate">'hidden'</code>. This is a regression.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/121766/22999363/cd4341c4-f38f-11e6-9b90-7e8034e12a5c.png"><img src="https://cloud.githubusercontent.com/assets/121766/22999363/cd4341c4-f38f-11e6-9b90-7e8034e12a5c.png" alt="screen shot 2017-02-15 at 3 00 46 pm" style="max-width: 100%;"></a></p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Create a browser window with the <code class="notranslate">titleBarStyle</code> option set to <code class="notranslate">'hidden-inset'</code>.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var win = new electron.BrowserWindow({
titleBarStyle: 'hidden-inset'
})"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">win</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-s1">electron</span><span class="pl-kos">.</span><span class="pl-c1">BrowserWindow</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">titleBarStyle</span>: <span class="pl-s">'hidden-inset'</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div> | <ul dir="auto">
<li>Electron version: 1.6.0</li>
<li>Operating system: OS X 10.11.6</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">The title bar should be rendered as it is in previous versions of Electron.</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto"><code class="notranslate">titleBarStyle: "hidden-inset"</code> seems to have the same behavior as <code class="notranslate">titleBarStyle: "hidden"</code>.</p>
<p dir="auto">Screenshots:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/10314059/22677425/08f62a58-ecb8-11e6-8c6b-0e56043e5769.png"><img width="244" alt="electron-1_5_1" src="https://cloud.githubusercontent.com/assets/10314059/22677425/08f62a58-ecb8-11e6-8c6b-0e56043e5769.png" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/10314059/22677426/08f6722e-ecb8-11e6-96be-b2e3af8b1526.png"><img width="246" alt="electron-1_6_0" src="https://cloud.githubusercontent.com/assets/10314059/22677426/08f6722e-ecb8-11e6-96be-b2e3af8b1526.png" style="max-width: 100%;"></a></p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">This seems to happen in any app - even <code class="notranslate">electron-quick-start</code> has the issue when the title bar style is changed.</p> | 1 |
<p dir="auto">logical_and : Compute the truth value of x1 AND x2 element-wise.<br>
logical_or : Compute the truth value of x1 OR x2 `element-wise.</p>
<p dir="auto">So far, good, however, both show this in the Returns section</p>
<p dir="auto">y : ndarray or bool<br>
Boolean result of the logical OR operation applied to the elements of x1 and x2; the shape is determined by broadcasting. This is a scalar if both x1 and x2 are scalars.</p>
<p dir="auto">I am thinking that AND should be with logical_and and OR should be with logical_or</p>
<p dir="auto">np.<strong>version</strong> # '1.17.2'<br>
sys.version # '3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)]' --></p> | <p dir="auto">The documentation for numpy.logical_and() has a minor typo. The 'return' field says</p>
<blockquote>
<p dir="auto">Boolean result of the logical OR operation applied to the elements of x1 and x2...</p>
</blockquote>
<p dir="auto">Whereas it should say</p>
<blockquote>
<p dir="auto">Boolean result of the logical <strong>AND</strong> operation applied to the elements of x1 and x2...</p>
</blockquote>
<p dir="auto">(emphasis mine)</p>
<h3 dir="auto">Numpy/Python version information:</h3>
<p dir="auto"><a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.logical_and.html" rel="nofollow">numpy v1.17 online documentation</a></p> | 1 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 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 class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 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: xxx</li>
<li>Operating System version: xxx</li>
<li>Java version: xxx</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">the following unit test has been failed in windows OS</p>
<p dir="auto">org.apache.dubbo.qos.textui.TKvTest#test1<br>
org.apache.dubbo.qos.textui.TLadderTest#testRendering<br>
org.apache.dubbo.qos.textui.TTableTest#test1<br>
org.apache.dubbo.qos.textui.TTableTest#test2</p>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps?</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</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 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/incubator-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/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.2(test),but there are many different versions inside the company.</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" <dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>2.5.2</version>
<exclusions>
<exclusion>
<artifactId>javassist</artifactId>
<groupId>org.javassist</groupId>
</exclusion>
</exclusions>
</dependency>"><pre class="notranslate"><code class="notranslate"> <dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>2.5.2</version>
<exclusions>
<exclusion>
<artifactId>javassist</artifactId>
<groupId>org.javassist</groupId>
</exclusion>
</exclusions>
</dependency>
</code></pre></div>
<ul dir="auto">
<li>Operating System version: <code class="notranslate">uname -a</code></li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Darwin tes.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64"><pre class="notranslate"><code class="notranslate">Darwin tes.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
</code></pre></div>
<ul dir="auto">
<li>Java version: java -version ,but there are many different versions(1.6,1.7) inside the company.</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)"><pre class="notranslate"><code class="notranslate">java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
</code></pre></div>
<h3 dir="auto">Reason</h3>
<p dir="auto">The low version of dubbo does not provide elegant closure of the dubbo service network, so we are compatible with reflection, but now we don't know the number of consumers.</p>
<p dir="auto">i can get provider bu using reflect,but can't get consumer. Thanks in advance. please<br>
forgive my lame English</p> | 0 |
<p dir="auto">I encountered a missing attribute bug while using matplotlib 1.5.3 on linux. New to the community so apologies if this isn't the right way to raise the issue, I did read the [coding guidelines] (<a href="http://matplotlib.org/devel/coding_guide.html" rel="nofollow">http://matplotlib.org/devel/coding_guide.html</a>) but it was still unclear for small bugfixes what the procedure is.</p>
<p dir="auto">I found I was getting a missing <code class="notranslate">_facecolor2d</code> attribute error in the Patch3D class in mplot3d/art3d.py. It seems like the attribute just wasn't being set so I added it (diff below) and it resolved the problem.</p>
<p dir="auto">There is a FIXME comment related to facecolor2d just below this point in the code, so someone may have had another fix in mind.</p>
<div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="diff --git a/lib/mpl_toolkits/mplot3d/art3d.py b/lib/mpl_toolkits/mplot3d/art3d.py
index 4ecfb32..73daa6e 100644
--- a/lib/mpl_toolkits/mplot3d/art3d.py
+++ b/lib/mpl_toolkits/mplot3d/art3d.py
@@ -266,6 +266,7 @@ class Patch3D(Patch):
self._segment3d = [juggle_axes(x, y, z, zdir) \
for ((x, y), z) in zip(verts, zs)]
self._facecolor3d = Patch.get_facecolor(self)
+ self._facecolor2d = self._facecolor3d
def get_path(self):
return self._path2d"><pre class="notranslate"><span class="pl-c1">diff --git a/lib/mpl_toolkits/mplot3d/art3d.py b/lib/mpl_toolkits/mplot3d/art3d.py</span>
index 4ecfb32..73daa6e 100644
<span class="pl-md">--- a/lib/mpl_toolkits/mplot3d/art3d.py</span>
<span class="pl-mi1">+++ b/lib/mpl_toolkits/mplot3d/art3d.py</span>
<span class="pl-mdr">@@ -266,6 +266,7 @@</span> class Patch3D(Patch):
self._segment3d = [juggle_axes(x, y, z, zdir) \
for ((x, y), z) in zip(verts, zs)]
self._facecolor3d = Patch.get_facecolor(self)
<span class="pl-mi1"><span class="pl-mi1">+</span> self._facecolor2d = self._facecolor3d</span>
def get_path(self):
return self._path2d</pre></div> | <p dir="auto">The following minimal example demonstrates the issue:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np
import matplotlib.tri as mtri
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
y,x = np.ogrid[1:10:100j, 1:10:100j]
z2 = np.cos(x)**3 - np.sin(y)**2
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
r = ax.plot_surface(x,y,z2, cmap='hot')
r.get_facecolors()"><pre class="notranslate"><code class="notranslate">import numpy as np
import matplotlib.tri as mtri
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
y,x = np.ogrid[1:10:100j, 1:10:100j]
z2 = np.cos(x)**3 - np.sin(y)**2
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
r = ax.plot_surface(x,y,z2, cmap='hot')
r.get_facecolors()
</code></pre></div>
<p dir="auto">It fails on the last line with the following traceback:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="AttributeError Traceback (most recent call last)
<ipython-input-13-de0f41d662cd> in <module>()
----> 1 r.get_facecolors()
/home/oliver/.virtualenvs/mpl/local/lib/python2.7/site-packages/mpl_toolkits/mplot3d/art3d.pyc in get_facecolors(self)
634
635 def get_facecolors(self):
--> 636 return self._facecolors2d
637 get_facecolor = get_facecolors
638
AttributeError: 'Poly3DCollection' object has no attribute '_facecolors2d'"><pre class="notranslate"><code class="notranslate">AttributeError Traceback (most recent call last)
<ipython-input-13-de0f41d662cd> in <module>()
----> 1 r.get_facecolors()
/home/oliver/.virtualenvs/mpl/local/lib/python2.7/site-packages/mpl_toolkits/mplot3d/art3d.pyc in get_facecolors(self)
634
635 def get_facecolors(self):
--> 636 return self._facecolors2d
637 get_facecolor = get_facecolors
638
AttributeError: 'Poly3DCollection' object has no attribute '_facecolors2d'
</code></pre></div>
<p dir="auto">Tested with mpl versions 1.3.1 and 1.4.2.</p>
<p dir="auto">Sent here by Benjamin, from the mpl users mailing list (mail with the same title). Sorry for dumping this without more assistance, I'm not yet at a python level where I can help in debugging, I think (well, it seems daunting).</p> | 1 |
<p dir="auto">Issue Type: Bug Report<br>
Ansible Version: ansible 1.7.2<br>
Environment: Arch Linux<br>
Summary: Variable content gets newlines duplicated when pasted into a file via the <code class="notranslate">copy</code> module<br>
Steps To Reproduce:</p>
<ul dir="auto">
<li>Add a step <code class="notranslate">copy: content="{{ ssl_private_key }}" dest=/etc/ssl/private/foo.pem</code> in a playbook</li>
<li>Write the content of <em>ssl_private_key</em> in an ansible-vault vars file</li>
<li>Run the playbook</li>
<li>Check if /etc/ssl/private/foo.pem will have an extra newline for each line in the ssl_private_key variable</li>
</ul>
<p dir="auto">Expected Results: if the variable <em>ssl_private_key</em> is defined like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ssl_private_key: |
-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDHI2RnhLTBOuZ0
MQswCQYDVQQGEwJVUzEQMA4GA1UEChMHU1NMLmNvbTEcMBoGA1UEAxMTU1NMLmNv
ZW50aWFsU1NMIFdpbGRjYXJkMRQwEgYDVQQDFAsqLnJlbGF5ci5pbzCCASIwDQYJ
-----END PRIVATE KEY-----"><pre class="notranslate"><code class="notranslate">ssl_private_key: |
-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDHI2RnhLTBOuZ0
MQswCQYDVQQGEwJVUzEQMA4GA1UEChMHU1NMLmNvbTEcMBoGA1UEAxMTU1NMLmNv
ZW50aWFsU1NMIFdpbGRjYXJkMRQwEgYDVQQDFAsqLnJlbGF5ci5pbzCCASIwDQYJ
-----END PRIVATE KEY-----
</code></pre></div>
<p dir="auto">I expect to have this in /etc/ssl/private/foo.pem:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDHI2RnhLTBOuZ0
MQswCQYDVQQGEwJVUzEQMA4GA1UEChMHU1NMLmNvbTEcMBoGA1UEAxMTU1NMLmNv
ZW50aWFsU1NMIFdpbGRjYXJkMRQwEgYDVQQDFAsqLnJlbGF5ci5pbzCCASIwDQYJ
-----END PRIVATE KEY-----"><pre class="notranslate"><code class="notranslate">-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDHI2RnhLTBOuZ0
MQswCQYDVQQGEwJVUzEQMA4GA1UEChMHU1NMLmNvbTEcMBoGA1UEAxMTU1NMLmNv
ZW50aWFsU1NMIFdpbGRjYXJkMRQwEgYDVQQDFAsqLnJlbGF5ci5pbzCCASIwDQYJ
-----END PRIVATE KEY-----
</code></pre></div>
<p dir="auto">And <strong>this is what I actually get with Ansible 1.7.1 and some previous versions</strong>.</p>
<p dir="auto">Actual Results: But instead, <strong>with Ansible 1.7.2</strong> the result will have duplicated \n:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDHI2RnhLTBOuZ0
MQswCQYDVQQGEwJVUzEQMA4GA1UEChMHU1NMLmNvbTEcMBoGA1UEAxMTU1NMLmNv
ZW50aWFsU1NMIFdpbGRjYXJkMRQwEgYDVQQDFAsqLnJlbGF5ci5pbzCCASIwDQYJ
-----END PRIVATE KEY-----"><pre class="notranslate"><code class="notranslate">-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDHI2RnhLTBOuZ0
MQswCQYDVQQGEwJVUzEQMA4GA1UEChMHU1NMLmNvbTEcMBoGA1UEAxMTU1NMLmNv
ZW50aWFsU1NMIFdpbGRjYXJkMRQwEgYDVQQDFAsqLnJlbGF5ci5pbzCCASIwDQYJ
-----END PRIVATE KEY-----
</code></pre></div> | <p dir="auto">From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/morganchristiansson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/morganchristiansson">@morganchristiansson</a> on 2016-03-03T18:16:26Z</p>
<h5 dir="auto">Issue Type:</h5>
<ul dir="auto">
<li>Documentation Report</li>
</ul>
<h5 dir="auto">Component Name:</h5>
<p dir="auto">ec2</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">Current documentation for wait parameter says:</p>
<blockquote>
<p dir="auto">wait for the instance to be 'running' before returning.</p>
</blockquote>
<p dir="auto">Source: <a href="https://github.com/ansible/ansible-modules-core/blob/devel/cloud/amazon/ec2.py#L105">https://github.com/ansible/ansible-modules-core/blob/devel/cloud/amazon/ec2.py#L105</a></p>
<p dir="auto">The actual code supports waiting for any state. <a href="https://github.com/ansible/ansible-modules-core/blob/devel/cloud/amazon/ec2.py#L1308">https://github.com/ansible/ansible-modules-core/blob/devel/cloud/amazon/ec2.py#L1308</a></p>
<p dir="auto">The actual check is on line 1315</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" if i.state == state:"><pre class="notranslate"> <span class="pl-k">if</span> <span class="pl-s1">i</span>.<span class="pl-s1">state</span> <span class="pl-c1">==</span> <span class="pl-s1">state</span>:</pre></div>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto">Use documentation as reference when trying to stop an instance and wait for it to stop.</p>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">Documentation correctly states that it will wait for instance to be in running or stopped state.</p>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">Documentation states and implies that waiting for stopped state is not supported. Reproduced independently by 2 developers in my team, myself included.</p>
<p dir="auto">Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="138256248" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/3181" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/3181/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/3181">ansible/ansible-modules-core#3181</a></p> | 0 |
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br>
Report a bug</p>
<p dir="auto"><strong>What is the current behavior?</strong><br>
React dev tools don't appear in chrome dev tools</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (<a href="https://jsfiddle.net/Luktwrdm/" rel="nofollow">https://jsfiddle.net/Luktwrdm/</a>) or CodeSandbox (<a href="https://codesandbox.io/s/new" rel="nofollow">https://codesandbox.io/s/new</a>) example below:</strong><br>
Download latest chrome extension and go to <a href="https://reactjs.org" rel="nofollow">https://reactjs.org</a>, open dev tools</p>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
React dev tools tab should appear in chrome</p>
<p dir="auto"><strong>Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?</strong></p>
<p dir="auto">React: N/A</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="▶ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
▶ google-chrome --version
Google Chrome 77.0.3865.75"><pre class="notranslate">▶ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
▶ google-chrome --version
Google Chrome 77.0.3865.75</pre></div>
<p dir="auto">This worked in previous versions of chrome/chrome extension, but I'm not sure when exactly the bug surfaced, since I haven't used it in a while.</p>
<p dir="auto">Thanks in advance for any help, React is awesome :)</p> | <p dir="auto">i was working with it a while ago but now it will only show nothing in the Components tab. I tried everything, reinstalled or even try on a different browser. I even restarted my PC.<br>
![Screenshot from 2019-09-20 14-53-15]</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/41131879/65306178-5dc1f080-dbb7-11e9-85e1-f3c7319ddd59.png"><img src="https://user-images.githubusercontent.com/41131879/65306178-5dc1f080-dbb7-11e9-85e1-f3c7319ddd59.png" alt="Screenshot from 2019-09-20 14-53-15" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">in the latest version of source-to-image we had to bump the docker engine-api to resolve a bug,<br>
see this: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="183039449" data-permission-text="Title is private" data-url="https://github.com/openshift/source-to-image/issues/612" data-hovercard-type="pull_request" data-hovercard-url="/openshift/source-to-image/pull/612/hovercard?comment_id=83702785&comment_type=review_comment" href="https://github.com/openshift/source-to-image/pull/612#discussion_r83702785">openshift/source-to-image#612 (comment)</a><br>
wanted to kick the conversation about bumping it here so we can bump it in origin. i already looked into it and it seems that the docker team also broke API compatibility by removing some fields from the types.go so now, cadvsior needs to be bumped to solve that (and who knows what else). not to mention that they also deprecated the docker engine-api altogether.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mfojtik/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mfojtik">@mfojtik</a> @kargakis what do you guys think?<br>
cc: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bparees/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bparees">@bparees</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/smarterclayton/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/smarterclayton">@smarterclayton</a></p> | <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"><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>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p>
<p dir="auto">v1.3.6</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>:<br>
X86 lenovo PC</li>
<li><strong>OS</strong> (e.g. from /etc/os-release):<br>
[root@node0 ~]# cat /etc/os-release<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>"</li>
</ul>
<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"</p>
<ul dir="auto">
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):<br>
Linux node0 3.10.0-327.el7.x86_64 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35192559" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/1" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/1/hovercard" href="https://github.com/kubernetes/kubernetes/issues/1">#1</a> SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux</li>
</ul>
<p dir="auto"><strong>What happened</strong>:<br>
run the below cmd, error.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export KUBERNETES_PROVIDER=centos
cluster/centos/build.sh all ---- error"><pre class="notranslate"><code class="notranslate">export KUBERNETES_PROVIDER=centos
cluster/centos/build.sh all ---- error
</code></pre></div>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto">Can't download docker binary.</p>
<p dir="auto">I have fix it, and default install the latest kubernetes, docker, flannel, etcd.</p> | 0 |
<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>5.0.2</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>Windows 10 (1903)</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>4.*</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Using <code class="notranslate">baseURLForDataURL</code> option in <code class="notranslate">window.loadURL</code> should open new window using provided base url.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Window doesn't open, throws error to console (screenshot provided).</p>
<h3 dir="auto">To Reproduce</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const win = new remote.BrowserWindow()
win.current.loadURL(
`data:text/html;charset=UTF-8,${encodeURIComponent('<!DOCTYPE html>')}`,
{ baseURLForDataURL: 'http://...' },
)"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">win</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-s1">remote</span><span class="pl-kos">.</span><span class="pl-c1">BrowserWindow</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-s1">win</span><span class="pl-kos">.</span><span class="pl-c1">current</span><span class="pl-kos">.</span><span class="pl-en">loadURL</span><span class="pl-kos">(</span>
<span class="pl-s">`data:text/html;charset=UTF-8,<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-en">encodeURIComponent</span><span class="pl-kos">(</span><span class="pl-s">'<!DOCTYPE html>'</span><span class="pl-kos">)</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span> <span class="pl-c1">baseURLForDataURL</span>: <span class="pl-s">'http://...'</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">)</span></pre></div>
<h3 dir="auto">Screenshots</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/22496946/58470075-9857d700-8149-11e9-9137-97c3e27e9755.png"><img width="721" alt="Screenshot 2019-05-28 13 07 32" src="https://user-images.githubusercontent.com/22496946/58470075-9857d700-8149-11e9-9137-97c3e27e9755.png" style="max-width: 100%;"></a></p>
### Additional Information | <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></li>
<li>7.0.0</li>
<li><strong>Operating System:</strong></li>
<li>Arch Linux</li>
<li><strong>Last Known Working Electron version:</strong></li>
<li>6.0.10</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Opening a <code class="notranslate">webview</code> with a preset source as in:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<webview src="https://github.com"></webview>
<script>
webview.loadURL(
`data:text/html;charset=utf-8;base64,
PGgxPkhBTExPPC9oMT4=
`, { baseURLForDataURL: `file://home/` })
// the base64 string is just <h1>HALLO</h1>
</script>"><pre class="notranslate"><code class="notranslate"><webview src="https://github.com"></webview>
<script>
webview.loadURL(
`data:text/html;charset=utf-8;base64,
PGgxPkhBTExPPC9oMT4=
`, { baseURLForDataURL: `file://home/` })
// the base64 string is just <h1>HALLO</h1>
</script>
</code></pre></div>
<p dir="auto">loads the github URL and then reloads the webview with <code class="notranslate">HALLO</code>.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Electron crashes</p>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">See this repo:<br>
<a href="https://github.com/burningTyger/webview-bug">https://github.com/burningTyger/webview-bug</a></p>
<h3 dir="auto">Screenshots</h3>
<h3 dir="auto">Additional Information</h3> | 0 |
<p dir="auto"><strong>Migrated issue, originally created by Konsta Vesterinen (<a href="https://github.com/kvesteri">@kvesteri</a>)</strong></p>
<p dir="auto">The following code illustrates this problem:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import sqlalchemy as sa
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
engine = sa.create_engine(
'postgres://postgres@localhost/test'
)
engine.echo = True
Base = declarative_base()
Session = sessionmaker(bind=engine)
session = Session()
class Question(Base):
__tablename__ = 'question'
id = sa.Column(sa.Integer, primary_key=True)
weight = sa.Column(sa.Integer, default=1)
Base.metadata.create_all(bind=session.bind)
q = Question(weight=None)
session.add(q)
session.commit()
assert q.weight is None"><pre class="notranslate"><code class="notranslate">import sqlalchemy as sa
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
engine = sa.create_engine(
'postgres://postgres@localhost/test'
)
engine.echo = True
Base = declarative_base()
Session = sessionmaker(bind=engine)
session = Session()
class Question(Base):
__tablename__ = 'question'
id = sa.Column(sa.Integer, primary_key=True)
weight = sa.Column(sa.Integer, default=1)
Base.metadata.create_all(bind=session.bind)
q = Question(weight=None)
session.add(q)
session.commit()
assert q.weight is None
</code></pre></div>
<p dir="auto">The problem also exists by changing the <code class="notranslate">default=1</code> to <code class="notranslate">server_default='1'</code>. Also in this case the explicit weight=NULL is not added to INSERT statement.</p> | <p dir="auto"><strong>Migrated issue, originally created by Oleg Pidsadnyi (<a href="https://github.com/olegp">@olegp</a>)</strong></p>
<p dir="auto">Mike, I've encountered a behavior that is a bit unexpected:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class Model(Base):
a = Column(Integer, nullable=True, default=1)
m = Model()
m.a = None
session.add(m)
In: print m.a
Out: None
session.commit()
In: print m.a
Out: 1
"><pre class="notranslate"><code class="notranslate">class Model(Base):
a = Column(Integer, nullable=True, default=1)
m = Model()
m.a = None
session.add(m)
In: print m.a
Out: None
session.commit()
In: print m.a
Out: 1
</code></pre></div>
<p dir="auto">None is expected :(</p>
<p dir="auto">I understand that the configuration is silly, but this is the existing code. Setting None to the column doesn't cancel the default and the default thinks that the column wasn't set, so it uses the default value in the end.</p> | 1 |
<p dir="auto"><strong>Context:</strong></p>
<ul dir="auto">
<li>Playwright Version: [what Playwright version do you use?] - 1.19.0</li>
<li>Operating System: [e.g. Windows, Linux or Mac] - Mac</li>
<li>Node.js version: [e.g. 12.22, 14.6] - 12.22.0</li>
<li>Browser: [e.g. All, Chromium, Firefox, WebKit] - Chromium</li>
<li>Extra: [any specific details about your environment] - It runs fine locally</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const { test } = require('@playwright/test');
const { SimResults } = require('../selectors/simulationResults');
const playwright = require('playwright');
test.describe('Output Edit', () => {
test('Simulations page', async ({ page }) => {
for (const browserType of ['chromium', 'firefox', 'webkit']) {
const browser = await playwright['chromium'].launch();
const context = await browser.newContext();
const page = await context.newPage();
await page.goto('https://www.google.com');
await page.click(SimResults.SimResultPage.simPage(2));
}
});
});"><pre class="notranslate"><code class="notranslate">const { test } = require('@playwright/test');
const { SimResults } = require('../selectors/simulationResults');
const playwright = require('playwright');
test.describe('Output Edit', () => {
test('Simulations page', async ({ page }) => {
for (const browserType of ['chromium', 'firefox', 'webkit']) {
const browser = await playwright['chromium'].launch();
const context = await browser.newContext();
const page = await context.newPage();
await page.goto('https://www.google.com');
await page.click(SimResults.SimResultPage.simPage(2));
}
});
});
</code></pre></div>
<p dir="auto"><strong>Describe the bug</strong><br>
I have <code class="notranslate">playwright_download_host=https://.../repository/playwright-raw-proxy</code> in <code class="notranslate">.npmrc</code> file and downloading is working fine.</p>
<p dir="auto">Jenkins error</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="14:44:58 + npm run test
14:44:59
14:44:59 > [email protected] test-galileo-chrome /jenkins/workspace/home-automation_main
14:44:59
14:45:00
14:45:00 Running 1 test using 1 worker
14:45:00
14:45:07 ��� [chromium] ��� src/ui/specs/simulationPage.spec.js:6:3 ��� Output Edit ��� Simulations page (215ms)
14:45:10
14:45:10
14:45:10 1) [chromium] ��� src/ui/specs/simulationPage.spec.js:6:3 ��� Output Edit ��� Simulations page =
14:45:10
14:45:10 browserType.launch:
14:45:10 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
14:45:10 ��� Host system is missing a few dependencies to run browsers. ���
14:45:10 ��� Please install them with the following command: ���
14:45:10 ��� ���
14:45:10 ��� sudo npx playwright install-deps ���
14:45:10 ��� ���
14:45:10 ��� <3 Playwright Team ��
'''"><pre class="notranslate"><code class="notranslate">14:44:58 + npm run test
14:44:59
14:44:59 > [email protected] test-galileo-chrome /jenkins/workspace/home-automation_main
14:44:59
14:45:00
14:45:00 Running 1 test using 1 worker
14:45:00
14:45:07 ��� [chromium] ��� src/ui/specs/simulationPage.spec.js:6:3 ��� Output Edit ��� Simulations page (215ms)
14:45:10
14:45:10
14:45:10 1) [chromium] ��� src/ui/specs/simulationPage.spec.js:6:3 ��� Output Edit ��� Simulations page =
14:45:10
14:45:10 browserType.launch:
14:45:10 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
14:45:10 ��� Host system is missing a few dependencies to run browsers. ���
14:45:10 ��� Please install them with the following command: ���
14:45:10 ��� ���
14:45:10 ��� sudo npx playwright install-deps ���
14:45:10 ��� ���
14:45:10 ��� <3 Playwright Team ��
'''
</code></pre></div> | <p dir="auto">I bumped playwright to 1.19 and updated docker image to point to 1.19<br>
FF started failing with message</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="jenkins.lab.xxx.org/blue/organizations/jenkins/builds%2FOneAgent%2Fxxx/detail/RUM-611-bump-playwright/1/pipeline/#step-241-log-1660)browserType.launch:
[2022-02-14T10:38:06.279Z] ╔════════════════════════════════════════════════════════════╗
[2022-02-14T10:38:06.279Z] ║ Host system is missing a few dependencies to run browsers. ║
[2022-02-14T10:38:06.279Z] ║ Please install them with the following command: ║
[2022-02-14T10:38:06.279Z] ║ ║
[2022-02-14T10:38:06.279Z] ║ sudo npx playwright install-deps ║
[2022-02-14T10:38:06.279Z] ║ ║
[2022-02-14T10:38:06.279Z] ║ <3 Playwright Team"><pre class="notranslate"><code class="notranslate">jenkins.lab.xxx.org/blue/organizations/jenkins/builds%2FOneAgent%2Fxxx/detail/RUM-611-bump-playwright/1/pipeline/#step-241-log-1660)browserType.launch:
[2022-02-14T10:38:06.279Z] ╔════════════════════════════════════════════════════════════╗
[2022-02-14T10:38:06.279Z] ║ Host system is missing a few dependencies to run browsers. ║
[2022-02-14T10:38:06.279Z] ║ Please install them with the following command: ║
[2022-02-14T10:38:06.279Z] ║ ║
[2022-02-14T10:38:06.279Z] ║ sudo npx playwright install-deps ║
[2022-02-14T10:38:06.279Z] ║ ║
[2022-02-14T10:38:06.279Z] ║ <3 Playwright Team
</code></pre></div>
<p dir="auto">chromium and webkit work fine<br>
Is there some upgrade step that I should have done or?<br>
It works fine again if I go back to 1.18.1 for both npm dep and playwright image</p> | 1 |
<p dir="auto">It would be great to have following features at APIRequest</p>
<ol dir="auto">
<li>generics for APIRequestContext methods and for APIResponse, like <code class="notranslate">APIRequestContext.get<T>(url, options): Promise<APIResponse<T>></code> since it's often much more convenient than using assert or casting <code class="notranslate">any</code> to desired type manually</li>
<li>ability to set default value for <code class="notranslate">failOnStatusCode</code> globally, in beforeEach block or per context instance, since it's often to be used with .json() in order to get JS response body, and json conversion would often get xml error and throw error trying to parse it with not informative message like <code class="notranslate">SyntaxError: Unexpected token < in JSON at position 0</code> instead of actuial API error description</li>
<li>introduce APIRequestContext methods overloads. It's quite often for testing we don't care about post response except it successful, but when we do we often want to get response body, and it's not quite convenient additionally <code class="notranslate">await APIResponse.json()</code>. So it might be useful to be able to define what kind of response do we want to get. For example, Angular httpClient uses options.observe property for this purpose <a href="https://github.com/angular/angular/blob/master/packages/common/http/src/client.ts#L1209">https://github.com/angular/angular/blob/master/packages/common/http/src/client.ts#L1209</a></li>
</ol>
<p dir="auto">sorry if some feature requests duplicate, originally I was looking only for failOnStatusCode, but got a little carried away 🙂</p> | <h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: v1.33</li>
<li>Operating System: Docker container</li>
<li>Browser: [All, Chromium, Firefox, WebKit]</li>
<li>Other info:<br>
an error "SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_get_passwd returned ENOENT (no such file or directory)" that could occur when there is no /etc/passwd entry for the current user, such as in some Docker and GitHub Action setups.</li>
</ul>
<p dir="auto">the issue is introduced by the PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1644832988" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright/issues/22046" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/playwright/pull/22046/hovercard" href="https://github.com/microsoft/playwright/pull/22046">#22046</a>.<br>
Cypress had same issue before, they had a fix <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="953303563" data-permission-text="Title is private" data-url="https://github.com/cypress-io/cypress/issues/17488" data-hovercard-type="pull_request" data-hovercard-url="/cypress-io/cypress/pull/17488/hovercard" href="https://github.com/cypress-io/cypress/pull/17488">cypress-io/cypress#17488</a>.</p>
<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"><strong>Link to the GitHub repository with the repro</strong></p>
<p dir="auto"><a href="https://github.com/pei-wang/playwright-issue-reproduce">https://github.com/pei-wang/playwright-issue-reproduce</a></p>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>[Run the test]</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">run tests successfully</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7090689/235289626-27097b21-e089-48e6-933b-fe3e5523bd4d.png"><img width="1541" alt="CleanShot 2023-04-29 at 19 23 30@2x" src="https://user-images.githubusercontent.com/7090689/235289626-27097b21-e089-48e6-933b-fe3e5523bd4d.png" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto">亮哥,我也知道目前支持批量插入了,但是我执行批量插入仍然报错是为什么</p>
<h3 dir="auto">SQL: INSERT INTO hs_testerabc(ids,version) VALUES (?, ?) , (?, ?) , (?, ?) ;</h3>
<h3 dir="auto">Cause: io.shardingjdbc.core.exception.ShardingJdbcException: Invoke jdbc method exception</h3>
<p dir="auto">。。。。<br>
Caused by: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).<br>
。。。。。</p> | <p dir="auto">报错为:<br>
Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to org.apache.shardingsphere.infra.yaml.config.pojo.YamlRuleConfiguration<br>
at org.apache.shardingsphere.infra.yaml.config.swapper.YamlRuleConfigurationSwapperEngine$$Lambda$16/557023567.apply(Unknown Source)<br>
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)<br>
at java.util.Iterator.forEachRemaining(Iterator.java:116)<br>
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)<br>
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)<br>
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)<br>
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)<br>
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)<br>
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)<br>
at org.apache.shardingsphere.infra.yaml.config.swapper.YamlRuleConfigurationSwapperEngine.swapToRuleConfigurations(YamlRuleConfigurationSwapperEngine.java:59)<br>
at org.apache.shardingsphere.proxy.backend.config.yaml.swapper.YamlProxyConfigurationSwapper.swapDatabaseConfigurations(YamlProxyConfigurationSwapper.java:63)<br>
at org.apache.shardingsphere.proxy.backend.config.yaml.swapper.YamlProxyConfigurationSwapper.swap(YamlProxyConfigurationSwapper.java:52)<br>
at org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.createContextManager(BootstrapInitializer.java:62)<br>
at org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.init(BootstrapInitializer.java:55)<br>
at org.apache.shardingsphere.proxy.Bootstrap.main(Bootstrap.java:50)</p>
<p dir="auto">配置文件server.xml:<br>
rules:</p>
<ul dir="auto">
<li>!AUTHORITY<br>
users:
<ul dir="auto">
<li>root@%:root</li>
<li>sharding@:sharding<br>
provider:<br>
type: ALL_PERMITTED</li>
</ul>
</li>
</ul>
<h1 dir="auto">- !TRANSACTION</h1>
<h1 dir="auto">defaultType: XA</h1>
<h1 dir="auto">providerType: Atomikos</h1>
<h1 dir="auto"># When the provider type is Narayana, the following properties can be configured or not</h1>
<h1 dir="auto">props:</h1>
<h1 dir="auto">recoveryStoreUrl: jdbc:mysql://127.0.0.1:3306/jbossts</h1>
<h1 dir="auto">recoveryStoreDataSource: com.mysql.jdbc.jdbc2.optional.MysqlDataSource</h1>
<h1 dir="auto">recoveryStoreUser: root</h1>
<h1 dir="auto">recoveryStorePassword: 12345678</h1>
<h1 dir="auto">- !SQL_PARSER</h1>
<h1 dir="auto">sqlCommentParseEnabled: true</h1>
<h1 dir="auto">sqlStatementCache:</h1>
<h1 dir="auto">initialCapacity: 2000</h1>
<h1 dir="auto">maximumSize: 65535</h1>
<h1 dir="auto">parseTreeCache:</h1>
<h1 dir="auto">initialCapacity: 128</h1>
<h1 dir="auto">maximumSize: 1024</h1>
<p dir="auto">props:<br>
max-connections-size-per-query: 1<br>
kernel-executor-size: 16 # Infinite by default.<br>
proxy-frontend-flush-threshold: 128 # The default value is 128.<br>
proxy-hint-enabled: false<br>
sql-show: true<br>
sql-simple: true<br>
check-table-metadata-enabled: false<br>
show-process-list-enabled: false<br>
# Proxy backend query fetch size. A larger value may increase the memory usage of ShardingSphere Proxy.<br>
# The default value is -1, which means set the minimum value for different JDBC drivers.<br>
proxy-backend-query-fetch-size: -1<br>
check-duplicate-table-enabled: false<br>
proxy-frontend-executor-size: 0 # Proxy frontend executor size. The default value is 0, which means let Netty decide.<br>
# Available options of proxy backend executor suitable: OLAP(default), OLTP. The OLTP option may reduce time cost of writing packets to client, but it may increase the latency of SQL execution<br>
# and block other clients if client connections are more than <code class="notranslate">proxy-frontend-executor-size</code>, especially executing slow SQL.<br>
proxy-backend-executor-suitable: OLAP<br>
proxy-frontend-max-connections: 0 # Less than or equal to 0 means no limitation.<br>
sql-federation-enabled: false<br>
# Available proxy backend driver type: JDBC (default), ExperimentalVertx<br>
proxy-backend-driver-type: JDBC<br>
proxy-mysql-default-version: 5.7.22 # In the absence of schema name, the default version will be used.<br>
proxy-default-port: 3307 # Proxy default port.<br>
proxy-netty-backlog: 1024 # Proxy netty backlog.</p>
<p dir="auto">配置文件config-sharding.xml:<br>
databaseName: decard_pay_dev</p>
<p dir="auto">dataSources:<br>
ds0:<br>
url: jdbc:mysql://127.0.0.1:3306/decard_pay_dev?serverTimezone=UTC&useSSL=false<br>
username: root<br>
password: root<br>
connectionTimeoutMilliseconds: 30000<br>
idleTimeoutMilliseconds: 60000<br>
maxLifetimeMilliseconds: 1800000<br>
maxPoolSize: 50</p>
<p dir="auto">rules:<br>
sharding:<br>
tables:<br>
dp_trade_payment_order:<br>
# 配置数据节点<br>
actual-data-nodes: ds0.dp_trade_payment_order_$->{2020..2025}<em>0$->{1..4}<br>
# 分表策略<br>
table-strategy:<br>
complex:<br>
sharding-columns: platform_order_no,order_time,pay_success_time<br>
sharding-algorithm-name: order-algorithm<br>
dp_trade_payment_record:<br>
# 配置数据节点<br>
actual-data-nodes: ds0.dp_trade_payment_record</em><math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="86aa0a4703ba02cec16715f49ee7ae58">$-&gt;{2020..2025}_0$</math-renderer>->{1..4}<br>
# 分表策略<br>
table-strategy:<br>
complex:<br>
sharding-columns: platform_order_no,pay_success_time<br>
sharding-algorithm-name: order-algorithm<br>
sharding-algorithms:<br>
order-algorithm:<br>
type: CLASS_BASED<br>
props:<br>
strategy: COMPLEX<br>
algorithmClassName: com.decard.sharding.config.OrderComplexKeysShardingAlgorithm<br>
binding-tables: dp_trade_payment_order,dp_trade_payment_record</p> | 0 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=codevally" rel="nofollow">Roshan</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9095?redirect=false" rel="nofollow">SPR-9095</a></strong> and commented</p>
<p dir="auto">We are using the above spring version in our web application and it is runs on 3 node jboss 5.1.1 cluster with enabling session replication. But when accessing our functionality, we are getting java.io.NotSerializableException: javax.annotation.PostConstruct exception at the time of replicating session over jboss nodes.</p>
<p dir="auto">Found the <a href="https://jira.springsource.org/browse/SPR-5331" rel="nofollow">https://jira.springsource.org/browse/SPR-5331</a> issue and it address the same issue but we cannot see any solution given.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0.5</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="398092176" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10004" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10004/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10004">#10004</a> DestructionCallbackBindingListener is Serializable but contains potential non-serializable state</li>
</ul> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=olaf" rel="nofollow">Olaf Otto</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-5331?redirect=false" rel="nofollow">SPR-5331</a></strong> and commented</p>
<p dir="auto">The static inner class DestructionCallbackBindingListener of ServletRequestAttributes implements Serializable but has a potential non-serializable state (a Runnable reference). This may lead to unwanted serialization attempts of the runnable objects.</p>
<p dir="auto">I believe this might actually not be a bug but a desired behaviour, since DestructionCallbackBindingListener is supposed to survive graceful web-app restarts. If so, this fact should probably be documented or serializability should be enforced by other means.</p>
<p dir="auto">org.springframework.web.context.request.ServletRequestAttributes#registerDestructionCallback(String name, Runnable callback, int scope) lacks API documentation so far.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.5, 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="398117087" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13733" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13733/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13733">#13733</a> DestructionCallbackBindingListener is Serializable but contains non-serializable Runnable reference</li>
</ul> | 1 |
<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p>
<h1 dir="auto">SQL SCRIPT:</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="create table languages (
id serial not null,
iso_code char(2) not null,
language varchar(100) not null,
constraint pk_language
primary key(id)
);
create table invasives (
id serial not null,
foobar varchar(50),
constraint pk_invasive
primary key (id)
);
create table invasive_names (
invasive_id integer not null,
language_id integer not null,
name varchar(100) not null,
constraint pk_invasive_names
primary key(invasive_id, language_id)
);
insert into languages values (1, 'fr', 'French');
insert into languages values (2, 'de', 'German');
insert into languages values (3, 'en', 'English');
insert into invasives values (1, 'species 1');
insert into invasives values (2, 'species 2');
insert into invasives values (3, 'species 3');
insert into invasive_names values (1, 1, 'species 1 french');
insert into invasive_names values (1, 3, 'species 1 english');
insert into invasive_names values (3, 2, 'species 1 german');
insert into invasive_names values (3, 3, 'species 1 english');
#!python
from sqlalchemy import *
session = create_session()
db_engine = create_engine("postgres://mage:[email protected]:5432/alch")
meta = BoundMetaData(db_engine)
table_languages = Table('languages', meta,
Column('id', Integer, primary_key=True),
Column('iso_code', String(2)),
Column('language', String(100)))
table_invasives = Table('invasives', meta,
Column('id', Integer, primary_key=True),
Column('foobar', String(50)))
table_invasive_names = Table('invasive_names', meta,
Column('invasive_id', Integer, ForeignKey('invasives.id'), primary_key=True, nullable=False),
Column('language_id', Integer, ForeignKey('languages.id'), primary_key=True, nullable=False),
Column('name', String(50), nullable=False))
class Language(object):
pass
class Invasive(object):
pass
class InvasiveName(object):
pass
mapper(InvasiveName, table_invasive_names)
mapper(Language, table_languages, properties = {
'names' : relation(InvasiveName, backref='language', cascade='all, delete-orphan')
}
)
mapper(Invasive, table_invasives, properties = {
'names' : relation(InvasiveName, backref='invasive', cascade='all, delete-orphan')
}
)
query_invasive_name = session.query(InvasiveName)
query_invasive = session.query(Invasive)
query_language = session.query(Language)
species = query_invasive.get(3)
lang_english = query_language.get_by_iso_code('en')
new_name = InvasiveName()
new_name.name='species 3 english NEW NAME'
new_name.language=lang_english
session.save(new_name)
species.names = []
species.names.append(new_name)
session.flush()"><pre class="notranslate"><code class="notranslate">create table languages (
id serial not null,
iso_code char(2) not null,
language varchar(100) not null,
constraint pk_language
primary key(id)
);
create table invasives (
id serial not null,
foobar varchar(50),
constraint pk_invasive
primary key (id)
);
create table invasive_names (
invasive_id integer not null,
language_id integer not null,
name varchar(100) not null,
constraint pk_invasive_names
primary key(invasive_id, language_id)
);
insert into languages values (1, 'fr', 'French');
insert into languages values (2, 'de', 'German');
insert into languages values (3, 'en', 'English');
insert into invasives values (1, 'species 1');
insert into invasives values (2, 'species 2');
insert into invasives values (3, 'species 3');
insert into invasive_names values (1, 1, 'species 1 french');
insert into invasive_names values (1, 3, 'species 1 english');
insert into invasive_names values (3, 2, 'species 1 german');
insert into invasive_names values (3, 3, 'species 1 english');
#!python
from sqlalchemy import *
session = create_session()
db_engine = create_engine("postgres://mage:[email protected]:5432/alch")
meta = BoundMetaData(db_engine)
table_languages = Table('languages', meta,
Column('id', Integer, primary_key=True),
Column('iso_code', String(2)),
Column('language', String(100)))
table_invasives = Table('invasives', meta,
Column('id', Integer, primary_key=True),
Column('foobar', String(50)))
table_invasive_names = Table('invasive_names', meta,
Column('invasive_id', Integer, ForeignKey('invasives.id'), primary_key=True, nullable=False),
Column('language_id', Integer, ForeignKey('languages.id'), primary_key=True, nullable=False),
Column('name', String(50), nullable=False))
class Language(object):
pass
class Invasive(object):
pass
class InvasiveName(object):
pass
mapper(InvasiveName, table_invasive_names)
mapper(Language, table_languages, properties = {
'names' : relation(InvasiveName, backref='language', cascade='all, delete-orphan')
}
)
mapper(Invasive, table_invasives, properties = {
'names' : relation(InvasiveName, backref='invasive', cascade='all, delete-orphan')
}
)
query_invasive_name = session.query(InvasiveName)
query_invasive = session.query(Invasive)
query_language = session.query(Language)
species = query_invasive.get(3)
lang_english = query_language.get_by_iso_code('en')
new_name = InvasiveName()
new_name.name='species 3 english NEW NAME'
new_name.language=lang_english
session.save(new_name)
species.names = []
species.names.append(new_name)
session.flush()
</code></pre></div>
<p dir="auto">This script results in :<br>
sqlalchemy.exceptions.SQLError: (IntegrityError) ERROR: duplicate key violates unique constraint "pk_invasive_names"</p>
<p dir="auto">INSERT INTO invasive_names (invasive_id, language_id, name) VALUES (3, 3, 'species 3 english NEW NAME') 'INSERT INTO invasive_names (invasive_id, language_id, name) VALUES (%(invasive_id)s, %(language_id)s, %(name)s)' {'invasive_id': 3, 'language_id': 3, 'name': 'species 3 english NEW NAME'}</p>
<hr>
<p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/258/db.sql">db.sql</a> | <a href="../wiki/imported_issue_attachments/258/manytomany.py">manytomany.py</a></p> | <p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p>
<p dir="auto">as described at <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="193060614" data-permission-text="Title is private" data-url="https://github.com/psycopg/psycopg2/issues/491" data-hovercard-type="issue" data-hovercard-url="/psycopg/psycopg2/issues/491/hovercard?comment_id=276551038&comment_type=issue_comment" href="https://github.com/psycopg/psycopg2/issues/491#issuecomment-276551038">psycopg/psycopg2#491 (comment)</a> we really need a hook to use psycopg2 batch mode so lets get that in.</p> | 0 |
<p dir="auto"><em>(I am able to reproduce this in safe mode in latest Atom 0.175.0)</em></p>
<p dir="auto">Not always, but quiet often, I have partial selection left behind when I select a portion of code on one line and then start typing hoping to replace the selected chars. When I type my first char, this causes selection jump to the characters on the right and they get deleted when I type the second char. For example, I have this <code class="notranslate">test.js</code> file:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" var where = _.pick({
classified_id: query.classId,
section_id: query.secId,
category_id: query.catId
}, function(val, key) {
console.log(' **** val:', val);
console.log(' **** key:', key);
return !_.isUndefined(val);
});"><pre class="notranslate"> <span class="pl-k">var</span> <span class="pl-s1">where</span> <span class="pl-c1">=</span> <span class="pl-s1">_</span><span class="pl-kos">.</span><span class="pl-en">pick</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">classified_id</span>: <span class="pl-s1">query</span><span class="pl-kos">.</span><span class="pl-c1">classId</span><span class="pl-kos">,</span>
<span class="pl-c1">section_id</span>: <span class="pl-s1">query</span><span class="pl-kos">.</span><span class="pl-c1">secId</span><span class="pl-kos">,</span>
<span class="pl-c1">category_id</span>: <span class="pl-s1">query</span><span class="pl-kos">.</span><span class="pl-c1">catId</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">val</span><span class="pl-kos">,</span> <span class="pl-s1">key</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">' **** val:'</span><span class="pl-kos">,</span> <span class="pl-s1">val</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">' **** key:'</span><span class="pl-kos">,</span> <span class="pl-s1">key</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">return</span> <span class="pl-c1">!</span><span class="pl-s1">_</span><span class="pl-kos">.</span><span class="pl-en">isUndefined</span><span class="pl-kos">(</span><span class="pl-s1">val</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">To replicate:</p>
<ol dir="auto">
<li>Select a portion of code on any line with a mouse or a touchpad. Release the mouse button.</li>
<li>Switch to keyboard and press the space bar</li>
<li>You should see that the selected chars were deleted, but some of the chars on the right are selected now too.</li>
<li>Press space bar again, and those extra selected chars get deleted</li>
<li>Do steps 1 and 2 a few times if you can't replicate it on first time.</li>
</ol>
<p dir="auto">This is a real pain since I always have to do <code class="notranslate">Command + Z</code> to undo these side effects. Sometimes, I don't notice it and my code no longer runs.</p> | <p dir="auto">When I select some text and then paste something instead of it, sometimes I get random piece of the pasted text being selected. Look at the screencast:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7574192/5847084/71d1d11a-a1da-11e4-93f3-d76f59c67e5c.gif"><img src="https://cloud.githubusercontent.com/assets/7574192/5847084/71d1d11a-a1da-11e4-93f3-d76f59c67e5c.gif" alt="atom_paste_instead_selection" data-animated-image="" style="max-width: 100%;"></a><br>
Here I'm selecting pieces of text and pasting some other text. In one of three times it results in a part of the pasted text being selected.</p>
<p dir="auto">It leads to some inconvenience in my work. After I replace selected text with text from the clipboard, I should check whether something is selected before I type anything (because the text I'm typing will replace the selection).</p>
<p dir="auto">The same when I start typing while some text is selected. The typed symbol replaces the selection, but sometimes it becomes selected itself. So when I type the second symbol, it replaces the first one.</p>
<p dir="auto">The behaviour which I observe in other text editors is: replace selected text with pasted/typed one, deselect anything, place the cursor after the pasted text. This is the most convenient option, I guess.</p>
<p dir="auto">My Atom version is 0.175.0 (and I've observed it in all previous versions), my system - OS X 10.9.5.</p> | 1 |
<p dir="auto"><strong>IMPORTANT</strong>: This repository's issues are reserved for feature requests and bug reports. Do not submit support requests here, see <a href="https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question">https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question</a>.</p>
<p dir="auto"><strong>Steps to reproduce and a minimal demo of the problem</strong><br>
we are using beta 14 with babel compile. when we navigate from one path to a second path the component lifecycle is not being called. if anything happens on the compoent then the ngOnInit will be called.</p>
<p dir="auto">code pased below.</p>
<p dir="auto"><em>What steps should we try in your demo to see the problem?</em></p>
<p dir="auto"><strong>Current behavior</strong><br>
click on the task links, the routerOnActivate will be called but the ngOnInit will not be called. when we click on the back button then the ngOnInit will be called.</p>
<p dir="auto"><strong>Expected/desired behavior</strong><br>
ngOnInit should be called when we navigate to the component.</p>
<p dir="auto"><strong>Other information</strong><br>
main.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import 'angular2-polyfills';
import 'reflect-metadata';
import 'babel-polyfill';
import {bootstrap} from 'angular2/platform/browser';
import {routeTestComponent} from './app.component';
import {ROUTER_PROVIDERS} from 'angular2/router';
bootstrap(routeTestComponent, [ROUTER_PROVIDERS]);"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s">'angular2-polyfills'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-s">'reflect-metadata'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-s">'babel-polyfill'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-s1">bootstrap</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'angular2/platform/browser'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-s1">routeTestComponent</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./app.component'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-c1">ROUTER_PROVIDERS</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'angular2/router'</span><span class="pl-kos">;</span>
<span class="pl-en">bootstrap</span><span class="pl-kos">(</span><span class="pl-s1">routeTestComponent</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-c1">ROUTER_PROVIDERS</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">app.component.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {Component} from 'angular2/core';
import {ROUTER_DIRECTIVES,RouteConfig} from 'angular2/router';
import {Dashboard} from './components/dashboard/dashboard.component';
import {About} from './components/about/about.component';
import {Tasks} from './components/tasks/tasks.component';
@Component({
selector: 'route-test',
template: `
<h1>App</h1>
<a [routerLink]="['/Dashboard']" class="link">Dashboard</a>
<a [routerLink]="['/About']" class="link">About</a>
<a [routerLink]="['/Tasks']" class="link">Tasks</a>
<router-outlet></router-outlet>
`,
directives: [ROUTER_DIRECTIVES]
})
@RouteConfig([
{path: '/', component: Dashboard, name: 'Dashboard'},
{path: '/about', component: About, name: 'About'},
{path: '/tasks/...', component: Tasks, name: 'Tasks'}
])
export class routeTestComponent { }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-v">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-k">import</span> <span class="pl-kos">{</span><span class="pl-c1">ROUTER_DIRECTIVES</span><span class="pl-kos">,</span><span class="pl-v">RouteConfig</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'angular2/router'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-v">Dashboard</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./components/dashboard/dashboard.component'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-v">About</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./components/about/about.component'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-v">Tasks</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./components/tasks/tasks.component'</span><span class="pl-kos">;</span>
@<span class="pl-v">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">selector</span>: <span class="pl-s">'route-test'</span><span class="pl-kos">,</span>
<span class="pl-c1">template</span>: <span class="pl-s">`</span>
<span class="pl-s"> <h1>App</h1></span>
<span class="pl-s"> <a [routerLink]="['/Dashboard']" class="link">Dashboard</a></span>
<span class="pl-s"> <a [routerLink]="['/About']" class="link">About</a></span>
<span class="pl-s"> <a [routerLink]="['/Tasks']" class="link">Tasks</a></span>
<span class="pl-s"> <router-outlet></router-outlet></span>
<span class="pl-s"> `</span><span class="pl-kos">,</span>
<span class="pl-c1">directives</span>: <span class="pl-kos">[</span><span class="pl-c1">ROUTER_DIRECTIVES</span><span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
@<span class="pl-v">RouteConfig</span><span class="pl-kos">(</span><span class="pl-kos">[</span>
<span class="pl-kos">{</span><span class="pl-c1">path</span>: <span class="pl-s">'/'</span><span class="pl-kos">,</span> <span class="pl-c1">component</span>: <span class="pl-v">Dashboard</span><span class="pl-kos">,</span> <span class="pl-c1">name</span>: <span class="pl-s">'Dashboard'</span><span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span><span class="pl-c1">path</span>: <span class="pl-s">'/about'</span><span class="pl-kos">,</span> <span class="pl-c1">component</span>: <span class="pl-v">About</span><span class="pl-kos">,</span> <span class="pl-c1">name</span>: <span class="pl-s">'About'</span><span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span><span class="pl-c1">path</span>: <span class="pl-s">'/tasks/...'</span><span class="pl-kos">,</span> <span class="pl-c1">component</span>: <span class="pl-v">Tasks</span><span class="pl-kos">,</span> <span class="pl-c1">name</span>: <span class="pl-s">'Tasks'</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">class</span> <span class="pl-s1">routeTestComponent</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span></pre></div>
<p dir="auto">components/dashboard</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {Component} from 'angular2/core';
@Component({
selector: 'dashboard',
template: '<h1>Dashboard App</h1>',
directives: [],
inputs:[],
outputs:[],
pipes:[]
})
export class Dashboard { }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-v">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-v">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">selector</span>: <span class="pl-s">'dashboard'</span><span class="pl-kos">,</span>
<span class="pl-c1">template</span>: <span class="pl-s">'<h1>Dashboard App</h1>'</span><span class="pl-kos">,</span>
<span class="pl-c1">directives</span>: <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">inputs</span>:<span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">outputs</span>:<span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">pipes</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">export</span> <span class="pl-k">class</span> <span class="pl-v">Dashboard</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span></pre></div>
<p dir="auto">components/about</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {Component} from 'angular2/core';
import {Router} from 'angular2/router';
@Component({
selector: 'about',
template: `
<h2>About</h2>
<button (click)="goBack()">Go Back</button>
`,
directives: [],
inputs:[],
outputs:[],
pipes:[]
})
export class About {
from;
constructor(route:Router){
this.router = route;
}
routerOnActivate(to, from) {
this.from = from;
console.log('About: ', to, from);
}
goBack() {
console.log(this.from);
this.router.navigateByInstruction(this.from);
}
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-v">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-k">import</span> <span class="pl-kos">{</span><span class="pl-v">Router</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'angular2/router'</span><span class="pl-kos">;</span>
@<span class="pl-v">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">selector</span>: <span class="pl-s">'about'</span><span class="pl-kos">,</span>
<span class="pl-c1">template</span>: <span class="pl-s">`</span>
<span class="pl-s"> <h2>About</h2></span>
<span class="pl-s"> <button (click)="goBack()">Go Back</button></span>
<span class="pl-s"></span>
<span class="pl-s"> `</span><span class="pl-kos">,</span>
<span class="pl-c1">directives</span>: <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">inputs</span>:<span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">outputs</span>:<span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">pipes</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">export</span> <span class="pl-k">class</span> <span class="pl-v">About</span> <span class="pl-kos">{</span>
<span class="pl-c1">from</span><span class="pl-kos">;</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">route</span>:<span class="pl-v">Router</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">router</span> <span class="pl-c1">=</span> <span class="pl-s1">route</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">routerOnActivate</span><span class="pl-kos">(</span><span class="pl-s1">to</span><span class="pl-kos">,</span> <span class="pl-s1">from</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">from</span> <span class="pl-c1">=</span> <span class="pl-s1">from</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">'About: '</span><span class="pl-kos">,</span> <span class="pl-s1">to</span><span class="pl-kos">,</span> <span class="pl-s1">from</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">goBack</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-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">from</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">router</span><span class="pl-kos">.</span><span class="pl-en">navigateByInstruction</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">from</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">compoents/tasks/task.component.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {Component} from 'angular2/core';
import {RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router';
import {TasksList} from './tasks-list.component';
@Component({
selector: 'tasks',
template: `
<h2>Tasks</h2>
<router-outlet></router-outlet>
`,
directives: [ROUTER_DIRECTIVES],
inputs:[],
outputs:[],
pipes:[]
})
@RouteConfig([
{path: '/list', component: TasksList, name: 'List', useAsDefault: true}
])
export class Tasks {
routerOnActivate(to, from) {
console.log('Tasks: ', to, from);
this.render();
}
render() { console.log('render fired');}
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-v">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-k">import</span> <span class="pl-kos">{</span><span class="pl-v">RouteConfig</span><span class="pl-kos">,</span> <span class="pl-c1">ROUTER_DIRECTIVES</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'angular2/router'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-v">TasksList</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./tasks-list.component'</span><span class="pl-kos">;</span>
@<span class="pl-v">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">selector</span>: <span class="pl-s">'tasks'</span><span class="pl-kos">,</span>
<span class="pl-c1">template</span>: <span class="pl-s">`</span>
<span class="pl-s"> <h2>Tasks</h2></span>
<span class="pl-s"> <router-outlet></router-outlet></span>
<span class="pl-s"></span>
<span class="pl-s"> `</span><span class="pl-kos">,</span>
<span class="pl-c1">directives</span>: <span class="pl-kos">[</span><span class="pl-c1">ROUTER_DIRECTIVES</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">inputs</span>:<span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">outputs</span>:<span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">pipes</span>:<span class="pl-kos">[</span><span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
@<span class="pl-v">RouteConfig</span><span class="pl-kos">(</span><span class="pl-kos">[</span>
<span class="pl-kos">{</span><span class="pl-c1">path</span>: <span class="pl-s">'/list'</span><span class="pl-kos">,</span> <span class="pl-c1">component</span>: <span class="pl-v">TasksList</span><span class="pl-kos">,</span> <span class="pl-c1">name</span>: <span class="pl-s">'List'</span><span class="pl-kos">,</span> <span class="pl-c1">useAsDefault</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-k">export</span> <span class="pl-k">class</span> <span class="pl-v">Tasks</span> <span class="pl-kos">{</span>
<span class="pl-en">routerOnActivate</span><span class="pl-kos">(</span><span class="pl-s1">to</span><span class="pl-kos">,</span> <span class="pl-s1">from</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">'Tasks: '</span><span class="pl-kos">,</span> <span class="pl-s1">to</span><span class="pl-kos">,</span> <span class="pl-s1">from</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-en">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">render</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">'render fired'</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">tasks/tasks-list.component.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {Component} from 'angular2/core';
import {ROUTER_DIRECTIVES, Router} from 'angular2/router';
@Component({
selector: 'tasks-list',
template: `
<h3>Task-List</h3>
<button (click)="goBack()">Go Back</button>
`,
directives: [ROUTER_DIRECTIVES],
inputs:[],
outputs:[],
pipes:[]
})
export class TasksList {
task = {id : 1}
from: any;
constructor(router: Router) {
this.router = router;
console.log('constructor task-list');
}
routerOnActivate(to, from) {
console.log('Task-List: ', to, from);
}
ngOnChanges(){
console.log('list changes');
}
ngOnInit(){
console.log('here');
}
goBack() {
console.log(this.from);
this.router.navigateByInstruction(this.from);
}
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-v">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-k">import</span> <span class="pl-kos">{</span><span class="pl-c1">ROUTER_DIRECTIVES</span><span class="pl-kos">,</span> <span class="pl-v">Router</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'angular2/router'</span><span class="pl-kos">;</span>
@<span class="pl-v">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">selector</span>: <span class="pl-s">'tasks-list'</span><span class="pl-kos">,</span>
<span class="pl-c1">template</span>: <span class="pl-s">`</span>
<span class="pl-s"> <h3>Task-List</h3></span>
<span class="pl-s"> <button (click)="goBack()">Go Back</button></span>
<span class="pl-s"> `</span><span class="pl-kos">,</span>
<span class="pl-c1">directives</span>: <span class="pl-kos">[</span><span class="pl-c1">ROUTER_DIRECTIVES</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">inputs</span>:<span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">outputs</span>:<span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">pipes</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">export</span> <span class="pl-k">class</span> <span class="pl-v">TasksList</span> <span class="pl-kos">{</span>
<span class="pl-c1">task</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-c1">id</span> : <span class="pl-c1">1</span><span class="pl-kos">}</span>
<span class="pl-c1">from</span>: <span class="pl-c1">any</span><span class="pl-kos">;</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">router</span>: <span class="pl-v">Router</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">router</span> <span class="pl-c1">=</span> <span class="pl-s1">router</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">'constructor task-list'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">routerOnActivate</span><span class="pl-kos">(</span><span class="pl-s1">to</span><span class="pl-kos">,</span> <span class="pl-s1">from</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">'Task-List: '</span><span class="pl-kos">,</span> <span class="pl-s1">to</span><span class="pl-kos">,</span> <span class="pl-s1">from</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">ngOnChanges</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">'list changes'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">ngOnInit</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">'here'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">goBack</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-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">from</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">router</span><span class="pl-kos">.</span><span class="pl-en">navigateByInstruction</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">from</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">index.html</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<!DOCTYPE html>
<html>
<head>
<base href="/" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ng2</title>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<route-test>Loading...</route-test>
<script src="main.js"></script>
</body>
</html>
"><pre class="notranslate"><span class="pl-c1"><!DOCTYPE html<span class="pl-kos">></span></span>
<span class="pl-kos"><</span><span class="pl-ent">html</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">head</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">base</span> <span class="pl-c1">href</span>="<span class="pl-s">/</span>" />
<span class="pl-kos"><</span><span class="pl-ent">meta</span> <span class="pl-c1">charset</span>="<span class="pl-s">utf-8</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">meta</span> <span class="pl-c1">name</span>="<span class="pl-s">viewport</span>" <span class="pl-c1">content</span>="<span class="pl-s">width=device-width, initial-scale=1</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">title</span><span class="pl-kos">></span>Ng2<span class="pl-kos"></</span><span class="pl-ent">title</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">link</span> <span class="pl-c1">rel</span>="<span class="pl-s">stylesheet</span>" <span class="pl-c1">href</span>="<span class="pl-s">css/main.css</span>"<span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">head</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">body</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">route-test</span><span class="pl-kos">></span>Loading...<span class="pl-kos"></</span><span class="pl-ent">route-test</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">script</span> <span class="pl-c1">src</span>="<span class="pl-s">main.js</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">script</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">body</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">html</span><span class="pl-kos">></span></pre></div> | <p dir="auto"><strong>Case:</strong> Create a timed observable and test its behaviour using <code class="notranslate">fakeAsync</code>/<code class="notranslate">tick</code>.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="describe("failed test", () => {
it("rxjs delay", inject([], fakeAsync(() => {
const obs = Rx.Observable.of("message").delay(1000);
let result = "";
obs.subscribe(val => result = val);
tick(2000);
expect(result).toBe("message");
})));
});"><pre class="notranslate"><code class="notranslate">describe("failed test", () => {
it("rxjs delay", inject([], fakeAsync(() => {
const obs = Rx.Observable.of("message").delay(1000);
let result = "";
obs.subscribe(val => result = val);
tick(2000);
expect(result).toBe("message");
})));
});
</code></pre></div>
<p dir="auto"><strong>Result:</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Expected '' to be 'message'.
at example.spec.js:78:34
at testing.dev.js:1366:22
at Zone.run (angular2-polyfills.js:1243:24)
at testing.dev.js:1365:31
Failed: 1 timer(s) still in the queue.
Error: 1 timer(s) still in the queue.
at new BaseException (angular2.dev.js:7385:21)
at testing.dev.js:1374:15
at FunctionWrapper.apply (angular2.dev.js:327:17)
at FunctionWithParamTokens.execute (testing.dev.js:1947:37)
at TestInjector.execute (testing.dev.js:1868:17)
at Object.<anonymous> (testing.dev.js:2006:44)"><pre class="notranslate"><code class="notranslate">Expected '' to be 'message'.
at example.spec.js:78:34
at testing.dev.js:1366:22
at Zone.run (angular2-polyfills.js:1243:24)
at testing.dev.js:1365:31
Failed: 1 timer(s) still in the queue.
Error: 1 timer(s) still in the queue.
at new BaseException (angular2.dev.js:7385:21)
at testing.dev.js:1374:15
at FunctionWrapper.apply (angular2.dev.js:327:17)
at FunctionWithParamTokens.execute (testing.dev.js:1947:37)
at TestInjector.execute (testing.dev.js:1868:17)
at Object.<anonymous> (testing.dev.js:2006:44)
</code></pre></div>
<p dir="auto"><strong>Expected:</strong> Observable to resolve to completion since the time simulated by tick is greater than the observable's delay.</p>
<p dir="auto"><strong>Version:</strong> [email protected], [email protected]<br>
<strong>Platform:</strong> [email protected], [email protected], [email protected], [email protected]</p> | 0 |
<ul dir="auto">
<li>Log</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="flutter: ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
flutter: The following assertion was thrown during performLayout():
flutter: 'package:flutter/src/painting/text_painter.dart': Failed assertion: line 297 pos 12:
flutter: '!_needsLayout': is not true.
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter: https://github.com/flutter/flutter/issues/new
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2 TextPainter.size (package:flutter/src/painting/text_painter.dart)
flutter: #3 RenderEditable.performLayout (package:flutter/src/rendering/editable.dart:686:47)
flutter: #4 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #5 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #6 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #7 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #8 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #9 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #10 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #11 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #12 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #13 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #14 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #15 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #16 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #17 _RenderDecoration._layout.layoutLineBox (package:flutter/src/material/input_decorator.dart:750:11)
flutter: #18 _RenderDecoration._layout (package:flutter/src/material/input_decorator.dart:782:18)
flutter: #19 _RenderDecoration.performLayout (package:flutter/src/material/input_decorator.dart:905:44)
flutter: #20 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #21 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #22 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #23 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #24 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #25 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #26 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #27 RenderPositionedBox.performLayout (package:flutter/src/rendering/shifted_box.dart:381:13)
flutter: #28 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #29 RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:259:13)
flutter: #30 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #31 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:738:15)
flutter: #32 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #33 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:738:15)
flutter: #34 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #35 RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:199:11)
flutter: #36 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #37 MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:141:11)
flutter: #38 _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:399:7)
flutter: #39 MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:211:7)
flutter: #40 RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:355:14)
flutter: #41 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #42 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #43 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #44 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #45 _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1143:11)
flutter: #46 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #47 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #48 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #49 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #50 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #51 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #52 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #53 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:520:15)
flutter: #54 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #55 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #56 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #57 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #58 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #59 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #60 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #61 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #62 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #63 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #64 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #65 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #66 RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:2831:13)
flutter: #67 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #68 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:520:15)
flutter: #69 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #70 __RenderTheatre&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #71 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #72 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #73 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #74 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #75 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #76 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #77 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #78 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #79 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #80 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #81 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #82 RenderView.performLayout (package:flutter/src/rendering/view.dart:125:13)
flutter: #83 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1445:7)
flutter: #84 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:709:18)
flutter: #85 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:270:19)
flutter: #86 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:627:13)
flutter: #87 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
flutter: #88 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
flutter: #89 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
flutter: #90 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:751:7)
flutter: #92 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
flutter: #93 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
flutter: #94 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
flutter: (elided 3 frames from class _AssertionError and package dart:async)
flutter:
flutter: The following RenderObject was being processed when the exception was fired:
flutter: RenderEditable#bb511 relayoutBoundary=up16 NEEDS-LAYOUT NEEDS-PAINT
flutter: creator: _Editable-[GlobalKey#bf475] ← Semantics ← CompositedTransformTarget ← _ScrollableScope ←
flutter: IgnorePointer-[GlobalKey#d90c3] ← Semantics ← Listener ←
flutter: RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#62b00] ← Scrollable ←
flutter: EditableText-[LabeledGlobalKey<EditableTextState>#8a748] ← RepaintBoundary ← _Decorator ← ⋯
flutter: parentData: <none> (can use size)
flutter: constraints: BoxConstraints(w=40.0, 0.0<=h<=Infinity)
flutter: size: Size(40.0, 36.0)
flutter: cursorColor: Color(0xffffcc80)
flutter: showCursor: ValueNotifier<bool>#9f5b2(false)
flutter: maxLines: 1
flutter: selectionColor: Color(0xffffcc80)
flutter: textScaleFactor: 1.0
flutter: selection: TextSelection(baseOffset: -1, extentOffset: -1, affinity: TextAffinity.downstream,
flutter: isDirectional: false)
flutter: offset: ScrollPositionWithSingleContext#931cd(offset: 0.0, range: 0.0..0.0, viewport: 40.0,
flutter: ScrollableState, ClampingScrollPhysics -> BouncingScrollPhysics, IdleScrollActivity#f07ce,
flutter: ScrollDirection.idle)
flutter: This RenderObject has no descendants.
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: 'package:flutter/src/painting/text_painter.dart': Failed assertion: line 306 pos 12: '!_needsLayout': is not true.
flutter: Another exception was thrown: 'package:flutter/src/painting/text_painter.dart': Failed assertion: line 297 pos 12: '!_needsLayout': is not true.
flutter: Another exception was thrown: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1604 pos 12: '!_debugDoingBaseline': is not true.
flutter: Another exception was thrown: 'package:flutter/src/painting/text_painter.dart': Failed assertion: line 297 pos 12: '!_needsLayout': is not true.
Reloaded 3 of 399 libraries in 733ms.
flutter: Another exception was thrown: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1604 pos 12: '!_debugDoingBaseline': is not true.
flutter: Another exception was thrown: 'package:flutter/src/painting/text_painter.dart': Failed assertion: line 297 pos 12: '!_needsLayout': is not true.
flutter: Another exception was thrown: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1604 pos 12: '!_debugDoingBaseline': is not true.
flutter: Another exception was thrown: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1604 pos 12: '!_debugDoingBaseline': is not true.
flutter: Another exception was thrown: TextPainter.paint called when text geometry was not yet calculated.
flutter: Another exception was thrown: TextPainter.paint called when text geometry was not yet calculated.
flutter: Another exception was thrown: TextPainter.paint called when text geometry was not yet calculated.
flutter: Another exception was thrown: TextPainter.paint called when text geometry was not yet calculated.
flutter: Another exception was thrown: 'package:flutter/src/painting/text_painter.dart': Failed assertion: line 479 pos 12: '!_needsLayout': is not true."><pre class="notranslate"><code class="notranslate">flutter: ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
flutter: The following assertion was thrown during performLayout():
flutter: 'package:flutter/src/painting/text_painter.dart': Failed assertion: line 297 pos 12:
flutter: '!_needsLayout': is not true.
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter: https://github.com/flutter/flutter/issues/new
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2 TextPainter.size (package:flutter/src/painting/text_painter.dart)
flutter: #3 RenderEditable.performLayout (package:flutter/src/rendering/editable.dart:686:47)
flutter: #4 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #5 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #6 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #7 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #8 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #9 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #10 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #11 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #12 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #13 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #14 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #15 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #16 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #17 _RenderDecoration._layout.layoutLineBox (package:flutter/src/material/input_decorator.dart:750:11)
flutter: #18 _RenderDecoration._layout (package:flutter/src/material/input_decorator.dart:782:18)
flutter: #19 _RenderDecoration.performLayout (package:flutter/src/material/input_decorator.dart:905:44)
flutter: #20 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #21 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #22 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #23 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #24 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #25 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #26 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #27 RenderPositionedBox.performLayout (package:flutter/src/rendering/shifted_box.dart:381:13)
flutter: #28 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #29 RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:259:13)
flutter: #30 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #31 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:738:15)
flutter: #32 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #33 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:738:15)
flutter: #34 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #35 RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:199:11)
flutter: #36 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #37 MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:141:11)
flutter: #38 _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:399:7)
flutter: #39 MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:211:7)
flutter: #40 RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:355:14)
flutter: #41 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #42 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #43 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #44 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #45 _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1143:11)
flutter: #46 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #47 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #48 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #49 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #50 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #51 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #52 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #53 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:520:15)
flutter: #54 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #55 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #56 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #57 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #58 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #59 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #60 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #61 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #62 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #63 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #64 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #65 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #66 RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:2831:13)
flutter: #67 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #68 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:520:15)
flutter: #69 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #70 __RenderTheatre&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #71 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #72 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #73 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #74 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #75 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #76 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #77 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #78 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #79 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #80 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
flutter: #81 RenderObject.layout (package:flutter/src/rendering/object.dart:1570:7)
flutter: #82 RenderView.performLayout (package:flutter/src/rendering/view.dart:125:13)
flutter: #83 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1445:7)
flutter: #84 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:709:18)
flutter: #85 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:270:19)
flutter: #86 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:627:13)
flutter: #87 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
flutter: #88 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
flutter: #89 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
flutter: #90 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:751:7)
flutter: #92 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
flutter: #93 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
flutter: #94 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
flutter: (elided 3 frames from class _AssertionError and package dart:async)
flutter:
flutter: The following RenderObject was being processed when the exception was fired:
flutter: RenderEditable#bb511 relayoutBoundary=up16 NEEDS-LAYOUT NEEDS-PAINT
flutter: creator: _Editable-[GlobalKey#bf475] ← Semantics ← CompositedTransformTarget ← _ScrollableScope ←
flutter: IgnorePointer-[GlobalKey#d90c3] ← Semantics ← Listener ←
flutter: RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#62b00] ← Scrollable ←
flutter: EditableText-[LabeledGlobalKey<EditableTextState>#8a748] ← RepaintBoundary ← _Decorator ← ⋯
flutter: parentData: <none> (can use size)
flutter: constraints: BoxConstraints(w=40.0, 0.0<=h<=Infinity)
flutter: size: Size(40.0, 36.0)
flutter: cursorColor: Color(0xffffcc80)
flutter: showCursor: ValueNotifier<bool>#9f5b2(false)
flutter: maxLines: 1
flutter: selectionColor: Color(0xffffcc80)
flutter: textScaleFactor: 1.0
flutter: selection: TextSelection(baseOffset: -1, extentOffset: -1, affinity: TextAffinity.downstream,
flutter: isDirectional: false)
flutter: offset: ScrollPositionWithSingleContext#931cd(offset: 0.0, range: 0.0..0.0, viewport: 40.0,
flutter: ScrollableState, ClampingScrollPhysics -> BouncingScrollPhysics, IdleScrollActivity#f07ce,
flutter: ScrollDirection.idle)
flutter: This RenderObject has no descendants.
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: 'package:flutter/src/painting/text_painter.dart': Failed assertion: line 306 pos 12: '!_needsLayout': is not true.
flutter: Another exception was thrown: 'package:flutter/src/painting/text_painter.dart': Failed assertion: line 297 pos 12: '!_needsLayout': is not true.
flutter: Another exception was thrown: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1604 pos 12: '!_debugDoingBaseline': is not true.
flutter: Another exception was thrown: 'package:flutter/src/painting/text_painter.dart': Failed assertion: line 297 pos 12: '!_needsLayout': is not true.
Reloaded 3 of 399 libraries in 733ms.
flutter: Another exception was thrown: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1604 pos 12: '!_debugDoingBaseline': is not true.
flutter: Another exception was thrown: 'package:flutter/src/painting/text_painter.dart': Failed assertion: line 297 pos 12: '!_needsLayout': is not true.
flutter: Another exception was thrown: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1604 pos 12: '!_debugDoingBaseline': is not true.
flutter: Another exception was thrown: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1604 pos 12: '!_debugDoingBaseline': is not true.
flutter: Another exception was thrown: TextPainter.paint called when text geometry was not yet calculated.
flutter: Another exception was thrown: TextPainter.paint called when text geometry was not yet calculated.
flutter: Another exception was thrown: TextPainter.paint called when text geometry was not yet calculated.
flutter: Another exception was thrown: TextPainter.paint called when text geometry was not yet calculated.
flutter: Another exception was thrown: 'package:flutter/src/painting/text_painter.dart': Failed assertion: line 479 pos 12: '!_needsLayout': is not true.
</code></pre></div>
<ul dir="auto">
<li>Flutter</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="flutter doctor -v
[✓] Flutter (Channel beta, v0.5.1, on Mac OS X 10.13.4 17E199, locale zh-Hans-CN)
• Flutter version 0.5.1 at /Users/zhengsl/sdk/flutter
• Framework revision c7ea3ca377 (3 months ago), 2018-05-29 21:07:33 +0200
• Engine revision 1ed25ca7b7
• Dart version 2.0.0-dev.58.0.flutter-f981f09760
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
• Android SDK at /Users/zhengsl/sdk/android/android-sdk-macosx
• Android NDK at /Users/zhengsl/sdk/android/android-sdk-macosx/ndk-bundle
• Platform android-28, build-tools 28.0.2
• ANDROID_HOME = /Users/zhengsl/sdk/android/android-sdk-macosx
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.4.1, Build version 9F2000
• ios-deploy 1.9.2
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 27.1.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] Connected devices (2 available)
• SM919 • 73a2e9a7 • android-arm64 • Android 6.0.1 (API 23)
• iPhone X • 0F8B3CDF-B5FE-4FE5-900A-B0209A84C882 • ios • iOS 11.4 (simulator)
• No issues found!"><pre class="notranslate"><code class="notranslate">flutter doctor -v
[✓] Flutter (Channel beta, v0.5.1, on Mac OS X 10.13.4 17E199, locale zh-Hans-CN)
• Flutter version 0.5.1 at /Users/zhengsl/sdk/flutter
• Framework revision c7ea3ca377 (3 months ago), 2018-05-29 21:07:33 +0200
• Engine revision 1ed25ca7b7
• Dart version 2.0.0-dev.58.0.flutter-f981f09760
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
• Android SDK at /Users/zhengsl/sdk/android/android-sdk-macosx
• Android NDK at /Users/zhengsl/sdk/android/android-sdk-macosx/ndk-bundle
• Platform android-28, build-tools 28.0.2
• ANDROID_HOME = /Users/zhengsl/sdk/android/android-sdk-macosx
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.4.1, Build version 9F2000
• ios-deploy 1.9.2
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 27.1.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] Connected devices (2 available)
• SM919 • 73a2e9a7 • android-arm64 • Android 6.0.1 (API 23)
• iPhone X • 0F8B3CDF-B5FE-4FE5-900A-B0209A84C882 • ios • iOS 11.4 (simulator)
• No issues found!
</code></pre></div>
<ul dir="auto">
<li>Code</li>
</ul>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Widget _buildCodeEdit() {
return new Container(
alignment: Alignment.center,
width: 40.0,
child: new TextField(
keyboardType: TextInputType.number,
maxLines: 1,
maxLength: 1,
textAlign: TextAlign.center,
enabled: true,
style: TextStyle(fontSize: 30.0, color: Colors.grey[700]),
),
);
}
Widget code = new Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
_buildCodeEdit(),
_buildCodeEdit(),
_buildCodeEdit(),
_buildCodeEdit(),
],
);"><pre class="notranslate"><span class="pl-c1">Widget</span> <span class="pl-en">_buildCodeEdit</span>() {
<span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">Container</span>(
alignment<span class="pl-k">:</span> <span class="pl-c1">Alignment</span>.center,
width<span class="pl-k">:</span> <span class="pl-c1">40.0</span>,
child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">TextField</span>(
keyboardType<span class="pl-k">:</span> <span class="pl-c1">TextInputType</span>.number,
maxLines<span class="pl-k">:</span> <span class="pl-c1">1</span>,
maxLength<span class="pl-k">:</span> <span class="pl-c1">1</span>,
textAlign<span class="pl-k">:</span> <span class="pl-c1">TextAlign</span>.center,
enabled<span class="pl-k">:</span> <span class="pl-c1">true</span>,
style<span class="pl-k">:</span> <span class="pl-c1">TextStyle</span>(fontSize<span class="pl-k">:</span> <span class="pl-c1">30.0</span>, color<span class="pl-k">:</span> <span class="pl-c1">Colors</span>.grey[<span class="pl-c1">700</span>]),
),
);
}
<span class="pl-c1">Widget</span> code <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">Row</span>(
mainAxisAlignment<span class="pl-k">:</span> <span class="pl-c1">MainAxisAlignment</span>.spaceBetween,
mainAxisSize<span class="pl-k">:</span> <span class="pl-c1">MainAxisSize</span>.max,
children<span class="pl-k">:</span> <span class="pl-k"><</span><span class="pl-c1">Widget</span><span class="pl-k">></span>[
<span class="pl-en">_buildCodeEdit</span>(),
<span class="pl-en">_buildCodeEdit</span>(),
<span class="pl-en">_buildCodeEdit</span>(),
<span class="pl-en">_buildCodeEdit</span>(),
],
);</pre></div>
<ul dir="auto">
<li>Diff</li>
</ul>
<p dir="auto"><code class="notranslate"> textAlign: TextAlign.center</code> Delete can run</p> | <h2 dir="auto">Steps to Reproduce</h2>
<ol dir="auto">
<li>Run <a href="https://github.com/flutter/flutter/tree/master/examples/flutter_gallery">examples/flutter_gallery</a> on iOS (physical device or simulator)</li>
<li>Open "Text fields" under "Material Components"</li>
<li>Enter one or more numbers into the "Phone Number" field</li>
<li>Hit backspace</li>
<li>The input field goes into a loop where it repeatedly removes and adds the last character.</li>
</ol>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1616517/34640550-151e4aa8-f2fd-11e7-98ce-540f065effef.gif"><img src="https://user-images.githubusercontent.com/1616517/34640550-151e4aa8-f2fd-11e7-98ce-540f065effef.gif" alt="output" data-animated-image="" style="max-width: 100%;"></a></p>
<h2 dir="auto">Logs</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ ] 🔥 To hot reload your app on the fly, press "r". To restart the app entirely, press "R".
[ ] An Observatory debugger and profiler on iPhone X is available at: http://127.0.0.1:8103/
[ ] For a more detailed help message, press "h". To quit, press "q".
[+253478 ms] [DEVICE LOG] 2018-01-06 15:52:03.678301+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc4633, Description: Loading Preferences From System CFPrefsD For Search List
[+13924 ms] [DEVICE LOG] 2018-01-06 15:52:17.602866+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc4634, Description: Loading Preferences From System CFPrefsD For Search List
[ +8 ms] [DEVICE LOG] 2018-01-06 15:52:17.611380+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc4635, Description: Loading Preferences From System CFPrefsD For Search List
[ +234 ms] [DEVICE LOG] 2018-01-06 15:52:17.845901+0200 localhost Runner[24134]: (UIKit) Can't find keyplane that supports type 5 for keyboard iPhone-PortraitChoco-PhonePad; using 2024220450015396792_PortraitChoco_iPhone-Complex-Pad_Default
[ +63 ms] [DEVICE LOG] 2018-01-06 15:52:17.900540+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc4636, Description: Loading Preferences From System CFPrefsD For Search List
[ ] [DEVICE LOG] 2018-01-06 15:52:17.901476+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc4637, Description: Updating Key-Value Observers Of Preferences
[ ] [DEVICE LOG] 2018-01-06 15:52:17.901791+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc4638, Description: Updating Key-Value Observers Of Preferences
[ ] [DEVICE LOG] 2018-01-06 15:52:17.901973+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc4639, Description: Updating Key-Value Observers Of Preferences
[ ] [DEVICE LOG] 2018-01-06 15:52:17.902255+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc463a, Description: Updating Key-Value Observers Of Preferences
[ ] [DEVICE LOG] 2018-01-06 15:52:17.902480+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc463b, Description: Updating Key-Value Observers Of Preferences
[ ] [DEVICE LOG] 2018-01-06 15:52:17.902748+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc463c, Description: Updating Key-Value Observers Of Preferences
[ ] [DEVICE LOG] 2018-01-06 15:52:17.903001+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc463d, Description: Updating Key-Value Observers Of Preferences
[ +1 ms] [DEVICE LOG] 2018-01-06 15:52:17.903195+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc463e, Description: Updating Key-Value Observers Of Preferences
[ ] [DEVICE LOG] 2018-01-06 15:52:17.903453+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc463f, Description: Updating Key-Value Observers Of Preferences
[ +1 ms] [DEVICE LOG] 2018-01-06 15:52:17.906445+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc58b0, Description: Loading Preferences From System CFPrefsD For Search List
[ ] [DEVICE LOG] 2018-01-06 15:52:17.907627+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:FeedbackActivation] activate generator <_UIKeyboardFeedbackGenerator: 0x600000125fa0: prepared=1> with style: TurnOn; activationCount: 0 -> 1; styleActivationCount: 0 -> 1
[ ] [DEVICE LOG] 2018-01-06 15:52:17.907921+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] activate feedback engine 0x6000000bec60, clientCount: 0 -> 1
[ ] [DEVICE LOG] 2018-01-06 15:52:17.907992+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] activating engine
[ ] [DEVICE LOG] 2018-01-06 15:52:17.908409+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] feedback engine <_UIFeedbackSystemSoundEngine: 0x6000000bec60: state=0, numberOfClients=1, prewarmCount=0, _isSuspended=0> state changed: Inactive -> Activating
[ ] [DEVICE LOG] 2018-01-06 15:52:17.910005+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] feedback engine <_UIFeedbackSystemSoundEngine: 0x6000000bec60: state=3, numberOfClients=1, prewarmCount=0, _isSuspended=0> state changed: Activating -> Running
[+3359 ms] [DEVICE LOG] 2018-01-06 15:52:21.273835+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:FeedbackActivation] activate generator <_UIKeyboardFeedbackGenerator: 0x600000125fa0: prepared=1> with style: TurnOn; activationCount: 1 -> 2; styleActivationCount: 1 -> 2
[ ] [DEVICE LOG] 2018-01-06 15:52:21.273875+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] activate feedback engine 0x6000000bec60, clientCount: 1 -> 2
[ ] [DEVICE LOG] 2018-01-06 15:52:21.274731+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:FeedbackActivation] deactivate generator <_UIKeyboardFeedbackGenerator: 0x600000125fa0: prepared=1> with style: TurnOn; activationCount: 2 -> 1; styleActivationCount: 2 -> 1
[ ] [DEVICE LOG] 2018-01-06 15:52:21.274782+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] deactivate feedback engine 0x6000000bec60, clientCount: 2 -> 1
[+2656 ms] [DEVICE LOG] 2018-01-06 15:52:23.928718+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:FeedbackActivation] activate generator <_UIKeyboardFeedbackGenerator: 0x600000125fa0: prepared=1> with style: TurnOn; activationCount: 1 -> 2; styleActivationCount: 1 -> 2
[ ] [DEVICE LOG] 2018-01-06 15:52:23.928799+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] activate feedback engine 0x6000000bec60, clientCount: 1 -> 2
[ +6 ms] [DEVICE LOG] 2018-01-06 15:52:23.929589+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:FeedbackActivation] deactivate generator <_UIKeyboardFeedbackGenerator: 0x600000125fa0: prepared=1> with style: TurnOn; activationCount: 2 -> 1; styleActivationCount: 2 -> 1
[ +2 ms] [DEVICE LOG] 2018-01-06 15:52:23.929682+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] deactivate feedback engine 0x6000000bec60, clientCount: 2 -> 1
[+3667 ms] [DEVICE LOG] 2018-01-06 15:52:27.608269+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:FeedbackActivation] activate generator <_UIKeyboardFeedbackGenerator: 0x600000125fa0: prepared=1> with style: TurnOn; activationCount: 1 -> 2; styleActivationCount: 1 -> 2
[ ] [DEVICE LOG] 2018-01-06 15:52:27.608319+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] activate feedback engine 0x6000000bec60, clientCount: 1 -> 2
[ +2 ms] [DEVICE LOG] 2018-01-06 15:52:27.609012+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:FeedbackActivation] deactivate generator <_UIKeyboardFeedbackGenerator: 0x600000125fa0: prepared=1> with style: TurnOn; activationCount: 2 -> 1; styleActivationCount: 2 -> 1
[ ] [DEVICE LOG] 2018-01-06 15:52:27.609054+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] deactivate feedback engine 0x6000000bec60, clientCount: 2 -> 1"><pre class="notranslate"><code class="notranslate">[ ] 🔥 To hot reload your app on the fly, press "r". To restart the app entirely, press "R".
[ ] An Observatory debugger and profiler on iPhone X is available at: http://127.0.0.1:8103/
[ ] For a more detailed help message, press "h". To quit, press "q".
[+253478 ms] [DEVICE LOG] 2018-01-06 15:52:03.678301+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc4633, Description: Loading Preferences From System CFPrefsD For Search List
[+13924 ms] [DEVICE LOG] 2018-01-06 15:52:17.602866+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc4634, Description: Loading Preferences From System CFPrefsD For Search List
[ +8 ms] [DEVICE LOG] 2018-01-06 15:52:17.611380+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc4635, Description: Loading Preferences From System CFPrefsD For Search List
[ +234 ms] [DEVICE LOG] 2018-01-06 15:52:17.845901+0200 localhost Runner[24134]: (UIKit) Can't find keyplane that supports type 5 for keyboard iPhone-PortraitChoco-PhonePad; using 2024220450015396792_PortraitChoco_iPhone-Complex-Pad_Default
[ +63 ms] [DEVICE LOG] 2018-01-06 15:52:17.900540+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc4636, Description: Loading Preferences From System CFPrefsD For Search List
[ ] [DEVICE LOG] 2018-01-06 15:52:17.901476+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc4637, Description: Updating Key-Value Observers Of Preferences
[ ] [DEVICE LOG] 2018-01-06 15:52:17.901791+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc4638, Description: Updating Key-Value Observers Of Preferences
[ ] [DEVICE LOG] 2018-01-06 15:52:17.901973+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc4639, Description: Updating Key-Value Observers Of Preferences
[ ] [DEVICE LOG] 2018-01-06 15:52:17.902255+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc463a, Description: Updating Key-Value Observers Of Preferences
[ ] [DEVICE LOG] 2018-01-06 15:52:17.902480+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc463b, Description: Updating Key-Value Observers Of Preferences
[ ] [DEVICE LOG] 2018-01-06 15:52:17.902748+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc463c, Description: Updating Key-Value Observers Of Preferences
[ ] [DEVICE LOG] 2018-01-06 15:52:17.903001+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc463d, Description: Updating Key-Value Observers Of Preferences
[ +1 ms] [DEVICE LOG] 2018-01-06 15:52:17.903195+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc463e, Description: Updating Key-Value Observers Of Preferences
[ ] [DEVICE LOG] 2018-01-06 15:52:17.903453+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc463f, Description: Updating Key-Value Observers Of Preferences
[ +1 ms] [DEVICE LOG] 2018-01-06 15:52:17.906445+0200 localhost Runner[24134]: (Runner) Created Activity ID: 0xc58b0, Description: Loading Preferences From System CFPrefsD For Search List
[ ] [DEVICE LOG] 2018-01-06 15:52:17.907627+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:FeedbackActivation] activate generator <_UIKeyboardFeedbackGenerator: 0x600000125fa0: prepared=1> with style: TurnOn; activationCount: 0 -> 1; styleActivationCount: 0 -> 1
[ ] [DEVICE LOG] 2018-01-06 15:52:17.907921+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] activate feedback engine 0x6000000bec60, clientCount: 0 -> 1
[ ] [DEVICE LOG] 2018-01-06 15:52:17.907992+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] activating engine
[ ] [DEVICE LOG] 2018-01-06 15:52:17.908409+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] feedback engine <_UIFeedbackSystemSoundEngine: 0x6000000bec60: state=0, numberOfClients=1, prewarmCount=0, _isSuspended=0> state changed: Inactive -> Activating
[ ] [DEVICE LOG] 2018-01-06 15:52:17.910005+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] feedback engine <_UIFeedbackSystemSoundEngine: 0x6000000bec60: state=3, numberOfClients=1, prewarmCount=0, _isSuspended=0> state changed: Activating -> Running
[+3359 ms] [DEVICE LOG] 2018-01-06 15:52:21.273835+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:FeedbackActivation] activate generator <_UIKeyboardFeedbackGenerator: 0x600000125fa0: prepared=1> with style: TurnOn; activationCount: 1 -> 2; styleActivationCount: 1 -> 2
[ ] [DEVICE LOG] 2018-01-06 15:52:21.273875+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] activate feedback engine 0x6000000bec60, clientCount: 1 -> 2
[ ] [DEVICE LOG] 2018-01-06 15:52:21.274731+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:FeedbackActivation] deactivate generator <_UIKeyboardFeedbackGenerator: 0x600000125fa0: prepared=1> with style: TurnOn; activationCount: 2 -> 1; styleActivationCount: 2 -> 1
[ ] [DEVICE LOG] 2018-01-06 15:52:21.274782+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] deactivate feedback engine 0x6000000bec60, clientCount: 2 -> 1
[+2656 ms] [DEVICE LOG] 2018-01-06 15:52:23.928718+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:FeedbackActivation] activate generator <_UIKeyboardFeedbackGenerator: 0x600000125fa0: prepared=1> with style: TurnOn; activationCount: 1 -> 2; styleActivationCount: 1 -> 2
[ ] [DEVICE LOG] 2018-01-06 15:52:23.928799+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] activate feedback engine 0x6000000bec60, clientCount: 1 -> 2
[ +6 ms] [DEVICE LOG] 2018-01-06 15:52:23.929589+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:FeedbackActivation] deactivate generator <_UIKeyboardFeedbackGenerator: 0x600000125fa0: prepared=1> with style: TurnOn; activationCount: 2 -> 1; styleActivationCount: 2 -> 1
[ +2 ms] [DEVICE LOG] 2018-01-06 15:52:23.929682+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] deactivate feedback engine 0x6000000bec60, clientCount: 2 -> 1
[+3667 ms] [DEVICE LOG] 2018-01-06 15:52:27.608269+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:FeedbackActivation] activate generator <_UIKeyboardFeedbackGenerator: 0x600000125fa0: prepared=1> with style: TurnOn; activationCount: 1 -> 2; styleActivationCount: 1 -> 2
[ ] [DEVICE LOG] 2018-01-06 15:52:27.608319+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] activate feedback engine 0x6000000bec60, clientCount: 1 -> 2
[ +2 ms] [DEVICE LOG] 2018-01-06 15:52:27.609012+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:FeedbackActivation] deactivate generator <_UIKeyboardFeedbackGenerator: 0x600000125fa0: prepared=1> with style: TurnOn; activationCount: 2 -> 1; styleActivationCount: 2 -> 1
[ ] [DEVICE LOG] 2018-01-06 15:52:27.609054+0200 localhost Runner[24134]: (UIKit) [com.apple.UIKit:Feedback] deactivate feedback engine 0x6000000bec60, clientCount: 2 -> 1
</code></pre></div>
<h2 dir="auto">Flutter Doctor</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (on Mac OS X 10.13.2 17C88, locale en-SE, channel master)
• Flutter at /Users/fsimon/flutter
• Framework revision a414fb458d (28 hours ago), 2018-01-06 12:02:33 +0100
• Engine revision 12e0e38a8b
• Tools Dart version 1.25.0-dev.11.0
• Engine Dart version 2.0.0-edge.8d7219a5b6a7c2505ff57f23e7cf80da4c724512
[✓] Android toolchain - develop for Android devices (Android SDK 26.0.3)
• Android SDK at /Users/fsimon/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-26, build-tools 26.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.2, Build version 9C40b
• ios-deploy 1.9.2
• CocoaPods version 1.3.1
[✓] Android Studio (version 3.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[✓] Connected devices
• iPhone X • 1C6CECD0-0E72-489F-90D7-197A80D82B98 • ios • iOS 11.2 (simulator)"><pre class="notranslate"><code class="notranslate">[✓] Flutter (on Mac OS X 10.13.2 17C88, locale en-SE, channel master)
• Flutter at /Users/fsimon/flutter
• Framework revision a414fb458d (28 hours ago), 2018-01-06 12:02:33 +0100
• Engine revision 12e0e38a8b
• Tools Dart version 1.25.0-dev.11.0
• Engine Dart version 2.0.0-edge.8d7219a5b6a7c2505ff57f23e7cf80da4c724512
[✓] Android toolchain - develop for Android devices (Android SDK 26.0.3)
• Android SDK at /Users/fsimon/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-26, build-tools 26.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.2, Build version 9C40b
• ios-deploy 1.9.2
• CocoaPods version 1.3.1
[✓] Android Studio (version 3.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[✓] Connected devices
• iPhone X • 1C6CECD0-0E72-489F-90D7-197A80D82B98 • ios • iOS 11.2 (simulator)
</code></pre></div> | 0 |
<p dir="auto">I'm using a LeNet-5 mnist example from Udacity's course. Link to the source code is below.<br>
Training works ok on a CPU (config = tf.ConfigProto(device_count = {'GPU': 0})),<br>
but fails in a GPU mode with the following 'CUDA_ERROR_ILLEGAL_ADDRESS' error:</p>
<blockquote>
<p dir="auto">I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:885] Found device 0 with properties:<br>
name: GeForce GTX 1060 6GB<br>
major: 6 minor: 1 memoryClockRate (GHz) 1.7845<br>
pciBusID 0000:01:00.0<br>
Total memory: 6.00GiB<br>
Free memory: 5.01GiB<br>
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:906] DMA: 0<br>
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:916] 0: Y<br>
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:01:00.0)<br>
Training...<br>
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_event.cc:49] Error polling for event status: failed to query event: <strong>CUDA_ERROR_ILLEGAL_ADDRESS</strong><br>
F c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_event_mgr.cc:198] Unexpected Event status: 1</p>
</blockquote>
<p dir="auto">I have reproduced same error on two setups.<br>
Environment 1 (Home PC):</p>
<ul dir="auto">
<li>windows 10;</li>
<li>latest anaconda 4.2.0, python 3.5;</li>
<li>cuda 8</li>
<li>cudnn 5.1 (for win10)</li>
<li>tensorflow 0.12.0 gpu (<a href="https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-0.12.0-cp35-cp35m-win_amd64.whl" rel="nofollow">https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-0.12.0-cp35-cp35m-win_amd64.whl</a>)</li>
<li>GeForce GTX 1060 6Gb</li>
</ul>
<p dir="auto">Environment 2 (Work PC):</p>
<ul dir="auto">
<li>windows 7;</li>
<li>latest anaconda 4.2.0, python 3.5;</li>
<li>cuda 8</li>
<li>cudnn 5.1 (for win7)</li>
<li>tensorflow 0.12.0 gpu (<a href="https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-0.12.0-cp35-cp35m-win_amd64.whl" rel="nofollow">https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-0.12.0-cp35-cp35m-win_amd64.whl</a>)</li>
<li>GeForce GTX 660 3Gb</li>
</ul>
<p dir="auto">I'm sharing two scripts with minor changes that allow a workaround:<br>
<a href="https://drive.google.com/open?id=0B6jkkqMOGy5cNHh3TVpxU283Ykk" rel="nofollow">https://drive.google.com/open?id=0B6jkkqMOGy5cNHh3TVpxU283Ykk</a></p>
<p dir="auto">Main difference:<br>
Script from example that crashes (LabLenetBad.py) uses raw mnist label data with the tf.one_hot() call.<br>
The workaround (LabLenetGood.py) reads mnist data with (one_hot=True) flag and does not use tf.one_hot() call on the Y placeholder.</p>
<p dir="auto">I think that tf.one_hot does not work properly on the gpu.</p> | <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): Linux Ubuntu 16.04</li>
<li>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:</li>
<li>TensorFlow installed from (source or binary): binary</li>
<li>TensorFlow version (use command below): 1.13.1</li>
<li>Python version: 3.5.2</li>
<li>Bazel version (if compiling from source):</li>
<li>GCC/Compiler version (if compiling from source):</li>
<li>CUDA/cuDNN version: CUDA 10.0</li>
<li>GPU model and memory:</li>
</ul>
<p dir="auto"><strong>Describe the current behavior</strong><br>
Using tf.summary.scalar in keras loss/metrics function, then use model_to_estimator to convert keras model to estimator, tensorboard get duplicate scalars with totally same value. (e.g., <code class="notranslate">metrics/accuracy/train</code> and <code class="notranslate">metrics/accuracy/train_1</code>)</p>
<p dir="auto"><strong>Describe the expected behavior</strong><br>
It should only summary one scalar.</p>
<p dir="auto"><strong>Code to reproduce the issue</strong><br>
A example here:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" ...
model = tf.keras.Model(inputs=input_layer, outputs=[output_layer1, output_layer2])
def accuracy(y_true, y_pred):
y_pred, y_true = reshape_keras_tensor(y_pred, y_true)
acc = tf.reduce_mean(
tf.cast(tf.equal(tf.cast(y_true, tf.int64), tf.argmax(input=y_pred, axis=1)), tf.float32))
# Where I summary, without this line, it will not summary anything during training
tf.summary.scalar('train', acc)
return acc
def total_loss(y_true, y_pred):
y_pred, y_true = reshape_keras_tensor(y_pred, y_true)
loss = tf.nn.sparse_softmax_cross_entropy_with_logits(
labels=y_true,
logits=y_pred)
loss = tf.reduce_mean(cross_entropy)
# Where I summary, without this line, it will not summary anything during training
tf.summary.scalar('train', loss)
return loss
...
model.compile(optimizer=optimizer_builder.build(config.optimizer),
loss={output_layer1: total_loss},
metrics={output_layer1: accuracy})
estimator = tf.keras.estimator.model_to_estimator(
keras_model=model,
config=run_config,
)
train_spec = tf.estimator.TrainSpec(
input_fn=lambda: train_input_fn(config))
eval_spec = tf.estimator.EvalSpec(
input_fn=lambda: eval_input_fn(config))
tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec)"><pre class="notranslate"> ...
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-v">Model</span>(<span class="pl-s1">inputs</span><span class="pl-c1">=</span><span class="pl-s1">input_layer</span>, <span class="pl-s1">outputs</span><span class="pl-c1">=</span>[<span class="pl-s1">output_layer1</span>, <span class="pl-s1">output_layer2</span>])
<span class="pl-k">def</span> <span class="pl-en">accuracy</span>(<span class="pl-s1">y_true</span>, <span class="pl-s1">y_pred</span>):
<span class="pl-s1">y_pred</span>, <span class="pl-s1">y_true</span> <span class="pl-c1">=</span> <span class="pl-en">reshape_keras_tensor</span>(<span class="pl-s1">y_pred</span>, <span class="pl-s1">y_true</span>)
<span class="pl-s1">acc</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">reduce_mean</span>(
<span class="pl-s1">tf</span>.<span class="pl-en">cast</span>(<span class="pl-s1">tf</span>.<span class="pl-en">equal</span>(<span class="pl-s1">tf</span>.<span class="pl-en">cast</span>(<span class="pl-s1">y_true</span>, <span class="pl-s1">tf</span>.<span class="pl-s1">int64</span>), <span class="pl-s1">tf</span>.<span class="pl-en">argmax</span>(<span class="pl-s1">input</span><span class="pl-c1">=</span><span class="pl-s1">y_pred</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)), <span class="pl-s1">tf</span>.<span class="pl-s1">float32</span>))
<span class="pl-c"># Where I summary, without this line, it will not summary anything during training</span>
<span class="pl-s1">tf</span>.<span class="pl-s1">summary</span>.<span class="pl-en">scalar</span>(<span class="pl-s">'train'</span>, <span class="pl-s1">acc</span>)
<span class="pl-k">return</span> <span class="pl-s1">acc</span>
<span class="pl-k">def</span> <span class="pl-en">total_loss</span>(<span class="pl-s1">y_true</span>, <span class="pl-s1">y_pred</span>):
<span class="pl-s1">y_pred</span>, <span class="pl-s1">y_true</span> <span class="pl-c1">=</span> <span class="pl-en">reshape_keras_tensor</span>(<span class="pl-s1">y_pred</span>, <span class="pl-s1">y_true</span>)
<span class="pl-s1">loss</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">nn</span>.<span class="pl-en">sparse_softmax_cross_entropy_with_logits</span>(
<span class="pl-s1">labels</span><span class="pl-c1">=</span><span class="pl-s1">y_true</span>,
<span class="pl-s1">logits</span><span class="pl-c1">=</span><span class="pl-s1">y_pred</span>)
<span class="pl-s1">loss</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">reduce_mean</span>(<span class="pl-s1">cross_entropy</span>)
<span class="pl-c"># Where I summary, without this line, it will not summary anything during training</span>
<span class="pl-s1">tf</span>.<span class="pl-s1">summary</span>.<span class="pl-en">scalar</span>(<span class="pl-s">'train'</span>, <span class="pl-s1">loss</span>)
<span class="pl-k">return</span> <span class="pl-s1">loss</span>
...
<span class="pl-s1">model</span>.<span class="pl-en">compile</span>(<span class="pl-s1">optimizer</span><span class="pl-c1">=</span><span class="pl-s1">optimizer_builder</span>.<span class="pl-en">build</span>(<span class="pl-s1">config</span>.<span class="pl-s1">optimizer</span>),
<span class="pl-s1">loss</span><span class="pl-c1">=</span>{<span class="pl-s1">output_layer1</span>: <span class="pl-s1">total_loss</span>},
<span class="pl-s1">metrics</span><span class="pl-c1">=</span>{<span class="pl-s1">output_layer1</span>: <span class="pl-s1">accuracy</span>})
<span class="pl-s1">estimator</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">estimator</span>.<span class="pl-en">model_to_estimator</span>(
<span class="pl-s1">keras_model</span><span class="pl-c1">=</span><span class="pl-s1">model</span>,
<span class="pl-s1">config</span><span class="pl-c1">=</span><span class="pl-s1">run_config</span>,
)
<span class="pl-s1">train_spec</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">estimator</span>.<span class="pl-v">TrainSpec</span>(
<span class="pl-s1">input_fn</span><span class="pl-c1">=</span><span class="pl-k">lambda</span>: <span class="pl-en">train_input_fn</span>(<span class="pl-s1">config</span>))
<span class="pl-s1">eval_spec</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">estimator</span>.<span class="pl-v">EvalSpec</span>(
<span class="pl-s1">input_fn</span><span class="pl-c1">=</span><span class="pl-k">lambda</span>: <span class="pl-en">eval_input_fn</span>(<span class="pl-s1">config</span>))
<span class="pl-s1">tf</span>.<span class="pl-s1">estimator</span>.<span class="pl-en">train_and_evaluate</span>(<span class="pl-s1">estimator</span>, <span class="pl-s1">train_spec</span>, <span class="pl-s1">eval_spec</span>)</pre></div>
<p dir="auto"><strong>Other info / logs</strong><br>
TensorBoard with duplicate scalars:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7609173/65102919-27da0c00-d9ff-11e9-8a46-6d00ea39a4eb.png"><img src="https://user-images.githubusercontent.com/7609173/65102919-27da0c00-d9ff-11e9-8a46-6d00ea39a4eb.png" alt="2019-09-18 10 28 17" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7609173/65102920-2872a280-d9ff-11e9-9d85-b626593688a7.png"><img src="https://user-images.githubusercontent.com/7609173/65102920-2872a280-d9ff-11e9-9d85-b626593688a7.png" alt="2019-09-18 10 27 56" style="max-width: 100%;"></a></p> | 0 |
<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><br>
Application don't launch with Angular 4.0.0-beta.8 - ES5 JavaScript with DSL.</p>
<p dir="auto">Problem to start application<br>
Unhandled Promise rejection: Cannot read property 'merge' of undefined ; Zone: ; Task: Promise.then ; Value: TypeError: Cannot read property 'merge' of undefined</p>
<p dir="auto">Problem to launch module with canActivate / canDeactivate option<br>
EXCEPTION: Uncaught (in promise): TypeError: Cannot read property '$$observable' of undefined<br>
TypeError: Cannot read property '$$observable' of undefined</p>
<p dir="auto"><strong>Expected behavior</strong><br>
Application should work normaly</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
<a href="https://plnkr.co/edit/tPtY1a31CnFqhNbzVViU?p=preview" rel="nofollow">https://plnkr.co/edit/tPtY1a31CnFqhNbzVViU?p=preview</a></p>
<p dir="auto">Problem to start application --> corrected by adding this two lines in index.html<br>
window.rxjs_observable_merge = Rx.Observable;<br>
window.rxjs_operator_share = Rx.Observable.prototype;</p>
<p dir="auto">Problem to launch module with canActivate / canDeactivate option --> corrected by adding this two lines in index.html<br>
Rx.Symbol.$$observable = Rx.Symbol.observable;<br>
window.rxjs_symbol_observable = Rx.Symbol;</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
Having application launch and work normaly</p>
<p dir="auto"><strong>Please tell us about your environment:</strong><br>
Not important !</p>
<ul dir="auto">
<li>
<p dir="auto"><strong>Angular version:</strong> 4.0.0-beta.8 and earlier (not sure !)</p>
</li>
<li>
<p dir="auto"><strong>Browser:</strong> Chrome and all others</p>
</li>
<li>
<p dir="auto"><strong>Language:</strong> ES5</p>
</li>
<li>
<p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> = Not concerned</p>
</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 => (maybe related with #12162)
[ ] feature request
[ ] support request"><pre class="notranslate"><code class="notranslate">[x] bug report => (maybe related with #12162)
[ ] feature request
[ ] support request
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
Angular runs <code class="notranslate">resolve</code> methods before APP_INITIALIZER ends.</p>
<p dir="auto"><strong>Expected behavior</strong><br>
Angular should wait for all APP_INITIALIZER promises and then run <code class="notranslate">resolve</code> functions for routes.</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
<a href="https://plnkr.co/edit/MiWgLZ?p=preview" rel="nofollow">https://plnkr.co/edit/MiWgLZ?p=preview</a></p>
<p dir="auto">Choose angular version in config.js. In Angular 2.4.8 fails, in Angular 2.4.7 works.</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
In previous versions it works.</p>
<ul dir="auto">
<li><strong>Angular version:</strong><br>
2.4.8</li>
</ul>
<p dir="auto">Maybe related with <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="181778729" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/12162" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/12162/hovercard" href="https://github.com/angular/angular/issues/12162">#12162</a></p> | 0 |
<p dir="auto"><a href="https://material.io/components/" rel="nofollow">https://material.io/components/</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/callemall/material-ui/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">No warnings</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">There is a warning</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Use a <code class="notranslate">JssProvider</code></li>
</ol>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>v1.0.0-beta.12</td>
</tr>
<tr>
<td>React</td>
<td>all</td>
</tr>
<tr>
<td>browser</td>
<td>all</td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto"><strong>Is your feature request related to a problem? Please describe.</strong><br>
When create Axios instance, there is no way to reuse the global interceptors.<br>
The issue has been discussed in the past <a href="https://github.com/axios/axios/issues/993" data-hovercard-type="issue" data-hovercard-url="/axios/axios/issues/993/hovercard">(#993)</a>, but it is no longer in progress. So I create this issue.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="test("instance not have global interceptors", () => {
axios.interceptors.response.use(response => response, error => Promise.reject(error));
const instance = axios.create();
// axios.interceptors.response.handlers => 1
// instance.interceptors.response.handlers => 0
expect(instance.interceptors.response.handlers.length).toBe(axios.interceptors.response.handlers.length); // Fail!
});"><pre class="notranslate"><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">"instance not have global interceptors"</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-s1">axios</span><span class="pl-kos">.</span><span class="pl-c1">interceptors</span><span class="pl-kos">.</span><span class="pl-c1">response</span><span class="pl-kos">.</span><span class="pl-en">use</span><span class="pl-kos">(</span><span class="pl-s1">response</span> <span class="pl-c1">=></span> <span class="pl-s1">response</span><span class="pl-kos">,</span> <span class="pl-s1">error</span> <span class="pl-c1">=></span> <span class="pl-v">Promise</span><span class="pl-kos">.</span><span class="pl-en">reject</span><span class="pl-kos">(</span><span class="pl-s1">error</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">instance</span> <span class="pl-c1">=</span> <span class="pl-s1">axios</span><span class="pl-kos">.</span><span class="pl-en">create</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// axios.interceptors.response.handlers => 1</span>
<span class="pl-c">// instance.interceptors.response.handlers => 0</span>
<span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">instance</span><span class="pl-kos">.</span><span class="pl-c1">interceptors</span><span class="pl-kos">.</span><span class="pl-c1">response</span><span class="pl-kos">.</span><span class="pl-c1">handlers</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toBe</span><span class="pl-kos">(</span><span class="pl-s1">axios</span><span class="pl-kos">.</span><span class="pl-c1">interceptors</span><span class="pl-kos">.</span><span class="pl-c1">response</span><span class="pl-kos">.</span><span class="pl-c1">handlers</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Fail!</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<details>
<summary>Reproduction</summary>
```shell
$ git clone https://github.com/genie-youn/axios-inherited-interceptors.git
$ cd axios-inherited-interceptors
$ npm i
$ npm run test
```
</details>
<p dir="auto"><strong>Describe the solution you'd like</strong><br>
Add new property <code class="notranslate">withGlobalInterceptors</code> in <code class="notranslate">AxiosRequestConfig</code></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="test("instance with `withGlobalInterceptors` options should have global interceptors ", () => {
axios.interceptors.response.use(response => response, error => Promise.reject(error));
const instance = axios.create({withGlobalInterceptors: true});
// axios.interceptors.response.handlers => 1
// instance.interceptors.response.handlers => 1
expect(instance.interceptors.response.handlers.length).toBe(axios.interceptors.response.handlers.length); // success
});"><pre class="notranslate"><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">"instance with `withGlobalInterceptors` options should have global interceptors "</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-s1">axios</span><span class="pl-kos">.</span><span class="pl-c1">interceptors</span><span class="pl-kos">.</span><span class="pl-c1">response</span><span class="pl-kos">.</span><span class="pl-en">use</span><span class="pl-kos">(</span><span class="pl-s1">response</span> <span class="pl-c1">=></span> <span class="pl-s1">response</span><span class="pl-kos">,</span> <span class="pl-s1">error</span> <span class="pl-c1">=></span> <span class="pl-v">Promise</span><span class="pl-kos">.</span><span class="pl-en">reject</span><span class="pl-kos">(</span><span class="pl-s1">error</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">instance</span> <span class="pl-c1">=</span> <span class="pl-s1">axios</span><span class="pl-kos">.</span><span class="pl-en">create</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">withGlobalInterceptors</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-c">// axios.interceptors.response.handlers => 1</span>
<span class="pl-c">// instance.interceptors.response.handlers => 1</span>
<span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">instance</span><span class="pl-kos">.</span><span class="pl-c1">interceptors</span><span class="pl-kos">.</span><span class="pl-c1">response</span><span class="pl-kos">.</span><span class="pl-c1">handlers</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toBe</span><span class="pl-kos">(</span><span class="pl-s1">axios</span><span class="pl-kos">.</span><span class="pl-c1">interceptors</span><span class="pl-kos">.</span><span class="pl-c1">response</span><span class="pl-kos">.</span><span class="pl-c1">handlers</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// success</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<h4 dir="auto">Are global interceptors inherited by instances in run time or copied when created?</h4>
<p dir="auto">IMHO, Global interceptors should be copied when instance are created.</p>
<p dir="auto">Once an instance is created, it should not be affected even if the global interceptors are changed. I think it would be easier to maintain an instance in an independent state from global.<br>
Similarly, it should not affect the global even if the interceptor of the instances are changed.</p>
<p dir="auto"><strong>Describe alternatives you've considered</strong><br>
In the thread, It was also discussed about the <code class="notranslate">extend</code>. <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bierik/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bierik">@bierik</a></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import axios from 'axios';
export const api = axios.create({
baseURL: process.env.API_ROOT,
});
api.interceptors.request.use((request) => {
request.headers.Authorization = `Bearer mytoken`;
return request;
});
// Here the pdfInstance extends the api instance so the pdfInstance has also access to the request interceptor but is also able to override the baseURL and adding additional header such as Accept
export const pdfInstance = api.extend({
baseURL: '/file',
responseType: 'arraybuffer',
headers: {
Accept: 'application/pdf',
},
});"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">axios</span> <span class="pl-k">from</span> <span class="pl-s">'axios'</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">api</span> <span class="pl-c1">=</span> <span class="pl-s1">axios</span><span class="pl-kos">.</span><span class="pl-en">create</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">baseURL</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">API_ROOT</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">api</span><span class="pl-kos">.</span><span class="pl-c1">interceptors</span><span class="pl-kos">.</span><span class="pl-c1">request</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-s1">request</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-s1">request</span><span class="pl-kos">.</span><span class="pl-c1">headers</span><span class="pl-kos">.</span><span class="pl-c1">Authorization</span> <span class="pl-c1">=</span> <span class="pl-s">`Bearer mytoken`</span><span class="pl-kos">;</span>
<span class="pl-k">return</span> <span class="pl-s1">request</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">// Here the pdfInstance extends the api instance so the pdfInstance has also access to the request interceptor but is also able to override the baseURL and adding additional header such as Accept</span>
<span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">pdfInstance</span> <span class="pl-c1">=</span> <span class="pl-s1">api</span><span class="pl-kos">.</span><span class="pl-en">extend</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">baseURL</span>: <span class="pl-s">'/file'</span><span class="pl-kos">,</span>
<span class="pl-c1">responseType</span>: <span class="pl-s">'arraybuffer'</span><span class="pl-kos">,</span>
<span class="pl-c1">headers</span>: <span class="pl-kos">{</span>
<span class="pl-c1">Accept</span>: <span class="pl-s">'application/pdf'</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>Personally</strong>, I prefer the <code class="notranslate">AxiosRequestConfig</code> way because it is simpler. <g-emoji class="g-emoji" alias="smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f604.png">😄</g-emoji></p>
<p dir="auto"><strong>Additional context</strong><br>
It’s a very personal idea. I will appreciate any feedback.</p>
<p dir="auto">I hope this feature will come into real world, and if this idea looks good, I want to implement this feature. <g-emoji class="g-emoji" alias="laughing" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f606.png">😆</g-emoji></p> | <p dir="auto">#### Summary</p>
<p dir="auto">I searched through all the issues and double checked the ones referenced in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="218798071" data-permission-text="Title is private" data-url="https://github.com/axios/axios/issues/812" data-hovercard-type="issue" data-hovercard-url="/axios/axios/issues/812/hovercard" href="https://github.com/axios/axios/issues/812">#812</a> but my problem seems to be different.</p>
<p dir="auto">My problem is that creating an instance does not copy over or use the interceptors added to the global Axios.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import Axios from "axios";
Axios.interceptors.request.use((config) => {
console.log("Global Interceptor")
return config;
});
const axiosInstance = () => {
let instance = Axios.create();
console.log(Axios.interceptors.request); // Has 1
console.log(instance.interceptors.request); // Has 0
return instance;
}
axiosInstance().post("/test", { testing: "data" }); // Doesn't output "Global Interceptor"
Axios.post("/test", { testing: "data" }); // Outputs "Global Interceptor""><pre class="notranslate"><code class="notranslate">import Axios from "axios";
Axios.interceptors.request.use((config) => {
console.log("Global Interceptor")
return config;
});
const axiosInstance = () => {
let instance = Axios.create();
console.log(Axios.interceptors.request); // Has 1
console.log(instance.interceptors.request); // Has 0
return instance;
}
axiosInstance().post("/test", { testing: "data" }); // Doesn't output "Global Interceptor"
Axios.post("/test", { testing: "data" }); // Outputs "Global Interceptor"
</code></pre></div>
<p dir="auto">#### Context</p>
<ul dir="auto">
<li>Axios version: 0.16.2</li>
<li>Environment: Webpack 2.6.1, Chrome Canary 61.0.3147.0, Mac OS X</li>
</ul> | 1 |
<p dir="auto">To generate dense feature maps (e.g. semantic segmentation) the convolution and the maxpooling operators should have the option to define "holes" in the kernel.<br>
The concept is used in the paper:<br>
Semantic Image Segmentation with Deep Convolutional Nets and Fully Connected CRFs<br>
(Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, Alan L. Yuille)</p>
<p dir="auto">and it is implemented in the excellent deeplab library based on Caffe.</p> | <p dir="auto">When a conv2d operator has a stride greater than the kernel size, the following error is thrown:<br>
<code class="notranslate">ValueError: ('stride must be less than or equal to filter size', 'stride: [2x2] filter: [Dimension(1)xDimension(1)]')</code><br>
This makes implementing the 1x1 convolutions used to reduce spatial resolution in several papers (MSRA 2015 among others) awkward. Also, a convolution with stride greater than kernel size may be unusual but is it still well defined. Fixing this may be as simple as removing this assertion.<br>
Thanks to everyone who developed TensorFlow, it's a fascinating tool.</p> | 1 |
<h1 dir="auto">ENV:</h1>
<p dir="auto">Python: 3.7.5<br>
fastapi: 0.55.1<br>
Google Chrome: Version 84.0.4147.89 (Official Build) (64-bit)</p>
<h1 dir="auto">The video record:</h1>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/10546774/88247884-f3e00f00-ccd1-11ea-888e-432551d3a8bc.gif"><img src="https://user-images.githubusercontent.com/10546774/88247884-f3e00f00-ccd1-11ea-888e-432551d3a8bc.gif" alt="record" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto">Please help.</p> | <p dir="auto">I've come across some strange behavior in automatic interactive API documentation (provided by Swagger UI)<br>
when I get to the page<br>
<code class="notranslate">http://127.0.0.1:8000/docs</code><br>
The list of routes is displayed with the parameters I have set: <code class="notranslate">prefix</code>, <code class="notranslate">tags</code>. So far, so good.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/28572064/88197701-825d7d80-cc4b-11ea-9607-79a50fa21e7c.png"><img src="https://user-images.githubusercontent.com/28572064/88197701-825d7d80-cc4b-11ea-9607-79a50fa21e7c.png" alt="Screenshot from 2020-07-22 18-43-12" style="max-width: 100%;"></a></p>
<p dir="auto">Problems begin when I click on any of the methods. A new group with the<code class="notranslate"> tags=default</code> parameter appears on the page and the endpoint that I clicked is automatically added to it. By successively clicking on all my endpoints I end up with one group with tags=default in which all my endpoints are concentrated. But I can't see their contents, because when I click on any of them I see an infinitely spinning boot.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/28572064/88197880-c0f33800-cc4b-11ea-9a09-ca6de698344b.png"><img src="https://user-images.githubusercontent.com/28572064/88197880-c0f33800-cc4b-11ea-9a09-ca6de698344b.png" alt="Screenshot from 2020-07-22 18-46-07" style="max-width: 100%;"></a><br>
This behavior is observed on both the local machine and the remote server.<br>
In the <strong>main.py</strong> file, I use this routing system</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="app.include_router(text_ocr.router, prefix='/image', tags=['image'])
app.include_router(notes.router, prefix='/notes', tags=['notes'])
app.include_router(product.router, prefix='/product', tags=['product'])"><pre class="notranslate"><code class="notranslate">app.include_router(text_ocr.router, prefix='/image', tags=['image'])
app.include_router(notes.router, prefix='/notes', tags=['notes'])
app.include_router(product.router, prefix='/product', tags=['product'])
</code></pre></div>
<p dir="auto">For the purity of the experiment, I commented on these call points and added a standard endpoint from the documentation</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# app.include_router(text_ocr.router, prefix='/image', tags=['image'])
# app.include_router(notes.router, prefix='/notes', tags=['notes'])
# app.include_router(product.router, prefix='/product', tags=['product'])
@app.get("/")
async def root():
return {"message": "Hello World"}"><pre class="notranslate"><code class="notranslate"># app.include_router(text_ocr.router, prefix='/image', tags=['image'])
# app.include_router(notes.router, prefix='/notes', tags=['notes'])
# app.include_router(product.router, prefix='/product', tags=['product'])
@app.get("/")
async def root():
return {"message": "Hello World"}
</code></pre></div>
<p dir="auto">But I got the same result.</p> | 1 |
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/22701388/67914239-7d8f0000-fbca-11e9-931d-8bda1ffeffe5.png"><img src="https://user-images.githubusercontent.com/22701388/67914239-7d8f0000-fbca-11e9-931d-8bda1ffeffe5.png" alt="" style="max-width: 100%;"></a></p> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: [run "ver" at a command prompt]
- 10.0.18362.116
- 10.0.18362.267
Windows Terminal version (if applicable):
- No
Any other software?
- No"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: [run "ver" at a command prompt]
- 10.0.18362.116
- 10.0.18362.267
Windows Terminal version (if applicable):
- No
Any other software?
- No
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ul dir="auto">
<li>Unpack the attached project: <a href="https://github.com/microsoft/terminal/files/3483795/BufferSizeBug.zip">BufferSizeBug.zip</a></li>
<li>Open in Visual Studio</li>
<li>Compile & Run</li>
<li>After a MessageBox appears: open window properties, go to Layout tab, <strong>uncheck "Wrap text output on resize"</strong>, close the properties window.</li>
<li>Press OK in the MessageBox</li>
</ul>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Conhost doesn't crash.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Conhost crashes silently.</p>
<p dir="auto">If you attach the VS debugger to conhost.exe before triggering a crash, it will show something like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="onecore\windows\core\console\open\src\buffer\out\textbuffercelliterator.cpp(49)\conhost.exe!00007FF6AD97FB34: (caller: 00007FF6AD95CACE) Exception(1) tid(22a0) 80070057 The parameter is incorrect.
Exception thrown at 0x00007FFFE34EA839 in conhost.exe: Microsoft C++ exception: wil::ResultException at memory location 0x000000EE660FDFB0."><pre class="notranslate"><code class="notranslate">onecore\windows\core\console\open\src\buffer\out\textbuffercelliterator.cpp(49)\conhost.exe!00007FF6AD97FB34: (caller: 00007FF6AD95CACE) Exception(1) tid(22a0) 80070057 The parameter is incorrect.
Exception thrown at 0x00007FFFE34EA839 in conhost.exe: Microsoft C++ exception: wil::ResultException at memory location 0x000000EE660FDFB0.
</code></pre></div>
<p dir="auto">Stack trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" KernelBase.dll!RaiseException�() Unknown
ucrtbase.dll!_CxxThrowException�() Unknown
conhost.exe!wil::details::ThrowResultExceptionInternal(struct wil::FailureInfo const &) Unknown
conhost.exe!wil::details::ReportFailure() Unknown
conhost.exe!wil::details::ReportFailure_Hr(void *,unsigned int,char const *,char const *,char const *,void *,enum wil::FailureType,long) Unknown
conhost.exe!wil::details::in1diag3::Throw_Hr(void *,unsigned int,char const *,long) Unknown
conhost.exe!TextBufferCellIterator::TextBufferCellIterator() Unknown
conhost.exe!RenderData::IsCursorDoubleWidth() Unknown
conhost.exe!Microsoft::Console::Render::Renderer::_PaintFrameForEngine() Unknown
conhost.exe!Microsoft::Console::Render::Renderer::PaintFrame() Unknown
conhost.exe!Microsoft::Console::Render::RenderThread::_ThreadProc() Unknown
kernel32.dll!BaseThreadInitThunk�() Unknown
ntdll.dll!RtlUserThreadStart�() Unknown"><pre class="notranslate"><code class="notranslate"> KernelBase.dll!RaiseException�() Unknown
ucrtbase.dll!_CxxThrowException�() Unknown
conhost.exe!wil::details::ThrowResultExceptionInternal(struct wil::FailureInfo const &) Unknown
conhost.exe!wil::details::ReportFailure() Unknown
conhost.exe!wil::details::ReportFailure_Hr(void *,unsigned int,char const *,char const *,char const *,void *,enum wil::FailureType,long) Unknown
conhost.exe!wil::details::in1diag3::Throw_Hr(void *,unsigned int,char const *,long) Unknown
conhost.exe!TextBufferCellIterator::TextBufferCellIterator() Unknown
conhost.exe!RenderData::IsCursorDoubleWidth() Unknown
conhost.exe!Microsoft::Console::Render::Renderer::_PaintFrameForEngine() Unknown
conhost.exe!Microsoft::Console::Render::Renderer::PaintFrame() Unknown
conhost.exe!Microsoft::Console::Render::RenderThread::_ThreadProc() Unknown
kernel32.dll!BaseThreadInitThunk�() Unknown
ntdll.dll!RtlUserThreadStart�() Unknown
</code></pre></div>
<p dir="auto">Presumably here: <a href="https://github.com/microsoft/terminal/blob/6c747c565b52b377410b317469efe3ef5e0beb50/src/buffer/out/textBufferCellIterator.cpp#L43">textBufferCellIterator.cpp</a></p> | 0 |
<ul dir="auto">
<li>VSCode Version: 0.10.11</li>
<li>OS Version: MacOS X El Capitan (v10.11.3)</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>After having updated my Visual Studio Code app I'm always having this info message on the top and even if I update my .bash_profile file it continues with this message in an endless loop!</li>
</ol> | <ul dir="auto">
<li>VSCode Version: 0.10.10</li>
<li>OS Version: OSX 10.11.3</li>
</ul>
<p dir="auto">On attempting to install 'code' command line, I get the following:<br>
'Please remove the 'code' alias from '/Users/kstevens/.bashrc' before continuing.'</p>
<p dir="auto">'alias' returns the following:</p>
<p dir="auto">alias acsdev='ssh -l kcs6 acsdev.acsu.buffalo.edu'<br>
alias cmsdev='ssh -l kcs6 cms-dev.acsu.buffalo.edu'<br>
alias cq_start='cd /Applications/day/5.6.1-custom-v2/crx-quickstart/bin/ && ./start && cd -'<br>
alias gcam='git commit -am'<br>
alias ls='ls -la'<br>
alias rvm-restart='rvm_reload_flag=1 source '''/Users/kstevens/.rvm/scripts/rvm''''<br>
alias sandbox='cd ~/code/src/ubcode/sandbox/kcs6'<br>
alias simple_server='python -m SimpleHTTPServer 9000'<br>
alias tree='tree'<br>
alias ubcms='cd ~/code/src/ubcode/ubcms_local/'<br>
alias ubcode='cd ~/code/src/ubcode'<br>
alias vlt='/Users/kstevens/bin/vault-cli-2.4.34/bin/vlt'</p>
<p dir="auto"><a href="https://github.com/Microsoft/vscode/files/172170/example_bashrc.txt">example_bashrc.txt</a></p>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Not sure, it might be machine specific.</li>
<li>I have included my .bashrc file. I have tried commenting out any line with 'code' in it, in case a poorly formed regex was to blame. No joy.</li>
</ol> | 1 |
<ul dir="auto">
<li>visit <a href="https://docs.opencv.org/3.4/" rel="nofollow">https://docs.opencv.org/3.4/</a> or <a href="https://docs.opencv.org/master/" rel="nofollow">https://docs.opencv.org/master/</a>, doesn't matter</li>
<li>focus search box on the top right</li>
<li>enter "split"</li>
<li>second result is a single word that <em>used to</em> expand when clicked</li>
</ul>
<p dir="auto">it doesn't now. it should. hasn't for a few weeks, now that I think back.</p>
<p dir="auto">particularly for this function, it prevented a newbie from finding the <code class="notranslate">cv::split</code> he needed.</p> | <p dir="auto">Hi,</p>
<p dir="auto">Something I don't understand. I want to read cv::split doc on <a href="http://docs.opencv.org/master" rel="nofollow">http://docs.opencv.org/master</a> I write split in search box and press return and : nothing no link. Problem occurs with edge or mozilla (windows 10) only with master doc.</p>
<p dir="auto">with my own doc I haven't got this problem.</p>
<p dir="auto">reference<a href="http://answers.opencv.org/question/123524/access-to-split-doc/" rel="nofollow"> this post</a></p> | 1 |
<p dir="auto">This works:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="df = pd.DataFrame({'A': [1, 2, 1, 2, 1, 2, 3], 'B': [1, 1, 1, 2, 2, 2, 2]})
df.groupby('B').agg(pd.Series.mode)"><pre class="notranslate"><code class="notranslate">df = pd.DataFrame({'A': [1, 2, 1, 2, 1, 2, 3], 'B': [1, 1, 1, 2, 2, 2, 2]})
df.groupby('B').agg(pd.Series.mode)
</code></pre></div>
<p dir="auto">but this doesn't:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="df.groupby('B').agg('mode')
...
AttributeError: Cannot access callable attribute 'mode' of 'DataFrameGroupBy' objects, try using the 'apply' method"><pre class="notranslate"><code class="notranslate">df.groupby('B').agg('mode')
...
AttributeError: Cannot access callable attribute 'mode' of 'DataFrameGroupBy' objects, try using the 'apply' method
</code></pre></div>
<p dir="auto">I thought all the series aggregate methods propagated automatically to groupby, but I've probably misunderstood?</p> | <h4 dir="auto">Feature Request</h4>
<p dir="auto">Hi,</p>
<p dir="auto">I use pandas a lot in my projects and I got stack with a problem of running the "mode" function (most common element) on a huge groupby object. There are few solutions available using aggregate and scipy.stats.mode, but they are unbearably slow in comparison to e.g. groupby.mean(). Thus, I would like to make a feature request to add cytonized version of groupby.mode() operator.</p>
<p dir="auto">Thanks in advance!</p>
<p dir="auto">Jan Musial</p> | 1 |
<p dir="auto">First checkmark says: Wrap your all of your checkboxes inside one div with the class "row".<br>
It should be: Wrap your text area and submit button inside one div with the class "row".</p> | <p dir="auto">One of the requirements are not fulfilled (Wrap your all of your checkboxes inside one div with the class "row".) even though the codes have fulfilled the requirement. Per checking my code 3 times, I know I have fulfilled the requirement. Kindly check and see if this is just an error on my part. Thank you.</p>
<h1 dir="auto">Here are my codes:</h1>
<style>
h2 {
font-family: Lobster, Monospace;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}
</style>
<div dir="auto">
<div dir="auto">
<h2 dir="auto">CatPhotoApp</h2>
</div>
<div dir="auto">
<a href="#"><img src="https://camo.githubusercontent.com/f1ba009cb2b5e79d9cba610fbc92f8aead0c3e4f49d07d666f81d2557c1b1f16/68747470733a2f2f6269742e6c792f6663632d6b697474656e73" data-canonical-src="https://bit.ly/fcc-kittens" style="max-width: 100%;"></a>
</div>
</div>
<br>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/3ef9ff06285f494a3b24b3e7673540b95097b44020f5d7b2c8f85df751c42fe0/687474703a2f2f6269742e6c792f6663632d6b697474656e7332"><img src="https://camo.githubusercontent.com/3ef9ff06285f494a3b24b3e7673540b95097b44020f5d7b2c8f85df751c42fe0/687474703a2f2f6269742e6c792f6663632d6b697474656e7332" data-canonical-src="http://bit.ly/fcc-kittens2" style="max-width: 100%;"></a></p>
<br>
<div dir="auto">
<div dir="auto">
<i></i> Like
</div>
<div dir="auto">
<i></i> Info
</div>
<div dir="auto">
<i></i> Delete
</div>
</div>
<p dir="auto">Things cats love:</p>
<ul dir="auto">
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p dir="auto">Top 3 things cats hate:</p>
<ol dir="auto">
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<br>
<div dir="auto">
<div dir="auto">
Indoor
</div>
<div dir="auto">
Outdoor
</div>
</div>
<div dir="auto">
<div dir="auto"> Loving
</div>
<div dir="auto"> Lazy
</div>
<div dir="auto"> Crazy
</div>
</div>
<br>
<div dir="auto">
</div>
<div dir="auto">
<i></i> Submit</div>
#
<p dir="auto">Here is a screenshot:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/10734660/7830843/8e5963a0-0483-11e5-8a3c-98cc647d60d8.png"><img src="https://cloud.githubusercontent.com/assets/10734660/7830843/8e5963a0-0483-11e5-8a3c-98cc647d60d8.png" alt="error" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">Playpen: <a href="http://is.gd/XdDyHg" rel="nofollow">http://is.gd/XdDyHg</a></p>
<p dir="auto">Inline:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pub trait Editor<Cntx> where Cntx: Context<Self> {}
pub trait Context<Edtr> where Edtr: Editor<Self> {}"><pre class="notranslate"><span class="pl-k">pub</span> <span class="pl-k">trait</span> <span class="pl-smi">Editor</span><span class="pl-kos"><</span><span class="pl-smi">Cntx</span><span class="pl-kos">></span> <span class="pl-k">where</span> <span class="pl-smi">Cntx</span><span class="pl-kos">:</span> <span class="pl-smi">Context</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-k">pub</span> <span class="pl-k">trait</span> <span class="pl-smi">Context</span><span class="pl-kos"><</span><span class="pl-smi">Edtr</span><span class="pl-kos">></span> <span class="pl-k">where</span> <span class="pl-smi">Edtr</span><span class="pl-kos">:</span> <span class="pl-smi">Editor</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></pre></div>
<p dir="auto">Failure:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="task 'rustc' has overflowed its stack"><pre class="notranslate"><code class="notranslate">task 'rustc' has overflowed its stack
</code></pre></div> | <p dir="auto">This code causes rustc's stack to overflow:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="trait Hash<H: Hasher> { }
trait Hasher<H: Hash> { }
trait StreamHash<H: StreamHasher>: Hash<H> { }
trait StreamHasher<H: StreamHash>: Hasher<H> { }
fn main() {
}"><pre class="notranslate"><code class="notranslate">trait Hash<H: Hasher> { }
trait Hasher<H: Hash> { }
trait StreamHash<H: StreamHasher>: Hash<H> { }
trait StreamHasher<H: StreamHash>: Hasher<H> { }
fn main() {
}
</code></pre></div>
<p dir="auto">As a workaround, you can break up the recursion with another trait:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="trait Hash { }
trait Hasher<H: Hash> { }
trait Stream { }
trait StreamHash<S: Stream>: Hash { }
trait StreamHasher<H: StreamHash<Self>>: Stream + Hasher<H> { }
fn main() { }"><pre class="notranslate"><code class="notranslate">trait Hash { }
trait Hasher<H: Hash> { }
trait Stream { }
trait StreamHash<S: Stream>: Hash { }
trait StreamHasher<H: StreamHash<Self>>: Stream + Hasher<H> { }
fn main() { }
</code></pre></div> | 1 |
<p dir="auto">"axios": "^0.19.0"</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import axios, { AxiosRequestConfig } from 'axios'
axios.defaults.crossDomain = true //Property 'crossDomain' does not exist on type 'AxiosRequestConfig'. TS (2339)"><pre class="notranslate"><code class="notranslate">import axios, { AxiosRequestConfig } from 'axios'
axios.defaults.crossDomain = true //Property 'crossDomain' does not exist on type 'AxiosRequestConfig'. TS (2339)
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export interface AxiosRequestConfig {
url?: string;
method?: Method;
baseURL?: string;
transformRequest?: AxiosTransformer | AxiosTransformer[];
transformResponse?: AxiosTransformer | AxiosTransformer[];
headers?: any;
params?: any;
paramsSerializer?: (params: any) => string;
data?: any;
timeout?: number;
withCredentials?: boolean;
adapter?: AxiosAdapter;
auth?: AxiosBasicCredentials;
responseType?: ResponseType;
xsrfCookieName?: string;
xsrfHeaderName?: string;
onUploadProgress?: (progressEvent: any) => void;
onDownloadProgress?: (progressEvent: any) => void;
maxContentLength?: number;
validateStatus?: (status: number) => boolean;
maxRedirects?: number;
socketPath?: string | null;
httpAgent?: any;
httpsAgent?: any;
proxy?: AxiosProxyConfig | false;
cancelToken?: CancelToken;
}"><pre class="notranslate"><code class="notranslate">export interface AxiosRequestConfig {
url?: string;
method?: Method;
baseURL?: string;
transformRequest?: AxiosTransformer | AxiosTransformer[];
transformResponse?: AxiosTransformer | AxiosTransformer[];
headers?: any;
params?: any;
paramsSerializer?: (params: any) => string;
data?: any;
timeout?: number;
withCredentials?: boolean;
adapter?: AxiosAdapter;
auth?: AxiosBasicCredentials;
responseType?: ResponseType;
xsrfCookieName?: string;
xsrfHeaderName?: string;
onUploadProgress?: (progressEvent: any) => void;
onDownloadProgress?: (progressEvent: any) => void;
maxContentLength?: number;
validateStatus?: (status: number) => boolean;
maxRedirects?: number;
socketPath?: string | null;
httpAgent?: any;
httpsAgent?: any;
proxy?: AxiosProxyConfig | false;
cancelToken?: CancelToken;
}
</code></pre></div>
<p dir="auto"><strong>There is no “crossDomain” in interface</strong></p> | <h4 dir="auto">Summary</h4>
<p dir="auto">Allow for typesafe extension of AxiosConfiguration</p>
<h4 dir="auto">Context</h4>
<p dir="auto">Allow for the following user case (without the cast)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" interface Config extends AxiosRequestConfig {
start?: Date
}
const requestConfig: Config = {
...
}
const instance = axios.create(requestConfig)
instance.interceptors.request.use(axiosConfig => {
const config = axiosConfig as Config // Cast is needed as axiosConfig is infered to AxiosConfiguration and not Config
config.start = new Date()
return config
})
"><pre class="notranslate"><code class="notranslate"> interface Config extends AxiosRequestConfig {
start?: Date
}
const requestConfig: Config = {
...
}
const instance = axios.create(requestConfig)
instance.interceptors.request.use(axiosConfig => {
const config = axiosConfig as Config // Cast is needed as axiosConfig is infered to AxiosConfiguration and not Config
config.start = new Date()
return config
})
</code></pre></div> | 1 |
<h5 dir="auto">ISSUE TYPE</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">ansible</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible-playbook 2.3.0 (detached HEAD ba39d1158c) last updated 2017/02/01 12:45:19 (GMT +200)
config file =
configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible-playbook 2.3.0 (detached HEAD ba39d1158c) last updated 2017/02/01 12:45:19 (GMT +200)
config file =
configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Handler skipped when same role is called multiple times using "when"</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible-playbook test.yml -e run_first=false -e run_second=true"><pre class="notranslate"><code class="notranslate">ansible-playbook test.yml -e run_first=false -e run_second=true
</code></pre></div>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---
- hosts: localhost
connection: local
roles:
- { role: a, params: aaa, when: run_first }
- { role: a, params: bbb, when: run_second }"><pre class="notranslate">---
- <span class="pl-ent">hosts</span>: <span class="pl-s">localhost</span>
<span class="pl-ent">connection</span>: <span class="pl-s">local</span>
<span class="pl-ent">roles</span>:
- <span class="pl-s">{ role: a, params: aaa, when: run_first }</span>
- <span class="pl-s">{ role: a, params: bbb, when: run_second }</span></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [localhost] *********************************************************************************************************************************
TASK [Gathering Facts] ***************************************************************************************************************************
ok: [localhost]
TASK [a : command] *******************************************************************************************************************************
skipping: [localhost]
TASK [a : command] *******************************************************************************************************************************
changed: [localhost]
RUNNING HANDLER [a : exec_me] ********************************************************************************************************************
ok: [localhost] => {
"msg": "exec_me!"
}
PLAY RECAP ***************************************************************************************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0"><pre class="notranslate"><code class="notranslate">PLAY [localhost] *********************************************************************************************************************************
TASK [Gathering Facts] ***************************************************************************************************************************
ok: [localhost]
TASK [a : command] *******************************************************************************************************************************
skipping: [localhost]
TASK [a : command] *******************************************************************************************************************************
changed: [localhost]
RUNNING HANDLER [a : exec_me] ********************************************************************************************************************
ok: [localhost] => {
"msg": "exec_me!"
}
PLAY RECAP ***************************************************************************************************************************************
localhost : ok=2 changed=1 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="PLAY [localhost] *********************************************************************************************************************************
TASK [Gathering Facts] ***************************************************************************************************************************
ok: [localhost]
TASK [a : command] *******************************************************************************************************************************
skipping: [localhost]
TASK [a : command] *******************************************************************************************************************************
changed: [localhost]
RUNNING HANDLER [a : exec_me] ********************************************************************************************************************
skipping: [localhost]
PLAY RECAP ***************************************************************************************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0"><pre class="notranslate"><code class="notranslate">PLAY [localhost] *********************************************************************************************************************************
TASK [Gathering Facts] ***************************************************************************************************************************
ok: [localhost]
TASK [a : command] *******************************************************************************************************************************
skipping: [localhost]
TASK [a : command] *******************************************************************************************************************************
changed: [localhost]
RUNNING HANDLER [a : exec_me] ********************************************************************************************************************
skipping: [localhost]
PLAY RECAP ***************************************************************************************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0
</code></pre></div> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">become</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.3.0.0
config file = /usr/home/svc/ansible/test-playbook/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.13 (default, Apr 15 2017, 01:13:03) [GCC 4.2.1 Compatible FreeBSD Clang 3.8.0 (tags/RELEASE_380/final 262564)]"><pre class="notranslate"><code class="notranslate">ansible 2.3.0.0
config file = /usr/home/svc/ansible/test-playbook/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.13 (default, Apr 15 2017, 01:13:03) [GCC 4.2.1 Compatible FreeBSD Clang 3.8.0 (tags/RELEASE_380/final 262564)]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[defaults]
transport = paramiko
become_ask_pass = True
host_key_checking = False
[ssh_connection]
ssh_args=-o ForwardAgent=yes"><pre class="notranslate"><code class="notranslate">[defaults]
transport = paramiko
become_ask_pass = True
host_key_checking = False
[ssh_connection]
ssh_args=-o ForwardAgent=yes
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ uname -a
FreeBSD bsd11.ring.local 11.0-RELEASE-p9 FreeBSD 11.0-RELEASE-p9 #0: Tue Apr 11 08:48:40 UTC 2017 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64"><pre class="notranslate"><code class="notranslate">$ uname -a
FreeBSD bsd11.ring.local 11.0-RELEASE-p9 FreeBSD 11.0-RELEASE-p9 #0: Tue Apr 11 08:48:40 UTC 2017 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64
</code></pre></div>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">I'm trying to use a task I've been using with Ansible 2.2.1 on FreeBSD 11 with no problem. But since 2.3.0, Ansible just hangs there on the <code class="notranslate">su</code> command.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">I'm using 2 FreeBSD VM, both install on FreeBSD 11.0 with latest security patches and latest packages installed (<code class="notranslate">pkg install ansible</code>). I'm connecting to the remote VM (vm2) from the local VM (vm1) with a freshly created user with in the <code class="notranslate">wheel</code> group.<br>
Command used:<br>
<code class="notranslate">ansible-playbook -vvvvv -i hosts -u remoteuser -k -K site.yml</code></p>
<p dir="auto"><code class="notranslate">hosts</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[hosts]
vm2 ansible_python_interpreter=/usr/local/bin/python"><pre class="notranslate"><code class="notranslate">[hosts]
vm2 ansible_python_interpreter=/usr/local/bin/python
</code></pre></div>
<p dir="auto"><code class="notranslate">site.yml</code>:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- hosts: all
become: yes
become_method: su
become_user: root
gather_facts: False
vars:
ansible_python_interpreter: "/usr/local/bin/python"
tasks:
- name: anything
raw: '{{ item }}'
with_items:
- '/usr/bin/true'"><pre class="notranslate">- <span class="pl-ent">hosts</span>: <span class="pl-s">all</span>
<span class="pl-ent">become</span>: <span class="pl-s">yes</span>
<span class="pl-ent">become_method</span>: <span class="pl-s">su</span>
<span class="pl-ent">become_user</span>: <span class="pl-s">root</span>
<span class="pl-ent">gather_facts</span>: <span class="pl-c1">False</span>
<span class="pl-ent">vars</span>:
<span class="pl-ent">ansible_python_interpreter</span>: <span class="pl-s"><span class="pl-pds">"</span>/usr/local/bin/python<span class="pl-pds">"</span></span>
<span class="pl-ent">tasks</span>:
- <span class="pl-ent">name</span>: <span class="pl-s">anything</span>
<span class="pl-ent">raw</span>: <span class="pl-s"><span class="pl-pds">'</span>{{ item }}<span class="pl-pds">'</span></span>
<span class="pl-ent">with_items</span>:
- <span class="pl-s"><span class="pl-pds">'</span>/usr/bin/true<span class="pl-pds">'</span></span></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">To get after the <code class="notranslate">/usr/bin/true</code> command and to get back to the shell command line.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">The <code class="notranslate">su</code> root command just hangs there.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Using /usr/home/svc/ansible/test-playbook/ansible.cfg as config file
SSH password:
SUDO password[defaults to SSH password]:
Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
PLAYBOOK: site.yml ******************************************************************************************************************************************************************************************
1 plays in site.yml
PLAY [all] **************************************************************************************************************************************************************************************************
META: ran handlers
TASK [anything] *********************************************************************************************************************************************************************************************
task path: /usr/home/svc/ansible/test-playbook/site.yml:10
<vm2> ESTABLISH CONNECTION FOR USER: remoteuser on PORT 22 TO vm2
<vm2> EXEC su root -c '/bin/sh -c '"'"'echo BECOME-SUCCESS-kvmxtpgoosuvnjtekyyixwwqgkxffkpd; /usr/bin/true'"'"''"><pre class="notranslate"><code class="notranslate">Using /usr/home/svc/ansible/test-playbook/ansible.cfg as config file
SSH password:
SUDO password[defaults to SSH password]:
Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
PLAYBOOK: site.yml ******************************************************************************************************************************************************************************************
1 plays in site.yml
PLAY [all] **************************************************************************************************************************************************************************************************
META: ran handlers
TASK [anything] *********************************************************************************************************************************************************************************************
task path: /usr/home/svc/ansible/test-playbook/site.yml:10
<vm2> ESTABLISH CONNECTION FOR USER: remoteuser on PORT 22 TO vm2
<vm2> EXEC su root -c '/bin/sh -c '"'"'echo BECOME-SUCCESS-kvmxtpgoosuvnjtekyyixwwqgkxffkpd; /usr/bin/true'"'"''
</code></pre></div>
<p dir="auto">Just adding a few more informations:<br>
for Ansible 2.3.0, the current dependencies are:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ pkg info -d ansible
ansible-2.3.0.0:
py27-pycrypto-2.6.1_1
py27-paramiko-2.0.5
py27-netaddr-0.7.18
python27-2.7.13_2
py27-setuptools-32.1.0_1
py27-yaml-3.11_2
py27-Jinja2-2.9.5"><pre class="notranslate"><code class="notranslate">$ pkg info -d ansible
ansible-2.3.0.0:
py27-pycrypto-2.6.1_1
py27-paramiko-2.0.5
py27-netaddr-0.7.18
python27-2.7.13_2
py27-setuptools-32.1.0_1
py27-yaml-3.11_2
py27-Jinja2-2.9.5
</code></pre></div>
<p dir="auto">On the working Ansible version 2.2.1 (on another server), dependencies are:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ pkg info -d ansible
ansible-2.2.1.0:
py27-pycrypto-2.6.1_1
py27-paramiko-2.0.5
py27-netaddr-0.7.18
python27-2.7.13_1
py27-setuptools-32.1.0_1
py27-yaml-3.11_2
py27-Jinja2-2.8"><pre class="notranslate"><code class="notranslate">$ pkg info -d ansible
ansible-2.2.1.0:
py27-pycrypto-2.6.1_1
py27-paramiko-2.0.5
py27-netaddr-0.7.18
python27-2.7.13_1
py27-setuptools-32.1.0_1
py27-yaml-3.11_2
py27-Jinja2-2.8
</code></pre></div> | 0 |
<ul dir="auto">
<li>VSCode Version:0.10.11 stable, 0.10.14-insiders</li>
<li>OS Version:Windows 7</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Follow the CSS transpiling section and create a tasks.json with 'node-sass' as the command.</li>
<li>Save tasks.json</li>
<li>Ctrl+Shift+B to Run Build Task</li>
</ol>
<p dir="auto">"No task runner configured." error displayed.</p>
<ol dir="auto">
<li>Restart VS Code in the same folder.</li>
</ol>
<p dir="auto">'node-sass' now runs correctly</p> | <ul dir="auto">
<li>VSCode Version:0.10.11 stable, 0.10.14-insiders</li>
<li>OS Version:Windows 7</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Follow the CSS transpiling section and create a tasks.json with 'node-sass' as the command.</li>
<li>Save tasks.json</li>
<li>Restart VS Code</li>
<li>Ctrl+Shift+B to Run Build Task</li>
</ol>
<p dir="auto">Rendering Complete, saving .css file...<br>
Wrote CSS to ...</p>
<p dir="auto">No .css file shows up in the Explorer</p>
<ol dir="auto">
<li>Restart VS Code in the same folder.</li>
</ol>
<p dir="auto">Now <code class="notranslate">styles.css</code> is displayed</p> | 1 |
<p dir="auto">Neo4J Version 2.1.1 - new install (tarball).</p>
<p dir="auto">Go to /browser/ in web browser and you will find that the following HTTP requests are constantly spinning:</p>
<p dir="auto">OPTIONS <a href="http://192.168.1.152:7474/db/data" rel="nofollow">http://192.168.1.152:7474/db/data</a> [HTTP/1.1 302 Found 0ms]<br>
OPTIONS <a href="http://192.168.1.152:7474/db/data/" rel="nofollow">http://192.168.1.152:7474/db/data/</a> [HTTP/1.1 204 No Content 0ms]</p>
<p dir="auto">It causes the browser to become unresponsive with regular freezes (in Ubuntu). Profiling the javascript code using firefox console shows that more than 50% of time is spent in: WCF__flushMessageQueue. Will enclose screenshot.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5285227/3173488/cf5fa0d2-ebe6-11e3-9ec1-3cd13d099dec.png"><img src="https://cloud.githubusercontent.com/assets/5285227/3173488/cf5fa0d2-ebe6-11e3-9ec1-3cd13d099dec.png" alt="screenshot from 2014-06-04 13 16 37" style="max-width: 100%;"></a></p> | <p dir="auto">On all systems I tried Neo4j, the web interface is causing high CPU usage, even if nothing is happen. On a Mac Mini 5.1 with OS X 10.9.3 in Safari this leads to 70-75% CPU usage, on a Windows 8 PC with AMD Phenom II X4 it reaches 35%. The same on my notebook with Intel Core 7. The java server process itself has not high usage.</p> | 1 |
<p dir="auto">Hello,</p>
<p dir="auto">I had reopened an old closed issue. I think it might be wiser to create a new one.</p>
<p dir="auto">I have been trying to understand why the <code class="notranslate">colors_ratio</code> parameter of the <code class="notranslate">clustermap</code> was never working for me.</p>
<p dir="auto">I am running python3.8, with seaborn0.10.1 and my call is the following:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="sns.clustermap(np.log2(1.01+merged[merged.columns[8:-12]].loc[rand].T),col_cluster=False, standard_scale=0, colors_ratio=0.7, col_colors = data, figsize=(30,20), xticklabels=False)
fig.ax_col_dendrogram.set_visible(False)"><pre class="notranslate"><span class="pl-s1">sns</span>.<span class="pl-en">clustermap</span>(<span class="pl-s1">np</span>.<span class="pl-en">log2</span>(<span class="pl-c1">1.01</span><span class="pl-c1">+</span><span class="pl-s1">merged</span>[<span class="pl-s1">merged</span>.<span class="pl-s1">columns</span>[<span class="pl-c1">8</span>:<span class="pl-c1">-</span><span class="pl-c1">12</span>]].<span class="pl-s1">loc</span>[<span class="pl-s1">rand</span>].<span class="pl-v">T</span>),<span class="pl-s1">col_cluster</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">standard_scale</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">colors_ratio</span><span class="pl-c1">=</span><span class="pl-c1">0.7</span>, <span class="pl-s1">col_colors</span> <span class="pl-c1">=</span> <span class="pl-s1">data</span>, <span class="pl-s1">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">30</span>,<span class="pl-c1">20</span>), <span class="pl-s1">xticklabels</span><span class="pl-c1">=</span><span class="pl-c1">False</span>)
<span class="pl-s1">fig</span>.<span class="pl-s1">ax_col_dendrogram</span>.<span class="pl-en">set_visible</span>(<span class="pl-c1">False</span>)</pre></div>
<p dir="auto">but I have been trying without all possible parameters and array sizes and I was never able to make this parameter work (except is set at 0). I always seem to get the same error:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ValueError: Width and height specified must be non-negative:"><pre class="notranslate"><span class="pl-v">ValueError</span>: <span class="pl-v">Width</span> <span class="pl-c1">and</span> <span class="pl-s1">height</span> <span class="pl-s1">specified</span> <span class="pl-s1">must</span> <span class="pl-s1">be</span> <span class="pl-s1">non</span><span class="pl-c1">-</span><span class="pl-s1">negative</span>:</pre></div>
<p dir="auto">with the following stacktrace:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="~/.local/lib/python3.8/site-packages/seaborn/matrix.py in clustermap(data, pivot_kws, method, metric, z_score, standard_scale, figsize, cbar_kws, row_cluster, col_cluster, row_linkage, col_linkage, row_colors, col_colors, mask, dendrogram_ratio, colors_ratio, cbar_pos, tree_kws, **kwargs)
1379
1380 """
-> 1381 plotter = ClusterGrid(data, pivot_kws=pivot_kws, figsize=figsize,
1382 row_colors=row_colors, col_colors=col_colors,
1383 z_score=z_score, standard_scale=standard_scale,
~/.local/lib/python3.8/site-packages/seaborn/matrix.py in __init__(self, data, pivot_kws, z_score, standard_scale, figsize, row_colors, col_colors, mask, dendrogram_ratio, colors_ratio, cbar_pos)
825 height_ratios=height_ratios)
826
--> 827 self.ax_row_dendrogram = self.fig.add_subplot(self.gs[-1, 0])
828 self.ax_col_dendrogram = self.fig.add_subplot(self.gs[0, -1])
829 self.ax_row_dendrogram.set_axis_off()
~/.local/lib/python3.8/site-packages/matplotlib/figure.py in add_subplot(self, *args, **kwargs)
1417 self._axstack.remove(ax)
1418
-> 1419 a = subplot_class_factory(projection_class)(self, *args, **kwargs)
1420
1421 return self._add_axes_internal(key, a)
~/.local/lib/python3.8/site-packages/matplotlib/axes/_subplots.py in __init__(self, fig, *args, **kwargs)
74
75 # _axes_class is set in the subplot_class_factory
---> 76 self._axes_class.__init__(self, fig, self.figbox, **kwargs)
77 # add a layout box to this, for both the full axis, and the poss
78 # of the axis. We need both because the axes may become smaller
~/.local/lib/python3.8/site-packages/matplotlib/axes/_base.py in __init__(self, fig, rect, facecolor, frameon, sharex, sharey, label, xscale, yscale, **kwargs)
422 self._position = mtransforms.Bbox.from_bounds(*rect)
423 if self._position.width < 0 or self._position.height < 0:
--> 424 raise ValueError('Width and height specified must be non-negative')
425 self._originalPosition = self._position.frozen()
426 self.axes = self
ValueError: Width and height specified must be non-negative "><pre class="notranslate"><span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">8</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">seaborn</span><span class="pl-c1">/</span><span class="pl-s1">matrix</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">clustermap</span>(<span class="pl-s1">data</span>, <span class="pl-s1">pivot_kws</span>, <span class="pl-s1">method</span>, <span class="pl-s1">metric</span>, <span class="pl-s1">z_score</span>, <span class="pl-s1">standard_scale</span>, <span class="pl-s1">figsize</span>, <span class="pl-s1">cbar_kws</span>, <span class="pl-s1">row_cluster</span>, <span class="pl-s1">col_cluster</span>, <span class="pl-s1">row_linkage</span>, <span class="pl-s1">col_linkage</span>, <span class="pl-s1">row_colors</span>, <span class="pl-s1">col_colors</span>, <span class="pl-s1">mask</span>, <span class="pl-s1">dendrogram_ratio</span>, <span class="pl-s1">colors_ratio</span>, <span class="pl-s1">cbar_pos</span>, <span class="pl-s1">tree_kws</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
<span class="pl-c1">1379</span>
<span class="pl-c1">1380</span> """
<span class="pl-c1">-></span> <span class="pl-c1">1381</span> <span class="pl-s1">plotter</span> <span class="pl-c1">=</span> <span class="pl-v">ClusterGrid</span>(<span class="pl-s1">data</span>, <span class="pl-s1">pivot_kws</span><span class="pl-c1">=</span><span class="pl-s1">pivot_kws</span>, <span class="pl-s1">figsize</span><span class="pl-c1">=</span><span class="pl-s1">figsize</span>,
<span class="pl-c1">1382</span> <span class="pl-s1">row_colors</span><span class="pl-c1">=</span><span class="pl-s1">row_colors</span>, <span class="pl-s1">col_colors</span><span class="pl-c1">=</span><span class="pl-s1">col_colors</span>,
<span class="pl-c1">1383</span> <span class="pl-s1">z_score</span><span class="pl-c1">=</span><span class="pl-s1">z_score</span>, <span class="pl-s1">standard_scale</span><span class="pl-c1">=</span><span class="pl-s1">standard_scale</span>,
<span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">8</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">seaborn</span><span class="pl-c1">/</span><span class="pl-s1">matrix</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">data</span>, <span class="pl-s1">pivot_kws</span>, <span class="pl-s1">z_score</span>, <span class="pl-s1">standard_scale</span>, <span class="pl-s1">figsize</span>, <span class="pl-s1">row_colors</span>, <span class="pl-s1">col_colors</span>, <span class="pl-s1">mask</span>, <span class="pl-s1">dendrogram_ratio</span>, <span class="pl-s1">colors_ratio</span>, <span class="pl-s1">cbar_pos</span>)
<span class="pl-c1">825</span> <span class="pl-s1">height_ratios</span><span class="pl-c1">=</span><span class="pl-s1">height_ratios</span>)
<span class="pl-c1">826</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">827</span> <span class="pl-s1">self</span>.<span class="pl-s1">ax_row_dendrogram</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">fig</span>.<span class="pl-en">add_subplot</span>(<span class="pl-s1">self</span>.<span class="pl-s1">gs</span>[<span class="pl-c1">-</span><span class="pl-c1">1</span>, <span class="pl-c1">0</span>])
<span class="pl-c1">828</span> <span class="pl-s1">self</span>.<span class="pl-s1">ax_col_dendrogram</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">fig</span>.<span class="pl-en">add_subplot</span>(<span class="pl-s1">self</span>.<span class="pl-s1">gs</span>[<span class="pl-c1">0</span>, <span class="pl-c1">-</span><span class="pl-c1">1</span>])
<span class="pl-c1">829</span> <span class="pl-s1">self</span>.<span class="pl-s1">ax_row_dendrogram</span>.<span class="pl-en">set_axis_off</span>()
<span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">8</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">matplotlib</span><span class="pl-c1">/</span><span class="pl-s1">figure</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">add_subplot</span>(<span class="pl-s1">self</span>, <span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
<span class="pl-c1">1417</span> <span class="pl-s1">self</span>.<span class="pl-s1">_axstack</span>.<span class="pl-en">remove</span>(<span class="pl-s1">ax</span>)
<span class="pl-c1">1418</span>
<span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">1419</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-en">subplot_class_factory</span>(<span class="pl-s1">projection_class</span>)(<span class="pl-s1">self</span>, <span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
<span class="pl-c1">1420</span>
<span class="pl-c1">1421</span> <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_add_axes_internal</span>(<span class="pl-s1">key</span>, <span class="pl-s1">a</span>)
<span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">8</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">matplotlib</span><span class="pl-c1">/</span><span class="pl-s1">axes</span><span class="pl-c1">/</span><span class="pl-s1">_subplots</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">fig</span>, <span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
<span class="pl-c1">74</span>
<span class="pl-c1">75</span> <span class="pl-c"># _axes_class is set in the subplot_class_factory</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">76</span> <span class="pl-s1">self</span>.<span class="pl-s1">_axes_class</span>.<span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">fig</span>, <span class="pl-s1">self</span>.<span class="pl-s1">figbox</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
<span class="pl-c1">77</span> <span class="pl-c"># add a layout box to this, for both the full axis, and the poss</span>
<span class="pl-c1">78</span> <span class="pl-c"># of the axis. We need both because the axes may become smaller</span>
<span class="pl-c1">~</span><span class="pl-c1">/</span>.<span class="pl-s1">local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">8</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">matplotlib</span><span class="pl-c1">/</span><span class="pl-s1">axes</span><span class="pl-c1">/</span><span class="pl-s1">_base</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">fig</span>, <span class="pl-s1">rect</span>, <span class="pl-s1">facecolor</span>, <span class="pl-s1">frameon</span>, <span class="pl-s1">sharex</span>, <span class="pl-s1">sharey</span>, <span class="pl-s1">label</span>, <span class="pl-s1">xscale</span>, <span class="pl-s1">yscale</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
<span class="pl-c1">422</span> <span class="pl-s1">self</span>.<span class="pl-s1">_position</span> <span class="pl-c1">=</span> <span class="pl-s1">mtransforms</span>.<span class="pl-v">Bbox</span>.<span class="pl-en">from_bounds</span>(<span class="pl-c1">*</span><span class="pl-s1">rect</span>)
<span class="pl-c1">423</span> <span class="pl-k">if</span> <span class="pl-s1">self</span>.<span class="pl-s1">_position</span>.<span class="pl-s1">width</span> <span class="pl-c1"><</span> <span class="pl-c1">0</span> <span class="pl-c1">or</span> <span class="pl-s1">self</span>.<span class="pl-s1">_position</span>.<span class="pl-s1">height</span> <span class="pl-c1"><</span> <span class="pl-c1">0</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">424</span> <span class="pl-s1">raise</span> <span class="pl-v">ValueError</span>(<span class="pl-s">'Width and height specified must be non-negative'</span>)
<span class="pl-c1">425</span> <span class="pl-s1">self</span>.<span class="pl-s1">_originalPosition</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">_position</span>.<span class="pl-en">frozen</span>()
<span class="pl-c1">426</span> <span class="pl-s1">self</span>.<span class="pl-s1">axes</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>
<span class="pl-v">ValueError</span>: <span class="pl-v">Width</span> <span class="pl-c1">and</span> <span class="pl-s1">height</span> <span class="pl-s1">specified</span> <span class="pl-s1">must</span> <span class="pl-s1">be</span> <span class="pl-s1">non</span><span class="pl-c1">-</span><span class="pl-s1">negative</span> </pre></div>
<p dir="auto">Would you be able to help me on this?</p>
<p dir="auto">Thanks for having implemented this feature in the first place,</p>
<p dir="auto">Best,</p> | <p dir="auto">I have a custom legend and colors aren't matching well.<br>
Is there a workaround? Is this intended?</p> | 0 |
<p dir="auto">we have setup one kubernetes cluster to test the HA if support to transfer the container with the cinder volume plugin. I have three nodes. One Master Node, and two Nodes are minion nodes. I install with cinder volume plugin successfully.<br>
1.I use the case to create the pod on A minion node. It can run well. And the cinder can also be attached to the container.<br>
apiVersion: v1<br>
kind: ReplicationController<br>
metadata:<br>
name: wqonlynginx<br>
spec:<br>
replicas: 1<br>
selector:<br>
name: wqonlynginx<br>
template:<br>
metadata:<br>
labels:<br>
name: wqonlynginx<br>
spec:<br>
containers:<br>
- name: wqonlynginx<br>
image: nginx<br>
ports:<br>
- containerPort: 6379<br>
resources:<br>
limits:<br>
cpu: "0.1"<br>
volumeMounts:<br>
- mountPath: /nginx-data<br>
name: data<br>
volumes:<br>
- name: data<br>
cinder:<br>
# Enter the volume ID below<br>
volumeID: 37ef6468-dfde-4468-8317-2c4142a6827f<br>
fsType: ext4<br>
2. I stop the A minion by the command "nova stop instance_id", But I find the status of pod is ContainerCreating all the time. I find the cinder volume isn't attached to the B minion node if HA supports, and the B minion node don't find the container to be transfered.</p>
<p dir="auto">From our test, it seems kubernetes HA Not support this container with cinder volume plugin to transfer to the another minion node.<br>
Could any kubernetes developers confirmed that ?</p> | <p dir="auto">Even after extending/randomizing the server timeout I see too many watch window expirations. This leads to concurrent lists (it has dropped from > 50, to >30 < 50). There are periods when we get one expiration a second, and times when we have > 20 on the same second.</p>
<p dir="auto">I can boil this down to cpu starvation of the go-etcd watcher:<br>
<a href="https://github.com/coreos/go-etcd/blob/master/etcd/watch.go#L39">https://github.com/coreos/go-etcd/blob/master/etcd/watch.go#L39</a></p>
<p dir="auto">And reproduce it with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="go test -bench BenchmarkPodList -bench-pods 3000 -bench-tasks 100 -bench-quiet 3 -tags 'benchmark'"><pre class="notranslate"><code class="notranslate">go test -bench BenchmarkPodList -bench-pods 3000 -bench-tasks 100 -bench-quiet 3 -tags 'benchmark'
</code></pre></div>
<p dir="auto">while concurrently setting up a cpu starved watch:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="func TestEtcdWatch() {
client := etcd.NewClient()
var yield sync.Mutex
go func() {
for {
yield.Lock()
yield.Unlock()
}
}()
go func() {
if _, err := client.Watch(Key, waitIndex, true, incomingCh, stopCh); err != nil {
errCh <- err
}
}()
for {
select {
case res := <-incomingCh:
glog.Infof("Got result %v", res)
case err := <-errCh:
glog.Fatalf("Got error %v", err)
}
}
}
"><pre class="notranslate"><code class="notranslate">func TestEtcdWatch() {
client := etcd.NewClient()
var yield sync.Mutex
go func() {
for {
yield.Lock()
yield.Unlock()
}
}()
go func() {
if _, err := client.Watch(Key, waitIndex, true, incomingCh, stopCh); err != nil {
errCh <- err
}
}()
for {
select {
case res := <-incomingCh:
glog.Infof("Got result %v", res)
case err := <-errCh:
glog.Fatalf("Got error %v", err)
}
}
}
</code></pre></div>
<p dir="auto">I don't think this is s pathological test case. We hammer cpu on our n1-standard-4 master, and in reality we have 100's of open watches (and each of those 3000 pods will send at least 7 events).</p>
<p dir="auto">There are a few solutions:</p>
<ol dir="auto">
<li>Make the etcd watch window a command line parameter and bump it up to 5000.</li>
<li>Etcd server supports stream watching.</li>
<li>We Implement a cache with a custom watch window.</li>
</ol>
<p dir="auto">I've tested 1 and it seems to work (haven't investigated tradeoffs of larger window). 2, 3 are probably not going to happen for 1.0.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lavalamp/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lavalamp">@lavalamp</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/fgrzadkowski/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/fgrzadkowski">@fgrzadkowski</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/wojtek-t/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/wojtek-t">@wojtek-t</a></p> | 0 |
<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">Route redirect on signout should work as expected.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Signout won't work the first time if user is already signed in when loading the page.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Signin</li>
<li>Reload the page</li>
<li>Signout won't work the first time</li>
</ol>
<h2 dir="auto">Context</h2>
<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.0.0</td>
</tr>
<tr>
<td>node</td>
<td>8.9.4</td>
</tr>
<tr>
<td>OS</td>
<td>osx 10.11.6</td>
</tr>
<tr>
<td>browser</td>
<td>chrome</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | <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">In dev mode, navigating to <code class="notranslate">/blog/posts/my-post-title</code> should be picked up by the router as a destination that <strong>will eventually</strong> be available on static export.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">In dev mode, navigating to <code class="notranslate">/blog/posts/my-post-title</code> is not be picked up by the router, and you get a 404 where a static HTML file would normally be located after exporting the static site.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Use the following <code class="notranslate">next.config.js</code>:</li>
</ol>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// next.config.js
module.exports = {
exportPathMap: function () {
return {
"/": { page: "/" },
"/p/hello-nextjs": { page: "/post", query: { title: "hello-nextjs" } },
}
},
}"><pre class="notranslate"><span class="pl-c">// next.config.js</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-kos">{</span>
<span class="pl-en">exportPathMap</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-k">return</span> <span class="pl-kos">{</span>
<span class="pl-s">"/"</span>: <span class="pl-kos">{</span> <span class="pl-c1">page</span>: <span class="pl-s">"/"</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-s">"/p/hello-nextjs"</span>: <span class="pl-kos">{</span> <span class="pl-c1">page</span>: <span class="pl-s">"/post"</span><span class="pl-kos">,</span> <span class="pl-c1">query</span>: <span class="pl-kos">{</span> <span class="pl-c1">title</span>: <span class="pl-s">"hello-nextjs"</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>
<ol start="2" dir="auto">
<li>Run the dev server with <code class="notranslate">next</code></li>
<li>Navigate to <code class="notranslate">localhost:3000/p/hello-nextjs</code></li>
<li>The result will be a 404</li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">The expected behavior is extremely relevant to using Next to build static websites. One key component to developing a static website is the ability for the local development server to resemble as closely as possible the conditions where the static site will be served. In this case, I would expect that the paths exported from <code class="notranslate">exportPathMap</code> would be used to serve the correct page.</p>
<p dir="auto">You may be thinking that <code class="notranslate">next-routes</code> + <code class="notranslate"><Link as='...' /></code> is a good solution to this problem, where the browser push state masks navigation to <code class="notranslate">/blog/posts/my-post-title</code> with something like <code class="notranslate">blog-post?slug=my-post-title</code>, but this only works when navigating from a root page or index, not when reloading or opening a new window.</p> | 0 |
<p dir="auto">I'm trying to achieve both "allowJs" and "Compile On Save" at the same time. "allowJs" exists in tsconfig.json, but not the IDE's TypeScript Build options. "Compile On Save" exists in the IDE (which makes sense, since it is really an editor concern), but is disabled if tsconfig.json is present. What I think would be ideal is to allow "Compile On Save" to be lit up and active in the IDE regardless of whether tsconfig is present or not, even if the other options (which are passed through to to the compiler) are not available.</p> | <p dir="auto">ES6 module loader assumes that there should be only one entry for every imported module in the module dependency list and as a consequence there should be only one setter for every module.This does not play well with the current TypeScript emit where we generate a separate entry for every import\export statement.</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export {x} from 'b';
export {y} from 'b';"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-kos">{</span><span class="pl-s1">x</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'b'</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-kos">{</span><span class="pl-s1">y</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'b'</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">will become</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="System.register(['b', 'b'], function(exports_1) {
return {
setters:[
function (_b_1) {
exports_1("x", _b_1["x"]);
},
function (_b_2) {
exports_1("y", _b_2["y"]);
}],
execute: function() {
}
}
});"><pre class="notranslate"><span class="pl-v">System</span><span class="pl-kos">.</span><span class="pl-en">register</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-s">'b'</span><span class="pl-kos">,</span> <span class="pl-s">'b'</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">exports_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-kos">{</span>
<span class="pl-c1">setters</span>:<span class="pl-kos">[</span>
<span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">_b_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">exports_1</span><span class="pl-kos">(</span><span class="pl-s">"x"</span><span class="pl-kos">,</span> <span class="pl-s1">_b_1</span><span class="pl-kos">[</span><span class="pl-s">"x"</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-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">_b_2</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">exports_1</span><span class="pl-kos">(</span><span class="pl-s">"y"</span><span class="pl-kos">,</span> <span class="pl-s1">_b_2</span><span class="pl-kos">[</span><span class="pl-s">"y"</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-en">execute</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-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">ES6 module loader does not raise any errors in presence of duplicate entries and will call both setters when module is instantiated however it will call only the first one if something in module 'b' will invoke exporter function. Relevant part of ES6 module loader source code is <a href="https://github.com/ModuleLoader/es6-module-loader/blob/master/src/loader.js#L728">here</a></p> | 0 |
<p dir="auto"><strong>Context:</strong></p>
<ul dir="auto">
<li>Playwright Version: [1.15]</li>
<li>Operating System: [Ubuntu 20.04 LTS]</li>
<li>Node.js version: [14.17.6]</li>
<li>Browser: [Chromium, Firefox, WebKit]</li>
<li>Extra: I am using Playwright + native test runner + Allure + Moon</li>
</ul>
<p dir="auto"><strong>Here is short snapshot of project</strong></p>
<p dir="auto"><a href="https://github.com/AndreyMelnichenko/playwright-test-ts">https://github.com/AndreyMelnichenko/playwright-test-ts</a></p>
<p dir="auto"><strong>Describe the bug</strong></p>
<p dir="auto">For Moon test execution Allure or Playwright can't create screenshot and attach into report<br>
For local run all works fine<br>
See source code<br>
<a href="https://github.com/AndreyMelnichenko/playwright-test-ts">https://github.com/AndreyMelnichenko/playwright-test-ts</a></p> | <p dir="auto">I'm trying to follow up <a href="https://www.browserstack.com/docs/automate/playwright" rel="nofollow">https://www.browserstack.com/docs/automate/playwright</a>, is there a way to setup <code class="notranslate">wsEndpoint</code> as a configuration in config file or in fixtures?</p>
<hr>
<p dir="auto">Edit: from the Playwright Team:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import base, { chromium } from '@playwright/test';
// caps is copied from browserstack guide
const caps = {
browser: 'chrome',
os: 'osx',
os_version: 'catalina',
name: 'My first playwright test',
build: 'playwright-build-1',
'browserstack.username': process.env.BROWSERSTACK_USERNAME
'browserstack.accessKey': process.env.BROWSERSTACK_ACCESS_KEY,
'client.playwrightVersion': '1.13.1',
};
export const visitorTestFixture = base.extend<{}>({
browser: async ({ browser }, use, workerInfo) => {
const vBrowser = await chromium.connect({
wsEndpoint:
`wss://cdp.browserstack.com/playwright?caps=` +
`${encodeURIComponent(JSON.stringify(caps))}`,
});
await use(vBrowser);
await vBrowser.close();
},
});
"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">base</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s1">chromium</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-c">// caps is copied from browserstack guide</span>
<span class="pl-k">const</span> <span class="pl-s1">caps</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-c1">browser</span>: <span class="pl-s">'chrome'</span><span class="pl-kos">,</span>
<span class="pl-c1">os</span>: <span class="pl-s">'osx'</span><span class="pl-kos">,</span>
<span class="pl-c1">os_version</span>: <span class="pl-s">'catalina'</span><span class="pl-kos">,</span>
<span class="pl-c1">name</span>: <span class="pl-s">'My first playwright test'</span><span class="pl-kos">,</span>
<span class="pl-c1">build</span>: <span class="pl-s">'playwright-build-1'</span><span class="pl-kos">,</span>
<span class="pl-s">'browserstack.username'</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">BROWSERSTACK_USERNAME</span>
<span class="pl-s">'browserstack.accessKey'</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">BROWSERSTACK_ACCESS_KEY</span><span class="pl-kos">,</span>
<span class="pl-s">'client.playwrightVersion'</span>: <span class="pl-s">'1.13.1'</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">const</span> <span class="pl-s1">visitorTestFixture</span> <span class="pl-c1">=</span> <span class="pl-s1">base</span><span class="pl-kos">.</span><span class="pl-c1">extend</span><span class="pl-c1"><</span><span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-c1">></span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-en">browser</span>: <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> browser <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">use</span><span class="pl-kos">,</span> <span class="pl-s1">workerInfo</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">vBrowser</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">connect</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">wsEndpoint</span>:
<span class="pl-s">`wss://cdp.browserstack.com/playwright?caps=`</span> <span class="pl-c1">+</span>
<span class="pl-s">`<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-en">encodeURIComponent</span><span class="pl-kos">(</span><span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-s1">caps</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">}</span></span>`</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">await</span> <span class="pl-s1">use</span><span class="pl-kos">(</span><span class="pl-s1">vBrowser</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">vBrowser</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><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> | 1 |
<p dir="auto">[Enter steps to reproduce below:]</p>
<ol dir="auto">
<li>Create new project from freshly cloned New GitHub repository</li>
<li>Right-click in sidebar</li>
</ol>
<p dir="auto"><strong>Atom Version</strong>: 0.198.0<br>
<strong>System</strong>: Microsoft Windows 7 Home Premium<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\Paul\AppData\Local\atom\app-0.198.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\Paul\AppData\Local\atom\app-0.198.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)<br>
at EventEmitter. (C:\Users\Paul\AppData\Local\atom\app-0.198.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\Paul\AppData\Local\atom\app-0.198.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\Paul\AppData\Local\atom\app-0.198.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\Paul\AppData\Local\atom\app-0.198.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\Paul\AppData\Local\atom\app-0.198.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\Paul\AppData\Local\atom\app-0.198.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\Paul\AppData\Local\atom\app-0.198.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\Paul\AppData\Local\atom\app-0.198.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\Paul\AppData\Local\atom\app-0.198.0\resources\app.asar\src\window-event-handler.js:149:33)
at HTMLDocument.handler (C:\Users\Paul\AppData\Local\atom\app-0.198.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\Paul\AppData\Local\atom\app-0.198.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\Paul\AppData\Local\atom\app-0.198.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)"><pre class="notranslate"><code class="notranslate">At C:\Users\Paul\AppData\Local\atom\app-0.198.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\Paul\AppData\Local\atom\app-0.198.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\Paul\AppData\Local\atom\app-0.198.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\Paul\AppData\Local\atom\app-0.198.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\Paul\AppData\Local\atom\app-0.198.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\Paul\AppData\Local\atom\app-0.198.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\Paul\AppData\Local\atom\app-0.198.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\Paul\AppData\Local\atom\app-0.198.0\resources\app.asar\src\window-event-handler.js:149:33)
at HTMLDocument.handler (C:\Users\Paul\AppData\Local\atom\app-0.198.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\Paul\AppData\Local\atom\app-0.198.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\Paul\AppData\Local\atom\app-0.198.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=""><pre class="notranslate"><code class="notranslate"></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": {}
}"><pre class="notranslate">{
<span class="pl-ent">"core"</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
No installed packages
# Dev
No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span>
<span class="pl-en">No</span> <span class="pl-en">installed</span> packages
<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">Make sure these boxes are checked before submitting your issue - thank you!</p>
<h3 dir="auto">Superset version</h3>
<p dir="auto">superset (0.27.0)</p>
<h3 dir="auto">Expected results</h3>
<p dir="auto">Order of series change when i configure options "Sort By" and "Sort Descending"</p>
<h3 dir="auto">Actual results</h3>
<p dir="auto">It orders ONLY by the metrics defined</p>
<h3 dir="auto">Steps to reproduce</h3>
<ol dir="auto">
<li>create Time series - Stacked graph</li>
<li>Change option "Sort By" that should change the order of series in the stack</li>
</ol> | <p dir="auto">Any experience of using the Sort By” when stacking time series data?</p>
<p dir="auto">Expected result: the order should change as a consequence of changing the value of "Sort By" in the web_health_population slice, i.e. the series as the bottom should change, as well as the series at the top, and the order of the series between these.</p>
<p dir="auto">Actual results: The "Sort by" seems to have no effect I have tried with different data sets. The category with the largest count is and remains at the bottom, the second largest on top of that and so on. This leads me to suspect that the feature has not been implemented yet. If it has been implemented, please explain how to configure the data so that the "Sort by" has the desired effect.</p>
<p dir="auto">Superset version: 0.17.0</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/26468823/24147564/7c0931f0-0e43-11e7-99bb-96bdb08c08a0.JPG"><img src="https://cloud.githubusercontent.com/assets/26468823/24147564/7c0931f0-0e43-11e7-99bb-96bdb08c08a0.JPG" alt="capture2" style="max-width: 100%;"></a></p> | 1 |
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number:18362
Windows Terminal version (if applicable):
Any other software?"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number:18362
Windows Terminal version (if applicable):
Any other software?
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">I am attaching a simple program that write "\033[" and "0c" to stdout. When I use the EchoCon sample to launch this under ConPTY, I only see "0c" in the output. Breaking at the WriteFile at the bottom of the EchoCon sample, I see the following things:</p>
<ol dir="auto">
<li>An initial XTERM SetTitle OSC, which is unexpected but manageable.</li>
<li>A sequence of "[escape code for cursor off]" "0c" "[escape code cursor on]" (notice \033[ is missing)</li>
</ol>
<p dir="auto">code attached:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#include <Windows.h>
#include <stdio.h>
int main(int argc, char**argv) {
char *csi = "\033[";
char *da = "0c";
DWORD bwrote =0;
/*
HANDLE hConsole = { GetStdHandle(STD_OUTPUT_HANDLE) };
DWORD consoleMode = 0;
GetConsoleMode(hConsole, &consoleMode);
SetConsoleMode(hConsole, consoleMode | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
*/
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),csi,2,&bwrote,NULL);
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),da,2,&bwrote,NULL);
}"><pre class="notranslate"><code class="notranslate">#include <Windows.h>
#include <stdio.h>
int main(int argc, char**argv) {
char *csi = "\033[";
char *da = "0c";
DWORD bwrote =0;
/*
HANDLE hConsole = { GetStdHandle(STD_OUTPUT_HANDLE) };
DWORD consoleMode = 0;
GetConsoleMode(hConsole, &consoleMode);
SetConsoleMode(hConsole, consoleMode | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
*/
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),csi,2,&bwrote,NULL);
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),da,2,&bwrote,NULL);
}
</code></pre></div>
<p dir="auto">If I uncomment the call to SetConsoleMode in the child process, it shows a bizzarre sequence of "\r\n" after the Xterm sequence.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Just my \033[0c</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">As described above. I am probably just overlooking something, but I'd love to find an explanation for this.</p> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Version 10.0.18362.356
Windows Terminal version (if applicable): 0.4.2382.0
Any other software?: as usual: *mine*. :-)"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Version 10.0.18362.356
Windows Terminal version (if applicable): 0.4.2382.0
Any other software?: as usual: *mine*. :-)
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="echo -ne "a\tb""><pre class="notranslate"><span class="pl-c1">echo</span> -ne <span class="pl-s"><span class="pl-pds">"</span>a\tb<span class="pl-pds">"</span></span></pre></div>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The terminal emulator should receive "a\tb\n" (or "\a\tb\r\n" respectively).</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Receives <code class="notranslate">"a\x20\x20\x20\x20\x20\x20\x20b\n"</code> (I'm using <code class="notranslate">\x20</code> here, because GitHub didn't like my actual SPs :) )</p> | 0 |
<h3 dir="auto">Apache Airflow Provider(s)</h3>
<p dir="auto">sftp</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto">apache-airflow-providers-sftp==4.1.0</p>
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">apache-airflow==2.4.3</p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">NAME="Ubuntu" VERSION="20.04.2 LTS (Focal Fossa)"</p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Composer</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">What happened</h3>
<p dir="auto">SFTPSensor is continuously running even when the files matching file pattern passed by the user are available in sftp location. This is happening because the variable <code class="notranslate">actual_file_to_check</code> holds just file name where as the method <code class="notranslate">get_mod_time</code> expects file name with path.</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/apache/airflow/blob/12c3c39d1a816c99c626fe4c650e88cf7b1cc1bc/airflow/providers/sftp/sensors/sftp.py#L70-L79">airflow/airflow/providers/sftp/sensors/sftp.py</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 70 to 79
in
<a data-pjax="true" class="commit-tease-sha" href="/apache/airflow/commit/12c3c39d1a816c99c626fe4c650e88cf7b1cc1bc">12c3c39</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="L70" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="70"></td>
<td id="LC70" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">file_from_pattern</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">hook</span>.<span class="pl-en">get_file_by_pattern</span>(<span class="pl-s1">self</span>.<span class="pl-s1">path</span>, <span class="pl-s1">self</span>.<span class="pl-s1">file_pattern</span>) </td>
</tr>
<tr class="border-0">
<td id="L71" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="71"></td>
<td id="LC71" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> <span class="pl-s1">file_from_pattern</span>: </td>
</tr>
<tr class="border-0">
<td id="L72" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="72"></td>
<td id="LC72" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">actual_file_to_check</span> <span class="pl-c1">=</span> <span class="pl-s1">file_from_pattern</span> </td>
</tr>
<tr class="border-0">
<td id="L73" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="73"></td>
<td id="LC73" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">else</span>: </td>
</tr>
<tr class="border-0">
<td id="L74" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="74"></td>
<td id="LC74" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-c1">False</span> </td>
</tr>
<tr class="border-0">
<td id="L75" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="75"></td>
<td id="LC75" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">else</span>: </td>
</tr>
<tr class="border-0">
<td id="L76" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="76"></td>
<td id="LC76" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">actual_file_to_check</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">path</span> </td>
</tr>
<tr class="border-0">
<td id="L77" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="77"></td>
<td id="LC77" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
<tr class="border-0">
<td id="L78" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="78"></td>
<td id="LC78" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">try</span>: </td>
</tr>
<tr class="border-0">
<td id="L79" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="79"></td>
<td id="LC79" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">mod_time</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">hook</span>.<span class="pl-en">get_mod_time</span>(<span class="pl-s1">actual_file_to_check</span>) </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">SFTPSensor should stop execution as soon as it finds first file match.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Trigger SFTPSensor with file pattern as shown in the below code snippet.<br>
<code class="notranslate">checkForSFTPFiles = SFTPSensor( task_id="checkForSFTPFiles", path=f"{SFTP_ROOT_DIR}", file_pattern='Migrate*', poke_interval=10 )</code></p>
<h3 dir="auto">Anything else</h3>
<p dir="auto">Every time</p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul> | <h3 dir="auto">Body</h3>
<p dir="auto">issue is described in PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1337995923" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/25705" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/25705/hovercard" href="https://github.com/apache/airflow/pull/25705">#25705</a><br>
the author of the PR abandon it so anyone can try to submit a fix to the issue.</p>
<h3 dir="auto">Committer</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I acknowledge that I am a maintainer/committer of the Apache Airflow project.</li>
</ul> | 1 |
<p dir="auto">tooltip in this page ,<a href="http://twitter.github.com/bootstrap/scaffolding.html">http://twitter.github.com/bootstrap/scaffolding.html</a><br>
Screenshot below <a href="http://www.tcreator.info/demo/bugs/tooltip-bug.jpg" rel="nofollow">http://www.tcreator.info/demo/bugs/tooltip-bug.jpg</a></p> | <p dir="auto">When you move your cursor from bottom to top over the tooltip, the tooltips repeats itself.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/bc75f6dc83582d73e68537e1af4fe2fc877a7ff87de6e03ebd19bb2a40831ea4/687474703a2f2f62796164726961616e2e6e6c2f646f776e6c6f6164732f626f6f7473747261702d746f6f6c7469702d69737375652e706e67"><img src="https://camo.githubusercontent.com/bc75f6dc83582d73e68537e1af4fe2fc877a7ff87de6e03ebd19bb2a40831ea4/687474703a2f2f62796164726961616e2e6e6c2f646f776e6c6f6164732f626f6f7473747261702d746f6f6c7469702d69737375652e706e67" alt="Tooltip " data-canonical-src="http://byadriaan.nl/downloads/bootstrap-tooltip-issue.png" style="max-width: 100%;"></a></p>
<p dir="auto">It only happens on this page: <a href="http://twitter.github.com/bootstrap/scaffolding.html#gridSystem">http://twitter.github.com/bootstrap/scaffolding.html#gridSystem</a></p>
<p dir="auto">I use Google Chrome 23.0.1271.64</p> | 1 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=kris2008" rel="nofollow">Harikrishna Kollli</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-5874?redirect=false" rel="nofollow">SPR-5874</a></strong> and commented</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 M3</p>
<p dir="auto"><strong>Reference URL:</strong> <a href="http://forum.springsource.org/showthread.php?t=74021" rel="nofollow">http://forum.springsource.org/showthread.php?t=74021</a></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="398095925" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10545" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10545/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10545">#10545</a> issue with the form tag. The Inner tags not able to access the name of the command object via the PageContext in partial page rendering (<em><strong>"is duplicated by"</strong></em>)</li>
</ul> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=geoffm" rel="nofollow">Geoff Metselaar</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-5243?redirect=false" rel="nofollow">SPR-5243</a></strong> and commented</p>
<h4 dir="auto">Status Quo</h4>
<p dir="auto">When the <em>Spring TestContext Framework</em> was introduced in Spring 2.5, it supported loading an <code class="notranslate">ApplicationContext</code> from either XML or Java Properties files. Spring 3.1 introduced support for loading an <code class="notranslate">ApplicationContext</code> from <em>annotated classes</em> (e.g., <code class="notranslate">@Configuration</code> classes).</p>
<p dir="auto">The underlying implementation for the existing support creates a <code class="notranslate">GenericApplicationContext</code>; however, a <code class="notranslate">GenericApplicationContext</code> is not suitable for testing a web application since a web application relies on an implementation of <code class="notranslate">WebApplicationContext</code> (<em>WAC</em>).</p>
<p dir="auto">In order to integration test Spring-powered web applications the Spring TestContext Framework needs to be able to load a <code class="notranslate">WebApplicationContext</code>, either from XML configuration files or from annotated classes. Furthermore, the <code class="notranslate">ServletContext</code> used by such a WAC needs to be configurable within tests, and common context hierarchies must be supported (e.g., <em>root</em> and <em>dispatcher</em> WACs in a parent-child relationship).</p>
<h6 dir="auto">Original Author's Description</h6>
<p dir="auto">While writing some MVC integration tests, context errors were thrown when loading an <code class="notranslate">XmlViewResolver</code> and when attempting to recover command object property validation errors using the <code class="notranslate">RequestContext</code>. The reason is that each of these requires access to a <code class="notranslate">WebApplicationContext</code>, not a <code class="notranslate">GenericApplicationContext</code> which the TestContext framework makes available by default.</p>
<hr>
<h4 dir="auto">Goals</h4>
<ul dir="auto">
<li>Introduce an annotation that allows developers to configure a mock <code class="notranslate">ServletContext</code> from within integration tests.</li>
<li>Introduce <code class="notranslate">SmartContextLoaders</code> that can load <code class="notranslate">WebApplicationContexts</code> from either XML or annotated classes, using the configured mock <code class="notranslate">ServletContext</code>.</li>
<li>Provide a means for developers to access the mocks for the <code class="notranslate">HttpServletRequest</code> and <code class="notranslate">HttpServletResponse</code> objects and ensure that thread-local state in Spring MVC is kept in sync with these mock objects.</li>
<li>Ensure that metadata used to create the <code class="notranslate">WebApplicationContext</code> (e.g., <code class="notranslate">ServletContext</code> path) is used to define the unique application context cache key.</li>
</ul>
<hr>
<h4 dir="auto">Deliverables</h4>
<ol class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Implement a <code class="notranslate">SmartContextLoader</code> that loads a <code class="notranslate">WebApplicationContext</code> from XML resource locations defined via <code class="notranslate">@ContextConfiguration</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Implement a <code class="notranslate">SmartContextLoader</code> that loads a <code class="notranslate">WebApplicationContext</code> from annotated classes defined via <code class="notranslate">@ContextConfiguration</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Introduce a new class-level <code class="notranslate">@WebAppConfiguration</code> annotation that allows for configuration of the <code class="notranslate">ServletContext</code> base resource path, using Spring's <code class="notranslate">Resource</code> abstraction
<ul dir="auto">
<li>see <code class="notranslate">ContextMockMvcBuilder.configureWebAppRootDir()</code> from <code class="notranslate">spring-test-mvc</code></li>
<li>the base path must be filesystem-based by default, in contrast to the <code class="notranslate">locations</code> attribute in <code class="notranslate">@ContextConfiguration</code> which is classpath-based</li>
<li>the base path should default to <em>"src/main/webapp"</em>, which follows the Maven convention</li>
<li>determine if <code class="notranslate">@WebAppConfiguration</code> should be <em>inherited</em> (i.e., annotated with <code class="notranslate">@Inherited</code>), keeping in mind that the top-level context in an EAR would not be a WAC</li>
</ul>
</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Ensure that the two newly introduced <code class="notranslate">SmartContextLoader</code> implementations create a <code class="notranslate">MockServletContext</code> on demand (i.e., if a root WAC), when the WAC is loaded, and set the <code class="notranslate">MockServletContext</code> as the <code class="notranslate">ServletContext</code> in the application contexts that they load</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Set a loaded context as the <code class="notranslate">ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE</code> in the <code class="notranslate">MockServletContext</code> when context hierarchies are not used</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Introduce a subclass of <code class="notranslate">MergedContextConfiguration</code> specific for web apps (e.g., <code class="notranslate">WebMergedContextConfiguration</code>) that stores the <code class="notranslate">ServletContext</code> base path
<ul dir="auto">
<li>the subclass of MCC must override <code class="notranslate">equals()</code> and <code class="notranslate">hashCode()</code> to include the metadata that uniquely identifies the resulting WAC for proper context caching</li>
<li>the <code class="notranslate">buildMergedContextConfiguration()</code> method in <code class="notranslate">ContextLoaderUtils</code> will likely need to instantiate either a standard <code class="notranslate">MergedContextConfiguration</code> or a <code class="notranslate">WebMergedContextConfiguration</code></li>
</ul>
</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Set up <em>default</em> thread local state via <code class="notranslate">RequestContextHolder</code> before each test method by implementing a new Servlet-specific <code class="notranslate">TestExecutionListener</code>
<ul dir="auto">
<li>by using the <code class="notranslate">MockServletContext</code> already present in the WAC and by creating a <code class="notranslate">MockHttpServletRequest</code>, <code class="notranslate">MockHttpServletResponse</code>, and <code class="notranslate">ServletWebRequest</code> which will be set in the <code class="notranslate">RequestContextHolder</code></li>
</ul>
</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Ensure that the <code class="notranslate">MockServletContext</code>, <code class="notranslate">MockHttpServletRequest</code>, <code class="notranslate">MockHttpServletResponse</code>, and <code class="notranslate">ServletWebRequest</code> can be injected into the test instance (e.g., via <code class="notranslate">@Autowired</code>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Clean up thread locals after each test method</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Ensure that the Servlet-specific <code class="notranslate">TestExecutionListener</code> is configured as a default <code class="notranslate">TestExecutionListener</code> <em>before</em> <code class="notranslate">DependencyInjectionTestExecutionListener</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Introduce a new web-specific <code class="notranslate">DelegatingSmartContextLoader</code> to incorporate support for the <code class="notranslate">SmartContextLoader</code> types introduced in this issue and ensure that the correct delegating loader is picked based on the presence or absence of <code class="notranslate">@WebAppConfiguration</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Consider being able to accommodate a future request to support mocks for Spring Portlet MVC</li>
</ol>
<hr>
<h4 dir="auto">Pseudocode Examples</h4>
<hr>
<h5 dir="auto">Root WAC with Injected Mocks</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@WebAppConfiguration // path defaults to "file:src/main/webapp"
@ContextConfiguration("file:src/main/webapp/WEB-INF/applicationContext.xml")
public class RootWacTests {
@Autowired
private WebApplicationContext wac;
@Autowired
private MockServletContext servletContext;
@Autowired
private MockHttpServletRequest request;
@Autowired
private MockHttpServletResponse response;
@Autowired
private MockHttpSession session;
@Autowired
private ServletWebRequest webRequest;
//...
}"><pre class="notranslate"><code class="notranslate">@WebAppConfiguration // path defaults to "file:src/main/webapp"
@ContextConfiguration("file:src/main/webapp/WEB-INF/applicationContext.xml")
public class RootWacTests {
@Autowired
private WebApplicationContext wac;
@Autowired
private MockServletContext servletContext;
@Autowired
private MockHttpServletRequest request;
@Autowired
private MockHttpServletResponse response;
@Autowired
private MockHttpSession session;
@Autowired
private ServletWebRequest webRequest;
//...
}
</code></pre></div>
<hr>
<h4 dir="auto">Further Resources</h4>
<h5 dir="auto">Blogs and Custom Solutions</h5>
<ul dir="auto">
<li><a href="http://codinghood.blogspot.com/2009/01/spring-integration-testing-for-web.html" rel="nofollow">http://codinghood.blogspot.com/2009/01/spring-integration-testing-for-web.html</a></li>
<li><a href="http://jamesfarrell129.wordpress.com/2011/04/20/integration-testing-for-spring-portlet-mvc/" rel="nofollow">http://jamesfarrell129.wordpress.com/2011/04/20/integration-testing-for-spring-portlet-mvc/</a></li>
<li><a href="http://tedyoung.me/2011/02/14/spring-mvc-integration-testing-controllers/" rel="nofollow">http://tedyoung.me/2011/02/14/spring-mvc-integration-testing-controllers/</a></li>
<li><a href="http://code.google.com/p/ted-young/source/browse/trunk/blog.spring-mvc-integration-testing/" rel="nofollow">http://code.google.com/p/ted-young/source/browse/trunk/blog.spring-mvc-integration-testing/</a></li>
</ul>
<h5 dir="auto">Forum Discussions</h5>
<ul dir="auto">
<li><a href="http://forum.springframework.org/showthread.php?p=210177#post210177" rel="nofollow">http://forum.springframework.org/showthread.php?p=210177#post210177</a></li>
<li><a href="http://forum.springframework.org/showthread.php?p=210181" rel="nofollow">http://forum.springframework.org/showthread.php?p=210181</a></li>
<li><a href="http://forum.springsource.org/showthread.php?t=76744" rel="nofollow">http://forum.springsource.org/showthread.php?t=76744</a></li>
</ul>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5 final, 3.0 GA, 3.1 GA</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/17654/web_listener_loader.zip" rel="nofollow">web_listener_loader.zip</a> (<em>6.70 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="398094026" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10284" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10284/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10284">#10284</a> Provide support for context hierarchies in the TestContext Framework (<em><strong>"depends on"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398153893" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14496" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14496/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14496">#14496</a> Support WebApplicationContext hierarchies in the TestContext Framework (<em><strong>"is depended on by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398086432" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9265" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9265/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9265">#9265</a> Provide support for session/request scoped beans for integration testing (<em><strong>"is depended on by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398153899" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14497" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14497/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14497">#14497</a> Document WebApplicationContext support in the TestContext Framework (<em><strong>"is depended on by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398095729" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10519" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10519/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10519">#10519</a> Provide a ContextLoader for WebApplicationContext (<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="398092669" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10072" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10072/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10072">#10072</a> Provide test ContextLoader for <code class="notranslate">@ContextConfiguration</code> that creates a WebApplicationContext (<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="398087850" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9436" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9436/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9436">#9436</a> Make Spring ContextTest annotation support WebApplicationContext (<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="398153876" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14492" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14492/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14492">#14492</a> Add first class support for testing Spring MVC applications</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398154564" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14588" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14588/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14588">#14588</a> Introduce bootstrap strategy in the TestContext framework</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398117880" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13849" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13849/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13849">#13849</a> Release 1.0 spring-test-mvc</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398153298" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14432" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14432/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14432">#14432</a> ApplicationContext fails to load in tests using Java-based config and WebMvcConfigurationSupport (<em><strong>"supersedes"</strong></em>)</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-projects/spring-framework/commit/461d99af29e8c358ff80ff9ff58a8ea63fe7b670/hovercard" href="https://github.com/spring-projects/spring-framework/commit/461d99af29e8c358ff80ff9ff58a8ea63fe7b670"><tt>461d99a</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/a281bdbfc528187dcd1214be2d2a97e8482a8a23/hovercard" href="https://github.com/spring-projects/spring-framework/commit/a281bdbfc528187dcd1214be2d2a97e8482a8a23"><tt>a281bdb</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/90c5f226b62503b492167bcd87361842f73d18b1/hovercard" href="https://github.com/spring-projects/spring-framework/commit/90c5f226b62503b492167bcd87361842f73d18b1"><tt>90c5f22</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/9937f840d5dbd2be819f45f5101dd6486aa382f6/hovercard" href="https://github.com/spring-projects/spring-framework/commit/9937f840d5dbd2be819f45f5101dd6486aa382f6"><tt>9937f84</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/a73280ccc8a18e0048351a3f08a51c2b13ec3b45/hovercard" href="https://github.com/spring-projects/spring-framework/commit/a73280ccc8a18e0048351a3f08a51c2b13ec3b45"><tt>a73280c</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/21ebbb9c028c5ac05f9d541d87b53b08bb021818/hovercard" href="https://github.com/spring-projects/spring-framework/commit/21ebbb9c028c5ac05f9d541d87b53b08bb021818"><tt>21ebbb9</tt></a></p>
<p dir="auto">30 votes, 29 watchers</p> | 0 |
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import datetime
import pandas as pd
series = pd.Series(
list(range(8760)),
index=pd.date_range('2018/01/01', periods=8760, freq='H', tz='Europe/Berlin')
)
# trying to drop first day
series = series.drop(
series.index[series.index < datetime.datetime(year=2018, month=1, day=2)]
)
# yields AmbiguousTimeError
"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">datetime</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-s1">series</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(
<span class="pl-en">list</span>(<span class="pl-en">range</span>(<span class="pl-c1">8760</span>)),
<span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-en">date_range</span>(<span class="pl-s">'2018/01/01'</span>, <span class="pl-s1">periods</span><span class="pl-c1">=</span><span class="pl-c1">8760</span>, <span class="pl-s1">freq</span><span class="pl-c1">=</span><span class="pl-s">'H'</span>, <span class="pl-s1">tz</span><span class="pl-c1">=</span><span class="pl-s">'Europe/Berlin'</span>)
)
<span class="pl-c"># trying to drop first day</span>
<span class="pl-s1">series</span> <span class="pl-c1">=</span> <span class="pl-s1">series</span>.<span class="pl-en">drop</span>(
<span class="pl-s1">series</span>.<span class="pl-s1">index</span>[<span class="pl-s1">series</span>.<span class="pl-s1">index</span> <span class="pl-c1"><</span> <span class="pl-s1">datetime</span>.<span class="pl-en">datetime</span>(<span class="pl-s1">year</span><span class="pl-c1">=</span><span class="pl-c1">2018</span>, <span class="pl-s1">month</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">day</span><span class="pl-c1">=</span><span class="pl-c1">2</span>)]
)
<span class="pl-c"># yields AmbiguousTimeError </span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="File "pandas/_libs/tslib.pyx", line 3593, in pandas._libs.tslib.tz_localize_to_utc
pytz.exceptions.AmbiguousTimeError: Cannot infer dst time from Timestamp('2018-10-28 02:00:00'), try using the 'ambiguous' argument"><pre class="notranslate"><code class="notranslate">File "pandas/_libs/tslib.pyx", line 3593, in pandas._libs.tslib.tz_localize_to_utc
pytz.exceptions.AmbiguousTimeError: Cannot infer dst time from Timestamp('2018-10-28 02:00:00'), try using the 'ambiguous' argument
</code></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">I can't use <code class="notranslate">drop</code> on series that have a timezone aware datetime index. For me, it is not understandable why the error displayed above is raised.</p>
<p dir="auto">The workaround I found is:</p>
<ul dir="auto">
<li>find the positions to drop</li>
<li>convert the series to UTC</li>
<li>drop</li>
<li>convert back to original timezone</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import datetime
import pandas as pd
series = pd.Series(
list(range(8760)),
index=pd.date_range('2018/01/01', periods=8760, freq='H', tz='Europe/Berlin')
)
positions_to_drop = series.index < datetime.datetime(year=2018, month=1, day=2)
tz = series.index.tz
series.index = series.index.tz_convert('UTC')
series = series.drop(
series.index[positions_to_drop]
)
series.index = series.index.tz_convert(tz)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">datetime</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-s1">series</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(
<span class="pl-en">list</span>(<span class="pl-en">range</span>(<span class="pl-c1">8760</span>)),
<span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-en">date_range</span>(<span class="pl-s">'2018/01/01'</span>, <span class="pl-s1">periods</span><span class="pl-c1">=</span><span class="pl-c1">8760</span>, <span class="pl-s1">freq</span><span class="pl-c1">=</span><span class="pl-s">'H'</span>, <span class="pl-s1">tz</span><span class="pl-c1">=</span><span class="pl-s">'Europe/Berlin'</span>)
)
<span class="pl-s1">positions_to_drop</span> <span class="pl-c1">=</span> <span class="pl-s1">series</span>.<span class="pl-s1">index</span> <span class="pl-c1"><</span> <span class="pl-s1">datetime</span>.<span class="pl-en">datetime</span>(<span class="pl-s1">year</span><span class="pl-c1">=</span><span class="pl-c1">2018</span>, <span class="pl-s1">month</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">day</span><span class="pl-c1">=</span><span class="pl-c1">2</span>)
<span class="pl-s1">tz</span> <span class="pl-c1">=</span> <span class="pl-s1">series</span>.<span class="pl-s1">index</span>.<span class="pl-s1">tz</span>
<span class="pl-s1">series</span>.<span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-s1">series</span>.<span class="pl-s1">index</span>.<span class="pl-en">tz_convert</span>(<span class="pl-s">'UTC'</span>)
<span class="pl-s1">series</span> <span class="pl-c1">=</span> <span class="pl-s1">series</span>.<span class="pl-en">drop</span>(
<span class="pl-s1">series</span>.<span class="pl-s1">index</span>[<span class="pl-s1">positions_to_drop</span>]
)
<span class="pl-s1">series</span>.<span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-s1">series</span>.<span class="pl-s1">index</span>.<span class="pl-en">tz_convert</span>(<span class="pl-s1">tz</span>)</pre></div>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">No error. And the result the previous snippet yields.</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 3.6.4.final.0<br>
python-bits: 64<br>
OS: Darwin<br>
OS-release: 17.4.0<br>
machine: x86_64<br>
processor: i386<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: None<br>
LOCALE: de_DE.UTF-8<br>
pandas: 0.22.0<br>
pytest: 3.4.2<br>
pip: 9.0.1<br>
setuptools: 38.5.2<br>
Cython: None<br>
numpy: 1.14.2<br>
scipy: None<br>
pyarrow: None<br>
xarray: None<br>
IPython: None<br>
sphinx: 1.7.1<br>
patsy: None<br>
dateutil: 2.6.1<br>
pytz: 2018.3<br>
blosc: None<br>
bottleneck: None<br>
tables: None<br>
numexpr: 2.6.4<br>
feather: None<br>
matplotlib: None<br>
openpyxl: None<br>
xlrd: 1.1.0<br>
xlwt: None<br>
xlsxwriter: None<br>
lxml: None<br>
bs4: None<br>
html5lib: None<br>
sqlalchemy: None<br>
pymysql: None<br>
psycopg2: 2.7.4 (dt dec pq3 ext lo64)<br>
jinja2: 2.10<br>
s3fs: None<br>
fastparquet: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details> | <h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd
start = pd.Timestamp('201710290100', tz='Europe/Brussels')
end = pd.Timestamp('201710290300', tz='Europe/Brussels')
index = pd.date_range(start=start, end=end, freq='15min')
index.drop(index[0])
AmbiguousTimeError: Cannot infer dst time from Timestamp('2017-10-29 02:00:00'), try using the 'ambiguous' argument"><pre class="notranslate"><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-s1">start</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Timestamp</span>(<span class="pl-s">'201710290100'</span>, <span class="pl-s1">tz</span><span class="pl-c1">=</span><span class="pl-s">'Europe/Brussels'</span>)
<span class="pl-s1">end</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Timestamp</span>(<span class="pl-s">'201710290300'</span>, <span class="pl-s1">tz</span><span class="pl-c1">=</span><span class="pl-s">'Europe/Brussels'</span>)
<span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">date_range</span>(<span class="pl-s1">start</span><span class="pl-c1">=</span><span class="pl-s1">start</span>, <span class="pl-s1">end</span><span class="pl-c1">=</span><span class="pl-s1">end</span>, <span class="pl-s1">freq</span><span class="pl-c1">=</span><span class="pl-s">'15min'</span>)
<span class="pl-s1">index</span>.<span class="pl-en">drop</span>(<span class="pl-s1">index</span>[<span class="pl-c1">0</span>])
<span class="pl-v">AmbiguousTimeError</span>: <span class="pl-v">Cannot</span> <span class="pl-s1">infer</span> <span class="pl-s1">dst</span> <span class="pl-s1">time</span> <span class="pl-k">from</span> <span class="pl-v">Timestamp</span>(<span class="pl-s">'2017-10-29 02:00:00'</span>), <span class="pl-k">try</span> <span class="pl-s1">using</span> <span class="pl-s1">the</span> <span class="pl-s">'ambiguous'</span> <span class="pl-s1">argument</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">When dropping from a localized DateTimeIndex, behind the scenes the index is converted to UTC, the drop is performed, and then it is converted back to the original timezone. (This is what I make of the traceback).<br>
This second conversion is ambiguous because the original index contains a DST change.</p>
<h4 dir="auto">Expected Output</h4>
<h4 dir="auto">Output of <code class="notranslate">index.drop(index[0])</code></h4>
<details>
<blockquote>
<p dir="auto">DatetimeIndex(['2017-10-29 01:15:00+02:00', '2017-10-29 01:30:00+02:00',<br>
'2017-10-29 01:45:00+02:00', '2017-10-29 02:00:00+02:00',<br>
'2017-10-29 02:15:00+02:00', '2017-10-29 02:30:00+02:00',<br>
'2017-10-29 02:45:00+02:00', '2017-10-29 02:00:00+01:00',<br>
'2017-10-29 02:15:00+01:00', '2017-10-29 02:30:00+01:00',<br>
'2017-10-29 02:45:00+01:00', '2017-10-29 03:00:00+01:00'],<br>
dtype='datetime64[ns, Europe/Brussels]', freq='15T')</p>
</blockquote>
</details> | 1 |
<p dir="auto">Just want to make sure this is recorded and heard. Is there any reason why tab alignments be removed in bootstrap 3? I have a bunch of web designs using it and it doesn' really break any other parts of bootstrap 3. Currently relying on some custom CSS hacks to make it work again.</p>
<p dir="auto">ref (other compliants): <a href="http://stackoverflow.com/questions/18455192/twitter-bootsrap-3-0-tabs-left-not-working-anymore" rel="nofollow">http://stackoverflow.com/questions/18455192/twitter-bootsrap-3-0-tabs-left-not-working-anymore</a></p>
<p dir="auto">ref (hacks): <a href="http://stackoverflow.com/questions/18432577/stacked-tabs-in-bootstrap-3/18443236#18443236" rel="nofollow">http://stackoverflow.com/questions/18432577/stacked-tabs-in-bootstrap-3/18443236#18443236</a><br>
Thanks.</p> | <p dir="auto">Hi, guys!</p>
<p dir="auto">Left-sided and right-sided tabs are missing.</p>
<p dir="auto">Thank you!</p> | 1 |
<p dir="auto">When you're passing multiple files/globs to babel that will be built into a single file, is it possible to eliminate duplicate file paths in the resulting build rather than duplicating the contents?</p>
<p dir="auto">I'm trying to influence the ordering of some files where the order is important, so I have a command that looks like this:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="babel -s -c false --out-file tmp/built.js --ignore *.spec.js src/module.js "src/**/*.js""><pre class="notranslate"><span class="pl-s1">babel</span> <span class="pl-c1">-</span><span class="pl-s1">s</span> <span class="pl-c1">-</span><span class="pl-s1">c</span> <span class="pl-c1">false</span> <span class="pl-c1">--</span><span class="pl-s1">out</span><span class="pl-c1">-</span><span class="pl-s1">file</span> <span class="pl-s1">tmp</span><span class="pl-c1">/</span><span class="pl-s1">built</span><span class="pl-kos">.</span><span class="pl-c1">js</span> <span class="pl-c1">--</span><span class="pl-s1">ignore</span> <span class="pl-c1">*</span><span class="pl-kos">.</span><span class="pl-c1">spec</span><span class="pl-kos">.</span><span class="pl-c1">js</span> <span class="pl-s1">src</span><span class="pl-c1">/</span><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">js</span> <span class="pl-s">"src/**/*.js"</span></pre></div>
<p dir="auto">At the moment, <code class="notranslate">module.js</code> would be included as the first file, then duplicated again when the second glob matches it. Ideally, the file would only be included the first time it was encountered.</p> | <p dir="auto"><strong>Bug:</strong> If in your build script, you have <code class="notranslate">--copy-files</code> passed, files that are ignored in .babelrc files will be copied over, instead of being ignored.</p>
<h3 dir="auto">Input Code</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="babel src --out-dir lib --copy-files"><pre class="notranslate"><span class="pl-s1">babel</span> <span class="pl-s1">src</span> <span class="pl-c1">--</span><span class="pl-s1">out</span><span class="pl-c1">-</span><span class="pl-s1">dir</span> <span class="pl-s1">lib</span> <span class="pl-c1">--</span><span class="pl-s1">copy</span><span class="pl-c1">-</span><span class="pl-s1">files</span></pre></div>
<h3 dir="auto">Babel Configuration (.babelrc, package.json, cli command)</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"presets": [
"es2015",
"stage-1",
"react"
],
"ignore": [
"**__mocks__/*.js"
]
}"><pre class="notranslate"><span class="pl-kos">{</span>
<span class="pl-s">"presets"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"es2015"</span><span class="pl-kos">,</span>
<span class="pl-s">"stage-1"</span><span class="pl-kos">,</span>
<span class="pl-s">"react"</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-s">"ignore"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"**__mocks__/*.js"</span>
<span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Babel should not copy files that are explicitly ignored in <code class="notranslate">.babelrc</code> configuration. In this case, babel should not transpile or copy Jest mocks.</p>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">Babel copies files that are ignored are explicitly <code class="notranslate">.babelrc</code>.</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="> npm run build
> babel src --out-dir lib --copy-files
src/api/__mocks__/index.js -> lib/api/__mocks__/index.js
src/api/endpoints.js -> lib/api/endpoints.js"><pre class="notranslate"><span class="pl-k">></span> npm run build
<span class="pl-k">></span> babel src --out-dir lib --copy-files
src/api/__mocks__/index.js -<span class="pl-k">></span> lib/api/__mocks__/index.js
src/api/endpoints.js -<span class="pl-k">></span> lib/api/endpoints.js</pre></div>
<p dir="auto">If you pass an <code class="notranslate">--ignore</code> flag (with the same blob) <em>after</em> the <code class="notranslate">--copy-files</code> flag, it will behave as expected.</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="> npm run build;
> babel src --out-dir lib --copy-files --ignore **__mocks__/*.js
src/api/endpoints.js -> lib/api/endpoints.js
(output does not include ignored directories)"><pre class="notranslate"><span class="pl-k">></span> npm run build<span class="pl-k">;</span>
<span class="pl-k">></span> babel src --out-dir lib --copy-files --ignore <span class="pl-k">**</span>__mocks__/<span class="pl-k">*</span>.js
src/api/endpoints.js -<span class="pl-k">></span> lib/api/endpoints.js
(output does not include ignored directories)</pre></div>
<h3 dir="auto">Context</h3>
<p dir="auto">This issue comes up when you work with Jest manual mocks inside of your source directory. Jest warns that you have duplicate <strong>mocks</strong> directories.</p>
<table role="table">
<thead>
<tr>
<th>software</th>
<th>version(s)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Babel</td>
<td>6.26.0</td>
</tr>
<tr>
<td>node</td>
<td>6.9.2</td>
</tr>
<tr>
<td>npm</td>
<td>5.4.0</td>
</tr>
<tr>
<td>Operating System</td>
<td>OSX El Capitan</td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">A lot of interfaces defined in <code class="notranslate">service_worker_api</code> are overrides of interfaces that fetch type definitions lie <code class="notranslate">watwg-fetch</code> or <code class="notranslate">isomorphic-fetch</code> are provided. <code class="notranslate">service_worker_api</code> is usually used in conjunction with one of fetch libs and when user do that, interface mismatches will throw TypeScript errors.</p>
<p dir="auto">There are two options to fix it:</p>
<ul dir="auto">
<li>Remove all of interface properties that are colliding with fetch interfaces</li>
<li>Import of of the fetch type definitions and extend those interfaces</li>
</ul>
<p dir="auto">Here is the type definition with removed interface members that collide with <code class="notranslate">isomorphic-fetch</code> type definition:</p>
<details>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Type definitions for service_worker_api
// Project: https://developer.mozilla.org/fr/docs/Web/API/ServiceWorker_API
// Definitions by: Tristan Caron <https://github.com/tristancaron>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// <reference path="../es6-promise/es6-promise.d.ts" /> // REMOVED third "/" so this doesn't fire. Problem with duplicate Promises
// between es6 and typescript - https://github.com/DefinitelyTyped/DefinitelyTyped/issues/5015
/**
* Provides methods relating to the body of the response/request, allowing you
* to declare what its content type is and how it should be handled.
*/
interface Body {
/**
* Contains a Boolean that indicates whether the body has been read.
* @readonly
*/
bodyUsed: boolean;
/**
* Takes a Response stream and reads it to completion.
* It returns a promise that resolves with an ArrayBuffer.
*/
arrayBuffer(): Promise<ArrayBuffer>;
/**
* Takes a Response stream and reads it to completion.
* It returns a promise that resolves with a Blob.
*/
blob(): Promise<Blob>;
/**
* Takes a Response stream and reads it to completion.
* It returns a promise that resolves with a FormData object.
*/
formData(): Promise<FormData>;
/**
* Takes a Response stream and reads it to completion.
* It returns a promise that resolves with a JSON object.
*/
json(): Promise<JSON>;
/**
* Takes a Response stream and reads it to completion.
* It returns a promise that resolves with a USVString (text).
*/
text(): Promise<Text>;
}
/**
* Represents response/request headers, allowing you to query them and take
* different actions depending on the results.
*/
interface Header {
new(): Header;
/**
* Appends a new value onto an existing header inside a Headers object, or
* adds the header if it does not already exist.
*
* @param name The name of the HTTP header you want to add to the Headers
* object.
* @param value The value of the HTTP header you want to add.
*/
append(name: string, value: string): void;
/**
* Deletes a header from a Headers object.
*
* @param name The name of the HTTP header you want to delete from the
* Headers object.
*/
delete(name: string): void;
/**
* Returns the first value of a given header from within a Headers object.
*
* @param name The name of the HTTP header whose value you want to retrieve
* from the Headers object. If the given name is not the name of an
* HTTP header, this method throws a TypeError.
*/
get(name: string): string;
/**
* Returns an array of all the values of a header within a Headers object
* with a given name.
*
* @param name The name of the HTTP header whose values you want to retrieve
* from the Headers object. If the given name is not the name of an
* HTTP header, this method throws a TypeError.
*/
getAll(name:string): Array<string>;
/**
* Returns a boolean stating whether a Headers object contains a
* certain header.
*
* @param name The name of the HTTP header you want to test for. If the
* given name is not the name of an HTTP header, this method throws
* a TypeError.
*/
has(name: string): boolean;
/**
* Sets a new value for an existing header inside a Headers object, or
* adds the header if it does not already exist.
*
* @param name The name of the HTTP header you want to set to a new value.
* If the given name is not the name of an HTTP header, this method throws
* a TypeError.
* @param value The new value you want to set.
*/
set(name: string, value: string): void;
}
/**
* Represents the response to a request.
*/
interface Response extends Body {
new(): Response;
/**
* Contains the URL of the response.
* @readonly
*/
url: string;
/**
* Contains a boolean stating whether this is the final URL of the response.
*/
useFinalURL: boolean;
/**
* Contains the status code of the response (e.g., 200 for a success).
* @readonly
*/
status: number;
/**
* Contains a boolean stating whether the response was successful
* (status in the range 200-299) or not.
* @readonly
*/
ok: boolean;
/**
* Contains the status message corresponding to the status code
* (e.g., OK for 200).
* @readonly
*/
statusText: string;
/**
* Creates a clone of a Response object.
*/
clone(): Response;
/**
* Returns a new Response object associated with a network error.
*/
error(): Response;
/**
* Creates a new response with a different URL.
*/
redirect(): Response;
}
/**
* Represents a resource request.
*/
interface Request extends Body {
new(): Request;
/**
* Contains the request's method (GET, POST, etc.).
* @readonly
*/
method: string;
/**
* Contains the URL of the request.
* @readonly
*/
url: string;
/**
* Contains the context of the request (e.g., audio, image, iframe, etc.).
* @readonly
*/
context: string;
/**
* Contains the referrer of the request (e.g., client).
* @readonly
*/
referrer: string;
/**
* Creates a copy of the current Request object.
*/
clone(): Request;
}
/**
* An CacheOptions object allowing you to set specific control options for the
* matching done in the match operation.
*
* @property [ignoreSearch] A Boolean that specifies whether the matching
* process should ignore the query string in the url. If set to true,
* the ?value=bar part of http://foo.com/?value=bar would be ignored when
* performing a match. It defaults to false.
*
* @property [ignoreMethod] A Boolean that, when set to true, prevents matching
* operations from validating the Request http method (normally only GET
* and HEAD are allowed.) It defaults to false.
*
* @property [ignoreVary] A Boolean that when set to true tells the matching
* operation not to perform VARY header matching — i.e. if the URL matches you
* will get a match regardless of the Response object having a VARY header or
* not. It defaults to false.
*
* @property [cacheName] A DOMString that represents a specific cache to search
* within. Note that this option is ignored by Cache.match().
*/
interface CacheOptions {
ignoreSearch?: boolean;
ignoreMethod?: boolean;
ignoreVary?: boolean;
cacheName?: string;
}
/**
* Represents the storage for Request / Response object pairs that are cached as
* part of the ServiceWorker life cycle.
*/
interface Cache {
/**
* Returns a Promise that resolves to the response associated with the first
* matching request in the Cache object.
*
* @param request The Request you are attempting to find in the Cache.
* @param {CacheOptions} options
*/
match(request: Request | string, options?: CacheOptions): Promise<Response>;
/**
* Returns a Promise that resolves to an array of all matching responses in
* the Cache object.
*
* @param request The Request you are attempting to find in the Cache.
* @param {CacheOptions} options
*/
matchAll(request: Request | string, options?: CacheOptions): Promise<Array<Response>>;
/**
* Returns a Promise that resolves to a new Cache entry whose key
* is the request.
*
* @param request The Request you want to add to the cache.
*/
add(request: Request | string): Promise<void>;
/**
* Returns a Promise that resolves to a new array of Cache entries whose
* keys are the requests.
*
* @param request An array of Request objects you want to add to the cache.
*/
addAll(...request: Array<Request | string>): Promise<void>;
/**
* Adds additional key/value pairs to the current Cache object.
*
* @param request The Request you want to add to the cache.
* @param response The response you want to match up to the request.
*/
put(request: Request, response: Response): Promise<void>;
/**
* Finds the Cache entry whose key is the request, and if found, deletes the
* Cache entry and returns a Promise that resolves to true. If no Cache
* entry is found, it returns false.
*
* @param request The Request you are looking to delete.
* @param {CacheOptions} options
*/
delete(request: Request | string, options?: CacheOptions): Promise<boolean>;
/**
* Returns a Promise that resolves to an array of Cache keys.
*
* @param request The Request want to return, if a specific key is desired.
* @param {CacheOptions} options
*/
keys(request?: Request, options?: CacheOptions): Promise<Array<Request>>;
}
/**
* Represents the storage for Cache objects. It provides a master directory of
* all the named caches that a ServiceWorker can access and maintains a mapping
* of string names to corresponding Cache objects.
*/
interface CacheStorage {
/**
* Checks if a given Request is a key in any of the Cache objects that the
* CacheStorage object tracks and returns a Promise that resolves
* to that match.
*
* @param request The Request you are looking for a match for in the CacheStorage.
* @param {CacheOptions} options
*/
match(request: Request | string, options?: CacheOptions): Promise<Response>;
/**
* Returns a Promise that resolves to true if a Cache object matching
* the cacheName exists.
*
* @param cacheName The Request you are looking for a match for in the
* CacheStorage.
*/
has(cacheName: string): Promise<boolean>;
/**
* Returns a Promise that resolves to the Cache object matching
* the cacheName.
*
* @param cacheName The name of the cache you want to open.
*/
open(cacheName: string): Promise<Cache>;
/**
* Finds the Cache object matching the cacheName, and if found, deletes the
* Cache object and returns a Promise that resolves to true. If no
* Cache object is found, it returns false.
*
* @param cacheName The name of the cache you want to delete.
*/
delete(cacheName: string): Promise<boolean>;
/**
* Returns a Promise that will resolve with an array containing strings
* corresponding to all of the named Cache objects tracked by the
* CacheStorage. Use this method to iterate over a list of all the
* Cache objects.
*/
keys(): Promise<Array<string>>;
}
/**
* Represents the scope of a service worker client. A service worker client is
* either a document in a browser context or a SharedWorker, which is controlled
* by an active worker.
*/
interface ServiceWorkerClient {
/**
* Allows a service worker client to send a message to a ServiceWorker.
*
* @param message The message to send to the service worker.
* @param [transfer] A transferable object such as, for example, a reference
* to a port.
*/
postMessage(message: string, transfer?: Object): void;
/**
* Indicates the type of browsing context of the current client.
* This value can be one of auxiliary, top-level, nested, or none.
* @readonly
*/
frameType: string;
/**
* Returns the id of the Client object.
* @readonly
*/
id: string;
/**
* The URL of the current service worker client.
* @readonly
*/
url: string;
}
interface WindowClient extends ServiceWorkerClient {
/**
* Gives user input focus to the current client.
*/
focus(): Promise<WindowClient>;
/**
* A boolean that indicates whether the current client has focus.
* @readonly
*/
focused: boolean;
/**
* Indicates the visibility of the current client. This value can be one of
* hidden, visible, prerender, or unloaded.
* @readonly
*/
visibilityState: string;
}
interface ServiceWorkerClientsMatchOptions {
includeUncontrolled?: boolean;
type?: string;
}
/**
* Represents a container for a list of Client objects; the main way to access
* the active service worker clients at the current origin.
*/
interface ServiceWorkerClients {
/**
* Gets a list of service worker clients and returns them in a Promise.
* Include the options parameter to return all service worker clients whose
* origin is the same as the associated service worker's origin. If options
* are not included, the method returns only the service worker clients
* controlled by the service worker.
*
* @param options
*/
matchAll(options: ServiceWorkerClientsMatchOptions): Promise<Array<ServiceWorkerClient>>;
/**
* Opens a service worker Client in a new browser window.
*
* @param url A string representing the URL of the client you want to open
* in the window.
*/
openWindow(url: string): Promise<WindowClient>;
/**
* Allows an active Service Worker to set itself as the active worker for a
* client page when the worker and the page are in the same scope.
*/
claim(): Promise<void>;
}
/**
* Extends the lifetime of the install and activate events dispatched on the
* ServiceWorkerGlobalScope as part of the service worker lifecycle. This
* ensures that any functional events (like FetchEvent) are not dispatched to
* the ServiceWorker until it upgrades database schemas, deletes outdated cache
* entries, etc.
*/
interface ExtendableEvent extends Event {
/**
* Extends the lifetime of the event.
* It is intended to be called in the install EventHandler for the
* installing worker and on the active EventHandler for the active worker.
*
* @param all
*/
waitUntil(all: any): any;
}
/**
* The parameter passed into the ServiceWorkerGlobalScope.onfetch handler,
* FetchEvent represents a fetch action that is dispatched on the
* ServiceWorkerGlobalScope of a ServiceWorker. It contains information about
* the request and resulting response, and provides the FetchEvent.respondWith()
* method, which allows us to provide an arbitrary response back to the
* controlled page.
*/
interface FetchEvent extends Event {
/**
* Returns a Boolean that is true if the event was dispatched with the
* user's intention for the page to reload, and false otherwise. Typically,
* pressing the refresh button in a browser is a reload, while clicking a
* link and pressing the back button is not.
* @readonly
*/
isReload: boolean;
/**
* Returns the Request that triggered the event handler.
* @readonly
*/
request: Request;
/**
* Returns the Client that the current service worker is controlling.
* @readonly
*/
client: ServiceWorkerClient;
/**
* Resolves by returning a Response or a network error to Fetch.
*
* @param all
*/
respondWith(all: any): Response;
}
/**
* Represents a service worker. Multiple browsing contexts (e.g. pages, workers,
* etc.) can be associated with the same ServiceWorker object.
*/
interface ServiceWorker extends Worker {
/**
* Returns the ServiceWorker serialized script URL defined as part of
* ServiceWorkerRegistration. The URL must be on the same origin as the
* document that registers the ServiceWorker.
* @readonly
*/
scriptURL: string;
/**
* Returns the state of the service worker. It returns one of the following
* values: installing, installed, activating, activated, or redundant.
* @readonly
*/
state: string;
/**
* An EventListener property called whenever an event of type statechange
* is fired; it is basically fired anytime the ServiceWorker.state changes.
*
* @param [statechangeevent]
*/
onstatechange: (statechangeevent?: any) => void;
}
/**
* The PushSubscription interface provides a subcription's URL endpoint and
* subscription ID.
*/
interface PushSubscription {
/**
* The endpoint associated with the push subscription.
* @readonly
*/
endpoint: any;
/**
* The subscription ID associated with the push subscription.
* @readonly
*/
subscriptionId: any;
}
/**
* The PushManager interface provides a way to receive notifications from
* third-party servers as well as request URLs for push notifications.
* This interface has replaced functionality offered by the obsolete
* PushRegistrationManager.
*/
interface PushManager {
/**
* Returns a promise that resolves to a PushSubscription with details of a
* new push subscription.
*/
subscribe(): Promise<PushSubscription>;
/**
* Returns a promise that resolves to a PushSubscription details of
* the retrieved push subscription.
*/
getSubscription(): Promise<PushSubscription>;
/**
* Returns a promise that resolves to the PushPermissionStatus of the
* requesting webapp, which will be one of granted, denied, or default.
*/
hasPermission(): Promise<any>;
}
/**
* Represents a service worker registration.
*/
interface ServiceWorkerRegistration extends EventTarget {
/**
* Returns a unique identifier for a service worker registration.
* This must be on the same origin as the document that registers
* the ServiceWorker.
* @readonly
*/
scope: any;
/**
* Returns a service worker whose state is installing. This is initially
* set to null.
* @readonly
*/
installing: ServiceWorker;
/**
* Returns a service worker whose state is installed. This is initially
* set to null.
* @readonly
*/
waiting: ServiceWorker;
/**
* Returns a service worker whose state is either activating or activated.
* This is initially set to null. An active worker will control a
* ServiceWorkerClient if the client's URL falls within the scope of the
* registration (the scope option set when ServiceWorkerContainer.register
* is first called).
* @readonly
*/
active: ServiceWorker;
/**
* Returns an interface to for managing push subscriptions, including
* subcribing, getting an anctive subscription, and accessing push
* permission status.
* @readonly
*/
pushManager: PushManager;
/**
* An EventListener property called whenever an event of type updatefound
* is fired; it is fired any time the ServiceWorkerRegistration.installing
* property acquires a new service worker.
*/
onupdatefound: () => void;
/**
* Allows you to update a service worker.
*/
update(): void;
/**
* Unregisters the service worker registration and returns a promise
* (see Promise). The service worker will finish any ongoing operations
* before it is unregistered.
*/
unregister(): Promise<boolean>;
}
interface ServiceWorkerRegisterOptions {
scope: string;
}
/**
* Provides an object representing the service worker as an overall unit in the
* network ecosystem, including facilities to register, unregister and update
* service workers, and access the state of service workers
* and their registrations.
*/
interface ServiceWorkerContainer {
/**
* Returns a ServiceWorker object if its state is activated (the same object
* returned by ServiceWorkerRegistration.active). This property returns null
* if the request is a force refresh (Shift + refresh) or if there is no
* active worker.
* @readonly
*/
controller: ServiceWorker;
/**
* Defines whether a service worker is ready to control a page or not.
* It returns a Promise that will never reject, which resolves to a
* ServiceWorkerRegistration with an ServiceWorkerRegistration.active worker.
* @readonly
*/
ready: Promise<ServiceWorkerRegistration>;
/**
* An event handler fired whenever a controllerchange event occurs — when
* the document's associated ServiceWorkerRegistration acquires a new
* ServiceWorkerRegistration.active worker.
*
* @param [controllerchangeevent]
*/
oncontrollerchange: (controllerchangeevent?: Event) => void;
/**
* An event handler fired whenever an error event occurs in the associated
* service workers.
*
* @param [errorevent]
*/
onerror: (errorevent?: ErrorEvent) => void;
/**
* An event handler fired whenever a message event occurs — when incoming
* messages are received to the ServiceWorkerContainer object (e.g. via a
* MessagePort.postMessage() call.)
*
* @param [messageevent]
*/
onmessage: (messageevent?: MessageEvent) => void;
/**
* Creates or updates a ServiceWorkerRegistration for the given scriptURL.
*
* @param scriptURL The URL of the service worker script.
* @param [options] An options object to provide options upon registration.
* Currently available options are: scope: A USVString representing a URL
* that defines a service worker's registration scope; what range of URLs a
* service worker can control. This is usually a relative URL, and it
* defaults to '/' when not specified.
*/
register(scriptURL: string, options?: ServiceWorkerRegisterOptions): Promise<ServiceWorkerRegistration>;
/**
* Gets a ServiceWorkerRegistration object whose scope URL matches the
* provided document URL. If the method can't return a
* ServiceWorkerRegistration, it returns a Promise.
*
* @param [scope] A unique identifier for a service worker registration — the
* scope URL of the registration object you want to return. This is usually
* a relative URL.
*/
getRegistration(scope?: string): Promise<ServiceWorkerRegistration>;
/**
* Returns all ServiceWorkerRegistrations associated with a
* ServiceWorkerContainer in an array. If the method can't return
* ServiceWorkerRegistrations, it returns a Promise.
*/
getRegistrations(): Promise<Array<ServiceWorkerRegistration>>;
}
/**
* The parameter passed into the oninstall handler, the InstallEvent interface
* represents an install action that is dispatched on the
* ServiceWorkerGlobalScope of a ServiceWorker. As a child of ExtendableEvent,
* it ensures that functional events such as FetchEvent are not dispatched
* during installation.
*/
interface InstallEvent extends ExtendableEvent {
/**
* Returns the ServiceWorker that is currently actively controlling the page.
* @readonly
*/
activeWorker: ServiceWorker;
}
interface ServiceWorkerGlobalScope {
/**
* Contains the Clients object associated with the service worker.
* @readonly
*/
clients: ServiceWorkerClients;
/**
* Contains the ServiceWorkerRegistration object that represents the
* service worker's registration.
* @readonly
*/
registration: ServiceWorkerRegistration;
/**
* An event handler fired whenever an activate event occurs — when a
* ServiceWorkerRegistration acquires a new ServiceWorkerRegistration.active
* worker.
*
* @param [activateevent]
*/
onactivate: (activateevent?: ExtendableEvent) => void;
/**
* Not defined in the spec yet, but it looks like this will be fired when
* the device is nearly out of storage space, prompting the UA to start
* claiming back some space from web apps that are using client-side storage,
* and the current app is targeted.
*
* @param [beforeevictedevent]
*/
onbeforeevicted: (beforeevictedevent?: Event) => void;
/**
* Not defined in the spec yet, but it looks like this will be fired when
* the device is out of storage space, and the UA claims back some space
* from the current app.
*
* @param [evictedevent]
*/
onevicted: (evictedevent?: Event) => void;
/**
* An event handler fired whenever a fetch event occurs — when a fetch()
* is called.
*
* @param [fetchevent]
*/
onfetch: (fetchevent?: FetchEvent) => void;
/**
* An event handler fired whenever an install event occurs — when a
* ServiceWorkerRegistration acquires a new
* ServiceWorkerRegistration.installing worker.
*
* @param [installevent]
*/
oninstall: (installevent?: InstallEvent) => void;
/**
* An event handler fired whenever a message event occurs — when incoming
* messages are received. Controlled pages can use the
* MessagePort.postMessage() method to send messages to service workers.
* The service worker can optionally send a response back via the
* MessagePort exposed in event.data.port, corresponding to the controlled
* page.
*
* @param [messageevent]
*/
onmessage: (messageevent?: MessageEvent) => void;
/**
* An event handler fired whenever a notificationclick event occurs — when
* a user clicks on a displayed notification.
*
* @param [notificationclickevent]
*/
onnotificationclick: (notificationclickevent?: NotificationEvent) => void;
/**
* An event handler fired whenever a push event occurs — when a server
* push notification is received.
*
* @param [onpushevent]
*/
onpush: (onpushevent?: Event) => void;
/**
* An event handler fired whenever a pushsubscriptionchange event occurs —
* when a push subscription has been invalidated, or is about to be
* invalidated (e.g. when a push service sets an expiration time).
*
* @param [pushsubscriptionchangeevent]
*/
onpushsubscriptionchange: (pushsubscriptionchangeevent?: Event) => void;
/**
* Allows the current service worker registration to progress from waiting
* to active state while service worker clients are using it.
*/
skipWaiting(): Promise<void>;
/**
* TODO GlobalFetch
* @param url
* @param init
*/
fetch(url: string | Request, init?: Object): Promise<Response>;
}
interface Navigator {
/**
* Returns a ServiceWorkerContainer object, which provides access to
* registration, removal, upgrade, and communication with the ServiceWorker
* objects for the associated document.
*/
serviceWorker: ServiceWorkerContainer;
}
interface Global extends ServiceWorkerGlobalScope {
caches: CacheStorage;
}
interface NotificationEvent extends Event, ExtendableEvent {
notification: any;
}"><pre class="notranslate"><span class="pl-c">// Type definitions for service_worker_api</span>
<span class="pl-c">// Project: https://developer.mozilla.org/fr/docs/Web/API/ServiceWorker_API</span>
<span class="pl-c">// Definitions by: Tristan Caron <https://github.com/tristancaron></span>
<span class="pl-c">// Definitions: https://github.com/borisyankov/DefinitelyTyped</span>
<span class="pl-c">// <reference path="../es6-promise/es6-promise.d.ts" /> // REMOVED third "/" so this doesn't fire. Problem with duplicate Promises</span>
<span class="pl-c">// between es6 and typescript - https://github.com/DefinitelyTyped/DefinitelyTyped/issues/5015</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Provides methods relating to the body of the response/request, allowing you</span>
<span class="pl-c"> * to declare what its content type is and how it should be handled.</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">Body</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Contains a Boolean that indicates whether the body has been read.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">bodyUsed</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Takes a Response stream and reads it to completion.</span>
<span class="pl-c"> * It returns a promise that resolves with an ArrayBuffer.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">arrayBuffer</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">ArrayBuffer</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Takes a Response stream and reads it to completion.</span>
<span class="pl-c"> * It returns a promise that resolves with a Blob.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">blob</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">Blob</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Takes a Response stream and reads it to completion.</span>
<span class="pl-c"> * It returns a promise that resolves with a FormData object.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">formData</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">FormData</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Takes a Response stream and reads it to completion.</span>
<span class="pl-c"> * It returns a promise that resolves with a JSON object.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">json</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">JSON</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Takes a Response stream and reads it to completion.</span>
<span class="pl-c"> * It returns a promise that resolves with a USVString (text).</span>
<span class="pl-c"> */</span>
<span class="pl-c1">text</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">Text</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"> * Represents response/request headers, allowing you to query them and take</span>
<span class="pl-c"> * different actions depending on the results.</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">Header</span> <span class="pl-kos">{</span>
<span class="pl-k">new</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Header</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Appends a new value onto an existing header inside a Headers object, or</span>
<span class="pl-c"> * adds the header if it does not already exist.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> name The name of the HTTP header you want to add to the Headers</span>
<span class="pl-c"> * object.</span>
<span class="pl-c"> * <span class="pl-k">@param</span> value The value of the HTTP header you want to add.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">append</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">value</span>: <span class="pl-smi">string</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-c">/**</span>
<span class="pl-c"> * Deletes a header from a Headers object.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> name The name of the HTTP header you want to delete from the</span>
<span class="pl-c"> * Headers object.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">delete</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-smi">string</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-c">/**</span>
<span class="pl-c"> * Returns the first value of a given header from within a Headers object.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> name The name of the HTTP header whose value you want to retrieve</span>
<span class="pl-c"> * from the Headers object. If the given name is not the name of an</span>
<span class="pl-c"> * HTTP header, this method throws a TypeError.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">get</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns an array of all the values of a header within a Headers object</span>
<span class="pl-c"> * with a given name.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> name The name of the HTTP header whose values you want to retrieve</span>
<span class="pl-c"> * from the Headers object. If the given name is not the name of an</span>
<span class="pl-c"> * HTTP header, this method throws a TypeError.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">getAll</span><span class="pl-kos">(</span><span class="pl-s1">name</span>:<span class="pl-smi">string</span><span class="pl-kos">)</span>: <span class="pl-smi">Array</span><span class="pl-kos"><</span><span class="pl-smi">string</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a boolean stating whether a Headers object contains a</span>
<span class="pl-c"> * certain header.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> name The name of the HTTP header you want to test for. If the</span>
<span class="pl-c"> * given name is not the name of an HTTP header, this method throws</span>
<span class="pl-c"> * a TypeError.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">has</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Sets a new value for an existing header inside a Headers object, or</span>
<span class="pl-c"> * adds the header if it does not already exist.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> name The name of the HTTP header you want to set to a new value.</span>
<span class="pl-c"> * If the given name is not the name of an HTTP header, this method throws</span>
<span class="pl-c"> * a TypeError.</span>
<span class="pl-c"> * <span class="pl-k">@param</span> value The new value you want to set.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">set</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">value</span>: <span class="pl-smi">string</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-c">/**</span>
<span class="pl-c"> * Represents the response to a request.</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">Response</span> <span class="pl-k">extends</span> <span class="pl-smi">Body</span> <span class="pl-kos">{</span>
<span class="pl-k">new</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Response</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Contains the URL of the response.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">url</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Contains a boolean stating whether this is the final URL of the response.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">useFinalURL</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Contains the status code of the response (e.g., 200 for a success).</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">status</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Contains a boolean stating whether the response was successful</span>
<span class="pl-c"> * (status in the range 200-299) or not.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">ok</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Contains the status message corresponding to the status code</span>
<span class="pl-c"> * (e.g., OK for 200).</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">statusText</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Creates a clone of a Response object.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">clone</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Response</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a new Response object associated with a network error.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">error</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Response</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Creates a new response with a different URL.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">redirect</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Response</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Represents a resource request.</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">Request</span> <span class="pl-k">extends</span> <span class="pl-smi">Body</span> <span class="pl-kos">{</span>
<span class="pl-k">new</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Request</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Contains the request's method (GET, POST, etc.).</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">method</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Contains the URL of the request.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">url</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Contains the context of the request (e.g., audio, image, iframe, etc.).</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">context</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Contains the referrer of the request (e.g., client).</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">referrer</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Creates a copy of the current Request object.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">clone</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Request</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * An CacheOptions object allowing you to set specific control options for the</span>
<span class="pl-c"> * matching done in the match operation.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@property</span> [ignoreSearch] A Boolean that specifies whether the matching</span>
<span class="pl-c"> * process should ignore the query string in the url. If set to true,</span>
<span class="pl-c"> * the ?value=bar part of http://foo.com/?value=bar would be ignored when</span>
<span class="pl-c"> * performing a match. It defaults to false.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@property</span> [ignoreMethod] A Boolean that, when set to true, prevents matching</span>
<span class="pl-c"> * operations from validating the Request http method (normally only GET</span>
<span class="pl-c"> * and HEAD are allowed.) It defaults to false.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@property</span> [ignoreVary] A Boolean that when set to true tells the matching</span>
<span class="pl-c"> * operation not to perform VARY header matching — i.e. if the URL matches you</span>
<span class="pl-c"> * will get a match regardless of the Response object having a VARY header or</span>
<span class="pl-c"> * not. It defaults to false.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@property</span> [cacheName] A DOMString that represents a specific cache to search</span>
<span class="pl-c"> * within. Note that this option is ignored by Cache.match().</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">CacheOptions</span> <span class="pl-kos">{</span>
<span class="pl-c1">ignoreSearch</span>?: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-c1">ignoreMethod</span>?: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-c1">ignoreVary</span>?: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-c1">cacheName</span>?: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Represents the storage for Request / Response object pairs that are cached as</span>
<span class="pl-c"> * part of the ServiceWorker life cycle.</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">Cache</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a Promise that resolves to the response associated with the first</span>
<span class="pl-c"> * matching request in the Cache object.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> request The Request you are attempting to find in the Cache.</span>
<span class="pl-c"> * <span class="pl-k">@param</span> {<span class="pl-smi">CacheOptions</span>} options</span>
<span class="pl-c"> */</span>
<span class="pl-c1">match</span><span class="pl-kos">(</span><span class="pl-s1">request</span>: <span class="pl-smi">Request</span> <span class="pl-c1">|</span> <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">options</span>?: <span class="pl-smi">CacheOptions</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">Response</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a Promise that resolves to an array of all matching responses in</span>
<span class="pl-c"> * the Cache object.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> request The Request you are attempting to find in the Cache.</span>
<span class="pl-c"> * <span class="pl-k">@param</span> {<span class="pl-smi">CacheOptions</span>} options</span>
<span class="pl-c"> */</span>
<span class="pl-c1">matchAll</span><span class="pl-kos">(</span><span class="pl-s1">request</span>: <span class="pl-smi">Request</span> <span class="pl-c1">|</span> <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">options</span>?: <span class="pl-smi">CacheOptions</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">Array</span><span class="pl-kos"><</span><span class="pl-smi">Response</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"> * Returns a Promise that resolves to a new Cache entry whose key</span>
<span class="pl-c"> * is the request.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> request The Request you want to add to the cache.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">add</span><span class="pl-kos">(</span><span class="pl-s1">request</span>: <span class="pl-smi">Request</span> <span class="pl-c1">|</span> <span class="pl-smi">string</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-c">/**</span>
<span class="pl-c"> * Returns a Promise that resolves to a new array of Cache entries whose</span>
<span class="pl-c"> * keys are the requests.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> request An array of Request objects you want to add to the cache.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">addAll</span><span class="pl-kos">(</span>...<span class="pl-s1">request</span>: <span class="pl-smi">Array</span><span class="pl-kos"><</span><span class="pl-smi">Request</span> <span class="pl-c1">|</span> <span class="pl-smi">string</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-c">/**</span>
<span class="pl-c"> * Adds additional key/value pairs to the current Cache object.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> request The Request you want to add to the cache.</span>
<span class="pl-c"> * <span class="pl-k">@param</span> response The response you want to match up to the request.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">put</span><span class="pl-kos">(</span><span class="pl-s1">request</span>: <span class="pl-smi">Request</span><span class="pl-kos">,</span> <span class="pl-s1">response</span>: <span class="pl-smi">Response</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-c">/**</span>
<span class="pl-c"> * Finds the Cache entry whose key is the request, and if found, deletes the</span>
<span class="pl-c"> * Cache entry and returns a Promise that resolves to true. If no Cache</span>
<span class="pl-c"> * entry is found, it returns false.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> request The Request you are looking to delete.</span>
<span class="pl-c"> * <span class="pl-k">@param</span> {<span class="pl-smi">CacheOptions</span>} options</span>
<span class="pl-c"> */</span>
<span class="pl-c1">delete</span><span class="pl-kos">(</span><span class="pl-s1">request</span>: <span class="pl-smi">Request</span> <span class="pl-c1">|</span> <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">options</span>?: <span class="pl-smi">CacheOptions</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">boolean</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a Promise that resolves to an array of Cache keys.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> request The Request want to return, if a specific key is desired.</span>
<span class="pl-c"> * <span class="pl-k">@param</span> {<span class="pl-smi">CacheOptions</span>} options</span>
<span class="pl-c"> */</span>
<span class="pl-c1">keys</span><span class="pl-kos">(</span><span class="pl-s1">request</span>?: <span class="pl-smi">Request</span><span class="pl-kos">,</span> <span class="pl-s1">options</span>?: <span class="pl-smi">CacheOptions</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">Array</span><span class="pl-kos"><</span><span class="pl-smi">Request</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"> * Represents the storage for Cache objects. It provides a master directory of</span>
<span class="pl-c"> * all the named caches that a ServiceWorker can access and maintains a mapping</span>
<span class="pl-c"> * of string names to corresponding Cache objects.</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">CacheStorage</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Checks if a given Request is a key in any of the Cache objects that the</span>
<span class="pl-c"> * CacheStorage object tracks and returns a Promise that resolves</span>
<span class="pl-c"> * to that match.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> request The Request you are looking for a match for in the CacheStorage.</span>
<span class="pl-c"> * <span class="pl-k">@param</span> {<span class="pl-smi">CacheOptions</span>} options</span>
<span class="pl-c"> */</span>
<span class="pl-c1">match</span><span class="pl-kos">(</span><span class="pl-s1">request</span>: <span class="pl-smi">Request</span> <span class="pl-c1">|</span> <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">options</span>?: <span class="pl-smi">CacheOptions</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">Response</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a Promise that resolves to true if a Cache object matching</span>
<span class="pl-c"> * the cacheName exists.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> cacheName The Request you are looking for a match for in the</span>
<span class="pl-c"> * CacheStorage.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">has</span><span class="pl-kos">(</span><span class="pl-s1">cacheName</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">boolean</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a Promise that resolves to the Cache object matching</span>
<span class="pl-c"> * the cacheName.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> cacheName The name of the cache you want to open.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">open</span><span class="pl-kos">(</span><span class="pl-s1">cacheName</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">Cache</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Finds the Cache object matching the cacheName, and if found, deletes the</span>
<span class="pl-c"> * Cache object and returns a Promise that resolves to true. If no</span>
<span class="pl-c"> * Cache object is found, it returns false.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> cacheName The name of the cache you want to delete.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">delete</span><span class="pl-kos">(</span><span class="pl-s1">cacheName</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">boolean</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a Promise that will resolve with an array containing strings</span>
<span class="pl-c"> * corresponding to all of the named Cache objects tracked by the</span>
<span class="pl-c"> * CacheStorage. Use this method to iterate over a list of all the</span>
<span class="pl-c"> * Cache objects.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">keys</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">Array</span><span class="pl-kos"><</span><span class="pl-smi">string</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"> * Represents the scope of a service worker client. A service worker client is</span>
<span class="pl-c"> * either a document in a browser context or a SharedWorker, which is controlled</span>
<span class="pl-c"> * by an active worker.</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">ServiceWorkerClient</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Allows a service worker client to send a message to a ServiceWorker.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> message The message to send to the service worker.</span>
<span class="pl-c"> * <span class="pl-k">@param</span> [transfer] A transferable object such as, for example, a reference</span>
<span class="pl-c"> * to a port.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">postMessage</span><span class="pl-kos">(</span><span class="pl-s1">message</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">transfer</span>?: <span class="pl-smi">Object</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-c">/**</span>
<span class="pl-c"> * Indicates the type of browsing context of the current client.</span>
<span class="pl-c"> * This value can be one of auxiliary, top-level, nested, or none.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">frameType</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns the id of the Client object.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">id</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * The URL of the current service worker client.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">url</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">interface</span> <span class="pl-smi">WindowClient</span> <span class="pl-k">extends</span> <span class="pl-smi">ServiceWorkerClient</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Gives user input focus to the current client.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">focus</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">WindowClient</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * A boolean that indicates whether the current client has focus.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">focused</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Indicates the visibility of the current client. This value can be one of</span>
<span class="pl-c"> * hidden, visible, prerender, or unloaded.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">visibilityState</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">interface</span> <span class="pl-smi">ServiceWorkerClientsMatchOptions</span> <span class="pl-kos">{</span>
<span class="pl-c1">includeUncontrolled</span>?: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-c1">type</span>?: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Represents a container for a list of Client objects; the main way to access</span>
<span class="pl-c"> * the active service worker clients at the current origin.</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">ServiceWorkerClients</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Gets a list of service worker clients and returns them in a Promise.</span>
<span class="pl-c"> * Include the options parameter to return all service worker clients whose</span>
<span class="pl-c"> * origin is the same as the associated service worker's origin. If options</span>
<span class="pl-c"> * are not included, the method returns only the service worker clients</span>
<span class="pl-c"> * controlled by the service worker.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> options</span>
<span class="pl-c"> */</span>
<span class="pl-c1">matchAll</span><span class="pl-kos">(</span><span class="pl-s1">options</span>: <span class="pl-smi">ServiceWorkerClientsMatchOptions</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">Array</span><span class="pl-kos"><</span><span class="pl-smi">ServiceWorkerClient</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"> * Opens a service worker Client in a new browser window.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> url A string representing the URL of the client you want to open</span>
<span class="pl-c"> * in the window.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">openWindow</span><span class="pl-kos">(</span><span class="pl-s1">url</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">WindowClient</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Allows an active Service Worker to set itself as the active worker for a</span>
<span class="pl-c"> * client page when the worker and the page are in the same scope.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">claim</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-kos">}</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Extends the lifetime of the install and activate events dispatched on the</span>
<span class="pl-c"> * ServiceWorkerGlobalScope as part of the service worker lifecycle. This</span>
<span class="pl-c"> * ensures that any functional events (like FetchEvent) are not dispatched to</span>
<span class="pl-c"> * the ServiceWorker until it upgrades database schemas, deletes outdated cache</span>
<span class="pl-c"> * entries, etc.</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">ExtendableEvent</span> <span class="pl-k">extends</span> <span class="pl-smi">Event</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Extends the lifetime of the event.</span>
<span class="pl-c"> * It is intended to be called in the install EventHandler for the</span>
<span class="pl-c"> * installing worker and on the active EventHandler for the active worker.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> all</span>
<span class="pl-c"> */</span>
<span class="pl-c1">waitUntil</span><span class="pl-kos">(</span><span class="pl-s1">all</span>: <span class="pl-smi">any</span><span class="pl-kos">)</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * The parameter passed into the ServiceWorkerGlobalScope.onfetch handler,</span>
<span class="pl-c"> * FetchEvent represents a fetch action that is dispatched on the</span>
<span class="pl-c"> * ServiceWorkerGlobalScope of a ServiceWorker. It contains information about</span>
<span class="pl-c"> * the request and resulting response, and provides the FetchEvent.respondWith()</span>
<span class="pl-c"> * method, which allows us to provide an arbitrary response back to the</span>
<span class="pl-c"> * controlled page.</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">FetchEvent</span> <span class="pl-k">extends</span> <span class="pl-smi">Event</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a Boolean that is true if the event was dispatched with the</span>
<span class="pl-c"> * user's intention for the page to reload, and false otherwise. Typically,</span>
<span class="pl-c"> * pressing the refresh button in a browser is a reload, while clicking a</span>
<span class="pl-c"> * link and pressing the back button is not.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">isReload</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns the Request that triggered the event handler.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">request</span>: <span class="pl-smi">Request</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns the Client that the current service worker is controlling.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">client</span>: <span class="pl-smi">ServiceWorkerClient</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Resolves by returning a Response or a network error to Fetch.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> all</span>
<span class="pl-c"> */</span>
<span class="pl-c1">respondWith</span><span class="pl-kos">(</span><span class="pl-s1">all</span>: <span class="pl-smi">any</span><span class="pl-kos">)</span>: <span class="pl-smi">Response</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Represents a service worker. Multiple browsing contexts (e.g. pages, workers,</span>
<span class="pl-c"> * etc.) can be associated with the same ServiceWorker object.</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">ServiceWorker</span> <span class="pl-k">extends</span> <span class="pl-smi">Worker</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns the ServiceWorker serialized script URL defined as part of</span>
<span class="pl-c"> * ServiceWorkerRegistration. The URL must be on the same origin as the</span>
<span class="pl-c"> * document that registers the ServiceWorker.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">scriptURL</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns the state of the service worker. It returns one of the following</span>
<span class="pl-c"> * values: installing, installed, activating, activated, or redundant.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">state</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * An EventListener property called whenever an event of type statechange</span>
<span class="pl-c"> * is fired; it is basically fired anytime the ServiceWorker.state changes.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> [statechangeevent]</span>
<span class="pl-c"> */</span>
<span class="pl-c1">onstatechange</span>: <span class="pl-kos">(</span><span class="pl-s1">statechangeevent</span>?: <span class="pl-smi">any</span><span class="pl-kos">)</span> <span class="pl-c1">=></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-c">/**</span>
<span class="pl-c"> * The PushSubscription interface provides a subcription's URL endpoint and</span>
<span class="pl-c"> * subscription ID.</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">PushSubscription</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * The endpoint associated with the push subscription.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">endpoint</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * The subscription ID associated with the push subscription.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">subscriptionId</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * The PushManager interface provides a way to receive notifications from</span>
<span class="pl-c"> * third-party servers as well as request URLs for push notifications.</span>
<span class="pl-c"> * This interface has replaced functionality offered by the obsolete</span>
<span class="pl-c"> * PushRegistrationManager.</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">PushManager</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a promise that resolves to a PushSubscription with details of a</span>
<span class="pl-c"> * new push subscription.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">subscribe</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">PushSubscription</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a promise that resolves to a PushSubscription details of</span>
<span class="pl-c"> * the retrieved push subscription.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">getSubscription</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">PushSubscription</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a promise that resolves to the PushPermissionStatus of the</span>
<span class="pl-c"> * requesting webapp, which will be one of granted, denied, or default.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">hasPermission</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">any</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"> * Represents a service worker registration.</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">ServiceWorkerRegistration</span> <span class="pl-k">extends</span> <span class="pl-smi">EventTarget</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a unique identifier for a service worker registration.</span>
<span class="pl-c"> * This must be on the same origin as the document that registers</span>
<span class="pl-c"> * the ServiceWorker.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">scope</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a service worker whose state is installing. This is initially</span>
<span class="pl-c"> * set to null.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">installing</span>: <span class="pl-smi">ServiceWorker</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a service worker whose state is installed. This is initially</span>
<span class="pl-c"> * set to null.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">waiting</span>: <span class="pl-smi">ServiceWorker</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a service worker whose state is either activating or activated.</span>
<span class="pl-c"> * This is initially set to null. An active worker will control a</span>
<span class="pl-c"> * ServiceWorkerClient if the client's URL falls within the scope of the</span>
<span class="pl-c"> * registration (the scope option set when ServiceWorkerContainer.register</span>
<span class="pl-c"> * is first called).</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">active</span>: <span class="pl-smi">ServiceWorker</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns an interface to for managing push subscriptions, including</span>
<span class="pl-c"> * subcribing, getting an anctive subscription, and accessing push</span>
<span class="pl-c"> * permission status.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">pushManager</span>: <span class="pl-smi">PushManager</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * An EventListener property called whenever an event of type updatefound</span>
<span class="pl-c"> * is fired; it is fired any time the ServiceWorkerRegistration.installing</span>
<span class="pl-c"> * property acquires a new service worker.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">onupdatefound</span>: <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Allows you to update a service worker.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">update</span><span class="pl-kos">(</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-c">/**</span>
<span class="pl-c"> * Unregisters the service worker registration and returns a promise</span>
<span class="pl-c"> * (see Promise). The service worker will finish any ongoing operations</span>
<span class="pl-c"> * before it is unregistered.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">unregister</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">boolean</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">interface</span> <span class="pl-smi">ServiceWorkerRegisterOptions</span> <span class="pl-kos">{</span>
<span class="pl-c1">scope</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Provides an object representing the service worker as an overall unit in the</span>
<span class="pl-c"> * network ecosystem, including facilities to register, unregister and update</span>
<span class="pl-c"> * service workers, and access the state of service workers</span>
<span class="pl-c"> * and their registrations.</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">ServiceWorkerContainer</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a ServiceWorker object if its state is activated (the same object</span>
<span class="pl-c"> * returned by ServiceWorkerRegistration.active). This property returns null</span>
<span class="pl-c"> * if the request is a force refresh (Shift + refresh) or if there is no</span>
<span class="pl-c"> * active worker.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">controller</span>: <span class="pl-smi">ServiceWorker</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Defines whether a service worker is ready to control a page or not.</span>
<span class="pl-c"> * It returns a Promise that will never reject, which resolves to a</span>
<span class="pl-c"> * ServiceWorkerRegistration with an ServiceWorkerRegistration.active worker.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">ready</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">ServiceWorkerRegistration</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * An event handler fired whenever a controllerchange event occurs — when</span>
<span class="pl-c"> * the document's associated ServiceWorkerRegistration acquires a new</span>
<span class="pl-c"> * ServiceWorkerRegistration.active worker.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> [controllerchangeevent]</span>
<span class="pl-c"> */</span>
<span class="pl-c1">oncontrollerchange</span>: <span class="pl-kos">(</span><span class="pl-s1">controllerchangeevent</span>?: <span class="pl-smi">Event</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * An event handler fired whenever an error event occurs in the associated</span>
<span class="pl-c"> * service workers.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> [errorevent]</span>
<span class="pl-c"> */</span>
<span class="pl-c1">onerror</span>: <span class="pl-kos">(</span><span class="pl-s1">errorevent</span>?: <span class="pl-smi">ErrorEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * An event handler fired whenever a message event occurs — when incoming</span>
<span class="pl-c"> * messages are received to the ServiceWorkerContainer object (e.g. via a</span>
<span class="pl-c"> * MessagePort.postMessage() call.)</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> [messageevent]</span>
<span class="pl-c"> */</span>
<span class="pl-c1">onmessage</span>: <span class="pl-kos">(</span><span class="pl-s1">messageevent</span>?: <span class="pl-smi">MessageEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Creates or updates a ServiceWorkerRegistration for the given scriptURL.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> scriptURL The URL of the service worker script.</span>
<span class="pl-c"> * <span class="pl-k">@param</span> [options] An options object to provide options upon registration.</span>
<span class="pl-c"> * Currently available options are: scope: A USVString representing a URL</span>
<span class="pl-c"> * that defines a service worker's registration scope; what range of URLs a</span>
<span class="pl-c"> * service worker can control. This is usually a relative URL, and it</span>
<span class="pl-c"> * defaults to '/' when not specified.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">register</span><span class="pl-kos">(</span><span class="pl-s1">scriptURL</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">options</span>?: <span class="pl-smi">ServiceWorkerRegisterOptions</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">ServiceWorkerRegistration</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Gets a ServiceWorkerRegistration object whose scope URL matches the</span>
<span class="pl-c"> * provided document URL. If the method can't return a</span>
<span class="pl-c"> * ServiceWorkerRegistration, it returns a Promise.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> [scope] A unique identifier for a service worker registration — the</span>
<span class="pl-c"> * scope URL of the registration object you want to return. This is usually</span>
<span class="pl-c"> * a relative URL.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">getRegistration</span><span class="pl-kos">(</span><span class="pl-s1">scope</span>?: <span class="pl-smi">string</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">ServiceWorkerRegistration</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns all ServiceWorkerRegistrations associated with a</span>
<span class="pl-c"> * ServiceWorkerContainer in an array. If the method can't return</span>
<span class="pl-c"> * ServiceWorkerRegistrations, it returns a Promise.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">getRegistrations</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">Array</span><span class="pl-kos"><</span><span class="pl-smi">ServiceWorkerRegistration</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"> * The parameter passed into the oninstall handler, the InstallEvent interface</span>
<span class="pl-c"> * represents an install action that is dispatched on the</span>
<span class="pl-c"> * ServiceWorkerGlobalScope of a ServiceWorker. As a child of ExtendableEvent,</span>
<span class="pl-c"> * it ensures that functional events such as FetchEvent are not dispatched</span>
<span class="pl-c"> * during installation.</span>
<span class="pl-c"> */</span>
<span class="pl-k">interface</span> <span class="pl-smi">InstallEvent</span> <span class="pl-k">extends</span> <span class="pl-smi">ExtendableEvent</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns the ServiceWorker that is currently actively controlling the page.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">activeWorker</span>: <span class="pl-smi">ServiceWorker</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">interface</span> <span class="pl-smi">ServiceWorkerGlobalScope</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Contains the Clients object associated with the service worker.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">clients</span>: <span class="pl-smi">ServiceWorkerClients</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Contains the ServiceWorkerRegistration object that represents the</span>
<span class="pl-c"> * service worker's registration.</span>
<span class="pl-c"> * <span class="pl-k">@readonly</span></span>
<span class="pl-c"> */</span>
<span class="pl-c1">registration</span>: <span class="pl-smi">ServiceWorkerRegistration</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * An event handler fired whenever an activate event occurs — when a</span>
<span class="pl-c"> * ServiceWorkerRegistration acquires a new ServiceWorkerRegistration.active</span>
<span class="pl-c"> * worker.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> [activateevent]</span>
<span class="pl-c"> */</span>
<span class="pl-c1">onactivate</span>: <span class="pl-kos">(</span><span class="pl-s1">activateevent</span>?: <span class="pl-smi">ExtendableEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Not defined in the spec yet, but it looks like this will be fired when</span>
<span class="pl-c"> * the device is nearly out of storage space, prompting the UA to start</span>
<span class="pl-c"> * claiming back some space from web apps that are using client-side storage,</span>
<span class="pl-c"> * and the current app is targeted.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> [beforeevictedevent]</span>
<span class="pl-c"> */</span>
<span class="pl-c1">onbeforeevicted</span>: <span class="pl-kos">(</span><span class="pl-s1">beforeevictedevent</span>?: <span class="pl-smi">Event</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Not defined in the spec yet, but it looks like this will be fired when</span>
<span class="pl-c"> * the device is out of storage space, and the UA claims back some space</span>
<span class="pl-c"> * from the current app.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> [evictedevent]</span>
<span class="pl-c"> */</span>
<span class="pl-c1">onevicted</span>: <span class="pl-kos">(</span><span class="pl-s1">evictedevent</span>?: <span class="pl-smi">Event</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * An event handler fired whenever a fetch event occurs — when a fetch()</span>
<span class="pl-c"> * is called.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> [fetchevent]</span>
<span class="pl-c"> */</span>
<span class="pl-c1">onfetch</span>: <span class="pl-kos">(</span><span class="pl-s1">fetchevent</span>?: <span class="pl-smi">FetchEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * An event handler fired whenever an install event occurs — when a</span>
<span class="pl-c"> * ServiceWorkerRegistration acquires a new</span>
<span class="pl-c"> * ServiceWorkerRegistration.installing worker.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> [installevent]</span>
<span class="pl-c"> */</span>
<span class="pl-c1">oninstall</span>: <span class="pl-kos">(</span><span class="pl-s1">installevent</span>?: <span class="pl-smi">InstallEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * An event handler fired whenever a message event occurs — when incoming</span>
<span class="pl-c"> * messages are received. Controlled pages can use the</span>
<span class="pl-c"> * MessagePort.postMessage() method to send messages to service workers.</span>
<span class="pl-c"> * The service worker can optionally send a response back via the</span>
<span class="pl-c"> * MessagePort exposed in event.data.port, corresponding to the controlled</span>
<span class="pl-c"> * page.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> [messageevent]</span>
<span class="pl-c"> */</span>
<span class="pl-c1">onmessage</span>: <span class="pl-kos">(</span><span class="pl-s1">messageevent</span>?: <span class="pl-smi">MessageEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * An event handler fired whenever a notificationclick event occurs — when</span>
<span class="pl-c"> * a user clicks on a displayed notification.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> [notificationclickevent]</span>
<span class="pl-c"> */</span>
<span class="pl-c1">onnotificationclick</span>: <span class="pl-kos">(</span><span class="pl-s1">notificationclickevent</span>?: <span class="pl-smi">NotificationEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * An event handler fired whenever a push event occurs — when a server</span>
<span class="pl-c"> * push notification is received.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> [onpushevent]</span>
<span class="pl-c"> */</span>
<span class="pl-c1">onpush</span>: <span class="pl-kos">(</span><span class="pl-s1">onpushevent</span>?: <span class="pl-smi">Event</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * An event handler fired whenever a pushsubscriptionchange event occurs —</span>
<span class="pl-c"> * when a push subscription has been invalidated, or is about to be</span>
<span class="pl-c"> * invalidated (e.g. when a push service sets an expiration time).</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@param</span> [pushsubscriptionchangeevent]</span>
<span class="pl-c"> */</span>
<span class="pl-c1">onpushsubscriptionchange</span>: <span class="pl-kos">(</span><span class="pl-s1">pushsubscriptionchangeevent</span>?: <span class="pl-smi">Event</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Allows the current service worker registration to progress from waiting</span>
<span class="pl-c"> * to active state while service worker clients are using it.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">skipWaiting</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-c">/**</span>
<span class="pl-c"> * TODO GlobalFetch</span>
<span class="pl-c"> * <span class="pl-k">@param</span> url</span>
<span class="pl-c"> * <span class="pl-k">@param</span> init</span>
<span class="pl-c"> */</span>
<span class="pl-c1">fetch</span><span class="pl-kos">(</span><span class="pl-s1">url</span>: <span class="pl-smi">string</span> <span class="pl-c1">|</span> <span class="pl-smi">Request</span><span class="pl-kos">,</span> <span class="pl-s1">init</span>?: <span class="pl-smi">Object</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi">Response</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">interface</span> <span class="pl-smi">Navigator</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns a ServiceWorkerContainer object, which provides access to</span>
<span class="pl-c"> * registration, removal, upgrade, and communication with the ServiceWorker</span>
<span class="pl-c"> * objects for the associated document.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">serviceWorker</span>: <span class="pl-smi">ServiceWorkerContainer</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">interface</span> <span class="pl-smi">Global</span> <span class="pl-k">extends</span> <span class="pl-smi">ServiceWorkerGlobalScope</span> <span class="pl-kos">{</span>
<span class="pl-c1">caches</span>: <span class="pl-smi">CacheStorage</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">interface</span> <span class="pl-smi">NotificationEvent</span> <span class="pl-k">extends</span> <span class="pl-smi">Event</span><span class="pl-kos">,</span> <span class="pl-smi">ExtendableEvent</span> <span class="pl-kos">{</span>
<span class="pl-c1">notification</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
</details>
<p dir="auto">//cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tristancaron/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tristancaron">@tristancaron</a></p> | <p dir="auto">Using @types/sequelize 4.28.6 (latest stable).</p>
<p dir="auto">QueryInterface.bulkInsert accepts string as first parameter, it should accept string | {schema: string, tableName: string}. I was going to create a pull request but I wasn't sure which of the many branches to use.</p>
<p dir="auto">The fix can be made in: query.interface.d.ts</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jonmagic/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jonmagic">@jonmagic</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tdreyno/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tdreyno">@tdreyno</a></p> | 0 |
<p dir="auto">REPOST of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="40378752" data-permission-text="Title is private" data-url="https://github.com/twbs/bootstrap/issues/14403" data-hovercard-type="issue" data-hovercard-url="/twbs/bootstrap/issues/14403/hovercard" href="https://github.com/twbs/bootstrap/issues/14403">#14403</a> because closed prematurily and not sure the other question I just posted could be reopened (newbie here) but I certainly could not and I think this is an important thing that needs to be sorted out, but if rules entails to continue the conversation on the other post, please delete this one and we will do so.</p>
<p dir="auto"><strong>_OLD</strong>_<br>
I just discovered a bug that has been giving me a headache.</p>
<p dir="auto">Basically I was using a jqvmap and when clicking on a country I would create a popup with some info.<br>
So I initialize the popup as follows:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$('.jvectormap-region').popover({
placement: 'left',
container: '#vmap',
html: 'true',
title: ' ',
});"><pre class="notranslate"><span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">'.jvectormap-region'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">popover</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">placement</span>: <span class="pl-s">'left'</span><span class="pl-kos">,</span>
<span class="pl-c1">container</span>: <span class="pl-s">'#vmap'</span><span class="pl-kos">,</span>
<span class="pl-c1">html</span>: <span class="pl-s">'true'</span><span class="pl-kos">,</span>
<span class="pl-c1">title</span>: <span class="pl-s">' '</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">and onClick I would do this:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$('#vmap').bind('regionClick.jqvmap',
function(event, code, region) {
var baseRegionId = "#jqvmap1_";
baseRegionId = baseRegionId + code;
if ($('#vmap [id^="popover"]').length > 1) {
$('#vmap [id^="popover"]').first().remove();
}
var snapshot_url = "http://www.business-anti-corruption.com/country-profiles/europe-central-asia/" + region + "/snapshot.aspx";
$(".popover-title").html(region);
$(".popover-content").html('<a href=' + snapshot_url + ' target="_blank">Snapshot</a></br><a href="#">page 2</a></br><a href="#">page 3</a></br><a href="#">page 4</a></br>');
}
);"><pre class="notranslate"><span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">'#vmap'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">bind</span><span class="pl-kos">(</span><span class="pl-s">'regionClick.jqvmap'</span><span class="pl-kos">,</span>
<span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">event</span><span class="pl-kos">,</span> <span class="pl-s1">code</span><span class="pl-kos">,</span> <span class="pl-s1">region</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">baseRegionId</span> <span class="pl-c1">=</span> <span class="pl-s">"#jqvmap1_"</span><span class="pl-kos">;</span>
<span class="pl-s1">baseRegionId</span> <span class="pl-c1">=</span> <span class="pl-s1">baseRegionId</span> <span class="pl-c1">+</span> <span class="pl-s1">code</span><span class="pl-kos">;</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">'#vmap [id^="popover"]'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">length</span> <span class="pl-c1">></span> <span class="pl-c1">1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">'#vmap [id^="popover"]'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">first</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">remove</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">snapshot_url</span> <span class="pl-c1">=</span> <span class="pl-s">"http://www.business-anti-corruption.com/country-profiles/europe-central-asia/"</span> <span class="pl-c1">+</span> <span class="pl-s1">region</span> <span class="pl-c1">+</span> <span class="pl-s">"/snapshot.aspx"</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">".popover-title"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">html</span><span class="pl-kos">(</span><span class="pl-s1">region</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">".popover-content"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">html</span><span class="pl-kos">(</span><span class="pl-s">'<a href='</span> <span class="pl-c1">+</span> <span class="pl-s1">snapshot_url</span> <span class="pl-c1">+</span> <span class="pl-s">' target="_blank">Snapshot</a></br><a href="#">page 2</a></br><a href="#">page 3</a></br><a href="#">page 4</a></br>'</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">So basically if there was already a popup on screen I would delete it so that the newly created popup will be alone in the page. Problem is that exactly the 6th time I was clicking on a country a popup would not be created!</p>
<p dir="auto">I ran this multiple times and ALWAYS happened.</p>
<p dir="auto">I solved it by triggering it manually and the issue is then resolved, but this is something that needs to be fixed..</p>
<p dir="auto"><strong>_NEW</strong>_<br>
UPDATE:<br>
You can see this I just uploaded to a site of mine:<br>
<a href="http://alufadminpanel.azurewebsites.net/tmpResource/jvmapCustom/samples/world.html" rel="nofollow">http://alufadminpanel.azurewebsites.net/tmpResource/jvmapCustom/samples/world.html</a> using bootstrap 3.</p>
<p dir="auto">or jsfiddle updated to bootstrap 3: <a href="http://jsfiddle.net/0pc5qzfa/42/" rel="nofollow">http://jsfiddle.net/0pc5qzfa/42/</a></p> | <p dir="auto">I see that with a list-group (non-linking) you use a <code class="notranslate"><ul></code> but then when you want to add a link to the item, you remove the list and instead just put a series a <code class="notranslate"><a href></code> elements all bundled together in a parent <code class="notranslate"><div></code>.</p>
<p dir="auto">This approach is not inline with how you treat other lists that have links (like pagination, navs, navbars etc).</p>
<p dir="auto">Also, semantically, this seems incorrect. A list is a list, regardless of whether it has links or not.</p>
<p dir="auto">I looked in previous issues to see if this was already raised but couldn't see anything. Sorry if it's a duplicate.</p>
<p dir="auto">Bootstrap 3 is AWESOME by the way!!!!!!!!!!!!</p> | 0 |
<h2 dir="auto">Background</h2>
<p dir="auto">I am the developer of an a new framework for writing Telegram bots (<a href="https://github.com/grammyjs/grammY">ref</a>, but the purpose is irrelevant here). The core framework is extensible by plugins that can be published by other authors. As a result, I publish one core package to <a href="https://deno.land/x" rel="nofollow">deno.land/x</a>, and other people and me publish other packages around it.</p>
<h2 dir="auto">Problem Description</h2>
<p dir="auto">While it would be desirable that plugins do not depend on the core module, this is not always possible. Some plugins rely on different parts of the core package (both runtime code and some complicated type transformations) that are also exposed to users, and it makes little sense to duplicate this logic into each plugin.</p>
<p dir="auto">Even if it is possible to achieve duplicate only some parts of the core library, and let maybe users pass in the missing components, this is not always practical and can lead to unnecessarily complex code.</p>
<p dir="auto">Right now, some of the plugins specify the grammY core package as a direct dependency, but this can lead to users downloading multiple versions of the same package.</p>
<h2 dir="auto">How Node Solves It</h2>
<p dir="auto">For an npm package, this would be solved by making the core package a peer dependency with specified semver ranges that are supported. This pattern can be seen a lot in the npm ecosystem, and while peer deps are generally to be avoided, they sometimes have their place.</p>
<h2 dir="auto">One of the Solutions</h2>
<p dir="auto">It would be nice to be able to specify semver ranges in import URLs, à la</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { Bot } from 'https://deno.land/x/grammy@v^0.4.0||^1.0.0/mod.ts'"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">Bot</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'https://deno.land/x/grammy@v^0.4.0||^1.0.0/mod.ts'</span></pre></div>
<p dir="auto">but I don't mind the exact syntax being different.</p>
<p dir="auto">I am by far not the first person to mention this, and it is neither flawless nor the only solution. However, despite some people commenting on the problem, I cannot find a promising suggestion on how to overcome this issue. I looked into ways of restructuring the plugin architecture, but I always ended up at the point that at least one of the plugin packages needed to refer to the core package in some way or another, or at least parts of it.</p>
<p dir="auto">Please let me know if I overlooked a GitHub issue somewhere that discusses this. If that does not exist, what are you suggesting how to handle these situations?</p> | 1 |
|
<p dir="auto"><strong>Apache Airflow version</strong>: 1.10.10</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): ecs task</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): python 3.6 image</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto">Upgrading from 1.10.9 to 1.10.10 gave error when trying to access UI</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Node: 8cec32b7a064
-------------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python3.6/site-packages/flask_admin/base.py", line 69, in inner
return self._run_view(f, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/flask_admin/base.py", line 368, in _run_view
return fn(self, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/flask_login/utils.py", line 258, in decorated_view
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/airflow/utils/db.py", line 74, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/airflow/www/views.py", line 2330, in index
auto_complete_data=auto_complete_data)
File "/usr/local/lib/python3.6/site-packages/airflow/www/views.py", line 389, in render
return super(AirflowViewMixin, self).render(template, **kwargs)
File "/usr/local/lib/python3.6/site-packages/flask_admin/base.py", line 308, in render
return render_template(template, **kwargs)
File "/usr/local/lib/python3.6/site-packages/flask/templating.py", line 140, in render_template
ctx.app,
File "/usr/local/lib/python3.6/site-packages/flask/templating.py", line 120, in _render
rv = template.render(context)
File "/usr/local/lib/python3.6/site-packages/jinja2/asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python3.6/site-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.6/site-packages/airflow/www/templates/airflow/dags.html", line 20, in top-level template code
{% extends "airflow/master.html" %}
File "/usr/local/lib/python3.6/site-packages/airflow/www/templates/airflow/master.html", line 20, in top-level template code
{% extends "admin/master.html" %}
File "/usr/local/lib/python3.6/site-packages/airflow/www/templates/admin/master.html", line 20, in top-level template code
{% extends 'admin/base.html' %}
File "/usr/local/lib/python3.6/site-packages/flask_admin/templates/bootstrap3/admin/base.html", line 38, in top-level template code
{% block page_body %}
File "/usr/local/lib/python3.6/site-packages/airflow/www/templates/admin/master.html", line 191, in block "page_body"
{% block body %}
File "/usr/local/lib/python3.6/site-packages/airflow/www/templates/airflow/dags.html", line 84, in block "body"
<a href="{{ url_for('airflow.'+ dag.get_default_view(), dag_id=dag.dag_id) }}" title="{{ dag.description[0:80] + '...' if dag.description|length > 80 else dag.description }}">
TypeError: object of type 'NoneType' has no len()"><pre class="notranslate"><code class="notranslate">Node: 8cec32b7a064
-------------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python3.6/site-packages/flask_admin/base.py", line 69, in inner
return self._run_view(f, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/flask_admin/base.py", line 368, in _run_view
return fn(self, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/flask_login/utils.py", line 258, in decorated_view
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/airflow/utils/db.py", line 74, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/airflow/www/views.py", line 2330, in index
auto_complete_data=auto_complete_data)
File "/usr/local/lib/python3.6/site-packages/airflow/www/views.py", line 389, in render
return super(AirflowViewMixin, self).render(template, **kwargs)
File "/usr/local/lib/python3.6/site-packages/flask_admin/base.py", line 308, in render
return render_template(template, **kwargs)
File "/usr/local/lib/python3.6/site-packages/flask/templating.py", line 140, in render_template
ctx.app,
File "/usr/local/lib/python3.6/site-packages/flask/templating.py", line 120, in _render
rv = template.render(context)
File "/usr/local/lib/python3.6/site-packages/jinja2/asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python3.6/site-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.6/site-packages/airflow/www/templates/airflow/dags.html", line 20, in top-level template code
{% extends "airflow/master.html" %}
File "/usr/local/lib/python3.6/site-packages/airflow/www/templates/airflow/master.html", line 20, in top-level template code
{% extends "admin/master.html" %}
File "/usr/local/lib/python3.6/site-packages/airflow/www/templates/admin/master.html", line 20, in top-level template code
{% extends 'admin/base.html' %}
File "/usr/local/lib/python3.6/site-packages/flask_admin/templates/bootstrap3/admin/base.html", line 38, in top-level template code
{% block page_body %}
File "/usr/local/lib/python3.6/site-packages/airflow/www/templates/admin/master.html", line 191, in block "page_body"
{% block body %}
File "/usr/local/lib/python3.6/site-packages/airflow/www/templates/airflow/dags.html", line 84, in block "body"
<a href="{{ url_for('airflow.'+ dag.get_default_view(), dag_id=dag.dag_id) }}" title="{{ dag.description[0:80] + '...' if dag.description|length > 80 else dag.description }}">
TypeError: object of type 'NoneType' has no len()
</code></pre></div>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto">See UI</p>
<p dir="auto"><strong>How to reproduce it</strong>:<br>
Upgrade airflow<br>
<code class="notranslate">airflow upgradedb</code></p> | <p dir="auto"><strong>Apache Airflow version</strong>: airflow 1.10.10</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>OS</strong> (e.g. from /etc/os-release): Mac</li>
</ul>
<p dir="auto"><strong>What happened</strong>:<br>
<code class="notranslate">Ooops! throws exception File "/Users/muru/opensrc/py36/airflow_110/venv368/lib/python3.6/site-packages/airflow/www/templates/airflow/dags.html", line 84, in block "body" <a href="{{ url_for('airflow.'+ dag.get_default_view(), dag_id=dag.dag_id) }}" title="{{ dag.description[0:80] + '...' if dag.description|length > 80 else dag.description }}"> TypeError: object of type 'NoneType' has no len()</code></p>
<p dir="auto"><strong>What you expected to happen</strong>:<br>
Should able to load page without errors or exceptions.</p>
<p dir="auto">The description column in dag table can be null. But in the dags.html, should check dag.decription is not null before perform length filter.</p>
<p dir="auto"><strong>How to reproduce it</strong>:<br>
migrate airflow 1.9.0 to 1.10.10<br>
Perform airflow upgradedb<br>
start airflow webserver<br>
launch and open <a href="http://localhost:8080/" rel="nofollow">http://localhost:8080/</a></p>
<p dir="auto"><strong>Anything else we need to know</strong>:<br>
Line 84 in airflow/www/templates/airflow/dags.html file, replace the condition<br>
<code class="notranslate">if dag.description|length > 80 change to if dag.description and dag.description|length > 80</code></p>
<p dir="auto">As a workaround, perform the following db update and open <a href="http://localhost:8080/" rel="nofollow">http://localhost:8080/</a><br>
<code class="notranslate">update dag set description=' ' where description is null;</code></p> | 1 |
<p dir="auto"><strong>Is your feature request related to a problem? Please describe.</strong></p>
<p dir="auto">Currently the incomplete elliptic integrals function in scipy.special do not support complex arguments for <code class="notranslate">phi</code></p>
<p dir="auto"><strong>Describe the solution you'd like</strong><br>
This could easily solved using the Landen Transformation. Let's take as example, the incomplete elliptic integral of the first kind <code class="notranslate">ellipkinc</code></p>
<p dir="auto">We could approximate the function as follows (note that it is expressed in terms of the parameter k instead of m where m=k²):</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17838489/70849434-8851db80-1e7e-11ea-9465-d360f6cd4f60.png"><img src="https://user-images.githubusercontent.com/17838489/70849434-8851db80-1e7e-11ea-9465-d360f6cd4f60.png" alt="k_and_phi" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17838489/70849445-bcc59780-1e7e-11ea-8b31-0b103d652d21.png"><img src="https://user-images.githubusercontent.com/17838489/70849445-bcc59780-1e7e-11ea-8b31-0b103d652d21.png" alt="expression" style="max-width: 100%;"></a></p>
<p dir="auto">from the second expression above,, we could express <code class="notranslate">phi</code> at <code class="notranslate">n+1</code> as follows:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17838489/70849510-a835cf00-1e7f-11ea-89fd-b7db105e1e16.png"><img src="https://user-images.githubusercontent.com/17838489/70849510-a835cf00-1e7f-11ea-89fd-b7db105e1e16.png" alt="phin1" style="max-width: 100%;"></a></p>
<p dir="auto">The advantage of this last expression over using something like <code class="notranslate">scipy.optimize.fsolve</code> is that it could accept complex numbers.</p>
<p dir="auto">The implementation is easy.</p>
<p dir="auto">For different complex arguments for <code class="notranslate">phi</code> the results match exactly with results in WolframAlpha</p>
<p dir="auto"><strong>Reference</strong></p>
<blockquote>
<p dir="auto">R.E. Deakin & M.N. Hunter Elliptic Integrals And Landen's Transformation: What I should've known for Geodesy. <a href="http://www.mygeodesy.id.au/documents/Elliptic%20Integrals%20and%20Landen%27s%20Transformation.pdf" rel="nofollow">Link</a></p>
</blockquote> | <p dir="auto">Continuation of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="13650440" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/1431" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/1431/hovercard" href="https://github.com/scipy/scipy/issues/1431">gh-1431</a>: extend <code class="notranslate">ellipk</code> et al to complex plane.</p> | 1 |
<p dir="auto">Failed: <a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-test-go/17098/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-test-go/17098/</a></p>
<p dir="auto">Run so broken it didn't make JUnit output!</p> | <p dir="auto"><a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-test-go/16981/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-test-go/16981/</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="==================
WARNING: DATA RACE
Write by goroutine 59:
runtime.closechan()
/usr/local/go/src/runtime/chan.go:292 +0x0
k8s.io/kubernetes/pkg/watch.(*FakeWatcher).Stop()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/watch/watch.go:106 +0x102
k8s.io/kubernetes/pkg/client/cache.(*Reflector).watchHandler()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/client/cache/reflector.go:359 +0x1e4
k8s.io/kubernetes/pkg/client/cache.(*Reflector).ListAndWatch()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/client/cache/reflector.go:328 +0x1abf
k8s.io/kubernetes/pkg/client/cache.(*Reflector).RunUntil.func1()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/client/cache/reflector.go:213 +0x36
k8s.io/kubernetes/pkg/util/wait.JitterUntil.func1()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:84 +0x2a
k8s.io/kubernetes/pkg/util/wait.JitterUntil()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:85 +0xc9
k8s.io/kubernetes/pkg/util/wait.Until()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x50
Previous read by goroutine 68:
runtime.chansend()
/usr/local/go/src/runtime/chan.go:115 +0x0
k8s.io/kubernetes/federation/pkg/federation-controller/util/test.(*WatcherDispatcher).Add()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/federation/pkg/federation-controller/util/test/test_helper.go:58 +0x37f
k8s.io/kubernetes/federation/pkg/federation-controller/util/test.RegisterFakeCopyOnCreate.func1.1()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/federation/pkg/federation-controller/util/test/test_helper.go:148 +0x42
Goroutine 59 (running) created at:
k8s.io/kubernetes/pkg/client/cache.(*Reflector).RunUntil()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/client/cache/reflector.go:216 +0x352
k8s.io/kubernetes/pkg/controller/framework.(*Controller).Run()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/controller/framework/controller.go:101 +0x200
Goroutine 68 (finished) created at:
k8s.io/kubernetes/federation/pkg/federation-controller/util/test.RegisterFakeCopyOnCreate.func1()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/federation/pkg/federation-controller/util/test/test_helper.go:150 +0xff
k8s.io/kubernetes/pkg/client/testing/core.(*SimpleReactor).React()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/client/testing/core/fixture.go:447 +0x7c
k8s.io/kubernetes/pkg/client/testing/core.(*Fake).Invokes()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/client/testing/core/fake.go:124 +0x36f
k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/extensions/v1beta1/fake.(*FakeIngresses).Create()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/extensions/v1beta1/fake/fake_ingress.go:38 +0x354
k8s.io/kubernetes/federation/pkg/federation-controller/ingress.NewIngressController.func8()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/federation/pkg/federation-controller/ingress/ingress_controller.go:220 +0x247
k8s.io/kubernetes/federation/pkg/federation-controller/util.(*federatedUpdaterImpl).UpdateWithOnError.func1()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/federation/pkg/federation-controller/util/federated_updater.go:93 +0x1da
==================
--- PASS: TestIngressController (1.22s)
ingress_controller_test.go:47: Creating fake infrastructure
ingress_controller_test.go:94: Running Ingress Controller
ingress_controller_test.go:111: Adding cluster 1
ingress_controller_test.go:114: Adding Ingress UID ConfigMap to cluster 1
ingress_controller_test.go:117: Checking that UID annotation on Cluster 1 annotation was correctly updated
ingress_controller_test.go:123: Adding Federated Ingress
ingress_controller_test.go:125: Checking that Ingress was correctly created in cluster 1
ingress_controller_test.go:132: Checking that IP address gets transferred from cluster ingress to federated ingress
ingress_controller_test.go:143: Modifying Federated Ingress
ingress_controller_test.go:145: Checking that Ingress was correctly updated in cluster 1
ingress_controller_test.go:151: Adding a second cluster
ingress_controller_test.go:158: Checking that the ingress got created in cluster 2
ingress_controller_test.go:164: Checking that the configmap in cluster 2 got updated.
PASS
Found 1 data race(s)
FAIL k8s.io/kubernetes/federation/pkg/federation-controller/ingress 3.456s"><pre class="notranslate"><code class="notranslate">==================
WARNING: DATA RACE
Write by goroutine 59:
runtime.closechan()
/usr/local/go/src/runtime/chan.go:292 +0x0
k8s.io/kubernetes/pkg/watch.(*FakeWatcher).Stop()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/watch/watch.go:106 +0x102
k8s.io/kubernetes/pkg/client/cache.(*Reflector).watchHandler()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/client/cache/reflector.go:359 +0x1e4
k8s.io/kubernetes/pkg/client/cache.(*Reflector).ListAndWatch()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/client/cache/reflector.go:328 +0x1abf
k8s.io/kubernetes/pkg/client/cache.(*Reflector).RunUntil.func1()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/client/cache/reflector.go:213 +0x36
k8s.io/kubernetes/pkg/util/wait.JitterUntil.func1()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:84 +0x2a
k8s.io/kubernetes/pkg/util/wait.JitterUntil()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:85 +0xc9
k8s.io/kubernetes/pkg/util/wait.Until()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x50
Previous read by goroutine 68:
runtime.chansend()
/usr/local/go/src/runtime/chan.go:115 +0x0
k8s.io/kubernetes/federation/pkg/federation-controller/util/test.(*WatcherDispatcher).Add()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/federation/pkg/federation-controller/util/test/test_helper.go:58 +0x37f
k8s.io/kubernetes/federation/pkg/federation-controller/util/test.RegisterFakeCopyOnCreate.func1.1()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/federation/pkg/federation-controller/util/test/test_helper.go:148 +0x42
Goroutine 59 (running) created at:
k8s.io/kubernetes/pkg/client/cache.(*Reflector).RunUntil()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/client/cache/reflector.go:216 +0x352
k8s.io/kubernetes/pkg/controller/framework.(*Controller).Run()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/controller/framework/controller.go:101 +0x200
Goroutine 68 (finished) created at:
k8s.io/kubernetes/federation/pkg/federation-controller/util/test.RegisterFakeCopyOnCreate.func1()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/federation/pkg/federation-controller/util/test/test_helper.go:150 +0xff
k8s.io/kubernetes/pkg/client/testing/core.(*SimpleReactor).React()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/client/testing/core/fixture.go:447 +0x7c
k8s.io/kubernetes/pkg/client/testing/core.(*Fake).Invokes()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/client/testing/core/fake.go:124 +0x36f
k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/extensions/v1beta1/fake.(*FakeIngresses).Create()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/extensions/v1beta1/fake/fake_ingress.go:38 +0x354
k8s.io/kubernetes/federation/pkg/federation-controller/ingress.NewIngressController.func8()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/federation/pkg/federation-controller/ingress/ingress_controller.go:220 +0x247
k8s.io/kubernetes/federation/pkg/federation-controller/util.(*federatedUpdaterImpl).UpdateWithOnError.func1()
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/federation/pkg/federation-controller/util/federated_updater.go:93 +0x1da
==================
--- PASS: TestIngressController (1.22s)
ingress_controller_test.go:47: Creating fake infrastructure
ingress_controller_test.go:94: Running Ingress Controller
ingress_controller_test.go:111: Adding cluster 1
ingress_controller_test.go:114: Adding Ingress UID ConfigMap to cluster 1
ingress_controller_test.go:117: Checking that UID annotation on Cluster 1 annotation was correctly updated
ingress_controller_test.go:123: Adding Federated Ingress
ingress_controller_test.go:125: Checking that Ingress was correctly created in cluster 1
ingress_controller_test.go:132: Checking that IP address gets transferred from cluster ingress to federated ingress
ingress_controller_test.go:143: Modifying Federated Ingress
ingress_controller_test.go:145: Checking that Ingress was correctly updated in cluster 1
ingress_controller_test.go:151: Adding a second cluster
ingress_controller_test.go:158: Checking that the ingress got created in cluster 2
ingress_controller_test.go:164: Checking that the configmap in cluster 2 got updated.
PASS
Found 1 data race(s)
FAIL k8s.io/kubernetes/federation/pkg/federation-controller/ingress 3.456s
</code></pre></div> | 1 |
<p dir="auto">Hi,</p>
<p dir="auto">since I found NO way to contact anyone in a reasonable amount of time, I see no other way than a bug report:</p>
<p dir="auto">The description in scipy.stats.linregress</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="stderr : float
Standard error of the estimate"><pre class="notranslate"><code class="notranslate">stderr : float
Standard error of the estimate
</code></pre></div>
<p dir="auto">is absolutely inexpressive -- what estimate? I propose changing this to</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Standard error of the estimate of the slope"><pre class="notranslate"><code class="notranslate">Standard error of the estimate of the slope
</code></pre></div>
<p dir="auto">or something...</p>
<p dir="auto">Cheers<br>
Stephan</p> | <p dir="auto">To conduct linear regression of x=(0,1,2,3) and y=(0,2,4.5,6), I use the follow code:</p>
<p dir="auto">from scipy.stats import linregress<br>
slope, intercept, r_value, p_value, std_err = linregress((0,1,2,3),(0,2,4.5,6))</p>
<p dir="auto">and the "std_err" is 0.13228756555322888 (see the image below)<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/93cdcf5458c50f21562d35c3c80de2dcae6e5f4f8cee805dc2af85e8db092446/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f353631353131352f313237333735302f38666533313266342d326435352d313165332d386339652d6266333565623036396632612e706e67"><img src="https://camo.githubusercontent.com/93cdcf5458c50f21562d35c3c80de2dcae6e5f4f8cee805dc2af85e8db092446/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f353631353131352f313237333735302f38666533313266342d326435352d313165332d386339652d6266333565623036396632612e706e67" alt="untitled1" data-canonical-src="https://f.cloud.github.com/assets/5615115/1273750/8fe312f4-2d55-11e3-8c9e-bf35eb069f2a.png" style="max-width: 100%;"></a></p>
<p dir="auto">But if I calculate it in Matlab using the following code</p>
<p dir="auto">p=polyfit([0:3],[0,2,4.5,6],1);<br>
f=polyval(p,[0:3]);<br>
std(f-[0,2,4.5,6])</p>
<p dir="auto">, the answer is 0.2415 (see the image below)<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/f4c699497aa9a43726b6354178e75233d7d977c92db203096a73e26fc3e94dce/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f353631353131352f313237333735352f63383833333437632d326435352d313165332d383931322d6230646661313663346135312e706e67"><img src="https://camo.githubusercontent.com/f4c699497aa9a43726b6354178e75233d7d977c92db203096a73e26fc3e94dce/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f353631353131352f313237333735352f63383833333437632d326435352d313165332d383931322d6230646661313663346135312e706e67" alt="untitled2" data-canonical-src="https://f.cloud.github.com/assets/5615115/1273755/c883347c-2d55-11e3-8912-b0dfa16c4a51.png" style="max-width: 100%;"></a></p>
<p dir="auto">. Since I believe in Matlab, I think the calculation of scipy is wrone. So I think it is a bug and report it.</p> | 1 |
<p dir="auto">matplotlib 1.5.3, Python 2.7.3, Linux (Ubuntu 14.04 LTS), installed using pip</p>
<p dir="auto"><code class="notranslate">pyplot.subplots()</code> is significantly slower than <code class="notranslate">pyplot.subplot()</code>. This becomes significant when plotting a large number of subplots. For example <code class="notranslate">subplots(40)</code> takes 2.3s whereas 40 calls to <code class="notranslate">subplot()</code> with differing parameters just take 25ms.</p>
<p dir="auto">Minimal example (using ipython):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
%timeit plt.subplots(40)"><pre class="notranslate"><code class="notranslate">import matplotlib.pyplot as plt
%timeit plt.subplots(40)
</code></pre></div>
<ul dir="auto">
<li>The effect does not depend on the grid: 40x1 is the same as 5x8.</li>
<li>The time needed increases linearly with the number of subplots.</li>
<li>The effect does not seem to depend on the parameters <code class="notranslate">sharex</code>, <code class="notranslate">sharey</code> and <code class="notranslate">squeeze</code> (though I have not tested all possible parameters)</li>
<li>profiling the call reveals that there are a lot of calls to <code class="notranslate">reset_ticks</code>, which use up 75% of the time. See the runsnake screenshot below:</li>
</ul>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2836374/18766172/2920a28c-8119-11e6-95a8-99a4c0d15c76.png"><img src="https://cloud.githubusercontent.com/assets/2836374/18766172/2920a28c-8119-11e6-95a8-99a4c0d15c76.png" alt="matplotlib_subplots40" style="max-width: 100%;"></a></p>
<p dir="auto">It seems there is a lot of unneccesary(?) clearing happening. Would it be possible to speed this up?</p> | <div class="highlight highlight-source-batchfile notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="> python -V
Python 2.7.11
> pip freeze | grep matplotlib
matplotlib==1.5.1
> python -m platform -s "print platform()"
Windows-7-6.1.7601-SP2"><pre class="notranslate"><span class="pl-k">></span> python -V
Python 2.7.11
<span class="pl-k">></span> pip freeze <span class="pl-k">|</span> grep matplotlib
matplotlib<span class="pl-k">==</span>1.5.1
<span class="pl-k">></span> python -m platform -s <span class="pl-s"><span class="pl-pds">"</span>print platform()<span class="pl-pds">"</span></span>
Windows-7-6.1.7601-SP2</pre></div>
<p dir="auto">I have discovered that my application spends a lot of time in Axes creation. Results of class instantiation profiling is below:</p>
<div class="highlight highlight-source-batchfile notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="> python -m timeit -s "from matplotlib.figure import Figure; from matplotlib.axes import Axes; fig = Figure()" "Axes(fig, (0, 0, 1 ,1))"
10 loops, best of 3: 33.2 msec per loop"><pre class="notranslate"><span class="pl-k">></span> python -m timeit -s <span class="pl-s"><span class="pl-pds">"</span>from matplotlib.figure import Figure; from matplotlib.axes import Axes; fig = Figure()<span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">"</span>Axes(fig, (0, 0, 1 ,1))<span class="pl-pds">"</span></span>
<span class="pl-c1">10</span> loops, best of 3: 33.2 msec per loop</pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2743474/16426952/dd5ff57a-3d73-11e6-91c3-7483ec1b82be.png"><img src="https://cloud.githubusercontent.com/assets/2743474/16426952/dd5ff57a-3d73-11e6-91c3-7483ec1b82be.png" alt="axes-compressor" style="max-width: 100%;"></a><br>
Inside <code class="notranslate">Axes.__init__</code> most of the execution time takes <code class="notranslate">self.cla()</code> call and about the half of it is<br>
<a href="https://github.com/matplotlib/matplotlib/blob/a8ad349c583b79ee24e749497381ab026ac5a360/lib/matplotlib/axes/_base.py#L952-L953">this loop below</a></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" for name, spine in six.iteritems(self.spines):
spine.cla()"><pre class="notranslate"> <span class="pl-k">for</span> <span class="pl-s1">name</span>, <span class="pl-s1">spine</span> <span class="pl-c1">in</span> <span class="pl-s1">six</span>.<span class="pl-en">iteritems</span>(<span class="pl-s1">self</span>.<span class="pl-s1">spines</span>):
<span class="pl-s1">spine</span>.<span class="pl-en">cla</span>()</pre></div>
<p dir="auto">After commenting this two lines I have got this:</p>
<div class="highlight highlight-source-batchfile notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="> python -m timeit -s "from matplotlib.figure import Figure; from matplotlib.axes import Axes; fig = Figure()" "Axes(fig, (0, 0, 1 ,1))"
100 loops, best of 3: 17.9 msec per loop"><pre class="notranslate"><span class="pl-k">></span> python -m timeit -s <span class="pl-s"><span class="pl-pds">"</span>from matplotlib.figure import Figure; from matplotlib.axes import Axes; fig = Figure()<span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">"</span>Axes(fig, (0, 0, 1 ,1))<span class="pl-pds">"</span></span>
<span class="pl-c1">100</span> loops, best of 3: 17.9 msec per loop</pre></div>
<p dir="auto">So we have 33 ms per axes creation, and the half of this time it is used for spines creation that actually may be not used (in my case I have bunch of sharex axes and only one of them have spines).<br>
I see a possible solution where creation of spines, scales (you can see creation of logarithmic scale, which I do not use too) and other stuff is delayed to the point when it actually needed/initialized.</p>
<p dir="auto">And the fun part. For 20 created Axes we have 60115 calls to <code class="notranslate">Rectangle.stale</code> (3005 call per Axes instantiation)<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2743474/16427532/6695645e-3d76-11e6-9106-2226cbac1338.png"><img src="https://cloud.githubusercontent.com/assets/2743474/16427532/6695645e-3d76-11e6-9106-2226cbac1338.png" alt="image" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">Please do not auto close the ext install window.<br>
the first run ext install was very slow. but if miss focus, the window will be closed .<br>
Terrible experience.<br>
would you please do not auto close the window?</p>
<p dir="auto">You can provide a close button, let us control when to close the window or not.<br>
we want to install the extension.but not want reopen the window again and again</p> | <p dir="auto">The quick open UI isn't working fully well.</p>
<p dir="auto">We need to come up with a better UI story that can</p>
<ul dir="auto">
<li>increase visibility of extensions;</li>
<li>fix awkward UI interactions we have today (status bar widget, error output pane, messages, etc);</li>
<li>enable us to implement more features in the future (enablement/disablement, statistics, etc).</li>
</ul> | 1 |
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="df = pd.DataFrame( data = {
'acol' : np.arange(4),
'bcol' : 2*np.arange(4)
})
df.drop(df.bcol > 2, axis=0, inplace=True)
print(df)"><pre class="notranslate"><span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>( <span class="pl-s1">data</span> <span class="pl-c1">=</span> {
<span class="pl-s">'acol'</span> : <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">4</span>),
<span class="pl-s">'bcol'</span> : <span class="pl-c1">2</span><span class="pl-c1">*</span><span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">4</span>)
})
<span class="pl-s1">df</span>.<span class="pl-en">drop</span>(<span class="pl-s1">df</span>.<span class="pl-s1">bcol</span> <span class="pl-c1">></span> <span class="pl-c1">2</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">inplace</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-en">print</span>(<span class="pl-s1">df</span>)</pre></div>
<h4 dir="auto">Expected Output</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" acol bcol
0 0 0
1 1 2"><pre class="notranslate"> <span class="pl-s1">acol</span> <span class="pl-s1">bcol</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-c1">1</span> <span class="pl-c1">2</span></pre></div>
<h4 dir="auto">Observed Output</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" acol bcol
2 2 4
3 3 6
4 4 8
"><pre class="notranslate"> <span class="pl-s1">acol</span> <span class="pl-s1">bcol</span>
<span class="pl-c1">2</span> <span class="pl-c1">2</span> <span class="pl-c1">4</span>
<span class="pl-c1">3</span> <span class="pl-c1">3</span> <span class="pl-c1">6</span>
<span class="pl-c1">4</span> <span class="pl-c1">4</span> <span class="pl-c1">8</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">The anticipated behavior was that rows with <code class="notranslate">bcol</code> > 2 would be dropped. The actual behavior is that the boolean gets converted to 0/1, and then treated as index label. So <em>row numbers</em> 0 and/or 1 are dropped... but all other rows will be kept.</p>
<p dir="auto">The documentation did not make it clear what was happening.</p>
<p dir="auto">Solutions might include documentation clarifying that <code class="notranslate">.drop()</code> cannot be used with boolean indexing, or a warning when receiving the (attempted) boolean index.</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.1.final.0
python-bits: 64
OS: Linux
OS-release: 2.6.32-573.12.1.el6.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
<p dir="auto">pandas: 0.20.2<br>
pytest: 3.1.2<br>
pip: 9.0.1<br>
setuptools: 33.1.1.post20170320<br>
Cython: 0.25.2<br>
numpy: 1.12.1<br>
scipy: 0.19.1<br>
xarray: 0.9.6<br>
IPython: 6.1.0<br>
sphinx: 1.6.3<br>
patsy: 0.4.1<br>
dateutil: 2.6.0<br>
pytz: 2017.2<br>
blosc: None<br>
bottleneck: 1.2.0<br>
tables: 3.4.2<br>
numexpr: 2.6.2<br>
feather: None<br>
matplotlib: 2.0.2<br>
openpyxl: 2.5.0a1<br>
xlrd: 1.0.0<br>
xlwt: 1.2.0<br>
xlsxwriter: 0.9.6<br>
lxml: 3.8.0<br>
bs4: 4.5.3<br>
html5lib: 0.9999999<br>
sqlalchemy: 1.1.11<br>
pymysql: 0.7.9.None<br>
psycopg2: 2.7.1 (dt dec pq3 ext lo64)<br>
jinja2: 2.9.5<br>
s3fs: 0.1.1<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details> | <p dir="auto">Shouldn't this work?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> pd.version.version
'0.13.0-472-g9109812'
>>> df = pd.DataFrame(np.random.random((10,4)))
>>> df = df.drop(df[0] > .5)
>>> df.drop(df[0] < .2)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-23-5df7f56de272> in <module>()
----> 1 df.drop(df[0] > .5)
/usr/local/lib/python2.7/dist-packages/pandas-0.13.0_472_g9109812-py2.7-linux-x86_64.egg/pandas/core/generic.pyc in drop(self, labels, axis, level, inplace, **kwargs)
1397 new_axis = axis.drop(labels, level=level)
1398 else:
-> 1399 new_axis = axis.drop(labels)
1400 dropped = self.reindex(**{axis_name: new_axis})
1401 try:
/usr/local/lib/python2.7/dist-packages/pandas-0.13.0_472_g9109812-py2.7-linux-x86_64.egg/pandas/core/index.pyc in drop(self, labels)
1621 mask = indexer == -1
1622 if mask.any():
-> 1623 raise ValueError('labels %s not contained in axis' % labels[mask])
1624 return self.delete(indexer)
1625
ValueError: labels [False False True True True True True False] not contained in axis"><pre class="notranslate"><code class="notranslate">>>> pd.version.version
'0.13.0-472-g9109812'
>>> df = pd.DataFrame(np.random.random((10,4)))
>>> df = df.drop(df[0] > .5)
>>> df.drop(df[0] < .2)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-23-5df7f56de272> in <module>()
----> 1 df.drop(df[0] > .5)
/usr/local/lib/python2.7/dist-packages/pandas-0.13.0_472_g9109812-py2.7-linux-x86_64.egg/pandas/core/generic.pyc in drop(self, labels, axis, level, inplace, **kwargs)
1397 new_axis = axis.drop(labels, level=level)
1398 else:
-> 1399 new_axis = axis.drop(labels)
1400 dropped = self.reindex(**{axis_name: new_axis})
1401 try:
/usr/local/lib/python2.7/dist-packages/pandas-0.13.0_472_g9109812-py2.7-linux-x86_64.egg/pandas/core/index.pyc in drop(self, labels)
1621 mask = indexer == -1
1622 if mask.any():
-> 1623 raise ValueError('labels %s not contained in axis' % labels[mask])
1624 return self.delete(indexer)
1625
ValueError: labels [False False True True True True True False] not contained in axis
</code></pre></div> | 1 |
<p dir="auto"><strong>Glide Version</strong>: 3.7.0</p>
<p dir="auto"><strong>Integration libraries</strong>: glideOkHttpVersion = '1.4.0'</p>
<p dir="auto"><strong>Device/Android Version</strong>: Nexus 5x Android 6.0.1</p>
<p dir="auto">I'm trying to save cached images like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="builder.setDiskCache(() -> {
final File cacheLocation = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), ALBUM);
if (!cacheLocation.mkdirs()) {
Timber.d("Directory not created");
}
return DiskLruCacheWrapper.get(cacheLocation, CACHE_SIZE);
});"><pre class="notranslate"><code class="notranslate">builder.setDiskCache(() -> {
final File cacheLocation = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), ALBUM);
if (!cacheLocation.mkdirs()) {
Timber.d("Directory not created");
}
return DiskLruCacheWrapper.get(cacheLocation, CACHE_SIZE);
});
</code></pre></div>
<p dir="auto">and the question is, if I could set the name policy for cached images, because now they are saved as <code class="notranslate">xxxxxxx.o</code> and I would like to see all those cached images in Gallery App, so that means that they should have an <code class="notranslate">jpg</code> of <code class="notranslate">png</code> extension</p> | <p dir="auto">java.lang.IllegalStateException: Too many receivers, total of 1000, registered for pid: 21355, callerPackage: com.ttd.tokl<br>
at android.os.Parcel.createException(Parcel.java:1971)<br>
at android.os.Parcel.readException(Parcel.java:1931)<br>
at android.os.Parcel.readException(Parcel.java:1881)<br>
at android.app.IActivityManager$Stub$Proxy.registerReceiver(IActivityManager.java:3676)<br>
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1507)<br>
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1468)<br>
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1456)<br>
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:623)<br>
at com.bumptech.glide.c.e.a(SourceFile:55)<br>
at com.bumptech.glide.c.e.i(SourceFile:101)<br>
at com.bumptech.glide.c.a.a(SourceFile:37)<br>
at com.bumptech.glide.i.(SourceFile:116)<br>
at com.bumptech.glide.i.(SourceFile:78)<br>
at com.bbk.appstore.imageloader.e.(SourceFile:38)<br>
at com.bumptech.glide.c.a(SourceFile:19)<br>
at com.bumptech.glide.c.l.a(SourceFile:441)<br>
at com.bumptech.glide.c.l.a(SourceFile:134)<br>
at com.bumptech.glide.c.l.a(SourceFile:116)<br>
at com.bumptech.glide.e.b(SourceFile:707)</p> | 0 |
<h3 dir="auto">Describe the issue:</h3>
<p dir="auto">Running</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pyright foo.py"><pre class="notranslate"><code class="notranslate">pyright foo.py
</code></pre></div>
<p dir="auto">on</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
def myfun(x: np.ndarray, b: np.ndarray):
v = b - x
v.copy()"><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">def</span> <span class="pl-en">myfun</span>(<span class="pl-s1">x</span>: <span class="pl-s1">np</span>.<span class="pl-s1">ndarray</span>, <span class="pl-s1">b</span>: <span class="pl-s1">np</span>.<span class="pl-s1">ndarray</span>):
<span class="pl-s1">v</span> <span class="pl-c1">=</span> <span class="pl-s1">b</span> <span class="pl-c1">-</span> <span class="pl-s1">x</span>
<span class="pl-s1">v</span>.<span class="pl-en">copy</span>()</pre></div>
<p dir="auto">gives</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" /tmp/dummy.py:6:7 - error: Cannot access member "copy" for type "NoReturn"
Member "copy" is unknown (reportGeneralTypeIssues)"><pre class="notranslate"><code class="notranslate"> /tmp/dummy.py:6:7 - error: Cannot access member "copy" for type "NoReturn"
Member "copy" is unknown (reportGeneralTypeIssues)
</code></pre></div>
<p dir="auto">The vector operations <code class="notranslate">+</code>, <code class="notranslate">*</code>, <code class="notranslate">/</code> work fine.</p>
<h3 dir="auto">NumPy/Python version information:</h3>
<p dir="auto">1.21.3 3.9.7 (default, Sep 10 2021, 14:59:43)<br>
[GCC 11.2.0]</p> | <h3 dir="auto">Describe the issue:</h3>
<p dir="auto">A operation between a <code class="notranslate">NDArray[Any]</code> array and an integer, as in the code example, makes Mypy infer the result as<br>
<code class="notranslate">numpy.ndarray[Any, numpy.dtype[numpy.signedinteger[Any]]]</code>. This is an error, as the result could also be a floating point array, or even a complex one.</p>
<h3 dir="auto">Reproduce the code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from numpy.typing import NDArray
def f(arr: NDArray[Any]) -> None:
reveal_type(arr + 2)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">numpy</span>.<span class="pl-s1">typing</span> <span class="pl-k">import</span> <span class="pl-v">NDArray</span>
<span class="pl-k">def</span> <span class="pl-en">f</span>(<span class="pl-s1">arr</span>: <span class="pl-v">NDArray</span>[<span class="pl-v">Any</span>]) <span class="pl-c1">-></span> <span class="pl-c1">None</span>:
<span class="pl-en">reveal_type</span>(<span class="pl-s1">arr</span> <span class="pl-c1">+</span> <span class="pl-c1">2</span>)</pre></div>
<h3 dir="auto">Error message:</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">NumPy/Python version information:</h3>
<p dir="auto">1.21.2 3.7.6 (default, Jan 8 2020, 19:59:22)<br>
[GCC 7.3.0]</p> | 1 |
<p dir="auto">It was removed in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="614141502" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/5135" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/5135/hovercard" href="https://github.com/denoland/deno/pull/5135">#5135</a><br>
Potentially this should be behind the --unstable flag?</p>
<p dir="auto">cc <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></p> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import * as foo from "./foo.wasm";"><pre class="notranslate"><code class="notranslate">import * as foo from "./foo.wasm";
</code></pre></div>
<p dir="auto">where foo will correspond to the exports of the wasm module.</p> | 1 |
<p dir="auto">Under numexpr 2.2.2 (and for some reason that's the latest version available in the anaconda distribution at the moment), I get the following kind of errors:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=">>> data.shape
(2, 219, 104, 6)
>>> data.dtype
dtype('float64')
>>> df = pd.Panel(data[0]).to_frame().reset_index()
>>> df[0].dtype
dtype('float64')
>>> df[0].count()
711
>>> df[0] + 1
TypeError: Could not operate 1 with block values using `oa_ndim == 0` when `op_axes` is NULL is
deprecated. Use `oa_ndim == -1` or the MultiNew iterator for NumPy <1.8 compatibility"><pre class="notranslate"><span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">data</span>.<span class="pl-s1">shape</span>
(<span class="pl-c1">2</span>, <span class="pl-c1">219</span>, <span class="pl-c1">104</span>, <span class="pl-c1">6</span>)
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">data</span>.<span class="pl-s1">dtype</span>
<span class="pl-en">dtype</span>(<span class="pl-s">'float64'</span>)
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Panel</span>(<span class="pl-s1">data</span>[<span class="pl-c1">0</span>]).<span class="pl-en">to_frame</span>().<span class="pl-en">reset_index</span>()
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">df</span>[<span class="pl-c1">0</span>].<span class="pl-s1">dtype</span>
<span class="pl-en">dtype</span>(<span class="pl-s">'float64'</span>)
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">df</span>[<span class="pl-c1">0</span>].<span class="pl-en">count</span>()
<span class="pl-c1">711</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">df</span>[<span class="pl-c1">0</span>] <span class="pl-c1">+</span> <span class="pl-c1">1</span>
<span class="pl-v">TypeError</span>: <span class="pl-v">Could</span> <span class="pl-c1">not</span> <span class="pl-s1">operate</span> <span class="pl-c1">1</span> <span class="pl-k">with</span> <span class="pl-s1">block</span> <span class="pl-s1">values</span> <span class="pl-s1">using</span> <span class="pl-s">`oa_ndim == 0`</span> <span class="pl-s1">when</span> <span class="pl-s">`op_axes`</span> <span class="pl-c1">is</span> <span class="pl-v">NULL</span> <span class="pl-c1">is</span>
<span class="pl-s1">deprecated</span>. <span class="pl-v">Use</span> <span class="pl-s">`oa_ndim == -1`</span> <span class="pl-c1">or</span> <span class="pl-s1">the</span> <span class="pl-v">MultiNew</span> <span class="pl-s1">iterator</span> <span class="pl-s1">for</span> <span class="pl-v">NumPy</span> <span class="pl-c1"><</span><span class="pl-c1">1.8</span> <span class="pl-s1">compatibility</span></pre></div>
<p dir="auto">Looks like the same as <a href="https://github.com/PyTables/PyTables/issues/259" data-hovercard-type="issue" data-hovercard-url="/PyTables/PyTables/issues/259/hovercard">here</a> and <a href="https://groups.google.com/forum/#!topic/pydata/h4ww3t2hnCQ" rel="nofollow">here</a>.</p>
<p dir="auto">Upgrading to numexpr 2.3 solves it. Should v2.3 be then strictly required by pandas?</p> | <p dir="auto">with pandas 0.16 and sqlalchemy, the to_sql method of a dataframe creates duplicate redundant constraints on each boolean column, at least when exporting to Microsoft SQL Server, because for each column it creates 2 constraints checking the field must be either 0 or 1. This is redundant and slows down the database. A short example is below. Of course you must check the output in the sql database. Also, the fact that there is no control and no documentation over the constraints created by to_sql is extremely frustrating</p>
<p dir="auto">import pandas as pd<br>
import numpy as np<br>
from sqlalchemy import create_engine, MetaData, Table, select<br>
import sqlalchemy as sqlalchemy</p>
<p dir="auto">from sqlalchemy import create_engine, MetaData, Table, select<br>
import sqlalchemy as sqlalchemy</p>
<p dir="auto">ServerName = "cdodb-wb"<br>
Database = "DealAnalysis"</p>
<p dir="auto">engine = create_engine('mssql+pyodbc://' + ServerName + '/' + Database, encoding='latin1')<br>
conn = engine.connect()</p>
<p dir="auto">metadata = MetaData(conn)</p>
<p dir="auto">df=pd.DataFrame(np.random.rand(20)>0.5, columns=['random_boolean'])</p>
<p dir="auto">df.to_sql('python_test_table',engine,if_exists='replace')</p> | 0 |
<p dir="auto">Typed definition of workbox-sw flashes error because of missing BroadcastChannel declaration:<br>
static broadCastUpdate (channel: BroadcastChannel, cacheName: string, url: string, source: string): void;</p>
<p dir="auto">If you know how to fix the issue, make a pull request instead.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I tried using the <code class="notranslate">@types/xxxx</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 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: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/wessberg/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/wessberg">@wessberg</a></li>
</ul>
</li>
</ul>
<p dir="auto">If you do not mention the authors the issue will be ignored.</p> | <p dir="auto">Hi,</p>
<p dir="auto">I have a problem that I think is about @types/node</p>
<p dir="auto">I'm with node version 7.10.1, npm 4.2.0 and my project has on typings.json: "node": "registry:dt/node#7.0.0+20170322231424", and in package.json: "@types/node": "7.0.7"</p>
<p dir="auto">When I tried to build the project this happen:</p>
<p dir="auto"><code class="notranslate">TSError: ⨯ Unable to compile TypeScript typings/globals/node/index.d.ts (40,14): All declarations of 'iterator' must have identical modifiers. (2687) at getOutput (/home/victor/Desktop/workspace/sgt2-v3.x-front/node_modules/ts-node/src/ts-node.ts:210:13) at Object.loader (/home/victor/Desktop/workspace/sgt2-v3.x-front/node_modules/ts-node/src/ts-node.ts:225:23) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Liftoff.handleArguments (/home/victor/Desktop/workspace/sgt2-v3.x-front/node_modules/gulp/bin/gulp.js:116:3) at Liftoff.execute (/home/victor/Desktop/workspace/sgt2-v3.x-front/node_modules/liftoff/index.js:203:12) at module.exports (/home/victor/Desktop/workspace/sgt2-v3.x-front/node_modules/flagged-respawn/index.js:51:3) </code></p>
<p dir="auto">And with @types/node 6.0.45 and typings.json "node": "registry:dt/node#6.0.0+20161121110008"<br>
this happen:</p>
<p dir="auto"><code class="notranslate">node_modules/@types/node/index.d.ts(70,5): error TS2717: Subsequent property declarations must have the same type. Property 'main' must be of type 'NodeModule', but here has type 'any'. node_modules/@types/node/index.d.ts(81,5): error TS2717: Subsequent property declarations must have the same type. Property 'parent' must be of type 'NodeModule', but here has type 'any'. node_modules/@types/node/index.d.ts(82,5): error TS2717: Subsequent property declarations must have the same type. Property 'children' must be of type 'NodeModule[]', but here has type 'any[]'. node_modules/@types/node/index.d.ts(102,6): error TS2300: Duplicate identifier 'BufferEncoding'. node_modules/@types/node/index.d.ts(256,9): error TS2717: Subsequent property declarations must have the same type. Property 'errno' must be of type 'number', but here has type 'string'. node_modules/@types/node/index.d.ts(263,18): error TS2300: Duplicate identifier 'EventEmitter'. node_modules/@types/node/index.d.ts(549,26): error TS2300: Duplicate identifier 'Buffer'. node_modules/@types/node/index.d.ts(549,50): error TS2300: Duplicate identifier 'SlowBuffer'. node_modules/@types/node/index.d.ts(570,18): error TS2300: Duplicate identifier 'EventEmitter'. node_modules/@types/node/index.d.ts(733,18): error TS2300: Duplicate identifier 'Agent'. node_modules/@types/node/index.d.ts(791,18): error TS2300: Duplicate identifier 'Worker'. node_modules/@types/node/index.d.ts(1377,17): error TS2300: Duplicate identifier 'CompleterResult'. node_modules/@types/node/index.d.ts(1414,18): error TS2300: Duplicate identifier 'Script'. node_modules/@types/node/index.d.ts(2320,18): error TS2451: Cannot redeclare block-scoped variable 'constants'. node_modules/@types/node/index.d.ts(2550,18): error TS2300: Duplicate identifier 'TLSSocket'. node_modules/@types/node/index.d.ts(2861,10): error TS2300: Duplicate identifier 'Utf8AsciiLatin1Encoding'. node_modules/@types/node/index.d.ts(2862,10): error TS2300: Duplicate identifier 'HexBase64Latin1Encoding'. node_modules/@types/node/index.d.ts(2863,10): error TS2300: Duplicate identifier 'Utf8AsciiBinaryEncoding'. node_modules/@types/node/index.d.ts(2864,10): error TS2300: Duplicate identifier 'HexBase64BinaryEncoding'. node_modules/@types/node/index.d.ts(2865,10): error TS2300: Duplicate identifier 'ECDHKeyFormat'. node_modules/@types/node/index.d.ts(3216,14): error TS2300: Duplicate identifier 'internal'. node_modules/@types/node/index.d.ts(3299,14): error TS2300: Duplicate identifier 'internal'. node_modules/@types/node/index.d.ts(3321,18): error TS2300: Duplicate identifier 'Domain'. node_modules/@types/node/index.d.ts(3613,14): error TS2300: Duplicate identifier 'process'. node_modules/@types/node/index.d.ts(3639,14): error TS2300: Duplicate identifier 'console'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(78,6): error TS2300: Duplicate identifier 'BufferEncoding'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(234,18): error TS2300: Duplicate identifier 'EventEmitter'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(522,9): error TS2502: 'BuffType' is referenced directly or indirectly in its own type annotation. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(523,9): error TS2502: 'SlowBuffType' is referenced directly or indirectly in its own type annotation. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(524,26): error TS2300: Duplicate identifier 'Buffer'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(524,50): error TS2300: Duplicate identifier 'SlowBuffer'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(545,18): error TS2300: Duplicate identifier 'EventEmitter'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(708,18): error TS2300: Duplicate identifier 'Agent'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(766,18): error TS2300: Duplicate identifier 'Worker'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(1447,22): error TS2300: Duplicate identifier 'CompleterResult'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(1487,18): error TS2300: Duplicate identifier 'Script'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(1922,22): error TS2320: Interface 'Server' cannot simultaneously extend types 'EventEmitter' and 'Socket'. Named property 'removeListener' of types 'EventEmitter' and 'Socket' are not identical. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(2434,22): error TS2451: Cannot redeclare block-scoped variable 'constants'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(2789,18): error TS2300: Duplicate identifier 'TLSSocket'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(3163,10): error TS2300: Duplicate identifier 'Utf8AsciiLatin1Encoding'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(3164,10): error TS2300: Duplicate identifier 'HexBase64Latin1Encoding'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(3165,10): error TS2300: Duplicate identifier 'Utf8AsciiBinaryEncoding'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(3166,10): error TS2300: Duplicate identifier 'HexBase64BinaryEncoding'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(3167,10): error TS2300: Duplicate identifier 'ECDHKeyFormat'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(3518,14): error TS2300: Duplicate identifier 'internal'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(3601,14): error TS2300: Duplicate identifier 'internal'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(3623,18): error TS2300: Duplicate identifier 'Domain'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(3915,14): error TS2300: Duplicate identifier 'process'. /home/victor/Desktop/workspace/sgt2-v3.x-front/typings/globals/node/index.d.ts(3941,14): error TS2300: Duplicate identifier 'console'. </code></p>
<p dir="auto">Do you know what can be?</p>
<p dir="auto">Thanks</p> | 0 |
<p dir="auto">This is a bit of a weird one cropping up under very particular circumstances, but I spent a while last week puzzling over the issue. Probably best explained through the example.</p>
<hr>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Entering "Todd" into the form field in this simple example app and submitting the form takes the user to /hello/Todd, just like clicking the "Click here if your name is Todd" link does.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from flask import Flask, redirect, request, url_for
app = Flask(__name__)
@app.route("/")
def form():
return """
<p><a href="{}">Click here if your name is Todd</a><p>
<form action="{}" method="post">
<input type="text" name="name">
<button type="submit">This is my name!</button>
</form>
""".format(
url_for("hello", name="Todd"),
url_for("hello")
)
@app.route("/hello", methods=["GET", "POST"])
@app.route("/hello/<name>")
def hello(name=None):
if request.method == "POST":
return redirect(url_for("hello", name=request.form.get("name")))
if name:
return "Hello {}!".format(name)
else:
return "Hello World!""><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">flask</span> <span class="pl-k">import</span> <span class="pl-v">Flask</span>, <span class="pl-s1">redirect</span>, <span class="pl-s1">request</span>, <span class="pl-s1">url_for</span>
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Flask</span>(<span class="pl-s1">__name__</span>)
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">route</span>(<span class="pl-s">"/"</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">form</span>():
<span class="pl-k">return</span> <span class="pl-s">"""</span>
<span class="pl-s"> <p><a href="{}">Click here if your name is Todd</a><p></span>
<span class="pl-s"> <form action="{}" method="post"></span>
<span class="pl-s"> <input type="text" name="name"></span>
<span class="pl-s"> <button type="submit">This is my name!</button></span>
<span class="pl-s"> </form></span>
<span class="pl-s"> """</span>.<span class="pl-en">format</span>(
<span class="pl-en">url_for</span>(<span class="pl-s">"hello"</span>, <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"Todd"</span>),
<span class="pl-en">url_for</span>(<span class="pl-s">"hello"</span>)
)
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">route</span>(<span class="pl-s">"/hello"</span>, <span class="pl-s1">methods</span><span class="pl-c1">=</span>[<span class="pl-s">"GET"</span>, <span class="pl-s">"POST"</span>])</span>
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">route</span>(<span class="pl-s">"/hello/<name>"</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">hello</span>(<span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-c1">None</span>):
<span class="pl-k">if</span> <span class="pl-s1">request</span>.<span class="pl-s1">method</span> <span class="pl-c1">==</span> <span class="pl-s">"POST"</span>:
<span class="pl-k">return</span> <span class="pl-en">redirect</span>(<span class="pl-en">url_for</span>(<span class="pl-s">"hello"</span>, <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s1">request</span>.<span class="pl-s1">form</span>.<span class="pl-en">get</span>(<span class="pl-s">"name"</span>)))
<span class="pl-k">if</span> <span class="pl-s1">name</span>:
<span class="pl-k">return</span> <span class="pl-s">"Hello {}!"</span>.<span class="pl-en">format</span>(<span class="pl-s1">name</span>)
<span class="pl-k">else</span>:
<span class="pl-k">return</span> <span class="pl-s">"Hello World!"</span></pre></div>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Submitting the form instead takes you to /hello?name=Todd.</p>
<p dir="auto">Through my own testing I've concluded that <code class="notranslate">url_for("hello", name="Todd")</code> will return <code class="notranslate">/hello?name=Todd</code> if</p>
<ul dir="auto">
<li>we are currently processing a POST request, <em>and</em></li>
<li>the target endpoint has a parameter-less route with the POST method allowed (<code class="notranslate">/hello</code>), <em>but</em> the route we actually want (<code class="notranslate">/hello/<name></code>) only allows GET requests.</li>
</ul>
<p dir="auto">This seems obviously bizarre and counterintuitive.</p>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Python version: 3.6.4</li>
<li>Flask version: 0.12.2</li>
<li>Werkzeug version: 0.13</li>
</ul> | <p dir="auto">In response to a POST, I wanted to construct a URL pointing at a different URL (the home of the created object) which did NOT support POST.</p>
<p dir="auto">It turns out, this doesn't work with Flask==0.12.2. The rule I want doesn't match, so I end up matching a less specific rule, with the distinguishing name treated as a parameter, not a path.</p>
<p dir="auto">What appears to be happening is that default method is being pulled out of _request_ctx early in url_for(). In this case, that method will be a POST.</p>
<p dir="auto">I'm not sure if defaulting to the request's current method is really desirable. How often are you responding to a POST and want url_for to respond with the best match for POST? I think typically most endpoints will respond to a GET, but many endpoints won't respond to a POST.</p>
<p dir="auto">The workaround is to include the undocumented _method keyword argument. That will work (hopefully permanently), but I'd prefer:</p>
<p dir="auto">A) for this to be explicitly supported by the API, and<br>
B) I think the default should probably always be GET. My guess is that will be correct far more</p> | 1 |
<p dir="auto"><strong>Glide Version</strong>: 3.8.0</p>
<p dir="auto"><strong>Integration libraries</strong>: no</p>
<p dir="auto"><strong>Device/Android Version</strong>: All version</p>
<p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>:<br>
Original file:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/10027821/17510811/05f3abd0-5e53-11e6-8f22-8a97d31571e7.gif"><img src="https://cloud.githubusercontent.com/assets/10027821/17510811/05f3abd0-5e53-11e6-8f22-8a97d31571e7.gif" alt="1000285" data-animated-image="" style="max-width: 100%;"></a><br>
Result:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/10027821/17510888/5fa6563c-5e53-11e6-877c-dd3699b95ef2.gif"><img src="https://cloud.githubusercontent.com/assets/10027821/17510888/5fa6563c-5e53-11e6-877c-dd3699b95ef2.gif" alt="jdfw" data-animated-image="" style="max-width: 100%;"></a> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/10027821/17511177/5f6a9240-5e54-11e6-837d-03f996058fd0.png"><img src="https://cloud.githubusercontent.com/assets/10027821/17511177/5f6a9240-5e54-11e6-837d-03f996058fd0.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I had upgraded to the latest version 3.8.0 but it`s not solved.</p>
<p dir="auto"><strong>Glide load line / <code class="notranslate">GlideModule</code> (if any) / list Adapter code (if any)</strong>:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" Glide.with(context)
.load(new GlideUrl(url, mHeader))
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.error(error)
.placeholder(placeHolder)
.into(view);"><pre class="notranslate"> <span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">context</span>)
.<span class="pl-en">load</span>(<span class="pl-k">new</span> <span class="pl-smi">GlideUrl</span>(<span class="pl-s1">url</span>, <span class="pl-s1">mHeader</span>))
.<span class="pl-en">diskCacheStrategy</span>(<span class="pl-smi">DiskCacheStrategy</span>.<span class="pl-c1">SOURCE</span>)
.<span class="pl-en">error</span>(<span class="pl-s1">error</span>)
.<span class="pl-en">placeholder</span>(<span class="pl-s1">placeHolder</span>)
.<span class="pl-en">into</span>(<span class="pl-s1">view</span>);</pre></div>
<p dir="auto"><strong>Layout XML</strong>:</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<ImageView
android:id="@+id/activity_personal_homepage_headgear"
android:layout_width="145dp"
android:layout_height="145dp"
android:layout_gravity="center"
/>"><pre class="notranslate"><<span class="pl-ent">ImageView</span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>@+id/activity_personal_homepage_headgear<span class="pl-pds">"</span></span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>145dp<span class="pl-pds">"</span></span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>145dp<span class="pl-pds">"</span></span>
<span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_gravity</span>=<span class="pl-s"><span class="pl-pds">"</span>center<span class="pl-pds">"</span></span>
/></pre></div>
<p dir="auto"><strong>Stack trace / LogCat</strong>:</p>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="paste stack trace and/or log here"><pre class="notranslate"><span class="pl-en">paste</span> <span class="pl-en">stack</span> <span class="pl-en">trace</span> <span class="pl-k">and</span>/<span class="pl-en">or</span> <span class="pl-en">log</span> <span class="pl-en">here</span></pre></div> | <p dir="auto"><strong>Glide Version</strong>: 4.0.0.<br>
<strong>Integration libraries</strong>: okhttp3-integration</p>
<p dir="auto">I am experiencing strict mode crashes both on emulator and real devices on Android versions from 4.2 to 7.1. Issue looks similar to now closed ticket <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="233045232" data-permission-text="Title is private" data-url="https://github.com/bumptech/glide/issues/1996" data-hovercard-type="issue" data-hovercard-url="/bumptech/glide/issues/1996/hovercard" href="https://github.com/bumptech/glide/issues/1996">#1996</a>.</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="E/StrictMode: A resource was acquired at attached stack trace but never released.
See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'response.body().close()' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:184)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at okhttp3.internal.platform.AndroidPlatform$CloseGuard.createAndOpen(AndroidPlatform.java:272)
at okhttp3.internal.platform.AndroidPlatform.getStackTraceForCloseable(AndroidPlatform.java:138)
at okhttp3.RealCall.captureCallStackTrace(RealCall.java:78)
at okhttp3.RealCall.enqueue(RealCall.java:87)
at com.bumptech.glide.integration.okhttp3.OkHttpStreamFetcher.loadData(OkHttpStreamFetcher.java:45)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:61)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:282)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:252)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:222)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:841)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:347)"><pre class="notranslate"><span class="pl-s1">E</span>/<span class="pl-s1">StrictMode</span>: <span class="pl-s1">A</span> <span class="pl-smi">resource</span> <span class="pl-s1">was</span> <span class="pl-smi">acquired</span> <span class="pl-s1">at</span> <span class="pl-smi">attached</span> <span class="pl-s1">stack</span> <span class="pl-smi">trace</span> <span class="pl-s1">but</span> <span class="pl-smi">never</span> <span class="pl-s1">released</span>.
<span class="pl-s1">See</span> <span class="pl-smi">java</span>.<span class="pl-smi">io</span>.<span class="pl-smi">Closeable</span> <span class="pl-s1">for</span> <span class="pl-smi">information</span> <span class="pl-s1">on</span> <span class="pl-smi">avoiding</span> <span class="pl-s1">resource</span> <span class="pl-smi">leaks</span>.
<span class="pl-smi">java</span>.<span class="pl-smi">lang</span>.<span class="pl-smi">Throwable</span>: <span class="pl-s1">Explicit</span> <span class="pl-s1">termination</span> <span class="pl-s1">method</span> <span class="pl-s">'response.body().close()'</span> <span class="pl-s1">not</span> <span class="pl-s1">called</span>
<span class="pl-s1">at</span> <span class="pl-s1">dalvik</span>.<span class="pl-s1">system</span>.<span class="pl-s1">CloseGuard</span>.<span class="pl-en">open</span>(<span class="pl-smi">CloseGuard</span>.<span class="pl-smi">java</span>:<span class="pl-c1">184</span>)
<span class="pl-smi">at</span> <span class="pl-s1">java</span>.<span class="pl-s1">lang</span>.<span class="pl-s1">reflect</span>.<span class="pl-s1">Method</span>.<span class="pl-s1">invokeNative</span>(<span class="pl-smi">Native</span> <span class="pl-s1">Method</span>)
<span class="pl-s1">at</span> <span class="pl-s1">java</span>.<span class="pl-s1">lang</span>.<span class="pl-s1">reflect</span>.<span class="pl-s1">Method</span>.<span class="pl-en">invoke</span>(<span class="pl-smi">Method</span>.<span class="pl-smi">java</span>:<span class="pl-c1">525</span>)
<span class="pl-s1">at</span> <span class="pl-s1">okhttp3</span>.<span class="pl-s1">internal</span>.<span class="pl-s1">platform</span>.<span class="pl-s1">AndroidPlatform$CloseGuard</span>.<span class="pl-en">createAndOpen</span>(<span class="pl-smi">AndroidPlatform</span>.<span class="pl-smi">java</span>:<span class="pl-c1">272</span>)
<span class="pl-s1">at</span> <span class="pl-s1">okhttp3</span>.<span class="pl-s1">internal</span>.<span class="pl-s1">platform</span>.<span class="pl-s1">AndroidPlatform</span>.<span class="pl-en">getStackTraceForCloseable</span>(<span class="pl-smi">AndroidPlatform</span>.<span class="pl-smi">java</span>:<span class="pl-c1">138</span>)
<span class="pl-s1">at</span> <span class="pl-s1">okhttp3</span>.<span class="pl-s1">RealCall</span>.<span class="pl-en">captureCallStackTrace</span>(<span class="pl-smi">RealCall</span>.<span class="pl-smi">java</span>:<span class="pl-c1">78</span>)
<span class="pl-s1">at</span> <span class="pl-s1">okhttp3</span>.<span class="pl-s1">RealCall</span>.<span class="pl-en">enqueue</span>(<span class="pl-smi">RealCall</span>.<span class="pl-smi">java</span>:<span class="pl-c1">87</span>)
<span class="pl-s1">at</span> <span class="pl-s1">com</span>.<span class="pl-s1">bumptech</span>.<span class="pl-s1">glide</span>.<span class="pl-s1">integration</span>.<span class="pl-s1">okhttp3</span>.<span class="pl-s1">OkHttpStreamFetcher</span>.<span class="pl-en">loadData</span>(<span class="pl-smi">OkHttpStreamFetcher</span>.<span class="pl-smi">java</span>:<span class="pl-c1">45</span>)
<span class="pl-s1">at</span> <span class="pl-s1">com</span>.<span class="pl-s1">bumptech</span>.<span class="pl-s1">glide</span>.<span class="pl-s1">load</span>.<span class="pl-s1">engine</span>.<span class="pl-s1">SourceGenerator</span>.<span class="pl-en">startNext</span>(<span class="pl-smi">SourceGenerator</span>.<span class="pl-smi">java</span>:<span class="pl-c1">61</span>)
<span class="pl-s1">at</span> <span class="pl-s1">com</span>.<span class="pl-s1">bumptech</span>.<span class="pl-s1">glide</span>.<span class="pl-s1">load</span>.<span class="pl-s1">engine</span>.<span class="pl-s1">DecodeJob</span>.<span class="pl-en">runGenerators</span>(<span class="pl-smi">DecodeJob</span>.<span class="pl-smi">java</span>:<span class="pl-c1">282</span>)
<span class="pl-s1">at</span> <span class="pl-s1">com</span>.<span class="pl-s1">bumptech</span>.<span class="pl-s1">glide</span>.<span class="pl-s1">load</span>.<span class="pl-s1">engine</span>.<span class="pl-s1">DecodeJob</span>.<span class="pl-en">runWrapped</span>(<span class="pl-smi">DecodeJob</span>.<span class="pl-smi">java</span>:<span class="pl-c1">252</span>)
<span class="pl-s1">at</span> <span class="pl-s1">com</span>.<span class="pl-s1">bumptech</span>.<span class="pl-s1">glide</span>.<span class="pl-s1">load</span>.<span class="pl-s1">engine</span>.<span class="pl-s1">DecodeJob</span>.<span class="pl-en">run</span>(<span class="pl-smi">DecodeJob</span>.<span class="pl-smi">java</span>:<span class="pl-c1">222</span>)
<span class="pl-s1">at</span> <span class="pl-s1">java</span>.<span class="pl-s1">util</span>.<span class="pl-s1">concurrent</span>.<span class="pl-s1">ThreadPoolExecutor</span>.<span class="pl-en">runWorker</span>(<span class="pl-smi">ThreadPoolExecutor</span>.<span class="pl-smi">java</span>:<span class="pl-c1">1080</span>)
<span class="pl-s1">at</span> <span class="pl-s1">java</span>.<span class="pl-s1">util</span>.<span class="pl-s1">concurrent</span>.<span class="pl-s1">ThreadPoolExecutor$Worker</span>.<span class="pl-en">run</span>(<span class="pl-smi">ThreadPoolExecutor</span>.<span class="pl-smi">java</span>:<span class="pl-c1">573</span>)
<span class="pl-s1">at</span> <span class="pl-s1">java</span>.<span class="pl-s1">lang</span>.<span class="pl-s1">Thread</span>.<span class="pl-en">run</span>(<span class="pl-smi">Thread</span>.<span class="pl-smi">java</span>:<span class="pl-c1">841</span>)
<span class="pl-s1">at</span> <span class="pl-s1">com</span>.<span class="pl-s1">bumptech</span>.<span class="pl-s1">glide</span>.<span class="pl-s1">load</span>.<span class="pl-s1">engine</span>.<span class="pl-s1">executor</span>.<span class="pl-s1">GlideExecutor$DefaultThreadFactory$1</span>.<span class="pl-en">run</span>(<span class="pl-smi">GlideExecutor</span>.<span class="pl-smi">java</span>:<span class="pl-c1">347</span>)</pre></div>
<p dir="auto">This happens a lot when fast-scrolling recycler view.<br>
My RecyclerView.Adapter is simple:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="final GlideRequests glideRequests = GlideApp.with(fragment);
// glideRequests is instance variable of adapter
@Override
public void onBindViewHolder(final ProductViewHolder holder, final int position) {
glideRequests.asBitmap()
.priority(Priority.NORMAL)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.centerCrop()
.thumbnail(0.25f)
.placeholder(R.drawable.placeholder)
.load(product)
.into(holder.cover);
}
@Override
public void onViewRecycled(final ProductViewHolder holder) {
super.onViewRecycled(holder);
glideRequests.clear(holder.cover);
}"><pre class="notranslate"><span class="pl-k">final</span> <span class="pl-smi">GlideRequests</span> <span class="pl-s1">glideRequests</span> = <span class="pl-smi">GlideApp</span>.<span class="pl-en">with</span>(<span class="pl-s1">fragment</span>);
<span class="pl-c">// glideRequests is instance variable of adapter</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-s1">onBindViewHolder</span>(<span class="pl-k">final</span> <span class="pl-smi">ProductViewHolder</span> <span class="pl-s1">holder</span>, <span class="pl-k">final</span> <span class="pl-smi">int</span> <span class="pl-s1">position</span>) {
<span class="pl-s1">glideRequests</span>.<span class="pl-en">asBitmap</span>()
.<span class="pl-en">priority</span>(<span class="pl-smi">Priority</span>.<span class="pl-c1">NORMAL</span>)
.<span class="pl-en">diskCacheStrategy</span>(<span class="pl-smi">DiskCacheStrategy</span>.<span class="pl-c1">ALL</span>)
.<span class="pl-en">centerCrop</span>()
.<span class="pl-en">thumbnail</span>(<span class="pl-c1">0.25f</span>)
.<span class="pl-en">placeholder</span>(<span class="pl-smi">R</span>.<span class="pl-s1">drawable</span>.<span class="pl-s1">placeholder</span>)
.<span class="pl-en">load</span>(<span class="pl-s1">product</span>)
.<span class="pl-en">into</span>(<span class="pl-s1">holder</span>.<span class="pl-s1">cover</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-s1">onViewRecycled</span>(<span class="pl-k">final</span> <span class="pl-smi">ProductViewHolder</span> <span class="pl-s1">holder</span>) {
<span class="pl-en">super</span>.<span class="pl-en">onViewRecycled</span>(<span class="pl-s1">holder</span>);
<span class="pl-s1">glideRequests</span>.<span class="pl-en">clear</span>(<span class="pl-s1">holder</span>.<span class="pl-s1">cover</span>);
}</pre></div> | 0 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=youngm" rel="nofollow">Mike Youngstrom</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8800?redirect=false" rel="nofollow">SPR-8800</a></strong> and commented</p>
<p dir="auto">Using Spring 3.1 rc1 I get a new error when using hibernate with JTA multiple times in the same thread. What appears to be happening is the HibernateJpaDialect is adding the Hibernate SessionFactory to the transactional resources for some reason. It assumes that when the transaction commits EntityManagerFactoryUtils.cleanupTransaction() will be called. However it doesn't in my situation.</p>
<p dir="auto">I've included a maven test case. To duplicate simply run mvn test. If you change the version of spring to 3.0.6.RELEASE then the test passes.</p>
<p dir="auto">Below is the exception I get:</p>
<p dir="auto">java.lang.IllegalStateException: Already value [SessionImpl(PersistenceContext[entityKeys=[],collectionKeys=[]];ActionQueue[insertions=[] updates=[] deletions=[] collectionCreations=[] collectionRemovals=[] collectionUpdates=[]])] for key [org.hibernate.internal.SessionFactoryImpl@1d7b222] bound to thread [main]<br>
at org.springframework.transaction.support.TransactionSynchronizationManager.bindResource(TransactionSynchronizationManager.java:180)<br>
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.prepareTransaction(HibernateJpaDialect.java:98)<br>
at org.springframework.orm.jpa.EntityManagerFactoryUtils.prepareTransaction(EntityManagerFactoryUtils.java:230)<br>
at org.springframework.orm.jpa.EntityManagerFactoryUtils.doGetTransactionalEntityManager(EntityManagerFactoryUtils.java:207)<br>
at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:211)<br>
at $Proxy16.getDelegate(Unknown Source)<br>
at test.JpaTest$2.doInTransaction(JpaTest.java:32)<br>
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)<br>
at test.JpaTest.test(JpaTest.java:30)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:597)<br>
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)<br>
at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:169)<br>
at org.springframework.test.context.testng.AbstractTestNGSpringContextTests.run(AbstractTestNGSpringContextTests.java:158)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:597)<br>
at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:181)<br>
at org.testng.internal.Invoker.invokeMethod(Invoker.java:684)<br>
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:883)<br>
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1208)<br>
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)<br>
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)<br>
at org.testng.TestRunner.privateRun(TestRunner.java:753)<br>
at org.testng.TestRunner.run(TestRunner.java:613)<br>
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)<br>
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)<br>
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)<br>
at org.testng.SuiteRunner.run(SuiteRunner.java:240)<br>
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)<br>
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)<br>
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1137)<br>
at org.testng.TestNG.runSuitesLocally(TestNG.java:1062)<br>
at org.testng.TestNG.run(TestNG.java:974)<br>
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:109)<br>
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:202)<br>
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:173)</p>
<hr>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/19015/test-jpa-binding.zip" rel="nofollow">test-jpa-binding.zip</a> (<em>2.89 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="398115022" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13414" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13414/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13414">#13414</a> Jpa transaction manager transaction suspension ignores dialect resources</li>
</ul>
<p dir="auto">1 votes, 2 watchers</p> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=paulm" rel="nofollow">Paul Middelkoop</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8651?redirect=false" rel="nofollow">SPR-8651</a></strong> and commented</p>
<p dir="auto">Tested on nightly build of August 29th 2011:</p>
<p dir="auto">public interface MyRepository {<br>
}</p>
<p dir="auto"><code class="notranslate">@Component</code><br>
public class MyRepositoryImpl implements MyRepository {<br>
<code class="notranslate">@Scheduled</code>(fixedDelay = 5)<br>
public void initCache() {}<br>
}</p>
<p dir="auto">This works. But when I change from <code class="notranslate">@Component</code> to <code class="notranslate">@Repository</code> I get this exception:</p>
<p dir="auto">java.lang.IllegalArgumentException: object is not an instance of declaring class<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:597)<br>
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64)<br>
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)<br>
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)<br>
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)<br>
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)<br>
at java.util.concurrent.FutureTask.run(FutureTask.java:138)<br>
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)<br>
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)<br>
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)<br>
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)<br>
at java.lang.Thread.run(Thread.java:662)</p>
<p dir="auto">Adding the <code class="notranslate">@Scheduled</code> method to the interface doesn't help also.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1 M2</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="398115736" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13514" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13514/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13514">#13514</a> <code class="notranslate">@Scheduled</code> does not work in classes annotated with <code class="notranslate">@Cacheable</code> (<em><strong>"is duplicated by"</strong></em>)</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-projects/spring-framework/commit/d4123d06379fadc0b05043f5ab5a1a2cb264314b/hovercard" href="https://github.com/spring-projects/spring-framework/commit/d4123d06379fadc0b05043f5ab5a1a2cb264314b"><tt>d4123d0</tt></a></p>
<p dir="auto">2 votes, 3 watchers</p> | 0 |
<p dir="auto">1 - Windows Vista<br>
2 - Chrome 28<br>
3 - Happens in Docs even after shift + refresh</p>
<p dir="auto">Backstory:</p>
<ul dir="auto">
<li>Open a modal here <a href="http://getbootstrap.com/javascript/#modals" rel="nofollow">http://getbootstrap.com/javascript/#modals</a> with button 'Launch demo modal'.</li>
<li>Close modal</li>
<li>Press same launch button again</li>
<li>Close modal (but this time nothing happens)</li>
</ul> | <p dir="auto">Hi,</p>
<p dir="auto">The code used on last Thursday worked fine. But after updated to latest code on Monday (GMT+8), the modal dialog when clicks to dismiss for seconds onward cannot be close.</p>
<p dir="auto">I am checking on source code line 932, if I commented out this line then it is working again.</p>
<p dir="auto">this.$element<br>
.removeClass('in')<br>
.attr('aria-hidden', true)<br>
//.off('click.dismiss.modal')</p>
<p dir="auto">Am I missing anything...?</p>
<p dir="auto">Sorry for the grammar. Thanks.</p> | 1 |
<p dir="auto">Here is the code for <code class="notranslate">get_encodings_from_content</code> in the requests.utils module:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def get_encodings_from_content(content):
"""Returns encodings from given content string.
:param content: bytestring to extract encodings from.
"""
charset_re = re.compile(r'<meta.*?charset=["\']*(.+?)["\'>]', flags=re.I)
pragma_re = re.compile(r'<meta.*?content=["\']*;?charset=(.+?)["\'>]', flags=re.I)
xml_re = re.compile(r'^<\?xml.*?encoding=["\']*(.+?)["\'>]')
return (charset_re.findall(content) +
pragma_re.findall(content) +
xml_re.findall(content))"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">get_encodings_from_content</span>(<span class="pl-s1">content</span>):
<span class="pl-s">"""Returns encodings from given content string.</span>
<span class="pl-s"></span>
<span class="pl-s"> :param content: bytestring to extract encodings from.</span>
<span class="pl-s"> """</span>
<span class="pl-s1">charset_re</span> <span class="pl-c1">=</span> <span class="pl-s1">re</span>.<span class="pl-en">compile</span>(<span class="pl-s">r'<meta.*?charset=["\']*(.+?)["\'>]'</span>, <span class="pl-s1">flags</span><span class="pl-c1">=</span><span class="pl-s1">re</span>.<span class="pl-v">I</span>)
<span class="pl-s1">pragma_re</span> <span class="pl-c1">=</span> <span class="pl-s1">re</span>.<span class="pl-en">compile</span>(<span class="pl-s">r'<meta.*?content=["\']*;?charset=(.+?)["\'>]'</span>, <span class="pl-s1">flags</span><span class="pl-c1">=</span><span class="pl-s1">re</span>.<span class="pl-v">I</span>)
<span class="pl-s1">xml_re</span> <span class="pl-c1">=</span> <span class="pl-s1">re</span>.<span class="pl-en">compile</span>(<span class="pl-s">r'^<\?xml.*?encoding=["\']*(.+?)["\'>]'</span>)
<span class="pl-k">return</span> (<span class="pl-s1">charset_re</span>.<span class="pl-en">findall</span>(<span class="pl-s1">content</span>) <span class="pl-c1">+</span>
<span class="pl-s1">pragma_re</span>.<span class="pl-en">findall</span>(<span class="pl-s1">content</span>) <span class="pl-c1">+</span>
<span class="pl-s1">xml_re</span>.<span class="pl-en">findall</span>(<span class="pl-s1">content</span>))</pre></div>
<p dir="auto">Is there any reason to recompile the regexes on every call rather than making them module-level constants?</p>
<p dir="auto">More fundamentally, wouldn't it be more useful to have a function that just returned the first match, rather than a tuple of all matches, and therefore could often stop processing the input after a few lines, rather than always having to do three passes through the entire thing? That way, if you're fetching a large html document using <code class="notranslate">stream=True</code> from a server that may not have sent the charset in a Content-Type header, we can write:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="encoding = get_encoding_from_headers(res.headers) or \
get_encoding_from_content(raw) # just get the first encoding declared in content, if any"><pre class="notranslate"><span class="pl-s1">encoding</span> <span class="pl-c1">=</span> <span class="pl-en">get_encoding_from_headers</span>(<span class="pl-s1">res</span>.<span class="pl-s1">headers</span>) <span class="pl-c1">or</span> \
<span class="pl-en">get_encoding_from_content</span>(<span class="pl-s1">raw</span>) <span class="pl-c"># just get the first encoding declared in content, if any</span></pre></div>
<p dir="auto">which is all we care about.</p>
<p dir="auto">(Assume <code class="notranslate">raw</code> has been set already with something like:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="bio = BytesIO()
bytesread = 0
for chunk in res.iter_content(chunk_size=CHUNK_SIZE):
bio.write(chunk)
bytesread += len(chunk)
if bytesread > RES_MAX_BYTES:
return _too_big()
raw = bio.getvalue()"><pre class="notranslate"><span class="pl-s1">bio</span> <span class="pl-c1">=</span> <span class="pl-v">BytesIO</span>()
<span class="pl-s1">bytesread</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span>
<span class="pl-k">for</span> <span class="pl-s1">chunk</span> <span class="pl-c1">in</span> <span class="pl-s1">res</span>.<span class="pl-en">iter_content</span>(<span class="pl-s1">chunk_size</span><span class="pl-c1">=</span><span class="pl-v">CHUNK_SIZE</span>):
<span class="pl-s1">bio</span>.<span class="pl-en">write</span>(<span class="pl-s1">chunk</span>)
<span class="pl-s1">bytesread</span> <span class="pl-c1">+=</span> <span class="pl-en">len</span>(<span class="pl-s1">chunk</span>)
<span class="pl-k">if</span> <span class="pl-s1">bytesread</span> <span class="pl-c1">></span> <span class="pl-v">RES_MAX_BYTES</span>:
<span class="pl-k">return</span> <span class="pl-en">_too_big</span>()
<span class="pl-s1">raw</span> <span class="pl-c1">=</span> <span class="pl-s1">bio</span>.<span class="pl-en">getvalue</span>()</pre></div>
<p dir="auto">)</p> | <p dir="auto">The occult logo evokes strong emotion in viewers of certain faiths. An uninitiated looking for <a href="https://gnosticteachings.org/books-by-samael-aun-weor/the-doomed-aryan-race/1305-the-caduceus-of-mercury.html" rel="nofollow">more information</a> on the logo would <a href="http://www.occultopedia.com/c/caduceus.htm" rel="nofollow">easily</a> come to this <a href="https://www.samaelaunweor.org/en/the-solar-bodies/the-caduceus-of-mercury" rel="nofollow">information</a> with a google search...</p>
<blockquote>
<p dir="auto">The Gnostic Movement teaches its disciples that from their seminal system (during the esoteric practices of sexual transmutation) the lunar atoms ascend through the nervous canal of Ida and the solar atoms victoriously ascend through Pingala.</p>
</blockquote>
<p dir="auto"><a href="https://www.rollitup.org/t/the-rod-of-asclepius-vs-the-caduceus-of-mercury.374706/" rel="nofollow">RIU</a>:</p>
<blockquote>
<p dir="auto">Mercury was the god of merchants and merchandise. Also the conductor of the dead to the afterlife, and protector of thieves and deceit. The Caduceus is a herald's staff representing Mercury (Hermes) and his undertakings, that was a gift from Apollo. It did not and does not represent medicine. An officer in the U.S. Army Medical Corps mistook the Caduceus for the Staff of Asclepius and introduced the new Medical Corps symbol at the beginning of the twentieth century. Not too long after that, everyone was adopting the same mistake. Including the American Medical Association (AMA), the largest association of physicians and medical students in the United States.</p>
</blockquote>
<blockquote>
<p dir="auto">Asclepius was the son of Apollo, and the god of medicine and healing. Asclepius's daughter is Hygieia, whose bowl is the well known international symbol of pharmacy and pharmacist. Asclepius's staff has many interpretations, but basically means, the snake is thought to signify a new beginning from old problems, as in shedding of the skin. The staff or rod, is thought to mean support and structure to help deal with the turmoil of life and death and being associated with them. Asclepius was so good as a healer that he was reputed to be able to bring people back from the dead. For this he angered Hades and Zeus because he raised Hippolytus from the dead and accepted gold for it, and was killed by Zeus with a thunder bolt. Zeus then placed him amongst the stars as the constellation Ophiuchus ("The Serpent Holder").</p>
</blockquote> | 0 |
<p dir="auto">Attempting to <code class="notranslate">ts.transpile</code> this <a href="https://github.com/jhusain/asyncgenerator">async generator</a></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="async function*(f) { yield f; }"><pre class="notranslate"><span class="pl-k">async</span> <span class="pl-k">function</span><span class="pl-c1">*</span><span class="pl-kos">(</span><span class="pl-s1">f</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">yield</span> <span class="pl-s1">f</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div>
<p dir="auto">throws</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: Cannot read property 'members' of undefined
at resolveDeclaredMembers (D:\repos\TypeScript\built\local\typescript.js:15456:65)
at resolveTypeReferenceMembers (D:\repos\TypeScript\built\local\typescript.js:15486:26)
at resolveStructuredTypeMembers (D:\repos\TypeScript\built\local\typescript.js:15705:21)
at getPropertiesOfObjectType (D:\repos\TypeScript\built\local\typescript.js:15713:24)
at propertiesRelatedTo (D:\repos\TypeScript\built\local\typescript.js:17272:34)
at objectTypeRelatedTo (D:\repos\TypeScript\built\local\typescript.js:17238:30)
at isRelatedTo (D:\repos\TypeScript\built\local\typescript.js:17062:34)
at checkTypeRelatedTo (D:\repos\TypeScript\built\local\typescript.js:16929:26)
at checkTypeAssignableTo (D:\repos\TypeScript\built\local\typescript.js:16902:20)
at isTypeAssignableTo (D:\repos\TypeScript\built\local\typescript.js:16896:20)"><pre class="notranslate"><code class="notranslate">TypeError: Cannot read property 'members' of undefined
at resolveDeclaredMembers (D:\repos\TypeScript\built\local\typescript.js:15456:65)
at resolveTypeReferenceMembers (D:\repos\TypeScript\built\local\typescript.js:15486:26)
at resolveStructuredTypeMembers (D:\repos\TypeScript\built\local\typescript.js:15705:21)
at getPropertiesOfObjectType (D:\repos\TypeScript\built\local\typescript.js:15713:24)
at propertiesRelatedTo (D:\repos\TypeScript\built\local\typescript.js:17272:34)
at objectTypeRelatedTo (D:\repos\TypeScript\built\local\typescript.js:17238:30)
at isRelatedTo (D:\repos\TypeScript\built\local\typescript.js:17062:34)
at checkTypeRelatedTo (D:\repos\TypeScript\built\local\typescript.js:16929:26)
at checkTypeAssignableTo (D:\repos\TypeScript\built\local\typescript.js:16902:20)
at isTypeAssignableTo (D:\repos\TypeScript\built\local\typescript.js:16896:20)
</code></pre></div>
<p dir="auto">annotating the generator return value in any way causes the exception to not be thrown. This also only happens when the async generator is anonymous.</p>
<p dir="auto">I know that async generators aren't technically valid JS, but attempting to transpile one probably shouldn't throw.</p> | <p dir="auto">when compiling this code for ES5 (not ES6)</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="async function f() {
return { };
}"><pre class="notranslate"><span class="pl-k">async</span> <span class="pl-k">function</span> <span class="pl-en">f</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</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">instead of giving the "only available in ES6" warning, it throws this exception:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" throw e;
^
TypeError: Cannot read property 'members' of undefined
at resolveDeclaredMembers (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:15429:65)
at resolveTypeReferenceMembers (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:15459:26)
at resolveStructuredTypeMembers (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:15665:21)
at getPropertiesOfObjectType (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:15673:24)
at propertiesRelatedTo (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:17141:34)
at objectTypeRelatedTo (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:17107:30)
at isRelatedTo (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:16935:34)
at checkTypeRelatedTo (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:16824:26)
at checkTypeAssignableTo (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:16797:20)
at isTypeAssignableTo (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:16791:20)"><pre class="notranslate"><code class="notranslate"> throw e;
^
TypeError: Cannot read property 'members' of undefined
at resolveDeclaredMembers (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:15429:65)
at resolveTypeReferenceMembers (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:15459:26)
at resolveStructuredTypeMembers (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:15665:21)
at getPropertiesOfObjectType (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:15673:24)
at propertiesRelatedTo (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:17141:34)
at objectTypeRelatedTo (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:17107:30)
at isRelatedTo (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:16935:34)
at checkTypeRelatedTo (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:16824:26)
at checkTypeAssignableTo (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:16797:20)
at isTypeAssignableTo (C:\Users\Nino\AppData\Roaming\npm\node_modules\typescript\bin\tsc.js:16791:20)
</code></pre></div>
<p dir="auto">using tsc <code class="notranslate">1.5.3</code></p> | 1 |
<p dir="auto"><a href="https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ShardsLimitAllocationDecider.java">https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ShardsLimitAllocationDecider.java</a><br>
method canAllocate() and canRemain() have so many duplicate code. better refacory it.</p> | <p dir="auto">Follow up for <a href="https://github.com/elastic/elasticsearch-analysis-kuromoji/issues/61">https://github.com/elastic/elasticsearch-analysis-kuromoji/issues/61</a></p>
<p dir="auto">We don't shade anymore elasticsearch dependencies, so plugins might include jars in the distribution ZIP file which might not be needed anymore.</p>
<p dir="auto">For example, <code class="notranslate">elasticsearch-cloud-aws</code> comes with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Archive: cloud-aws/target/releases/elasticsearch-cloud-aws-2.0.0-SNAPSHOT.zip
Length Date Time Name
-------- ---- ---- ----
1920788 05-18-15 09:42 aws-java-sdk-ec2-1.9.34.jar
503963 05-18-15 09:42 aws-java-sdk-core-1.9.34.jar
232771 01-19-15 09:24 commons-codec-1.6.jar
915096 01-19-15 09:24 jackson-databind-2.3.2.jar
252288 05-18-15 09:42 aws-java-sdk-kms-1.9.34.jar
62050 01-19-15 09:24 commons-logging-1.1.3.jar
282269 10-31-14 13:19 httpcore-4.3.2.jar
35058 01-19-15 09:24 jackson-annotations-2.3.0.jar
229998 05-29-15 12:28 jackson-core-2.5.3.jar
589289 01-19-15 09:24 joda-time-2.7.jar
562858 05-18-15 09:42 aws-java-sdk-s3-1.9.34.jar
590533 10-31-14 13:19 httpclient-4.3.5.jar
44854 06-12-15 19:22 elasticsearch-cloud-aws-2.0.0-SNAPSHOT.jar
-------- -------
6221815 13 files"><pre class="notranslate"><code class="notranslate">Archive: cloud-aws/target/releases/elasticsearch-cloud-aws-2.0.0-SNAPSHOT.zip
Length Date Time Name
-------- ---- ---- ----
1920788 05-18-15 09:42 aws-java-sdk-ec2-1.9.34.jar
503963 05-18-15 09:42 aws-java-sdk-core-1.9.34.jar
232771 01-19-15 09:24 commons-codec-1.6.jar
915096 01-19-15 09:24 jackson-databind-2.3.2.jar
252288 05-18-15 09:42 aws-java-sdk-kms-1.9.34.jar
62050 01-19-15 09:24 commons-logging-1.1.3.jar
282269 10-31-14 13:19 httpcore-4.3.2.jar
35058 01-19-15 09:24 jackson-annotations-2.3.0.jar
229998 05-29-15 12:28 jackson-core-2.5.3.jar
589289 01-19-15 09:24 joda-time-2.7.jar
562858 05-18-15 09:42 aws-java-sdk-s3-1.9.34.jar
590533 10-31-14 13:19 httpclient-4.3.5.jar
44854 06-12-15 19:22 elasticsearch-cloud-aws-2.0.0-SNAPSHOT.jar
-------- -------
6221815 13 files
</code></pre></div>
<p dir="auto">A lot of those files are already distributed with elasticsearch itself so classes are available within the classloader.</p>
<p dir="auto">That's leading me to another question. We might now hit incompatibility issues. Let say we upgrade jackson to 3.0.0 in elasticsearch but aws sdk requires 2.x version. We might have a clash. <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/s1monw/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/s1monw">@s1monw</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rmuir/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rmuir">@rmuir</a> WDYT?<br>
That might not happen though.</p> | 0 |
<p dir="auto">QR update, QR insert, and QR delete</p>
<p dir="auto">It would be nice to be able to update a QR factorization. The library that octave uses is here:</p>
<p dir="auto"><a href="https://sourceforge.net/projects/qrupdate/" rel="nofollow">https://sourceforge.net/projects/qrupdate/</a></p>
<p dir="auto">for reference. This will allow stuff like quickly updating a LM or GLM model when adding more observations.</p> | <p dir="auto">Matlab has <code class="notranslate">cholupdate</code> for rank 1 updates and downdates to Cholesky factorizations. It would be nice to have something similar, but perhaps with better syntax.</p>
<p dir="auto">LINPACK had these, but LAPACK left out the Cholesky update/downdate capabilities.</p>
<p dir="auto"><a href="http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=2&t=2646" rel="nofollow">http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=2&t=2646</a></p>
<p dir="auto">For the dense case, perhaps these should be implemented in julia. For the sparse case, I believe that CHOLMOD does provide these capabilities.</p>
<p dir="auto">Updated by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/andreasnoack/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/andreasnoack">@andreasnoack</a>:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Dense Cholesky</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Sparse Cholesky</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Dense QR (actually there are three different storage schemes)</li>
</ul> | 1 |
<p dir="auto">The <code class="notranslate">es6.forOf</code> transformer is enabled by default, yet code containing <code class="notranslate">for (x of y) ...</code> will not function unless the "polyfill" runtime library is enabled. This is due to the fact that for-of code generates use of Symbol, which is not provided by babel helpers, thus is undefined. The documentation does not mention this fact (<a href="http://babeljs.io/docs/learn-es6/#iterators-for-of" rel="nofollow">http://babeljs.io/docs/learn-es6/#iterators-for-of</a>) (no "Support via polyfill" note.)</p>
<p dir="auto"><strong>Suggestion:</strong> Make forOf optional and add "Support via polyfill" note to documentation, or introduce "Symbol" inline helper to remove dependency on "polyfill."</p>
<blockquote>
<p dir="auto">Note: <a href="https://github.com/termi/es6-transpiler">es6-transpiler</a> does support for-of via inline helpers.</p>
</blockquote>
<p dir="auto">Example:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="for (x of y) {}"><pre class="notranslate"><span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-s1">x</span> <span class="pl-k">of</span> <span class="pl-s1">y</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto">Generated: (note use of <code class="notranslate">Symbol.iterator</code>)</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""use strict";
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = y[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
x = _step.value;
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator["return"]) {
_iterator["return"]();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}"><pre class="notranslate"><span class="pl-s">"use strict"</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">_didIteratorError</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">_iteratorError</span> <span class="pl-c1">=</span> <span class="pl-c1">undefined</span><span class="pl-kos">;</span>
<span class="pl-k">try</span> <span class="pl-kos">{</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">_iterator</span> <span class="pl-c1">=</span> <span class="pl-s1">y</span><span class="pl-kos">[</span><span class="pl-v">Symbol</span><span class="pl-kos">.</span><span class="pl-c1">iterator</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">_step</span><span class="pl-kos">;</span> <span class="pl-c1">!</span><span class="pl-kos">(</span><span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">_step</span> <span class="pl-c1">=</span> <span class="pl-s1">_iterator</span><span class="pl-kos">.</span><span class="pl-en">next</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">done</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">_step</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span> <span class="pl-k">catch</span> <span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">_didIteratorError</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-s1">_iteratorError</span> <span class="pl-c1">=</span> <span class="pl-s1">err</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span> <span class="pl-k">finally</span> <span class="pl-kos">{</span>
<span class="pl-k">try</span> <span class="pl-kos">{</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">&&</span> <span class="pl-s1">_iterator</span><span class="pl-kos">[</span><span class="pl-s">"return"</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">_iterator</span><span class="pl-kos">[</span><span class="pl-s">"return"</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-k">finally</span> <span class="pl-kos">{</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">_didIteratorError</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">throw</span> <span class="pl-s1">_iteratorError</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<ul dir="auto">
<li>Babel v 4.7.8</li>
<li>Tested with Nodejs v0.10.36</li>
</ul> | <p dir="auto">It seems that</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let a = [1, 2, 3, 4, 5];
for (let i of a) {
console.log(i);
}"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">2</span><span class="pl-kos">,</span> <span class="pl-c1">3</span><span class="pl-kos">,</span> <span class="pl-c1">4</span><span class="pl-kos">,</span> <span class="pl-c1">5</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">i</span> <span class="pl-k">of</span> <span class="pl-s1">a</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-s1">i</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">produces</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""use strict";
var a = [1, 2, 3, 4, 5];
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = a[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var i = _step.value;
console.log(i);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator["return"]) {
_iterator["return"]();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}"><pre class="notranslate"><span class="pl-s">"use strict"</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">2</span><span class="pl-kos">,</span> <span class="pl-c1">3</span><span class="pl-kos">,</span> <span class="pl-c1">4</span><span class="pl-kos">,</span> <span class="pl-c1">5</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">_didIteratorError</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">_iteratorError</span> <span class="pl-c1">=</span> <span class="pl-c1">undefined</span><span class="pl-kos">;</span>
<span class="pl-k">try</span> <span class="pl-kos">{</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">_iterator</span> <span class="pl-c1">=</span> <span class="pl-s1">a</span><span class="pl-kos">[</span><span class="pl-v">Symbol</span><span class="pl-kos">.</span><span class="pl-c1">iterator</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">_step</span><span class="pl-kos">;</span> <span class="pl-c1">!</span><span class="pl-kos">(</span><span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">_step</span> <span class="pl-c1">=</span> <span class="pl-s1">_iterator</span><span class="pl-kos">.</span><span class="pl-en">next</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">done</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-s1">_step</span><span class="pl-kos">.</span><span class="pl-c1">value</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">i</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">catch</span> <span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">_didIteratorError</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-s1">_iteratorError</span> <span class="pl-c1">=</span> <span class="pl-s1">err</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span> <span class="pl-k">finally</span> <span class="pl-kos">{</span>
<span class="pl-k">try</span> <span class="pl-kos">{</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">&&</span> <span class="pl-s1">_iterator</span><span class="pl-kos">[</span><span class="pl-s">"return"</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">_iterator</span><span class="pl-kos">[</span><span class="pl-s">"return"</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-k">finally</span> <span class="pl-kos">{</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">_didIteratorError</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">throw</span> <span class="pl-s1">_iteratorError</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">It states in the documentation that for..of loops do not require the polyfill, however in this case it appears they either do, or are transpiling to ES6 code, given the <code class="notranslate">var _iterator = a[Symbol.iterator]()</code> in the produced for loop.</p>
<p dir="auto">Is the polyfill actually required for this? If so, the documentation should be updated. If not, then something is wrong.</p> | 1 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.