text1
stringlengths
0
536k
text2
stringlengths
0
536k
label
int64
0
1
<p dir="auto">The issue appears to be related to DateFormatter 'Intl' service.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[Error] EXCEPTION: ReferenceError: Can't find variable: Intl in [null] logError (angular2.dev.js, line 25219) logGroup (angular2.dev.js, line 25230) call (angular2.dev.js, line 20915) (anonymous function) (angular2.dev.js, line 27327) _onError (angular2.dev.js, line 16659) onError (angular2.dev.js, line 16579) run (angular2.dev.js, line 139) (anonymous function) (angular2.dev.js, line 16600) zoneBoundFn (angular2.dev.js, line 109) lib$es6$promise$asap$$flush (angular2.dev.js, line 1213) [Error] ORIGINAL EXCEPTION: ReferenceError: Can't find variable: Intl logError (angular2.dev.js, line 25219) call (angular2.dev.js, line 20924) (anonymous function) (angular2.dev.js, line 27327) _onError (angular2.dev.js, line 16659) onError (angular2.dev.js, line 16579) run (angular2.dev.js, line 139) (anonymous function) (angular2.dev.js, line 16600) zoneBoundFn (angular2.dev.js, line 109) lib$es6$promise$asap$$flush (angular2.dev.js, line 1213) [Error] ORIGINAL STACKTRACE: logError (angular2.dev.js, line 25219) call (angular2.dev.js, line 20927) (anonymous function) (angular2.dev.js, line 27327) _onError (angular2.dev.js, line 16659) onError (angular2.dev.js, line 16579) run (angular2.dev.js, line 139) (anonymous function) (angular2.dev.js, line 16600) zoneBoundFn (angular2.dev.js, line 109) lib$es6$promise$asap$$flush (angular2.dev.js, line 1213) [Error] format@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:16069:37 transform@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:23275:38 detectChangesInRecordsInternal detectChangesInRecords@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26173:50 runDetectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26156:40 _detectChangesInLightDomChildren@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26217:36 runDetectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26157:50 _detectChangesInLightDomChildren@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26217:36 runDetectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26157:50 _detectChangesInShadowDomChildren@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26223:36 runDetectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26160:51 _detectChangesInLightDomChildren@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26217:36 runDetectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26157:50 _detectChangesInShadowDomChildren@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26223:36 runDetectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26160:51 _detectChangesInLightDomChildren@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26217:36 runDetectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26157:50 _detectChangesInShadowDomChildren@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26223:36 runDetectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26160:51 detectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26147:34 tick@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:16463:47 http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:16453:29 run@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:136:22 http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:16600:41 zoneBoundFn@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:109:22 lib$es6$promise$asap$$flush@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:1213:17 logError (angular2.dev.js, line 25219) call (angular2.dev.js, line 20928) (anonymous function) (angular2.dev.js, line 27327) _onError (angular2.dev.js, line 16659) onError (angular2.dev.js, line 16579) run (angular2.dev.js, line 139) (anonymous function) (angular2.dev.js, line 16600) zoneBoundFn (angular2.dev.js, line 109) lib$es6$promise$asap$$flush (angular2.dev.js, line 1213)"><pre class="notranslate"><code class="notranslate">[Error] EXCEPTION: ReferenceError: Can't find variable: Intl in [null] logError (angular2.dev.js, line 25219) logGroup (angular2.dev.js, line 25230) call (angular2.dev.js, line 20915) (anonymous function) (angular2.dev.js, line 27327) _onError (angular2.dev.js, line 16659) onError (angular2.dev.js, line 16579) run (angular2.dev.js, line 139) (anonymous function) (angular2.dev.js, line 16600) zoneBoundFn (angular2.dev.js, line 109) lib$es6$promise$asap$$flush (angular2.dev.js, line 1213) [Error] ORIGINAL EXCEPTION: ReferenceError: Can't find variable: Intl logError (angular2.dev.js, line 25219) call (angular2.dev.js, line 20924) (anonymous function) (angular2.dev.js, line 27327) _onError (angular2.dev.js, line 16659) onError (angular2.dev.js, line 16579) run (angular2.dev.js, line 139) (anonymous function) (angular2.dev.js, line 16600) zoneBoundFn (angular2.dev.js, line 109) lib$es6$promise$asap$$flush (angular2.dev.js, line 1213) [Error] ORIGINAL STACKTRACE: logError (angular2.dev.js, line 25219) call (angular2.dev.js, line 20927) (anonymous function) (angular2.dev.js, line 27327) _onError (angular2.dev.js, line 16659) onError (angular2.dev.js, line 16579) run (angular2.dev.js, line 139) (anonymous function) (angular2.dev.js, line 16600) zoneBoundFn (angular2.dev.js, line 109) lib$es6$promise$asap$$flush (angular2.dev.js, line 1213) [Error] format@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:16069:37 transform@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:23275:38 detectChangesInRecordsInternal detectChangesInRecords@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26173:50 runDetectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26156:40 _detectChangesInLightDomChildren@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26217:36 runDetectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26157:50 _detectChangesInLightDomChildren@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26217:36 runDetectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26157:50 _detectChangesInShadowDomChildren@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26223:36 runDetectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26160:51 _detectChangesInLightDomChildren@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26217:36 runDetectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26157:50 _detectChangesInShadowDomChildren@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26223:36 runDetectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26160:51 _detectChangesInLightDomChildren@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26217:36 runDetectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26157:50 _detectChangesInShadowDomChildren@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26223:36 runDetectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26160:51 detectChanges@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:26147:34 tick@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:16463:47 http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:16453:29 run@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:136:22 http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:16600:41 zoneBoundFn@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:109:22 lib$es6$promise$asap$$flush@http://dev.minds.io/lib/angular2.dev.js?v=0.0.1:1213:17 logError (angular2.dev.js, line 25219) call (angular2.dev.js, line 20928) (anonymous function) (angular2.dev.js, line 27327) _onError (angular2.dev.js, line 16659) onError (angular2.dev.js, line 16579) run (angular2.dev.js, line 139) (anonymous function) (angular2.dev.js, line 16600) zoneBoundFn (angular2.dev.js, line 109) lib$es6$promise$asap$$flush (angular2.dev.js, line 1213) </code></pre></div>
<p dir="auto">Running unit tests in non-Chrome browsers raised some doubts about this API which is currently used in the Date and Currency pipes.</p> <p dir="auto">To start with, it is not supported in all Safari versions (desktop and mobile) and older browsers:<br> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl</a><br> <a href="http://caniuse.com/#search=intl" rel="nofollow">http://caniuse.com/#search=intl</a></p> <p dir="auto">Then, on browsers which support it, the result doesn't match what Chrome does.<br> On Firefox, one of the test fires this 2 years old bug: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=866372" rel="nofollow">https://bugzilla.mozilla.org/show_bug.cgi?id=866372</a><br> On IE11, most tests are failing due to discrepancies in output (formatting, white space, special chars,etc).</p> <p dir="auto">At the end of the day, it seems only reliable in Chrome, but it is also difficult to polyfill.<br> So, if anyone has a good solution to that, please speak up!</p>
1
<h3 dir="auto">Version</h3> <p dir="auto">2.6.10</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://jsfiddle.net/mpqx6y8r/2/" rel="nofollow">https://jsfiddle.net/mpqx6y8r/2/</a></p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">Run the JSFiddle with the browser console open.</p> <p dir="auto">A <code class="notranslate">created</code> hook on the Vue component will attempt to log to the console the return value of <code class="notranslate">this.Pet.getSpecies()</code> and <code class="notranslate">this.WaitingList.frontPerson()</code>.</p> <p dir="auto">However, Vue will fail the second call since this array method (class ExtendArray extends Array) has been stripped during data registration. The same does not happen with plain Objects (class ExtendObject extends Object).</p> <h3 dir="auto">What is expected?</h3> <p dir="auto">Console output:</p> <p dir="auto">'Pet: Dog',</p> <p dir="auto">'WaitingList: Jack'</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">Console output:</p> <p dir="auto">'Pet: Dog',</p> <p dir="auto">'TypeError: this.WaitingList.frontPerson is not a function'</p>
<h3 dir="auto">Version</h3> <p dir="auto">2.6.10</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://codesandbox.io/s/vue-template-gg2gj" rel="nofollow">https://codesandbox.io/s/vue-template-gg2gj</a></p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">Create two functional components, <code class="notranslate">OuterComponent</code> and <code class="notranslate">InnerComponent</code>.<br> Use <code class="notranslate">InnerComponent</code> in <code class="notranslate">OuterComponent</code>.<br> Use <code class="notranslate">OuterComponent</code> in your app somewhere.</p> <h3 dir="auto">What is expected?</h3> <p dir="auto"><code class="notranslate">InnerComponent</code> should be recognized, as it's registered in <code class="notranslate">OuterComponent</code>'s <code class="notranslate">component</code> option.<br> <code class="notranslate">InnerComponent</code> should render.</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">A unknown custom element error is thrown, and <code class="notranslate">InnerComponent</code> isn't rendered.</p> <hr> <p dir="auto">It will work if all the functional components used are registered in <code class="notranslate">app.vue</code>, even though they aren't used in <code class="notranslate">app.vue</code>'s template.</p>
0
<h4 dir="auto">Description</h4> <p dir="auto">Log_loss uses LabelBibarizer to transform only original y_true, but not to transform y_pred.<br> Hence array y_true=[1,1,1] is transformed into [0,0,0], while y_pred is unchanged. This makes the result to be quite different from expected.</p> <h4 dir="auto">Sample code</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from sklearn.metrics import log_loss y_true = [1,1,1] y_pred = [0,0,0] print(log_loss(y_true,y_pred)) # incorrect, because y_true is transformed into [0,0,0] print(log_loss(y_pred,y_true)) # correct"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">metrics</span> <span class="pl-k">import</span> <span class="pl-s1">log_loss</span> <span class="pl-s1">y_true</span> <span class="pl-c1">=</span> [<span class="pl-c1">1</span>,<span class="pl-c1">1</span>,<span class="pl-c1">1</span>] <span class="pl-s1">y_pred</span> <span class="pl-c1">=</span> [<span class="pl-c1">0</span>,<span class="pl-c1">0</span>,<span class="pl-c1">0</span>] <span class="pl-en">print</span>(<span class="pl-en">log_loss</span>(<span class="pl-s1">y_true</span>,<span class="pl-s1">y_pred</span>)) <span class="pl-c"># incorrect, because y_true is transformed into [0,0,0]</span> <span class="pl-en">print</span>(<span class="pl-en">log_loss</span>(<span class="pl-s1">y_pred</span>,<span class="pl-s1">y_true</span>)) <span class="pl-c"># correct</span></pre></div> <h4 dir="auto">Expected Results</h4> <p dir="auto">34.5395759923<br> 34.5395759923</p> <h4 dir="auto">Actual Results</h4> <p dir="auto">9.99200722163e-16<br> 34.5395759923</p> <h4 dir="auto">Versions</h4> <p dir="auto">Windows-7-6.1.7601-SP1<br> Python 3.4.4 |Anaconda 2.3.0 (64-bit)| (default, Feb 16 2016, 09:54:04) [MSC v.1600 64 bit (AMD64)]<br> NumPy 1.10.4<br> SciPy 0.16.0<br> Scikit-Learn 0.16.1</p>
<p dir="auto">When there is only one class, such as :</p> <p dir="auto">y_true = np.array(['class1', 'class1', 'class1'])<br> y_predict = np.array([[0.1],[0.7],[0.5]])<br> log_loss(y_true, y_predict)</p> <p dir="auto">The result would be wrong, which is not the logloss of y_predict but the logloss of 1-y_predict</p> <p dir="auto">The code in log_loss:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if Y.shape[1] == 1: Y = np.append(1 - Y, Y, axis=1)"><pre class="notranslate"><code class="notranslate">if Y.shape[1] == 1: Y = np.append(1 - Y, Y, axis=1) </code></pre></div> <p dir="auto">should be change to :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if Y.shape[1] == 1: Y = np.append(Y, 1 - Y, axis=1)"><pre class="notranslate"><code class="notranslate">if Y.shape[1] == 1: Y = np.append(Y, 1 - Y, axis=1) </code></pre></div>
1
<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-add-placeholder-text-to-a-text-field" rel="nofollow">http://freecodecamp.com/challenges/waypoint-add-placeholder-text-to-a-text-field</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p> <p dir="auto">Not 100% sure if its designed like this but it jumps from UL to forms skipping OL challenge...</p> <p dir="auto">Also brought to my attention was the fact that there is no way back to your previous challenge (besides browser back button)</p> <p dir="auto">-Goran</p>
<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-create-a-bulleted-unordered-list" rel="nofollow">http://freecodecamp.com/challenges/waypoint-create-a-bulleted-unordered-list</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible. This issue I noticed can occur on ANY page and its not applicable to only this page, however on this page I decided to report it. If You press the back button to repeat a lesson or just review the information. And you then click on the Run Code button again on that lesson, instead of taking you to the next lesson, it acts as if you completed that next lesson ( since you were on that page last when you pressed the back button ) and takes you to the lesson after that one, even though you never completed the previous page.. for example. on the page <a href="http://freecodecamp.com/challenges/waypoint-create-a-bulleted-unordered-list" rel="nofollow">http://freecodecamp.com/challenges/waypoint-create-a-bulleted-unordered-list</a> which is waypoint 26, I did not do this lesson and instead pressed the back button to go to the waypoint 25 again. I completed 25 again, press Run Code and am then taken directly to Waypoint 27. To try and get back to 26 , i press back again and it goes to Waypoint 25 again, I complete and press run code ,and this time it takes me to Waypoint 28, thus skipping both 26 AND 27 in this next attempt .</p>
1
<p dir="auto">This is a bug report</p> <h3 dir="auto">Input Code</h3> <p dir="auto">Simplified version of the problematic file that still crashes:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// @flow import React from 'react'; import { Switch, Route } from 'react-router-dom'; import SubscriberRoutes from './SubscriberRoutes'; import NotFoundPage from '../App/NotFoundPage'; type Props = { modules: string[], }; export default function AppRoutes ({ modules }: Props) { return ( &lt;Switch&gt; &lt;Route render={() =&gt; &lt;SubscriberRoutes modules={modules} /&gt;} /&gt; &lt;Route component={NotFoundPage} /&gt; &lt;/Switch&gt; ); }"><pre class="notranslate"><span class="pl-c">// <span class="pl-k">@flow</span></span> <span class="pl-k">import</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-v">Switch</span><span class="pl-kos">,</span> <span class="pl-v">Route</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react-router-dom'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-v">SubscriberRoutes</span> <span class="pl-k">from</span> <span class="pl-s">'./SubscriberRoutes'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-v">NotFoundPage</span> <span class="pl-k">from</span> <span class="pl-s">'../App/NotFoundPage'</span><span class="pl-kos">;</span> <span class="pl-s1">type</span> <span class="pl-v">Props</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">modules</span>: <span class="pl-s1">string</span><span class="pl-kos">[</span><span class="pl-s1"></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">default</span> <span class="pl-k">function</span> <span class="pl-v">AppRoutes</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> modules <span class="pl-kos">}</span>: <span class="pl-v">Props</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">&lt;</span><span class="pl-ent">Switch</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">Route</span> <span class="pl-c1">render</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">SubscriberRoutes</span> <span class="pl-c1">modules</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">modules</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">Route</span> <span class="pl-c1">component</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-v">NotFoundPage</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">Switch</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <h3 dir="auto">Babel/Babylon Configuration (.babelrc, package.json, cli command)</h3> <p dir="auto">I'm compiling with Webpack and I have no <code class="notranslate">.babelrc</code>. This is my config that I pass to <code class="notranslate">babel-loader</code>:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ presets: [ ['env', { modules: false }], 'stage-2', 'react', ], plugins: [ 'transform-react-constant-elements', ], }"><pre class="notranslate"><span class="pl-kos">{</span> <span class="pl-c1">presets</span>: <span class="pl-kos">[</span> <span class="pl-kos">[</span><span class="pl-s">'env'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">modules</span>: <span class="pl-c1">false</span> <span class="pl-kos">}</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s">'stage-2'</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-kos">,</span> <span class="pl-c1">plugins</span>: <span class="pl-kos">[</span> <span class="pl-s">'transform-react-constant-elements'</span><span class="pl-kos">,</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">}</span></pre></div> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">I think it should compile. Have I done anything wrong or is this a bug? Removing <code class="notranslate">transform-react-constant-elements</code> makes it work.</p> <h3 dir="auto">Current Behavior</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR in ./src/components/Routes/AppRoutes.js Module parse failed: Unexpected token (9:34) You may need an appropriate loader to handle this file type. | var _ref3 = React.createElement(Route, { component: NotFoundPage }); | | export default function AppRoutes((_temp = _ref, _ref2 = &lt;SubscriberRoutes modules={modules} /&gt;, _temp)) { | var _temp, _ref2; | @ ./src/components/Login/LoginWall.js 5:0-44 9:32-41 @ ./src/components/App/App.js @ ./src/index.js @ multi babel-polyfill ./src"><pre class="notranslate"><code class="notranslate">ERROR in ./src/components/Routes/AppRoutes.js Module parse failed: Unexpected token (9:34) You may need an appropriate loader to handle this file type. | var _ref3 = React.createElement(Route, { component: NotFoundPage }); | | export default function AppRoutes((_temp = _ref, _ref2 = &lt;SubscriberRoutes modules={modules} /&gt;, _temp)) { | var _temp, _ref2; | @ ./src/components/Login/LoginWall.js 5:0-44 9:32-41 @ ./src/components/App/App.js @ ./src/index.js @ multi babel-polyfill ./src </code></pre></div> <h3 dir="auto">Possible Solution</h3> <h3 dir="auto">Context</h3> <p dir="auto">I'm trying to build my app with Webpack.</p> <h3 dir="auto">Your Environment</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="yarn list --pattern babel yarn list v1.5.1 ├─ @babel/[email protected] ├─ @babel/[email protected] ├─ @babel/[email protected] ├─ @babel/[email protected] ├─ @babel/[email protected] ├─ @babel/[email protected] ├─ @babel/[email protected] ├─ @babel/[email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] └─ [email protected]"><pre class="notranslate"><code class="notranslate">yarn list --pattern babel yarn list v1.5.1 ├─ @babel/[email protected] ├─ @babel/[email protected] ├─ @babel/[email protected] ├─ @babel/[email protected] ├─ @babel/[email protected] ├─ @babel/[email protected] ├─ @babel/[email protected] ├─ @babel/[email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] ├─ [email protected] └─ [email protected] </code></pre></div> <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>Webpack</td> <td>4.1.1</td> </tr> <tr> <td>node</td> <td>9.7.1</td> </tr> <tr> <td>yarn</td> <td>1.5.1</td> </tr> <tr> <td>Operating System</td> <td>macOS 10.13.3</td> </tr> </tbody> </table>
<p dir="auto">Could the property descriptors passed to decorators be extended to hold type information, like they are for initializers?</p>
0
<p dir="auto">I'm trying to set up AWS ELB attach volume access and keep getting an error on the kubelet. I have some bad feeling it might be related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="88465830" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/9801" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/9801/hovercard" href="https://github.com/kubernetes/kubernetes/issues/9801">#9801</a> as these nodes are CoreOS that were brought up by Terraform with custom service files but everything else is working fine (we're running cluster monitoring, dns, and a number of our own pods without issues). I've run awscli on that instance and the privileges definitely work. What am I doing wrong?</p> <p dir="auto">logs from kubelet service</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I0719 02:22:59.549444 9662 factory.go:234] Registering Docker factory I0719 02:22:59.549826 9662 factory.go:89] Registering Raw factory I0719 02:22:59.638468 9662 manager.go:946] Started watching for new ooms in manager I0719 02:22:59.639054 9662 oomparser.go:183] oomparser using systemd I0719 02:22:59.640589 9662 manager.go:243] Starting recovery of all containers E0719 02:22:59.679107 9662 kubelet.go:787] Unable to construct api.Node object for kubelet: failed to get external ID from cloud provider: instance not found I0719 02:22:59.753816 9662 manager.go:248] Recovery completed I0719 02:22:59.816369 9662 status_manager.go:76] Starting to sync pod status with apiserver I0719 02:22:59.816426 9662 kubelet.go:1725] Starting kubelet main sync loop. E0719 02:22:59.953337 9662 kubelet.go:787] Unable to construct api.Node object for kubelet: failed to get external ID from cloud provider: instance not found E0719 02:23:01.047929 9662 kubelet.go:787] Unable to construct api.Node object for kubelet: failed to get external ID from cloud provider: instance not found E0719 02:23:01.975409 9662 kubelet.go:787] Unable to construct api.Node object for kubelet: failed to get external ID from cloud provider: instance not found E0719 02:23:03.645707 9662 kubelet.go:787] Unable to construct api.Node object for kubelet: failed to get external ID from cloud provider: instance not found E0719 02:23:06.917503 9662 kubelet.go:787] Unable to construct api.Node object for kubelet: failed to get external ID from cloud provider: instance not found I0719 02:23:07.790941 9662 server.go:635] POST /stats/container/: (46.254087ms) 0 [[Go 1.1 package http] 10.0.39.222:45497]"><pre class="notranslate"><code class="notranslate">I0719 02:22:59.549444 9662 factory.go:234] Registering Docker factory I0719 02:22:59.549826 9662 factory.go:89] Registering Raw factory I0719 02:22:59.638468 9662 manager.go:946] Started watching for new ooms in manager I0719 02:22:59.639054 9662 oomparser.go:183] oomparser using systemd I0719 02:22:59.640589 9662 manager.go:243] Starting recovery of all containers E0719 02:22:59.679107 9662 kubelet.go:787] Unable to construct api.Node object for kubelet: failed to get external ID from cloud provider: instance not found I0719 02:22:59.753816 9662 manager.go:248] Recovery completed I0719 02:22:59.816369 9662 status_manager.go:76] Starting to sync pod status with apiserver I0719 02:22:59.816426 9662 kubelet.go:1725] Starting kubelet main sync loop. E0719 02:22:59.953337 9662 kubelet.go:787] Unable to construct api.Node object for kubelet: failed to get external ID from cloud provider: instance not found E0719 02:23:01.047929 9662 kubelet.go:787] Unable to construct api.Node object for kubelet: failed to get external ID from cloud provider: instance not found E0719 02:23:01.975409 9662 kubelet.go:787] Unable to construct api.Node object for kubelet: failed to get external ID from cloud provider: instance not found E0719 02:23:03.645707 9662 kubelet.go:787] Unable to construct api.Node object for kubelet: failed to get external ID from cloud provider: instance not found E0719 02:23:06.917503 9662 kubelet.go:787] Unable to construct api.Node object for kubelet: failed to get external ID from cloud provider: instance not found I0719 02:23:07.790941 9662 server.go:635] POST /stats/container/: (46.254087ms) 0 [[Go 1.1 package http] 10.0.39.222:45497] </code></pre></div> <p dir="auto">kube-kubelet.service</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[Unit] Description=Kubernetes Kubelet Documentation=https://github.com/GoogleCloudPlatform/kubernetes [Service] Environment=&quot;KUBERNETES_BINARY_VERSION=1.0.0&quot; EnvironmentFile=/etc/environment ExecStartPre=/usr/bin/curl -L -o /opt/bin/kubelet https://storage.googleapis.com/kubernetes-release/release/v${KUBERNETES_BINARY_VERSION}/bin/linux/amd64 ExecStartPre=/usr/bin/chmod +x /opt/bin/kubelet ExecStart=/opt/bin/kubelet \ --address=0.0.0.0 \ --port=10250 \ --cloud-provider=aws \ --hostname-override=${COREOS_PRIVATE_IPV4} \ --api-servers=${KUBE_MASTER_IP}:8080 \ --allow-privileged=false \ --cluster_dns=10.2.0.2 \ --cluster_domain=cluster.local \ --cadvisor_port=4194 \ --healthz_bind_address=0.0.0.0 \ --healthz_port=10248 \ --v=2 \ --logtostderr=true Restart=always RestartSec=10 [Install] WantedBy=multi-user.target"><pre class="notranslate"><code class="notranslate">[Unit] Description=Kubernetes Kubelet Documentation=https://github.com/GoogleCloudPlatform/kubernetes [Service] Environment="KUBERNETES_BINARY_VERSION=1.0.0" EnvironmentFile=/etc/environment ExecStartPre=/usr/bin/curl -L -o /opt/bin/kubelet https://storage.googleapis.com/kubernetes-release/release/v${KUBERNETES_BINARY_VERSION}/bin/linux/amd64 ExecStartPre=/usr/bin/chmod +x /opt/bin/kubelet ExecStart=/opt/bin/kubelet \ --address=0.0.0.0 \ --port=10250 \ --cloud-provider=aws \ --hostname-override=${COREOS_PRIVATE_IPV4} \ --api-servers=${KUBE_MASTER_IP}:8080 \ --allow-privileged=false \ --cluster_dns=10.2.0.2 \ --cluster_domain=cluster.local \ --cadvisor_port=4194 \ --healthz_bind_address=0.0.0.0 \ --healthz_port=10248 \ --v=2 \ --logtostderr=true Restart=always RestartSec=10 [Install] WantedBy=multi-user.target </code></pre></div> <p dir="auto">iam policy</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;Version&quot;: &quot;2012-10-17&quot;, &quot;Statement&quot;: [ { &quot;Effect&quot;: &quot;Allow&quot;, &quot;Action&quot;: [ &quot;ec2:Describe*&quot; ], &quot;Resource&quot;: [ &quot;*&quot; ] }, { &quot;Effect&quot;: &quot;Allow&quot;, &quot;Action&quot;: [ &quot;ec2:AttachVolume&quot;, &quot;ec2:DetachVolume&quot; ], &quot;Resource&quot;: [ &quot;arn:aws:ec2:*:*:instance/*&quot; ] }, ] }"><pre class="notranslate">{ <span class="pl-ent">"Version"</span>: <span class="pl-s"><span class="pl-pds">"</span>2012-10-17<span class="pl-pds">"</span></span>, <span class="pl-ent">"Statement"</span>: [ { <span class="pl-ent">"Effect"</span>: <span class="pl-s"><span class="pl-pds">"</span>Allow<span class="pl-pds">"</span></span>, <span class="pl-ent">"Action"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>ec2:Describe*<span class="pl-pds">"</span></span> ], <span class="pl-ent">"Resource"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>*<span class="pl-pds">"</span></span> ] }, { <span class="pl-ent">"Effect"</span>: <span class="pl-s"><span class="pl-pds">"</span>Allow<span class="pl-pds">"</span></span>, <span class="pl-ent">"Action"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>ec2:AttachVolume<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>ec2:DetachVolume<span class="pl-pds">"</span></span> ], <span class="pl-ent">"Resource"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>arn:aws:ec2:*:*:instance/*<span class="pl-pds">"</span></span> ] }, ] }</pre></div>
<p dir="auto"><strong>BUG REPORT</strong></p> <p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>): v1.4.0</p> <p dir="auto"><strong>Environment</strong>:</p> <ul dir="auto"> <li><strong>Cloud provider or hardware configuration</strong>: GCE</li> <li><strong>OS</strong> (e.g. from /etc/os-release): default GCI image</li> <li><strong>Install tools</strong>: kube-up</li> </ul> <p dir="auto"><strong>What happened</strong>:</p> <ul dir="auto"> <li>Create TPR "MyResource"</li> <li>Create namespace "soak-test"</li> <li>Create a "MyResource" "a" under "soak-test":</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cat my-resource-a.yaml apiVersion: &quot;example.com/v1&quot; kind: &quot;MyResource&quot; metadata: name: &quot;a&quot; ... $ kubectl --namespace soak-test create -f my-resource-a.yaml $ kubectl --namespace soak-test get MyResource NAME LABELS DATA a ..."><pre class="notranslate"><code class="notranslate">$ cat my-resource-a.yaml apiVersion: "example.com/v1" kind: "MyResource" metadata: name: "a" ... $ kubectl --namespace soak-test create -f my-resource-a.yaml $ kubectl --namespace soak-test get MyResource NAME LABELS DATA a ... </code></pre></div> <ul dir="auto"> <li>Delete namespace "soak-test"</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ kubectl delete ns soak-test"><pre class="notranslate"><code class="notranslate">$ kubectl delete ns soak-test </code></pre></div> <ul dir="auto"> <li>Verify it's deleted</li> <li>Recreate namespace "soak-test"</li> </ul> <p dir="auto">Here I'm expecting that the namespace should be fresh. But previous MyResource "a" still exists.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ kubectl --namespace soak-test get MyResource NAME LABELS DATA a ..."><pre class="notranslate"><code class="notranslate">$ kubectl --namespace soak-test get MyResource NAME LABELS DATA a ... </code></pre></div> <p dir="auto">Is this expected or a bug?</p>
0
<p dir="auto">hi, i'm getting this error on default project after "php app/console server:run"<br> im using php7<br> <a href="https://s15.postimg.io/54yaz6ty3/Se_im_001.png-" rel="nofollow">https://s15.postimg.io/54yaz6ty3/Se_im_001.png-</a><br> <code class="notranslate"> Neither the property "ip" nor one of the methods "ip()", "getip()"/"isip()" or "__call()" exist and have public access in class "Symfony\Component\HttpKernel\Profiler\Profile" in @WebProfiler/Profiler/layout.html.twig at line 30</code></p> <p dir="auto">Thanks</p>
<p dir="auto">I tried to add a new custom validation to the password property of my User object in two different ways: in validation.xml and assert. In both cases the property was validated by the FOSUser's validation and my custom validation, so I got two error messages if it is common in the two validations (e.g.: the default minLength=2, in my case the minLength=8).</p> <p dir="auto">I am using Symfony 2.7 and the newest FOSUser.</p>
0
<p dir="auto">using following piece of code in windows 8 64 bit, with python3.3 and matplotlib 1.3.1</p> <p dir="auto">"""<br> def on_key_press(event):<br> print(event.key)<br> sys.stdout.flush()</p> <p dir="auto">fig.canvas.mpl_connect('key_press_event', on_key_press)<br> """</p> <p dir="auto">prints stuff like 'alt+m' when pressing 'm'</p>
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">imsave saves some pixels wrong to output image, or possibly it is always mapping certain values of the input array to the wrong output values. Colormap values appear correct, but actual data saved does not match colormap.</p> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#!/usr/bin/env python3 &quot;&quot;&quot;Test imsave using gray colormap &quot;&quot;&quot; import numpy as np import matplotlib.pyplot as plt import matplotlib import PIL def print_arrays_cols(*args): for i in range(len(args[1])): row_vals = [] for (j, arg) in enumerate(args): print(&quot;%.3f&quot;%(arg[i]), end=&quot;&quot;) if j &lt; len(args)-1: print(&quot;\t\t&quot;, end=&quot;&quot;) row_vals.append(arg[i]) if all([x==row_vals[0] for x in row_vals]): print(&quot;&quot;) else: print(&quot; ****&quot;) def main(): plt.gray() test_array = np.vstack((np.arange(0,256), np.arange(0,256))) test_array_cm_gray = matplotlib.cm.gray(test_array) # scale max to 255 test_array_cm_gray = test_array_cm_gray * 255 # save test_array to png plt.imsave('testme.png', test_array, format='png') # save test_array to tiff plt.imsave('testme.tif', test_array, format='tiff') # imread from png test_png_load = plt.imread('testme.png') # scale max to 255 test_png_load = test_png_load * 255 # imread from tiff test_tiff_load = plt.imread('testme.tif') # pil open from png pil_png_image = PIL.Image.open('testme.png') test_png_pil_load = list(pil_png_image.getdata()) # just get first row, and R of RGBA test_png_pil_load = [x[0] for x in test_png_pil_load[0:256]] # pil open from tiff pil_tiff_image = PIL.Image.open('testme.tif') test_tiff_pil_load = list(pil_tiff_image.getdata()) # just get first row test_tiff_pil_load = test_png_pil_load[0:256] # print orig, colormap, and 2 methods of loading png image data print(&quot;test_array\tcm.gray()\tpng_pil_load\tpng_imread_load&quot;) print(&quot;----------\t---------\t------------\t---------------&quot;) print_arrays_cols( test_array[0,:].flatten(), test_array_cm_gray[0,:,0].flatten(), test_png_pil_load, test_png_load[0,:,0].flatten(), ) # print orig, colormap, and 2 methods of loading tiff image data print(&quot;&quot;) print(&quot;test_array\tcm.gray()\ttiff_pil_load\ttiff_imread_load&quot;) print(&quot;----------\t---------\t-------------\t----------------&quot;) print_arrays_cols( test_array[0,:].flatten(), test_array_cm_gray[0,:,0].flatten(), test_tiff_pil_load, test_tiff_load[0,:,0].flatten(), ) if __name__ == '__main__': main()"><pre class="notranslate"><span class="pl-c">#!/usr/bin/env python3</span> <span class="pl-s">"""Test imsave using gray colormap</span> <span class="pl-s">"""</span> <span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</span> <span class="pl-v">PIL</span> <span class="pl-k">def</span> <span class="pl-en">print_arrays_cols</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>): <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-en">len</span>(<span class="pl-s1">args</span>[<span class="pl-c1">1</span>])): <span class="pl-s1">row_vals</span> <span class="pl-c1">=</span> [] <span class="pl-k">for</span> (<span class="pl-s1">j</span>, <span class="pl-s1">arg</span>) <span class="pl-c1">in</span> <span class="pl-en">enumerate</span>(<span class="pl-s1">args</span>): <span class="pl-en">print</span>(<span class="pl-s">"%.3f"</span><span class="pl-c1">%</span>(<span class="pl-s1">arg</span>[<span class="pl-s1">i</span>]), <span class="pl-s1">end</span><span class="pl-c1">=</span><span class="pl-s">""</span>) <span class="pl-k">if</span> <span class="pl-s1">j</span> <span class="pl-c1">&lt;</span> <span class="pl-en">len</span>(<span class="pl-s1">args</span>)<span class="pl-c1">-</span><span class="pl-c1">1</span>: <span class="pl-en">print</span>(<span class="pl-s">"<span class="pl-cce">\t</span><span class="pl-cce">\t</span>"</span>, <span class="pl-s1">end</span><span class="pl-c1">=</span><span class="pl-s">""</span>) <span class="pl-s1">row_vals</span>.<span class="pl-en">append</span>(<span class="pl-s1">arg</span>[<span class="pl-s1">i</span>]) <span class="pl-k">if</span> <span class="pl-en">all</span>([<span class="pl-s1">x</span><span class="pl-c1">==</span><span class="pl-s1">row_vals</span>[<span class="pl-c1">0</span>] <span class="pl-k">for</span> <span class="pl-s1">x</span> <span class="pl-c1">in</span> <span class="pl-s1">row_vals</span>]): <span class="pl-en">print</span>(<span class="pl-s">""</span>) <span class="pl-k">else</span>: <span class="pl-en">print</span>(<span class="pl-s">" ****"</span>) <span class="pl-k">def</span> <span class="pl-en">main</span>(): <span class="pl-s1">plt</span>.<span class="pl-en">gray</span>() <span class="pl-s1">test_array</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">vstack</span>((<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0</span>,<span class="pl-c1">256</span>), <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0</span>,<span class="pl-c1">256</span>))) <span class="pl-s1">test_array_cm_gray</span> <span class="pl-c1">=</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">cm</span>.<span class="pl-en">gray</span>(<span class="pl-s1">test_array</span>) <span class="pl-c"># scale max to 255</span> <span class="pl-s1">test_array_cm_gray</span> <span class="pl-c1">=</span> <span class="pl-s1">test_array_cm_gray</span> <span class="pl-c1">*</span> <span class="pl-c1">255</span> <span class="pl-c"># save test_array to png</span> <span class="pl-s1">plt</span>.<span class="pl-en">imsave</span>(<span class="pl-s">'testme.png'</span>, <span class="pl-s1">test_array</span>, <span class="pl-s1">format</span><span class="pl-c1">=</span><span class="pl-s">'png'</span>) <span class="pl-c"># save test_array to tiff</span> <span class="pl-s1">plt</span>.<span class="pl-en">imsave</span>(<span class="pl-s">'testme.tif'</span>, <span class="pl-s1">test_array</span>, <span class="pl-s1">format</span><span class="pl-c1">=</span><span class="pl-s">'tiff'</span>) <span class="pl-c"># imread from png</span> <span class="pl-s1">test_png_load</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">imread</span>(<span class="pl-s">'testme.png'</span>) <span class="pl-c"># scale max to 255</span> <span class="pl-s1">test_png_load</span> <span class="pl-c1">=</span> <span class="pl-s1">test_png_load</span> <span class="pl-c1">*</span> <span class="pl-c1">255</span> <span class="pl-c"># imread from tiff</span> <span class="pl-s1">test_tiff_load</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">imread</span>(<span class="pl-s">'testme.tif'</span>) <span class="pl-c"># pil open from png</span> <span class="pl-s1">pil_png_image</span> <span class="pl-c1">=</span> <span class="pl-v">PIL</span>.<span class="pl-v">Image</span>.<span class="pl-en">open</span>(<span class="pl-s">'testme.png'</span>) <span class="pl-s1">test_png_pil_load</span> <span class="pl-c1">=</span> <span class="pl-en">list</span>(<span class="pl-s1">pil_png_image</span>.<span class="pl-en">getdata</span>()) <span class="pl-c"># just get first row, and R of RGBA</span> <span class="pl-s1">test_png_pil_load</span> <span class="pl-c1">=</span> [<span class="pl-s1">x</span>[<span class="pl-c1">0</span>] <span class="pl-k">for</span> <span class="pl-s1">x</span> <span class="pl-c1">in</span> <span class="pl-s1">test_png_pil_load</span>[<span class="pl-c1">0</span>:<span class="pl-c1">256</span>]] <span class="pl-c"># pil open from tiff</span> <span class="pl-s1">pil_tiff_image</span> <span class="pl-c1">=</span> <span class="pl-v">PIL</span>.<span class="pl-v">Image</span>.<span class="pl-en">open</span>(<span class="pl-s">'testme.tif'</span>) <span class="pl-s1">test_tiff_pil_load</span> <span class="pl-c1">=</span> <span class="pl-en">list</span>(<span class="pl-s1">pil_tiff_image</span>.<span class="pl-en">getdata</span>()) <span class="pl-c"># just get first row</span> <span class="pl-s1">test_tiff_pil_load</span> <span class="pl-c1">=</span> <span class="pl-s1">test_png_pil_load</span>[<span class="pl-c1">0</span>:<span class="pl-c1">256</span>] <span class="pl-c"># print orig, colormap, and 2 methods of loading png image data</span> <span class="pl-en">print</span>(<span class="pl-s">"test_array<span class="pl-cce">\t</span>cm.gray()<span class="pl-cce">\t</span>png_pil_load<span class="pl-cce">\t</span>png_imread_load"</span>) <span class="pl-en">print</span>(<span class="pl-s">"----------<span class="pl-cce">\t</span>---------<span class="pl-cce">\t</span>------------<span class="pl-cce">\t</span>---------------"</span>) <span class="pl-en">print_arrays_cols</span>( <span class="pl-s1">test_array</span>[<span class="pl-c1">0</span>,:].<span class="pl-en">flatten</span>(), <span class="pl-s1">test_array_cm_gray</span>[<span class="pl-c1">0</span>,:,<span class="pl-c1">0</span>].<span class="pl-en">flatten</span>(), <span class="pl-s1">test_png_pil_load</span>, <span class="pl-s1">test_png_load</span>[<span class="pl-c1">0</span>,:,<span class="pl-c1">0</span>].<span class="pl-en">flatten</span>(), ) <span class="pl-c"># print orig, colormap, and 2 methods of loading tiff image data</span> <span class="pl-en">print</span>(<span class="pl-s">""</span>) <span class="pl-en">print</span>(<span class="pl-s">"test_array<span class="pl-cce">\t</span>cm.gray()<span class="pl-cce">\t</span>tiff_pil_load<span class="pl-cce">\t</span>tiff_imread_load"</span>) <span class="pl-en">print</span>(<span class="pl-s">"----------<span class="pl-cce">\t</span>---------<span class="pl-cce">\t</span>-------------<span class="pl-cce">\t</span>----------------"</span>) <span class="pl-en">print_arrays_cols</span>( <span class="pl-s1">test_array</span>[<span class="pl-c1">0</span>,:].<span class="pl-en">flatten</span>(), <span class="pl-s1">test_array_cm_gray</span>[<span class="pl-c1">0</span>,:,<span class="pl-c1">0</span>].<span class="pl-en">flatten</span>(), <span class="pl-s1">test_tiff_pil_load</span>, <span class="pl-s1">test_tiff_load</span>[<span class="pl-c1">0</span>,:,<span class="pl-c1">0</span>].<span class="pl-en">flatten</span>(), ) <span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">'__main__'</span>: <span class="pl-en">main</span>()</pre></div> <p dir="auto"><strong>Actual outcome</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test_array cm.gray() png_pil_load png_imread_load ---------- --------- ------------ --------------- 0.000 0.000 0.000 0.000 1.000 1.000 1.000 1.000 2.000 2.000 2.000 2.000 3.000 3.000 3.000 3.000 4.000 4.000 4.000 4.000 5.000 5.000 5.000 5.000 6.000 6.000 6.000 6.000 7.000 7.000 7.000 7.000 8.000 8.000 8.000 8.000 9.000 9.000 9.000 9.000 10.000 10.000 10.000 10.000 11.000 11.000 11.000 11.000 12.000 12.000 12.000 12.000 13.000 13.000 13.000 13.000 14.000 14.000 14.000 14.000 15.000 15.000 15.000 15.000 16.000 16.000 16.000 16.000 17.000 17.000 17.000 17.000 18.000 18.000 18.000 18.000 19.000 19.000 19.000 19.000 20.000 20.000 20.000 20.000 21.000 21.000 21.000 21.000 22.000 22.000 22.000 22.000 23.000 23.000 23.000 23.000 24.000 24.000 24.000 24.000 25.000 25.000 25.000 25.000 26.000 26.000 26.000 26.000 27.000 27.000 27.000 27.000 28.000 28.000 28.000 28.000 29.000 29.000 29.000 29.000 30.000 30.000 30.000 30.000 31.000 31.000 31.000 31.000 32.000 32.000 32.000 32.000 33.000 33.000 32.000 32.000 **** 34.000 34.000 34.000 34.000 35.000 35.000 35.000 35.000 36.000 36.000 36.000 36.000 37.000 37.000 36.000 36.000 **** 38.000 38.000 38.000 38.000 39.000 39.000 39.000 39.000 40.000 40.000 40.000 40.000 41.000 41.000 40.000 40.000 **** 42.000 42.000 42.000 42.000 43.000 43.000 43.000 43.000 44.000 44.000 44.000 44.000 45.000 45.000 44.000 44.000 **** 46.000 46.000 46.000 46.000 47.000 47.000 47.000 47.000 48.000 48.000 48.000 48.000 49.000 49.000 48.000 48.000 **** 50.000 50.000 50.000 50.000 51.000 51.000 51.000 51.000 52.000 52.000 52.000 52.000 53.000 53.000 52.000 52.000 **** 54.000 54.000 54.000 54.000 55.000 55.000 55.000 55.000 56.000 56.000 56.000 56.000 57.000 57.000 56.000 56.000 **** 58.000 58.000 58.000 58.000 59.000 59.000 59.000 59.000 60.000 60.000 60.000 60.000 61.000 61.000 60.000 60.000 **** 62.000 62.000 62.000 62.000 63.000 63.000 63.000 63.000 64.000 64.000 64.000 64.000 65.000 65.000 65.000 65.000 66.000 66.000 65.000 65.000 **** 67.000 67.000 67.000 67.000 68.000 68.000 68.000 68.000 69.000 69.000 69.000 69.000 70.000 70.000 70.000 70.000 71.000 71.000 71.000 71.000 72.000 72.000 72.000 72.000 73.000 73.000 73.000 73.000 74.000 74.000 73.000 73.000 **** 75.000 75.000 75.000 75.000 76.000 76.000 76.000 76.000 77.000 77.000 77.000 77.000 78.000 78.000 78.000 78.000 79.000 79.000 79.000 79.000 80.000 80.000 80.000 80.000 81.000 81.000 81.000 81.000 82.000 82.000 81.000 81.000 **** 83.000 83.000 83.000 83.000 84.000 84.000 84.000 84.000 85.000 85.000 85.000 85.000 86.000 86.000 86.000 86.000 87.000 87.000 87.000 87.000 88.000 88.000 88.000 88.000 89.000 89.000 89.000 89.000 90.000 90.000 89.000 89.000 **** 91.000 91.000 91.000 91.000 92.000 92.000 92.000 92.000 93.000 93.000 93.000 93.000 94.000 94.000 94.000 94.000 95.000 95.000 95.000 95.000 96.000 96.000 96.000 96.000 97.000 97.000 97.000 97.000 98.000 98.000 97.000 97.000 **** 99.000 99.000 99.000 99.000 100.000 100.000 100.000 100.000 101.000 101.000 101.000 101.000 102.000 102.000 102.000 102.000 103.000 103.000 103.000 103.000 104.000 104.000 104.000 104.000 105.000 105.000 105.000 105.000 106.000 106.000 105.000 105.000 **** 107.000 107.000 107.000 107.000 108.000 108.000 108.000 108.000 109.000 109.000 109.000 109.000 110.000 110.000 110.000 110.000 111.000 111.000 111.000 111.000 112.000 112.000 112.000 112.000 113.000 113.000 113.000 113.000 114.000 114.000 113.000 113.000 **** 115.000 115.000 115.000 115.000 116.000 116.000 116.000 116.000 117.000 117.000 117.000 117.000 118.000 118.000 118.000 118.000 119.000 119.000 119.000 119.000 120.000 120.000 120.000 120.000 121.000 121.000 121.000 121.000 122.000 122.000 121.000 121.000 **** 123.000 123.000 123.000 123.000 124.000 124.000 124.000 124.000 125.000 125.000 125.000 125.000 126.000 126.000 126.000 126.000 127.000 127.000 127.000 127.000 128.000 128.000 128.000 128.000 129.000 129.000 129.000 129.000 130.000 130.000 130.000 130.000 131.000 131.000 131.000 131.000 132.000 132.000 131.000 131.000 **** 133.000 133.000 133.000 133.000 134.000 134.000 134.000 134.000 135.000 135.000 135.000 135.000 136.000 136.000 136.000 136.000 137.000 137.000 137.000 137.000 138.000 138.000 138.000 138.000 139.000 139.000 139.000 139.000 140.000 140.000 140.000 140.000 141.000 141.000 141.000 141.000 142.000 142.000 142.000 142.000 143.000 143.000 143.000 143.000 144.000 144.000 144.000 144.000 145.000 145.000 145.000 145.000 146.000 146.000 146.000 146.000 147.000 147.000 147.000 147.000 148.000 148.000 147.000 147.000 **** 149.000 149.000 149.000 149.000 150.000 150.000 150.000 150.000 151.000 151.000 151.000 151.000 152.000 152.000 152.000 152.000 153.000 153.000 153.000 153.000 154.000 154.000 154.000 154.000 155.000 155.000 155.000 155.000 156.000 156.000 156.000 156.000 157.000 157.000 157.000 157.000 158.000 158.000 158.000 158.000 159.000 159.000 159.000 159.000 160.000 160.000 160.000 160.000 161.000 161.000 161.000 161.000 162.000 162.000 162.000 162.000 163.000 163.000 163.000 163.000 164.000 164.000 163.000 163.000 **** 165.000 165.000 165.000 165.000 166.000 166.000 166.000 166.000 167.000 167.000 167.000 167.000 168.000 168.000 168.000 168.000 169.000 169.000 169.000 169.000 170.000 170.000 170.000 170.000 171.000 171.000 171.000 171.000 172.000 172.000 172.000 172.000 173.000 173.000 173.000 173.000 174.000 174.000 174.000 174.000 175.000 175.000 175.000 175.000 176.000 176.000 176.000 176.000 177.000 177.000 177.000 177.000 178.000 178.000 178.000 178.000 179.000 179.000 179.000 179.000 180.000 180.000 179.000 179.000 **** 181.000 181.000 181.000 181.000 182.000 182.000 182.000 182.000 183.000 183.000 183.000 183.000 184.000 184.000 184.000 184.000 185.000 185.000 185.000 185.000 186.000 186.000 186.000 186.000 187.000 187.000 187.000 187.000 188.000 188.000 188.000 188.000 189.000 189.000 189.000 189.000 190.000 190.000 190.000 190.000 191.000 191.000 191.000 191.000 192.000 192.000 192.000 192.000 193.000 193.000 193.000 193.000 194.000 194.000 194.000 194.000 195.000 195.000 195.000 195.000 196.000 196.000 195.000 195.000 **** 197.000 197.000 197.000 197.000 198.000 198.000 198.000 198.000 199.000 199.000 199.000 199.000 200.000 200.000 200.000 200.000 201.000 201.000 201.000 201.000 202.000 202.000 202.000 202.000 203.000 203.000 203.000 203.000 204.000 204.000 204.000 204.000 205.000 205.000 205.000 205.000 206.000 206.000 206.000 206.000 207.000 207.000 207.000 207.000 208.000 208.000 208.000 208.000 209.000 209.000 209.000 209.000 210.000 210.000 210.000 210.000 211.000 211.000 211.000 211.000 212.000 212.000 211.000 211.000 **** 213.000 213.000 213.000 213.000 214.000 214.000 214.000 214.000 215.000 215.000 215.000 215.000 216.000 216.000 216.000 216.000 217.000 217.000 217.000 217.000 218.000 218.000 218.000 218.000 219.000 219.000 219.000 219.000 220.000 220.000 220.000 220.000 221.000 221.000 221.000 221.000 222.000 222.000 222.000 222.000 223.000 223.000 223.000 223.000 224.000 224.000 224.000 224.000 225.000 225.000 225.000 225.000 226.000 226.000 226.000 226.000 227.000 227.000 227.000 227.000 228.000 228.000 227.000 227.000 **** 229.000 229.000 229.000 229.000 230.000 230.000 230.000 230.000 231.000 231.000 231.000 231.000 232.000 232.000 232.000 232.000 233.000 233.000 233.000 233.000 234.000 234.000 234.000 234.000 235.000 235.000 235.000 235.000 236.000 236.000 236.000 236.000 237.000 237.000 237.000 237.000 238.000 238.000 238.000 238.000 239.000 239.000 239.000 239.000 240.000 240.000 240.000 240.000 241.000 241.000 241.000 241.000 242.000 242.000 242.000 242.000 243.000 243.000 243.000 243.000 244.000 244.000 243.000 243.000 **** 245.000 245.000 245.000 245.000 246.000 246.000 246.000 246.000 247.000 247.000 247.000 247.000 248.000 248.000 248.000 248.000 249.000 249.000 249.000 249.000 250.000 250.000 250.000 250.000 251.000 251.000 251.000 251.000 252.000 252.000 252.000 252.000 253.000 253.000 253.000 253.000 254.000 254.000 254.000 254.000 255.000 255.000 255.000 255.000 test_array cm.gray() tiff_pil_load tiff_imread_load ---------- --------- ------------- ---------------- 0.000 0.000 0.000 0.000 1.000 1.000 1.000 1.000 2.000 2.000 2.000 2.000 3.000 3.000 3.000 3.000 4.000 4.000 4.000 4.000 5.000 5.000 5.000 5.000 6.000 6.000 6.000 6.000 7.000 7.000 7.000 7.000 8.000 8.000 8.000 8.000 9.000 9.000 9.000 9.000 10.000 10.000 10.000 10.000 11.000 11.000 11.000 11.000 12.000 12.000 12.000 12.000 13.000 13.000 13.000 13.000 14.000 14.000 14.000 14.000 15.000 15.000 15.000 15.000 16.000 16.000 16.000 16.000 17.000 17.000 17.000 17.000 18.000 18.000 18.000 18.000 19.000 19.000 19.000 19.000 20.000 20.000 20.000 20.000 21.000 21.000 21.000 21.000 22.000 22.000 22.000 22.000 23.000 23.000 23.000 23.000 24.000 24.000 24.000 24.000 25.000 25.000 25.000 25.000 26.000 26.000 26.000 26.000 27.000 27.000 27.000 27.000 28.000 28.000 28.000 28.000 29.000 29.000 29.000 29.000 30.000 30.000 30.000 30.000 31.000 31.000 31.000 31.000 32.000 32.000 32.000 32.000 33.000 33.000 32.000 32.000 **** 34.000 34.000 34.000 34.000 35.000 35.000 35.000 35.000 36.000 36.000 36.000 36.000 37.000 37.000 36.000 36.000 **** 38.000 38.000 38.000 38.000 39.000 39.000 39.000 39.000 40.000 40.000 40.000 40.000 41.000 41.000 40.000 40.000 **** 42.000 42.000 42.000 42.000 43.000 43.000 43.000 43.000 44.000 44.000 44.000 44.000 45.000 45.000 44.000 44.000 **** 46.000 46.000 46.000 46.000 47.000 47.000 47.000 47.000 48.000 48.000 48.000 48.000 49.000 49.000 48.000 48.000 **** 50.000 50.000 50.000 50.000 51.000 51.000 51.000 51.000 52.000 52.000 52.000 52.000 53.000 53.000 52.000 52.000 **** 54.000 54.000 54.000 54.000 55.000 55.000 55.000 55.000 56.000 56.000 56.000 56.000 57.000 57.000 56.000 56.000 **** 58.000 58.000 58.000 58.000 59.000 59.000 59.000 59.000 60.000 60.000 60.000 60.000 61.000 61.000 60.000 60.000 **** 62.000 62.000 62.000 62.000 63.000 63.000 63.000 63.000 64.000 64.000 64.000 64.000 65.000 65.000 65.000 65.000 66.000 66.000 65.000 65.000 **** 67.000 67.000 67.000 67.000 68.000 68.000 68.000 68.000 69.000 69.000 69.000 69.000 70.000 70.000 70.000 70.000 71.000 71.000 71.000 71.000 72.000 72.000 72.000 72.000 73.000 73.000 73.000 73.000 74.000 74.000 73.000 73.000 **** 75.000 75.000 75.000 75.000 76.000 76.000 76.000 76.000 77.000 77.000 77.000 77.000 78.000 78.000 78.000 78.000 79.000 79.000 79.000 79.000 80.000 80.000 80.000 80.000 81.000 81.000 81.000 81.000 82.000 82.000 81.000 81.000 **** 83.000 83.000 83.000 83.000 84.000 84.000 84.000 84.000 85.000 85.000 85.000 85.000 86.000 86.000 86.000 86.000 87.000 87.000 87.000 87.000 88.000 88.000 88.000 88.000 89.000 89.000 89.000 89.000 90.000 90.000 89.000 89.000 **** 91.000 91.000 91.000 91.000 92.000 92.000 92.000 92.000 93.000 93.000 93.000 93.000 94.000 94.000 94.000 94.000 95.000 95.000 95.000 95.000 96.000 96.000 96.000 96.000 97.000 97.000 97.000 97.000 98.000 98.000 97.000 97.000 **** 99.000 99.000 99.000 99.000 100.000 100.000 100.000 100.000 101.000 101.000 101.000 101.000 102.000 102.000 102.000 102.000 103.000 103.000 103.000 103.000 104.000 104.000 104.000 104.000 105.000 105.000 105.000 105.000 106.000 106.000 105.000 105.000 **** 107.000 107.000 107.000 107.000 108.000 108.000 108.000 108.000 109.000 109.000 109.000 109.000 110.000 110.000 110.000 110.000 111.000 111.000 111.000 111.000 112.000 112.000 112.000 112.000 113.000 113.000 113.000 113.000 114.000 114.000 113.000 113.000 **** 115.000 115.000 115.000 115.000 116.000 116.000 116.000 116.000 117.000 117.000 117.000 117.000 118.000 118.000 118.000 118.000 119.000 119.000 119.000 119.000 120.000 120.000 120.000 120.000 121.000 121.000 121.000 121.000 122.000 122.000 121.000 121.000 **** 123.000 123.000 123.000 123.000 124.000 124.000 124.000 124.000 125.000 125.000 125.000 125.000 126.000 126.000 126.000 126.000 127.000 127.000 127.000 127.000 128.000 128.000 128.000 128.000 129.000 129.000 129.000 129.000 130.000 130.000 130.000 130.000 131.000 131.000 131.000 131.000 132.000 132.000 131.000 131.000 **** 133.000 133.000 133.000 133.000 134.000 134.000 134.000 134.000 135.000 135.000 135.000 135.000 136.000 136.000 136.000 136.000 137.000 137.000 137.000 137.000 138.000 138.000 138.000 138.000 139.000 139.000 139.000 139.000 140.000 140.000 140.000 140.000 141.000 141.000 141.000 141.000 142.000 142.000 142.000 142.000 143.000 143.000 143.000 143.000 144.000 144.000 144.000 144.000 145.000 145.000 145.000 145.000 146.000 146.000 146.000 146.000 147.000 147.000 147.000 147.000 148.000 148.000 147.000 147.000 **** 149.000 149.000 149.000 149.000 150.000 150.000 150.000 150.000 151.000 151.000 151.000 151.000 152.000 152.000 152.000 152.000 153.000 153.000 153.000 153.000 154.000 154.000 154.000 154.000 155.000 155.000 155.000 155.000 156.000 156.000 156.000 156.000 157.000 157.000 157.000 157.000 158.000 158.000 158.000 158.000 159.000 159.000 159.000 159.000 160.000 160.000 160.000 160.000 161.000 161.000 161.000 161.000 162.000 162.000 162.000 162.000 163.000 163.000 163.000 163.000 164.000 164.000 163.000 163.000 **** 165.000 165.000 165.000 165.000 166.000 166.000 166.000 166.000 167.000 167.000 167.000 167.000 168.000 168.000 168.000 168.000 169.000 169.000 169.000 169.000 170.000 170.000 170.000 170.000 171.000 171.000 171.000 171.000 172.000 172.000 172.000 172.000 173.000 173.000 173.000 173.000 174.000 174.000 174.000 174.000 175.000 175.000 175.000 175.000 176.000 176.000 176.000 176.000 177.000 177.000 177.000 177.000 178.000 178.000 178.000 178.000 179.000 179.000 179.000 179.000 180.000 180.000 179.000 179.000 **** 181.000 181.000 181.000 181.000 182.000 182.000 182.000 182.000 183.000 183.000 183.000 183.000 184.000 184.000 184.000 184.000 185.000 185.000 185.000 185.000 186.000 186.000 186.000 186.000 187.000 187.000 187.000 187.000 188.000 188.000 188.000 188.000 189.000 189.000 189.000 189.000 190.000 190.000 190.000 190.000 191.000 191.000 191.000 191.000 192.000 192.000 192.000 192.000 193.000 193.000 193.000 193.000 194.000 194.000 194.000 194.000 195.000 195.000 195.000 195.000 196.000 196.000 195.000 195.000 **** 197.000 197.000 197.000 197.000 198.000 198.000 198.000 198.000 199.000 199.000 199.000 199.000 200.000 200.000 200.000 200.000 201.000 201.000 201.000 201.000 202.000 202.000 202.000 202.000 203.000 203.000 203.000 203.000 204.000 204.000 204.000 204.000 205.000 205.000 205.000 205.000 206.000 206.000 206.000 206.000 207.000 207.000 207.000 207.000 208.000 208.000 208.000 208.000 209.000 209.000 209.000 209.000 210.000 210.000 210.000 210.000 211.000 211.000 211.000 211.000 212.000 212.000 211.000 211.000 **** 213.000 213.000 213.000 213.000 214.000 214.000 214.000 214.000 215.000 215.000 215.000 215.000 216.000 216.000 216.000 216.000 217.000 217.000 217.000 217.000 218.000 218.000 218.000 218.000 219.000 219.000 219.000 219.000 220.000 220.000 220.000 220.000 221.000 221.000 221.000 221.000 222.000 222.000 222.000 222.000 223.000 223.000 223.000 223.000 224.000 224.000 224.000 224.000 225.000 225.000 225.000 225.000 226.000 226.000 226.000 226.000 227.000 227.000 227.000 227.000 228.000 228.000 227.000 227.000 **** 229.000 229.000 229.000 229.000 230.000 230.000 230.000 230.000 231.000 231.000 231.000 231.000 232.000 232.000 232.000 232.000 233.000 233.000 233.000 233.000 234.000 234.000 234.000 234.000 235.000 235.000 235.000 235.000 236.000 236.000 236.000 236.000 237.000 237.000 237.000 237.000 238.000 238.000 238.000 238.000 239.000 239.000 239.000 239.000 240.000 240.000 240.000 240.000 241.000 241.000 241.000 241.000 242.000 242.000 242.000 242.000 243.000 243.000 243.000 243.000 244.000 244.000 243.000 243.000 **** 245.000 245.000 245.000 245.000 246.000 246.000 246.000 246.000 247.000 247.000 247.000 247.000 248.000 248.000 248.000 248.000 249.000 249.000 249.000 249.000 250.000 250.000 250.000 250.000 251.000 251.000 251.000 251.000 252.000 252.000 252.000 252.000 253.000 253.000 253.000 253.000 254.000 254.000 254.000 254.000 255.000 255.000 255.000 255.000"><pre class="notranslate"><code class="notranslate">test_array cm.gray() png_pil_load png_imread_load ---------- --------- ------------ --------------- 0.000 0.000 0.000 0.000 1.000 1.000 1.000 1.000 2.000 2.000 2.000 2.000 3.000 3.000 3.000 3.000 4.000 4.000 4.000 4.000 5.000 5.000 5.000 5.000 6.000 6.000 6.000 6.000 7.000 7.000 7.000 7.000 8.000 8.000 8.000 8.000 9.000 9.000 9.000 9.000 10.000 10.000 10.000 10.000 11.000 11.000 11.000 11.000 12.000 12.000 12.000 12.000 13.000 13.000 13.000 13.000 14.000 14.000 14.000 14.000 15.000 15.000 15.000 15.000 16.000 16.000 16.000 16.000 17.000 17.000 17.000 17.000 18.000 18.000 18.000 18.000 19.000 19.000 19.000 19.000 20.000 20.000 20.000 20.000 21.000 21.000 21.000 21.000 22.000 22.000 22.000 22.000 23.000 23.000 23.000 23.000 24.000 24.000 24.000 24.000 25.000 25.000 25.000 25.000 26.000 26.000 26.000 26.000 27.000 27.000 27.000 27.000 28.000 28.000 28.000 28.000 29.000 29.000 29.000 29.000 30.000 30.000 30.000 30.000 31.000 31.000 31.000 31.000 32.000 32.000 32.000 32.000 33.000 33.000 32.000 32.000 **** 34.000 34.000 34.000 34.000 35.000 35.000 35.000 35.000 36.000 36.000 36.000 36.000 37.000 37.000 36.000 36.000 **** 38.000 38.000 38.000 38.000 39.000 39.000 39.000 39.000 40.000 40.000 40.000 40.000 41.000 41.000 40.000 40.000 **** 42.000 42.000 42.000 42.000 43.000 43.000 43.000 43.000 44.000 44.000 44.000 44.000 45.000 45.000 44.000 44.000 **** 46.000 46.000 46.000 46.000 47.000 47.000 47.000 47.000 48.000 48.000 48.000 48.000 49.000 49.000 48.000 48.000 **** 50.000 50.000 50.000 50.000 51.000 51.000 51.000 51.000 52.000 52.000 52.000 52.000 53.000 53.000 52.000 52.000 **** 54.000 54.000 54.000 54.000 55.000 55.000 55.000 55.000 56.000 56.000 56.000 56.000 57.000 57.000 56.000 56.000 **** 58.000 58.000 58.000 58.000 59.000 59.000 59.000 59.000 60.000 60.000 60.000 60.000 61.000 61.000 60.000 60.000 **** 62.000 62.000 62.000 62.000 63.000 63.000 63.000 63.000 64.000 64.000 64.000 64.000 65.000 65.000 65.000 65.000 66.000 66.000 65.000 65.000 **** 67.000 67.000 67.000 67.000 68.000 68.000 68.000 68.000 69.000 69.000 69.000 69.000 70.000 70.000 70.000 70.000 71.000 71.000 71.000 71.000 72.000 72.000 72.000 72.000 73.000 73.000 73.000 73.000 74.000 74.000 73.000 73.000 **** 75.000 75.000 75.000 75.000 76.000 76.000 76.000 76.000 77.000 77.000 77.000 77.000 78.000 78.000 78.000 78.000 79.000 79.000 79.000 79.000 80.000 80.000 80.000 80.000 81.000 81.000 81.000 81.000 82.000 82.000 81.000 81.000 **** 83.000 83.000 83.000 83.000 84.000 84.000 84.000 84.000 85.000 85.000 85.000 85.000 86.000 86.000 86.000 86.000 87.000 87.000 87.000 87.000 88.000 88.000 88.000 88.000 89.000 89.000 89.000 89.000 90.000 90.000 89.000 89.000 **** 91.000 91.000 91.000 91.000 92.000 92.000 92.000 92.000 93.000 93.000 93.000 93.000 94.000 94.000 94.000 94.000 95.000 95.000 95.000 95.000 96.000 96.000 96.000 96.000 97.000 97.000 97.000 97.000 98.000 98.000 97.000 97.000 **** 99.000 99.000 99.000 99.000 100.000 100.000 100.000 100.000 101.000 101.000 101.000 101.000 102.000 102.000 102.000 102.000 103.000 103.000 103.000 103.000 104.000 104.000 104.000 104.000 105.000 105.000 105.000 105.000 106.000 106.000 105.000 105.000 **** 107.000 107.000 107.000 107.000 108.000 108.000 108.000 108.000 109.000 109.000 109.000 109.000 110.000 110.000 110.000 110.000 111.000 111.000 111.000 111.000 112.000 112.000 112.000 112.000 113.000 113.000 113.000 113.000 114.000 114.000 113.000 113.000 **** 115.000 115.000 115.000 115.000 116.000 116.000 116.000 116.000 117.000 117.000 117.000 117.000 118.000 118.000 118.000 118.000 119.000 119.000 119.000 119.000 120.000 120.000 120.000 120.000 121.000 121.000 121.000 121.000 122.000 122.000 121.000 121.000 **** 123.000 123.000 123.000 123.000 124.000 124.000 124.000 124.000 125.000 125.000 125.000 125.000 126.000 126.000 126.000 126.000 127.000 127.000 127.000 127.000 128.000 128.000 128.000 128.000 129.000 129.000 129.000 129.000 130.000 130.000 130.000 130.000 131.000 131.000 131.000 131.000 132.000 132.000 131.000 131.000 **** 133.000 133.000 133.000 133.000 134.000 134.000 134.000 134.000 135.000 135.000 135.000 135.000 136.000 136.000 136.000 136.000 137.000 137.000 137.000 137.000 138.000 138.000 138.000 138.000 139.000 139.000 139.000 139.000 140.000 140.000 140.000 140.000 141.000 141.000 141.000 141.000 142.000 142.000 142.000 142.000 143.000 143.000 143.000 143.000 144.000 144.000 144.000 144.000 145.000 145.000 145.000 145.000 146.000 146.000 146.000 146.000 147.000 147.000 147.000 147.000 148.000 148.000 147.000 147.000 **** 149.000 149.000 149.000 149.000 150.000 150.000 150.000 150.000 151.000 151.000 151.000 151.000 152.000 152.000 152.000 152.000 153.000 153.000 153.000 153.000 154.000 154.000 154.000 154.000 155.000 155.000 155.000 155.000 156.000 156.000 156.000 156.000 157.000 157.000 157.000 157.000 158.000 158.000 158.000 158.000 159.000 159.000 159.000 159.000 160.000 160.000 160.000 160.000 161.000 161.000 161.000 161.000 162.000 162.000 162.000 162.000 163.000 163.000 163.000 163.000 164.000 164.000 163.000 163.000 **** 165.000 165.000 165.000 165.000 166.000 166.000 166.000 166.000 167.000 167.000 167.000 167.000 168.000 168.000 168.000 168.000 169.000 169.000 169.000 169.000 170.000 170.000 170.000 170.000 171.000 171.000 171.000 171.000 172.000 172.000 172.000 172.000 173.000 173.000 173.000 173.000 174.000 174.000 174.000 174.000 175.000 175.000 175.000 175.000 176.000 176.000 176.000 176.000 177.000 177.000 177.000 177.000 178.000 178.000 178.000 178.000 179.000 179.000 179.000 179.000 180.000 180.000 179.000 179.000 **** 181.000 181.000 181.000 181.000 182.000 182.000 182.000 182.000 183.000 183.000 183.000 183.000 184.000 184.000 184.000 184.000 185.000 185.000 185.000 185.000 186.000 186.000 186.000 186.000 187.000 187.000 187.000 187.000 188.000 188.000 188.000 188.000 189.000 189.000 189.000 189.000 190.000 190.000 190.000 190.000 191.000 191.000 191.000 191.000 192.000 192.000 192.000 192.000 193.000 193.000 193.000 193.000 194.000 194.000 194.000 194.000 195.000 195.000 195.000 195.000 196.000 196.000 195.000 195.000 **** 197.000 197.000 197.000 197.000 198.000 198.000 198.000 198.000 199.000 199.000 199.000 199.000 200.000 200.000 200.000 200.000 201.000 201.000 201.000 201.000 202.000 202.000 202.000 202.000 203.000 203.000 203.000 203.000 204.000 204.000 204.000 204.000 205.000 205.000 205.000 205.000 206.000 206.000 206.000 206.000 207.000 207.000 207.000 207.000 208.000 208.000 208.000 208.000 209.000 209.000 209.000 209.000 210.000 210.000 210.000 210.000 211.000 211.000 211.000 211.000 212.000 212.000 211.000 211.000 **** 213.000 213.000 213.000 213.000 214.000 214.000 214.000 214.000 215.000 215.000 215.000 215.000 216.000 216.000 216.000 216.000 217.000 217.000 217.000 217.000 218.000 218.000 218.000 218.000 219.000 219.000 219.000 219.000 220.000 220.000 220.000 220.000 221.000 221.000 221.000 221.000 222.000 222.000 222.000 222.000 223.000 223.000 223.000 223.000 224.000 224.000 224.000 224.000 225.000 225.000 225.000 225.000 226.000 226.000 226.000 226.000 227.000 227.000 227.000 227.000 228.000 228.000 227.000 227.000 **** 229.000 229.000 229.000 229.000 230.000 230.000 230.000 230.000 231.000 231.000 231.000 231.000 232.000 232.000 232.000 232.000 233.000 233.000 233.000 233.000 234.000 234.000 234.000 234.000 235.000 235.000 235.000 235.000 236.000 236.000 236.000 236.000 237.000 237.000 237.000 237.000 238.000 238.000 238.000 238.000 239.000 239.000 239.000 239.000 240.000 240.000 240.000 240.000 241.000 241.000 241.000 241.000 242.000 242.000 242.000 242.000 243.000 243.000 243.000 243.000 244.000 244.000 243.000 243.000 **** 245.000 245.000 245.000 245.000 246.000 246.000 246.000 246.000 247.000 247.000 247.000 247.000 248.000 248.000 248.000 248.000 249.000 249.000 249.000 249.000 250.000 250.000 250.000 250.000 251.000 251.000 251.000 251.000 252.000 252.000 252.000 252.000 253.000 253.000 253.000 253.000 254.000 254.000 254.000 254.000 255.000 255.000 255.000 255.000 test_array cm.gray() tiff_pil_load tiff_imread_load ---------- --------- ------------- ---------------- 0.000 0.000 0.000 0.000 1.000 1.000 1.000 1.000 2.000 2.000 2.000 2.000 3.000 3.000 3.000 3.000 4.000 4.000 4.000 4.000 5.000 5.000 5.000 5.000 6.000 6.000 6.000 6.000 7.000 7.000 7.000 7.000 8.000 8.000 8.000 8.000 9.000 9.000 9.000 9.000 10.000 10.000 10.000 10.000 11.000 11.000 11.000 11.000 12.000 12.000 12.000 12.000 13.000 13.000 13.000 13.000 14.000 14.000 14.000 14.000 15.000 15.000 15.000 15.000 16.000 16.000 16.000 16.000 17.000 17.000 17.000 17.000 18.000 18.000 18.000 18.000 19.000 19.000 19.000 19.000 20.000 20.000 20.000 20.000 21.000 21.000 21.000 21.000 22.000 22.000 22.000 22.000 23.000 23.000 23.000 23.000 24.000 24.000 24.000 24.000 25.000 25.000 25.000 25.000 26.000 26.000 26.000 26.000 27.000 27.000 27.000 27.000 28.000 28.000 28.000 28.000 29.000 29.000 29.000 29.000 30.000 30.000 30.000 30.000 31.000 31.000 31.000 31.000 32.000 32.000 32.000 32.000 33.000 33.000 32.000 32.000 **** 34.000 34.000 34.000 34.000 35.000 35.000 35.000 35.000 36.000 36.000 36.000 36.000 37.000 37.000 36.000 36.000 **** 38.000 38.000 38.000 38.000 39.000 39.000 39.000 39.000 40.000 40.000 40.000 40.000 41.000 41.000 40.000 40.000 **** 42.000 42.000 42.000 42.000 43.000 43.000 43.000 43.000 44.000 44.000 44.000 44.000 45.000 45.000 44.000 44.000 **** 46.000 46.000 46.000 46.000 47.000 47.000 47.000 47.000 48.000 48.000 48.000 48.000 49.000 49.000 48.000 48.000 **** 50.000 50.000 50.000 50.000 51.000 51.000 51.000 51.000 52.000 52.000 52.000 52.000 53.000 53.000 52.000 52.000 **** 54.000 54.000 54.000 54.000 55.000 55.000 55.000 55.000 56.000 56.000 56.000 56.000 57.000 57.000 56.000 56.000 **** 58.000 58.000 58.000 58.000 59.000 59.000 59.000 59.000 60.000 60.000 60.000 60.000 61.000 61.000 60.000 60.000 **** 62.000 62.000 62.000 62.000 63.000 63.000 63.000 63.000 64.000 64.000 64.000 64.000 65.000 65.000 65.000 65.000 66.000 66.000 65.000 65.000 **** 67.000 67.000 67.000 67.000 68.000 68.000 68.000 68.000 69.000 69.000 69.000 69.000 70.000 70.000 70.000 70.000 71.000 71.000 71.000 71.000 72.000 72.000 72.000 72.000 73.000 73.000 73.000 73.000 74.000 74.000 73.000 73.000 **** 75.000 75.000 75.000 75.000 76.000 76.000 76.000 76.000 77.000 77.000 77.000 77.000 78.000 78.000 78.000 78.000 79.000 79.000 79.000 79.000 80.000 80.000 80.000 80.000 81.000 81.000 81.000 81.000 82.000 82.000 81.000 81.000 **** 83.000 83.000 83.000 83.000 84.000 84.000 84.000 84.000 85.000 85.000 85.000 85.000 86.000 86.000 86.000 86.000 87.000 87.000 87.000 87.000 88.000 88.000 88.000 88.000 89.000 89.000 89.000 89.000 90.000 90.000 89.000 89.000 **** 91.000 91.000 91.000 91.000 92.000 92.000 92.000 92.000 93.000 93.000 93.000 93.000 94.000 94.000 94.000 94.000 95.000 95.000 95.000 95.000 96.000 96.000 96.000 96.000 97.000 97.000 97.000 97.000 98.000 98.000 97.000 97.000 **** 99.000 99.000 99.000 99.000 100.000 100.000 100.000 100.000 101.000 101.000 101.000 101.000 102.000 102.000 102.000 102.000 103.000 103.000 103.000 103.000 104.000 104.000 104.000 104.000 105.000 105.000 105.000 105.000 106.000 106.000 105.000 105.000 **** 107.000 107.000 107.000 107.000 108.000 108.000 108.000 108.000 109.000 109.000 109.000 109.000 110.000 110.000 110.000 110.000 111.000 111.000 111.000 111.000 112.000 112.000 112.000 112.000 113.000 113.000 113.000 113.000 114.000 114.000 113.000 113.000 **** 115.000 115.000 115.000 115.000 116.000 116.000 116.000 116.000 117.000 117.000 117.000 117.000 118.000 118.000 118.000 118.000 119.000 119.000 119.000 119.000 120.000 120.000 120.000 120.000 121.000 121.000 121.000 121.000 122.000 122.000 121.000 121.000 **** 123.000 123.000 123.000 123.000 124.000 124.000 124.000 124.000 125.000 125.000 125.000 125.000 126.000 126.000 126.000 126.000 127.000 127.000 127.000 127.000 128.000 128.000 128.000 128.000 129.000 129.000 129.000 129.000 130.000 130.000 130.000 130.000 131.000 131.000 131.000 131.000 132.000 132.000 131.000 131.000 **** 133.000 133.000 133.000 133.000 134.000 134.000 134.000 134.000 135.000 135.000 135.000 135.000 136.000 136.000 136.000 136.000 137.000 137.000 137.000 137.000 138.000 138.000 138.000 138.000 139.000 139.000 139.000 139.000 140.000 140.000 140.000 140.000 141.000 141.000 141.000 141.000 142.000 142.000 142.000 142.000 143.000 143.000 143.000 143.000 144.000 144.000 144.000 144.000 145.000 145.000 145.000 145.000 146.000 146.000 146.000 146.000 147.000 147.000 147.000 147.000 148.000 148.000 147.000 147.000 **** 149.000 149.000 149.000 149.000 150.000 150.000 150.000 150.000 151.000 151.000 151.000 151.000 152.000 152.000 152.000 152.000 153.000 153.000 153.000 153.000 154.000 154.000 154.000 154.000 155.000 155.000 155.000 155.000 156.000 156.000 156.000 156.000 157.000 157.000 157.000 157.000 158.000 158.000 158.000 158.000 159.000 159.000 159.000 159.000 160.000 160.000 160.000 160.000 161.000 161.000 161.000 161.000 162.000 162.000 162.000 162.000 163.000 163.000 163.000 163.000 164.000 164.000 163.000 163.000 **** 165.000 165.000 165.000 165.000 166.000 166.000 166.000 166.000 167.000 167.000 167.000 167.000 168.000 168.000 168.000 168.000 169.000 169.000 169.000 169.000 170.000 170.000 170.000 170.000 171.000 171.000 171.000 171.000 172.000 172.000 172.000 172.000 173.000 173.000 173.000 173.000 174.000 174.000 174.000 174.000 175.000 175.000 175.000 175.000 176.000 176.000 176.000 176.000 177.000 177.000 177.000 177.000 178.000 178.000 178.000 178.000 179.000 179.000 179.000 179.000 180.000 180.000 179.000 179.000 **** 181.000 181.000 181.000 181.000 182.000 182.000 182.000 182.000 183.000 183.000 183.000 183.000 184.000 184.000 184.000 184.000 185.000 185.000 185.000 185.000 186.000 186.000 186.000 186.000 187.000 187.000 187.000 187.000 188.000 188.000 188.000 188.000 189.000 189.000 189.000 189.000 190.000 190.000 190.000 190.000 191.000 191.000 191.000 191.000 192.000 192.000 192.000 192.000 193.000 193.000 193.000 193.000 194.000 194.000 194.000 194.000 195.000 195.000 195.000 195.000 196.000 196.000 195.000 195.000 **** 197.000 197.000 197.000 197.000 198.000 198.000 198.000 198.000 199.000 199.000 199.000 199.000 200.000 200.000 200.000 200.000 201.000 201.000 201.000 201.000 202.000 202.000 202.000 202.000 203.000 203.000 203.000 203.000 204.000 204.000 204.000 204.000 205.000 205.000 205.000 205.000 206.000 206.000 206.000 206.000 207.000 207.000 207.000 207.000 208.000 208.000 208.000 208.000 209.000 209.000 209.000 209.000 210.000 210.000 210.000 210.000 211.000 211.000 211.000 211.000 212.000 212.000 211.000 211.000 **** 213.000 213.000 213.000 213.000 214.000 214.000 214.000 214.000 215.000 215.000 215.000 215.000 216.000 216.000 216.000 216.000 217.000 217.000 217.000 217.000 218.000 218.000 218.000 218.000 219.000 219.000 219.000 219.000 220.000 220.000 220.000 220.000 221.000 221.000 221.000 221.000 222.000 222.000 222.000 222.000 223.000 223.000 223.000 223.000 224.000 224.000 224.000 224.000 225.000 225.000 225.000 225.000 226.000 226.000 226.000 226.000 227.000 227.000 227.000 227.000 228.000 228.000 227.000 227.000 **** 229.000 229.000 229.000 229.000 230.000 230.000 230.000 230.000 231.000 231.000 231.000 231.000 232.000 232.000 232.000 232.000 233.000 233.000 233.000 233.000 234.000 234.000 234.000 234.000 235.000 235.000 235.000 235.000 236.000 236.000 236.000 236.000 237.000 237.000 237.000 237.000 238.000 238.000 238.000 238.000 239.000 239.000 239.000 239.000 240.000 240.000 240.000 240.000 241.000 241.000 241.000 241.000 242.000 242.000 242.000 242.000 243.000 243.000 243.000 243.000 244.000 244.000 243.000 243.000 **** 245.000 245.000 245.000 245.000 246.000 246.000 246.000 246.000 247.000 247.000 247.000 247.000 248.000 248.000 248.000 248.000 249.000 249.000 249.000 249.000 250.000 250.000 250.000 250.000 251.000 251.000 251.000 251.000 252.000 252.000 252.000 252.000 253.000 253.000 253.000 253.000 254.000 254.000 254.000 254.000 255.000 255.000 255.000 255.000 </code></pre></div> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto">In the console output, lines with asterisks '****' indicate lines where the image read-back shows image has wrong value. This happens with both an imsave'd png or tiff output image. Image read-back is verified by reading back using two different packages (Pillow and maptlotlib) to eliminate the possibility of the image read being the issue.</p> <p dir="auto">In the code output I'm only comparing the 'R' byte of the RGBA data, because the other bytes appear to be consistent, i.e. R=G=B and A=255.</p> <p dir="auto">From the console output you can see:</p> <ul dir="auto"> <li>colormap always outputs the correct values based on the input array and 'gray' colormap</li> <li>image read back using imread shows some wrong values were saved</li> <li>image read back using PIL getdata() shows the same wrong values</li> </ul> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating system: <ul dir="auto"> <li>macOS 10.13.6</li> <li>Windows 10</li> </ul> </li> <li>Matplotlib version: <ul dir="auto"> <li>2.2.3 (macOS 10.13.6)</li> <li>2.2.3 (Windows 10)</li> </ul> </li> <li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): and <ul dir="auto"> <li>'MacOSX' (macOS 10.13.6)</li> <li>'TkAgg' (Windows 10)</li> </ul> </li> <li>Python version: <ul dir="auto"> <li>3.7.0 (macOS 10.13.6)</li> <li>3.6.6 (Windows 10)</li> </ul> </li> <li>Jupyter version (if applicable): N/A</li> <li>Other libraries: <ul dir="auto"> <li>Pillow 5.2.0 (macOS 10.13.6)</li> <li>Pillow 5.2.0 (Windows 10)</li> </ul> </li> </ul> <ul dir="auto"> <li>matplotlib was installed on macOS using pip3 install into a homebrew python</li> <li>matplotlib was installed on Win10 using pip3 install --user</li> </ul>
0
<h3 dir="auto">Version</h3> <p dir="auto">2.6.10</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://codepen.io/meekohi/pen/jjgezj" rel="nofollow">https://codepen.io/meekohi/pen/jjgezj</a></p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">Use <code class="notranslate">@click.prevent=</code> along with a <code class="notranslate">:checked='booleanComponentProp'</code> on a checkbox. Clicking the checkbox correctly updates all data, but the checkbox visually remains in whatever the original state was.</p> <h3 dir="auto">What is expected?</h3> <p dir="auto">Checkbox should update based on the <code class="notranslate">:checked</code> property.</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">Checkbox does not update.</p> <hr> <p dir="auto">This bug did not exist in Vue 2.5.22 -- it seems like Vue 2.6 started relying on the native <code class="notranslate">click</code> event to change the state of the box for the simple case, but if the underlying property changes via some other mechanism (for example a prop updating) then the checkbox visual appearance gets out of sync with the underlying data.</p>
<h3 dir="auto">Version</h3> <p dir="auto">2.6.6</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://jsfiddle.net/s4ub8dnc/3/" rel="nofollow">https://jsfiddle.net/s4ub8dnc/3/</a></p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">I have a checkbox which needs to get it's checked state from a VueX store, but I also need to be able to determine whether or not shift was being held when the checkbox was clicked. To do this I'm using <code class="notranslate">@click.prevent</code> on the checkbox (so that I have the event being passed to the method) and then using <code class="notranslate">v-model</code> to determine the checked state.</p> <p dir="auto">However, regardless of whether or not the <code class="notranslate">v-model</code> value is true or false, the checkbox never gains the checked state if the click is prevented. It seems that there is still a reliance on the click event in order to set the state.</p> <h3 dir="auto">What is expected?</h3> <p dir="auto">I would expect the checkbox to be checked if the <code class="notranslate">v-model</code> value is set to <code class="notranslate">true</code>, regardless of how the checkbox arrived at that state - by something else setting it to true, or by the click handler setting it.</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">The click binding having <code class="notranslate">.prevent</code> on it stops the checkbox from receiving it's checked state, even when the <code class="notranslate">v-model</code> value is true</p> <hr> <p dir="auto">The reason why I haven't just used a setter in the computed is because the setter doesn't get given the click event, so I can determine whether or not shift was being held at the point of clicking the checkbox.</p>
1
<h3 dir="auto">Apache Airflow version</h3> <p dir="auto">2.5.0</p> <h3 dir="auto">What happened</h3> <p dir="auto">A user with access to manually triggering DAGs can trigger a DAG. provide a run_id that matches the pattern used when creating scheduled runs and cause the scheduler to crash due to database unique key violation:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2022-12-12 12:58:00,793] {scheduler_job.py:776} ERROR - Exception when executing SchedulerJob._run_scheduler_loop Traceback (most recent call last): File &quot;/usr/local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py&quot;, line 759, in _execute self._run_scheduler_loop() File &quot;/usr/local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py&quot;, line 885, in _run_scheduler_loop num_queued_tis = self._do_scheduling(session) File &quot;/usr/local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py&quot;, line 956, in _do_scheduling self._create_dagruns_for_dags(guard, session) File &quot;/usr/local/lib/python3.8/site-packages/airflow/utils/retries.py&quot;, line 78, in wrapped_function for attempt in run_with_db_retries(max_retries=retries, logger=logger, **retry_kwargs): File &quot;/usr/local/lib/python3.8/site-packages/tenacity/__init__.py&quot;, line 384, in __iter__ do = self.iter(retry_state=retry_state) File &quot;/usr/local/lib/python3.8/site-packages/tenacity/__init__.py&quot;, line 351, in iter return fut.result() File &quot;/usr/local/lib/python3.8/concurrent/futures/_base.py&quot;, line 437, in result return self.__get_result() File &quot;/usr/local/lib/python3.8/concurrent/futures/_base.py&quot;, line 389, in __get_result raise self._exception File &quot;/usr/local/lib/python3.8/site-packages/airflow/utils/retries.py&quot;, line 87, in wrapped_function return func(*args, **kwargs) File &quot;/usr/local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py&quot;, line 1018, in _create_dagruns_for_dags query, dataset_triggered_dag_info = DagModel.dags_needing_dagruns(session) File &quot;/usr/local/lib/python3.8/site-packages/airflow/models/dag.py&quot;, line 3341, in dags_needing_dagruns for x in session.query( File &quot;/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py&quot;, line 2773, in all return self._iter().all() File &quot;/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py&quot;, line 2916, in _iter result = self.session.execute( File &quot;/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 1713, in execute conn = self._connection_for_bind(bind) File &quot;/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 1552, in _connection_for_bind return self._transaction._connection_for_bind( File &quot;/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 721, in _connection_for_bind self._assert_active() File &quot;/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 601, in _assert_active raise sa_exc.PendingRollbackError( sqlalchemy.exc.PendingRollbackError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint &quot;dag_run_dag_id_run_id_key&quot; DETAIL: Key (dag_id, run_id)=(example_branch_dop_operator_v3, scheduled__2022-12-12T12:57:00+00:00) already exists. [SQL: INSERT INTO dag_run (dag_id, queued_at, execution_date, start_date, end_date, state, run_id, creating_job_id, external_trigger, run_type, conf, data_interval_start, data_interval_end, last_scheduling_decision, dag_hash, log_template_id, updated_at) VALUES (%(dag_id)s, %(queued_at)s, %(execution_date)s, %(start_date)s, %(end_date)s, %(state)s, %(run_id)s, %(creating_job_id)s, %(external_trigger)s, %(run_type)s, %(conf)s, %(data_interval_start)s, %(data_interval_end)s, %(last_scheduling_decision)s, %(dag_hash)s, (SELECT max(log_template.id) AS max_1 FROM log_template), %(updated_at)s) RETURNING dag_run.id] [parameters: {'dag_id': 'example_branch_dop_operator_v3', 'queued_at': datetime.datetime(2022, 12, 12, 12, 58, 0, 435945, tzinfo=Timezone('UTC')), 'execution_date': DateTime(2022, 12, 12, 12, 57, 0, tzinfo=Timezone('UTC')), 'start_date': None, 'end_date': None, 'state': &lt;DagRunState.QUEUED: 'queued'&gt;, 'run_id': 'scheduled__2022-12-12T12:57:00+00:00', 'creating_job_id': 1, 'external_trigger': False, 'run_type': &lt;DagRunType.SCHEDULED: 'scheduled'&gt;, 'conf': &lt;psycopg2.extensions.Binary object at 0x7f283a82af60&gt;, 'data_interval_start': DateTime(2022, 12, 12, 12, 57, 0, tzinfo=Timezone('UTC')), 'data_interval_end': DateTime(2022, 12, 12, 12, 58, 0, tzinfo=Timezone('UTC')), 'last_scheduling_decision': None, 'dag_hash': '1653a588de69ed25c5b1dcfef928479c', 'updated_at': datetime.datetime(2022, 12, 12, 12, 58, 0, 436871, tzinfo=Timezone('UTC'))}] (Background on this error at: https://sqlalche.me/e/14/gkpj) (Background on this error at: https://sqlalche.me/e/14/7s2a)"><pre class="notranslate"><code class="notranslate">2022-12-12 12:58:00,793] {scheduler_job.py:776} ERROR - Exception when executing SchedulerJob._run_scheduler_loop Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 759, in _execute self._run_scheduler_loop() File "/usr/local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 885, in _run_scheduler_loop num_queued_tis = self._do_scheduling(session) File "/usr/local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 956, in _do_scheduling self._create_dagruns_for_dags(guard, session) File "/usr/local/lib/python3.8/site-packages/airflow/utils/retries.py", line 78, in wrapped_function for attempt in run_with_db_retries(max_retries=retries, logger=logger, **retry_kwargs): File "/usr/local/lib/python3.8/site-packages/tenacity/__init__.py", line 384, in __iter__ do = self.iter(retry_state=retry_state) File "/usr/local/lib/python3.8/site-packages/tenacity/__init__.py", line 351, in iter return fut.result() File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 437, in result return self.__get_result() File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result raise self._exception File "/usr/local/lib/python3.8/site-packages/airflow/utils/retries.py", line 87, in wrapped_function return func(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1018, in _create_dagruns_for_dags query, dataset_triggered_dag_info = DagModel.dags_needing_dagruns(session) File "/usr/local/lib/python3.8/site-packages/airflow/models/dag.py", line 3341, in dags_needing_dagruns for x in session.query( File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 2773, in all return self._iter().all() File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 2916, in _iter result = self.session.execute( File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1713, in execute conn = self._connection_for_bind(bind) File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1552, in _connection_for_bind return self._transaction._connection_for_bind( File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 721, in _connection_for_bind self._assert_active() File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 601, in _assert_active raise sa_exc.PendingRollbackError( sqlalchemy.exc.PendingRollbackError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "dag_run_dag_id_run_id_key" DETAIL: Key (dag_id, run_id)=(example_branch_dop_operator_v3, scheduled__2022-12-12T12:57:00+00:00) already exists. [SQL: INSERT INTO dag_run (dag_id, queued_at, execution_date, start_date, end_date, state, run_id, creating_job_id, external_trigger, run_type, conf, data_interval_start, data_interval_end, last_scheduling_decision, dag_hash, log_template_id, updated_at) VALUES (%(dag_id)s, %(queued_at)s, %(execution_date)s, %(start_date)s, %(end_date)s, %(state)s, %(run_id)s, %(creating_job_id)s, %(external_trigger)s, %(run_type)s, %(conf)s, %(data_interval_start)s, %(data_interval_end)s, %(last_scheduling_decision)s, %(dag_hash)s, (SELECT max(log_template.id) AS max_1 FROM log_template), %(updated_at)s) RETURNING dag_run.id] [parameters: {'dag_id': 'example_branch_dop_operator_v3', 'queued_at': datetime.datetime(2022, 12, 12, 12, 58, 0, 435945, tzinfo=Timezone('UTC')), 'execution_date': DateTime(2022, 12, 12, 12, 57, 0, tzinfo=Timezone('UTC')), 'start_date': None, 'end_date': None, 'state': &lt;DagRunState.QUEUED: 'queued'&gt;, 'run_id': 'scheduled__2022-12-12T12:57:00+00:00', 'creating_job_id': 1, 'external_trigger': False, 'run_type': &lt;DagRunType.SCHEDULED: 'scheduled'&gt;, 'conf': &lt;psycopg2.extensions.Binary object at 0x7f283a82af60&gt;, 'data_interval_start': DateTime(2022, 12, 12, 12, 57, 0, tzinfo=Timezone('UTC')), 'data_interval_end': DateTime(2022, 12, 12, 12, 58, 0, tzinfo=Timezone('UTC')), 'last_scheduling_decision': None, 'dag_hash': '1653a588de69ed25c5b1dcfef928479c', 'updated_at': datetime.datetime(2022, 12, 12, 12, 58, 0, 436871, tzinfo=Timezone('UTC'))}] (Background on this error at: https://sqlalche.me/e/14/gkpj) (Background on this error at: https://sqlalche.me/e/14/7s2a) </code></pre></div> <p dir="auto">Worse yet, the scheduler will keep crashing after a restart with the same exception.</p> <h3 dir="auto">What you think should happen instead</h3> <p dir="auto">A user should not be able to crash the scheduler from the UI.<br> I see 2 alternatives for solving this:</p> <ol dir="auto"> <li>Reject custom run_id that would (or could) collide with a scheduled one, preventing this situation from happening.</li> <li>Handle the database error and assign a different run_id to the scheduled run.</li> </ol> <h3 dir="auto">How to reproduce</h3> <ol dir="auto"> <li>Find an unpaused DAG.</li> <li>Trigger DAG w/ config, set the run id to something like scheduled__2022-11-21T12:00:00+00:00 (adjust the time to be in the future where there is no run yet).</li> <li>Let the manual DAG run finish.</li> <li>Wait for the scheduler to try to schedule another DAG run with the same run id.</li> <li>💥</li> <li>Attempt to restart the scheduler.</li> <li><g-emoji class="g-emoji" alias="boom" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4a5.png">💥</g-emoji></li> </ol> <h3 dir="auto">Operating System</h3> <p dir="auto">Debian GNU/Linux 11 (bullseye)</p> <h3 dir="auto">Versions of Apache Airflow Providers</h3> <p dir="auto">apache-airflow-providers-postgres==5.3.1</p> <h3 dir="auto">Deployment</h3> <p dir="auto">Docker-Compose</p> <h3 dir="auto">Deployment details</h3> <p dir="auto">I'm using a Postgres docker container as a metadata database that is linked via docker networking to the scheduler and the rest of the components. Scheduler, workers and webserver are all running in separate containers (using CeleryExecutor backed by a Redis container), though I do not think it is relevant in this case.</p> <h3 dir="auto">Anything else</h3> <p dir="auto"><em>No response</em></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">Apache Airflow version</h3> <p dir="auto">2.1.4</p> <h3 dir="auto">What happened</h3> <p dir="auto">After upgrading to airflow 1.10.10 to 2.1.4, I cannot see 'Last Run' column value on dags page on airflow web ui.</p> <h3 dir="auto"></h3> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/30676005/151303105-a7c4b8fe-cdd5-4b84-817e-33318d6355cb.png"><img src="https://user-images.githubusercontent.com/30676005/151303105-a7c4b8fe-cdd5-4b84-817e-33318d6355cb.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">Why does this happen?</p> <h3 dir="auto">What you expected to happen</h3> <p dir="auto">It seems to be a problem with the version of the sources ​​related to airflow.</p> <p dir="auto">Or, I think it may be the cause of not executing "airflow db init" while upgrading to 2.1.4.</p> <h3 dir="auto">How to reproduce</h3> <ol dir="auto"> <li>Install airflow version 1.10.10</li> <li>Upgrade airflow to 2.1.4</li> </ol> <h3 dir="auto">Operating System</h3> <p dir="auto">Linux</p> <h3 dir="auto">Versions of Apache Airflow Providers</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Deployment</h3> <p dir="auto">Other</p> <h3 dir="auto">Deployment details</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Anything else</h3> <p dir="auto"><em>No response</em></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"> 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>
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> <h2 dir="auto">Current Behavior</h2> <p dir="auto">I'm struggling to figure out how to duplicate this locally, but I was using <code class="notranslate">3.0.0-beta9</code> and upgraded to <code class="notranslate">4.1</code> (including upgrading to react 16) and now I get this when I use fetch as google or google's page speed test. I narrowed it down to happening sometime between the 3.0 beta and upgrading to next <code class="notranslate">3.2.1</code><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/4423173/31737414-6a55bb36-b415-11e7-902e-6e48994f485c.png"><img src="https://user-images.githubusercontent.com/4423173/31737414-6a55bb36-b415-11e7-902e-6e48994f485c.png" alt="screen shot 2017-10-18 at 3 01 43 pm" style="max-width: 100%;"></a></p> <p dir="auto">I'm worried that it's causing SEO issues. Has anyone else run into this issue?</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>Deploy a next site to Netlify at &gt; <code class="notranslate">3.2.1</code></li> <li>Test that site on Google Page Speed <a href="https://developers.google.com/speed/pagespeed/insights/" rel="nofollow">insights tool</a></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>3.2.1</td> </tr> <tr> <td>node</td> <td>8.4.0</td> </tr> <tr> <td>OS</td> <td>10.12.6</td> </tr> <tr> <td>browser</td> <td>chrome</td> </tr> <tr> <td>etc</td> <td></td> </tr> </tbody> </table>
<p dir="auto">Hi. I've switched to 6.0.0 recently and upgraded <code class="notranslate">next-redux-wrapper</code> to the version <code class="notranslate">2.0.0-beta.2</code>. It assumes using <code class="notranslate">withRedux</code> HOC for the <code class="notranslate">_app.jsx</code> component and <code class="notranslate">react-redux</code>'es <code class="notranslate">connect</code> for pages. Currently this setup breaks hot module replacement, i.e. the console says <code class="notranslate">[HMR] App is up to date</code>, but the page does not update.</p> <p dir="auto">I know that there are issues with HMR and legacy decorators, so I've used all possible versions:</p> <h2 dir="auto">1) legacy decorators</h2> <h3 dir="auto">./pages/index.jsx</h3> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React, { Component } from 'react' import { connect } from 'react-redux' @connect() export default class Landing extends Component { render = () =&gt; { return ( &lt;h1&gt;Landing&lt;/h1&gt; ) } }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">React</span><span class="pl-kos">,</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">'react'</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">connect</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react-redux'</span> @<span class="pl-en">connect</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-v">Landing</span> <span class="pl-k">extends</span> <span class="pl-v">Component</span> <span class="pl-kos">{</span> <span class="pl-c1">render</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-ent">h1</span><span class="pl-c1">&gt;</span>Landing<span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">h1</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <h2 dir="auto">2) one-by-one enhancers</h2> <h3 dir="auto">./pages/index.jsx</h3> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React, { Component } from 'react' import { connect } from 'react-redux' class Landing extends Component { render = () =&gt; { return ( &lt;h1&gt;Landing&lt;/h1&gt; ) } } const ConnectedLanding = connect()(Landing) export default ConnectedLanding"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">React</span><span class="pl-kos">,</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">'react'</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">connect</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react-redux'</span> <span class="pl-k">class</span> <span class="pl-v">Landing</span> <span class="pl-k">extends</span> <span class="pl-v">Component</span> <span class="pl-kos">{</span> <span class="pl-c1">render</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-ent">h1</span><span class="pl-c1">&gt;</span>Landing<span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">h1</span><span class="pl-c1">&gt;</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-v">ConnectedLanding</span> <span class="pl-c1">=</span> <span class="pl-en">connect</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-v">Landing</span><span class="pl-kos">)</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-v">ConnectedLanding</span></pre></div> <h2 dir="auto">3) separate files for components and pages</h2> <h3 dir="auto">./components/pages/index.jsx</h3> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React, { Component } from 'react' export default class Landing extends Component { render = () =&gt; { return ( &lt;h1&gt;Landing&lt;/h1&gt; ) } }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">React</span><span class="pl-kos">,</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">'react'</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-v">Landing</span> <span class="pl-k">extends</span> <span class="pl-v">Component</span> <span class="pl-kos">{</span> <span class="pl-c1">render</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-ent">h1</span><span class="pl-c1">&gt;</span>Landing<span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">h1</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <h3 dir="auto">./pages/index.jsx</h3> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { connect } from 'react-redux' import Page from '../components/pages/index' const ConnectedPage = connect()(Page) export default ConnectedPage"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">connect</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react-redux'</span> <span class="pl-k">import</span> <span class="pl-v">Page</span> <span class="pl-k">from</span> <span class="pl-s">'../components/pages/index'</span> <span class="pl-k">const</span> <span class="pl-v">ConnectedPage</span> <span class="pl-c1">=</span> <span class="pl-en">connect</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-v">Page</span><span class="pl-kos">)</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-v">ConnectedPage</span></pre></div> <p dir="auto">But none of these solutions work. Also, I've tried using both regular <code class="notranslate">redux</code> and <code class="notranslate">fast-redux</code>, no change. Rest of the config looks like this:</p> <h3 dir="auto">./decorators/redux-app.jsx</h3> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { createStore, applyMiddleware, compose } from 'redux' import thunk from 'redux-thunk' import withRedux from 'next-redux-wrapper' import { rootReducer } from 'fast-redux' let composeEnhancers if (process.env.NODE_ENV !== 'production') { composeEnhancers = (typeof window !== 'undefined' &amp;&amp; window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose } if (process.env.NODE_ENV === 'production') { composeEnhancers = compose } const makeStore = initialState =&gt; createStore( rootReducer, initialState, composeEnhancers(applyMiddleware(thunk)) ) const reduxApp = Component =&gt; withRedux(makeStore)(Component) export default reduxApp"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">createStore</span><span class="pl-kos">,</span> <span class="pl-s1">applyMiddleware</span><span class="pl-kos">,</span> <span class="pl-s1">compose</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'redux'</span> <span class="pl-k">import</span> <span class="pl-s1">thunk</span> <span class="pl-k">from</span> <span class="pl-s">'redux-thunk'</span> <span class="pl-k">import</span> <span class="pl-s1">withRedux</span> <span class="pl-k">from</span> <span class="pl-s">'next-redux-wrapper'</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">rootReducer</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'fast-redux'</span> <span class="pl-k">let</span> <span class="pl-s1">composeEnhancers</span> <span class="pl-k">if</span> <span class="pl-kos">(</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">NODE_ENV</span> <span class="pl-c1">!==</span> <span class="pl-s">'production'</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">composeEnhancers</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-k">typeof</span> <span class="pl-smi">window</span> <span class="pl-c1">!==</span> <span class="pl-s">'undefined'</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-c1">__REDUX_DEVTOOLS_EXTENSION_COMPOSE__</span><span class="pl-kos">)</span> <span class="pl-c1">||</span> <span class="pl-s1">compose</span> <span class="pl-kos">}</span> <span class="pl-k">if</span> <span class="pl-kos">(</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">NODE_ENV</span> <span class="pl-c1">===</span> <span class="pl-s">'production'</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">composeEnhancers</span> <span class="pl-c1">=</span> <span class="pl-s1">compose</span> <span class="pl-kos">}</span> <span class="pl-k">const</span> <span class="pl-en">makeStore</span> <span class="pl-c1">=</span> <span class="pl-s1">initialState</span> <span class="pl-c1">=&gt;</span> <span class="pl-en">createStore</span><span class="pl-kos">(</span> <span class="pl-s1">rootReducer</span><span class="pl-kos">,</span> <span class="pl-s1">initialState</span><span class="pl-kos">,</span> <span class="pl-s1">composeEnhancers</span><span class="pl-kos">(</span><span class="pl-en">applyMiddleware</span><span class="pl-kos">(</span><span class="pl-s1">thunk</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-en">reduxApp</span> <span class="pl-c1">=</span> <span class="pl-v">Component</span> <span class="pl-c1">=&gt;</span> <span class="pl-en">withRedux</span><span class="pl-kos">(</span><span class="pl-en">makeStore</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-v">Component</span><span class="pl-kos">)</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-en">reduxApp</span></pre></div> <h3 dir="auto">./pages/_app.jsx</h3> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React from 'react' import App, { Container } from 'next/app' import reduxApp from '../decorators/redux-app' class CustomApp extends App { static getInitialProps = async ({ Component, router, ctx }) =&gt; { const pageProps = typeof Component.getInitialProps === 'function' ? await Component.getInitialProps(ctx) : {} return { pageProps } } render = () =&gt; { const { Component, pageProps } = this.props return ( &lt;Container&gt; &lt;Component {...pageProps} /&gt; &lt;/Container&gt; ) } } const ReduxedApp = reduxApp(CustomApp) export default ReduxedApp"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span> <span class="pl-k">import</span> <span class="pl-v">App</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-v">Container</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'next/app'</span> <span class="pl-k">import</span> <span class="pl-s1">reduxApp</span> <span class="pl-k">from</span> <span class="pl-s">'../decorators/redux-app'</span> <span class="pl-k">class</span> <span class="pl-v">CustomApp</span> <span class="pl-k">extends</span> <span class="pl-v">App</span> <span class="pl-kos">{</span> <span class="pl-k">static</span> <span class="pl-c1">getInitialProps</span> <span class="pl-c1">=</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> Component<span class="pl-kos">,</span> router<span class="pl-kos">,</span> ctx <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">pageProps</span> <span class="pl-c1">=</span> <span class="pl-k">typeof</span> <span class="pl-v">Component</span><span class="pl-kos">.</span><span class="pl-c1">getInitialProps</span> <span class="pl-c1">===</span> <span class="pl-s">'function'</span> ? <span class="pl-k">await</span> <span class="pl-v">Component</span><span class="pl-kos">.</span><span class="pl-en">getInitialProps</span><span class="pl-kos">(</span><span class="pl-s1">ctx</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> pageProps <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-c1">render</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-kos">{</span> Component<span class="pl-kos">,</span> pageProps <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span> <span class="pl-k">return</span> <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-ent">Container</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">Component</span> <span class="pl-kos">{</span>...<span class="pl-s1">pageProps</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">Container</span><span class="pl-c1">&gt;</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-v">ReduxedApp</span> <span class="pl-c1">=</span> <span class="pl-en">reduxApp</span><span class="pl-kos">(</span><span class="pl-v">CustomApp</span><span class="pl-kos">)</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-v">ReduxedApp</span></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?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">Hot updates are properly applied on change.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">No hot updates are applied, despite the fact that the console says something like:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[HMR] connected [HMR] bundle rebuilding [HMR] bundle rebuilt in 453ms [HMR] Checking for updates on the server... [HMR] Updated modules: [HMR] - ./components/pages/index.jsx [HMR] - ./pages/index.jsx [HMR] App is up to date. [HMR] bundle rebuilding [HMR] bundle rebuilt in 570ms"><pre class="notranslate"><code class="notranslate">[HMR] connected [HMR] bundle rebuilding [HMR] bundle rebuilt in 453ms [HMR] Checking for updates on the server... [HMR] Updated modules: [HMR] - ./components/pages/index.jsx [HMR] - ./pages/index.jsx [HMR] App is up to date. [HMR] bundle rebuilding [HMR] bundle rebuilt in 570ms </code></pre></div> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>Upgrade to <code class="notranslate">next 6.0.0</code> and <code class="notranslate">next-redux-wrapper 2.0.0-beta.2</code></li> <li>Try to use HMR in <code class="notranslate">connect</code>'ed pages</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>6.0.0</td> </tr> <tr> <td>node</td> <td>9.11.1</td> </tr> <tr> <td><a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-redux-wrapper">next-redux-wrapper</a></td> <td>2.0.0-beta.2</td> </tr> <tr> <td>redux</td> <td>4.0.0</td> </tr> <tr> <td>react-redux</td> <td>5.0.7</td> </tr> </tbody> </table>
0
<p dir="auto">I have to load the data to the cache, but I find that I didn't find such a method that I want to find the cache source path by using the url, like this: <code class="notranslate">File file = .get(url);</code><br> Only find that:</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="future = Glide.with(mContext).downloadOnly().load(sticker.getPictureUrl()).submit(); File cacheFile = future.get();"><pre class="notranslate"><span class="pl-s1">future</span> = <span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">mContext</span>).<span class="pl-en">downloadOnly</span>().<span class="pl-en">load</span>(<span class="pl-s1">sticker</span>.<span class="pl-en">getPictureUrl</span>()).<span class="pl-en">submit</span>(); <span class="pl-smi">File</span> <span class="pl-s1">cacheFile</span> = <span class="pl-s1">future</span>.<span class="pl-en">get</span>();</pre></div> <p dir="auto">How i do it?</p>
<p dir="auto">I am new in glide and want to migrate my app from universalimageloader to glide.<br> I want to convert cached image from the disk into image file, and show it into an ImageView.</p> <p dir="auto">When I use universalimageloader, I can do it easily with this way:</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="File imageFile = DiskCacheUtils.findInCache(image_url, ImageLoader.getInstance().getDiscCache()); //then show it into image view String file_target = &quot;file://&quot;+imageFile.getPath(); ImageLoader.getInstance().displayImage(target, imageView);"><pre class="notranslate"><span class="pl-smi">File</span> <span class="pl-s1">imageFile</span> = <span class="pl-smi">DiskCacheUtils</span>.<span class="pl-en">findInCache</span>(<span class="pl-s1">image_url</span>, <span class="pl-smi">ImageLoader</span>.<span class="pl-en">getInstance</span>().<span class="pl-en">getDiscCache</span>()); <span class="pl-c">//then show it into image view</span> <span class="pl-smi">String</span> <span class="pl-s1">file_target</span> = <span class="pl-s">"file://"</span>+<span class="pl-s1">imageFile</span>.<span class="pl-en">getPath</span>(); <span class="pl-smi">ImageLoader</span>.<span class="pl-en">getInstance</span>().<span class="pl-en">displayImage</span>(<span class="pl-s1">target</span>, <span class="pl-s1">imageView</span>);</pre></div> <p dir="auto">However I have not found a way from documentation to do that in Glide.</p> <p dir="auto">Is it possible?</p>
1
<ul dir="auto"> <li>Output of <code class="notranslate">node_modules/.bin/electron --version</code>: 3.0.2</li> <li>Operating System (Platform and Version): macOS 10.14</li> <li>Output of <code class="notranslate">node_modules/.bin/electron --version</code> on last known working Electron version (if applicable):</li> </ul> <p dir="auto"><strong>Expected Behavior</strong><br> There should be no grey line rendered at the top of the window area in frameless window.</p> <p dir="auto">My conclusion is that Electron uses some obscure combination of window styles that cause this behaviour. I was able to reproduce the same appearance when using Cocoa API in the same fashion on a sample Xcode project.</p> <p dir="auto"><strong>Actual behavior</strong><br> On macOS Mojave the grey line is rendered at the top of the window area even when the contents are transparent and the window is configured to be frameless.</p> <p dir="auto"><strong>To Reproduce</strong><br> Fork and run <a href="https://github.com/pronebird/electron-mojave-titlebar-bug">https://github.com/pronebird/electron-mojave-titlebar-bug</a></p> <p dir="auto">If you provide a URL, please list the commands required to clone/setup/run your repo e.g.</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ git clone https://github.com/pronebird/electron-mojave-titlebar-bug.git $ npm install $ npm start"><pre class="notranslate">$ git clone https://github.com/pronebird/electron-mojave-titlebar-bug.git $ npm install $ npm start</pre></div> <p dir="auto"><strong>Screenshots</strong><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/704044/46583008-2b73bd80-ca50-11e8-8b52-0a7a9b514798.png"><img width="363" alt="screenshot 2018-10-07 at 16 43 14" src="https://user-images.githubusercontent.com/704044/46583008-2b73bd80-ca50-11e8-8b52-0a7a9b514798.png" style="max-width: 100%;"></a></p> <p dir="auto">( The dark background is the standard wallpaper on Mojave)</p> <p dir="auto"><strong>Additional Information</strong><br> Add any other context about the problem here.</p>
<ul dir="auto"> <li>Electron Version: ???</li> <li>Operating System (Platform and Version): macOS 10.14 Mojave</li> <li>Last known working Electron version: ???</li> </ul> <p dir="auto"><strong>Expected Behavior</strong><br> No white lines</p> <p dir="auto"><strong>Actual behavior</strong><br> There is a thin white line at the top border of Discord</p> <p dir="auto"><strong>To Reproduce</strong><br> Download Discord and run.</p> <p dir="auto"><strong>Screenshots</strong><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/4723091/41010254-329960e0-68eb-11e8-9c92-a62f3dd2006c.png"><img src="https://user-images.githubusercontent.com/4723091/41010254-329960e0-68eb-11e8-9c92-a62f3dd2006c.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Additional Information</strong><br> May be related to dark theme.</p> <hr> <p dir="auto">I am aware macOS Mojave is not exactly accessible to everyone yet, but I'm reporting this just in case.</p>
1
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(default_type_params)] pub struct Foo&lt;Bar = Bar&gt;; pub struct Baz(Foo); fn main() {}"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>default_type_params<span class="pl-kos">)</span><span class="pl-kos">]</span></span> <span class="pl-k">pub</span> <span class="pl-k">struct</span> <span class="pl-smi">Foo</span><span class="pl-kos">&lt;</span><span class="pl-smi">Bar</span> = <span class="pl-smi">Bar</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-k">pub</span> <span class="pl-k">struct</span> <span class="pl-smi">Baz</span><span class="pl-kos">(</span><span class="pl-smi">Foo</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <hr> <div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ RUST_BACKTRACE=1 rustc foo.rs foo.rs:5:16: 5:19 error: internal compiler error: Type parameter `Bar` (Bar/TypeSpace/0) out of range when substituting (root type=Bar) foo.rs:5 pub struct Baz(Foo); ^~~ note: the compiler hit an unexpected failure path. 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 task 'rustc' failed at 'Box&lt;Any&gt;', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:113 stack backtrace: 1: 0x10c01dda9 - rt::backtrace::imp::write::h189e19957ab9c695OLq 2: 0x10c021077 - failure::on_fail::h03dc2437e5a88345n2q 3: 0x10c28e395 - unwind::begin_unwind_inner::hf0bc25e3a9312068Jud 4: 0x10b782267 - unwind::begin_unwind::h13550917712925122129 5: 0x10b782200 - unwind::begin_unwind::h13550917712925122129 6: 0x108ef3651 - middle::subst::SubstFolder&lt;'a, 'tcx&gt;.TypeFolder&lt;'tcx&gt;::fold_ty::h51d3eabd2d589326k7U 7: 0x1092dd867 - middle::typeck::astconv::ast_path_substs::h17230674362159792950 8: 0x1092f274a - middle::typeck::astconv::ast_path_to_ty::h9293039141781755470 9: 0x1092da6ad - middle::typeck::astconv::ast_ty_to_ty::h10119988251165278301 10: 0x10932b4c5 - middle::typeck::collect::convert_field::h2da86f9ee62891ddJBf 11: 0x1092f574a - middle::typeck::collect::convert_struct::h2b7ee55df10ef64egtg 12: 0x1092d0f9d - middle::typeck::collect::convert::h31420af36e1b2433Pgg 13: 0x1092cae53 - middle::typeck::collect::collect_item_types::h500e21302badea5eGhf 14: 0x108c47b96 - util::common::time::h17347838844167099674 15: 0x109486e18 - middle::typeck::check_crate::h4a8150eb203da20bLVk 16: 0x1094f1d6f - driver::driver::phase_3_run_analysis_passes::hb45292d67f60c7dbEvx 17: 0x1094ebfb3 - driver::driver::compile_input::hcfe10250ad7929a4qcx 18: 0x109572834 - driver::run_compiler::h3e10e2d15988f082J0A 19: 0x109570966 - driver::run::closure.147488 20: 0x108c612eb - task::TaskBuilder&lt;S&gt;::try_future::closure.101597 21: 0x108c611d3 - task::TaskBuilder&lt;S&gt;::spawn_internal::closure.101568 22: 0x108be379d - task::spawn_opts::closure.8528 23: 0x10c2f595c - rust_try_inner 24: 0x10c2f5946 - rust_try 25: 0x10c28ba07 - unwind::try::h538ab1bff32c8080rjd 26: 0x10c28b88c - task::Task::run::h756ab4c75afdd7bdCzc 27: 0x108be35c2 - task::spawn_opts::closure.8467 28: 0x10c28d24a - thread::thread_start::hf25b5002f28406f0NTc 29: 0x7fff9469c899 - _pthread_body 30: 0x7fff9469c72a - _pthread_struct_init"><pre class="notranslate">$ <span class="pl-s1">RUST_BACKTRACE=1 rustc foo.rs</span> <span class="pl-c1">foo.rs:5:16: 5:19 error: internal compiler error: Type parameter `Bar` (Bar/TypeSpace/0) out of range when substituting (root type=Bar)</span> <span class="pl-c1">foo.rs:5 pub struct Baz(Foo);</span> <span class="pl-c1"> ^~~</span> <span class="pl-c1">note: the compiler hit an unexpected failure path. this is a bug.</span> <span class="pl-c1">note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html</span> <span class="pl-c1">note: run with `RUST_BACKTRACE=1` for a backtrace</span> <span class="pl-c1">task 'rustc' failed at 'Box&lt;Any&gt;', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:113</span> <span class="pl-c1">stack backtrace:</span> <span class="pl-c1"> 1: 0x10c01dda9 - rt::backtrace::imp::write::h189e19957ab9c695OLq</span> <span class="pl-c1"> 2: 0x10c021077 - failure::on_fail::h03dc2437e5a88345n2q</span> <span class="pl-c1"> 3: 0x10c28e395 - unwind::begin_unwind_inner::hf0bc25e3a9312068Jud</span> <span class="pl-c1"> 4: 0x10b782267 - unwind::begin_unwind::h13550917712925122129</span> <span class="pl-c1"> 5: 0x10b782200 - unwind::begin_unwind::h13550917712925122129</span> <span class="pl-c1"> 6: 0x108ef3651 - middle::subst::SubstFolder&lt;'a, 'tcx&gt;.TypeFolder&lt;'tcx&gt;::fold_ty::h51d3eabd2d589326k7U</span> <span class="pl-c1"> 7: 0x1092dd867 - middle::typeck::astconv::ast_path_substs::h17230674362159792950</span> <span class="pl-c1"> 8: 0x1092f274a - middle::typeck::astconv::ast_path_to_ty::h9293039141781755470</span> <span class="pl-c1"> 9: 0x1092da6ad - middle::typeck::astconv::ast_ty_to_ty::h10119988251165278301</span> <span class="pl-c1"> 10: 0x10932b4c5 - middle::typeck::collect::convert_field::h2da86f9ee62891ddJBf</span> <span class="pl-c1"> 11: 0x1092f574a - middle::typeck::collect::convert_struct::h2b7ee55df10ef64egtg</span> <span class="pl-c1"> 12: 0x1092d0f9d - middle::typeck::collect::convert::h31420af36e1b2433Pgg</span> <span class="pl-c1"> 13: 0x1092cae53 - middle::typeck::collect::collect_item_types::h500e21302badea5eGhf</span> <span class="pl-c1"> 14: 0x108c47b96 - util::common::time::h17347838844167099674</span> <span class="pl-c1"> 15: 0x109486e18 - middle::typeck::check_crate::h4a8150eb203da20bLVk</span> <span class="pl-c1"> 16: 0x1094f1d6f - driver::driver::phase_3_run_analysis_passes::hb45292d67f60c7dbEvx</span> <span class="pl-c1"> 17: 0x1094ebfb3 - driver::driver::compile_input::hcfe10250ad7929a4qcx</span> <span class="pl-c1"> 18: 0x109572834 - driver::run_compiler::h3e10e2d15988f082J0A</span> <span class="pl-c1"> 19: 0x109570966 - driver::run::closure.147488</span> <span class="pl-c1"> 20: 0x108c612eb - task::TaskBuilder&lt;S&gt;::try_future::closure.101597</span> <span class="pl-c1"> 21: 0x108c611d3 - task::TaskBuilder&lt;S&gt;::spawn_internal::closure.101568</span> <span class="pl-c1"> 22: 0x108be379d - task::spawn_opts::closure.8528</span> <span class="pl-c1"> 23: 0x10c2f595c - rust_try_inner</span> <span class="pl-c1"> 24: 0x10c2f5946 - rust_try</span> <span class="pl-c1"> 25: 0x10c28ba07 - unwind::try::h538ab1bff32c8080rjd</span> <span class="pl-c1"> 26: 0x10c28b88c - task::Task::run::h756ab4c75afdd7bdCzc</span> <span class="pl-c1"> 27: 0x108be35c2 - task::spawn_opts::closure.8467</span> <span class="pl-c1"> 28: 0x10c28d24a - thread::thread_start::hf25b5002f28406f0NTc</span> <span class="pl-c1"> 29: 0x7fff9469c899 - _pthread_body</span> <span class="pl-c1"> 30: 0x7fff9469c72a - _pthread_struct_init</span></pre></div>
<p dir="auto">This example causes an ICE:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#![feature(default_type_params)] trait Foo&lt;T=Self&gt; { fn method(&amp;self); } fn foo(x: &amp;Foo) { } fn main() { }"><pre class="notranslate"><code class="notranslate">#![feature(default_type_params)] trait Foo&lt;T=Self&gt; { fn method(&amp;self); } fn foo(x: &amp;Foo) { } fn main() { } </code></pre></div> <p dir="auto">yields</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;anon&gt;:7:12: 7:15 error: internal compiler error: Type parameter `Self/SelfSpace.0` (Self/SelfSpace/0) out of range when substituting (root type=Self) substs=Substs[types=[[];[];[];[]], regions=[[];[];[];[]]]"><pre class="notranslate"><code class="notranslate">&lt;anon&gt;:7:12: 7:15 error: internal compiler error: Type parameter `Self/SelfSpace.0` (Self/SelfSpace/0) out of range when substituting (root type=Self) substs=Substs[types=[[];[];[];[]], regions=[[];[];[];[]]] </code></pre></div> <p dir="auto">This is because, in an object type, the self parameter slot is empty, so the substitution of the default fails. I'm not 100% sure what's the best way to fix this. We could make the substitution report a proper error rather than ICE; perhaps that's best.</p> <p dir="auto">It is debatable whether such a trait ought to be object safe, but it seems harmless, if pointless, since the <code class="notranslate">Self</code> type winds up being revealed.</p>
1
<p dir="auto">Example below. While we don't support ops between different dtype tensors, we should consider changing this behavior. In numpy, this would return a floating tensor.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import torch &gt;&gt;&gt; a = torch.tensor([1,2,3], dtype=torch.long) &gt;&gt;&gt; b = torch.tensor([3,2,1], dtype=torch.long) &gt;&gt;&gt; a/b 0 1 3 [torch.LongTensor of size (3,)]"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; import torch &gt;&gt;&gt; a = torch.tensor([1,2,3], dtype=torch.long) &gt;&gt;&gt; b = torch.tensor([3,2,1], dtype=torch.long) &gt;&gt;&gt; a/b 0 1 3 [torch.LongTensor of size (3,)] </code></pre></div>
<ul dir="auto"> <li>PyTorch version: current master (10fd27)</li> <li>How you installed PyTorch (conda, pip, source): from source</li> <li>Python version: 3.6</li> </ul> <p dir="auto">When dividing two ints in pure Python, the result is always a float, e.g.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; x = 5 / 3 &gt;&gt;&gt; print(x) 1.6666666666666667 &gt;&gt;&gt; print(type(x)) &lt;class 'float'&gt;"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; x = 5 / 3 &gt;&gt;&gt; print(x) 1.6666666666666667 &gt;&gt;&gt; print(type(x)) &lt;class 'float'&gt; </code></pre></div> <p dir="auto">NumPy shares this behavior:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import numpy as np &gt;&gt;&gt; x = np.array([5], dtype=np.int64) / np.array([3], dtype=np.int64) &gt;&gt;&gt; print(x) [1.66666667] &gt;&gt;&gt; print(x.dtype) float64"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; import numpy as np &gt;&gt;&gt; x = np.array([5], dtype=np.int64) / np.array([3], dtype=np.int64) &gt;&gt;&gt; print(x) [1.66666667] &gt;&gt;&gt; print(x.dtype) float64 </code></pre></div> <p dir="auto">PyTorch uses floor division if both operands have integer types:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; from torch import LongTensor &gt;&gt;&gt; x = torch.LongTensor([5]) / torch.LongTensor([3]) &gt;&gt;&gt; print(x) 1 [torch.LongTensor of size (1,)] &gt;&gt;&gt; print(x.type()) torch.LongTensor"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; from torch import LongTensor &gt;&gt;&gt; x = torch.LongTensor([5]) / torch.LongTensor([3]) &gt;&gt;&gt; print(x) 1 [torch.LongTensor of size (1,)] &gt;&gt;&gt; print(x.type()) torch.LongTensor </code></pre></div> <p dir="auto">I find it confusing that PyTorch uses different division semantics than NumPy and Python. It is a potential source of bugs for users coming from a NumPy background and for users who want to port their code from NumPy to PyTorch.</p> <p dir="auto">For floor division that keeps the integer type, Python already has the dedicated <code class="notranslate">//</code> operator (which is also understood by NumPy). I would propose that PyTorch changes its handling of division so that the <code class="notranslate">/</code> operator always performs true division and introduces the <code class="notranslate">//</code> operator that explicitly means floor division.</p> <p dir="auto">I see two potential problems with changing PyTorch's division behavior like this:</p> <ul dir="auto"> <li>This is quite a fundamental change that can break exisiting code.</li> <li>There is still the open question on how to behave on Python 2 with/without <code class="notranslate">from __future__ import division</code>. NumPy also respects this future import, so depending on the future imports, Python 2 code can either cause the old floor-division behavior (where dividing two <code class="notranslate">np.*int*</code> types results in a floor division) or the new one (always perform true division). I don't know how hard it would be to mimic this behavior and if it's worth the effort.</li> </ul> <p dir="auto">Despite these problems, I still believe this change is important in the long run. What do you think?</p>
1
<p dir="auto">I am getting this mysterious error message after my program runs for 2-3 hours (full stack trace below). The program runs on tons of data as a part of my academic research, so unfortunately I can't provide the data for you to reproduce it.</p> <p dir="auto">The code is here:<br> <a href="https://github.com/fluhus/prices/tree/master/src/items2">https://github.com/fluhus/prices/tree/master/src/items2</a><br> (sorry for scrappiness; It's in the middle of a rework)</p> <p dir="auto">More info</p> <ul dir="auto"> <li>See thread on golang nuts here: <a href="https://groups.google.com/forum/#!topic/golang-nuts/yn6_MDRFGr4" rel="nofollow">https://groups.google.com/forum/#!topic/golang-nuts/yn6_MDRFGr4</a></li> <li>golang 1.5.1 linux/amd64</li> <li>Machine runs Linux 64 bit with 32 cores and 64 GB RAM.</li> <li>No cgo in my code.</li> <li>No findings with race detector.</li> </ul> <p dir="auto">Let me know if you need additional information.</p> <p dir="auto">Thanks a lot!</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="runtime:objectstart Span weird: p=0xc900000000 k=0x6480000 s.start=0xc8fffe8000 s.limit=0xc900001fe0 s.state=2 fatal error: objectstart: bad pointer in unexpected span runtime stack: runtime.throw(0x65c4c0, 0x2b) /usr/local/go/src/runtime/panic.go:527 +0x90 runtime.heapBitsForObject(0xc900000000, 0x0, 0x0, 0xc800000000, 0x7fad6c9123e0) /usr/local/go/src/runtime/mbitmap.go:217 +0x287 runtime.scanobject(0xc8ccd33b00, 0xc820036720) /usr/local/go/src/runtime/mgcmark.go:878 +0x239 runtime.gcDrainN(0xc820036720, 0x485e5) /usr/local/go/src/runtime/mgcmark.go:779 +0x8e runtime.gcAssistAlloc.func1() /usr/local/go/src/runtime/mgcmark.go:232 +0x172 runtime.systemstack(0xc820022a00) /usr/local/go/src/runtime/asm_amd64.s:262 +0x79 runtime.mstart() /usr/local/go/src/runtime/proc1.go:674"><pre class="notranslate"><code class="notranslate">runtime:objectstart Span weird: p=0xc900000000 k=0x6480000 s.start=0xc8fffe8000 s.limit=0xc900001fe0 s.state=2 fatal error: objectstart: bad pointer in unexpected span runtime stack: runtime.throw(0x65c4c0, 0x2b) /usr/local/go/src/runtime/panic.go:527 +0x90 runtime.heapBitsForObject(0xc900000000, 0x0, 0x0, 0xc800000000, 0x7fad6c9123e0) /usr/local/go/src/runtime/mbitmap.go:217 +0x287 runtime.scanobject(0xc8ccd33b00, 0xc820036720) /usr/local/go/src/runtime/mgcmark.go:878 +0x239 runtime.gcDrainN(0xc820036720, 0x485e5) /usr/local/go/src/runtime/mgcmark.go:779 +0x8e runtime.gcAssistAlloc.func1() /usr/local/go/src/runtime/mgcmark.go:232 +0x172 runtime.systemstack(0xc820022a00) /usr/local/go/src/runtime/asm_amd64.s:262 +0x79 runtime.mstart() /usr/local/go/src/runtime/proc1.go:674 </code></pre></div>
<p dir="auto">The following program crashes when run with <code class="notranslate">GODEBUG=invalidptr=1 GOARCH=386</code>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="package main import ( &quot;math/rand&quot; &quot;runtime&quot; ) func main() { P := 2 * runtime.GOMAXPROCS(0) ptrs := make([][]*int, P) for i := 0; i &lt; P; i++ { i := i go func() { r := rand.New(rand.NewSource(int64(i))) var sink []byte p := make([]*int, 4) z := make([]*int, 4) ptrs[i] = p for { if r.Intn(20) != 0 { a := p[:1] a[0] = new(int) for j := range a { a[j] = nil } for j := range p { p[j] = new(int) } copy(p[:3], z) for j := range p { p[j] = new(int) } copy(p[1:4], z) for j := range p { p[j] = new(int) copy(p[j:j+1], z) } } else { sink = make([]byte, 8&lt;&lt;10) } } _ = sink }() } select {} }"><pre class="notranslate"><code class="notranslate">package main import ( "math/rand" "runtime" ) func main() { P := 2 * runtime.GOMAXPROCS(0) ptrs := make([][]*int, P) for i := 0; i &lt; P; i++ { i := i go func() { r := rand.New(rand.NewSource(int64(i))) var sink []byte p := make([]*int, 4) z := make([]*int, 4) ptrs[i] = p for { if r.Intn(20) != 0 { a := p[:1] a[0] = new(int) for j := range a { a[j] = nil } for j := range p { p[j] = new(int) } copy(p[:3], z) for j := range p { p[j] = new(int) } copy(p[1:4], z) for j := range p { p[j] = new(int) copy(p[j:j+1], z) } } else { sink = make([]byte, 8&lt;&lt;10) } } _ = sink }() } select {} } </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="GODEBUG=invalidptr=1 GOARCH=386 go run memclr.go runtime: pointer 0x18d90000 to unallocated spanidx=0x548 span.start=0x185d2000 span.limit=0x185d4000 span.state=3 runtime: found in object at *(0x18456000+0x0) object=0x18456000 k=0xc22b s.start*_PageSize=0x18456000 s.limit=0x18458000 s.sizeclass=2 s.elemsize=16 *(object+0) = 0x0 &lt;== *(object+4) = 0x0 *(object+8) = 0x18d9b354 *(object+12) = 0x18d9b3b0 fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?)"><pre class="notranslate"><code class="notranslate">GODEBUG=invalidptr=1 GOARCH=386 go run memclr.go runtime: pointer 0x18d90000 to unallocated spanidx=0x548 span.start=0x185d2000 span.limit=0x185d4000 span.state=3 runtime: found in object at *(0x18456000+0x0) object=0x18456000 k=0xc22b s.start*_PageSize=0x18456000 s.limit=0x18458000 s.sizeclass=2 s.elemsize=16 *(object+0) = 0x0 &lt;== *(object+4) = 0x0 *(object+8) = 0x18d9b354 *(object+12) = 0x18d9b3b0 fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?) </code></pre></div> <p dir="auto">The problem is that memclr clears 4-byte regions on 386 with 2 separate 2-byte stores:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="_3or4: MOVW AX, (DI) MOVW AX, -2(DI)(BX*1)"><pre class="notranslate"><code class="notranslate">_3or4: MOVW AX, (DI) MOVW AX, -2(DI)(BX*1) </code></pre></div> <p dir="auto">This exposes corrupted pointer to GC.</p> <p dir="auto">Not sure whether it can crash without invalidptr, I would not exclude such possibility. But it's clearly bad and can lead to false retention. Also it makes data race failure modes significantly worse, introducing exploitation possibilities like use-after-free and easy controlled overwrite.</p> <p dir="auto">There is similar issue in amd64p32 memclr which clears pointers with byte stores:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TEXT runtime·memclr(SB),NOSPLIT,$0-8 MOVL ptr+0(FP), DI MOVL n+4(FP), CX MOVQ CX, BX ANDQ $3, BX SHRQ $2, CX MOVQ $0, AX CLD REP STOSL MOVQ BX, CX REP STOSB RET"><pre class="notranslate"><code class="notranslate">TEXT runtime·memclr(SB),NOSPLIT,$0-8 MOVL ptr+0(FP), DI MOVL n+4(FP), CX MOVQ CX, BX ANDQ $3, BX SHRQ $2, CX MOVQ $0, AX CLD REP STOSL MOVQ BX, CX REP STOSB RET </code></pre></div> <p dir="auto">Similar issue in 386 memmove which moves pointer with 2 stores:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="move_3or4: MOVW (SI), AX MOVW -2(SI)(BX*1), CX MOVW AX, (DI) MOVW CX, -2(DI)(BX*1) RET"><pre class="notranslate"><code class="notranslate">move_3or4: MOVW (SI), AX MOVW -2(SI)(BX*1), CX MOVW AX, (DI) MOVW CX, -2(DI)(BX*1) RET </code></pre></div> <p dir="auto">Similar issue in plan9/386 memclr:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="_1or2: MOVB AX, (DI) MOVB AX, -1(DI)(BX*1)"><pre class="notranslate"><code class="notranslate">_1or2: MOVB AX, (DI) MOVB AX, -1(DI)(BX*1) </code></pre></div> <p dir="auto">Similar issue in amd64 memclr:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="_5through8: MOVL AX, (DI) MOVL AX, -4(DI)(BX*1)"><pre class="notranslate"><code class="notranslate">_5through8: MOVL AX, (DI) MOVL AX, -4(DI)(BX*1) </code></pre></div> <p dir="auto">Did not look at arm/ppc. I guess we just need to go through all of them one-by-one.<br> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rsc">@rsc</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/randall77/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/randall77">@randall77</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/RLH/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/RLH">@RLH</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/aclements/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/aclements">@aclements</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dr2chase/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dr2chase">@dr2chase</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/davecheney/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/davecheney">@davecheney</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/minux/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/minux">@minux</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/0intro/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/0intro">@0intro</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/4ad/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/4ad">@4ad</a></p>
1
<p dir="auto">Instance a FlutterViewController with initWithEngine and push from native page,<br> after pop it the memory not released. How to release the engine?</p> <div class="highlight highlight-source-objc notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- (void)handleShowAction { if(_engine == nil) { _engine = [[FlutterEngine alloc] initWithName:@&quot;io.flutter&quot; project:nil]; [_engine runWithEntrypoint:nil]; } FlutterViewController *feedVC = [[FlutterViewController alloc] initWithEngine:_engine nibName:nil bundle:nil]; [(UINavigationController *)self.window.rootViewController pushViewController:feedVC animated:YES]; } - (void)handleDismissAction { [(UINavigationController *)self.window.rootViewController popViewControllerAnimated:YES]; _engine = nil; }"><pre class="notranslate">- (<span class="pl-k">void</span>)handleShowAction { <span class="pl-k">if</span>(_engine == <span class="pl-c1">nil</span>) { _engine = [[FlutterEngine <span class="pl-c1">alloc</span>] <span class="pl-c1">initWithName:</span><span class="pl-s"><span class="pl-pds">@"</span>io.flutter<span class="pl-pds">"</span></span> <span class="pl-c1">project:</span><span class="pl-c1">nil</span>]; [_engine <span class="pl-c1">runWithEntrypoint:</span><span class="pl-c1">nil</span>]; } FlutterViewController *feedVC = [[FlutterViewController <span class="pl-c1">alloc</span>] <span class="pl-c1">initWithEngine:</span>_engine <span class="pl-c1">nibName:</span><span class="pl-c1">nil</span> <span class="pl-c1">bundle:</span><span class="pl-c1">nil</span>]; [(UINavigationController *)<span class="pl-c1">self</span>.window.rootViewController <span class="pl-c1">pushViewController:</span>feedVC <span class="pl-c1">animated:</span><span class="pl-c1">YES</span>]; } - (<span class="pl-k">void</span>)handleDismissAction { [(UINavigationController *)<span class="pl-c1">self</span>.window.rootViewController <span class="pl-c1">popViewControllerAnimated:</span><span class="pl-c1">YES</span>]; _engine = <span class="pl-c1">nil</span>; }</pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel faceu_dev_1.0.0, v1.0.1-pre.5, on Mac OS X 10.13.6 17G65, locale zh-Hans-CN) • Flutter version 1.0.1-pre.5 at /Users/arnold/Documents/study/flutter/flutter • Framework revision 0fd43583b8 (3 days ago), 2018-12-09 19:12:32 +0800 • Engine revision 7375a0f414 • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297) [✗] Android toolchain - develop for Android devices ✗ Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.io/setup/#android-setup for detailed instructions). If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location. You may also want to add it to your PATH environment variable. [✓] iOS toolchain - develop for iOS devices (Xcode 10.0) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 10.0, Build version 10A255 • ios-deploy 2.0.0 • CocoaPods version 1.5.3 [!] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.io/setup/#android-setup for detailed instructions). [!] VS Code (version 1.29.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension not installed; install from https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter"><pre class="notranslate"><code class="notranslate">[✓] Flutter (Channel faceu_dev_1.0.0, v1.0.1-pre.5, on Mac OS X 10.13.6 17G65, locale zh-Hans-CN) • Flutter version 1.0.1-pre.5 at /Users/arnold/Documents/study/flutter/flutter • Framework revision 0fd43583b8 (3 days ago), 2018-12-09 19:12:32 +0800 • Engine revision 7375a0f414 • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297) [✗] Android toolchain - develop for Android devices ✗ Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.io/setup/#android-setup for detailed instructions). If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location. You may also want to add it to your PATH environment variable. [✓] iOS toolchain - develop for iOS devices (Xcode 10.0) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 10.0, Build version 10A255 • ios-deploy 2.0.0 • CocoaPods version 1.5.3 [!] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.io/setup/#android-setup for detailed instructions). [!] VS Code (version 1.29.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension not installed; install from https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter </code></pre></div>
<p dir="auto">Initial experiments are showing that there's a significant bit of memory still in use after the activity that has a Flutter view has finished. E.g. we should be able to drop down to near 0 memory usage once there isn't any active Flutter views.</p> <p dir="auto">The methodology of experiment and results are detailed in an internal document that was shared with Flutter team.</p>
1
<p dir="auto">Hi all,</p> <p dir="auto">My name is Martin, a master candidate in information system at Carnegie Mellon. I have worked as an analyst and product manager before, but I would like to become more involved in the development space and contribute more to open source projects.</p> <p dir="auto">I have personally used scrapy a lot, using it both for personal projects as well as for work. I would be extremely excited to contribute to this project through GoSC.</p> <p dir="auto">I find the request fingerprints project very interesting, as I have personally faced issues with this before. For example, when I scraped Instagram, the website uses a "session_id" to check on the frequency of requests. The default behavior works in this case, but if I want to see how different users sees the same URL (for example, the recommendation page), it would be hard with the current framework.</p> <p dir="auto">I checked the source code and found the fingerprint is implemented here.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="_fingerprint_cache = weakref.WeakKeyDictionary() def request_fingerprint(request, include_headers=None): if include_headers: include_headers = tuple(to_bytes(h.lower()) for h in sorted(include_headers)) cache = _fingerprint_cache.setdefault(request, {}) if include_headers not in cache: fp = () fp.update(to_bytes(request.method)) fp.update(to_bytes(canonicalize_url(request.url))) fp.update(request.body or b'') if include_headers: for hdr in include_headers: if hdr in request.headers: fp.update(hdr) for v in request.headers.getlist(hdr): fp.update(v) cache[include_headers] = fp.hexdigest() return cache[include_headers]"><pre class="notranslate"><code class="notranslate">_fingerprint_cache = weakref.WeakKeyDictionary() def request_fingerprint(request, include_headers=None): if include_headers: include_headers = tuple(to_bytes(h.lower()) for h in sorted(include_headers)) cache = _fingerprint_cache.setdefault(request, {}) if include_headers not in cache: fp = () fp.update(to_bytes(request.method)) fp.update(to_bytes(canonicalize_url(request.url))) fp.update(request.body or b'') if include_headers: for hdr in include_headers: if hdr in request.headers: fp.update(hdr) for v in request.headers.getlist(hdr): fp.update(v) cache[include_headers] = fp.hexdigest() return cache[include_headers] </code></pre></div> <p dir="auto">The function is used in the dupefilter class, but the optional parameter "include_header" is never used anywhere in the project. The documentation (see below) says that you can customize this by overwriting the request_fingerprint function. However, this will be out of scope for most users who did the pip install, and I think users should be provided more convinient ways to adjust this setting.</p> <blockquote> <p dir="auto">The default (RFPDupeFilter) filters based on request fingerprint using the scrapy.utils.request.request_fingerprint function. In order to change the way duplicates are checked you could subclass RFPDupeFilter and override its request_fingerprint method. This method should accept scrapy Request object and return its fingerprint (a string).</p> </blockquote> <p dir="auto">On the idea page, it says</p> <blockquote> <p dir="auto">Scrapy uses a Request fingerprinting scheme for de-duplicating requests and for caching. Currently, the fingerprinting algorithm cannot be modified by Scrapy users.</p> </blockquote> <p dir="auto">No use cases were mentioned here. The use case I can think of is to provide user simple ways to treat certain headers as part of the fingerprint (for example, language settings or session_id for some sites). Under the current implementation, even if the user chooses to enable the "include_headers" parameter, he/she cannot specify the part of headers to be included, meaning things like rotating User-Agent will cause the program to crawl the same page multiple times.</p> <p dir="auto">Those are just my two cents on this issue. If anyone can provide more use cases on this, it can really help me think this through.</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Gallaecio/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Gallaecio">@Gallaecio</a> If you can provide some comment on this it would be great :)</p> <p dir="auto">Thanks in advance,<br> Martin</p>
<p dir="auto"><code class="notranslate">import logging</code><br> <code class="notranslate">import coloredlogs</code></p> <p dir="auto"><code class="notranslate">logging.captureWarnings(True)</code><br> <code class="notranslate">LOGGER = logging.getLogger(__name__)</code><br> <code class="notranslate">coloredlogs.install(level='INFO')</code></p> <p dir="auto"><strong>Initialization is done this way and translates into a duplication of logs in the output. Any solution to keep only the colored logs?</strong></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/23501993/161999047-5f173f40-04d0-4cf1-b029-18788ccf8877.png"><img src="https://user-images.githubusercontent.com/23501993/161999047-5f173f40-04d0-4cf1-b029-18788ccf8877.png" alt="image" style="max-width: 100%;"></a></p>
0
<p dir="auto">React version: 17.0.1</p> <h2 dir="auto">Steps To Reproduce</h2> <ol dir="auto"> <li>Open codesandbox with Mozilla Firefox</li> <li>Select a user from users list</li> <li>The value is not selected on first time, need to click second time on list to get event.target.value</li> </ol> <p dir="auto">Link to code example: <a href="https://codesandbox.io/s/stupefied-newton-lz134" rel="nofollow">https://codesandbox.io/s/stupefied-newton-lz134</a></p> <h2 dir="auto">The current behavior</h2> <h2 dir="auto">The expected behavior</h2>
<p dir="auto">I want to use a controlled <code class="notranslate">&lt;select multiple={true} /&gt;</code> component in React. In addition to the value I also want to keep the focused state of the select in the state. To do this, I update the state with <code class="notranslate">setState</code> in the <code class="notranslate">onChange</code>, <code class="notranslate">onFocus</code> and <code class="notranslate">onBlur</code> event handlers. Unfortunately there is an issue in Firefox: Firefox will only update the value on a change event after the select has gained focus. This means that a user has to click twice on the select element to change its value when it does not have focus. I would expect the select to gain focus and change the value at the same click.</p> <p dir="auto">I created a jsFiddle to demonstrate the prolem: <a href="https://jsfiddle.net/fugf1kw9/2/" rel="nofollow">React select multiple issue in Firefox demonstration</a></p> <p dir="auto">I only see this problem in Firefox and with select multiple. In IE and Chrome it is working as expected, and in Firefox it is working as expected for other form elements (simple select, checkbox, radio, text input, textarea).</p> <p dir="auto">My environment:</p> <ul dir="auto"> <li>Firefox 46.0.1 under Win7 x64</li> <li>React 15.1.0</li> </ul>
1
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="scipy.stats.kendalltau([], [])"><pre class="notranslate"><code class="notranslate">scipy.stats.kendalltau([], []) </code></pre></div> <p dir="auto">fails with an <code class="notranslate">maximum recursion depth exceeded</code> <code class="notranslate">RuntimeError</code>. It should check for invalid input.</p> <p dir="auto">(via <a href="http://stackoverflow.com/questions/30841262/" rel="nofollow">http://stackoverflow.com/questions/30841262/</a>)</p>
<p dir="auto">I have encountered a RuntimeError when using the kendall tau correlation function on empty arrays. Obviously a correlation of empty data is meaningless, but I have code that uses randomization so therefore I may find in certain instances that "a" and "b" are sometimes empty (see below). I think it would be more elegant if <code class="notranslate">stats.kendalltau</code> would check for empty arrays (so I don't have to).</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [14]: import numpy as np In [15]: from scipy import stats In [16]: a = np.array([]) # in actual code 'a' is not statically defined like this In [17]: b = np.array([]) # in actual code 'b' is not statically defined like this In [18]: stats.kendalltau(a, b) ... /mnt/hn03_disk001/HN03_HOMES/ctokheim/envs/python2.7.5/lib/python2.7/site-packages/scipy/stats/stats.pyc in mergesort(offs, length) 2858 def mergesort(offs, length): 2859 exchcnt = 0 -&gt; 2860 if length == 1: 2861 return 0 2862 if length == 2: RuntimeError: maximum recursion depth exceeded in cmp"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">14</span>]: <span class="pl-s1">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-v">In</span> [<span class="pl-c1">15</span>]: <span class="pl-s1">from</span> <span class="pl-s1">scipy</span> <span class="pl-k">import</span> <span class="pl-s1">stats</span> <span class="pl-v">In</span> [<span class="pl-c1">16</span>]: <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([]) <span class="pl-c"># in actual code 'a' is not statically defined like this</span> <span class="pl-v">In</span> [<span class="pl-c1">17</span>]: <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([]) <span class="pl-c"># in actual code 'b' is not statically defined like this</span> <span class="pl-v">In</span> [<span class="pl-c1">18</span>]: <span class="pl-s1">stats</span>.<span class="pl-en">kendalltau</span>(<span class="pl-s1">a</span>, <span class="pl-s1">b</span>) ... <span class="pl-c1">/</span><span class="pl-s1">mnt</span><span class="pl-c1">/</span><span class="pl-s1">hn03_disk001</span><span class="pl-c1">/</span><span class="pl-v">HN03_HOMES</span><span class="pl-c1">/</span><span class="pl-s1">ctokheim</span><span class="pl-c1">/</span><span class="pl-s1">envs</span><span class="pl-c1">/</span><span class="pl-s1">python2</span>.<span class="pl-c1">7.5</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python2</span>.<span class="pl-c1">7</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">scipy</span><span class="pl-c1">/</span><span class="pl-s1">stats</span><span class="pl-c1">/</span><span class="pl-s1">stats</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">mergesort</span>(<span class="pl-s1">offs</span>, <span class="pl-s1">length</span>) <span class="pl-c1">2858</span> <span class="pl-k">def</span> <span class="pl-en">mergesort</span>(<span class="pl-s1">offs</span>, <span class="pl-s1">length</span>): <span class="pl-c1">2859</span> <span class="pl-s1">exchcnt</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span> <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">2860</span> <span class="pl-k">if</span> <span class="pl-s1">length</span> <span class="pl-c1">==</span> <span class="pl-c1">1</span>: <span class="pl-c1">2861</span> <span class="pl-s1">return</span> <span class="pl-c1">0</span> <span class="pl-c1">2862</span> <span class="pl-k">if</span> <span class="pl-s1">length</span> <span class="pl-c1">==</span> <span class="pl-c1">2</span>: <span class="pl-v">RuntimeError</span>: <span class="pl-s1">maximum</span> <span class="pl-s1">recursion</span> <span class="pl-s1">depth</span> <span class="pl-s1">exceeded</span> <span class="pl-c1">in</span> <span class="pl-s1">cmp</span></pre></div> <p dir="auto">I noticed when the lengths of the arrays are 1 then stats.kendalltau returns NaN's.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [11]: a = np.array([1]) In [12]: b = np.array([1]) In [13]: stats.kendalltau(a, b) Out[13]: (nan, nan)"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">11</span>]: <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">1</span>]) <span class="pl-v">In</span> [<span class="pl-c1">12</span>]: <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">1</span>]) <span class="pl-v">In</span> [<span class="pl-c1">13</span>]: <span class="pl-s1">stats</span>.<span class="pl-en">kendalltau</span>(<span class="pl-s1">a</span>, <span class="pl-s1">b</span>) <span class="pl-v">Out</span>[<span class="pl-c1">13</span>]: (<span class="pl-s1">nan</span>, <span class="pl-s1">nan</span>)</pre></div> <p dir="auto">Perhaps stats.kendalltau could return <code class="notranslate">(nan, nan)</code> in the case of zero-length? I'm using version 0.14.0 but I had the same problem on 0.12.0.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [19]: import scipy as sp In [20]: sp.__version__ Out[20]: '0.14.0'"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">19</span>]: <span class="pl-s1">import</span> <span class="pl-s1">scipy</span> <span class="pl-k">as</span> <span class="pl-s1">sp</span> <span class="pl-v">In</span> [<span class="pl-c1">20</span>]: <span class="pl-s1">sp</span>.<span class="pl-s1">__version__</span> <span class="pl-v">Out</span>[<span class="pl-c1">20</span>]: <span class="pl-s">'0.14.0'</span></pre></div>
1
<p dir="auto"><strong>symfony/website-skeleton</strong>: 4.1.2.3</p> <p dir="auto"><strong>Description</strong><br> When installing website-skeleton, the following error is displayed:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="... - Configuring symfony/phpunit-bridge (&gt;=4.1): From github.com/symfony/recipes:master - Configuring symfony/web-server-bundle (&gt;=3.3): From github.com/symfony/recipes:master Executing script cache:clear [KO] [KO] Script cache:clear returned with error code 1 !! !! In ArrayNode.php line 311: !! !! Unrecognized option &quot;validator&quot; under &quot;framework&quot; !! !! !! Script @auto-scripts was called via post-install-cmd"><pre class="notranslate"><code class="notranslate">... - Configuring symfony/phpunit-bridge (&gt;=4.1): From github.com/symfony/recipes:master - Configuring symfony/web-server-bundle (&gt;=3.3): From github.com/symfony/recipes:master Executing script cache:clear [KO] [KO] Script cache:clear returned with error code 1 !! !! In ArrayNode.php line 311: !! !! Unrecognized option "validator" under "framework" !! !! !! Script @auto-scripts was called via post-install-cmd </code></pre></div> <p dir="auto">The error is repeated on two different servers.<br> First server: composer 1.6.5 and PHP 7.2.7<br> Second server: composer 1.6.5 and PHP 7.1.19</p> <p dir="auto"><strong>How to reproduce</strong><br> <code class="notranslate">composer create-project symfony/website-skeleton .</code></p>
<p dir="auto">Composer version 1.6.5<br> linux debian 9.4<br> PHP 7.2.7-1stretch~1.gbpfd8e2e (cli)</p> <p dir="auto">run: composer create-project symfony/website-skeleton my-project</p> <p dir="auto">returns error</p> <blockquote> </blockquote> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Executing script cache:clear [KO] [KO] Script cache:clear returned with error code 1 !! !! In ArrayNode.php line 311: !! !! Unrecognized option &quot;validator&quot; under &quot;framework&quot; !! !! !! Script @auto-scripts was called via post-install-cmd"><pre class="notranslate"><code class="notranslate">Executing script cache:clear [KO] [KO] Script cache:clear returned with error code 1 !! !! In ArrayNode.php line 311: !! !! Unrecognized option "validator" under "framework" !! !! !! Script @auto-scripts was called via post-install-cmd </code></pre></div>
1
<h3 dir="auto">Version</h3> <p dir="auto">v2.5.16-v2.5.17-beta.0</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://codepen.io/weijuer/pen/VxWKww" rel="nofollow">https://codepen.io/weijuer/pen/VxWKww</a></p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">IE10列表展示不了</p> <h3 dir="auto">What is expected?</h3> <p dir="auto">正常遍历列表</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">IE10列表展示不了</p> <hr> <p dir="auto">请用IE10浏览器浏览,而非调试的兼容模式!</p>
<h3 dir="auto">Version</h3> <p dir="auto">2.5.16 / 2.5.17</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://jsfiddle.net/plasmaeng/ndmjjkho/1/" rel="nofollow">https://jsfiddle.net/plasmaeng/ndmjjkho/1/</a></p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">Running the code below in IE10 will result in the following error:</p> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset=&quot;utf-8&quot;&gt; &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt; &lt;title&gt;Page Title&lt;/title&gt; &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt; &lt;script src=&quot;vue.js&quot;&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id=&quot;app_test&quot;&gt; &lt;form&gt; &lt;select&gt; &lt;option v-for=&quot;value in L&quot;&gt;{{value}}&lt;/option&gt; &lt;/select&gt; &lt;/form&gt; &lt;/div&gt; &lt;script&gt; var appTest = new Vue({ el: '#app_test', data: { L : [ '1', '2' ,'3'] } }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;"><pre class="notranslate"><span class="pl-c1">&lt;!DOCTYPE html<span class="pl-kos">&gt;</span></span> <span class="pl-kos">&lt;</span><span class="pl-ent">html</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">head</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">charset</span>="<span class="pl-s">utf-8</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">http-equiv</span>="<span class="pl-s">X-UA-Compatible</span>" <span class="pl-c1">content</span>="<span class="pl-s">IE=edge</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">title</span><span class="pl-kos">&gt;</span>Page Title<span class="pl-kos">&lt;/</span><span class="pl-ent">title</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</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">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">script</span> <span class="pl-c1">src</span>="<span class="pl-s">vue.js</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">head</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">body</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">id</span>="<span class="pl-s">app_test</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">form</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">select</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">v-for</span>="<span class="pl-s">value in L</span>"<span class="pl-kos">&gt;</span>{{value}}<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">select</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">form</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span> <span class="pl-k">var</span> <span class="pl-s1">appTest</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Vue</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">el</span>: <span class="pl-s">'#app_test'</span><span class="pl-kos">,</span> <span class="pl-c1">data</span>: <span class="pl-kos">{</span> <span class="pl-c1">L</span> : <span class="pl-kos">[</span> <span class="pl-s">'1'</span><span class="pl-kos">,</span> <span class="pl-s">'2'</span> <span class="pl-kos">,</span><span class="pl-s">'3'</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">&lt;/</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">body</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">html</span><span class="pl-kos">&gt;</span></pre></div> <p dir="auto">Here is the error message from IE10.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[Vue warn]: Error compiling template: &lt;div id=&quot;app_test&quot;&gt; &lt;form&gt; &lt;select&gt; &lt;option v-for=&quot;value in L&quot;&gt;{{value}}&lt;/option&gt; &lt;/select&gt; &lt;/form&gt; &lt;/div&gt; invalid expression: Syntax error in Raw expression: v-for=&quot;value in L&quot; invalid v-for alias &quot;&quot; in expression: v-for=&quot;value in L&quot;"><pre class="notranslate"><code class="notranslate">[Vue warn]: Error compiling template: &lt;div id="app_test"&gt; &lt;form&gt; &lt;select&gt; &lt;option v-for="value in L"&gt;{{value}}&lt;/option&gt; &lt;/select&gt; &lt;/form&gt; &lt;/div&gt; invalid expression: Syntax error in Raw expression: v-for="value in L" invalid v-for alias "" in expression: v-for="value in L" </code></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7733913/38195565-fcaff2c8-36b8-11e8-9f26-2af218142fd5.png"><img src="https://user-images.githubusercontent.com/7733913/38195565-fcaff2c8-36b8-11e8-9f26-2af218142fd5.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7733913/38196349-7d88efea-36bd-11e8-83ba-df6c3443c848.png"><img src="https://user-images.githubusercontent.com/7733913/38196349-7d88efea-36bd-11e8-83ba-df6c3443c848.png" alt="image" style="max-width: 100%;"></a></p> <h3 dir="auto">What is expected?</h3> <p dir="auto"><code class="notranslate">&lt;option&gt;</code> is generated from 1 to 3.</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto"><code class="notranslate">&lt;option&gt;</code> is not generated with error !!!</p> <hr> <p dir="auto">I have persuaded a senior for a long time to introduce Vue.js.<br> If this problem is solved, we plan to reorganize the site into Vue.js.<br> Please solve the problem.</p>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=hengels" rel="nofollow">Holger Engels</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-638?redirect=false" rel="nofollow">SPR-638</a></strong> and commented</p> <p dir="auto">"GenerateLetters.java:42" calls SessionFactoryUtils.getSession(), before the adviced method "ProfileBuilderLogicSupport.java:542" is called. Problem: SessionFactoryUtils looks up the Session with SessionHolder.DEFAULT_KEY, though the Session is stored with the current transaction as key.</p> <p dir="auto">java.lang.NullPointerException<br> at org.springframework.orm.hibernate.HibernateTemplate.createQuery(HibernateTemplate.java:836)<br> at org.springframework.orm.hibernate.HibernateTemplate$25.doInHibernate(HibernateTemplate.java:469)<br> at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:200)<br> at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:220)<br> at org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:467)<br> at wilken.openshop.modules.eprofiler.dao.support.hibernate.EProfilerDaoSupport.getFavoritAttributesForBp(EProfilerDaoSupport.java:103)<br> at wilken.openshop.modules.eprofiler.logic.support.ProfileBuilderLogicSupport.getAllFavoriteAttributes(ProfileBuilderLogicSupport.java:691)<br> at wilken.openshop.modules.eprofiler.logic.support.ProfileBuilderLogicSupport.getEmptyFavoriteTree(ProfileBuilderLogicSupport.java:527)<br> at wilken.openshop.modules.eprofiler.logic.support.ProfileBuilderLogicSupport.getFilledFavoriteTree(ProfileBuilderLogicSupport.java:542)<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:324)<br> at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:61)<br> at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149)<br> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:116)<br> at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56)<br> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138)<br> at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152)<br> at $Proxy4.getFilledFavoriteTree(Unknown Source)<br> at wilken.openshop.modules.ecampaign.logic.support.CampaignContentBuilderSupport.getFavoriteTree(CampaignContentBuilderSupport.java:384)<br> at wilken.openshop.modules.ecampaign.logic.support.CampaignContentBuilderSupport.buildContent(CampaignContentBuilderSupport.java:236)<br> at wilken.openshop.modules.ecampaign.campaign.GenerateLetters.getLocalizedContentItems(GenerateLetters.java:74)<br> at wilken.openshop.modules.ecampaign.campaign.GenerateLetters.createNewsletter(GenerateLetters.java:65)<br> at wilken.openshop.modules.ecampaign.campaign.GenerateLetters.execute(GenerateLetters.java:42)<br> at org.concern.controller.Controller.execute(Controller.java:725)<br> at org.concern.controller.Controller.process(Controller.java:642)<br> at org.concern.controller.Controller.process(Controller.java:608)<br> at org.concern.controller.Controller.timeout(Controller.java:198)<br> at org.concern.controller.Controller$TimeoutTask.run(Controller.java:1131)<br> at java.util.TimerThread.mainLoop(Timer.java:432)<br> at java.util.TimerThread.run(Timer.java:382)</p> <hr> <p dir="auto"><strong>Affects:</strong> 1.1.1</p> <p dir="auto"><strong>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398054525" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/5382" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/5382/hovercard" href="https://github.com/spring-projects/spring-framework/issues/5382">#5382</a> HibernateTemplate.checkWriteOperationAllowed &gt; NullPointerException (<em><strong>"is duplicated by"</strong></em>)</li> </ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=jhampton" rel="nofollow">John Hampton</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4138?redirect=false" rel="nofollow">SPR-4138</a></strong> and commented</p> <p dir="auto">A MailSendException created with the MailSendException(String msg) constructor throws a NPE when printStackTrace is called.</p> <p dir="auto">java.lang.NullPointerException<br> at org.springframework.mail.MailSendException.printStackTrace(MailSendException.java:149)<br> at org.apache.log4j.spi.ThrowableInformation.getThrowableStrRep(ThrowableInformation.java:59)<br> at org.apache.log4j.spi.LoggingEvent.getThrowableStrRep(LoggingEvent.java:342)<br> at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:304)<br> at org.apache.log4j.WriterAppender.append(WriterAppender.java:159)<br> at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)<br> at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)<br> at org.apache.log4j.Category.callAppenders(Category.java:203)<br> at org.apache.log4j.Category.forcedLog(Category.java:388)<br> at org.apache.log4j.Category.log(Category.java:853)<br> at org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:193)<br> at com.cleanoffer.mylistings.impl.Emailer.sendUploadConfirmation(Emailer.java:51)<br> at com.cleanoffer.mylistings.impl.EmailerTest.testSendUploadConfirmation_withSendException(EmailerTest.java:38)<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 org.jmock.core.VerifyingTestCase.runBare(VerifyingTestCase.java:39)<br> at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)<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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)</p> <hr> <p dir="auto"><strong>Affects:</strong> 2.5 final</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="398083195" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8852" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8852/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8852">#8852</a> NullPointerException thrown from MailSendException if particular constructors are used. (<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="398083367" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8875" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8875/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8875">#8875</a> NullPointerException in MailSendException (<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="398088456" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9505" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9505/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9505">#9505</a> MailSendException is prone to Null Pointer Exceptions (<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="398085197" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9090" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9090/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9090">#9090</a> MailSendException.getMessage will result in NPE (<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="398085235" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9095" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9095/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9095">#9095</a> NullPointerException in org.springframework.mail.MailSendException (<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="398082214" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8726" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8726/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8726">#8726</a> MailSendException created with Map of SmartMimeMessages and SendExceptions is not serializable but not transient</li> </ul>
0
<h4 dir="auto">Challenge Name</h4> <p dir="auto">Video Challenges - Computer Basics</p> <p dir="auto"><a href="https://www.freecodecamp.com/videos/computer-basics-how-to-measure-data-size" rel="nofollow">https://www.freecodecamp.com/videos/computer-basics-how-to-measure-data-size</a></p> <h4 dir="auto">Issue Description</h4> <p dir="auto">I have watched How to Measure Data Size and answered the questions 3 times now and it is not marking it as complete. Same thing with Measuring Data Speed.</p> <h4 dir="auto">Browser Information</h4> <ul dir="auto"> <li>Browser Name, Version: Google Chrome 50.0.2661.94 m</li> <li>Operating System: Windows 10</li> <li>Mobile, Desktop, or Tablet: laptop</li> </ul> <h4 dir="auto">Your Code</h4> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// If relevant, paste all of your challenge code in here "><pre class="notranslate"><span class="pl-c">// If relevant, paste all of your challenge code in here</span></pre></div> <h4 dir="auto">Screenshot</h4>
<p dir="auto">There's no green check mark in the view for this video challenge...<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/12993334/13002391/b39b4de6-d1a0-11e5-87b7-8ad0629e29fc.png"><img src="https://cloud.githubusercontent.com/assets/12993334/13002391/b39b4de6-d1a0-11e5-87b7-8ad0629e29fc.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">... even though I've completed it.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/12993334/13002405/d03a893a-d1a0-11e5-98f1-0e5bbf7a6d2d.png"><img src="https://cloud.githubusercontent.com/assets/12993334/13002405/d03a893a-d1a0-11e5-98f1-0e5bbf7a6d2d.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">As I've mentioned in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="131830154" data-permission-text="Title is private" data-url="https://github.com/freeCodeCamp/freeCodeCamp/issues/6775" data-hovercard-type="issue" data-hovercard-url="/freeCodeCamp/freeCodeCamp/issues/6775/hovercard" href="https://github.com/freeCodeCamp/freeCodeCamp/issues/6775">#6775</a> the views for video challenges aren't loaded from <code class="notranslate">showVideo.jade</code>.<br> It seems the code for the green check marks would be placed here in <code class="notranslate">freecodecamp\common\app\routes\Hikes\components\Hike.jsx</code>:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/12993334/13002579/1a44cc2e-d1a2-11e5-91c8-b26b1b8242fb.png"><img src="https://cloud.githubusercontent.com/assets/12993334/13002579/1a44cc2e-d1a2-11e5-91c8-b26b1b8242fb.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">Of course, the view's gonna need access to the variable that states whether or not the challenge is completed</p>
1
<p dir="auto">by <strong>dahankzter</strong>:</p> <pre class="notranslate">A Fresh clone of the repo leads to this during install with 'all.bash' All my programs (for testing and playing around) works fine. Its just this test that fail. Install test-phase fails with this output: 6g -o _gotest_.6 client.go fs.go request.go server.go status.go url.go client_test.go request_test.go url_test.go rm -f _test/http.a gopack grc _test/http.a _gotest_.6 make[2]: Leaving directory `/opt/go/src/pkg/http' --- FAIL: http.TestRedirect Get <a href="http://codesearch.google.com/" rel="nofollow">http://codesearch.google.com/</a>: dial tcp codesearch.google.com:http: lookup codesearch.google.com. on 192.168.0.1:53: no answer from server FAIL make[1]: *** [test] Error 1 make[1]: Leaving directory `/opt/go/src/pkg/http' make: *** [http.test] Error 2 Environment and repo info: GOOS=linux COARCH=amd64 changeset: 4052:b72ec78019b4 tag: tip user: Russ Cox &lt;[email protected]&gt; date: Sun Nov 15 00:00:05 2009 -0800 summary: cc: drop redundant strcpy</pre>
<pre class="notranslate">I spent some time on GopherCon trying to figure how to make the qml package work smoothly on Mac OS. Apparently it was working fine out of luck, because the OS requires some calls to be made from the initial thread. Now something unrelated was touched, and the graphic goroutine is landing on a different thread and generating errors. The solution is simple: an init function that locks the main thread, and a qml.Run function that runs the main loop. Problem solved. Except, that doesn't work with the testing package anymore, because the test logic itself is run at the end of main, and tests are moved on their own goroutine. This problem might be easily solved by changing the test template from: testing.Main(matchString, tests, benchmarks, examples) to something like: go func() { testing.Main(matchString, tests, benchmarks, examples) close(done) }() if testing.RunFromMain != nil { testing.RunFromMain(done) } &lt;-done Then, for the qml package, I'd implement RunFromMain along the lines of: testing.RunFromMain = func(done chan struct{}) { stopWhenClosed(done) qml.Run(nil) } Can we add such a testing.RunFromMain hook? Another alternative, suggested by Dmitry Vyukov, is to run tests on the initial thread instead of spawning them in goroutines. That would solve the problem too.</pre>
0
<p dir="auto">The following code currently produces an ICE:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() { let bytes = [1u8, 2, 3, 4, 5, 6, 7, 8]; for [a, b, c, d] in bytes.chunks(4) { println!(&quot;{} {} {} {}&quot;, a, b, c, d); } }"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> bytes = <span class="pl-kos">[</span><span class="pl-c1">1u8</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-c1">6</span><span class="pl-kos">,</span> <span class="pl-c1">7</span><span class="pl-kos">,</span> <span class="pl-c1">8</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">for</span> <span class="pl-kos">[</span>a<span class="pl-kos">,</span> b<span class="pl-kos">,</span> c<span class="pl-kos">,</span> d<span class="pl-kos">]</span> <span class="pl-k">in</span> bytes<span class="pl-kos">.</span><span class="pl-en">chunks</span><span class="pl-kos">(</span><span class="pl-c1">4</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{} {} {} {}"</span>, a, b, c, d<span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;anon&gt;:4:9: 4:21 error: internal compiler error: Explicit index of non-index type `core::slice::Chunks&lt;'_,u8&gt;` &lt;anon&gt;:4 for [a, b, c, d] in bytes.chunks(4) { ^~~~~~~~~~~~ note: the compiler hit an unexpected failure path. 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 task 'rustc' failed at 'Box&lt;Any&gt;', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:113"><pre class="notranslate"><code class="notranslate">&lt;anon&gt;:4:9: 4:21 error: internal compiler error: Explicit index of non-index type `core::slice::Chunks&lt;'_,u8&gt;` &lt;anon&gt;:4 for [a, b, c, d] in bytes.chunks(4) { ^~~~~~~~~~~~ note: the compiler hit an unexpected failure path. 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 task 'rustc' failed at 'Box&lt;Any&gt;', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:113 </code></pre></div> <p dir="auto">This should clearly produce a compile time error of course, but not an ICE.</p>
<p dir="auto">The following code</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="struct Wrapper&lt;'a&gt; { slice: &amp;'a [u8] } fn main() { let foo = Some(b&quot;Hello World!&quot;); let bar: Option&lt;Wrapper&lt;'static&gt;&gt; = foo.map(|&amp;x| Wrapper { slice: x }); }"><pre class="notranslate"><code class="notranslate">struct Wrapper&lt;'a&gt; { slice: &amp;'a [u8] } fn main() { let foo = Some(b"Hello World!"); let bar: Option&lt;Wrapper&lt;'static&gt;&gt; = foo.map(|&amp;x| Wrapper { slice: x }); } </code></pre></div> <p dir="auto">triggers a compiler bug:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ RUST_BACKTRACE=1 rustc test.rs test.rs:7:71: 7:72 error: internal compiler error: Explicit index of non-index type `[u8]` test.rs:7 let bar: Option&lt;Wrapper&lt;'static&gt;&gt; = foo.map(|&amp;x| Wrapper { slice: x }); ^ note: the compiler hit an unexpected failure path. 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 task 'rustc' failed at 'Box&lt;Any&gt;', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:107 stack backtrace: 1: 0x10753a635 - rt::backtrace::imp::write::hbede6c694eb9f2cbIQp::v0.11.0.pre 2: 0x107540bd7 - failure::on_fail::h30a7f46ec21fe35516p::v0.11.0.pre 3: 0x1077eb249 - unwind::begin_unwind_inner::h6c751dc42f0f7f17IVd::v0.11.0.pre 4: 0x106c51e25 - unwind::begin_unwind::h16840659320017284217::v0.11.0.pre 5: 0x106c51dad - diagnostic::SpanHandler::span_bug::hb5a406cf5dd1450cWac::v0.11.0.pre 6: 0x1045047e5 - driver::session::Session::span_bug::hc60df83bd7dbe984Trr::v0.11.0.pre 7: 0x10478c506 - middle::mem_categorization::MemCategorizationContext&lt;'t, TYPER&gt;::cat_index::h11027325414672250850::v0.11.0.pre 8: 0x10476be2b - middle::typeck::check::regionck::visit_expr::h8ad96e881d8c059afH8::v0.11.0.pre 9: 0x104770542 - visit::walk_expr::h7092108895728945809::v0.11.0.pre 10: 0x10476b2a0 - middle::typeck::check::regionck::visit_expr::h8ad96e881d8c059afH8::v0.11.0.pre 11: 0x10476cf8e - visit::walk_block::h6655035168579021138::v0.11.0.pre 12: 0x104770936 - visit::walk_fn::h7111590603532843168::v0.11.0.pre 13: 0x10476b865 - middle::typeck::check::regionck::visit_expr::h8ad96e881d8c059afH8::v0.11.0.pre 14: 0x104770113 - visit::walk_expr::h7092108895728945809::v0.11.0.pre 15: 0x10476b2a0 - middle::typeck::check::regionck::visit_expr::h8ad96e881d8c059afH8::v0.11.0.pre 16: 0x10476ce12 - middle::typeck::check::regionck::visit_local::ha0697ea4d5b15fbeUD8::v0.11.0.pre 17: 0x10476cf6a - visit::walk_block::h6655035168579021138::v0.11.0.pre 18: 0x1047afc0e - middle::typeck::check::check_bare_fn::hcd02e3ea22711cdcA2c::v0.11.0.pre 19: 0x1047a98ce - middle::typeck::check::check_item::h066c89136b0abe5fOzd::v0.11.0.pre 20: 0x1047af98d - middle::typeck::check::check_item_types::ha45c368daeab74efS1c::v0.11.0.pre 21: 0x10492161e - middle::typeck::check_crate::hae37e3b7b5c6e1b3Q3C::v0.11.0.pre 22: 0x104d75878 - driver::driver::phase_3_run_analysis_passes::hfbfa07100b0674bdFrq::v0.11.0.pre 23: 0x104d708c5 - driver::driver::compile_input::hf1aa489ba45a9efcDeq::v0.11.0.pre 24: 0x104e3709b - driver::run_compiler::h9c79a8fc68073767b0s::v0.11.0.pre 25: 0x104e348b6 - driver::main_args::closure.117540 26: 0x104e48f8b - task::TaskBuilder&lt;S&gt;::try_future::closure.118681 27: 0x104e48e24 - task::TaskBuilder&lt;S&gt;::spawn_internal::closure.118658 28: 0x10444395c - task::spawn_opts::closure.7563 29: 0x107850dac - rust_try 30: 0x1077e76ea - unwind::try::h7f3fc3b0329b49ea7Jd::v0.11.0.pre 31: 0x1077e73ec - task::Task::run::h4a0e5408354628dfZVc::v0.11.0.pre 32: 0x1044437eb - task::spawn_opts::closure.7508 33: 0x1077e9f59 - thread::thread_start::h5aa600706e7c5c88xid::v0.11.0.pre 34: 0x7fff973fd899 - _pthread_body 35: 0x7fff973fd72a - _pthread_struct_init"><pre class="notranslate"><code class="notranslate">$ RUST_BACKTRACE=1 rustc test.rs test.rs:7:71: 7:72 error: internal compiler error: Explicit index of non-index type `[u8]` test.rs:7 let bar: Option&lt;Wrapper&lt;'static&gt;&gt; = foo.map(|&amp;x| Wrapper { slice: x }); ^ note: the compiler hit an unexpected failure path. 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 task 'rustc' failed at 'Box&lt;Any&gt;', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:107 stack backtrace: 1: 0x10753a635 - rt::backtrace::imp::write::hbede6c694eb9f2cbIQp::v0.11.0.pre 2: 0x107540bd7 - failure::on_fail::h30a7f46ec21fe35516p::v0.11.0.pre 3: 0x1077eb249 - unwind::begin_unwind_inner::h6c751dc42f0f7f17IVd::v0.11.0.pre 4: 0x106c51e25 - unwind::begin_unwind::h16840659320017284217::v0.11.0.pre 5: 0x106c51dad - diagnostic::SpanHandler::span_bug::hb5a406cf5dd1450cWac::v0.11.0.pre 6: 0x1045047e5 - driver::session::Session::span_bug::hc60df83bd7dbe984Trr::v0.11.0.pre 7: 0x10478c506 - middle::mem_categorization::MemCategorizationContext&lt;'t, TYPER&gt;::cat_index::h11027325414672250850::v0.11.0.pre 8: 0x10476be2b - middle::typeck::check::regionck::visit_expr::h8ad96e881d8c059afH8::v0.11.0.pre 9: 0x104770542 - visit::walk_expr::h7092108895728945809::v0.11.0.pre 10: 0x10476b2a0 - middle::typeck::check::regionck::visit_expr::h8ad96e881d8c059afH8::v0.11.0.pre 11: 0x10476cf8e - visit::walk_block::h6655035168579021138::v0.11.0.pre 12: 0x104770936 - visit::walk_fn::h7111590603532843168::v0.11.0.pre 13: 0x10476b865 - middle::typeck::check::regionck::visit_expr::h8ad96e881d8c059afH8::v0.11.0.pre 14: 0x104770113 - visit::walk_expr::h7092108895728945809::v0.11.0.pre 15: 0x10476b2a0 - middle::typeck::check::regionck::visit_expr::h8ad96e881d8c059afH8::v0.11.0.pre 16: 0x10476ce12 - middle::typeck::check::regionck::visit_local::ha0697ea4d5b15fbeUD8::v0.11.0.pre 17: 0x10476cf6a - visit::walk_block::h6655035168579021138::v0.11.0.pre 18: 0x1047afc0e - middle::typeck::check::check_bare_fn::hcd02e3ea22711cdcA2c::v0.11.0.pre 19: 0x1047a98ce - middle::typeck::check::check_item::h066c89136b0abe5fOzd::v0.11.0.pre 20: 0x1047af98d - middle::typeck::check::check_item_types::ha45c368daeab74efS1c::v0.11.0.pre 21: 0x10492161e - middle::typeck::check_crate::hae37e3b7b5c6e1b3Q3C::v0.11.0.pre 22: 0x104d75878 - driver::driver::phase_3_run_analysis_passes::hfbfa07100b0674bdFrq::v0.11.0.pre 23: 0x104d708c5 - driver::driver::compile_input::hf1aa489ba45a9efcDeq::v0.11.0.pre 24: 0x104e3709b - driver::run_compiler::h9c79a8fc68073767b0s::v0.11.0.pre 25: 0x104e348b6 - driver::main_args::closure.117540 26: 0x104e48f8b - task::TaskBuilder&lt;S&gt;::try_future::closure.118681 27: 0x104e48e24 - task::TaskBuilder&lt;S&gt;::spawn_internal::closure.118658 28: 0x10444395c - task::spawn_opts::closure.7563 29: 0x107850dac - rust_try 30: 0x1077e76ea - unwind::try::h7f3fc3b0329b49ea7Jd::v0.11.0.pre 31: 0x1077e73ec - task::Task::run::h4a0e5408354628dfZVc::v0.11.0.pre 32: 0x1044437eb - task::spawn_opts::closure.7508 33: 0x1077e9f59 - thread::thread_start::h5aa600706e7c5c88xid::v0.11.0.pre 34: 0x7fff973fd899 - _pthread_body 35: 0x7fff973fd72a - _pthread_struct_init </code></pre></div>
1
<p dir="auto">Pulling in <a href="https://github.com/jakevdp/JSAnimation">https://github.com/jakevdp/JSAnimation</a> (which hasn't changed in over a year) would greatly enhance the experience of using animations in the notebook with stock matplotlib. Also, like trendvis, oceancm, and viscm, this would move an very useful matplotlib-based tool into our fold.</p> <p dir="auto">The core implementation of JSAnimation is just two parts:</p> <ul dir="auto"> <li>A new writer, HTMLWriter, which also includes some icons for the HTML controls</li> <li>IPython notebook display hook code</li> </ul> <p dir="auto">The <code class="notranslate">HTMLWriter</code> clearly makes sense in matplotlib (alongside <code class="notranslate">FFMpegWriter</code>, etc.). I'm not sure what to do with the IPython display code. Adding it as a <code class="notranslate">_repr_html</code> might not be too bad.</p> <p dir="auto">Thoughts?</p>
<p dir="auto">Trying to make the what's new and following the <a href="https://matplotlib.org/devdocs/devel/release_guide.html#update-and-validate-the-docs" rel="nofollow">update and validate the docs</a> guide and it says:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="comment out the next whats new glob at the top"><pre class="notranslate"><code class="notranslate">comment out the next whats new glob at the top </code></pre></div> <p dir="auto">but it's already commented out <a href="https://raw.githubusercontent.com/matplotlib/matplotlib/master/doc/users/whats_new.rst" rel="nofollow">in what's new</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=".. _whats-new:"><pre class="notranslate"><code class="notranslate">.. _whats-new: </code></pre></div> <p dir="auto">Also the instructions in the what new:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" For a release, add a new section after this, then comment out the include and toctree below by indenting them. Uncomment them after the release. .. include:: next_whats_new/README.rst"><pre class="notranslate"><code class="notranslate"> For a release, add a new section after this, then comment out the include and toctree below by indenting them. Uncomment them after the release. .. include:: next_whats_new/README.rst </code></pre></div> <p dir="auto">kind of conflict with these instructions from the guide:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="copy the current content to a file in doc/users/prev_whats_new merge all of the files in doc/users/next_whats_new/ into doc/users/whats_new.rst and delete the individual files"><pre class="notranslate"><code class="notranslate">copy the current content to a file in doc/users/prev_whats_new merge all of the files in doc/users/next_whats_new/ into doc/users/whats_new.rst and delete the individual files </code></pre></div> <p dir="auto">If you do both, you end up with duplicated entries.</p> <p dir="auto">Also, possibly a separate PR/discussion, but what about having some set of categories for what's new sections?</p>
0
<ul dir="auto"> <li>Electron version: 0.36.8</li> <li>Operating system: OS X 10.11.2</li> </ul> <p dir="auto">Origin webview:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/8194131/13200044/b512c94a-d873-11e5-9e77-bd9891b629a0.png"><img src="https://cloud.githubusercontent.com/assets/8194131/13200044/b512c94a-d873-11e5-9e77-bd9891b629a0.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">Add transform: scale(0.3) to it:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/8194131/13200054/e1c16c9e-d873-11e5-9a99-12c0da85b0db.png"><img src="https://cloud.githubusercontent.com/assets/8194131/13200054/e1c16c9e-d873-11e5-9a99-12c0da85b0db.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">The content of webview is scaled to 0.3*0.3 = 0.09 of the origin size.</p> <p dir="auto">Add transform: scale(0.5) to it:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/8194131/13200068/fd4d5a86-d873-11e5-8ab2-4007b22371a3.png"><img src="https://cloud.githubusercontent.com/assets/8194131/13200068/fd4d5a86-d873-11e5-8ab2-4007b22371a3.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">The content of webview is scaled to 0.5*0.5 = 0.25 of the origin size.</p>
<p dir="auto">This is what's happening:<br> <a href="https://github.com/pakastin/electron-bug">http://github.com/pakastin/electron-bug</a></p>
1
<p dir="auto">I am writing a probabilistic package and I am using jax as the backend. I am looking for Owens T function for calculating the CDF of a skewed Normal likelihood function. I searched through lax and jax.scipy.special and I think Owens T function is not implemented yet. Please let me know if this is the case. If so, is there any possiblity in the near future that you implement the function? I really don't want to switch to either SciPy pf tensorflow and integrate those in my code.</p> <p dir="auto">Thanks,</p> <p dir="auto"><a href="https://www.tensorflow.org/probability/api_docs/python/tfp/math/owens_t" rel="nofollow">https://www.tensorflow.org/probability/api_docs/python/tfp/math/owens_t</a><br> <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.owens_t.html" rel="nofollow">https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.owens_t.html</a></p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Check for duplicate requests.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Describe your goal, and if possible provide a code snippet with a motivating example.</li> </ul>
<p dir="auto">In one of my networks, I have a large (64 MB) NumPy constant that I matmul against 160 different weight matrices.<br> I am noticing that JAX is repeatedly calling <code class="notranslate">_raw_device_put</code> on it, seemingly taking up &gt;10G of accelerator HBM during tracing (resulting in an OOM at trace-time).</p> <p dir="auto">A repro is below:</p> <ol dir="auto"> <li>Add a print statement in <code class="notranslate">convert_element_type</code> when <code class="notranslate">_device_put_raw</code> is called.</li> <li>Run the below script.</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="diff --git a/jax/_src/lax/lax.py b/jax/_src/lax/lax.py index eaf94ced..0f3b5483 100644 --- a/jax/_src/lax/lax.py +++ b/jax/_src/lax/lax.py @@ -436,6 +436,7 @@ def convert_element_type(operand: Array, new_dtype: DType) -&gt; Array: if isinstance(operand, (core.Tracer, xla.DeviceArray)): return operand else: + print('_device_put_raw inside convert_element_type.') return _device_put_raw(np.asarray(operand)) if (dtypes.issubdtype(old_dtype, np.complexfloating) and not dtypes.issubdtype(new_dtype, np.complexfloating)):"><pre class="notranslate"><code class="notranslate">diff --git a/jax/_src/lax/lax.py b/jax/_src/lax/lax.py index eaf94ced..0f3b5483 100644 --- a/jax/_src/lax/lax.py +++ b/jax/_src/lax/lax.py @@ -436,6 +436,7 @@ def convert_element_type(operand: Array, new_dtype: DType) -&gt; Array: if isinstance(operand, (core.Tracer, xla.DeviceArray)): return operand else: + print('_device_put_raw inside convert_element_type.') return _device_put_raw(np.asarray(operand)) if (dtypes.issubdtype(old_dtype, np.complexfloating) and not dtypes.issubdtype(new_dtype, np.complexfloating)): </code></pre></div> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import functools import jax import jax.numpy as jnp import numpy as np @jax.jit def make_ws(key): return [k for k in jax.random.normal(key, (6, 4, 4))] @functools.partial(jax.jit, static_argnums=1) def run_10x(ws, wrap_array): # Create some NumPy constant. x = np.arange(8).reshape((2, 4)).astype(np.float32) if wrap_array: x = jnp.array(x) print('x type: ', type(x)) # Use the same constant repeatedly. # If not wrap_array, it gets _raw_device_put repeatedly. # Real case: 160 layers, x is 64M -&gt; 10G used from this! print('Running jnp.dot(x, w) 6x.') ys = [jnp.dot(x, w) for w in ws] print('Done.') return sum(ys) ws = make_ws(jax.random.PRNGKey(428)) print('w types: ', [type(w) for w in ws]) run_10x(ws, False) run_10x(ws, True)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">functools</span> <span class="pl-k">import</span> <span class="pl-s1">jax</span> <span class="pl-k">import</span> <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">jnp</span> <span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-en">@<span class="pl-s1">jax</span>.<span class="pl-s1">jit</span></span> <span class="pl-k">def</span> <span class="pl-en">make_ws</span>(<span class="pl-s1">key</span>): <span class="pl-k">return</span> [<span class="pl-s1">k</span> <span class="pl-k">for</span> <span class="pl-s1">k</span> <span class="pl-c1">in</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-en">normal</span>(<span class="pl-s1">key</span>, (<span class="pl-c1">6</span>, <span class="pl-c1">4</span>, <span class="pl-c1">4</span>))] <span class="pl-en">@<span class="pl-s1">functools</span>.<span class="pl-en">partial</span>(<span class="pl-s1">jax</span>.<span class="pl-s1">jit</span>, <span class="pl-s1">static_argnums</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)</span> <span class="pl-k">def</span> <span class="pl-en">run_10x</span>(<span class="pl-s1">ws</span>, <span class="pl-s1">wrap_array</span>): <span class="pl-c"># Create some NumPy constant.</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">8</span>).<span class="pl-en">reshape</span>((<span class="pl-c1">2</span>, <span class="pl-c1">4</span>)).<span class="pl-en">astype</span>(<span class="pl-s1">np</span>.<span class="pl-s1">float32</span>) <span class="pl-k">if</span> <span class="pl-s1">wrap_array</span>: <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">jnp</span>.<span class="pl-en">array</span>(<span class="pl-s1">x</span>) <span class="pl-en">print</span>(<span class="pl-s">'x type: '</span>, <span class="pl-en">type</span>(<span class="pl-s1">x</span>)) <span class="pl-c"># Use the same constant repeatedly.</span> <span class="pl-c"># If not wrap_array, it gets _raw_device_put repeatedly.</span> <span class="pl-c"># Real case: 160 layers, x is 64M -&gt; 10G used from this!</span> <span class="pl-en">print</span>(<span class="pl-s">'Running jnp.dot(x, w) 6x.'</span>) <span class="pl-s1">ys</span> <span class="pl-c1">=</span> [<span class="pl-s1">jnp</span>.<span class="pl-en">dot</span>(<span class="pl-s1">x</span>, <span class="pl-s1">w</span>) <span class="pl-k">for</span> <span class="pl-s1">w</span> <span class="pl-c1">in</span> <span class="pl-s1">ws</span>] <span class="pl-en">print</span>(<span class="pl-s">'Done.'</span>) <span class="pl-k">return</span> <span class="pl-en">sum</span>(<span class="pl-s1">ys</span>) <span class="pl-s1">ws</span> <span class="pl-c1">=</span> <span class="pl-en">make_ws</span>(<span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-v">PRNGKey</span>(<span class="pl-c1">428</span>)) <span class="pl-en">print</span>(<span class="pl-s">'w types: '</span>, [<span class="pl-en">type</span>(<span class="pl-s1">w</span>) <span class="pl-k">for</span> <span class="pl-s1">w</span> <span class="pl-c1">in</span> <span class="pl-s1">ws</span>]) <span class="pl-en">run_10x</span>(<span class="pl-s1">ws</span>, <span class="pl-c1">False</span>) <span class="pl-en">run_10x</span>(<span class="pl-s1">ws</span>, <span class="pl-c1">True</span>)</pre></div> <p dir="auto">Output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tycai:~/jax$ python test.py ... w types: [&lt;class 'jax.interpreters.xla._DeviceArray'&gt;, &lt;class 'jax.interpreters.xla._DeviceArray'&gt;, ..., &lt;class 'jax.interpreters.xla._DeviceArray'&gt;] x type: &lt;class 'numpy.ndarray'&gt; Running jnp.dot(x, w) 6x. _device_put_raw inside convert_element_type. _device_put_raw inside convert_element_type. _device_put_raw inside convert_element_type. _device_put_raw inside convert_element_type. _device_put_raw inside convert_element_type. _device_put_raw inside convert_element_type. Done. _device_put_raw inside convert_element_type. x type: &lt;class 'jax.interpreters.xla._DeviceArray'&gt; Running jnp.dot(x, w) 6x. Done. _device_put_raw inside convert_element_type."><pre class="notranslate"><code class="notranslate">tycai:~/jax$ python test.py ... w types: [&lt;class 'jax.interpreters.xla._DeviceArray'&gt;, &lt;class 'jax.interpreters.xla._DeviceArray'&gt;, ..., &lt;class 'jax.interpreters.xla._DeviceArray'&gt;] x type: &lt;class 'numpy.ndarray'&gt; Running jnp.dot(x, w) 6x. _device_put_raw inside convert_element_type. _device_put_raw inside convert_element_type. _device_put_raw inside convert_element_type. _device_put_raw inside convert_element_type. _device_put_raw inside convert_element_type. _device_put_raw inside convert_element_type. Done. _device_put_raw inside convert_element_type. x type: &lt;class 'jax.interpreters.xla._DeviceArray'&gt; Running jnp.dot(x, w) 6x. Done. _device_put_raw inside convert_element_type. </code></pre></div> <p dir="auto">This seems like a sharp edge that might trip others up; it took me a couple hours to track down (in context of a larger model).<br> I did not observe this prior to omnistaging, as I had <code class="notranslate">tie_in</code>-ed the NumPy constant, but <code class="notranslate">tie_in</code> was turned into a no-op.<br> In the good <code class="notranslate">wrap_array</code> case, <code class="notranslate">jnp.array</code> is basically functioning as a <code class="notranslate">tie_in</code> replacement.</p>
0
<p dir="auto">Converting ns/as-precisiong datetime64 to datetime.datetime results in integer:</p> <p dir="auto"><code class="notranslate">datetime.datetime</code> does not support nanoseconds (<a href="http://bugs.python.org/issue15443" rel="nofollow">see issue</a>). When numpy casts it should round or raise an error, instead it silently returns int:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [186]: numpy.datetime64(&quot;1985-08-13&quot;, &quot;us&quot;).astype(datetime.datetime) Out[186]: datetime.datetime(1985, 8, 13, 0, 0) In [187]: numpy.datetime64(&quot;1985-08-13&quot;, &quot;ns&quot;).astype(datetime.datetime) Out[187]: 492739200000000000 In [189]: numpy.datetime64(&quot;1985-08-13&quot;, &quot;as&quot;).astype(datetime.datetime) Out[189]: -8200712707674996736"><pre class="notranslate"><code class="notranslate">In [186]: numpy.datetime64("1985-08-13", "us").astype(datetime.datetime) Out[186]: datetime.datetime(1985, 8, 13, 0, 0) In [187]: numpy.datetime64("1985-08-13", "ns").astype(datetime.datetime) Out[187]: 492739200000000000 In [189]: numpy.datetime64("1985-08-13", "as").astype(datetime.datetime) Out[189]: -8200712707674996736 </code></pre></div>
<p dir="auto">The dtype <code class="notranslate">np.object_</code> is the most general catch-all type to contain arbitrary python objects. As such, <code class="notranslate">.astype(object)</code> should preferably not upcast, but certainly never <em>down</em>cast:</p> <h3 dir="auto">Reproducing code example:</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import numpy as np &gt;&gt;&gt; arr = np.array([10 ** 18], dtype='M8[ns]') &gt;&gt;&gt; arr array(['2001-09-09T01:46:40.000000000'], dtype='datetime64[ns]') &gt;&gt;&gt; arr[0] numpy.datetime64('2001-09-09T01:46:40.000000000') &gt;&gt;&gt; arr.astype(object) array([1000000000000000000], dtype=object) &gt;&gt;&gt; arr.astype(object)[0] 1000000000000000000"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">arr</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">10</span> <span class="pl-c1">**</span> <span class="pl-c1">18</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'M8[ns]'</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">arr</span> <span class="pl-en">array</span>([<span class="pl-s">'2001-09-09T01:46:40.000000000'</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'datetime64[ns]'</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">arr</span>[<span class="pl-c1">0</span>] <span class="pl-s1">numpy</span>.<span class="pl-en">datetime64</span>(<span class="pl-s">'2001-09-09T01:46:40.000000000'</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">arr</span>.<span class="pl-en">astype</span>(<span class="pl-s1">object</span>) <span class="pl-en">array</span>([<span class="pl-c1">1000000000000000000</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">object</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">arr</span>.<span class="pl-en">astype</span>(<span class="pl-s1">object</span>)[<span class="pl-c1">0</span>] <span class="pl-c1">1000000000000000000</span></pre></div> <p dir="auto">The expected outcome for the last two lines is:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; arr.astype(object) array([numpy.datetime64('2001-09-09T01:46:40.000000000')], dtype=object) &gt;&gt;&gt; arr.astype(object)[0] numpy.datetime64('2001-09-09T01:46:40.000000000')"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; arr.astype(object) array([numpy.datetime64('2001-09-09T01:46:40.000000000')], dtype=object) &gt;&gt;&gt; arr.astype(object)[0] numpy.datetime64('2001-09-09T01:46:40.000000000') </code></pre></div> <p dir="auto">as well as</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; arr.astype(object)[0] == arr[0] True"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; arr.astype(object)[0] == arr[0] True </code></pre></div> <h3 dir="auto">Numpy/Python version information:</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="numpy: 1.15.4 python: 3.7.1"><pre class="notranslate"><code class="notranslate">numpy: 1.15.4 python: 3.7.1 </code></pre></div>
1
<h5 dir="auto">Reading data from renderTarget does not work on iOS</h5> <p dir="auto">Example: <a href="https://jsfiddle.net/9n0bha3v/1/" rel="nofollow">https://jsfiddle.net/9n0bha3v/1/</a><br> QR Code to Example:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/22028624/92979599-8d869a00-f493-11ea-9755-a782a625193c.png"><img src="https://user-images.githubusercontent.com/22028624/92979599-8d869a00-f493-11ea-9755-a782a625193c.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">What the example is supposed to do:<br> On desktop browsers (tested on Chrome, Safari - latest MacOS) you can <strong>click on the webGL canvas</strong> and<br> the pixels are being read into a Uint8Array.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function readPixels(renderer, scene, camera, renderTarget) { const {width, height} = renderer.getDrawingBufferSize(new THREE.Vector2()); const buffer = new Uint8Array(width * height * 4); renderer.setRenderTarget(renderTarget); renderer.render(scene, camera); renderer.readRenderTargetPixels(renderTarget, 0, 0, width, height, buffer); return { width, height, buffer }; }"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">readPixels</span><span class="pl-kos">(</span><span class="pl-s1">renderer</span><span class="pl-kos">,</span> <span class="pl-s1">scene</span><span class="pl-kos">,</span> <span class="pl-s1">camera</span><span class="pl-kos">,</span> <span class="pl-s1">renderTarget</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-kos">{</span>width<span class="pl-kos">,</span> height<span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">renderer</span><span class="pl-kos">.</span><span class="pl-en">getDrawingBufferSize</span><span class="pl-kos">(</span><span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">Vector2</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">const</span> <span class="pl-s1">buffer</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Uint8Array</span><span class="pl-kos">(</span><span class="pl-s1">width</span> <span class="pl-c1">*</span> <span class="pl-s1">height</span> <span class="pl-c1">*</span> <span class="pl-c1">4</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">renderer</span><span class="pl-kos">.</span><span class="pl-en">setRenderTarget</span><span class="pl-kos">(</span><span class="pl-s1">renderTarget</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">renderer</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s1">scene</span><span class="pl-kos">,</span> <span class="pl-s1">camera</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">renderer</span><span class="pl-kos">.</span><span class="pl-en">readRenderTargetPixels</span><span class="pl-kos">(</span><span class="pl-s1">renderTarget</span><span class="pl-kos">,</span> <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-s1">width</span><span class="pl-kos">,</span> <span class="pl-s1">height</span><span class="pl-kos">,</span> <span class="pl-s1">buffer</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-kos">{</span> width<span class="pl-kos">,</span> height<span class="pl-kos">,</span> buffer <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">We then draw those pixels to a 2D canvas for visual feedback using context2D.putImageData. <strong>The webGL canvas is essentially duplicated</strong>. This is working on all browsers on my desktop machine.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function drawBufferTo2DCanvas(width, height, buffer) { // clone buffer data to 2d canvas const cvs = document.createElement('canvas'); const ctx = cvs.getContext('2d'); cvs.width = width; cvs.height = height; cvs.style.transform = 'scaleY(-1)'; // flip y const imageData = ctx.createImageData(width, height); for (let i = 0; i &lt; imageData.data.length; i++) { imageData.data[i] = buffer[i]; } ctx.putImageData(imageData, 0, 0); }"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">drawBufferTo2DCanvas</span><span class="pl-kos">(</span><span class="pl-s1">width</span><span class="pl-kos">,</span> <span class="pl-s1">height</span><span class="pl-kos">,</span> <span class="pl-s1">buffer</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// clone buffer data to 2d canvas</span> <span class="pl-k">const</span> <span class="pl-s1">cvs</span> <span class="pl-c1">=</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">createElement</span><span class="pl-kos">(</span><span class="pl-s">'canvas'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">ctx</span> <span class="pl-c1">=</span> <span class="pl-s1">cvs</span><span class="pl-kos">.</span><span class="pl-en">getContext</span><span class="pl-kos">(</span><span class="pl-s">'2d'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">cvs</span><span class="pl-kos">.</span><span class="pl-c1">width</span> <span class="pl-c1">=</span> <span class="pl-s1">width</span><span class="pl-kos">;</span> <span class="pl-s1">cvs</span><span class="pl-kos">.</span><span class="pl-c1">height</span> <span class="pl-c1">=</span> <span class="pl-s1">height</span><span class="pl-kos">;</span> <span class="pl-s1">cvs</span><span class="pl-kos">.</span><span class="pl-c1">style</span><span class="pl-kos">.</span><span class="pl-c1">transform</span> <span class="pl-c1">=</span> <span class="pl-s">'scaleY(-1)'</span><span class="pl-kos">;</span> <span class="pl-c">// flip y</span> <span class="pl-k">const</span> <span class="pl-s1">imageData</span> <span class="pl-c1">=</span> <span class="pl-s1">ctx</span><span class="pl-kos">.</span><span class="pl-en">createImageData</span><span class="pl-kos">(</span><span class="pl-s1">width</span><span class="pl-kos">,</span> <span class="pl-s1">height</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-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1">&lt;</span> <span class="pl-s1">imageData</span><span class="pl-kos">.</span><span class="pl-c1">data</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">imageData</span><span class="pl-kos">.</span><span class="pl-c1">data</span><span class="pl-kos">[</span><span class="pl-s1">i</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">buffer</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-s1">ctx</span><span class="pl-kos">.</span><span class="pl-en">putImageData</span><span class="pl-kos">(</span><span class="pl-s1">imageData</span><span class="pl-kos">,</span> <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c1">0</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">When you try to do the same <strong>on iOS Safari</strong> all of the rgba <strong>values are straight zeros</strong>.<br> The same is true when trying to get an image from the webGL context by calling:<br> <code class="notranslate">renderer.domElement.toDataURL()</code> (a transparent image is returned)</p> <p dir="auto">Things I've already tried:</p> <ul dir="auto"> <li>using WebGL1Renderer since iOS does not support webGL 2.0</li> <li>do not read floats since iOS does not support reading from floating point textures</li> <li>initialize renderer with preserveDrawingBuffer set to true</li> <li>initialize renderer with premultipliedAlpha set to false</li> <li>readPixels immediately after rendering to avoid reading from a cleared buffer</li> </ul> <p dir="auto"><a href="https://threejs.org/examples/#webgl_interactive_cubes_gpu" rel="nofollow">The official Three.js example for reading pixels </a> also seems to not work on iOS Safari.</p> <p dir="auto">Any hints?</p> <h5 dir="auto">Three.js version</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Dev</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r120</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li> </ul> <h5 dir="auto">Browser</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Safari</li> </ul> <h5 dir="auto">OS</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> iOS</li> </ul> <h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5> <p dir="auto">Tested on iOS Safari on <strong>latest iPhone 11 Pro and latest iPad Pro.</strong></p>
<h5 dir="auto">Description of the problem</h5> <p dir="auto">I think <a href="https://github.com/mrdoob/three.js/blob/6854ad946da842dd2991d9d545150567b7cdb39d/src/renderers/webxr/WebXRManager.js#L187-L242"><code class="notranslate">setProjectionFromUnion()</code></a> in <code class="notranslate">WebXRManager</code> is for stereoscopic rendering. But it's called even for non-stereoscopic rendering, for example mobile AR, from <a href="https://github.com/mrdoob/three.js/blob/6854ad946da842dd2991d9d545150567b7cdb39d/src/renderers/webxr/WebXRManager.js#L285"><code class="notranslate">WebXRManager.getCamera()</code></a>.</p> <p dir="auto">Especially, <a href="https://github.com/mrdoob/three.js/blob/6854ad946da842dd2991d9d545150567b7cdb39d/src/renderers/webxr/WebXRManager.js#L299-L327">in mobile AR (view# is 1) <code class="notranslate">cameraR</code> (<code class="notranslate">cameraVR.cameras[1]</code>) won't be updated.</a> So <code class="notranslate">setProjectionFromUnion()</code> which updates projection matrix from <code class="notranslate">cameraL/R</code> may not work correctly.</p> <p dir="auto">An easy solution may be skipping <code class="notranslate">setProjectionFromUnion()</code> if the number of views is one. But currently no way to detect it in <code class="notranslate">.getCamera()</code>. We may need to save the number of views somewhere.</p> <p dir="auto">/cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jsantell/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jsantell">@jsantell</a></p> <h5 dir="auto">Three.js version</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Dev</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> r111</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li> </ul> <h5 dir="auto">Browser</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li> </ul> <h5 dir="auto">OS</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li> </ul> <h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5>
0
<p dir="auto">We are using error boundaries to catch and handle errors inside of a React render. As for errors which occur outside of a React render (i.e. uncaught errors that happen in a timeout), we need to register an uncaught error handler (<code class="notranslate">window.addEventListener('error', …)</code>) to handle these separately (otherwise the user will not be alerted).</p> <p dir="auto">Unfortunately we can only rely on this uncaught error event handler in production, not development. This is because—<strong>in development—errors caught by error boundaries will still bubble up to the uncaught error handler</strong>. (Unfortunately it's not documented but it's explained here: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="326048819" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/12897" data-hovercard-type="issue" data-hovercard-url="/facebook/react/issues/12897/hovercard?comment_id=410036991&amp;comment_type=issue_comment" href="https://github.com/facebook/react/issues/12897#issuecomment-410036991">#12897 (comment)</a>. PR to add this to the docs: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="472825619" data-permission-text="Title is private" data-url="https://github.com/reactjs/react.dev/issues/2168" data-hovercard-type="pull_request" data-hovercard-url="/reactjs/react.dev/pull/2168/hovercard" href="https://github.com/reactjs/react.dev/pull/2168">reactjs/react.dev#2168</a>.)</p> <p dir="auto">This means that (in development) the uncaught error handler will be called for errors which are actually caught by error boundaries.</p> <p dir="auto"><strong>Intuitively I expect boundaries to work like <code class="notranslate">try...catch</code>—if an error is caught, it should never bubble up to the uncaught error handler.</strong> Also, I do not expect such a big difference in the way errors are handled in development versus production.</p> <p dir="auto">For the same reason, when using the <a href="https://github.com/pmmmwh/react-refresh-webpack-plugin">Fast Refresh webpack plugin</a> in development, the error overlay still appears even when an error is caught by an error boundary, because they are using an uncaught error handler to detect when to show the overlay. I would not expect this to happen because the error overlay is traditionally for <em>uncaught</em> errors.</p> <p dir="auto"><strong><em>Why</em> does React need to treat errors differently in development? Is there a reason it needs to do this?</strong></p> <p dir="auto">Whatever the reason, I think it's quite important for errors to behave consistently in development and production. When we're working on the user experience around errors in development, it's not obvious that the behaviour of errors could be significantly different in production. Furthermore, it's difficult to test error boundaries in development if an uncaught error handler has also been registered. For example, if Fast Refresh is used, the error overlay will appear over the top of the error boundary.</p> <p dir="auto">For this reason, I'm keen to explore if there is a different approach we can take here, in order to make the behaviour consistent between development and production. <strong>Ideally error boundaries would just behave similarly to <code class="notranslate">try...catch</code>.</strong></p> <p dir="auto">Failing that, is there any other way we can differentiate between "error caught by boundary" and "uncaught error"—which works in production <em>and</em> development?</p> <p dir="auto">To demonstrate the problem, <a href="https://github.com/OliverJAsh/react-error-boundary-uncaught-issue">here is a reduced test case</a> which:</p> <ul dir="auto"> <li>throws an error both inside and outside of React render</li> <li>registers a uncaught error handler and logs events</li> <li>uses an error boundary and logs calls to <code class="notranslate">componentDidCatch</code> and <code class="notranslate">getDerivedStateFromError</code></li> </ul> <p dir="auto">From the log screenshots I've included at the bottom, we can see that in development the uncaught error handler is called for the error which is in-fact caught by an error boundary.</p> <p dir="auto"><code class="notranslate">src/index.jsx</code>:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as React from 'react'; import * as ReactDOM from 'react-dom'; window.addEventListener('error', (event) =&gt; { console.log('window.addEventListener error', event); }); class ErrorBoundary extends React.Component { state = { hasError: false }; static getDerivedStateFromError(error) { console.log('getDerivedStateFromError', { error }); return { hasError: true }; } componentDidCatch(error, errorInfo) { console.log('componentDidCatch', { error, errorInfo }); } render() { return this.state.hasError === false &amp;&amp; this.props.children; } } const Boom = () =&gt; { console.log('Boom'); throw new Error('Error inside React render'); return null; }; const App = () =&gt; { console.log('App render'); return ( &lt;ErrorBoundary&gt; &lt;Boom /&gt; &lt;/ErrorBoundary&gt; ); }; const rootEl = document.getElementById('root'); ReactDOM.render(&lt;App /&gt;, rootEl); setTimeout(() =&gt; { throw new Error('Error outside of React render'); }, 5000);"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-v">ReactDOM</span> <span class="pl-k">from</span> <span class="pl-s">'react-dom'</span><span class="pl-kos">;</span> <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-en">addEventListener</span><span class="pl-kos">(</span><span class="pl-s">'error'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">event</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</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">'window.addEventListener error'</span><span class="pl-kos">,</span> <span class="pl-s1">event</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">class</span> <span class="pl-v">ErrorBoundary</span> <span class="pl-k">extends</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span> <span class="pl-kos">{</span> <span class="pl-c1">state</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">hasError</span>: <span class="pl-c1">false</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">static</span> <span class="pl-en">getDerivedStateFromError</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'getDerivedStateFromError'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> error <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-c1">hasError</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-en">componentDidCatch</span><span class="pl-kos">(</span><span class="pl-s1">error</span><span class="pl-kos">,</span> <span class="pl-s1">errorInfo</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">'componentDidCatch'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> error<span class="pl-kos">,</span> errorInfo <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-k">return</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">state</span><span class="pl-kos">.</span><span class="pl-c1">hasError</span> <span class="pl-c1">===</span> <span class="pl-c1">false</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">children</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-v">Boom</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</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">'Boom'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">Error</span><span class="pl-kos">(</span><span class="pl-s">'Error inside React render'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-c1">null</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-v">App</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</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">'App render'</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">&lt;</span><span class="pl-ent">ErrorBoundary</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-v">Boom</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">ErrorBoundary</span><span class="pl-c1">&gt;</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">const</span> <span class="pl-s1">rootEl</span> <span class="pl-c1">=</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">getElementById</span><span class="pl-kos">(</span><span class="pl-s">'root'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-v">ReactDOM</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-c1">&lt;</span><span class="pl-v">App</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span><span class="pl-kos">,</span> <span class="pl-s1">rootEl</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">setTimeout</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">Error</span><span class="pl-kos">(</span><span class="pl-s">'Error outside of React 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-c1">5000</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <h3 dir="auto">Development</h3> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/921609/90268665-4afb7e80-de4f-11ea-9f1a-abdb21b655d9.png"><img src="https://user-images.githubusercontent.com/921609/90268665-4afb7e80-de4f-11ea-9f1a-abdb21b655d9.png" alt="image" style="max-width: 100%;"></a></p> <h3 dir="auto">Production</h3> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/921609/90268721-5a7ac780-de4f-11ea-9274-c0f6a86d1b77.png"><img src="https://user-images.githubusercontent.com/921609/90268721-5a7ac780-de4f-11ea-9274-c0f6a86d1b77.png" alt="image" style="max-width: 100%;"></a></p> <hr> <p dir="auto">Related: <a href="https://stackoverflow.com/questions/57197936/componentdidcatch-window-addeventlistenererror-cb-dont-behave-as-expecte/57200935" rel="nofollow">https://stackoverflow.com/questions/57197936/componentdidcatch-window-addeventlistenererror-cb-dont-behave-as-expecte/57200935</a></p>
<p dir="auto">I'm trying to make use of componentDidCatch in the React 16 beta. I already had a global window error handler which was working fine, but it unexpectedly catches errors that I would expect componentDidCatch to have handled. That is, component-local errors are being treated as window-global errors in dev builds.</p> <p dir="auto">The problem seems to stem from <code class="notranslate">invokeGuardedCallbackDev</code> in <code class="notranslate">ReactErrorUtils.js</code>. I think that this entire <code class="notranslate">__DEV__</code> block of code is problematic. The stated rational is:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" // In DEV mode, we swap out invokeGuardedCallback for a special version // that plays more nicely with the browser's DevTools. The idea is to preserve // &quot;Pause on exceptions&quot; behavior. Because React wraps all user-provided // functions in invokeGuardedCallback, and the production version of // invokeGuardedCallback uses a try-catch, all user exceptions are treated // like caught exceptions, and the DevTools won't pause unless the developer // takes the extra step of enabling pause on caught exceptions. This is // untintuitive, though, because even though React has caught the error, from // the developer's perspective, the error is uncaught."><pre class="notranslate"><code class="notranslate"> // In DEV mode, we swap out invokeGuardedCallback for a special version // that plays more nicely with the browser's DevTools. The idea is to preserve // "Pause on exceptions" behavior. Because React wraps all user-provided // functions in invokeGuardedCallback, and the production version of // invokeGuardedCallback uses a try-catch, all user exceptions are treated // like caught exceptions, and the DevTools won't pause unless the developer // takes the extra step of enabling pause on caught exceptions. This is // untintuitive, though, because even though React has caught the error, from // the developer's perspective, the error is uncaught. </code></pre></div> <p dir="auto">This is misguided because it's not about pausing on exceptions, it's about "pause on <em>uncaught</em> exceptions." However, <code class="notranslate">componentDidCatch</code> makes exceptions <em>caught</em>!</p> <p dir="auto">Rather than switching on prod vs dev and using try/catch in prod and window's error handler in dev, React should always use try/catch, but rethrow if you reach the root without hitting a componentDidCatch handler. This would preserve the correct "pause on uncaught exceptions" behavior without messing with global error handlers.</p>
1
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Base.:+(x::Int, y::Int) = println(x, y) # 'julia' terminated by signal SIGSEGV (Address boundary error) Base.:+(x::Int, y::Int) = 1 # KeyError: key :normal not found in getindex(::Dict{Any,Any}, ::Symbol) at ./dict.jl:478 Base.:+(x::Int, y) = 1 # fatal: error thrown and no exception handler available: # MethodError(f=typeof(Base.:(+))(), args=(55, 1), world=0x00000000000069e3) Base.:+(x, y::Int) = 1 # As above, but sometimes &quot;signal (4): Illegal instruction: 4&quot; instead Base.:+(x, y) = 1 # this works!"><pre class="notranslate">Base.:<span class="pl-k">+</span>(x<span class="pl-k">::</span><span class="pl-c1">Int</span>, y<span class="pl-k">::</span><span class="pl-c1">Int</span>) <span class="pl-k">=</span> <span class="pl-c1">println</span>(x, y) <span class="pl-c"><span class="pl-c">#</span> 'julia' terminated by signal SIGSEGV (Address boundary error)</span> Base.:<span class="pl-k">+</span>(x<span class="pl-k">::</span><span class="pl-c1">Int</span>, y<span class="pl-k">::</span><span class="pl-c1">Int</span>) <span class="pl-k">=</span> <span class="pl-c1">1</span> <span class="pl-c"><span class="pl-c">#</span> KeyError: key :normal not found in getindex(::Dict{Any,Any}, ::Symbol) at ./dict.jl:478</span> Base.:<span class="pl-k">+</span>(x<span class="pl-k">::</span><span class="pl-c1">Int</span>, y) <span class="pl-k">=</span> <span class="pl-c1">1</span> <span class="pl-c"><span class="pl-c">#</span> fatal: error thrown and no exception handler available:</span> <span class="pl-c"><span class="pl-c">#</span> MethodError(f=typeof(Base.:(+))(), args=(55, 1), world=0x00000000000069e3)</span> Base.:<span class="pl-k">+</span>(x, y<span class="pl-k">::</span><span class="pl-c1">Int</span>) <span class="pl-k">=</span> <span class="pl-c1">1</span> <span class="pl-c"><span class="pl-c">#</span> As above, but sometimes "signal (4): Illegal instruction: 4" instead</span> Base.:<span class="pl-k">+</span>(x, y) <span class="pl-k">=</span> <span class="pl-c1">1</span> <span class="pl-c"><span class="pl-c">#</span> this works!</span></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; versioninfo() Julia Version 0.7.0-DEV.4564 Commit 46dcb35e1b (2018-03-12 15:00 UTC) Platform Info: OS: macOS (x86_64-apple-darwin16.7.0) CPU: Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-3.9.1 (ORCJIT, ivybridge) Environment: JULIA_EDITOR = subl"><pre class="notranslate"><code class="notranslate">julia&gt; versioninfo() Julia Version 0.7.0-DEV.4564 Commit 46dcb35e1b (2018-03-12 15:00 UTC) Platform Info: OS: macOS (x86_64-apple-darwin16.7.0) CPU: Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-3.9.1 (ORCJIT, ivybridge) Environment: JULIA_EDITOR = subl </code></pre></div>
<p dir="auto">This may be a dumb thing to do, but probably it shouldn't segfault:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; import Base.*; *(::Int, ::Int) = 3 Segmentation fault: 11"><pre class="notranslate"><code class="notranslate">julia&gt; import Base.*; *(::Int, ::Int) = 3 Segmentation fault: 11 </code></pre></div> <p dir="auto">This issue does not occur in 0.5.1.</p> <p dir="auto">Version info:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Julia Version 0.6.0-pre.alpha.58 Commit 015cc63 (2017-03-06 15:15 UTC) Platform Info: OS: macOS (x86_64-apple-darwin16.4.0) CPU: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz WORD_SIZE: 64 BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell) LAPACK: libopenblas64_ LIBM: libopenlibm LLVM: libLLVM-3.9.1 (ORCJIT, haswell)"><pre class="notranslate"><code class="notranslate">Julia Version 0.6.0-pre.alpha.58 Commit 015cc63 (2017-03-06 15:15 UTC) Platform Info: OS: macOS (x86_64-apple-darwin16.4.0) CPU: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz WORD_SIZE: 64 BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell) LAPACK: libopenblas64_ LIBM: libopenlibm LLVM: libLLVM-3.9.1 (ORCJIT, haswell) </code></pre></div>
1
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface Bank { balance: number; withdraw(x: number): number; } class PowellCountyBank implements Bank { balance: number = 0; withdraw(x) { return (this.balance - x); } } var b = new PowellCountyBank(); console.log(b.withdraw({})); // ^ Expect type error here."><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">Bank</span> <span class="pl-kos">{</span> <span class="pl-c1">balance</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-c1">withdraw</span><span class="pl-kos">(</span><span class="pl-s1">x</span>: <span class="pl-smi">number</span><span class="pl-kos">)</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">PowellCountyBank</span> <span class="pl-k">implements</span> <span class="pl-smi">Bank</span> <span class="pl-kos">{</span> <span class="pl-c1">balance</span>: <span class="pl-smi">number</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-en">withdraw</span><span class="pl-kos">(</span><span class="pl-s1">x</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-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">balance</span> <span class="pl-c1">-</span> <span class="pl-s1">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-k">var</span> <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">PowellCountyBank</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-s1">b</span><span class="pl-kos">.</span><span class="pl-en">withdraw</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-c">// ^ Expect type error here.</span></pre></div> <p dir="auto">(<a href="http://www.typescriptlang.org/Playground#src=interface%20Bank%20%7B%0D%0A%09balance%3A%20number%3B%0D%0A%09withdraw%28x%3A%20number%29%3A%20number%3B%0D%0A%7D%0D%0A%0D%0Aclass%20PowellCountyBank%20implements%20Bank%20%7B%0D%0A%09balance%3A%20number%20%3D%200%3B%0D%0A%09%0D%0A%09withdraw%28x%29%20%7B%0D%0A%09%09return%20%28this.balance%20-%20x%29%3B%0D%0A%09%7D%0D%0A%7D%0D%0A%0D%0Avar%20b%20%3D%20new%20PowellCountyBank%28%29%3B%0D%0A%0D%0Aconsole.log%28b.withdraw%28%7B%7D%29%29%3B%0D%0A" rel="nofollow">Playground</a>)</p> <p dir="auto">The implementation shows the return type of <code class="notranslate">withdraw</code> but not type for the parameter:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2061925/12765569/39a063da-c9cd-11e5-933c-880c44828a69.png"><img src="https://cloud.githubusercontent.com/assets/2061925/12765569/39a063da-c9cd-11e5-933c-880c44828a69.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">When a property has exactly one type from an <code class="notranslate">extends</code> or <code class="notranslate">implements</code> clause, we should contextually type that property's initializer by the type from the clause. For example:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface ThingListener { handleEvent: (x: MouseEvent) =&gt; void; } class Foo implements ThingListener { handleEvent = x =&gt; { // No error, but this code is incorrect console.log(x.timestamp); } }"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">ThingListener</span> <span class="pl-kos">{</span> <span class="pl-c1">handleEvent</span>: <span class="pl-kos">(</span><span class="pl-s1">x</span>: <span class="pl-smi">MouseEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">Foo</span> <span class="pl-k">implements</span> <span class="pl-smi">ThingListener</span> <span class="pl-kos">{</span> <span class="pl-c1">handleEvent</span> <span class="pl-c1">=</span> <span class="pl-s1">x</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-c">// No error, but this code is incorrect</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">x</span><span class="pl-kos">.</span><span class="pl-c1">timestamp</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">Ideally we could take this one step further when widening. The following behavior is also undesirable:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface HasLength { length: number } class Foo implements HasLength { // length: any, not really what we intended length = undefined; } var x = new Foo(); x.length = 'wat'; // should not be allowed"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">HasLength</span> <span class="pl-kos">{</span> <span class="pl-c1">length</span>: <span class="pl-smi">number</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">Foo</span> <span class="pl-k">implements</span> <span class="pl-smi">HasLength</span> <span class="pl-kos">{</span> <span class="pl-c">// length: any, not really what we intended</span> <span class="pl-c1">length</span> <span class="pl-c1">=</span> <span class="pl-c1">undefined</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">var</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">Foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">x</span><span class="pl-kos">.</span><span class="pl-c1">length</span> <span class="pl-c1">=</span> <span class="pl-s">'wat'</span><span class="pl-kos">;</span> <span class="pl-c">// should not be allowed</span></pre></div> <p dir="auto">e.g. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="91669978" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/3666" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/3666/hovercard" href="https://github.com/microsoft/TypeScript/issues/3666">#3666</a></p>
1
<p dir="auto">With this code: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/retep998/term/commit/2b94c822fc0590a5f9bdc99fad541d0c3518f2a3/hovercard" href="https://github.com/retep998/term/commit/2b94c822fc0590a5f9bdc99fad541d0c3518f2a3">retep998/term@<tt>2b94c82</tt></a><br> I get an ICE</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Peter@Win81-SSD MINGW64 ~/term $ cargo run --example something Compiling kernel32-sys v0.1.0 Compiling libc v0.1.6 Compiling winapi v0.1.17 Compiling term v0.2.7 (file:///C:/msys64/home/Peter/term) examples\something.rs:19:14: 2:54 error: source trait is private error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/masterCONTRIBUTING.md#bug-reports note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'capacity overflow', C:/msys64/home/Peter/rust/src/libcore\option.rs:330 Could not compile `term`. To learn more, run the command again with --verbose. Peter@Win81-SSD MINGW64 ~/term $ rustc -vV rustc 1.1.0-dev (9c88f3be1 2015-04-27) (built 2015-04-27) binary: rustc commit-hash: 9c88f3be126d0fe02a92c20e1d78192f4b648401 commit-date: 2015-04-27 build-date: 2015-04-27 host: x86_64-pc-windows-gnu release: 1.1.0-dev"><pre class="notranslate"><code class="notranslate">Peter@Win81-SSD MINGW64 ~/term $ cargo run --example something Compiling kernel32-sys v0.1.0 Compiling libc v0.1.6 Compiling winapi v0.1.17 Compiling term v0.2.7 (file:///C:/msys64/home/Peter/term) examples\something.rs:19:14: 2:54 error: source trait is private error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/masterCONTRIBUTING.md#bug-reports note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'capacity overflow', C:/msys64/home/Peter/rust/src/libcore\option.rs:330 Could not compile `term`. To learn more, run the command again with --verbose. Peter@Win81-SSD MINGW64 ~/term $ rustc -vV rustc 1.1.0-dev (9c88f3be1 2015-04-27) (built 2015-04-27) binary: rustc commit-hash: 9c88f3be126d0fe02a92c20e1d78192f4b648401 commit-date: 2015-04-27 build-date: 2015-04-27 host: x86_64-pc-windows-gnu release: 1.1.0-dev </code></pre></div> <p dir="auto">Backtrace by <a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/kballard/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kballard">@kballard</a> using rustc 1.1.0-nightly (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/5fb0259edfbc4034cfbcf827ab91d6118b7ae848/hovercard" href="https://github.com/rust-lang/rust/commit/5fb0259edfbc4034cfbcf827ab91d6118b7ae848"><tt>5fb0259</tt></a> 2015-04-26) (built 2015-04-26)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ env RUST_BACKTRACE=1 cargo run --example something Compiling term v0.2.7 (file:///Users/kevin/Dev/rust/Scratch/term) examples/something.rs:19:14: 2:54 error: source trait is private error: internal compiler error: unexpected panic 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 'capacity overflow', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/libcore/option.rs:330 stack backtrace: 1: 0x105cb7b3f - sys::backtrace::write::h7c4b7b31b5a98994KVr 2: 0x105cc0242 - panicking::on_panic::h130becb52f065864NVv 3: 0x105c7c985 - rt::unwind::begin_unwind_inner::hf2ec506d50a3ea22wDv 4: 0x105c7d7bc - rt::unwind::begin_unwind_fmt::he465542fba1a288eCCv 5: 0x105cbfd9c - rust_begin_unwind 6: 0x105d0f7b5 - panicking::panic_fmt::h39c9227a84864bb7yKy 7: 0x105449ce3 - codemap::CodeMap::span_to_lines::h8832e04ed2aff1a62gA 8: 0x10548fd2b - diagnostic::emit::h695a3e055df98e351UB 9: 0x10548d4cc - diagnostic::EmitterWriter.Emitter::emit::h786e8cf93696a544JRB 10: 0x10543ff39 - diagnostic::SpanHandler::span_err::h9f68fad8e64a9d63PnB 11: 0x102e69e33 - session::Session::span_err::h2d09ffe9b87a2a3fIOp 12: 0x102879295 - PrivacyVisitor&lt;'a, 'tcx&gt;::report_error::had53c10fa374641a2Ra 13: 0x10287c29b - PrivacyVisitor&lt;'a, 'tcx&gt;.Visitor&lt;'v&gt;::visit_expr::h1cd280cef77a740dHhb 14: 0x10287dcc3 - visit::Visitor::visit_block::h7884039954563752346 15: 0x10287d549 - visit::Visitor::visit_fn::h18293213297878176316 16: 0x10287b631 - PrivacyVisitor&lt;'a, 'tcx&gt;.Visitor&lt;'v&gt;::visit_item::h83709f09c8dd29dfxdb 17: 0x10288241a - check_crate::h0ad7434cff2b8431EVb 18: 0x102437393 - driver::phase_3_run_analysis_passes::h84861191833defe7tGa 19: 0x102419588 - driver::compile_input::h65cad254ac62afa6Qba 20: 0x1024d8613 - run_compiler::hbd6a992aacaf1248F4b 21: 0x1024d5d7a - boxed::F.FnBox&lt;A&gt;::call_box::h9480122591250505076 22: 0x1024d52c7 - rt::unwind::try::try_fn::h5956310425634165804 23: 0x105d42618 - rust_try_inner 24: 0x105d42605 - rust_try 25: 0x1024d559e - boxed::F.FnBox&lt;A&gt;::call_box::h8195565033996650298 26: 0x105cbec3d - sys::thread::Thread::new::thread_start::h8efe8b1c3780385fvYu 27: 0x7fff94dfe267 - _pthread_body 28: 0x7fff94dfe1e4 - _pthread_start Could not compile `term`. To learn more, run the command again with --verbose."><pre class="notranslate"><code class="notranslate">$ env RUST_BACKTRACE=1 cargo run --example something Compiling term v0.2.7 (file:///Users/kevin/Dev/rust/Scratch/term) examples/something.rs:19:14: 2:54 error: source trait is private error: internal compiler error: unexpected panic 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 'capacity overflow', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/libcore/option.rs:330 stack backtrace: 1: 0x105cb7b3f - sys::backtrace::write::h7c4b7b31b5a98994KVr 2: 0x105cc0242 - panicking::on_panic::h130becb52f065864NVv 3: 0x105c7c985 - rt::unwind::begin_unwind_inner::hf2ec506d50a3ea22wDv 4: 0x105c7d7bc - rt::unwind::begin_unwind_fmt::he465542fba1a288eCCv 5: 0x105cbfd9c - rust_begin_unwind 6: 0x105d0f7b5 - panicking::panic_fmt::h39c9227a84864bb7yKy 7: 0x105449ce3 - codemap::CodeMap::span_to_lines::h8832e04ed2aff1a62gA 8: 0x10548fd2b - diagnostic::emit::h695a3e055df98e351UB 9: 0x10548d4cc - diagnostic::EmitterWriter.Emitter::emit::h786e8cf93696a544JRB 10: 0x10543ff39 - diagnostic::SpanHandler::span_err::h9f68fad8e64a9d63PnB 11: 0x102e69e33 - session::Session::span_err::h2d09ffe9b87a2a3fIOp 12: 0x102879295 - PrivacyVisitor&lt;'a, 'tcx&gt;::report_error::had53c10fa374641a2Ra 13: 0x10287c29b - PrivacyVisitor&lt;'a, 'tcx&gt;.Visitor&lt;'v&gt;::visit_expr::h1cd280cef77a740dHhb 14: 0x10287dcc3 - visit::Visitor::visit_block::h7884039954563752346 15: 0x10287d549 - visit::Visitor::visit_fn::h18293213297878176316 16: 0x10287b631 - PrivacyVisitor&lt;'a, 'tcx&gt;.Visitor&lt;'v&gt;::visit_item::h83709f09c8dd29dfxdb 17: 0x10288241a - check_crate::h0ad7434cff2b8431EVb 18: 0x102437393 - driver::phase_3_run_analysis_passes::h84861191833defe7tGa 19: 0x102419588 - driver::compile_input::h65cad254ac62afa6Qba 20: 0x1024d8613 - run_compiler::hbd6a992aacaf1248F4b 21: 0x1024d5d7a - boxed::F.FnBox&lt;A&gt;::call_box::h9480122591250505076 22: 0x1024d52c7 - rt::unwind::try::try_fn::h5956310425634165804 23: 0x105d42618 - rust_try_inner 24: 0x105d42605 - rust_try 25: 0x1024d559e - boxed::F.FnBox&lt;A&gt;::call_box::h8195565033996650298 26: 0x105cbec3d - sys::thread::Thread::new::thread_start::h8efe8b1c3780385fvYu 27: 0x7fff94dfe267 - _pthread_body 28: 0x7fff94dfe1e4 - _pthread_start Could not compile `term`. To learn more, run the command again with --verbose. </code></pre></div>
<p dir="auto">This error is related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="56910226" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/22050" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/22050/hovercard" href="https://github.com/rust-lang/rust/issues/22050">#22050</a>, not sure if it's a dupe. Some of the following code snippets rely on the <a href="https://crates.io/crates/term" rel="nofollow">term</a> library (but the issue seems to be in Rust, not <code class="notranslate">term</code>).</p> <p dir="auto">The following builds fine:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn foo() { let mut s = String::new(); writeln!(s, &quot;foo&quot;).unwrap(); }"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> <span class="pl-k">mut</span> s = <span class="pl-smi">String</span><span class="pl-kos">::</span><span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">writeln</span><span class="pl-en">!</span><span class="pl-kos">(</span>s, <span class="pl-s">"foo"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">unwrap</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">This gives an error:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="extern crate term; fn foo() { let mut t = term::stdout().unwrap(); writeln!(t, &quot;foo&quot;).unwrap(); }"><pre class="notranslate"><span class="pl-k">extern</span> <span class="pl-k">crate</span> term<span class="pl-kos">;</span> <span class="pl-k">fn</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> <span class="pl-k">mut</span> t = term<span class="pl-kos">::</span><span class="pl-en">stdout</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">unwrap</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">writeln</span><span class="pl-en">!</span><span class="pl-kos">(</span>t, <span class="pl-s">"foo"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">unwrap</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">Output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="lib.rs:5:5: 5:23 error: source trait is private lib.rs:5 writeln!(t, &quot;foo&quot;).unwrap();"><pre class="notranslate"><code class="notranslate">lib.rs:5:5: 5:23 error: source trait is private lib.rs:5 writeln!(t, "foo").unwrap(); </code></pre></div> <p dir="auto">This is the error mentioned in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="56910226" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/22050" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/22050/hovercard" href="https://github.com/rust-lang/rust/issues/22050">#22050</a>. Importing <code class="notranslate">std::io::Write</code> fixes the error. However, if <code class="notranslate">println</code> is used, we get no errors:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="extern crate term; fn foo() { let mut t = term::stdout().unwrap(); writeln!(t, &quot;foo&quot;).unwrap(); println!(&quot;foo&quot;); }"><pre class="notranslate"><span class="pl-k">extern</span> <span class="pl-k">crate</span> term<span class="pl-kos">;</span> <span class="pl-k">fn</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> <span class="pl-k">mut</span> t = term<span class="pl-kos">::</span><span class="pl-en">stdout</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">unwrap</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">writeln</span><span class="pl-en">!</span><span class="pl-kos">(</span>t, <span class="pl-s">"foo"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">unwrap</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"foo"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div>
1
<p dir="auto">In my static folder I have the following symlink:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="semantic.min.css -&gt; ../node_modules/semantic-ui-css/semantic.min.css"><pre class="notranslate"><code class="notranslate">semantic.min.css -&gt; ../node_modules/semantic-ui-css/semantic.min.css </code></pre></div> <p dir="auto">When I do a <code class="notranslate">next export</code> it copies the symlink into the <code class="notranslate">out/static</code> folder. It would make more sense for it to read the contents of the file that is symlinked to and place that into the <code class="notranslate">out/static</code> folder.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Read the contents of the file pointed to by the symlink and place that into the <code class="notranslate">out/static</code> folder.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Symlink is copied.</p> <h2 dir="auto">Context</h2> <p dir="auto">I'm symlinking a file in my node_modules directory into my static directory so whatever version is installed by npm is immediately accessible and so that I don't have to commit that 3rd party modules file into git. Now I'm having to manually replace the symlink in the out folder after each export.</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>4.1.3</td> </tr> </tbody> </table>
<h1 dir="auto">Bug report</h1> <h2 dir="auto">Describe the bug</h2> <p dir="auto">When using <code class="notranslate">Link</code> (next/Link) with a functional component (button), it stops working.</p> <p dir="auto">Basically, the link is <strong>ignored</strong>. The button's click is properly triggered, but there is <strong>no redirection</strong> happening.</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">I had the following (working) source code:</p> <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;div&gt; &lt;Link // TODO sentry warning if &lt; 2k chars https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers href={`/solutions?${QUERY_SIMULATION_KEY}=${encodeQueryParameter(serializeStudentSolutionContext(studentSolutionContext))}`} &gt; &lt;Button className=&quot;btn-border&quot; onClick={(): void =&gt; { setIsLoadingSolutionsPage(true); }} &gt; {t('chatbotPage.solutionsFound.button', 'Voir les solutions')} { isLoadingSolutionsPage ? ( &lt;&gt; {' '}&lt;AnimatedBubble /&gt; &lt;/&gt; ) : null } &lt;/Button&gt; &lt;/Link&gt; &lt;/div&gt;"><pre class="notranslate"><span class="pl-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-smi">Link</span> <span class="pl-c">// TODO sentry warning if &lt; 2k chars https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers</span> <span class="pl-c1">href</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s">`/solutions?<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-smi">QUERY_SIMULATION_KEY</span><span class="pl-kos">}</span></span>=<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-en">encodeQueryParameter</span><span class="pl-kos">(</span><span class="pl-en">serializeStudentSolutionContext</span><span class="pl-kos">(</span><span class="pl-s1">studentSolutionContext</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-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-smi">Button</span> <span class="pl-c1">className</span><span class="pl-c1">=</span><span class="pl-s">"btn-border"</span> <span class="pl-c1">onClick</span><span class="pl-c1">=</span><span class="pl-kos">{</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-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-en">setIsLoadingSolutionsPage</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-kos">}</span><span class="pl-kos">}</span> <span class="pl-c1">&gt;</span> <span class="pl-kos">{</span><span class="pl-en">t</span><span class="pl-kos">(</span><span class="pl-s">'chatbotPage.solutionsFound.button'</span><span class="pl-kos">,</span> <span class="pl-s">'Voir les solutions'</span><span class="pl-kos">)</span><span class="pl-kos">}</span> <span class="pl-kos">{</span> <span class="pl-s1">isLoadingSolutionsPage</span> ? <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span><span class="pl-s">' '</span><span class="pl-kos">}</span><span class="pl-c1">&lt;</span><span class="pl-smi">AnimatedBubble</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span> : <span class="pl-c1">null</span> <span class="pl-kos">}</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-smi">Button</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-smi">Link</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span></pre></div> <p dir="auto">Which I changed into the following (non-working) code:</p> <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" const solutionsPageLink = `/solutions?${QUERY_SIMULATION_KEY}=${encodeQueryParameter(serializeStudentSolutionContext(studentSolutionContext))}`; // TODO sentry warning if &lt; 2k chars https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers const SolutionsPageButton = (): JSX.Element =&gt; { return ( &lt;Button className=&quot;btn-border&quot; onClick={(): void =&gt; { // Stores the selected persona in the browser localStorage patchUserData({ persona: studentSolutionContext.persona }); // Starts button's animation setIsLoadingSolutionsPage(true); }} &gt; {t('chatbotPage.solutionsFound.button', 'Voir les solutions')} { isLoadingSolutionsPage ? ( &lt;&gt; {' '}&lt;AnimatedBubble /&gt; &lt;/&gt; ) : null } &lt;/Button&gt; ); }; // ... &lt;div&gt; { // XXX When displayed within an iframe, then open the link in a new page // The point is to avoid displaying too much on the institutional website, // but rather redirect the user to our platform so that they may benefit from all our services isInIframe ? ( &lt;a href={solutionsPageLink} target={'_blank'} // Open in a new tab while keeping the current tab open &gt; &lt;SolutionsPageButton /&gt; &lt;/a&gt; ) : ( &lt;Link href={solutionsPageLink} &gt; &lt;SolutionsPageButton /&gt; &lt;/Link&gt; ) } &lt;/div&gt;"><pre class="notranslate"> <span class="pl-k">const</span> <span class="pl-s1">solutionsPageLink</span> <span class="pl-c1">=</span> <span class="pl-s">`/solutions?<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-smi">QUERY_SIMULATION_KEY</span><span class="pl-kos">}</span></span>=<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-en">encodeQueryParameter</span><span class="pl-kos">(</span><span class="pl-en">serializeStudentSolutionContext</span><span class="pl-kos">(</span><span class="pl-s1">studentSolutionContext</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-c">// TODO sentry warning if &lt; 2k chars https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers</span> <span class="pl-k">const</span> <span class="pl-smi">SolutionsPageButton</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">JSX</span><span class="pl-kos">.</span><span class="pl-smi">Element</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-smi">Button</span> <span class="pl-c1">className</span><span class="pl-c1">=</span><span class="pl-s">"btn-border"</span> <span class="pl-c1">onClick</span><span class="pl-c1">=</span><span class="pl-kos">{</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-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-c">// Stores the selected persona in the browser localStorage</span> <span class="pl-en">patchUserData</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">persona</span>: <span class="pl-s1">studentSolutionContext</span><span class="pl-kos">.</span><span class="pl-c1">persona</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Starts button's animation</span> <span class="pl-en">setIsLoadingSolutionsPage</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-kos">}</span><span class="pl-kos">}</span> <span class="pl-c1">&gt;</span> <span class="pl-kos">{</span><span class="pl-en">t</span><span class="pl-kos">(</span><span class="pl-s">'chatbotPage.solutionsFound.button'</span><span class="pl-kos">,</span> <span class="pl-s">'Voir les solutions'</span><span class="pl-kos">)</span><span class="pl-kos">}</span> <span class="pl-kos">{</span> <span class="pl-s1">isLoadingSolutionsPage</span> ? <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span><span class="pl-s">' '</span><span class="pl-kos">}</span><span class="pl-c1">&lt;</span><span class="pl-smi">AnimatedBubble</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span> : <span class="pl-c1">null</span> <span class="pl-kos">}</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-smi">Button</span><span class="pl-c1">&gt;</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-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c">// XXX When displayed within an iframe, then open the link in a new page</span> <span class="pl-c">// The point is to avoid displaying too much on the institutional website,</span> <span class="pl-c">// but rather redirect the user to our platform so that they may benefit from all our services</span> <span class="pl-s1">isInIframe</span> ? <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-ent">a</span> <span class="pl-c1">href</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">solutionsPageLink</span><span class="pl-kos">}</span> <span class="pl-c1">target</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s">'_blank'</span><span class="pl-kos">}</span> <span class="pl-c">// Open in a new tab while keeping the current tab open</span> <span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-smi">SolutionsPageButton</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">a</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span> : <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-smi">Link</span> <span class="pl-c1">href</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">solutionsPageLink</span><span class="pl-kos">}</span> <span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-smi">SolutionsPageButton</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-smi">Link</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span></pre></div> <h2 dir="auto">Expected behavior</h2> <p dir="auto">The <code class="notranslate">Link</code> component should redirect in both cases.</p> <h2 dir="auto">System information</h2> <ul dir="auto"> <li>OS: [e.g. macOS, Windows] Mac</li> <li>Browser (if applies) [e.g. chrome, safari] Chrome</li> <li>Version of Next.js: [e.g. 6.0.2] 9.1</li> </ul> <h2 dir="auto">Additional context</h2> <p dir="auto">Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="467232050" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/7915" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/7915/hovercard" href="https://github.com/vercel/next.js/issues/7915">#7915</a>, couldn't find a solution even though I read <a href="https://nextjs.org/docs/api-reference/next/link" rel="nofollow">https://nextjs.org/docs/api-reference/next/link</a>, but there is not example when using a <code class="notranslate">&lt;Button&gt;</code>.</p> <p dir="auto">My easiest workaround would be not using a functional component, and thus duplicate my button's code.</p> <p dir="auto">Alternatively, if the <code class="notranslate">Link</code> component could behave link a <code class="notranslate">&lt;a&gt;</code> (through prop configuration), I wouldn't have to perform such ternary condition, and could just provide such prop dynamically (no duplicated code, no functional component)</p>
0
<p dir="auto">Back to Top function is not working in Bootstrap 3 RC1</p>
<p dir="auto">Button "Back to top" not working (docs)</p>
1
<h3 dir="auto">Versions</h3> <p dir="auto">Material-UI: 1.0.0-alpha.19<br> React: 15.5.4<br> Browser: Chrome</p> <p dir="auto">In current implementation of Dialog component dialog content has next style MuiDialogContent-root-... and predefined style property overflow-y:auto</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1417393/28211552-ef06a108-68a5-11e7-94ff-7405c7697376.PNG"><img src="https://user-images.githubusercontent.com/1417393/28211552-ef06a108-68a5-11e7-94ff-7405c7697376.PNG" alt="capture1" style="max-width: 100%;"></a></p> <p dir="auto">it cause issue when I use Select component from <a href="https://github.com/JedWatson/react-select">react-select</a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1417393/28211647-78d7be80-68a6-11e7-8de4-96ef3e3f0838.PNG"><img src="https://user-images.githubusercontent.com/1417393/28211647-78d7be80-68a6-11e7-8de4-96ef3e3f0838.PNG" alt="capture3" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1417393/28211655-7e3b0936-68a6-11e7-852f-3a720aab9e4e.png"><img src="https://user-images.githubusercontent.com/1417393/28211655-7e3b0936-68a6-11e7-852f-3a720aab9e4e.png" alt="capture2" style="max-width: 100%;"></a></p> <p dir="auto">But without this property all work fine<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1417393/28211773-0c88b13e-68a7-11e7-8d6b-b9112ef852bb.png"><img src="https://user-images.githubusercontent.com/1417393/28211773-0c88b13e-68a7-11e7-8d6b-b9112ef852bb.png" alt="capture4" style="max-width: 100%;"></a></p> <p dir="auto">Is it possible to fix it?</p>
<ul dir="auto"> <li>[x ] I have searched the <a href="https://github.com/mui-org/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">Copy and paste components and have them actually work out of the box just like Bootstrap components</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">I copy and pasted the entire example in <code class="notranslate">https://material-ui.com/demos/buttons/</code> for a Raised Button and it does not work. There are extra dependencies i.e. PropTypes required just for the example which makes it hard to "plug and play." The export statement is very confusing with <code class="notranslate">export default withStyles(styles)(RaisedButtons);</code><br> <code class="notranslate">Button.js:61 Uncaught TypeError: Cannot read property 'short' of undefined</code><br> <code class="notranslate">index.js:2177 The above error occurred in the &lt;WithStyles(Button)&gt; component:</code></p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>Copy and paste the code in the source section of Raised Button or any Button and try to render it in a current project. I tried with and with out MuiThemeProvider to no avail.</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import Button from 'material-ui/Button'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; export default class Test extends Component { constructor(props) { super(props); } render() { return ( &lt;MuiThemeProvider&gt; &lt;Button variant=&quot;raised&quot; color=&quot;primary&quot;&gt; Hello World &lt;/Button&gt; &lt;/MuiThemeProvider&gt; ); } }``` OR ```import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from 'material-ui/styles'; import Button from 'material-ui/Button'; const styles = theme =&gt; ({ button: { margin: theme.spacing.unit, }, input: { display: 'none', }, }); function RaisedButtons(props) { const { classes } = props; return ( &lt;div&gt; &lt;Button variant=&quot;raised&quot; className={classes.button}&gt; Default &lt;/Button&gt; &lt;Button variant=&quot;raised&quot; color=&quot;primary&quot; className={classes.button}&gt; Primary &lt;/Button&gt; &lt;Button variant=&quot;raised&quot; color=&quot;secondary&quot; className={classes.button}&gt; Secondary &lt;/Button&gt; &lt;Button variant=&quot;raised&quot; color=&quot;secondary&quot; disabled className={classes.button}&gt; Disabled &lt;/Button&gt; &lt;input accept=&quot;image/*&quot; className={classes.input} id=&quot;raised-button-file&quot; multiple type=&quot;file&quot; /&gt; &lt;label htmlFor=&quot;raised-button-file&quot;&gt; &lt;Button variant=&quot;raised&quot; component=&quot;span&quot; className={classes.button}&gt; Upload &lt;/Button&gt; &lt;/label&gt; &lt;/div&gt; ); } RaisedButtons.propTypes = { classes: PropTypes.object.isRequired, }; export default withStyles(styles)(RaisedButtons);``` ## Context &lt;!--- How has this issue affected you? What are you trying to accomplish? Providing context helps us come up with a solution that is most useful in the real world. --&gt; Honesty I have wasted over 2 hours just trying to get a simple button working and I got an academic scholarship to a great school and been deving over a year now and it should not be this hard at all. Please just copy the style of how Bootstrap does it. Very easy to plug and play. ## Your Environment &lt;!--- Include as many relevant details about the environment with which you experienced the bug. --&gt; Chrome Version 62.0.3202.94 (Official Build) (64-bit) Linux Ubuntu OS 16.04 LTS &quot;react&quot;: &quot;^16.2.0&quot;, &quot;material-ui&quot;: &quot;^1.0.0-beta.31&quot;, &quot;material-ui-icons&quot;: &quot;^1.0.0-beta.17&quot;, "><pre lang="import" class="notranslate"><code class="notranslate">import Button from 'material-ui/Button'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; export default class Test extends Component { constructor(props) { super(props); } render() { return ( &lt;MuiThemeProvider&gt; &lt;Button variant="raised" color="primary"&gt; Hello World &lt;/Button&gt; &lt;/MuiThemeProvider&gt; ); } }``` OR ```import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from 'material-ui/styles'; import Button from 'material-ui/Button'; const styles = theme =&gt; ({ button: { margin: theme.spacing.unit, }, input: { display: 'none', }, }); function RaisedButtons(props) { const { classes } = props; return ( &lt;div&gt; &lt;Button variant="raised" className={classes.button}&gt; Default &lt;/Button&gt; &lt;Button variant="raised" color="primary" className={classes.button}&gt; Primary &lt;/Button&gt; &lt;Button variant="raised" color="secondary" className={classes.button}&gt; Secondary &lt;/Button&gt; &lt;Button variant="raised" color="secondary" disabled className={classes.button}&gt; Disabled &lt;/Button&gt; &lt;input accept="image/*" className={classes.input} id="raised-button-file" multiple type="file" /&gt; &lt;label htmlFor="raised-button-file"&gt; &lt;Button variant="raised" component="span" className={classes.button}&gt; Upload &lt;/Button&gt; &lt;/label&gt; &lt;/div&gt; ); } RaisedButtons.propTypes = { classes: PropTypes.object.isRequired, }; export default withStyles(styles)(RaisedButtons);``` ## Context &lt;!--- How has this issue affected you? What are you trying to accomplish? Providing context helps us come up with a solution that is most useful in the real world. --&gt; Honesty I have wasted over 2 hours just trying to get a simple button working and I got an academic scholarship to a great school and been deving over a year now and it should not be this hard at all. Please just copy the style of how Bootstrap does it. Very easy to plug and play. ## Your Environment &lt;!--- Include as many relevant details about the environment with which you experienced the bug. --&gt; Chrome Version 62.0.3202.94 (Official Build) (64-bit) Linux Ubuntu OS 16.04 LTS "react": "^16.2.0", "material-ui": "^1.0.0-beta.31", "material-ui-icons": "^1.0.0-beta.17", </code></pre></div>
0
<p dir="auto">Atom: v0.113<br> OS: Windows 7<br> Keyboard layout: Germany</p> <p dir="auto">Description:<br> The '@' character cannot be written, it seems that [Alt Gr] + [Q] is not working at all.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5131112/3544389/914d3abe-086c-11e4-80b0-5a7b1d117565.png"><img src="https://cloud.githubusercontent.com/assets/5131112/3544389/914d3abe-086c-11e4-80b0-5a7b1d117565.png" alt="keyboard_ger" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1789/3725775/61f87e3a-168c-11e4-940d-24ad61183ab5.png"><img src="https://cloud.githubusercontent.com/assets/1789/3725775/61f87e3a-168c-11e4-940d-24ad61183ab5.png" alt="screenshot 2014-07-28 13 20 40" 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 =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; 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 =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; 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> Having an empty base path within a module's routing loaded using loadChildren does not work with named outlet navigation.</p> <p dir="auto"><strong>Expected behavior</strong><br> Empty base path does work as documented in the <a href="https://angular.io/docs/ts/latest/guide/router.html#!#asynchronous-routing" rel="nofollow">Angular documentation on asynchronous routing</a>. Note that this issue occurs both with asynchronous routing (path-based) loadChildren usage as well as with <code class="notranslate">loadChildren: () =&gt; Module</code>.</p> <p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br> <a href="https://plnkr.co/edit/ps0ZiD3mHTte227Ws69T?p=preview" rel="nofollow">This</a> plunker shows the problem.<br> Clicking the 'Contact' link doesn't work and produces the error "Cannot match any routes."</p> <p dir="auto"><em><strong>app-routing.module</strong></em></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const appRoutes: Routes = [ { path: 'admin', loadChildren: () =&gt; AdminModule }, { path: '', redirectTo: '/admin', pathMatch: 'full' } ];"><pre class="notranslate"><code class="notranslate">const appRoutes: Routes = [ { path: 'admin', loadChildren: () =&gt; AdminModule }, { path: '', redirectTo: '/admin', pathMatch: 'full' } ]; </code></pre></div> <p dir="auto"><em><strong>admin-routing.module</strong></em></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const adminRoutes: Routes = [ { path: '', component: AdminComponent, children: [ { path: 'compose', component: ComposeMessageComponent, outlet: 'popup' } ] }];"><pre class="notranslate"><code class="notranslate">const adminRoutes: Routes = [ { path: '', component: AdminComponent, children: [ { path: 'compose', component: ComposeMessageComponent, outlet: 'popup' } ] }]; </code></pre></div> <p dir="auto"><a href="https://plnkr.co/edit/HrsFvUuPgo9KvlDQJ9uk?p=preview" rel="nofollow">This</a> plunker <em>does</em> work.</p> <p dir="auto"><em><strong>app-routing.module</strong></em></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const appRoutes: Routes = [ { path: 'admi', loadChildren: () =&gt; AdminModule }, { path: '', redirectTo: '/admi/n', pathMatch: 'full' } ];"><pre class="notranslate"><code class="notranslate">const appRoutes: Routes = [ { path: 'admi', loadChildren: () =&gt; AdminModule }, { path: '', redirectTo: '/admi/n', pathMatch: 'full' } ]; </code></pre></div> <p dir="auto"><em><strong>admin-routing.module</strong></em></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const adminRoutes: Routes = [ { path: 'n', component: AdminComponent, children: [ { path: 'compose', component: ComposeMessageComponent, outlet: 'popup' } ] }];"><pre class="notranslate"><code class="notranslate">const adminRoutes: Routes = [ { path: 'n', component: AdminComponent, children: [ { path: 'compose', component: ComposeMessageComponent, outlet: 'popup' } ] }]; </code></pre></div> <p dir="auto">The key difference is the adminRoutes path not being empty.</p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <ul dir="auto"> <li> <p dir="auto"><strong>Angular version:</strong> 2.4.5</p> </li> <li> <p dir="auto"><strong>Browser:</strong> all</p> </li> <li> <p dir="auto"><strong>Language:</strong> all</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 [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report [ ] feature request [ ] support request =&gt; 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">Aux-Routes are not found when using two levels of "default routes" (with <code class="notranslate">path:''</code>).<br> This config works:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" RouterModule.forRoot([ { path: 'tasks', component: TasksComponent, //container-component has two outlets! children: [ { path: '', component:TaskListComponent }, { path: 'overview/:id', component: TasksComponent, outlet: 'right' }, ] } ],"><pre class="notranslate"> <span class="pl-smi">RouterModule</span><span class="pl-kos">.</span><span class="pl-c1">forRoot</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-smi">TasksComponent</span><span class="pl-kos">,</span> <span class="pl-c">//container-component has two outlets! </span> <span class="pl-c1">children</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-smi">TaskListComponent</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">'overview/:id'</span><span class="pl-kos">,</span> <span class="pl-c1">component</span>: <span class="pl-smi">TasksComponent</span><span class="pl-kos">,</span> <span class="pl-c1">outlet</span>: <span class="pl-s">'right'</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">I can open the Tasks-overview by doing:</p> <p dir="auto"><code class="notranslate">http://localhost:4200/tasks/(right:overview/3)</code></p> <p dir="auto">See this plnkr and click "to list", "open aux"</p> <p dir="auto">As I want to extract the whole Tasks-Functionality into a <code class="notranslate">TasksModule</code> I need to be able to do something like this:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" RouterModule.forRoot([ { path: 'tasks', : children: [ // this one would be in main module //this is defined in the TasksModule: { path: '', component: TasksComponent, //container-component has two outlets! children: [ { path: '', component:TaskListComponent }, { path: 'overview/:id', component: TasksComponent, outlet: 'right' }, ] } ],"><pre class="notranslate"> <span class="pl-smi">RouterModule</span><span class="pl-kos">.</span><span class="pl-c1">forRoot</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">children</span>: <span class="pl-kos">[</span> <span class="pl-c">// this one would be in main module</span> <span class="pl-c">//this is defined in the TasksModule:</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-smi">TasksComponent</span><span class="pl-kos">,</span> <span class="pl-c">//container-component has two outlets! </span> <span class="pl-c1">children</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-smi">TaskListComponent</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">'overview/:id'</span><span class="pl-kos">,</span> <span class="pl-c1">component</span>: <span class="pl-smi">TasksComponent</span><span class="pl-kos">,</span> <span class="pl-c1">outlet</span>: <span class="pl-s">'right'</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">I would assume both configs are equivalent, and all of the "normal" routing works perfectly fine. But now the link above <code class="notranslate">http://localhost:4200/tasks/(right:overview/3)</code> leads to:</p> <p dir="auto"><code class="notranslate">Uncaught (in promise): Error: Cannot match any routes: 'tasks'</code></p> <p dir="auto">See this plnkr: <a href="http://plnkr.co/edit/xd77Mkpqfq6U9tKM4USU?p=preview" rel="nofollow">http://plnkr.co/edit/xd77Mkpqfq6U9tKM4USU?p=preview</a></p> <p dir="auto"><strong>Expected/desired behavior</strong></p> <p dir="auto">Aux-Routes should also work with empty-path parents</p> <p dir="auto"><strong>Reproduction of the problem</strong></p> <p dir="auto">Working version: <a href="http://plnkr.co/edit/Twx4hXQ0TLfHfrYSe4MO?p=preview" rel="nofollow">http://plnkr.co/edit/Twx4hXQ0TLfHfrYSe4MO?p=preview</a><br> Non-working version: <a href="http://plnkr.co/edit/xd77Mkpqfq6U9tKM4USU?p=preview" rel="nofollow">http://plnkr.co/edit/xd77Mkpqfq6U9tKM4USU?p=preview</a></p> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">Both versions of route definition should lead to the same behavior</p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p> <p dir="auto">With the current implementation it is impossible to create an encapsulated Config / Module for the tasks behaviour and include it under a certain path into the main config e.g. "myTasks".</p> <p dir="auto">/cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vsavkin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vsavkin">@vsavkin</a></p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <ul dir="auto"> <li><strong>Angular version:</strong> 2.0.0-rc.5</li> <li><strong>Browser:</strong> [all ]</li> <li><strong>Language:</strong> [TS ]</li> </ul>
1
<p dir="auto">From <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://task.ms/21408490">MSFT:21408490</a></p> <p dir="auto">If I enable the setting <code class="notranslate">experimental_showTabsInTitlebar</code> then maximize the window on a vertical monitor (1080x1920), the first column of text is cut off. Screenshot attached.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/18356694/59379370-08ef1e00-8d1c-11e9-827f-a28b7f119632.png"><img src="https://user-images.githubusercontent.com/18356694/59379370-08ef1e00-8d1c-11e9-827f-a28b7f119632.png" alt="image" 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 &quot;ver&quot; at a command prompt] Windows Terminal version (if applicable): Any other software?"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: [run "ver" at a command prompt] Windows Terminal version (if applicable): Any other software? </code></pre></div> <p dir="auto">Microsoft Windows [Version 10.0.18892.1001]</p> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Press the maximize button when the terminal is on a non-primary monitor</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">All text should be visible</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">A portion of the leftmost column of cells is cut off.</p> <p dir="auto">The text is fine when maximized on the primary monitor.</p>
1
<h3 dir="auto">Problem</h3> <p dir="auto">Latex compilers are very slow.</p> <h3 dir="auto">Proposed solution</h3> <p dir="auto"><a href="https://github.com/typst/typst">Typst</a> is orders of magnitude faster than any latex compiler (runs in milliseconds) and has a much easier to use syntax than latex (subjective but I think most agree). I'd like to request support for it as a rendering engine for math in figures.</p> <p dir="auto">I'm not sure how rendering is currently done, but here's an example of a 0-margin document with math using typst:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#set page(width: auto, height: auto, margin: 0pt) $ y = integral_(x_0)^x f(s) d s $"><pre lang="typst" class="notranslate"><code class="notranslate">#set page(width: auto, height: auto, margin: 0pt) $ y = integral_(x_0)^x f(s) d s $ </code></pre></div> <p dir="auto"><a href="https://typst.app/project/r4trB2mMP5Njm3x_X8teFo" rel="nofollow">Live preview on typst.app</a></p>
<h3 dir="auto">Problem</h3> <p dir="auto">I don't use Texlive, I use <a href="https://github.com/tectonic-typesetting/tectonic">Tectonic</a>, and I using <code class="notranslate">plt.rcParams['text.usetex']</code> requires me to download a different LaTeX engine, not only because the <code class="notranslate">latex</code> binary is searched, but also because the <code class="notranslate">tex</code> files that are meant for compilation are meant for <code class="notranslate">pdflatex</code>, and not <code class="notranslate">xetex</code>, which tectonic essentially wraps.</p> <h3 dir="auto">Proposed solution</h3> <p dir="auto">Add a new option to <code class="notranslate">rcParams</code> which will enable using a different LaTeX engine, and another option that will control whether the generated <code class="notranslate">tex</code> files should be intended for xetex or <code class="notranslate">pdftex</code>.</p> <p dir="auto">This seems not too complicated to solve, but I wish to know what do you think, and whether you'd be willing to add more moving parts to <a href="https://github.com/matplotlib/matplotlib/blob/2e921df22ba6b2a7782241798b042403c04cbdaf/lib/matplotlib/texmanager.py#L56"><code class="notranslate">TexManager</code> class</a>, especially since the generated tex files for a <code class="notranslate">xetex</code> engine should be substantially different.</p>
1
<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-4372?redirect=false" rel="nofollow">SPR-4372</a></strong> and commented</p> <p dir="auto">I would like to do some custom operations when scanning for components which has lead me to wish for some additional extension points the Spring Component Scanning.</p> <ol dir="auto"> <li> <p dir="auto">It would be nice if there were some sort of way to manipulate each BeanDefinitions found in ClassPathBeanDefinitionScanner.doScan prior to them being registered. A simple protected callback method would be sufficient for my needs.</p> </li> <li> <p dir="auto">Provide some way to specify a custom ClassPathBeanDefinitionScanner in ComponentScanBeanDefinitionParser so that in order to use my custom ClassPathBeanDefinitionScanner I won't have to completely re-implement ComponentScanBeanDefinitionParser.parse()</p> </li> </ol> <p dir="auto">Thoughts?</p> <p dir="auto">Mike</p> <hr> <p dir="auto"><strong>Affects:</strong> 2.5.1</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=drubio" rel="nofollow">Daniel Rubio</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6082?redirect=false" rel="nofollow">SPR-6082</a></strong> and commented</p> <p dir="auto">upgrading a functioning 2.5 app to the most recent 3.0 (M4) release.</p> <p dir="auto">I have the following bean definition that fails in 3.0 M4:</p> <p dir="auto">&lt;bean id="localeResolver"^M<br> class="org.springframework.web.servlet.i18n.CookieLocaleResolver"&gt;^M<br> &lt;property name="cookieName" value="language" /&gt;^M<br> &lt;property name="cookieMaxAge" value="3600" /&gt;^M<br> &lt;property name="defaultLocale" value="en" /&gt;^M<br> &lt;/bean&gt;</p> <p dir="auto">When I deploy this in Tomcat 6.20 I get the following error.</p> <p dir="auto">SEVERE: Allocate exception for servlet court<br> org.springframework.beans.NotWritablePropertyException: Invalid property 'cookieMaxAge' of bean class [org.springframework.web.servlet.i18n.CookieLocaleResolver]: Bean property 'cookieMaxAge' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?<br> at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:850)<br> at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:701)<br> at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)<br> at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:60)<br> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1330)<br> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1060)<br> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)<br> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:449)<br> at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:289)<br> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)<br> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:286)<br> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:188)<br> at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:528)<br> at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:716)<br> at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:383)<br> at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:447)<br> at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:342)<br> at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:308)<br> at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)<br> at javax.servlet.GenericServlet.init(GenericServlet.java:212)<br> at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)<br> at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)<br> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)<br> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)<br> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)<br> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)<br> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)</p> <p dir="auto">I reviewed the docs on M4</p> <p dir="auto"><a href="http://static.springsource.org/spring/docs/3.0.0.M4/javadoc-api/org/springframework/web/servlet/i18n/CookieLocaleResolver.html" rel="nofollow">http://static.springsource.org/spring/docs/3.0.0.M4/javadoc-api/org/springframework/web/servlet/i18n/CookieLocaleResolver.html</a></p> <p dir="auto">The method is inherited from org.springframework.web.util.CookieGenerator . I saw the source<br> <a href="https://src.springframework.org/svn/spring-framework/tags/spring-framework-3.0.0.M4/org.springframework.web/src/main/java/org/springframework/web/util/CookieGenerator.java" rel="nofollow">https://src.springframework.org/svn/spring-framework/tags/spring-framework-3.0.0.M4/org.springframework.web/src/main/java/org/springframework/web/util/CookieGenerator.java</a><br> And the set and getCookieMaxAge methods appears to be there.</p> <p dir="auto">Not exactly sure what is the root of this error message/bug.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0 M4</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="398097253" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10738" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10738/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10738">#10738</a> Differing types for getter/setter of CookieGenerator.cookieMaxAge causes configuring to fail. (<em><strong>"duplicates"</strong></em>)</li> </ul>
0
<p dir="auto"><strong>Migrated issue, originally created by Mehdi GMIRA (<a href="https://github.com/mehdigmira">@mehdigmira</a>)</strong></p> <p dir="auto">I encountred a bug with the postgres specific "DISTINCT ON" in SQLAlchemy<br> The real SA query I'm using is more complicated than this, but it sums up to :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="query = db.session.query(c1, c2, c3, c4).distinct(c1, c2).order_by(c1, c2, c3)"><pre class="notranslate"><code class="notranslate">query = db.session.query(c1, c2, c3, c4).distinct(c1, c2).order_by(c1, c2, c3) </code></pre></div> <p dir="auto">when i compile the query by doing:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="query.statement.compile(dialect=postgres.dialect())"><pre class="notranslate"><code class="notranslate">query.statement.compile(dialect=postgres.dialect()) </code></pre></div> <p dir="auto">The actual query is</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SELECT DISTINCT ON (c1, c2) c1, c2, c3, c4, c1, c2, c3 FROM .... ORDER BY c1, c2, c3"><pre class="notranslate"><code class="notranslate">SELECT DISTINCT ON (c1, c2) c1, c2, c3, c4, c1, c2, c3 FROM .... ORDER BY c1, c2, c3 </code></pre></div> <p dir="auto">As you can see, the columns c1, c2, c3 are repeated. After some investigation, it seems like this is caused by the order_by() part of the query (removing order by removes the repeated columns).<br> The weird thing is that when actually running the query (query.all()), I only get the column that I requested, and not the repeated ones as in the compiled statement.<br> This would have been fine with me. But the problem is it's preventing me from using a union(), because SA thinks I'm requesting more columns on one side of union().</p> <p dir="auto">I think It's a bug, but maybe I'm just doing something wrong.</p>
<p dir="auto"><strong>Describe your question</strong></p> <p dir="auto">I have an app where all the schemas are declared.<br> Have another readonly-app and want to shortcut schemas duplication for now by using <code class="notranslate">automap_base()</code>.<br> No error were given from main app, but when I'm trying to do:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Base = automap_base() Base.prepare(db.engine, reflect=True) User = Base.classes.user db.session.query(User).first() ArgumentError: Error creating backref 'episode_collection' on relationship 'episode.mentor': property of that name exists on mapper 'mapped class mentor-&gt;mentor'"><pre class="notranslate"><code class="notranslate">Base = automap_base() Base.prepare(db.engine, reflect=True) User = Base.classes.user db.session.query(User).first() ArgumentError: Error creating backref 'episode_collection' on relationship 'episode.mentor': property of that name exists on mapper 'mapped class mentor-&gt;mentor' </code></pre></div> <p dir="auto">I have Episode class which has relations with Mentor:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class Episode: ... author_id = db.Column(db.Integer, db.ForeignKey(&quot;mentor.id&quot;)) author = db.relationship(&quot;Mentor&quot;, backref='episodes_author') class Mentor: ... episodes_guest = db.relationship('Episode', secondary='episode_guest', backref='guests') class EpisodeGuest(db.Model): ... guest = db.relationship('Mentor', backref='episodes_proxy') episode = db.relationship('Episode', backref='guests_proxy')"><pre class="notranslate"><code class="notranslate">class Episode: ... author_id = db.Column(db.Integer, db.ForeignKey("mentor.id")) author = db.relationship("Mentor", backref='episodes_author') class Mentor: ... episodes_guest = db.relationship('Episode', secondary='episode_guest', backref='guests') class EpisodeGuest(db.Model): ... guest = db.relationship('Mentor', backref='episodes_proxy') episode = db.relationship('Episode', backref='guests_proxy') </code></pre></div> <p dir="auto">All in all. An episode should have <code class="notranslate">author</code> and <code class="notranslate">guests</code>.<br> In M2M table I used <code class="notranslate">episodes_proxy</code> naming to use this in <em>Flask-Admin</em> as an inline model.</p> <p dir="auto">Can't understand where this problem comes from. Everything looks right in the main app. But failed when I trying to create using<code class="notranslate"> automap_base()</code></p> <p dir="auto"><strong>Versions</strong></p> <ul dir="auto"> <li>OS: arch</li> <li>Python: 3.8</li> <li>SQLAlchemy: 1.3.20</li> <li>Database: postgresql</li> </ul> <p dir="auto"><strong>Have a nice day!</strong><br> <strong>You too :D</strong></p>
0
<p dir="auto"><strong>Describe the feature</strong>:</p> <p dir="auto">Currently, by setting server_side_encryption to true, the only method that is allowed is aes256. It would be great if we could specify other s3 encryption methods, e.g. aws:kms.</p> <p dir="auto">For aws:kms, if the bucket has a default key, it's just a matter of including the correct header, so one possibility may be an additional parameter to specify the value of the <code class="notranslate">x-amz-server-side-encryption</code> header to get sent with requests. But the ability to specify an ams key to use would also be great.</p>
<p dir="auto"><strong>Describe the feature</strong>: We'd like to store the snapshots of our elastic database in the aws bucket secured with the KMS server-side encryption. There already is a stale merge request (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="241472324" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/25620" data-hovercard-type="pull_request" data-hovercard-url="/elastic/elasticsearch/pull/25620/hovercard" href="https://github.com/elastic/elasticsearch/pull/25620">#25620</a>) and we are considering working on this feature, but only if you guys are keen in merging the change upstream.<br> Can you guys give us any clues with regards to your release schedules and when we could expect the changes end up in the mainline if we provide the patch in the following days?</p>
1
<p dir="auto">Chrome supports -- good</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/382183/6232359/69062bf2-b699-11e4-9fbd-e99a0af8dceb.gif"><img src="https://cloud.githubusercontent.com/assets/382183/6232359/69062bf2-b699-11e4-9fbd-e99a0af8dceb.gif" alt="kismac2build2" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto">Atom does not -- bad</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/382183/6232368/6d4ccc66-b699-11e4-91a6-b2081a53765c.gif"><img src="https://cloud.githubusercontent.com/assets/382183/6232368/6d4ccc66-b699-11e4-91a6-b2081a53765c.gif" alt="kismac2build" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto">Can the rubber band scroll effect at the top and bottom of the editor when reaching the end of the scrollable area be enabled? I'm not sure if this works yet on scrollable divs, but it would be nice.</p>
1
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/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: latest master branch</li> <li>Operating System version: macos</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Description</h3> <p dir="auto">in ChannelEventRunnable#run there is a switch-case fall through which is introduced in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/apache/dubbo/commit/b3e91fae80fa6016f0c48884ca0db0f942f2af77/hovercard" href="https://github.com/apache/dubbo/commit/b3e91fae80fa6016f0c48884ca0db0f942f2af77"><tt>b3e91fa</tt></a> .<br> I believe this is a little mistake, and UT is not necessary.</p> <p dir="auto">As shown below, there is no <code class="notranslate">break</code> statement after <code class="notranslate">SENT</code>, I will send a pr later.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="... case DISCONNECTED: try { handler.disconnected(channel); } catch (Exception e) { logger.warn(&quot;ChannelEventRunnable handle &quot; + state + &quot; operation error, channel is &quot; + channel, e); } break; case SENT: try { handler.sent(channel, message); } catch (Exception e) { logger.warn(&quot;ChannelEventRunnable handle &quot; + state + &quot; operation error, channel is &quot; + channel + &quot;, message is &quot; + message, e); } // no break statement here! case CAUGHT: try { handler.caught(channel, exception); } catch (Exception e) { logger.warn(&quot;ChannelEventRunnable handle &quot; + state + &quot; operation error, channel is &quot; + channel + &quot;, message is: &quot; + message + &quot;, exception is &quot; + exception, e); } break; default: logger.warn(&quot;unknown state: &quot; + state + &quot;, message is &quot; + message); }"><pre class="notranslate"><code class="notranslate">... case DISCONNECTED: try { handler.disconnected(channel); } catch (Exception e) { logger.warn("ChannelEventRunnable handle " + state + " operation error, channel is " + channel, e); } break; case SENT: try { handler.sent(channel, message); } catch (Exception e) { logger.warn("ChannelEventRunnable handle " + state + " operation error, channel is " + channel + ", message is " + message, e); } // no break statement here! case CAUGHT: try { handler.caught(channel, exception); } catch (Exception e) { logger.warn("ChannelEventRunnable handle " + state + " operation error, channel is " + channel + ", message is: " + message + ", exception is " + exception, e); } break; default: logger.warn("unknown state: " + state + ", message is " + message); } </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/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: reproduced with 2.7.3, 2.7.8</li> <li>Operating System version: Windows 10</li> <li>Java version: 1.8.0</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>Register a service with a non-dubbo service name (e.g. <code class="notranslate">user-service</code>) in a Nacos registry</li> <li>Start a dubbo provider registering to the same Nacos registry</li> <li>Start a dubbo consumer consuming the service provided by the former provider, with a wildcard selector ('*') in group or version</li> </ol> <h3 dir="auto">Expected Result</h3> <p dir="auto">The consumer can initialize and call services successfully.</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">What actually happens?</p> <p dir="auto">The consumer aborted during initialization, with the following exception:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Exception in thread &quot;main&quot; org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoServiceComponent': Injection of @DubboReference dependencies is failed; nested exception is java.lang.IllegalStateException: Failed to subscribe consumer://192.168.1.241/org.apache.dubbo.demo.DemoService?application=dubbo-demo-annotation-consumer&amp;category=providers,configurators,routers&amp;dubbo=2.0.2&amp;group=*&amp;init=false&amp;interface=org.apache.dubbo.demo.DemoService&amp;methods=sayHello,sayHelloAsync&amp;pid=10232&amp;side=consumer&amp;sticky=false&amp;timestamp=1603163878386, cause: 1 at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:146) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1268) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) at org.springframework.context.annotation.AnnotationConfigApplicationContext.&lt;init&gt;(AnnotationConfigApplicationContext.java:84) at org.apache.dubbo.demo.consumer.Application.main(Application.java:34) Caused by: java.lang.IllegalStateException: Failed to subscribe consumer://192.168.1.241/org.apache.dubbo.demo.DemoService?application=dubbo-demo-annotation-consumer&amp;category=providers,configurators,routers&amp;dubbo=2.0.2&amp;group=*&amp;init=false&amp;interface=org.apache.dubbo.demo.DemoService&amp;methods=sayHello,sayHelloAsync&amp;pid=10232&amp;side=consumer&amp;sticky=false&amp;timestamp=1603163878386, cause: 1 at org.apache.dubbo.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:350) at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:105) at org.apache.dubbo.registry.integration.RegistryDirectory.subscribe(RegistryDirectory.java:185) at org.apache.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:469) at org.apache.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:449) at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:72) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:161) at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java) at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:356) at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:296) at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:200) at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.doGetInjectedBean(ReferenceAnnotationBeanPostProcessor.java:144) at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.getInjectedObject(AbstractAnnotationBeanPostProcessor.java:359) at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor$AnnotatedFieldElement.inject(AbstractAnnotationBeanPostProcessor.java:539) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:142) ... 12 more Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 at org.apache.dubbo.registry.nacos.NacosServiceName.&lt;init&gt;(NacosServiceName.java:80) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at org.apache.dubbo.registry.nacos.NacosRegistry.lambda$filterServiceNames$4(NacosRegistry.java:303) at org.apache.dubbo.registry.nacos.NacosRegistry.execute(NacosRegistry.java:583) at org.apache.dubbo.registry.nacos.NacosRegistry.filterServiceNames(NacosRegistry.java:295) at org.apache.dubbo.registry.nacos.NacosRegistry.getServiceNames0(NacosRegistry.java:286) at org.apache.dubbo.registry.nacos.NacosRegistry.getServiceNames(NacosRegistry.java:267) at org.apache.dubbo.registry.nacos.NacosRegistry.doSubscribe(NacosRegistry.java:178) at org.apache.dubbo.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:333) ... 27 more"><pre class="notranslate"><code class="notranslate">Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoServiceComponent': Injection of @DubboReference dependencies is failed; nested exception is java.lang.IllegalStateException: Failed to subscribe consumer://192.168.1.241/org.apache.dubbo.demo.DemoService?application=dubbo-demo-annotation-consumer&amp;category=providers,configurators,routers&amp;dubbo=2.0.2&amp;group=*&amp;init=false&amp;interface=org.apache.dubbo.demo.DemoService&amp;methods=sayHello,sayHelloAsync&amp;pid=10232&amp;side=consumer&amp;sticky=false&amp;timestamp=1603163878386, cause: 1 at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:146) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1268) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) at org.springframework.context.annotation.AnnotationConfigApplicationContext.&lt;init&gt;(AnnotationConfigApplicationContext.java:84) at org.apache.dubbo.demo.consumer.Application.main(Application.java:34) Caused by: java.lang.IllegalStateException: Failed to subscribe consumer://192.168.1.241/org.apache.dubbo.demo.DemoService?application=dubbo-demo-annotation-consumer&amp;category=providers,configurators,routers&amp;dubbo=2.0.2&amp;group=*&amp;init=false&amp;interface=org.apache.dubbo.demo.DemoService&amp;methods=sayHello,sayHelloAsync&amp;pid=10232&amp;side=consumer&amp;sticky=false&amp;timestamp=1603163878386, cause: 1 at org.apache.dubbo.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:350) at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:105) at org.apache.dubbo.registry.integration.RegistryDirectory.subscribe(RegistryDirectory.java:185) at org.apache.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:469) at org.apache.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:449) at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:72) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:161) at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java) at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:356) at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:296) at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:200) at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.doGetInjectedBean(ReferenceAnnotationBeanPostProcessor.java:144) at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.getInjectedObject(AbstractAnnotationBeanPostProcessor.java:359) at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor$AnnotatedFieldElement.inject(AbstractAnnotationBeanPostProcessor.java:539) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:142) ... 12 more Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 at org.apache.dubbo.registry.nacos.NacosServiceName.&lt;init&gt;(NacosServiceName.java:80) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at org.apache.dubbo.registry.nacos.NacosRegistry.lambda$filterServiceNames$4(NacosRegistry.java:303) at org.apache.dubbo.registry.nacos.NacosRegistry.execute(NacosRegistry.java:583) at org.apache.dubbo.registry.nacos.NacosRegistry.filterServiceNames(NacosRegistry.java:295) at org.apache.dubbo.registry.nacos.NacosRegistry.getServiceNames0(NacosRegistry.java:286) at org.apache.dubbo.registry.nacos.NacosRegistry.getServiceNames(NacosRegistry.java:267) at org.apache.dubbo.registry.nacos.NacosRegistry.doSubscribe(NacosRegistry.java:178) at org.apache.dubbo.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:333) ... 27 more </code></pre></div> <h3 dir="auto">Root Cause</h3> <p dir="auto">When NacosRegistry tries to subscribe dubbo services with wildcard in group or version, it will fetch and parse all service names from nacos. However the parsing logic made a wrong assumption that all services names conform to the dubbo service format like <code class="notranslate">providers:org.apache.dubbo.demo.DemoService:1.0.0:group1</code>, while there may be other service names like <code class="notranslate">user-service</code> in the registry.</p>
0
<p dir="auto">In Sublime text I can select text and drag and drop it to a new line.</p> <p dir="auto">This feature would be great to have in Atom. :)</p>
<p dir="auto">I was sure an issue was already opened for this, but can't find it now.</p> <p dir="auto">Halp ticket:</p> <ul dir="auto"> <li>support/5124ebc4cfa211e3871387e11a229b02</li> </ul> <p dir="auto">Would be cool if it was possible to select some text and then drag-and-drop it to some other place.</p>
1
<p dir="auto">We have an issue with some of our run scripts that utilize the "start" command and have isolated it to the changes in 1809 vs 1803. This seems to be different from the other issues that have been identified.</p> <p dir="auto">Specifically, when using <code class="notranslate">start</code> to call a command/program that exists in a directory other than the current, calling directory, and using the <code class="notranslate">/min</code> or <code class="notranslate">/max</code> parameters, the command/program is not found. Providing an explicit path to the command fixes this.</p> <p dir="auto">Example:</p> <p dir="auto">In 1803, the following command worked.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="start /D &quot;%PROGRAMFILES%\IIS Express&quot; /min iisexpress.exe /path:%WEBPATH% /port:%WEBPORT%"><pre class="notranslate"><code class="notranslate">start /D "%PROGRAMFILES%\IIS Express" /min iisexpress.exe /path:%WEBPATH% /port:%WEBPORT% </code></pre></div> <p dir="auto">In 1809, it says that the command or program <code class="notranslate">iisexpress.exe</code> cannot be found. Removing /min fixes this. Running the command from the IIS Express folder fixes this. Adding the IIS Express folder to the <code class="notranslate">%PATH%</code> fixes this. To me this highlights another issue in the implementation of the /min flag in 1809, that it does not seem to be searching for commands in the directory provided.</p> <p dir="auto">After further testing it seems that any command prompts open or commands that are available which run from the <code class="notranslate">start</code>ed process are successfully executed in the target path. For instance, passing in <code class="notranslate">dir</code> to <code class="notranslate">start</code> successfully outputs the IIS Express directory in the new window.</p> <p dir="auto">I'm wondering if there is a difference in how the 'command' is being processed. That is, if it was previously being processed as a <em>command</em> but now it's being processed as a <em>program</em>, and it can't find the 'program' in the local directory. If so IMO this is a breaking change to the functionality.</p> <p dir="auto">One option would be to add a flag (that I've not been able to find in the directory) of hard-defining the provided 'command as a <em>command</em> instead of a <em>program</em>. Another would be a flag that allows the path for not finding a target <em>program</em> to fall through into executing as a <em>command</em>. Lastly, the code for detecting if the <em>program</em> exists should prepend the target path to it, either by default or with a flag. This is all speculation though, as I can't see the source.</p>
<p dir="auto">In 1809, the way the <code class="notranslate">start</code> command (from <code class="notranslate">cmd.exe</code>) behaves has changed. You can work around it by adding <code class="notranslate">/max</code> or <code class="notranslate">/min</code> after <code class="notranslate">start</code>.</p> <p dir="auto">Two concrete examples:</p> <ol dir="auto"> <li> <p dir="auto">Running something off a network share from a command prompt like:<br> <code class="notranslate">start z:\myapp.exe</code><br> will now throw up a security warning dialog, when it did not in 1803 and earlier.</p> </li> <li> <p dir="auto">A powershell script like this:<br> <code class="notranslate">$script={&amp; cmd.exe /c start notepad.exe}</code><br> <code class="notranslate">$job = start-job -scriptblock $script</code><br> would give you a job with state Running in 1803, until you closed notepad. In 1809, the job state is Completed before notepad is closed.</p> </li> </ol> <p dir="auto">Adding <code class="notranslate">/max</code> or <code class="notranslate">/min</code> after <code class="notranslate">start</code> restores old behavior for both of these! That is crazy...</p> <p dir="auto">Both of these behavior changes are going to break tools/code that rely on the old behaviors of no security prompt and the powershell job not being Complete until the started program exits.</p> <p dir="auto">You can see how dramatically <code class="notranslate">start</code> has changed if you run procmon and filter to only <code class="notranslate">cmd.exe</code> process events. In Win10 1803, open a command prompt and do<br> <code class="notranslate">start notepad.exe</code><br> It results in &lt;100 events. Run in 1809 and get &gt;1000. Add /max and it drops back to &lt;100.</p>
1
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.8</li> <li>Operating System version: MacOS 15.17</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <p dir="auto">Define a Main class for start dubbo include:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ClassPathXmlApplicationContext parentContext = new ClassPathXmlApplicationContext(&quot;classpath:applicationContext-root.xml&quot;); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] {&quot;classpath:/configs/applicationContext-app.xml&quot; }, parentContext); ApplicationContext.setContainer(context); context.start(); System.in.read(); "><pre class="notranslate"><code class="notranslate">ClassPathXmlApplicationContext parentContext = new ClassPathXmlApplicationContext("classpath:applicationContext-root.xml"); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"classpath:/configs/applicationContext-app.xml" }, parentContext); ApplicationContext.setContainer(context); context.start(); System.in.read(); </code></pre></div> <p dir="auto">In applicationContext-root.xml declare:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;dubbo:application name=&quot;dubbo-demo-api&quot; /&gt; &lt;dubbo:registry protocol=&quot;zookeeper&quot; address=&quot;172.20.71.128:2181&quot; /&gt;"><pre class="notranslate"><code class="notranslate">&lt;dubbo:application name="dubbo-demo-api" /&gt; &lt;dubbo:registry protocol="zookeeper" address="172.20.71.128:2181" /&gt; </code></pre></div> <p dir="auto">In applicationContext-app.xml declare:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &lt;dubbo:service interface=&quot;org.demo.DemoService&quot; ref=&quot;demoService&quot; /&gt; &lt;bean id=&quot;demoService&quot; class=&quot;org.demo.DemoServiceImpl&quot; /&gt;"><pre class="notranslate"><code class="notranslate"> &lt;dubbo:service interface="org.demo.DemoService" ref="demoService" /&gt; &lt;bean id="demoService" class="org.demo.DemoServiceImpl" /&gt; </code></pre></div> <p dir="auto">If declare dubbo service like above,demoService can not export to zookeeper registry.</p> <p dir="auto">In DubboBootstrap.java</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" private void exportServices() { configManager.getServices().forEach(sc -&gt; { // TODO, compatible with ServiceConfig.export() ServiceConfig serviceConfig = (ServiceConfig) sc; serviceConfig.setBootstrap(this); if (exportAsync) { ExecutorService executor = executorRepository.getServiceExporterExecutor(); Future&lt;?&gt; future = executor.submit(() -&gt; { sc.export(); exportedServices.add(sc); }); asyncExportingFutures.add(future); } else { sc.export(); exportedServices.add(sc); } }); }"><pre class="notranslate"><code class="notranslate"> private void exportServices() { configManager.getServices().forEach(sc -&gt; { // TODO, compatible with ServiceConfig.export() ServiceConfig serviceConfig = (ServiceConfig) sc; serviceConfig.setBootstrap(this); if (exportAsync) { ExecutorService executor = executorRepository.getServiceExporterExecutor(); Future&lt;?&gt; future = executor.submit(() -&gt; { sc.export(); exportedServices.add(sc); }); asyncExportingFutures.add(future); } else { sc.export(); exportedServices.add(sc); } }); } </code></pre></div> <p dir="auto">configManager.getServices() return empty.</p>
<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> <ol dir="auto"> <li>xxx</li> <li>xxx</li> <li>xxx</li> </ol> <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>
0
<p dir="auto">From what I can see, LogisticRegressionCV.score always computes accuracy, not the metric given by <code class="notranslate">scoring</code>. That's inconsistent with the behavior of <code class="notranslate">GridSearchCV</code>. How do other <code class="notranslate">CV</code> estimators do that? I assume the same?<br> That's pretty unfortunate and I think we should change it. We did the same backward incompatible change in GridSearchCV before with a warning.</p>
<p dir="auto">input length (true, score) is 9177<br> output fp,tp,th size is 5816 but when I re-sample the data it is 5756 (I guess due to sampling with replacement creates duplicate data which is about 1/e)<br> in matlab, perfcurve returns fp,tp,th the same size as the input size or at specified fp/tp/th values.</p>
0
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import pandas as pd &gt;&gt;&gt; df = pd.DataFrame({'x': [1.], 'y': [2.], 'z': [3.]}) &gt;&gt;&gt; df.columns = ['x', 'x', 'z'] &gt;&gt;&gt; df[['x', 'y', 'z']] KeyError: &quot;['z'] not in index&quot;"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</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">&gt;&gt;</span><span class="pl-c1">&gt;</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-s">'x'</span>: [<span class="pl-c1">1.</span>], <span class="pl-s">'y'</span>: [<span class="pl-c1">2.</span>], <span class="pl-s">'z'</span>: [<span class="pl-c1">3.</span>]}) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span>.<span class="pl-s1">columns</span> <span class="pl-c1">=</span> [<span class="pl-s">'x'</span>, <span class="pl-s">'x'</span>, <span class="pl-s">'z'</span>] <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span>[[<span class="pl-s">'x'</span>, <span class="pl-s">'y'</span>, <span class="pl-s">'z'</span>]] <span class="pl-v">KeyError</span>: <span class="pl-s">"['z'] not in index"</span></pre></div> <p dir="auto">I expected to see <code class="notranslate">KeyError: "['y'] not in index"</code>.</p> <p dir="auto">I've tested this on the latest code in master (and on 0.16):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; pd.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 2.7.3.final.0 python-bits: 64 OS: Linux OS-release: 2.6.18-400.1.1.el5 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_GB LOCALE: None.None pandas: 0.18.1+279.g31f8e4d nose: None pip: 1.3.1 setuptools: 0.6 Cython: 0.22 numpy: 1.9.2 scipy: None statsmodels: None xarray: None IPython: 3.2.0-1 sphinx: None patsy: None dateutil: 2.4.2 pytz: 2015.6 blosc: None bottleneck: None tables: None numexpr: None matplotlib: None openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: None httplib2: None apiclient: None sqlalchemy: None pymysql: None psycopg2: None jinja2: None boto: None pandas_datareader: None"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; pd.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 2.7.3.final.0 python-bits: 64 OS: Linux OS-release: 2.6.18-400.1.1.el5 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_GB LOCALE: None.None pandas: 0.18.1+279.g31f8e4d nose: None pip: 1.3.1 setuptools: 0.6 Cython: 0.22 numpy: 1.9.2 scipy: None statsmodels: None xarray: None IPython: 3.2.0-1 sphinx: None patsy: None dateutil: 2.4.2 pytz: 2015.6 blosc: None bottleneck: None tables: None numexpr: None matplotlib: None openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: None httplib2: None apiclient: None sqlalchemy: None pymysql: None psycopg2: None jinja2: None boto: None pandas_datareader: None </code></pre></div>
<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="&gt;&gt;&gt; s = pd.Series([10,9,8,7,7,7,6]) &gt;&gt;&gt; s.nlargest(4) 0 10 1 9 2 8 3 7 dtype: int64"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-c1">10</span>,<span class="pl-c1">9</span>,<span class="pl-c1">8</span>,<span class="pl-c1">7</span>,<span class="pl-c1">7</span>,<span class="pl-c1">7</span>,<span class="pl-c1">6</span>]) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">s</span>.<span class="pl-en">nlargest</span>(<span class="pl-c1">4</span>) <span class="pl-c1">0</span> <span class="pl-c1">10</span> <span class="pl-c1">1</span> <span class="pl-c1">9</span> <span class="pl-c1">2</span> <span class="pl-c1">8</span> <span class="pl-c1">3</span> <span class="pl-c1">7</span> <span class="pl-s1">dtype</span>: <span class="pl-s1">int64</span></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">The docstrings list <code class="notranslate">False</code> as one of the possible argument values for <code class="notranslate">keep</code>. pandas raises a <code class="notranslate">ValueError</code> when attempting to use this parameter.</p> <h4 dir="auto">Expected Output</h4> <p dir="auto">It would be nice to have nlargest work like this.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; s.nlargest(4, keep=False) 0 10 1 9 2 8 3 7 4 7 5 7"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">s</span>.<span class="pl-en">nlargest</span>(<span class="pl-c1">4</span>, <span class="pl-s1">keep</span><span class="pl-c1">=</span><span class="pl-c1">False</span>) <span class="pl-c1">0</span> <span class="pl-c1">10</span> <span class="pl-c1">1</span> <span class="pl-c1">9</span> <span class="pl-c1">2</span> <span class="pl-c1">8</span> <span class="pl-c1">3</span> <span class="pl-c1">7</span> <span class="pl-c1">4</span> <span class="pl-c1">7</span> <span class="pl-c1">5</span> <span class="pl-c1">7</span></pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> # Paste the output here pd.show_versions() here INSTALLED VERSIONS ------------------ commit: None python: 3.6.1.final.0 python-bits: 64 OS: Darwin OS-release: 15.6.0 machine: x86_64 processor: i386 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.0.7<br> pip: 9.0.1<br> setuptools: 35.0.2<br> Cython: 0.25.2<br> numpy: 1.13.0<br> scipy: 0.19.0<br> xarray: None<br> IPython: 6.0.0<br> sphinx: 1.5.5<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.4.7<br> xlrd: 1.0.0<br> xlwt: 1.2.0<br> xlsxwriter: 0.9.6<br> lxml: 3.7.3<br> bs4: 4.6.0<br> html5lib: 0.999999999<br> sqlalchemy: 1.1.9<br> pymysql: None<br> psycopg2: None<br> jinja2: 2.9.6<br> s3fs: None<br> pandas_gbq: None<br> pandas_datareader: 0.3.0.post</p> </details>
0
<p dir="auto">by <strong>jan.newmarch</strong>:</p> <pre class="notranslate">If a program has unused variables, then 6g produces a compile error. It would be nicer as a compile warning instead. Often I'm commenting out a piece of code during debugging which can change a variable from used to unused, meaning I have to temporarily get rid of the variable which is a nuisance. e.g. package main func main() { var n int } produces test.go:4: n declared and not used and no object file Preferred: same warning, but also an object file</pre>
<pre class="notranslate">Before filing a bug, please check whether it has been fixed since the latest release. Search the issue tracker and check that you're running the latest version of Go: Run "go version" and compare against <a href="http://golang.org/doc/devel/release.html" rel="nofollow">http://golang.org/doc/devel/release.html</a> If a newer version of Go exists, install it and retry what you did to reproduce the problem. Thanks. What does 'go version' print? go1.4rc1 darwin/amd64 What steps reproduce the problem? If possible, include a link to a program on play.golang.org. 1. install go from source code to build cross-compiler for android by cd $GOROOT/src &amp;&amp; \ ./all.bash &amp;&amp; \ CC_FOR_TARGET=$NDK_ROOT/bin/arm-linux-androideabi-gcc GOOS=android GOARCH=arm GOARM=7 ./make.bash 2. after install go from source code, there is no issue to build golang.org/x/mobile/example/basic for target android by ./make.bash in that folder. The android program can be successfully built. 3. But it have issue to build host darwin/amd64 cgo enabled code by go build local_cgo_enabled_folder or CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build local_cgo_enabled_folder What happened? cc1: error: unrecognized command line option '-m64' What should have happened instead? build successfully. Please provide any additional information below.</pre>
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">When developing an app, with or without a third-party server (<code class="notranslate">express</code>, for instance), the app should reload without "clearing" the terminal. When starting with <code class="notranslate">next dev --preserve-log</code>, the log should not be obscured. This option should also be available when starting programmatically with <code class="notranslate">const app = next({ dev, preserveLog: true });</code>.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">The log scrolls offscreen every time the app rebuilds.</p> <h2 dir="auto">Context</h2> <p dir="auto">I will often start troubleshooting code with <code class="notranslate">console.log</code>. Having to take my hands off the keyboard to scroll back through the logs slows me down and breaks my flow.</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><code class="notranslate">v4.1.1</code></td> </tr> <tr> <td>node</td> <td><code class="notranslate">v8.7.0</code></td> </tr> <tr> <td>OS</td> <td>macOS 10.13</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">When I upload details from a form to an end-point it works in dev server I can console.log and see the details.<br> But in production, both now and heroku, it returns error 501 not implemented.<br> It won't even log the first statement (content received) when I post to <code class="notranslate">/api/contact-us/add</code><br> Using server.get instead of post doesn't help either</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const express = require('express'); const next = require('next'); const mongoose = require('mongoose'); const bodyParser = require('body-parser'); const sgMail = require('@sendgrid/mail'); const dev = process.env.NODE_ENV !== 'production'; const app = next({ dev }); const handle = app.getRequestHandler(); const Contact = require('./database/ContactModel'); app.prepare() .then(() =&gt; { const server = express(); server.use(bodyParser.urlencoded({ extended: true })); server.use(bodyParser.json()); server.post('/api/contact-us/add', (req, res) =&gt; { console.log('Content received'); console.log(req.body); }); server.get('*', (req, res) =&gt; { return handle(req, res); }); server.listen(3000, '0.0.0.0', (err) =&gt; { if (err) throw err; console.log('&gt; Ready on http://localhost:3000'); }); }) .catch((ex) =&gt; { console.error(ex.stack); process.exit(1); });"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">express</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'express'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">next</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'next'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">mongoose</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'mongoose'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">bodyParser</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'body-parser'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">sgMail</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'@sendgrid/mail'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">dev</span> <span class="pl-c1">=</span> <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">NODE_ENV</span> <span class="pl-c1">!==</span> <span class="pl-s">'production'</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-s1">next</span><span class="pl-kos">(</span><span class="pl-kos">{</span> dev <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">handle</span> <span class="pl-c1">=</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">getRequestHandler</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-v">Contact</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'./database/ContactModel'</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-en">prepare</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">server</span> <span class="pl-c1">=</span> <span class="pl-s1">express</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">server</span><span class="pl-kos">.</span><span class="pl-en">use</span><span class="pl-kos">(</span><span class="pl-s1">bodyParser</span><span class="pl-kos">.</span><span class="pl-en">urlencoded</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">extended</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">server</span><span class="pl-kos">.</span><span class="pl-en">use</span><span class="pl-kos">(</span><span class="pl-s1">bodyParser</span><span class="pl-kos">.</span><span class="pl-en">json</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">server</span><span class="pl-kos">.</span><span class="pl-en">post</span><span class="pl-kos">(</span><span class="pl-s">'/api/contact-us/add'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</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">'Content received'</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">req</span><span class="pl-kos">.</span><span class="pl-c1">body</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">server</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">'*'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">handle</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">server</span><span class="pl-kos">.</span><span class="pl-en">listen</span><span class="pl-kos">(</span><span class="pl-c1">3000</span><span class="pl-kos">,</span> <span class="pl-s">'0.0.0.0'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span> <span class="pl-k">throw</span> <span class="pl-s1">err</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">'&gt; Ready on http://localhost:3000'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-kos">.</span><span class="pl-en">catch</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">ex</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">error</span><span class="pl-kos">(</span><span class="pl-s1">ex</span><span class="pl-kos">.</span><span class="pl-c1">stack</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-en">exit</span><span class="pl-kos">(</span><span class="pl-c1">1</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> <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.0.6</td> </tr> <tr> <td>node</td> <td>8.3.0</td> </tr> <tr> <td>OS</td> <td>macOS</td> </tr> <tr> <td>browser</td> <td></td> </tr> <tr> <td>etc</td> <td></td> </tr> </tbody> </table>
0
<p dir="auto">I am building a web app with Flask when I encountered the strangest error.</p> <p dir="auto"><code class="notranslate">pandas-0.19.2</code> calls in <code class="notranslate">pandas.core.indexing</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# 32-bit floating point machine epsilon _eps = np.finfo('f4').eps"><pre class="notranslate"><code class="notranslate"># 32-bit floating point machine epsilon _eps = np.finfo('f4').eps </code></pre></div> <p dir="auto">The call never finish in <code class="notranslate">numpy-1.12.0</code> when called from the Apache server environment with <code class="notranslate">mod_wsgi</code> (compiled for <code class="notranslate">Python/3.5.1+</code> and runtime using <code class="notranslate">Python/3.5.2</code>). The code loads properly when run from a normal <code class="notranslate">Python/3.5.2</code> interpreter.</p> <p dir="auto">The very same code executes properly with <code class="notranslate">pandas-0.18.1</code> and <code class="notranslate">numpy-1.11.1</code> in the same Apache setup.</p>
<p dir="auto">If an application is using multiple embedded sub interpreters that use numpy, there is a possibility that floating point errors can cause the thread to deadlock. I traced this down to ufunc_object's _error_handler() method where it does NPY_ALLOW_C_API and that freezes on PyGILStateEnsure(). Interestingly, the PyGILState API is allegedly unsafe for applications using sub interpreters, but it works fine as long as long as each sub interpreter is on its own thread.</p> <p dir="auto">There is a workaround to call numpy.seterr(all='ignore') as that will not even enter the method. Ideally the print option would also not get the GIL as the GIL should not be needed for that. In the meantime I added a warning to Jep when it detects an interpreter on the same thread in the hopes of deterring the conditions that can cause this. I have a test case that illustrates the problem at <a href="https://github.com/mrj0/jep/blob/v3.3.0rc/src/jep/test/numpy/TestNumpyGILFreeze.java">https://github.com/mrj0/jep/blob/v3.3.0rc/src/jep/test/numpy/TestNumpyGILFreeze.java</a></p> <p dir="auto">This is somewhat related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="20274662" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/3837" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/3837/hovercard" href="https://github.com/numpy/numpy/issues/3837">gh-3837</a>. If you have problems running the test case, you may need to configure the environment variables PATH, LD_LIBRARY_PATH, or LD_PRELOAD depending on your system.</p>
1
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] feature request"><pre class="notranslate"><code class="notranslate">[x] feature request </code></pre></div> <p dir="auto">Currently it's very verbose to access route data or params from a service or non active route. To simplify this we can introduce <code class="notranslate">RootActivatedRoute</code> with additional props:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class RootActivatedRoute extends ActivatedRoute { current: ActivatedRoute; currentSnapshot // for symmetry, but I never use it }"><pre class="notranslate"><code class="notranslate">class RootActivatedRoute extends ActivatedRoute { current: ActivatedRoute; currentSnapshot // for symmetry, but I never use it } </code></pre></div> <p dir="auto">Every <code class="notranslate">ActivatedRoute</code> has a reference to the root <code class="notranslate">ActivatedRoute</code> so it will be very simple and fast to update these props on every successful navigation.</p> <p dir="auto">Instead of</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="this.router.events .filter(event =&gt; event instanceof NavigationEnd) .map(() =&gt; this.activatedRoute) .map(route =&gt; { while (route.firstChild) route = route.firstChild; return route; }) .filter(route =&gt; route.outlet === 'primary') .mergeMap(route =&gt; route.data) .subscribe((data) =&gt; ...);"><pre class="notranslate"><code class="notranslate">this.router.events .filter(event =&gt; event instanceof NavigationEnd) .map(() =&gt; this.activatedRoute) .map(route =&gt; { while (route.firstChild) route = route.firstChild; return route; }) .filter(route =&gt; route.outlet === 'primary') .mergeMap(route =&gt; route.data) .subscribe((data) =&gt; ...); </code></pre></div> <p dir="auto">we will be able to do</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="this.router.events .filter(event =&gt; event instanceof NavigationEnd) .mergeMap(() =&gt; this.activatedRoute.root.current.data) .subscribe((data) =&gt; ...);"><pre class="notranslate"><code class="notranslate">this.router.events .filter(event =&gt; event instanceof NavigationEnd) .mergeMap(() =&gt; this.activatedRoute.root.current.data) .subscribe((data) =&gt; ...); </code></pre></div> <p dir="auto">Or we can even make <code class="notranslate">current</code> an <code class="notranslate">Observable</code> so we won't need to use router events:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="this.activatedRoute.root.current .mergeMap(activatedRoute =&gt; activatedRoute.data) .subscribe((data) =&gt; ...);"><pre class="notranslate"><code class="notranslate">this.activatedRoute.root.current .mergeMap(activatedRoute =&gt; activatedRoute.data) .subscribe((data) =&gt; ...); </code></pre></div> <p dir="auto">It will work from any component or service.</p> <p dir="auto">Should be pretty easy to implement. What do you think <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vicb/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vicb">@vicb</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vsavkin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vsavkin">@vsavkin</a> ?</p>
<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 =&gt; search github for a similar issue or PR before submitting [x] feature request [x] support request =&gt; 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 =&gt; search github for a similar issue or PR before submitting [x] feature request [x] support request =&gt; 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> When using a parametrized route which targets a component, only this component can access those parameters.</p> <p dir="auto"><strong>Expected/desired behavior</strong><br> It might be necessary to read the parameters in other components.</p> <p dir="auto"><strong>Reproduction of the problem</strong><br> If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via <a href="https://plnkr.co" rel="nofollow">https://plnkr.co</a> or similar (you can use this template as a starting point: <a href="http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5" rel="nofollow">http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5</a>).<br> Consider the following route configuration</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export const routes: RouterConfig = [ { path: 'confirmation/:hashID', component: ConfirmationComponent, canActivate: [AuthGuard] }, ]; "><pre class="notranslate"><code class="notranslate">export const routes: RouterConfig = [ { path: 'confirmation/:hashID', component: ConfirmationComponent, canActivate: [AuthGuard] }, ]; </code></pre></div> <p dir="auto">Consider the following code as part of the ConfirmationComponent</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="this.activatedRoute.params.subscribe(params =&gt; { var hashID = params['hashID']; },"><pre class="notranslate"><code class="notranslate">this.activatedRoute.params.subscribe(params =&gt; { var hashID = params['hashID']; }, </code></pre></div> <p dir="auto">If I use the above code in any other component, hashID won't be available. It is necessary to read location.path() and extract the hashID value.</p> <p dir="auto"><strong>What is the expected behavior?</strong><br> Although I understand that the targeted component it the ConfirmationComponent, sometimes other components might need to have access to the parameters explicitly written in the URL.</p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <ul dir="auto"> <li><strong>Angular version:</strong> 2.0.0-rc.4</li> <li><strong>Browser:</strong> [<strong>all</strong> | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]</li> <li><strong>Language:</strong> [all | <strong>TypeScript 1.8</strong> | ES6/7 | <strong>ES5</strong>]</li> </ul>
1
<h1 dir="auto">Summary of the new feature/enhancement</h1> It would help people who use multiple keyboards to easily setup macros without needing third party softwares. <h1 dir="auto">Proposed technical implementation details (optional)</h1> I want to be able to remap all the keys of more than one keyboard. Or perhaps of all connected keyboards.
<p dir="auto">Now if i type edge in Run(0.19.2), I get this:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/56914624/87852670-89784900-c936-11ea-9303-ba7d2531d7.png"><img src="https://user-images.githubusercontent.com/56914624/87852670-89784900-c936-11ea-9303-ba7d2531d7.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">However actually I want to open the sites I already opened, for which I have to scroll to the second page of Run.<br> Like this:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/56914624/87852695-ccd2b780-c936-11ea-911e-2709a69b2c.png"><img src="https://user-images.githubusercontent.com/56914624/87852695-ccd2b780-c936-11ea-911e-2709a69b2c.png" alt="image" style="max-width: 100%;"></a><br> Thank you guys in advance.</p>
0
<p dir="auto"><strong>Config:</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ &quot;presets&quot;: [ &quot;node6&quot;, &quot;stage-1&quot; ], &quot;plugins&quot;: [ &quot;babel-plugin-transform-async-to-generator&quot;, &quot;babel-plugin-syntax-async-functions&quot; ] }"><pre class="notranslate"><code class="notranslate">{ "presets": [ "node6", "stage-1" ], "plugins": [ "babel-plugin-transform-async-to-generator", "babel-plugin-syntax-async-functions" ] } </code></pre></div> <p dir="auto"><strong>Code:</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class A { log() { return new Promise(resolve =&gt; { setTimeout(function () { console.log('should print after 1 second'); resolve(); }, 1000); }); } } class B extends A { async log() { await super.log(); } } const b = new B; b.log();"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">A</span> <span class="pl-kos">{</span> <span class="pl-en">log</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-k">new</span> <span class="pl-v">Promise</span><span class="pl-kos">(</span><span class="pl-s1">resolve</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-en">setTimeout</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'should print after 1 second'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">resolve</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-c1">1000</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-k">class</span> <span class="pl-v">B</span> <span class="pl-k">extends</span> <span class="pl-v">A</span> <span class="pl-kos">{</span> <span class="pl-k">async</span> <span class="pl-en">log</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-smi">super</span><span class="pl-kos">.</span><span class="pl-en">log</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">const</span> <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">B</span><span class="pl-kos">;</span> <span class="pl-s1">b</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Expected:</strong></p> <p dir="auto">Should dump <code class="notranslate">should print after 1 second</code> to screen</p> <p dir="auto"><strong>Actual:</strong></p> <blockquote> <p dir="auto">yield super.log();<br> ^^^^^<br> SyntaxError: 'super' keyword unexpected here</p> </blockquote> <p dir="auto"><strong>Issue:</strong></p> <p dir="auto">The issue is that an <code class="notranslate">await</code> statement is wrapped like this...</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let B = class B extends A { log() { return _asyncToGenerator(function* () { yield super.log(); // &lt;--- `super` loses its context })(); } };"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-v">B</span> <span class="pl-c1">=</span> <span class="pl-k">class</span> <span class="pl-v">B</span> <span class="pl-k">extends</span> <span class="pl-v">A</span> <span class="pl-kos">{</span> <span class="pl-en">log</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-en">_asyncToGenerator</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-c1">*</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">yield</span> <span class="pl-smi">super</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// &lt;--- `super` loses its context</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">This fixes it:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let B = class B extends A { log() { const fn = super.log.bind(this); return _asyncToGenerator(function*() { yield fn.call(); })(); } };"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-v">B</span> <span class="pl-c1">=</span> <span class="pl-k">class</span> <span class="pl-v">B</span> <span class="pl-k">extends</span> <span class="pl-v">A</span> <span class="pl-kos">{</span> <span class="pl-en">log</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">fn</span> <span class="pl-c1">=</span> <span class="pl-smi">super</span><span class="pl-kos">.</span><span class="pl-c1">log</span><span class="pl-kos">.</span><span class="pl-en">bind</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-en">_asyncToGenerator</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-c1">*</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">yield</span> <span class="pl-s1">fn</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<blockquote> <p dir="auto">Issue originally made by Dmitriy Krasnikov (dmitriy.krasnikov)</p> </blockquote> <h3 dir="auto">Bug information</h3> <ul dir="auto"> <li><strong>Babel version:</strong> 6.3.26</li> <li><strong>Node version:</strong> 5.3</li> <li><strong>npm version:</strong> 3.3.12</li> </ul> <h3 dir="auto">Options</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ plugins:[ &quot;transform-async-to-generator&quot;, ] }"><pre class="notranslate"><code class="notranslate">{ plugins:[ "transform-async-to-generator", ] } </code></pre></div> <h3 dir="auto">Input code</h3> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export class BaseClass { async test(id){ console.log(id); } } export class ChildClass extends BaseClass{ async test(id){ id=1; super.test(id); } } let cls = new ChildClass(); cls.test(5);"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-v">BaseClass</span> <span class="pl-kos">{</span> <span class="pl-k">async</span> <span class="pl-en">test</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</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-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-v">ChildClass</span> <span class="pl-k">extends</span> <span class="pl-v">BaseClass</span><span class="pl-kos">{</span> <span class="pl-k">async</span> <span class="pl-en">test</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">id</span><span class="pl-c1">=</span><span class="pl-c1">1</span><span class="pl-kos">;</span> <span class="pl-smi">super</span><span class="pl-kos">.</span><span class="pl-en">test</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-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">let</span> <span class="pl-s1">cls</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">ChildClass</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">cls</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-c1">5</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <h3 dir="auto">Description</h3> <p dir="auto">Outputs:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export class BaseClass { test(id) { return _asyncToGenerator(function* () { console.log(id); })(); } } export class ChildClass extends BaseClass { test(id) { return _asyncToGenerator(function* () { id = 1; super.test(id); })(); } } let cls = new ChildClass(); cls.test(5);"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-v">BaseClass</span> <span class="pl-kos">{</span> <span class="pl-en">test</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-k">return</span> <span class="pl-en">_asyncToGenerator</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-c1">*</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-s1">id</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-v">ChildClass</span> <span class="pl-k">extends</span> <span class="pl-v">BaseClass</span> <span class="pl-kos">{</span> <span class="pl-en">test</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-k">return</span> <span class="pl-en">_asyncToGenerator</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-c1">*</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">id</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span><span class="pl-kos">;</span> <span class="pl-smi">super</span><span class="pl-kos">.</span><span class="pl-en">test</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-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-k">let</span> <span class="pl-s1">cls</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">ChildClass</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">cls</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-c1">5</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
1
<h3 dir="auto">Problem description</h3> <p dir="auto">this is what causing the problem<br> <code class="notranslate">&lt;JssProvider&gt;</code></p> <p dir="auto">This is a bug that i saw when making production build.</p> <p dir="auto"><strong>Below images the left side is development and right side is production.</strong></p> <p dir="auto">This is my component.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/1776d2a47658d96ba6b485367cff2cfac34f151095dd9fcf774a5f2aa37da73e/687474703a2f2f692e696d6775722e636f6d2f704248567362452e706e67"><img src="https://camo.githubusercontent.com/1776d2a47658d96ba6b485367cff2cfac34f151095dd9fcf774a5f2aa37da73e/687474703a2f2f692e696d6775722e636f6d2f704248567362452e706e67" alt="" data-canonical-src="http://i.imgur.com/pBHVsbE.png" style="max-width: 100%;"></a></p> <table role="table"> <thead> <tr> <th align="center">Dev classes</th> <th>Prod classes</th> </tr> </thead> <tbody> <tr> <td align="center">MuiPaper-root-7</td> <td>c7</td> </tr> <tr> <td align="center">MuiPaper-shadow2-b</td> <td>cb</td> </tr> <tr> <td align="center">MuiPaper-rounded-8</td> <td>c8</td> </tr> <tr> <td align="center">inject-Forgot-with-LangarStore-paper-3</td> <td>c3</td> </tr> </tbody> </table> <p dir="auto">Below you see <code class="notranslate">.c7</code> = <code class="notranslate">.MuiPaper-root-7</code> which should only have <code class="notranslate">background-color: #424242;</code>.<br> But in production it has another set of <code class="notranslate">style</code> declarations.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/50d7701ef723f37fef5b95e0815088350d8232b9da4c1c3ff05dccf9c5ca0599/687474703a2f2f692e696d6775722e636f6d2f6f4f38464e61342e706e67"><img src="https://camo.githubusercontent.com/50d7701ef723f37fef5b95e0815088350d8232b9da4c1c3ff05dccf9c5ca0599/687474703a2f2f692e696d6775722e636f6d2f6f4f38464e61342e706e67" alt="" data-canonical-src="http://i.imgur.com/oO8FNa4.png" style="max-width: 100%;"></a></p> <p dir="auto">Turns out in production <code class="notranslate">.inject-DarkError-with-DarkErrorStore-LangarStore-root-7</code> and <code class="notranslate">.MuiPaper-root-7</code> are given the same classname <code class="notranslate">.c7</code></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/f17348d3e28f6194f968f92a59ed7c82e861e06880e31c0ffce9f2ff33595904/687474703a2f2f692e696d6775722e636f6d2f78466332735a502e706e67"><img src="https://camo.githubusercontent.com/f17348d3e28f6194f968f92a59ed7c82e861e06880e31c0ffce9f2ff33595904/687474703a2f2f692e696d6775722e636f6d2f78466332735a502e706e67" alt="" data-canonical-src="http://i.imgur.com/xFc2sZP.png" style="max-width: 100%;"></a></p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">Screenshots only<br> <em>update</em>: <a href="https://github.com/dsslimshaddy/jssprovider-bug">https://github.com/dsslimshaddy/jssprovider-bug</a></p> <h3 dir="auto">Versions</h3> <ul dir="auto"> <li>Material-UI: beta6</li> <li>React: 15.6.1</li> <li>Browser: latest chrome</li> </ul>
<p dir="auto">When using keyboard to navigate to, and use, a SelectField, when activating the field to open the dropdown, the currently selected item is not highlighted, nor in focus.</p> <p dir="auto">Example: <a href="https://www.youtube.com/watch?v=swz82ul6Hao" rel="nofollow">https://www.youtube.com/watch?v=swz82ul6Hao</a></p> <p dir="auto">On clicking enter to open the dropdown, nothing is currently keyboard highlighted - on clicking "down" on the keyboard, the 2nd item is selected.</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">We would expect the first/current item to be focussed on opening the dropdown.</p> <h2 dir="auto">Current Behavior</h2> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>Tab to a SelectField</li> <li>Click enter to activate/open the field</li> <li>Note that nothing is currently focussed/selected</li> <li>Pressing down selects the next item in the list.</li> </ol> <h2 dir="auto">Context</h2> <p dir="auto">Getting complaints from users during testing that to select the first item, we need to click down, then up again, and confusing that nothing is focussed on activating the dropdown.</p> <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>0.18.0</td> </tr> <tr> <td>React</td> <td>15.6.1</td> </tr> <tr> <td>browser</td> <td>Any</td> </tr> <tr> <td>etc</td> <td></td> </tr> </tbody> </table>
0
<p dir="auto">Using <code class="notranslate">@cfunction</code> on a function without a stable return type and then calling the function through the returned function pointer produces a segfault. We discussed this on <a href="https://discourse.julialang.org/t/can-a-functionwrapper-be-used-with-a-function-that-isnt-type-stable/24977" rel="nofollow">discourse</a>, where we came up with several simple cases to reproduce the issue. The simplest one seems to be:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; f(x) = x ? 1 : 2.0 f (generic function with 1 method) julia&gt; fptr = @cfunction(f, Any, (Bool,)) Ptr{Nothing} @0x00007effcbe85e00 julia&gt; ccall(fptr, Any, (Bool,), true) Unreachable reached at 0x7effcbe85f2a signal (4): Illegal instruction"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-en">f</span>(x) <span class="pl-k">=</span> x <span class="pl-k">?</span> <span class="pl-c1">1</span> <span class="pl-k">:</span> <span class="pl-c1">2.0</span> f (generic <span class="pl-k">function</span> with <span class="pl-c1">1</span> method) julia<span class="pl-k">&gt;</span> fptr <span class="pl-k">=</span> <span class="pl-c1">@cfunction</span>(f, Any, (Bool,)) Ptr{Nothing} @<span class="pl-c1">0x00007effcbe85e00</span> julia<span class="pl-k">&gt;</span> <span class="pl-c1">ccall</span>(fptr, Any, (Bool,), <span class="pl-c1">true</span>) Unreachable reached at <span class="pl-c1">0x7effcbe85f2a</span> signal (<span class="pl-c1">4</span>)<span class="pl-k">:</span> Illegal instruction</pre></div>
<p dir="auto">I'm not sure if this change was expected going forward from 0.6. Previously this would have returned a function pointer to a function that threw a TypeError if the arguments produced a result that was not the same type as the returntype argument to cfunction.</p> <p dir="auto">Running julia-debug</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; unstable(x) = x &gt; 0 ? x : &quot;foo&quot; unstable (generic function with 1 method) julia&gt; handle = cfunction(unstable, Int32, Tuple{Int32}) Ptr{Nothing} @0x000065a36dc16c10 julia&gt; ccall(handle, Int32, (Int32,), 1) signal (11): Segmentation fault in expression starting at no file:0 unknown function (ip: 0x65a36dc16cd9) top-level scope at ./&lt;missing&gt; (unknown line) jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:383 [inlined] jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:402 [inlined] jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:801 jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:626 eval at ./boot.jl:298 [inlined] eval at /buildworker/worker/package_linux64/build/usr/share/julia/site/v0.7/REPL/src/REPL.jl:3 jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:383 [inlined] jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:402 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2089 eval_user_input at /buildworker/worker/package_linux64/build/usr/share/julia/site/v0.7/REPL/src/REPL.jl:84 jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:383 [inlined] jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:402 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2089 macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/site/v0.7/REPL/src/REPL.jl:115 [inlined] #29 at ./event.jl:92 jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:383 [inlined] jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:402 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2089 jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1523 [inlined] start_task at /buildworker/worker/package_linux64/build/src/task.c:268 unknown function (ip: 0xffffffffffffffff) Allocations: 4042586 (Pool: 4041316; Big: 1270); GC: 8 Segmentation fault (core dumped)"><pre class="notranslate"><code class="notranslate">julia&gt; unstable(x) = x &gt; 0 ? x : "foo" unstable (generic function with 1 method) julia&gt; handle = cfunction(unstable, Int32, Tuple{Int32}) Ptr{Nothing} @0x000065a36dc16c10 julia&gt; ccall(handle, Int32, (Int32,), 1) signal (11): Segmentation fault in expression starting at no file:0 unknown function (ip: 0x65a36dc16cd9) top-level scope at ./&lt;missing&gt; (unknown line) jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:383 [inlined] jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:402 [inlined] jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:801 jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:626 eval at ./boot.jl:298 [inlined] eval at /buildworker/worker/package_linux64/build/usr/share/julia/site/v0.7/REPL/src/REPL.jl:3 jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:383 [inlined] jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:402 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2089 eval_user_input at /buildworker/worker/package_linux64/build/usr/share/julia/site/v0.7/REPL/src/REPL.jl:84 jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:383 [inlined] jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:402 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2089 macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/site/v0.7/REPL/src/REPL.jl:115 [inlined] #29 at ./event.jl:92 jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:383 [inlined] jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:402 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2089 jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1523 [inlined] start_task at /buildworker/worker/package_linux64/build/src/task.c:268 unknown function (ip: 0xffffffffffffffff) Allocations: 4042586 (Pool: 4041316; Big: 1270); GC: 8 Segmentation fault (core dumped) </code></pre></div> <p dir="auto">In 0.6 the following was possible</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; function unstable(x) x &gt; 0 ? x : &quot;foo&quot; end unstable (generic function with 1 method) julia&gt; handle = cfunction(unstable, Int32, Tuple{Int32}) Ptr{Void} @0x00006b1ffd6a3fa0 julia&gt; ccall(handle, Int32, (Int32,), 1) 1 julia&gt; ccall(handle, Int32, (Int32,), 0) ERROR: TypeError: : in cfunction, expected Int32, got String Stacktrace: [1] anonymous at ./&lt;missing&gt;:? [2] macro expansion at ./REPL.jl:97 [inlined] [3] (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73"><pre class="notranslate"><code class="notranslate">julia&gt; function unstable(x) x &gt; 0 ? x : "foo" end unstable (generic function with 1 method) julia&gt; handle = cfunction(unstable, Int32, Tuple{Int32}) Ptr{Void} @0x00006b1ffd6a3fa0 julia&gt; ccall(handle, Int32, (Int32,), 1) 1 julia&gt; ccall(handle, Int32, (Int32,), 0) ERROR: TypeError: : in cfunction, expected Int32, got String Stacktrace: [1] anonymous at ./&lt;missing&gt;:? [2] macro expansion at ./REPL.jl:97 [inlined] [3] (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73 </code></pre></div>
1
<h2 dir="auto">Checklist</h2> <h4 dir="auto">Celery report</h4> <p dir="auto">software -&gt; celery:4.2.0rc4 (windowlicker) kombu:4.2.1 py:3.6.5<br> billiard:3.5.0.3 py-amqp:2.3.2<br> platform -&gt; system:Linux arch:64bit, ELF imp:CPython<br> loader -&gt; celery.loaders.app.AppLoader<br> settings -&gt; transport:amqp results:redis://redis/0</p> <p dir="auto">broker_url: 'amqp://user:********<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/rabbitmq/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rabbitmq">@rabbitmq</a>:5672/test'<br> result_backend: 'redis://redis/0'</p> <h2 dir="auto">Steps to reproduce</h2> <p dir="auto">When trying to create workflows which are started within a task like this:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#app.py @app.task def add(x, y): return x + y @app.task def kickstart(): test_chain = ( add.s(1, 1) | add.s(2) | group( add.s(3), add.s(4) ) ) result = test_chain() return result"><pre class="notranslate"><span class="pl-c">#app.py</span> <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-s1">task</span></span> <span class="pl-k">def</span> <span class="pl-en">add</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>): <span class="pl-k">return</span> <span class="pl-s1">x</span> <span class="pl-c1">+</span> <span class="pl-s1">y</span> <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-s1">task</span></span> <span class="pl-k">def</span> <span class="pl-en">kickstart</span>(): <span class="pl-s1">test_chain</span> <span class="pl-c1">=</span> ( <span class="pl-s1">add</span>.<span class="pl-en">s</span>(<span class="pl-c1">1</span>, <span class="pl-c1">1</span>) <span class="pl-c1">|</span> <span class="pl-s1">add</span>.<span class="pl-en">s</span>(<span class="pl-c1">2</span>) <span class="pl-c1">|</span> <span class="pl-en">group</span>( <span class="pl-s1">add</span>.<span class="pl-en">s</span>(<span class="pl-c1">3</span>), <span class="pl-s1">add</span>.<span class="pl-en">s</span>(<span class="pl-c1">4</span>) ) ) <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-en">test_chain</span>() <span class="pl-k">return</span> <span class="pl-s1">result</span></pre></div> <p dir="auto">one cannot build a graph out of the result of the <code class="notranslate">kickstart</code> task:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import app &gt;&gt;&gt; res = app.kickstart.delay() &gt;&gt;&gt; res.graph"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">app</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-s1">app</span>.<span class="pl-s1">kickstart</span>.<span class="pl-en">delay</span>() <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">res</span>.<span class="pl-s1">graph</span></pre></div> <p dir="auto">A <code class="notranslate">TypeError: unhashable type: 'GroupResult'</code> is raised</p> <h2 dir="auto">Expected behavior</h2> <p dir="auto">A graph should be constructed.</p> <h2 dir="auto">Actual behavior</h2> <p dir="auto">A <code class="notranslate">TypeError: unhashable type: 'GroupResult'</code> is raised:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="KeyError Traceback (most recent call last) ~/.local/share/virtualenvs/project-cdmlHYK5/lib/python3.6/site-packages/kombu/utils/objects.py in __get__(self, obj, type) 41 try: ---&gt; 42 return obj.__dict__[self.__name__] 43 except KeyError: KeyError: 'graph' During handling of the above exception, another exception occurred: TypeError Traceback (most recent call last) &lt;ipython-input-3-dd95ac617ced&gt; in &lt;module&gt;() ----&gt; 1 res.graph ~/.local/share/virtualenvs/project-cdmlHYK5/lib/python3.6/site-packages/kombu/utils/objects.py in __get__(self, obj, type) 42 return obj.__dict__[self.__name__] 43 except KeyError: ---&gt; 44 value = obj.__dict__[self.__name__] = self.__get(obj) 45 return value 46 /src/celery/result.py in graph(self) 387 @cached_property 388 def graph(self): --&gt; 389 return self.build_graph() 390 391 @property /src/celery/result.py in build_graph(self, intermediate, formatter) 342 ) 343 for parent, node in self.iterdeps(intermediate=intermediate): --&gt; 344 graph.add_arc(node) 345 if parent: 346 graph.add_edge(parent, node) /src/celery/utils/graph.py in add_arc(self, obj) 54 def add_arc(self, obj): 55 &quot;&quot;&quot;Add an object to the graph.&quot;&quot;&quot; ---&gt; 56 self.adjacent.setdefault(obj, []) 57 58 def add_edge(self, A, B): TypeError: unhashable type: 'GroupResult'``` I believe this is because the class `GroupResult` does not implements a `__hash__` method like the `AsyncResult` class: https://github.com/celery/celery/blob/master/celery/result.py#L353 We should probably implement `__hash__` and `__str__`."><pre lang="---------------------------------------------------------------------------" class="notranslate"><code class="notranslate">KeyError Traceback (most recent call last) ~/.local/share/virtualenvs/project-cdmlHYK5/lib/python3.6/site-packages/kombu/utils/objects.py in __get__(self, obj, type) 41 try: ---&gt; 42 return obj.__dict__[self.__name__] 43 except KeyError: KeyError: 'graph' During handling of the above exception, another exception occurred: TypeError Traceback (most recent call last) &lt;ipython-input-3-dd95ac617ced&gt; in &lt;module&gt;() ----&gt; 1 res.graph ~/.local/share/virtualenvs/project-cdmlHYK5/lib/python3.6/site-packages/kombu/utils/objects.py in __get__(self, obj, type) 42 return obj.__dict__[self.__name__] 43 except KeyError: ---&gt; 44 value = obj.__dict__[self.__name__] = self.__get(obj) 45 return value 46 /src/celery/result.py in graph(self) 387 @cached_property 388 def graph(self): --&gt; 389 return self.build_graph() 390 391 @property /src/celery/result.py in build_graph(self, intermediate, formatter) 342 ) 343 for parent, node in self.iterdeps(intermediate=intermediate): --&gt; 344 graph.add_arc(node) 345 if parent: 346 graph.add_edge(parent, node) /src/celery/utils/graph.py in add_arc(self, obj) 54 def add_arc(self, obj): 55 """Add an object to the graph.""" ---&gt; 56 self.adjacent.setdefault(obj, []) 57 58 def add_edge(self, A, B): TypeError: unhashable type: 'GroupResult'``` I believe this is because the class `GroupResult` does not implements a `__hash__` method like the `AsyncResult` class: https://github.com/celery/celery/blob/master/celery/result.py#L353 We should probably implement `__hash__` and `__str__`. </code></pre></div>
<p dir="auto">Version: celery==4.1.0</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ celery -A poc worker --loglevel=info -------------- [email protected] v4.1.0 (latentcall) ---- **** ----- --- * *** * -- Darwin-16.7.0-x86_64-i386-64bit 2018-05-16 17:42:08 -- * - **** --- - ** ---------- [config] - ** ---------- .&gt; app: poc:0x10287fc18 - ** ---------- .&gt; transport: redis://localhost:6379/0 - ** ---------- .&gt; results: redis://localhost:6379/0 - *** --- * --- .&gt; concurrency: 12 (prefork) -- ******* ---- .&gt; task events: OFF (enable -E to monitor tasks in this worker) --- ***** ----- -------------- [queues] .&gt; celery exchange=celery(direct) key=celery [tasks] . poc.add"><pre class="notranslate"><code class="notranslate">$ celery -A poc worker --loglevel=info -------------- [email protected] v4.1.0 (latentcall) ---- **** ----- --- * *** * -- Darwin-16.7.0-x86_64-i386-64bit 2018-05-16 17:42:08 -- * - **** --- - ** ---------- [config] - ** ---------- .&gt; app: poc:0x10287fc18 - ** ---------- .&gt; transport: redis://localhost:6379/0 - ** ---------- .&gt; results: redis://localhost:6379/0 - *** --- * --- .&gt; concurrency: 12 (prefork) -- ******* ---- .&gt; task events: OFF (enable -E to monitor tasks in this worker) --- ***** ----- -------------- [queues] .&gt; celery exchange=celery(direct) key=celery [tasks] . poc.add </code></pre></div> <p dir="auto">Celery worker runs fine, issue seems to be when the graph is built with <code class="notranslate">build_graph()</code>.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;/Users/user/.pyenv/versions/3.6.1/envs/3.6.1-celery-poc/lib/python3.6/site-packages/kombu/utils/objects.py&quot;, line 42, in __get__ return obj.__dict__[self.__name__] KeyError: 'graph' During handling of the above exception, another exception occurred: Traceback (most recent call last): File &quot;poc.py&quot;, line 33, in &lt;module&gt; root.graph.to_dot(fh) File &quot;/Users/user/.pyenv/versions/3.6.1/envs/3.6.1-celery-poc/lib/python3.6/site-packages/kombu/utils/objects.py&quot;, line 44, in __get__ value = obj.__dict__[self.__name__] = self.__get(obj) File &quot;/Users/user/.pyenv/versions/3.6.1/envs/3.6.1-celery-poc/lib/python3.6/site-packages/celery/result.py&quot;, line 354, in graph return self.build_graph() File &quot;/Users/user/.pyenv/versions/3.6.1/envs/3.6.1-celery-poc/lib/python3.6/site-packages/celery/result.py&quot;, line 314, in build_graph graph.add_arc(node) File &quot;/Users/user/.pyenv/versions/3.6.1/envs/3.6.1-celery-poc/lib/python3.6/site-packages/celery/utils/graph.py&quot;, line 53, in add_arc self.adjacent.setdefault(obj, []) TypeError: unhashable type: 'GroupResult'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "/Users/user/.pyenv/versions/3.6.1/envs/3.6.1-celery-poc/lib/python3.6/site-packages/kombu/utils/objects.py", line 42, in __get__ return obj.__dict__[self.__name__] KeyError: 'graph' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "poc.py", line 33, in &lt;module&gt; root.graph.to_dot(fh) File "/Users/user/.pyenv/versions/3.6.1/envs/3.6.1-celery-poc/lib/python3.6/site-packages/kombu/utils/objects.py", line 44, in __get__ value = obj.__dict__[self.__name__] = self.__get(obj) File "/Users/user/.pyenv/versions/3.6.1/envs/3.6.1-celery-poc/lib/python3.6/site-packages/celery/result.py", line 354, in graph return self.build_graph() File "/Users/user/.pyenv/versions/3.6.1/envs/3.6.1-celery-poc/lib/python3.6/site-packages/celery/result.py", line 314, in build_graph graph.add_arc(node) File "/Users/user/.pyenv/versions/3.6.1/envs/3.6.1-celery-poc/lib/python3.6/site-packages/celery/utils/graph.py", line 53, in add_arc self.adjacent.setdefault(obj, []) TypeError: unhashable type: 'GroupResult' </code></pre></div> <h2 dir="auto">Steps to reproduce</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import celery from celery.canvas import group, chain app = celery.Celery('poc') app.conf.update( task_serializer='json', accept_content=['json'], result_serializer='json', enable_utc=True, broker_url = 'redis://localhost:6379/0', result_backend = 'redis://localhost:6379/0' ) @app.task def add(x, y): return x + y if __name__ == '__main__': res = chain(add.si(1,1), group(add.si(2,2), add.si(3,3), add.si(4,4)))() res.get() # Find root result of graph root = res.parent while root.parent is not None: root = root.parent with open('graph.dot', 'w') as fh: root.graph.to_dot(fh)"><pre class="notranslate"><code class="notranslate">import celery from celery.canvas import group, chain app = celery.Celery('poc') app.conf.update( task_serializer='json', accept_content=['json'], result_serializer='json', enable_utc=True, broker_url = 'redis://localhost:6379/0', result_backend = 'redis://localhost:6379/0' ) @app.task def add(x, y): return x + y if __name__ == '__main__': res = chain(add.si(1,1), group(add.si(2,2), add.si(3,3), add.si(4,4)))() res.get() # Find root result of graph root = res.parent while root.parent is not None: root = root.parent with open('graph.dot', 'w') as fh: root.graph.to_dot(fh) </code></pre></div> <h2 dir="auto">Expected behavior</h2> <p dir="auto">Generate the dotfile as expected by transforming each list item task id into a node entity with a corresponding arc for the graph.</p> <h2 dir="auto">Actual behavior</h2> <p dir="auto">Error shown above.</p> <p dir="auto">Disclaimer: I am brand new to celery.</p>
1
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/target-even-numbered-elements-using-jquery#?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%22orange%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%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">Target Even Numbered Elements Using jQuery</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 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="&lt;script&gt; $(document).ready(function() { $(&quot;#target1&quot;).css(&quot;color&quot;, &quot;red&quot;); $(&quot;#target1&quot;).prop(&quot;disabled&quot;, true); $(&quot;#target4&quot;).remove(); $(&quot;#target2&quot;).appendTo(&quot;#right-well&quot;); $(&quot;#target5&quot;).clone().appendTo(&quot;#left-well&quot;); $(&quot;#target1&quot;).parent().css(&quot;background-color&quot;, &quot;red&quot;); $(&quot;#right-well&quot;).children().css(&quot;color&quot;, &quot;orange&quot;); $(&quot;#left-well&quot;).children().css(&quot;color&quot;, &quot;green&quot;); $(&quot;.target:nth-child(2)&quot;).addClass(&quot;animated bounce&quot;); $(&quot;.target:even&quot;).addClass(&quot;animated Shake&quot;); }); &lt;/script&gt; &lt;!-- Only change code above this line. --&gt; &lt;div class=&quot;container-fluid&quot;&gt; &lt;h3 class=&quot;text-primary text-center&quot;&gt;jQuery Playground&lt;/h3&gt; &lt;div class=&quot;row&quot;&gt; &lt;div class=&quot;col-xs-6&quot;&gt; &lt;h4&gt;#left-well&lt;/h4&gt; &lt;div class=&quot;well&quot; id=&quot;left-well&quot;&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target1&quot;&gt;#target1&lt;/button&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target2&quot;&gt;#target2&lt;/button&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target3&quot;&gt;#target3&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;col-xs-6&quot;&gt; &lt;h4&gt;#right-well&lt;/h4&gt; &lt;div class=&quot;well&quot; id=&quot;right-well&quot;&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target4&quot;&gt;#target4&lt;/button&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target5&quot;&gt;#target5&lt;/button&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target6&quot;&gt;#target6&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; "><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</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">"orange"</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-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span> <span class="pl-c">&lt;!-- Only change code above this line. --&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">container-fluid</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</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">&gt;</span>jQuery Playground<span class="pl-kos">&lt;/</span><span class="pl-ent">h3</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">row</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</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">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">h4</span><span class="pl-kos">&gt;</span>#left-well<span class="pl-kos">&lt;/</span><span class="pl-ent">h4</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</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">&gt;</span> <span class="pl-kos">&lt;</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">&gt;</span>#target1<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</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">&gt;</span>#target2<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</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">&gt;</span>#target3<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</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">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">h4</span><span class="pl-kos">&gt;</span>#right-well<span class="pl-kos">&lt;/</span><span class="pl-ent">h4</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</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">&gt;</span> <span class="pl-kos">&lt;</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">&gt;</span>#target4<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</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">&gt;</span>#target5<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</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">&gt;</span>#target6<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span></pre></div>
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-sift-through-text-with-regular-expressions" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-sift-through-text-with-regular-expressions</a> has an issue.</p> <p dir="auto">in this challenge explanation of regexp matching basics looks like on the screenshot below.</p> <p dir="auto">in the example it sounds rather misleading, that "+" quantifier relates to whole "the" / "and" word. in fact, it relates to "d" letter only.</p> <p dir="auto">regards,<br> moshe</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/317336/9574112/e129ec04-4fc3-11e5-9650-45d92d421839.png"><img src="https://cloud.githubusercontent.com/assets/317336/9574112/e129ec04-4fc3-11e5-9650-45d92d421839.png" alt="waypoint sift through text with regular expressions free code camp" style="max-width: 100%;"></a></p>
0
<p dir="auto">The exception messages thrown by the user checker don't support internationalization natively :<br> Symfony/vendor/symfony/src/Symfony/Component/Security/Core/User/UserChecker.php</p>
<p dir="auto">Translating form fields for which translation strings are available in "singular | plural" form fails.<br> Form translation always uses trans() and never transchoice(). There is apparently no way to tell it to do so. That means duplication of translations or other stupidity to work around this problem.</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 =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; 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 =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; 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> Reopening <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="132421926" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/6971" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/6971/hovercard" href="https://github.com/angular/angular/issues/6971">#6971</a>. I cannot reopen, so hence I'm making a new ticket.</p> <p dir="auto">Binding <code class="notranslate">routerLink</code> to null or empty array does not yield exception anymore, but yields a url to the current route rather than an empty href, which is surprising (and imo bad).</p> <p dir="auto"><strong>Expected behavior</strong><br> I would expect empty <code class="notranslate">routerLink</code> (i.e. null/undefined/empty array/array with only nulls and undefined) to not add an href attribute. It doesn't make sense to just pick a url (the current) for linking when a url cannot be produced.</p> <ul dir="auto"> <li><strong>Angular version:</strong> 2.4.2</li> </ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ ] bug report [ x ] feature request [ ] support request"><pre class="notranslate"><code class="notranslate">[ ] bug report [ x ] feature request [ ] support request </code></pre></div> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br> Currently null or empty value passed to <code class="notranslate">routerLink</code> adds current page <code class="notranslate">href</code> value to link that is not useful. There is a lot of usecases for 'disabled' links that should not navigate anywhere and should not has <code class="notranslate">href</code> attribute at all.<br> It would be useful to have null/empty value support by <code class="notranslate">routerLink</code> that will results with no <code class="notranslate">href</code> attribute on link at all to prevent any navigation/link copying.</p>
1
<p dir="auto">When I typed $this in PHP files, I selected auto-complete $this, then it becomed $$this actually.</p>
<p dir="auto">When using autocompletion for variables it places 2 dollar signs instead of 1. For example typing <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="85a35ae9805c83ee8a7ab305f211edbb">$_GET will transform it into $</math-renderer>$_GET. Fails with every completion starting with $.</p>
1
<ul dir="auto"> <li>Neo4j version: 4.0</li> <li>Operating system: Official Docker Container on Linux</li> </ul> <p dir="auto"><strong>Steps to reproduce</strong></p> <ul dir="auto"> <li>Start neo4j docker container</li> </ul> <h2 dir="auto">Report</h2> <p dir="auto">Neo4j 4.0 prints warnings about illegal reflexive access on startup (see below)</p> <h3 dir="auto">Steps to reproduce</h3> <ol dir="auto"> <li>Start Neo4j Docker container</li> </ol> <h3 dir="auto">Expected behaviour</h3> <p dir="auto">Scary warnings about illegal access should not be routine (I hope).</p> <h3 dir="auto">Actual behavior</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Starting Neo4j. WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.apache.commons.lang3.reflect.FieldUtils (file:/var/lib/neo4j/lib/commons-lang3-3.9.jar) to field sun.nio.ch.FileChannelImpl.fd WARNING: Please consider reporting this to the maintainers of org.apache.commons.lang3.reflect.FieldUtils WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release"><pre class="notranslate"><code class="notranslate">Starting Neo4j. WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.apache.commons.lang3.reflect.FieldUtils (file:/var/lib/neo4j/lib/commons-lang3-3.9.jar) to field sun.nio.ch.FileChannelImpl.fd WARNING: Please consider reporting this to the maintainers of org.apache.commons.lang3.reflect.FieldUtils WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release </code></pre></div>
<p dir="auto"><strong>Is your feature request related to a problem? Please describe.</strong><br> It would be nice to address or suppress the warnings that show up when starting up Neo4j 4 (Neo4j 4.0.0-alpha09mr02)</p> <p dir="auto">Specifically:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Luannes-MacBook-Pro-3:bin luanne$ ./neo4j console Directories in use: home: /Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02 config: /Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02/conf logs: /Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02/logs plugins: /Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02/plugins import: /Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02/import data: /Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02/data certificates: /Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02/certificates run: /Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02/run Starting Neo4j. WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.apache.commons.lang3.reflect.FieldUtils (file:/Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02/lib/commons-lang3-3.9.jar) to field sun.nio.ch.FileChannelImpl.fd WARNING: Please consider reporting this to the maintainers of org.apache.commons.lang3.reflect.FieldUtils WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release 2019-08-22 08:27:05.196+0000 WARN The 'dbms.jvm.additional' setting is overridden. Setting value changed from '-XX:+UseG1GC' to '-XX:-OmitStackTraceInFastThrow'. 2019-08-22 08:27:05.198+0000 WARN The 'dbms.jvm.additional' setting is overridden. Setting value changed from '-XX:-OmitStackTraceInFastThrow' to '-XX:+AlwaysPreTouch'. 2019-08-22 08:27:05.198+0000 WARN The 'dbms.jvm.additional' setting is overridden. Setting value changed from '-XX:+AlwaysPreTouch' to '-XX:+UnlockExperimentalVMOptions'. 2019-08-22 08:27:05.198+0000 WARN The 'dbms.jvm.additional' setting is overridden. Setting value changed from '-XX:+UnlockExperimentalVMOptions' to '-XX:+TrustFinalNonStaticFields'. 2019-08-22 08:27:05.198+0000 WARN The 'dbms.jvm.additional' setting is overridden. Setting value changed from '-XX:+TrustFinalNonStaticFields' to '-XX:+DisableExplicitGC'. 2019-08-22 08:27:05.199+0000 WARN The 'dbms.jvm.additional' setting is overridden. Setting value changed from '-XX:+DisableExplicitGC' to '-Djdk.tls.ephemeralDHKeySize=2048'. 2019-08-22 08:27:05.199+0000 WARN The 'dbms.jvm.additional' setting is overridden. Setting value changed from '-Djdk.tls.ephemeralDHKeySize=2048' to '-Djdk.tls.rejectClientInitiatedRenegotiation=true'. 2019-08-22 08:27:05.218+0000 INFO ======== Neo4j 4.0.0-alpha09mr02 ========"><pre class="notranslate"><code class="notranslate">Luannes-MacBook-Pro-3:bin luanne$ ./neo4j console Directories in use: home: /Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02 config: /Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02/conf logs: /Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02/logs plugins: /Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02/plugins import: /Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02/import data: /Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02/data certificates: /Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02/certificates run: /Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02/run Starting Neo4j. WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.apache.commons.lang3.reflect.FieldUtils (file:/Users/luanne/neo/neo4j-enterprise-4.0.0-alpha09mr02/lib/commons-lang3-3.9.jar) to field sun.nio.ch.FileChannelImpl.fd WARNING: Please consider reporting this to the maintainers of org.apache.commons.lang3.reflect.FieldUtils WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release 2019-08-22 08:27:05.196+0000 WARN The 'dbms.jvm.additional' setting is overridden. Setting value changed from '-XX:+UseG1GC' to '-XX:-OmitStackTraceInFastThrow'. 2019-08-22 08:27:05.198+0000 WARN The 'dbms.jvm.additional' setting is overridden. Setting value changed from '-XX:-OmitStackTraceInFastThrow' to '-XX:+AlwaysPreTouch'. 2019-08-22 08:27:05.198+0000 WARN The 'dbms.jvm.additional' setting is overridden. Setting value changed from '-XX:+AlwaysPreTouch' to '-XX:+UnlockExperimentalVMOptions'. 2019-08-22 08:27:05.198+0000 WARN The 'dbms.jvm.additional' setting is overridden. Setting value changed from '-XX:+UnlockExperimentalVMOptions' to '-XX:+TrustFinalNonStaticFields'. 2019-08-22 08:27:05.198+0000 WARN The 'dbms.jvm.additional' setting is overridden. Setting value changed from '-XX:+TrustFinalNonStaticFields' to '-XX:+DisableExplicitGC'. 2019-08-22 08:27:05.199+0000 WARN The 'dbms.jvm.additional' setting is overridden. Setting value changed from '-XX:+DisableExplicitGC' to '-Djdk.tls.ephemeralDHKeySize=2048'. 2019-08-22 08:27:05.199+0000 WARN The 'dbms.jvm.additional' setting is overridden. Setting value changed from '-Djdk.tls.ephemeralDHKeySize=2048' to '-Djdk.tls.rejectClientInitiatedRenegotiation=true'. 2019-08-22 08:27:05.218+0000 INFO ======== Neo4j 4.0.0-alpha09mr02 ======== </code></pre></div> <p dir="auto"><strong>Describe the solution you'd like</strong><br> No warnings</p> <p dir="auto"><strong>Describe alternatives you've considered</strong><br> N/A</p> <p dir="auto"><strong>Additional context</strong><br> N/A</p>
1
<p dir="auto">If I have an inner object that has the same name as a type, then queries for that inner object will fail.</p> <p dir="auto">The workaround is to rename the type or the inner object, but the behaviour is confusing and misleading (and wrong).</p> <p dir="auto">To reproduce, create a new index, type and document:<br> curl -XPOST 'localhost:9200/test/flow/' -d '{<br> "device": {<br> "id": "dummy"<br> }<br> }'</p> <p dir="auto">Querying for that document by device.id will work:<br> curl 'localhost:9200/test/_search?pretty' -d '{<br> "query":{<br> "filtered": {<br> "filter": {<br> "term": {<br> "device.id": "dummy"<br> }<br> }<br> }<br> }<br> }'</p> <p dir="auto">Add a type with the same name as the inner object, AND containing an inner object with that name as well:<br> curl -XPOST 'localhost:9200/test/device/' -d '{<br> "device": {<br> "id": "foo"<br> }<br> }'</p> <p dir="auto">Now querying for the original document by device.id will fail:<br> {<br> "took" : 0,<br> "timed_out" : false,<br> "_shards" : {<br> "total" : 5,<br> "successful" : 5,<br> "failed" : 0<br> },<br> "hits" : {<br> "total" : 0,<br> "max_score" : null,<br> "hits" : [ ]<br> }<br> }</p> <p dir="auto">Removing the 'device' type will allow the original document to be queryable again:<br> curl -XDELETE 'localhost:9200/test/device'</p>
<p dir="auto">As far as I understand it, fields are resolved on a <em>first found</em> basis. So given the following documents:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PUT /index/foo/1 { &quot;count&quot;: 1, &quot;foo&quot;: { &quot;count&quot;: 1 } } PUT /index/bar/2 { &quot;count&quot;: 1, &quot;foo&quot;: { &quot;count&quot;: 1 } }"><pre class="notranslate"><code class="notranslate">PUT /index/foo/1 { "count": 1, "foo": { "count": 1 } } PUT /index/bar/2 { "count": 1, "foo": { "count": 1 } } </code></pre></div> <p dir="auto">.... the field <code class="notranslate">foo.count</code> could resolve to <code class="notranslate">foo.count</code>, <code class="notranslate">foo.foo.count</code>, or <code class="notranslate">bar.foo.count</code>, depending on which is found first.</p> <p dir="auto">Field resolution should be unambiguous. Field names should be grouped by type and sorted in descending order by number of <code class="notranslate">.</code>. So the above mappings should result in:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bar: foo.count count foo: foo.count count"><pre class="notranslate"><code class="notranslate">bar: foo.count count foo: foo.count count </code></pre></div> <p dir="auto">Then if no type is specified (or multiple types are specified), go through the groups in alphabetical order.</p> <p dir="auto">This would result in the following resolutions:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="foo.foo.count =&gt; (foo) foo.count foo.count =&gt; (foo) count count =&gt; (bar) count *.foo.count =&gt; (bar) foo.count *.count =&gt; (bar) count *.*.count =&gt; (bar) foo.count"><pre class="notranslate"><code class="notranslate">foo.foo.count =&gt; (foo) foo.count foo.count =&gt; (foo) count count =&gt; (bar) count *.foo.count =&gt; (bar) foo.count *.count =&gt; (bar) count *.*.count =&gt; (bar) foo.count </code></pre></div>
1
<p dir="auto">Hey Guys, I just noticed an upgrade to 4.2.0 from 4.1.1 causes breaking changes. Any ideas where this was intoduced?</p> <p dir="auto">System:<br> OSX 10.13.5<br> Anaconda Python 3.7</p> <h2 dir="auto">Steps to reproduce</h2> <p dir="auto">Install:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ pip install Celery=4.2.0"><pre class="notranslate"><code class="notranslate">$ pip install Celery=4.2.0 </code></pre></div> <p dir="auto">Code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="celery_amqp_url=os.getenv(&quot;CELERY_AMQP_URL&quot;) app = Celery('magic_worker',broker=celery_amqp_url) @task def parse(uid): print('parsing: %s' % uid)"><pre class="notranslate"><code class="notranslate">celery_amqp_url=os.getenv("CELERY_AMQP_URL") app = Celery('magic_worker',broker=celery_amqp_url) @task def parse(uid): print('parsing: %s' % uid) </code></pre></div> <p dir="auto">Run:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ celery -A magic_worker worker"><pre class="notranslate"><code class="notranslate">$ celery -A magic_worker worker </code></pre></div> <h2 dir="auto">Expected behavior</h2> <p dir="auto">Celery task is consumed.</p> <h2 dir="auto">Actual behavior</h2> <p dir="auto">Error throw:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[2018-07-16 21:04:52,098: CRITICAL/MainProcess] Unrecoverable error: TypeError(&quot;'NoneType' object is not iterable&quot;,) Traceback (most recent call last): File &quot;python3.5/site-packages/celery/worker/worker.py&quot;, line 205, in start self.blueprint.start(self) File &quot;python3.5/site-packages/celery/bootsteps.py&quot;, line 119, in start step.start(parent) File &quot;python3.5/site-packages/celery/bootsteps.py&quot;, line 369, in start return self.obj.start() File &quot;python3.5/site-packages/celery/worker/consumer/consumer.py&quot;, line 322, in start blueprint.start(self) File &quot;python3.5/site-packages/celery/bootsteps.py&quot;, line 119, in start step.start(parent) File &quot;python3.5/site-packages/celery/worker/consumer/consumer.py&quot;, line 598, in start c.loop(*c.loop_args()) File &quot;python3.5/site-packages/celery/worker/loops.py&quot;, line 91, in asynloop next(loop) File &quot;python3.5/site-packages/kombu/asynchronous/hub.py&quot;, line 354, in create_loop cb(*cbargs) File &quot;python3.5/site-packages/kombu/transport/base.py&quot;, line 236, in on_readable reader(loop) File &quot;python3.5/site-packages/kombu/transport/base.py&quot;, line 218, in _read drain_events(timeout=0) File &quot;python3.5/site-packages/amqp/connection.py&quot;, line 491, in drain_events while not self.blocking_read(timeout): File &quot;python3.5/site-packages/amqp/connection.py&quot;, line 497, in blocking_read return self.on_inbound_frame(frame) File &quot;python3.5/site-packages/amqp/method_framing.py&quot;, line 77, in on_frame callback(channel, msg.frame_method, msg.frame_args, msg) File &quot;python3.5/site-packages/amqp/connection.py&quot;, line 501, in on_inbound_method method_sig, payload, content, File &quot;python3.5/site-packages/amqp/abstract_channel.py&quot;, line 128, in dispatch_method listener(*args) File &quot;python3.5/site-packages/amqp/channel.py&quot;, line 1597, in _on_basic_deliver fun(msg) File &quot;python3.5/site-packages/kombu/messaging.py&quot;, line 624, in _receive_callback return on_m(message) if on_m else self.receive(decoded, message) File &quot;python3.5/site-packages/celery/worker/consumer/consumer.py&quot;, line 572, in on_task_received callbacks, File &quot;python3.5/site-packages/celery/worker/strategy.py&quot;, line 200, in task_message_handler handle(req) File &quot;python3.5/site-packages/celery/worker/worker.py&quot;, line 223, in _process_task_sem return self._quick_acquire(self._process_task, req) File &quot;python3.5/site-packages/kombu/asynchronous/semaphore.py&quot;, line 62, in acquire callback(*partial_args, **partial_kwargs) File &quot;python3.5/site-packages/celery/worker/worker.py&quot;, line 228, in _process_task req.execute_using_pool(self.pool) File &quot;python3.5/site-packages/celery/worker/request.py&quot;, line 520, in execute_using_pool time_limit, soft_time_limit = self.time_limits TypeError: 'NoneType' object is not iterable"><pre class="notranslate">[2018-07-16 21:04:52,098: CRITICAL/MainProcess] Unrecoverable error: TypeError(<span class="pl-s"><span class="pl-pds">"</span>'NoneType' object is not iterable<span class="pl-pds">"</span></span>,) Traceback (most recent call last): File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/celery/worker/worker.py<span class="pl-pds">"</span></span>, line 205, <span class="pl-k">in</span> start self.blueprint.start(self) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/celery/bootsteps.py<span class="pl-pds">"</span></span>, line 119, <span class="pl-k">in</span> start step.start(parent) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/celery/bootsteps.py<span class="pl-pds">"</span></span>, line 369, <span class="pl-k">in</span> start <span class="pl-k">return</span> <span class="pl-en">self.obj.start</span>() File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/celery/worker/consumer/consumer.py<span class="pl-pds">"</span></span>, line 322, <span class="pl-k">in</span> start blueprint.start(self) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/celery/bootsteps.py<span class="pl-pds">"</span></span>, line 119, <span class="pl-k">in</span> start step.start(parent) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/celery/worker/consumer/consumer.py<span class="pl-pds">"</span></span>, line 598, <span class="pl-k">in</span> start <span class="pl-en">c.loop(*c.loop_args</span>()) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/celery/worker/loops.py<span class="pl-pds">"</span></span>, line 91, <span class="pl-k">in</span> asynloop next(loop) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/kombu/asynchronous/hub.py<span class="pl-pds">"</span></span>, line 354, <span class="pl-k">in</span> create_loop cb(<span class="pl-k">*</span>cbargs) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/kombu/transport/base.py<span class="pl-pds">"</span></span>, line 236, <span class="pl-k">in</span> on_readable reader(loop) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/kombu/transport/base.py<span class="pl-pds">"</span></span>, line 218, <span class="pl-k">in</span> _read drain_events(timeout=0) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/amqp/connection.py<span class="pl-pds">"</span></span>, line 491, <span class="pl-k">in</span> drain_events <span class="pl-k">while</span> not self.blocking_read(timeout): File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/amqp/connection.py<span class="pl-pds">"</span></span>, line 497, <span class="pl-k">in</span> blocking_read <span class="pl-k">return</span> self.on_inbound_frame(frame) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/amqp/method_framing.py<span class="pl-pds">"</span></span>, line 77, <span class="pl-k">in</span> on_frame callback(channel, msg.frame_method, msg.frame_args, msg) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/amqp/connection.py<span class="pl-pds">"</span></span>, line 501, <span class="pl-k">in</span> on_inbound_method method_sig, payload, content, File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/amqp/abstract_channel.py<span class="pl-pds">"</span></span>, line 128, <span class="pl-k">in</span> dispatch_method listener(<span class="pl-k">*</span>args) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/amqp/channel.py<span class="pl-pds">"</span></span>, line 1597, <span class="pl-k">in</span> _on_basic_deliver fun(msg) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/kombu/messaging.py<span class="pl-pds">"</span></span>, line 624, <span class="pl-k">in</span> _receive_callback <span class="pl-k">return</span> on_m(message) <span class="pl-k">if</span> on_m <span class="pl-k">else</span> self.receive(decoded, message) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/celery/worker/consumer/consumer.py<span class="pl-pds">"</span></span>, line 572, <span class="pl-k">in</span> on_task_received callbacks, File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/celery/worker/strategy.py<span class="pl-pds">"</span></span>, line 200, <span class="pl-k">in</span> task_message_handler handle(req) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/celery/worker/worker.py<span class="pl-pds">"</span></span>, line 223, <span class="pl-k">in</span> _process_task_sem <span class="pl-k">return</span> self._quick_acquire(self._process_task, req) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/kombu/asynchronous/semaphore.py<span class="pl-pds">"</span></span>, line 62, <span class="pl-k">in</span> acquire callback(<span class="pl-k">*</span>partial_args, <span class="pl-k">**</span>partial_kwargs) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/celery/worker/worker.py<span class="pl-pds">"</span></span>, line 228, <span class="pl-k">in</span> _process_task req.execute_using_pool(self.pool) File <span class="pl-s"><span class="pl-pds">"</span>python3.5/site-packages/celery/worker/request.py<span class="pl-pds">"</span></span>, line 520, <span class="pl-k">in</span> execute_using_pool time_limit, soft_time_limit = self.time_limits TypeError: <span class="pl-s"><span class="pl-pds">'</span>NoneType<span class="pl-pds">'</span></span> object is not iterable</pre></div> <h2 dir="auto">Work Around</h2> <p dir="auto">Downgrade to celery 4.1.1</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip uninstall Celery pip install Celery=4.1.1"><pre class="notranslate"><code class="notranslate">pip uninstall Celery pip install Celery=4.1.1 </code></pre></div>
<p dir="auto">I am getting an error in the stack trace below. It looks like this line is referencing the wrong field name: <a href="https://github.com/celery/celery/blob/master/celery/worker/request.py#L520">https://github.com/celery/celery/blob/master/celery/worker/request.py#L520</a>. I don't think time_limits exists for this Request. The only place in celery codebase that I see using <code class="notranslate">create_request_cls</code> is here </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/celery/celery/blob/47ca2b462f22a8d48ed8d80c2f9bf8b9dc4a4de6/celery/worker/strategy.py#L130">celery/celery/worker/strategy.py</a> </p> <p class="mb-0 color-fg-muted"> Line 130 in <a data-pjax="true" class="commit-tease-sha" href="/celery/celery/commit/47ca2b462f22a8d48ed8d80c2f9bf8b9dc4a4de6">47ca2b4</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="L130" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="130"></td> <td id="LC130" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-v">Req</span> <span class="pl-c1">=</span> <span class="pl-en">create_request_cls</span>(<span class="pl-v">Request</span>, <span class="pl-s1">task</span>, <span class="pl-s1">consumer</span>.<span class="pl-s1">pool</span>, <span class="pl-s1">hostname</span>, <span class="pl-s1">eventer</span>) </td> </tr> </tbody></table> </div> </div> . It seems to be creating the Request object from task.Request base. According to the docs <a href="http://docs.celeryproject.org/en/latest/userguide/tasks.html#task-request" rel="nofollow">http://docs.celeryproject.org/en/latest/userguide/tasks.html#task-request</a> task.Request has a field <code class="notranslate">timelimit</code>, not <code class="notranslate">time_limits</code>, hence the TypeError. worker.Request, on the other hand, does have <code class="notranslate">time_limits</code> <a href="http://docs.celeryproject.org/en/latest/reference/celery.worker.request.html" rel="nofollow">http://docs.celeryproject.org/en/latest/reference/celery.worker.request.html</a>.<p></p> <p dir="auto">The workaround I did to get my code working is basically to check if the variable is None here <a href="https://github.com/celery/celery/blob/master/celery/worker/request.py#L520">https://github.com/celery/celery/blob/master/celery/worker/request.py#L520</a> :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if not self.time_limits: time_limit = default_time_limit soft_time_limit = default_soft_time_limit else: time_limit, soft_time_limit = self.time_limits"><pre class="notranslate"><code class="notranslate">if not self.time_limits: time_limit = default_time_limit soft_time_limit = default_soft_time_limit else: time_limit, soft_time_limit = self.time_limits </code></pre></div> <p dir="auto">I am not sure if I did something stupid and don't understand how the code is structured. Please point me at why it's not an error, if it is by design.</p> <p dir="auto">Stack trace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2018-07-16 06:09:46,229: CRITICAL/MainProcess] Unrecoverable error: TypeError(&quot;'NoneType' object is not iterable&quot;,) Traceback (most recent call last): File &quot;/usr/lib/python2.7/site-packages/celery/worker/worker.py&quot;, line 205, in start self.blueprint.start(self) File &quot;/usr/lib/python2.7/site-packages/celery/bootsteps.py&quot;, line 119, in start step.start(parent) File &quot;/usr/lib/python2.7/site-packages/celery/bootsteps.py&quot;, line 369, in start return self.obj.start() File &quot;/usr/lib/python2.7/site-packages/celery/worker/consumer/consumer.py&quot;, line 322, in start blueprint.start(self) File &quot;/usr/lib/python2.7/site-packages/celery/bootsteps.py&quot;, line 119, in start step.start(parent) File &quot;/usr/lib/python2.7/site-packages/celery/worker/consumer/consumer.py&quot;, line 598, in start c.loop(*c.loop_args()) File &quot;/usr/lib/python2.7/site-packages/celery/worker/loops.py&quot;, line 118, in synloop qos.update() File &quot;/usr/lib/python2.7/site-packages/kombu/common.py&quot;, line 417, in update return self.set(self.value) File &quot;/usr/lib/python2.7/site-packages/kombu/common.py&quot;, line 410, in set self.callback(prefetch_count=new_value) File &quot;/usr/lib/python2.7/site-packages/celery/worker/consumer/tasks.py&quot;, line 47, in set_prefetch_count apply_global=qos_global, File &quot;/usr/lib/python2.7/site-packages/kombu/messaging.py&quot;, line 558, in qos apply_global) File &quot;/usr/lib/python2.7/site-packages/amqp/channel.py&quot;, line 1812, in basic_qos wait=spec.Basic.QosOk, File &quot;/usr/lib/python2.7/site-packages/amqp/abstract_channel.py&quot;, line 59, in send_method return self.wait(wait, returns_tuple=returns_tuple) File &quot;/usr/lib/python2.7/site-packages/amqp/abstract_channel.py&quot;, line 79, in wait self.connection.drain_events(timeout=timeout) File &quot;/usr/lib/python2.7/site-packages/amqp/connection.py&quot;, line 491, in drain_events while not self.blocking_read(timeout): File &quot;/usr/lib/python2.7/site-packages/amqp/connection.py&quot;, line 497, in blocking_read return self.on_inbound_frame(frame) File &quot;/usr/lib/python2.7/site-packages/amqp/method_framing.py&quot;, line 77, in on_frame callback(channel, msg.frame_method, msg.frame_args, msg) File &quot;/usr/lib/python2.7/site-packages/amqp/connection.py&quot;, line 501, in on_inbound_method method_sig, payload, content, File &quot;/usr/lib/python2.7/site-packages/amqp/abstract_channel.py&quot;, line 128, in dispatch_method listener(*args) File &quot;/usr/lib/python2.7/site-packages/amqp/channel.py&quot;, line 1597, in _on_basic_deliver fun(msg) File &quot;/usr/lib/python2.7/site-packages/kombu/messaging.py&quot;, line 624, in _receive_callback return on_m(message) if on_m else self.receive(decoded, message) File &quot;/usr/lib/python2.7/site-packages/celery/worker/consumer/consumer.py&quot;, line 572, in on_task_received callbacks, File &quot;/usr/lib/python2.7/site-packages/celery/worker/strategy.py&quot;, line 200, in task_message_handler handle(req) File &quot;/usr/lib/python2.7/site-packages/celery/worker/worker.py&quot;, line 228, in _process_task req.execute_using_pool(self.pool) File &quot;/usr/lib/python2.7/site-packages/celery/worker/request.py&quot;, line 520, in execute_using_pool time_limit, soft_time_limit = self.time_limits TypeError: 'NoneType' object is not iterable"><pre class="notranslate"><code class="notranslate">[2018-07-16 06:09:46,229: CRITICAL/MainProcess] Unrecoverable error: TypeError("'NoneType' object is not iterable",) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/celery/worker/worker.py", line 205, in start self.blueprint.start(self) File "/usr/lib/python2.7/site-packages/celery/bootsteps.py", line 119, in start step.start(parent) File "/usr/lib/python2.7/site-packages/celery/bootsteps.py", line 369, in start return self.obj.start() File "/usr/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 322, in start blueprint.start(self) File "/usr/lib/python2.7/site-packages/celery/bootsteps.py", line 119, in start step.start(parent) File "/usr/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 598, in start c.loop(*c.loop_args()) File "/usr/lib/python2.7/site-packages/celery/worker/loops.py", line 118, in synloop qos.update() File "/usr/lib/python2.7/site-packages/kombu/common.py", line 417, in update return self.set(self.value) File "/usr/lib/python2.7/site-packages/kombu/common.py", line 410, in set self.callback(prefetch_count=new_value) File "/usr/lib/python2.7/site-packages/celery/worker/consumer/tasks.py", line 47, in set_prefetch_count apply_global=qos_global, File "/usr/lib/python2.7/site-packages/kombu/messaging.py", line 558, in qos apply_global) File "/usr/lib/python2.7/site-packages/amqp/channel.py", line 1812, in basic_qos wait=spec.Basic.QosOk, File "/usr/lib/python2.7/site-packages/amqp/abstract_channel.py", line 59, in send_method return self.wait(wait, returns_tuple=returns_tuple) File "/usr/lib/python2.7/site-packages/amqp/abstract_channel.py", line 79, in wait self.connection.drain_events(timeout=timeout) File "/usr/lib/python2.7/site-packages/amqp/connection.py", line 491, in drain_events while not self.blocking_read(timeout): File "/usr/lib/python2.7/site-packages/amqp/connection.py", line 497, in blocking_read return self.on_inbound_frame(frame) File "/usr/lib/python2.7/site-packages/amqp/method_framing.py", line 77, in on_frame callback(channel, msg.frame_method, msg.frame_args, msg) File "/usr/lib/python2.7/site-packages/amqp/connection.py", line 501, in on_inbound_method method_sig, payload, content, File "/usr/lib/python2.7/site-packages/amqp/abstract_channel.py", line 128, in dispatch_method listener(*args) File "/usr/lib/python2.7/site-packages/amqp/channel.py", line 1597, in _on_basic_deliver fun(msg) File "/usr/lib/python2.7/site-packages/kombu/messaging.py", line 624, in _receive_callback return on_m(message) if on_m else self.receive(decoded, message) File "/usr/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 572, in on_task_received callbacks, File "/usr/lib/python2.7/site-packages/celery/worker/strategy.py", line 200, in task_message_handler handle(req) File "/usr/lib/python2.7/site-packages/celery/worker/worker.py", line 228, in _process_task req.execute_using_pool(self.pool) File "/usr/lib/python2.7/site-packages/celery/worker/request.py", line 520, in execute_using_pool time_limit, soft_time_limit = self.time_limits TypeError: 'NoneType' object is not iterable </code></pre></div> <h2 dir="auto">Checklist</h2> <p dir="auto">celery v 4.2.0</p> <h2 dir="auto">Steps to reproduce</h2> <p dir="auto">It's part of a much larger project, so I don't have a self-contained example yet.</p> <h2 dir="auto">Expected behavior</h2> <p dir="auto">return a tuple of (None, None)</p> <h2 dir="auto">Actual behavior</h2> <p dir="auto">TypeError</p>
1
<p dir="auto">Hi,</p> <p dir="auto">we are using angular2 as view engine for meteor application, meteor has angular2 rc3 integrated with it. i wanted to know how to access/manipulate the DOM.</p>
<p dir="auto">Hi,</p> <p dir="auto">we are using angular2 as view engine for meteor application, meteor has angular2 rc3 integrated with it. i wanted to know how to access/manipulate the DOM.</p>
1
<p dir="auto">I am using Julia for an application in PDE-constrained optimization, and have run into an issue I haven't seen before, giving a segfault when trying to return (apparently) from a function call. I only mention the nested functions because in the optimization setup, I construct functionals using passed data, and then pass <em>those</em> functionals to my optimization routine. Not sure if that is creating some issue behind the scenes.</p> <p dir="auto">Based on the optimization trace, all of the iterations in the solver are working correctly, but then something breaks. The embedded PDE solver and optimization routine have passing unit tests, so I'm (pretty) sure the problem is not with their separate functionality, but somehow at the interface between them.</p> <p dir="auto">The gist with the backtrace is here <a href="https://gist.github.com/jgoldfar/b311086329af529fff42">https://gist.github.com/jgoldfar/b311086329af529fff42</a>. The same issue appeared in version 0.3.0 I've been using for a while, but I figured I'd update to check if it resolved somehow. I'd be happy to look more into what is causing the issue on my own if someone could point me in the right direction!</p>
<p dir="auto">This is a cross-post of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="535694501" data-permission-text="Title is private" data-url="https://github.com/JuliaGraphics/Gtk.jl/issues/466" data-hovercard-type="issue" data-hovercard-url="/JuliaGraphics/Gtk.jl/issues/466/hovercard" href="https://github.com/JuliaGraphics/Gtk.jl/issues/466">JuliaGraphics/Gtk.jl#466</a>. Brief summary: there is a 10x increase in package load time for Gtk (from ~1s to ~10s), for which the main culprit is the sheer number of calls to <code class="notranslate">jl_recache_method_instance</code>. Looking at the signatures it's being called on, it's not clear that all of those deserve to be there.</p> <p dir="auto">This <em>might</em> be a consequence of the new artifact system, but the signatures lead me to be skeptical that it's related.</p>
0
<h2 dir="auto">Issue description</h2> <p dir="auto">nn.DataParallel uses memory on GPU 0 even if it's explicitly instructed to use 2 and 3.</p> <h2 dir="auto">Code example</h2> <p dir="auto">No line in this code snippet touches <code class="notranslate">cuda:0</code>.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import os import torch import torch.nn as nn class MM(nn.Module): def __init__(self): super().__init__() self.block1 = nn.Linear(10, 20) # wrap block2 in DataParallel self.block2 = nn.Linear(20, 20) self.block2 = nn.DataParallel(self.block2, device_ids=[3, 2]) self.block3 = nn.Linear(20, 20) def forward(self, x): x = self.block1(x) x = self.block2(x) x = self.block3(x) return x dev='cuda:3' x=torch.zeros((64, 10), device=dev) mm=MM() mm.to(device=dev) y=mm(x) os.system('nvidia-smi')"><pre class="notranslate"><code class="notranslate">import os import torch import torch.nn as nn class MM(nn.Module): def __init__(self): super().__init__() self.block1 = nn.Linear(10, 20) # wrap block2 in DataParallel self.block2 = nn.Linear(20, 20) self.block2 = nn.DataParallel(self.block2, device_ids=[3, 2]) self.block3 = nn.Linear(20, 20) def forward(self, x): x = self.block1(x) x = self.block2(x) x = self.block3(x) return x dev='cuda:3' x=torch.zeros((64, 10), device=dev) mm=MM() mm.to(device=dev) y=mm(x) os.system('nvidia-smi') </code></pre></div> <p dir="auto">However, nvidia-smi output indicates that GPU 0 is allocated memory</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="+-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 2407 G /usr/lib/xorg/Xorg 14MiB | | 0 5848 C python 306MiB | | 2 5848 C python 324MiB | | 3 5848 C python 324MiB | +-----------------------------------------------------------------------------+"><pre class="notranslate"><code class="notranslate">+-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 2407 G /usr/lib/xorg/Xorg 14MiB | | 0 5848 C python 306MiB | | 2 5848 C python 324MiB | | 3 5848 C python 324MiB | +-----------------------------------------------------------------------------+ </code></pre></div> <h2 dir="auto">System Info</h2> <p dir="auto">PyTorch version: 0.4.0<br> Is debug build: No<br> CUDA used to build PyTorch: 8.0.61</p> <p dir="auto">OS: Ubuntu 16.04.2 LTS<br> GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609<br> CMake version: version 3.5.1</p> <p dir="auto">Python version: 3.6<br> Is CUDA available: Yes<br> CUDA runtime version: 8.0.61<br> GPU models and configuration:<br> GPU 0: Tesla K80<br> GPU 1: Tesla K80<br> GPU 2: Tesla K80<br> GPU 3: Tesla K80</p> <p dir="auto">Nvidia driver version: 384.111<br> cuDNN version: Probably one of the following:<br> /usr/local/cuda-8.0/targets/x86_64-linux/lib/libcudnn.so<br> /usr/local/cuda-8.0/targets/x86_64-linux/lib/libcudnn.so.5<br> /usr/local/cuda-8.0/targets/x86_64-linux/lib/libcudnn.so.5.1.10<br> /usr/local/cuda-8.0/targets/x86_64-linux/lib/libcudnn_static.a</p> <p dir="auto">Versions of relevant libraries:<br> [pip3] msgpack-numpy (0.4.2)<br> [pip3] numpy (1.13.3)<br> [pip3] numpydoc (0.6.0)<br> [pip3] torch (0.4.0)<br> [pip3] torchvision (0.2.1)<br> [pip3] torchx (0.0.1, /home/jimfan/code/torchx)<br> [conda] cuda80 1.0 0 soumith<br> [conda] pytorch 0.4.0 py36_cuda8.0.61_cudnn7.1.2_1 pytorch<br> [conda] torchvision 0.2.1 py36_1 pytorch<br> [conda] torchx 0.0.1 </p>
<h2 dir="auto">Issue description</h2> <p dir="auto">on a multi GPU system, if a GPU != 0 is used, pytorch will still allocate some memory on the GPU 0 - see the nvidia-smi screenshot below.</p> <h2 dir="auto">Code example</h2> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import torch import torch.nn as nn from torch.autograd import Variable import torch.optim as optim........ torch.backends.cudnn.benchmark = True class TestNet(nn.Module): def __init__(self): super(TestNet, self).__init__() self.net1 = nn.Linear(100, 200) self.net2 = nn.Linear(200, 1) self.bn = nn.BatchNorm1d(200) self.sigmoid = nn.Sigmoid() self.ReLU = nn.ReLU(inplace=False) self.drop = nn.Dropout(0.5) ............... def forward(self, V): return self.sigmoid(self.net2(self.drop(self.ReLU(self.bn(self.net1(V)))))).squeeze(). GPU = 1 net = TestNet() criterion = nn.BCELoss() net.cuda(GPU) criterion.cuda(GPU) V = Variable(torch.randn(100, 100)).cuda(GPU) label = Variable(torch.randn(100)).cuda(GPU) optim_betas = (0.9, 0.999) optimizer = optim.Adam(filter(lambda p: p.requires_grad, net.parameters()), lr=0.01, betas=optim_betas) net.train() for i in range(0,1000000): net.zero_grad() r = net(V) err = criterion(r, label) err.backward()... "><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">torch</span> <span class="pl-k">import</span> <span class="pl-s1">torch</span>.<span class="pl-s1">nn</span> <span class="pl-k">as</span> <span class="pl-s1">nn</span> <span class="pl-k">from</span> <span class="pl-s1">torch</span>.<span class="pl-s1">autograd</span> <span class="pl-k">import</span> <span class="pl-v">Variable</span> <span class="pl-k">import</span> <span class="pl-s1">torch</span>.<span class="pl-s1">optim</span> <span class="pl-k">as</span> <span class="pl-s1">optim</span>........ <span class="pl-s1">torch</span>.<span class="pl-s1">backends</span>.<span class="pl-s1">cudnn</span>.<span class="pl-s1">benchmark</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span> <span class="pl-k">class</span> <span class="pl-v">TestNet</span>(<span class="pl-s1">nn</span>.<span class="pl-v">Module</span>): <span class="pl-k">def</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>): <span class="pl-en">super</span>(<span class="pl-v">TestNet</span>, <span class="pl-s1">self</span>).<span class="pl-en">__init__</span>() <span class="pl-s1">self</span>.<span class="pl-s1">net1</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-v">Linear</span>(<span class="pl-c1">100</span>, <span class="pl-c1">200</span>) <span class="pl-s1">self</span>.<span class="pl-s1">net2</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-v">Linear</span>(<span class="pl-c1">200</span>, <span class="pl-c1">1</span>) <span class="pl-s1">self</span>.<span class="pl-s1">bn</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-v">BatchNorm1d</span>(<span class="pl-c1">200</span>) <span class="pl-s1">self</span>.<span class="pl-s1">sigmoid</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-v">Sigmoid</span>() <span class="pl-s1">self</span>.<span class="pl-v">ReLU</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-v">ReLU</span>(<span class="pl-s1">inplace</span><span class="pl-c1">=</span><span class="pl-c1">False</span>) <span class="pl-s1">self</span>.<span class="pl-s1">drop</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-v">Dropout</span>(<span class="pl-c1">0.5</span>) ............... <span class="pl-s1">def</span> <span class="pl-en">forward</span>(<span class="pl-s1">self</span>, <span class="pl-v">V</span>): <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">sigmoid</span>(<span class="pl-s1">self</span>.<span class="pl-en">net2</span>(<span class="pl-s1">self</span>.<span class="pl-en">drop</span>(<span class="pl-s1">self</span>.<span class="pl-v">ReLU</span>(<span class="pl-s1">self</span>.<span class="pl-en">bn</span>(<span class="pl-s1">self</span>.<span class="pl-en">net1</span>(<span class="pl-v">V</span>)))))).<span class="pl-en">squeeze</span>(). <span class="pl-v">GPU</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span> <span class="pl-s1">net</span> <span class="pl-c1">=</span> <span class="pl-v">TestNet</span>() <span class="pl-s1">criterion</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-v">BCELoss</span>() <span class="pl-s1">net</span>.<span class="pl-en">cuda</span>(<span class="pl-v">GPU</span>) <span class="pl-s1">criterion</span>.<span class="pl-en">cuda</span>(<span class="pl-v">GPU</span>) <span class="pl-v">V</span> <span class="pl-c1">=</span> <span class="pl-v">Variable</span>(<span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">100</span>, <span class="pl-c1">100</span>)).<span class="pl-en">cuda</span>(<span class="pl-v">GPU</span>) <span class="pl-s1">label</span> <span class="pl-c1">=</span> <span class="pl-v">Variable</span>(<span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">100</span>)).<span class="pl-en">cuda</span>(<span class="pl-v">GPU</span>) <span class="pl-s1">optim_betas</span> <span class="pl-c1">=</span> (<span class="pl-c1">0.9</span>, <span class="pl-c1">0.999</span>) <span class="pl-s1">optimizer</span> <span class="pl-c1">=</span> <span class="pl-s1">optim</span>.<span class="pl-v">Adam</span>(<span class="pl-en">filter</span>(<span class="pl-k">lambda</span> <span class="pl-s1">p</span>: <span class="pl-s1">p</span>.<span class="pl-s1">requires_grad</span>, <span class="pl-s1">net</span>.<span class="pl-en">parameters</span>()), <span class="pl-s1">lr</span><span class="pl-c1">=</span><span class="pl-c1">0.01</span>, <span class="pl-s1">betas</span><span class="pl-c1">=</span><span class="pl-s1">optim_betas</span>) <span class="pl-s1">net</span>.<span class="pl-en">train</span>() <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">0</span>,<span class="pl-c1">1000000</span>): <span class="pl-s1">net</span>.<span class="pl-en">zero_grad</span>() <span class="pl-s1">r</span> <span class="pl-c1">=</span> <span class="pl-en">net</span>(<span class="pl-v">V</span>) <span class="pl-s1">err</span> <span class="pl-c1">=</span> <span class="pl-en">criterion</span>(<span class="pl-s1">r</span>, <span class="pl-s1">label</span>) <span class="pl-s1">err</span>.<span class="pl-en">backward</span>()...</pre></div> <p dir="auto">tester@NEWTITAN:~$ nvidia-smi<br> Sat Apr 28 23:45:03 2018<br> +-----------------------------------------------------------------------------+<br> | NVIDIA-SMI 387.26 Driver Version: 387.26 |<br> |-------------------------------+----------------------+----------------------+<br> | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |<br> | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |<br> |===============================+======================+======================|<br> | 0 TITAN X (Pascal) Off | 00000000:05:00.0 Off | N/A |<br> | 23% 33C P2 57W / 250W | 401MiB / 12189MiB | 0% Default |<br> +-------------------------------+----------------------+----------------------+<br> | 1 GeForce GTX 108... Off | 00000000:06:00.0 Off | N/A |<br> | 29% 33C P2 58W / 250W | 549MiB / 11172MiB | 6% Default |<br> +-------------------------------+----------------------+----------------------+<br> | 2 GeForce GTX 108... Off | 00000000:09:00.0 Off | N/A |<br> | 29% 36C P8 10W / 250W | 10MiB / 11172MiB | 0% Default |<br> +-------------------------------+----------------------+----------------------+</p> <p dir="auto">+-----------------------------------------------------------------------------+<br> | Processes: GPU Memory |<br> | GPU PID Type Process name Usage |<br> |=============================================================================|<br> | 0 1262 C python 391MiB |<br> | 1 1262 C python 539MiB |<br> +-----------------------------------------------------------------------------+</p>
1
<p dir="auto">Hi there, I'm stuck here.</p> <p dir="auto">Challenge <a href="https://www.freecodecamp.com/en/challenges/basic-javascript/escaping-literal-quotes-in-strings" rel="nofollow">escaping-literal-quotes-in-strings</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36</code>.</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=" var myStr = &quot;I am a \&quot;double quoted\&quot; string inside \&quot;double quotes\&quot;.&quot;; // Change this line "><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">myStr</span> <span class="pl-c1">=</span> <span class="pl-s">"I am a \"double quoted\" string inside \"double quotes\"."</span><span class="pl-kos">;</span> <span class="pl-c">// Change this line</span></pre></div> <p dir="auto">So, what's the problem? I can't complete this task because of this error:</p> <blockquote> <p dir="auto">You should use two double quotes (") and four escaped double quotes (").</p> </blockquote> <p dir="auto">But.. I'm use them all, no?</p>
<p dir="auto">On the current staging, two challenges ("Escaping Literal Quotes in Strings" and "Quoting Strings with Single Quotes") do not pass all tests with standard solution code.</p> <p dir="auto">Namely, tests asserting regex match lengths for non-escaped double quotes are failing:<br> <code class="notranslate">code.match(/[^\\\\]\"/g).length === 2</code> in the former challenge and<br> <code class="notranslate">code.match(/\"/g).length === 4</code> in the latter.</p> <p dir="auto">(Note: each of these is only one half of their respective test, and it might be beneficial in this case to split each test into two parts so users know where to look for their mistake instead of counting every quotation mark, as well as speeding up debugging if something breaks the regex again later on.)</p>
1
<p dir="auto">There is quite a number of duplicated code in different node status related test functions, such as mock cadvisor intialization, expected node status etc.</p> <p dir="auto">It should be cleaned up. :)</p>
<p dir="auto">Admittedly this one is an edge case, but we had an issue that nearly locked us out of our AWS account following data loss on the kubernetes master. Specifically:</p> <ol dir="auto"> <li>We turned up a k8s cluster integrated with AWS</li> <li>An issue in our infrastructure caused us to lose the master's etcd storage (since resolved)</li> <li>The new master came up, we recreated some of the lost state (i.e. kubectl create -f service.yml) and the master tried to resync that partial state with AWS, failing on duplicate resources</li> <li>Until those resources were manually removed, the controller retried each operation often enough that our account become API rate limited, degrading access to our infrastructure</li> </ol> <p dir="auto">The obvious solution is to not lose the master's data, and we have fixed our mistake there. That said, as the flow above nearly locked us out of our AWS account, it would be nice if the controller had responded a little better to the partial data scenario. Two changes that would have helped us:</p> <ol dir="auto"> <li>Increasing backoffs (random, exponential, fibonacci, etc.) around AWS API retries especially when the previous call failed due to a "RequestLimitExceeded" – though this does have the downside of pushing out time to convergence when the underlying issue is fixed</li> <li>A way for the AWS integration to self-heal: when it fails to create e.g. a route because that route already exists in the table, a nicer error handling strategy might simply say "Creation successful!" – the situation is more difficult with security groups that have some state that potentially requires diffing, but in our case the issue occurred in the degenerate case where the controller was trying to recreate the exact resource that already existed</li> </ol> <p dir="auto">For context, the log messages we saw from the controller (there was some variation depending on which exact request was throttled):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E0916 23:21:30.178529 1 servicecontroller.go:171] Failed to process service delta. Retrying: failed to create external load balancer for service default/hello-world: error listing AWS subnets: RequestLimitExceeded: Request limit exceeded. status code: 503, request id: []"><pre class="notranslate"><code class="notranslate">E0916 23:21:30.178529 1 servicecontroller.go:171] Failed to process service delta. Retrying: failed to create external load balancer for service default/hello-world: error listing AWS subnets: RequestLimitExceeded: Request limit exceeded. status code: 503, request id: [] </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E0916 22:53:56.348372 1 routecontroller.go:91] Could not create route ROUTE_ID 10.244.0.0/24: error creating AWS route (10.244.0.0/24): RequestLimitExceeded: Request limit exceeded."><pre class="notranslate"><code class="notranslate">E0916 22:53:56.348372 1 routecontroller.go:91] Could not create route ROUTE_ID 10.244.0.0/24: error creating AWS route (10.244.0.0/24): RequestLimitExceeded: Request limit exceeded. </code></pre></div> <p dir="auto">The underlying issues seemed to stem from:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E0916 23:35:37.607891 1 servicecontroller.go:171] Failed to process service delta. Retrying: failed to create external load balancer for service default/hello-world: InvalidGroup.Duplicate: The security group 'SECURITY_GROUP_ID' already exists for VPC 'VPC_ID'"><pre class="notranslate"><code class="notranslate">E0916 23:35:37.607891 1 servicecontroller.go:171] Failed to process service delta. Retrying: failed to create external load balancer for service default/hello-world: InvalidGroup.Duplicate: The security group 'SECURITY_GROUP_ID' already exists for VPC 'VPC_ID' </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E0916 22:52:56.239869 1 routecontroller.go:91] Could not create route ROUTE_ID 10.244.3.0/24: error creating AWS route (10.244.3.0/24): RouteAlreadyExists: The route identified by 10.244.3.0/24 already exists."><pre class="notranslate"><code class="notranslate">E0916 22:52:56.239869 1 routecontroller.go:91] Could not create route ROUTE_ID 10.244.3.0/24: error creating AWS route (10.244.3.0/24): RouteAlreadyExists: The route identified by 10.244.3.0/24 already exists. </code></pre></div> <p dir="auto">Deleting both of those resources did appear to resolve the problem. Thanks for reading my book!</p>
0
<p dir="auto">Issue Id: <b>76000c98-ba3d-f84d-60f4-a18061d87e94</b><br><br><em>Versions</em> <br>- 0.10.6-release<br>- <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/df352367df2efcfa9d602d471e4e2f42140a0f05/hovercard" href="https://github.com/microsoft/vscode/commit/df352367df2efcfa9d602d471e4e2f42140a0f05"><tt>df35236</tt></a><br>- <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/45d69357c9eb068dd8e624f5b0fe461cd2078d88/hovercard" href="https://github.com/microsoft/vscode/commit/45d69357c9eb068dd8e624f5b0fe461cd2078d88"><tt>45d6935</tt></a><br>- <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/783ecf841a2b21edca6d86853670cae89b4c244f/hovercard" href="https://github.com/microsoft/vscode/commit/783ecf841a2b21edca6d86853670cae89b4c244f"><tt>783ecf8</tt></a><br>- <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/7cc0c602a2b802b09a3f56b68a1a61ee9e8f0066/hovercard" href="https://github.com/microsoft/vscode/commit/7cc0c602a2b802b09a3f56b68a1a61ee9e8f0066"><tt>7cc0c60</tt></a><br>- <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/db71ac615ddf9f33b133ff2536f5d33a77d4774e/hovercard" href="https://github.com/microsoft/vscode/commit/db71ac615ddf9f33b133ff2536f5d33a77d4774e"><tt>db71ac6</tt></a><br><em>Stack</em> <br>RangeError: Maximum call stack size exceeded<br> at y.scan (out/vs/languages/sass/common/sassWorker.js:4:902) <br> at y.scan (out/vs/languages/sass/common/sassWorker.js:4:1041) <br> at y.e.scan (out/vs/languages/css/common/cssWorker.js:4:27925) <br> at y.scan (out/vs/languages/sass/common/sassWorker.js:4:1839) <br> at y.scan (out/vs/languages/sass/common/sassWorker.js:4:1041) <br> at y.e.scan (out/vs/languages/css/common/cssWorker.js:4:27925) <br> at y.scan (out/vs/languages/sass/common/sassWorker.js:4:1839) <br> at y.scan (out/vs/languages/sass/common/sassWorker.js:4:1041) <br> at y.e.scan (out/vs/languages/css/common/cssWorker.js:4:27925) <br> at y.scan (out/vs/languages/sass/common/sassWorker.js:4:1839) <br></p>
<p dir="auto">Issue Id: <b>968d4e7a-4da8-28b1-94a4-326ec7727806</b><br><br><em>Versions</em> <br>- 0.10.6-release<br>- <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/783ecf841a2b21edca6d86853670cae89b4c244f/hovercard" href="https://github.com/microsoft/vscode/commit/783ecf841a2b21edca6d86853670cae89b4c244f"><tt>783ecf8</tt></a><br>- <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/df352367df2efcfa9d602d471e4e2f42140a0f05/hovercard" href="https://github.com/microsoft/vscode/commit/df352367df2efcfa9d602d471e4e2f42140a0f05"><tt>df35236</tt></a><br>- <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/dfc08dc9edf6607483b193bf934d3badc3fa2e11/hovercard" href="https://github.com/microsoft/vscode/commit/dfc08dc9edf6607483b193bf934d3badc3fa2e11"><tt>dfc08dc</tt></a><br>- <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/7cc0c602a2b802b09a3f56b68a1a61ee9e8f0066/hovercard" href="https://github.com/microsoft/vscode/commit/7cc0c602a2b802b09a3f56b68a1a61ee9e8f0066"><tt>7cc0c60</tt></a><br>- <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/db71ac615ddf9f33b133ff2536f5d33a77d4774e/hovercard" href="https://github.com/microsoft/vscode/commit/db71ac615ddf9f33b133ff2536f5d33a77d4774e"><tt>db71ac6</tt></a><br><em>Stack</em> <br>RangeError: Maximum call stack size exceeded<br>[/vs/languages/css/common/parser/cssScanner.ts#L264:2 (Scanner.scan)](<a href="https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/css/common/parser/cssScanner.ts#L264:2">https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/css/common/parser/cssScanner.ts#L264:2</a> %28Scanner.scan%29)<br>[/vs/languages/sass/common/parser/sassScanner.ts#L100:19 (SassScanner.scan)](<a href="https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/sass/common/parser/sassScanner.ts#L100:19">https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/sass/common/parser/sassScanner.ts#L100:19</a> %28SassScanner.scan%29)<br>[/vs/languages/sass/common/parser/sassScanner.ts#L50:16 (SassScanner.scan)](<a href="https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/sass/common/parser/sassScanner.ts#L50:16">https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/sass/common/parser/sassScanner.ts#L50:16</a> %28SassScanner.scan%29)<br>[/vs/languages/css/common/parser/cssScanner.ts#L276:16 (Scanner.scan)](<a href="https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/css/common/parser/cssScanner.ts#L276:16">https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/css/common/parser/cssScanner.ts#L276:16</a> %28Scanner.scan%29)<br>[/vs/languages/sass/common/parser/sassScanner.ts#L100:19 (SassScanner.scan)](<a href="https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/sass/common/parser/sassScanner.ts#L100:19">https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/sass/common/parser/sassScanner.ts#L100:19</a> %28SassScanner.scan%29)<br>[/vs/languages/sass/common/parser/sassScanner.ts#L50:16 (SassScanner.scan)](<a href="https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/sass/common/parser/sassScanner.ts#L50:16">https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/sass/common/parser/sassScanner.ts#L50:16</a> %28SassScanner.scan%29)<br>[/vs/languages/css/common/parser/cssScanner.ts#L276:16 (Scanner.scan)](<a href="https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/css/common/parser/cssScanner.ts#L276:16">https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/css/common/parser/cssScanner.ts#L276:16</a> %28Scanner.scan%29)<br>[/vs/languages/sass/common/parser/sassScanner.ts#L100:19 (SassScanner.scan)](<a href="https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/sass/common/parser/sassScanner.ts#L100:19">https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/sass/common/parser/sassScanner.ts#L100:19</a> %28SassScanner.scan%29)<br>[/vs/languages/sass/common/parser/sassScanner.ts#L50:16 (SassScanner.scan)](<a href="https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/sass/common/parser/sassScanner.ts#L50:16">https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/sass/common/parser/sassScanner.ts#L50:16</a> %28SassScanner.scan%29)<br>[/vs/languages/css/common/parser/cssScanner.ts#L276:16 (Scanner.scan)](<a href="https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/css/common/parser/cssScanner.ts#L276:16">https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/languages/css/common/parser/cssScanner.ts#L276:16</a> %28Scanner.scan%29)<br></p>
1
<p dir="auto"><strong>Migrated issue, originally created by Wichert Akkerman (<a href="https://github.com/wichert">@wichert</a>)</strong></p> <p dir="auto">I'm used to metadata.create_all() being very smart and creating everything as needed. I seem to have found a gap in its knowledge though: enum types that are only used in PostgreSQL ARRAY types are not created. The attached test case gives this output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2015-05-29 14:40:08,477 INFO sqlalchemy.engine.base.Engine select version() 2015-05-29 14:40:08,477 INFO sqlalchemy.engine.base.Engine {} 2015-05-29 14:40:08,478 INFO sqlalchemy.engine.base.Engine select current_schema() 2015-05-29 14:40:08,478 INFO sqlalchemy.engine.base.Engine {} 2015-05-29 14:40:08,479 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS VARCHAR(60)) AS anon_1 2015-05-29 14:40:08,479 INFO sqlalchemy.engine.base.Engine {} 2015-05-29 14:40:08,479 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS VARCHAR(60)) AS anon_1 2015-05-29 14:40:08,479 INFO sqlalchemy.engine.base.Engine {} 2015-05-29 14:40:08,480 INFO sqlalchemy.engine.base.Engine show standard_conforming_strings 2015-05-29 14:40:08,480 INFO sqlalchemy.engine.base.Engine {} 2015-05-29 14:40:08,481 INFO sqlalchemy.engine.base.Engine select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where pg_catalog.pg_table_is_visible(c.oid) and relname=%(name)s 2015-05-29 14:40:08,481 INFO sqlalchemy.engine.base.Engine {'name': 'pizza'} 2015-05-29 14:40:08,482 INFO sqlalchemy.engine.base.Engine CREATE TABLE pizza ( id SERIAL NOT NULL, toppings topping[], PRIMARY KEY (id) ) 2015-05-29 14:40:08,482 INFO sqlalchemy.engine.base.Engine {} 2015-05-29 14:40:08,483 INFO sqlalchemy.engine.base.Engine ROLLBACK Traceback (most recent call last): File &quot;/Users/wichert/Jzoo/backend/lib/python3.4/site-packages/sqlalchemy/engine/base.py&quot;, line 1139, in _execute_context context) File &quot;/Users/wichert/Jzoo/backend/lib/python3.4/site-packages/sqlalchemy/engine/default.py&quot;, line 442, in do_execute cursor.execute(statement, parameters) psycopg2.ProgrammingError: type &quot;topping[]&quot; does not exist LINE 4: toppings topping[], "><pre class="notranslate"><code class="notranslate">2015-05-29 14:40:08,477 INFO sqlalchemy.engine.base.Engine select version() 2015-05-29 14:40:08,477 INFO sqlalchemy.engine.base.Engine {} 2015-05-29 14:40:08,478 INFO sqlalchemy.engine.base.Engine select current_schema() 2015-05-29 14:40:08,478 INFO sqlalchemy.engine.base.Engine {} 2015-05-29 14:40:08,479 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS VARCHAR(60)) AS anon_1 2015-05-29 14:40:08,479 INFO sqlalchemy.engine.base.Engine {} 2015-05-29 14:40:08,479 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS VARCHAR(60)) AS anon_1 2015-05-29 14:40:08,479 INFO sqlalchemy.engine.base.Engine {} 2015-05-29 14:40:08,480 INFO sqlalchemy.engine.base.Engine show standard_conforming_strings 2015-05-29 14:40:08,480 INFO sqlalchemy.engine.base.Engine {} 2015-05-29 14:40:08,481 INFO sqlalchemy.engine.base.Engine select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where pg_catalog.pg_table_is_visible(c.oid) and relname=%(name)s 2015-05-29 14:40:08,481 INFO sqlalchemy.engine.base.Engine {'name': 'pizza'} 2015-05-29 14:40:08,482 INFO sqlalchemy.engine.base.Engine CREATE TABLE pizza ( id SERIAL NOT NULL, toppings topping[], PRIMARY KEY (id) ) 2015-05-29 14:40:08,482 INFO sqlalchemy.engine.base.Engine {} 2015-05-29 14:40:08,483 INFO sqlalchemy.engine.base.Engine ROLLBACK Traceback (most recent call last): File "/Users/wichert/Jzoo/backend/lib/python3.4/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context context) File "/Users/wichert/Jzoo/backend/lib/python3.4/site-packages/sqlalchemy/engine/default.py", line 442, in do_execute cursor.execute(statement, parameters) psycopg2.ProgrammingError: type "topping[]" does not exist LINE 4: toppings topping[], </code></pre></div> <hr> <p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/3437/x.py">x.py</a></p>
<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p> <p dir="auto">metadata.create_all do not create work_place_roles if Enum in sqlalchemy.dialects.postgresql.ARRAY</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class WorkPlacement(Base): __tablename__ = 'work_placement' roles = Column(ARRAY(Enum('manager', 'place_admin', 'carwash_admin', 'parking_admin', 'service_admin', 'tire_admin', 'mechanic', 'carwasher', 'tire_mechanic', name=&quot;work_place_roles&quot;)))"><pre class="notranslate"><code class="notranslate">class WorkPlacement(Base): __tablename__ = 'work_placement' roles = Column(ARRAY(Enum('manager', 'place_admin', 'carwash_admin', 'parking_admin', 'service_admin', 'tire_admin', 'mechanic', 'carwasher', 'tire_mechanic', name="work_place_roles"))) </code></pre></div> <p dir="auto">i need do so:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class WorkPlacement(Base): __tablename__ = 'work_placement' tmp_role = Column(Enum('manager', 'place_admin', 'carwash_admin', 'parking_admin', 'service_admin', 'tire_admin', 'mechanic', 'carwasher', 'tire_mechanic', name=&quot;work_place_roles&quot;)) roles = Column(ARRAY(Enum(name=&quot;work_place_roles&quot;)))"><pre class="notranslate"><code class="notranslate">class WorkPlacement(Base): __tablename__ = 'work_placement' tmp_role = Column(Enum('manager', 'place_admin', 'carwash_admin', 'parking_admin', 'service_admin', 'tire_admin', 'mechanic', 'carwasher', 'tire_mechanic', name="work_place_roles")) roles = Column(ARRAY(Enum(name="work_place_roles"))) </code></pre></div>
1
<p dir="auto">The desire average would be 38/4 = 9.5.</p> <p dir="auto">POST /sports/athlete/13<br> {"name":"john","rating": ["8", "10"]}<br> POST /sports/athlete/14<br> {"name":"john","rating": ["10", "10"]}</p> <p dir="auto">POST /sports/athlete/_search<br> {<br> "size": 0,<br> "aggregations": {<br> "the_name": {<br> "terms": {<br> "field": "name",<br> "order": {<br> "rating_avg": "desc"<br> }<br> },<br> "aggregations": {<br> "rating_avg": {<br> "avg": {<br> "field": "rating"<br> }<br> }<br> }<br> }<br> }<br> }</p> <p dir="auto">However the query return a value of 9.3333, which is 28/3. The duplicated value in a doc has been ignored.</p>
<p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:<br> On Elasticsearch 2.2.1, when loading some geojson shapes into a field indexed with:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;location&quot;: {&quot;type&quot;: &quot;geo_shape&quot;, &quot;precision&quot;: &quot;1600m&quot;}"><pre class="notranslate"><code class="notranslate">"location": {"type": "geo_shape", "precision": "1600m"} </code></pre></div> <p dir="auto">Throws the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Provided shape has duplicate consecutive coordinates at: (180.0, -90.0, NaN)"><pre class="notranslate"><code class="notranslate">Provided shape has duplicate consecutive coordinates at: (180.0, -90.0, NaN) </code></pre></div> <p dir="auto">I believe the geojson is valid and should load fine.</p> <p dir="auto"><strong>Steps to reproduce</strong>:</p> <ol dir="auto"> <li>Load the 'geometry' field of this <a href="https://github.com/elastic/elasticsearch/files/195473/Antarctica.txt">json blob of Antarctica</a> into a geoshape index</li> </ol> <p dir="auto">This is a reprise of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="110380740" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/14014" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/14014/hovercard" href="https://github.com/elastic/elasticsearch/issues/14014">#14014</a> but with more details included. I agree with the analysis in that ticket by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/danni/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/danni">@danni</a> that this is a artefact of the shape being simplified before being indexed - the 'duplicate consecutive coordinates' being referred to in the error quite simply don't appear even once in the original data.</p>
0
<h5 dir="auto">Issue Type:</h5> <p dir="auto">Bug</p> <h5 dir="auto">Ansible Version:</h5> <p dir="auto">Have encountered it in head, 1.5.2 and 1.5.3, according to discussions on irc it has been around for quite some time.</p> <h5 dir="auto">Environment:</h5> <p dir="auto">Deploy os is Os X mavericks servers deployed to is debian 7.</p> <h5 dir="auto">Summary:</h5> <p dir="auto">When using child groups to be able to override som variables, the variable from the parent group is the one that gets used.</p> <p dir="auto">All tough this bug is not explicitly described in the pull request <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="29129998" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/6379" data-hovercard-type="pull_request" data-hovercard-url="/ansible/ansible/pull/6379/hovercard" href="https://github.com/ansible/ansible/pull/6379">#6379</a> it did solve the problem. Tested the PR when merging with 1.5.3 branch.</p> <h5 dir="auto">Steps To Reproduce:</h5> <p dir="auto">small example snippet (I can add full files if needed).</p> <p dir="auto">Inventory file:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[devproxyservers] 10.0.40.83 10.0.40.84 [proxyservers:children] devproxyservers"><pre class="notranslate"><code class="notranslate">[devproxyservers] 10.0.40.83 10.0.40.84 [proxyservers:children] devproxyservers </code></pre></div> <p dir="auto">proxyservers group vars</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cert_path: &quot;{{ base_dir }}/certs/{{ cert_name }}&quot; key_path: &quot;{{ base_dir }}/certs/{{ key_name }}&quot;"><pre class="notranslate"><code class="notranslate">cert_path: "{{ base_dir }}/certs/{{ cert_name }}" key_path: "{{ base_dir }}/certs/{{ key_name }}" </code></pre></div> <p dir="auto">devproxyservers group vars</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cert_path: &quot;{{ base_dir }}/certs/fake_cert.crt&quot; key_path: &quot;{{ base_dir }}/certs/fake_key.key&quot;"><pre class="notranslate"><code class="notranslate">cert_path: "{{ base_dir }}/certs/fake_cert.crt" key_path: "{{ base_dir }}/certs/fake_key.key" </code></pre></div> <h5 dir="auto">Expected Results:</h5> <p dir="auto">according to docs <a href="http://docs.ansible.com/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable" rel="nofollow">http://docs.ansible.com/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable</a> the cild group vars should be used.</p> <h5 dir="auto">Actual Results:</h5> <p dir="auto">The variables of proxyservers group is the variable that gets used</p>
<p dir="auto">Allow for nesting of groups within groups in the /etc/ansible/hosts Inventory File. A comparative (but not exact match) feature would be LUMPs in dsh.</p> <p dir="auto">Examples would be something like:</p> <p dir="auto">[datacenters]<br> east-coast-dc<br> west-coast-dc</p> <p dir="auto">[east-coast-dc]<br> eastcoast-webservers<br> eastcoast-appservers</p> <p dir="auto">[west-coast-dc]<br> westcoast-webservers<br> westcoast-appservers</p> <p dir="auto">[east-coast-webservers]<br> web1<br> web2</p> <p dir="auto">[west-coast-webservers]<br> web3<br> web4</p> <p dir="auto">[site-webservers]<br> east-coast-webservers<br> west-coast-webservers</p> <p dir="auto">There may be some better ways to accomplish some of the nesting via something like tagging classes/roles/location of host defs, but I haven't thought that completely through yet. Could be of the form:</p> <p dir="auto">host: location:class/role, i.e</p> <p dir="auto">web1:east-coast:webserver<br> app3:west-coast:appserver<br> webapp2:east-coast:appserver,webserver</p> <p dir="auto">Need to balance extensibility against simplicity here, but limiting the amount of duplication in the configuration will help out tremendously for inheritance and reduce errors and mistakes in forgetting to add hosts to multiple groups.</p>
0
<p dir="auto">Looks like the os.geteuid() is not available in windows. which is causing celery not start. Please do help with some fix.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;C:\Python27\Scripts\celery-script.py&quot;, line 9, in &lt;module&gt; load_entry_point('celery==3.1.5', 'console_scripts', 'celery')() File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\__main__.py&quot;, line 29, in main main() File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\celery.py&quot;, line 80, in main cmd.execute_from_commandline(argv) File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\celery.py&quot;, line 725, in execute_from_commandline super(CeleryCommand, self).execute_from_commandline(argv))) File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\base.py&quot;, line 300, in execute_from_commandline return self.handle_argv(self.prog_name, argv[1:]) File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\celery.py&quot;, line 717, in handle_argv return self.execute(command, argv) File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\celery.py&quot;, line 671, in execute ).run_from_argv(self.prog_name, argv[1:], command=argv[0]) File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\worker.py&quot;, line 174, in run_from_argv return self(*args, **options) File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\base.py&quot;, line 263, in __call__ ret = self.run(*args, **kwargs) File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\worker.py&quot;, line 185, in run maybe_drop_privileges(uid=uid, gid=gid) File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\platforms.py&quot;, line 496, in maybe_drop_privileges if os.geteuid(): AttributeError: 'module' object has no attribute 'geteuid'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "C:\Python27\Scripts\celery-script.py", line 9, in &lt;module&gt; load_entry_point('celery==3.1.5', 'console_scripts', 'celery')() File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\__main__.py", line 29, in main main() File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\celery.py", line 80, in main cmd.execute_from_commandline(argv) File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\celery.py", line 725, in execute_from_commandline super(CeleryCommand, self).execute_from_commandline(argv))) File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\base.py", line 300, in execute_from_commandline return self.handle_argv(self.prog_name, argv[1:]) File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\celery.py", line 717, in handle_argv return self.execute(command, argv) File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\celery.py", line 671, in execute ).run_from_argv(self.prog_name, argv[1:], command=argv[0]) File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\worker.py", line 174, in run_from_argv return self(*args, **options) File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\base.py", line 263, in __call__ ret = self.run(*args, **kwargs) File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\worker.py", line 185, in run maybe_drop_privileges(uid=uid, gid=gid) File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\platforms.py", line 496, in maybe_drop_privileges if os.geteuid(): AttributeError: 'module' object has no attribute 'geteuid' </code></pre></div>
1
<p dir="auto">There is no ARM build of Electron.<br> This prevents Visual Studio Code from being compiled for ARM Linux.</p> <p dir="auto"><a href="https://code.visualstudio.com/Issues/Detail/17414" rel="nofollow">https://code.visualstudio.com/Issues/Detail/17414</a></p>
<p dir="auto">Is there a way to cross/compile atom-shell for ARM based computers?</p>
1
<p dir="auto">hi,</p> <p dir="auto">i have update to 0.14 version because i want to use a premade component which requires it. i've spent an hour more trying to debug why nothing renders, then i tried other components that worked, but they didn't render either.</p> <p dir="auto">then i googled and found that i need to require react-dom and ReactDOM.render</p> <p dir="auto">but this didn't help either. the render methods of all my components are not being called at all</p> <p dir="auto">how is that possible?</p>
<p dir="auto">Describe what you were doing when the bug occurred:</p> <ol dir="auto"> <li>Scrolling through the components tree after inspecting a DOM element and selecting the "Components" tab.</li> </ol> <hr> <h2 dir="auto">Please do not remove the text below this line</h2> <p dir="auto">DevTools version: 4.11.0-39713716aa</p> <p dir="auto">Call stack: at store_Store.getElementAtIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:22171:35)<br> at store_Store.getElementIDAtIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:22187:26)<br> at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29770:63<br> at List.render (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23893:18)<br> at Ii (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:14002:76)<br> at Hi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13993:10)<br> at uk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16728:86)<br> at tk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16245:11)<br> at qk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16237:23)<br> at jk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16221:5)</p> <p dir="auto">Component stack: at List (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23588:30)<br> at div<br> at AutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:3111:5)<br> at div<br> at div<br> at Tree_Tree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29531:47)<br> at div<br> at div<br> at OwnersListContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:28680:3)<br> at SettingsModalContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29121:3)<br> at Components_Components (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:34645:52)<br> at ErrorBoundary_ErrorBoundary (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30035:5)<br> at PortaledContent (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30157:5)<br> at div<br> at div<br> at ProfilerContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:34264:3)<br> at TreeContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25356:3)<br> at SettingsContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25963:3)<br> at ModalDialogContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30300:3)<br> at DevTools_DevTools (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:37639:3)</p>
0
<p dir="auto">This kind of crap is unacceptable. Python3.7 team should remove their collective head from their collective butt. (keyword mismatch)</p> <p dir="auto">jA$ scrapy shell<br> 2018-07-08 14:42:44 [scrapy.utils.log] INFO: Scrapy 1.5.0 started (bot: scrapybot)<br> 2018-07-08 14:42:44 [scrapy.utils.log] INFO: Versions: lxml 4.2.3.0, libxml2 2.9.2, cssselect 1.0.3, parsel 1.4.0, w3lib 1.19.0, Twisted 18.4.0, Python 3.7.0 (default, Jun 29 2018, 20:13:53) - [Clang 8.0.0 (clang-800.0.42.1)], pyOpenSSL 18.0.0 (OpenSSL 1.1.0h 27 Mar 2018), cryptography 2.2.2, Platform Darwin-15.6.0-x86_64-i386-64bit<br> 2018-07-08 14:42:44 [scrapy.crawler] INFO: Overridden settings: {'DUPEFILTER_CLASS': 'scrapy.dupefilters.BaseDupeFilter', 'LOGSTATS_INTERVAL': 0}<br> Traceback (most recent call last):<br> File "/usr/local/bin/scrapy", line 11, in <br> sys.exit(execute())<br> File "/usr/local/lib/python3.7/site-packages/scrapy/cmdline.py", line 150, in execute<br> _run_print_help(parser, _run_command, cmd, args, opts)<br> File "/usr/local/lib/python3.7/site-packages/scrapy/cmdline.py", line 90, in _run_print_help<br> func(*a, **kw)<br> File "/usr/local/lib/python3.7/site-packages/scrapy/cmdline.py", line 157, in _run_command<br> cmd.run(args, opts)<br> File "/usr/local/lib/python3.7/site-packages/scrapy/commands/shell.py", line 65, in run<br> crawler = self.crawler_process._create_crawler(spidercls)<br> File "/usr/local/lib/python3.7/site-packages/scrapy/crawler.py", line 203, in _create_crawler<br> return Crawler(spidercls, self.settings)<br> File "/usr/local/lib/python3.7/site-packages/scrapy/crawler.py", line 55, in <strong>init</strong><br> self.extensions = ExtensionManager.from_crawler(self)<br> File "/usr/local/lib/python3.7/site-packages/scrapy/middleware.py", line 58, in from_crawler<br> return cls.from_settings(crawler.settings, crawler)<br> File "/usr/local/lib/python3.7/site-packages/scrapy/middleware.py", line 34, in from_settings<br> mwcls = load_object(clspath)<br> File "/usr/local/lib/python3.7/site-packages/scrapy/utils/misc.py", line 44, in load_object<br> mod = import_module(module)<br> File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/<strong>init</strong>.py", line 127, in import_module<br> return _bootstrap._gcd_import(name[level:], package, level)<br> File "", line 1006, in _gcd_import<br> File "", line 983, in _find_and_load<br> File "", line 967, in _find_and_load_unlocked<br> File "", line 677, in _load_unlocked<br> File "", line 728, in exec_module<br> File "", line 219, in _call_with_frames_removed<br> File "/usr/local/lib/python3.7/site-packages/scrapy/extensions/telnet.py", line 12, in <br> from twisted.conch import manhole, telnet<br> File "/usr/local/lib/python3.7/site-packages/twisted/conch/manhole.py", line 154<br> def write(self, data, async=False):<br> ^<br> SyntaxError: invalid syntax</p>
<p dir="auto">The goal is to add python 3.7 to travis and pass all tests, the first beta was already released at the end of January.</p>
1
<h2 dir="auto">Steps to Reproduce</h2> <p dir="auto">I would like to show the hintText of a textField until the user touches somewhere else.<br> The touchpoint could be deep in the widget tree and I dont know how to obtain the current focused node somewhere in the widget tree to call unfocused, to show the textField inactive and hide the keyboard. This might be just an issue with my understanding of flutter or the documentation which lacks example and does not explain how to use the patterns.</p> <p dir="auto">The code example shows the GestureDetector which is calling unfocus on the node. This is simple here because the focusNode is easily accessible in the same widget. The question here is how to do the same in a nested widget tree. What is the recommended pattern to do so?</p> <div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" @override Widget build(BuildContext context) { return new Scaffold( appBar: new AppBar( title: new Text(widget.title), ), body: new Stack(children: &lt;Widget&gt;[ new GestureDetector( excludeFromSemantics: true, onTapDown: (_) { _focusNode.unfocus(); }), new Column(children: &lt;Widget&gt;[ new TextField( focusNode: _focusNode, decoration: new InputDecoration( border: null, hintText: _focusNode.hasFocus ? 'FOCUS' : 'no focus')), new RaisedButton( child: new Text('Remove Focus'), onPressed: () =&gt; _focusNode.unfocus()) ]) ])); } final FocusNode _focusNode = new FocusNode(); @override void initState() { super.initState(); _focusNode.addListener(() { setState(() {}); print('Has focus: $_focusNode.hasFocus'); }); }"><pre class="notranslate"> <span class="pl-k">@override</span> <span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) { <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">Scaffold</span>( appBar<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">AppBar</span>( title<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Text</span>(widget.title), ), body<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Stack</span>(children<span class="pl-k">:</span> <span class="pl-k">&lt;</span><span class="pl-c1">Widget</span><span class="pl-k">&gt;</span>[ <span class="pl-k">new</span> <span class="pl-c1">GestureDetector</span>( excludeFromSemantics<span class="pl-k">:</span> <span class="pl-c1">true</span>, onTapDown<span class="pl-k">:</span> (_) { _focusNode.<span class="pl-en">unfocus</span>(); }), <span class="pl-k">new</span> <span class="pl-c1">Column</span>(children<span class="pl-k">:</span> <span class="pl-k">&lt;</span><span class="pl-c1">Widget</span><span class="pl-k">&gt;</span>[ <span class="pl-k">new</span> <span class="pl-c1">TextField</span>( focusNode<span class="pl-k">:</span> _focusNode, decoration<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">InputDecoration</span>( border<span class="pl-k">:</span> <span class="pl-c1">null</span>, hintText<span class="pl-k">:</span> _focusNode.hasFocus <span class="pl-k">?</span> <span class="pl-s">'FOCUS'</span> <span class="pl-k">:</span> <span class="pl-s">'no focus'</span>)), <span class="pl-k">new</span> <span class="pl-c1">RaisedButton</span>( child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Text</span>(<span class="pl-s">'Remove Focus'</span>), onPressed<span class="pl-k">:</span> () <span class="pl-k">=&gt;</span> _focusNode.<span class="pl-en">unfocus</span>()) ]) ])); } <span class="pl-k">final</span> <span class="pl-c1">FocusNode</span> _focusNode <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">FocusNode</span>(); <span class="pl-k">@override</span> <span class="pl-k">void</span> <span class="pl-en">initState</span>() { <span class="pl-c1">super</span>.<span class="pl-en">initState</span>(); _focusNode.<span class="pl-en">addListener</span>(() { <span class="pl-en">setState</span>(() {}); <span class="pl-en">print</span>(<span class="pl-s">'Has focus: $<span class="pl-v">_focusNode</span>.hasFocus'</span>); }); }</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 Microsoft Windows [Version 10.0.16299.192], locale en-US, channel dev) • Flutter version 0.0.21 at c:\sdks\flutter • Framework revision 2e449f06f0 (2 days ago), 2018-01-29 14:26:51 -0800 • Engine revision 6921873c71 • Tools Dart version 2.0.0-dev.16.0 • Engine Dart version 2.0.0-edge.da1f52592ef73fe3afa485385cb995b9aec0181a [√] Android toolchain - develop for Android devices (Android SDK 27.0.2) • Android SDK at C:\Users\ride4\AppData\Local\Android\sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-27, build-tools 27.0.2 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01) [√] Android Studio (version 3.0) • Android Studio at C:\Program Files\Android\Android Studio • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01) [√] IntelliJ IDEA Community Edition (version 2017.2) • Flutter plugin version 19.1 • Dart plugin version 172.4343.25 [√] Connected devices • Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.1.1 (API 25) (emulator)"><pre class="notranslate"><code class="notranslate">[√] Flutter (on Microsoft Windows [Version 10.0.16299.192], locale en-US, channel dev) • Flutter version 0.0.21 at c:\sdks\flutter • Framework revision 2e449f06f0 (2 days ago), 2018-01-29 14:26:51 -0800 • Engine revision 6921873c71 • Tools Dart version 2.0.0-dev.16.0 • Engine Dart version 2.0.0-edge.da1f52592ef73fe3afa485385cb995b9aec0181a [√] Android toolchain - develop for Android devices (Android SDK 27.0.2) • Android SDK at C:\Users\ride4\AppData\Local\Android\sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-27, build-tools 27.0.2 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01) [√] Android Studio (version 3.0) • Android Studio at C:\Program Files\Android\Android Studio • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01) [√] IntelliJ IDEA Community Edition (version 2017.2) • Flutter plugin version 19.1 • Dart plugin version 172.4343.25 [√] Connected devices • Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.1.1 (API 25) (emulator) </code></pre></div>
<p dir="auto">It's not clear how to accomplish this.</p>
1
<p dir="auto">Hi!</p> <p dir="auto">I use CELERYD_STATE_DB to persist revoked tasks.<br> Flower reports hundreds of duplicated lines in that file ...</p> <p dir="auto">Indeed, when I read the file, I get :</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# in a celery shell &gt;&gt;&gt; from celery.worker import state &gt;&gt;&gt; p = state.Persistent(state, CELERYD_STATE_DB) &gt;&gt;&gt; p._revoked_tasks LimitedSet(1861) &gt;&gt;&gt; len(p._revoked_tasks.as_dict()) 6"><pre class="notranslate"><span class="pl-c"># in a celery shell</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">from</span> <span class="pl-s1">celery</span>.<span class="pl-s1">worker</span> <span class="pl-k">import</span> <span class="pl-s1">state</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">p</span> <span class="pl-c1">=</span> <span class="pl-s1">state</span>.<span class="pl-v">Persistent</span>(<span class="pl-s1">state</span>, <span class="pl-v">CELERYD_STATE_DB</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">p</span>.<span class="pl-s1">_revoked_tasks</span> <span class="pl-v">LimitedSet</span>(<span class="pl-c1">1861</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-en">len</span>(<span class="pl-s1">p</span>.<span class="pl-s1">_revoked_tasks</span>.<span class="pl-en">as_dict</span>()) <span class="pl-c1">6</span></pre></div> <p dir="auto">So, when merging revoked task lists, there should be some attempt at de-duplicating them, no ?</p>
<p dir="auto">I think that it would be a good idea to release a new version that includes all bug fixes so far. <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/thedrow/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/thedrow">@thedrow</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/auvipy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/auvipy">@auvipy</a> thoughts?</p> <p dir="auto">I can help with the changelog.</p>
0
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">azure_rm_deployment</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.4.0.0 config file = /home/boss/automation/ansible.cfg configured module search path = [u'/home/boss/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /home/boss/.local/lib/python2.7/site-packages/ansible executable location = /home/boss/.local/bin/ansible python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]"><pre class="notranslate"><code class="notranslate">ansible 2.4.0.0 config file = /home/boss/automation/ansible.cfg configured module search path = [u'/home/boss/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /home/boss/.local/lib/python2.7/site-packages/ansible executable location = /home/boss/.local/bin/ansible python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">RETRY_FILES_ENABLED(/home/boss/automation/ansible.cfg) = False</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">Ubuntu 14</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">I created a resourcegroup in Azure and gave it 3 tags.<br> Running a playbook with a azure_rm_deployment, did correctly deploy the VM in this case but removed the tags from the resourcegroup.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">See summary</p> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">The resourcegroup tags should not touched</p> <h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">the man pages contain two AUTHOR sections, e.g. in ansible(1):</p> <p dir="auto">AUTHOR<br> Ansible was originally written by Michael DeHaan. See the AUTHORS file<br> for a complete list of contributors.<br> [...]<br> AUTHOR<br> :doctype:manpage<br> Author.</p> <p dir="auto">the second one seems unnecessary</p> <p dir="auto">Regards,<br> Markus</p>
0
<p dir="auto">Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="7728255" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/1578" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/1578/hovercard" href="https://github.com/numpy/numpy/issues/1578">#1578</a>, nan's are still converted to -maxint when it is assigned by slicing.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; np.__version__ '1.9.0.dev-6857173' &gt;&gt;&gt; i = np.array([1, 2, 3, 4, 5]) &gt;&gt;&gt; i[3] = np.nan ValueError: cannot convert float NaN to integer &gt;&gt;&gt; i[0:2] = np.nan array([-9223372036854775808, -9223372036854775808, 3, 4, 5])"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; np.__version__ '1.9.0.dev-6857173' &gt;&gt;&gt; i = np.array([1, 2, 3, 4, 5]) &gt;&gt;&gt; i[3] = np.nan ValueError: cannot convert float NaN to integer &gt;&gt;&gt; i[0:2] = np.nan array([-9223372036854775808, -9223372036854775808, 3, 4, 5]) </code></pre></div>
<p dir="auto">This seems inconsistent:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [38]: x = np.array([np.nan, 1, 2, 3]) In [39]: x Out[39]: array([ nan, 1., 2., 3.]) In [40]: x.astype(np.int16) Out[40]: array([0, 1, 2, 3], dtype=int16) In [41]: x.astype(np.int32) Out[41]: array([-2147483648, 1, 2, 3], dtype=int32) In [42]: x.astype(np.int64) Out[42]: array([-9223372036854775808, 1, 2, 3])"><pre class="notranslate"><code class="notranslate">In [38]: x = np.array([np.nan, 1, 2, 3]) In [39]: x Out[39]: array([ nan, 1., 2., 3.]) In [40]: x.astype(np.int16) Out[40]: array([0, 1, 2, 3], dtype=int16) In [41]: x.astype(np.int32) Out[41]: array([-2147483648, 1, 2, 3], dtype=int32) In [42]: x.astype(np.int64) Out[42]: array([-9223372036854775808, 1, 2, 3]) </code></pre></div>
1
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// file: foo.ts import BluebirdPromise from 'bluebird'; export async function foo(): BluebirdPromise { } // file: foo.js function foo() { return __awaiter(this, void 0, BluebirdPromise, function* () { }); } exports.foo = foo;"><pre class="notranslate"><span class="pl-c">// file: foo.ts</span> <span class="pl-k">import</span> <span class="pl-smi">BluebirdPromise</span> <span class="pl-k">from</span> <span class="pl-s">'bluebird'</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-k">async</span> <span class="pl-k">function</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">BluebirdPromise</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span> <span class="pl-c">// file: foo.js</span> <span class="pl-k">function</span> <span class="pl-en">foo</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-en">__awaiter</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-k">void</span> <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-smi">BluebirdPromise</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-c1">*</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-s1">exports</span><span class="pl-kos">.</span><span class="pl-c1">foo</span> <span class="pl-c1">=</span> <span class="pl-s1">foo</span><span class="pl-kos">;</span></pre></div> <p dir="auto">(Compiled with <code class="notranslate">target=ES6, module=commonjs, noEmitHelpers=true</code>).</p> <p dir="auto">The <code class="notranslate">BluebirdPromise</code> import has been elided in the generated code, resulting in <code class="notranslate">"ReferenceError: BluebirdPromise is not defined"</code> at runtime.</p> <p dir="auto">The elision occurs because <code class="notranslate">BluebirdPromise</code> only appears in a type position which up until v1.7 meant that the compiler could safely elide it. But the compiler now emits this type annotation into the JavaScript output so that elision assumption is no longer safe.</p> <p dir="auto">IMO the problem here is not the elision logic, its the fact that the compiler now emits code that depends on type annotaitons, so the type system no longer enjoys the quality of being fully erasable, which I understood to be a core <a href="https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals#goals">design principle</a> of the language. I thought the idea of using type annotations to change runtime behaviour would have been smacked down by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ahejlsberg/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ahejlsberg">@ahejlsberg</a> and the team before it got into production.</p> <p dir="auto">Regardless of that contended side-topic, I believe this is a bug.</p>
<p dir="auto">The generated JS code is missing a dependency onto the references promise implementation. Steps to reproduce:</p> <ul dir="auto"> <li>install bluebird promises</li> <li>create the following bluebird.d.ts.</li> </ul> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="declare module 'bluebird' { interface Promise&lt;T&gt; { then&lt;U&gt;(onFulfilled: (value: T) =&gt; U, onRejected: (reason: any) =&gt; U): Promise&lt;T&gt;; } var Promise: { new&lt;T&gt;(resolver: (resolve: (value: T) =&gt; void, reject: (reason: any) =&gt; void) =&gt; void): Promise&lt;T&gt;; } }"><pre class="notranslate"><span class="pl-k">declare</span> module <span class="pl-s">'bluebird'</span> <span class="pl-kos">{</span> <span class="pl-k">interface</span> <span class="pl-smi">Promise</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c1">then</span><span class="pl-c1">&lt;</span><span class="pl-smi">U</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">onFulfilled</span>: <span class="pl-kos">(</span><span class="pl-s1">value</span>: <span class="pl-smi">T</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">U</span><span class="pl-kos">,</span> <span class="pl-s1">onRejected</span>: <span class="pl-kos">(</span><span class="pl-s1">reason</span>: <span class="pl-smi">any</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">U</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">var</span> <span class="pl-smi">Promise</span>: <span class="pl-kos">{</span> <span class="pl-k">new</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">resolver</span>: <span class="pl-kos">(</span><span class="pl-s1">resolve</span>: <span class="pl-kos">(</span><span class="pl-s1">value</span>: <span class="pl-smi">T</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">,</span> <span class="pl-s1">reject</span>: <span class="pl-kos">(</span><span class="pl-s1">reason</span>: <span class="pl-smi">any</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <ul dir="auto"> <li>create a test file</li> </ul> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as bluebird from 'bluebird'; async function firstName(): bluebird.Promise&lt;string&gt; { return &quot;Dirk&quot;; } async function lastName(): Promise&lt;string&gt; { return &quot;Baeumer&quot;; } async function use() { var first = await firstName(); var last = await lastName(); return `${first} ${last}`; } if (require.main === module) { var p = use(); p.then((value) =&gt; console.log(value)); }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">bluebird</span> <span class="pl-k">from</span> <span class="pl-s">'bluebird'</span><span class="pl-kos">;</span> <span class="pl-k">async</span> <span class="pl-k">function</span> <span class="pl-en">firstName</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-s1">bluebird</span><span class="pl-kos">.</span><span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">string</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s">"Dirk"</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">async</span> <span class="pl-k">function</span> <span class="pl-en">lastName</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">string</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s">"Baeumer"</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">async</span> <span class="pl-k">function</span> <span class="pl-en">use</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">first</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">firstName</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">last</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">lastName</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-s">`<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">first</span><span class="pl-kos">}</span></span> <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">last</span><span class="pl-kos">}</span></span>`</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-en">require</span><span class="pl-kos">.</span><span class="pl-c1">main</span> <span class="pl-c1">===</span> <span class="pl-smi">module</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">p</span> <span class="pl-c1">=</span> <span class="pl-en">use</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">p</span><span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</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">value</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>compile and run.</li> </ul> <p dir="auto">Observe: you get an exception. Problem is that the generated code is missing a</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var bluebird = require('bluebird');"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">bluebird</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'bluebird'</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">statement.</p>
1
<p dir="auto">this example works great</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function test(value: string[]| string){ var result: string; if (value instanceof Array){ result = value.join(''); } }"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s1">value</span>: <span class="pl-s1">string</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-c1">|</span> <span class="pl-s1">string</span><span class="pl-kos">)</span><span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">result</span>: <span class="pl-s1">string</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-k">instanceof</span> <span class="pl-v">Array</span><span class="pl-kos">)</span><span class="pl-kos">{</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</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">but this</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface IFoo { value: string[] | string; } function bar(options: IFoo) { var result: string; if (options.value instanceof Array) { result = options.value.join('') } }"><pre class="notranslate"><span class="pl-s1">interface</span> <span class="pl-v">IFoo</span> <span class="pl-kos">{</span> value: <span class="pl-s1">string</span><span class="pl-kos">[</span><span class="pl-s1"></span><span class="pl-kos">]</span> <span class="pl-c1">|</span> <span class="pl-s1">string</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">function</span> <span class="pl-en">bar</span><span class="pl-kos">(</span><span class="pl-s1">options</span>: <span class="pl-v">IFoo</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">result</span>: <span class="pl-s1">string</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">options</span><span class="pl-kos">.</span><span class="pl-c1">value</span> <span class="pl-k">instanceof</span> <span class="pl-v">Array</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">options</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-s">''</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">property join does not exists on type string[] | string</p> <p dir="auto">i think i'ts compiler mistake</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var data : { value: string | number } = { value: 'hey' }; if (typeof data.value === 'string') { alert(data.value.toLowerCase()); // &lt;-- type of value is undecided }"><pre class="notranslate"><code class="notranslate">var data : { value: string | number } = { value: 'hey' }; if (typeof data.value === 'string') { alert(data.value.toLowerCase()); // &lt;-- type of value is undecided } </code></pre></div>
1
<p dir="auto"><strong>EDIT:</strong> For the impatient ones, Skip down to <a href="https://github.com/JuliaLang/julia/issues/1451#issuecomment-10098901" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/1451/hovercard">my comment below</a> with directions on how to install all dependencies for Julia on Ubuntu 12.04.</p> <p dir="auto">It'd be great to have an Ubuntu PPA that collects all the software that Julia needs to compile. This could significantly cut down on compile times, and would be a nice first step toward having actual binary packages of Julia for debian.</p> <p dir="auto">From my tests, the following packages work with/are necessary to build Julia:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="gfortran llvm-3.1-dev (ppa:dr-graef/llvm-3.1.precise) libblas-dev liblapack-dev libarpack2 libpcre3-dev libglpk-dev lighttpd libgmp-dev libunwind7-dev libreadline-dev"><pre class="notranslate"><code class="notranslate">gfortran llvm-3.1-dev (ppa:dr-graef/llvm-3.1.precise) libblas-dev liblapack-dev libarpack2 libpcre3-dev libglpk-dev lighttpd libgmp-dev libunwind7-dev libreadline-dev </code></pre></div> <p dir="auto">This leaves SuiteSparse (Only 3.4.0 is available, no 4.0.2, as far as I can see), FFTW (Installing <code class="notranslate">libfftw3-dev</code> didn't work for me; I got the dreaded LoadError, so I figured I'd just let Julia compile her own which works), zlib (It doesn't come with large file support by default), and whatever else I'm missing.</p>
<p dir="auto">Noticing this on Windows:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; versioninfo() Julia Version 0.3.0-prerelease+2584 Commit 951e027* (2014-04-10 13:40 UTC) Platform Info: System: Windows (x86_64-w64-mingw32) CPU: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz WORD_SIZE: 64 BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY) LAPACK: libopenblas LIBM: libopenlibm julia&gt; println(&quot;Typing a long input line at the REPL displays extra copies of th julia&gt; println(&quot;Typing a long input line at the REPL displays extra copies of th julia&gt; println(&quot;Typing a long input line at the REPL displays extra copies of th e line when wrapping to the next line&quot;)"><pre class="notranslate"><code class="notranslate">julia&gt; versioninfo() Julia Version 0.3.0-prerelease+2584 Commit 951e027* (2014-04-10 13:40 UTC) Platform Info: System: Windows (x86_64-w64-mingw32) CPU: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz WORD_SIZE: 64 BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY) LAPACK: libopenblas LIBM: libopenlibm julia&gt; println("Typing a long input line at the REPL displays extra copies of th julia&gt; println("Typing a long input line at the REPL displays extra copies of th julia&gt; println("Typing a long input line at the REPL displays extra copies of th e line when wrapping to the next line") </code></pre></div> <p dir="auto">Or if I SSH into a Linux machine using either Putty or Cygwin, I see the same basic problem with Linux-Julia (same commit) but with only one extra copy instead of two.</p>
0
<p dir="auto">I'm trying to make a terms facet of an IP address field (with the ip type). It returns numbers, not IP addresses. It works if the type is string. I thought it was fixed in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="585619" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/678" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/678/hovercard" href="https://github.com/elastic/elasticsearch/issues/678">#678</a>. I'm using 0.90.3.<br> The idea is to use Kibana to draw a pie of the top IP addresses in my logs.</p>
<p dir="auto">Terms facet on ip field returns raw integers instead of ip addresses.</p> <p dir="auto">When asked:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -XGET http://172.16.0.134:9200/nginx-2013.07.12/_search?pretty -d' { &quot;facets&quot;: { &quot;pie&quot;: { &quot;terms&quot;: { &quot;field&quot;: &quot;clientip&quot;, &quot;size&quot;: 10, &quot;exclude&quot;: [] }, &quot;facet_filter&quot;: { &quot;fquery&quot;: { &quot;query&quot;: { &quot;filtered&quot;: { &quot;query&quot;: { &quot;query_string&quot;: { &quot;query&quot;: &quot;*&quot; } }, &quot;filter&quot;: { &quot;range&quot;: { &quot;@timestamp&quot;: { &quot;from&quot;: &quot;2013-07-12T12:09:30.122Z&quot;, &quot;to&quot;: &quot;2013-07-12T12:14:30.122Z&quot; } } } } } } } } }, &quot;size&quot;: 0 }'"><pre class="notranslate"><code class="notranslate">curl -XGET http://172.16.0.134:9200/nginx-2013.07.12/_search?pretty -d' { "facets": { "pie": { "terms": { "field": "clientip", "size": 10, "exclude": [] }, "facet_filter": { "fquery": { "query": { "filtered": { "query": { "query_string": { "query": "*" } }, "filter": { "range": { "@timestamp": { "from": "2013-07-12T12:09:30.122Z", "to": "2013-07-12T12:14:30.122Z" } } } } } } } } }, "size": 0 }' </code></pre></div> <p dir="auto">it sais:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ &quot;took&quot; : 43, &quot;timed_out&quot; : false, &quot;_shards&quot; : { &quot;total&quot; : 1, &quot;successful&quot; : 1, &quot;failed&quot; : 0 }, &quot;hits&quot; : { &quot;total&quot; : 1308357, &quot;max_score&quot; : 1.0, &quot;hits&quot; : [ ] }, &quot;facets&quot; : { &quot;pie&quot; : { &quot;_type&quot; : &quot;terms&quot;, &quot;missing&quot; : 0, &quot;total&quot; : 14220, &quot;other&quot; : 7100, &quot;terms&quot; : [ { &quot;term&quot; : 1472557106, &quot;count&quot; : 1727 }, { &quot;term&quot; : 1501212747, &quot;count&quot; : 1621 }, { &quot;term&quot; : 1556945832, &quot;count&quot; : 1616 }, { &quot;term&quot; : 1498126311, &quot;count&quot; : 566 }, { &quot;term&quot; : 1541613928, &quot;count&quot; : 438 }, { &quot;term&quot; : 1541613412, &quot;count&quot; : 346 }, { &quot;term&quot; : 2488386185, &quot;count&quot; : 227 }, { &quot;term&quot; : 3245280414, &quot;count&quot; : 208 }, { &quot;term&quot; : 2999036429, &quot;count&quot; : 198 }, { &quot;term&quot; : 1299254797, &quot;count&quot; : 173 } ] } } }"><pre class="notranslate"><code class="notranslate">{ "took" : 43, "timed_out" : false, "_shards" : { "total" : 1, "successful" : 1, "failed" : 0 }, "hits" : { "total" : 1308357, "max_score" : 1.0, "hits" : [ ] }, "facets" : { "pie" : { "_type" : "terms", "missing" : 0, "total" : 14220, "other" : 7100, "terms" : [ { "term" : 1472557106, "count" : 1727 }, { "term" : 1501212747, "count" : 1621 }, { "term" : 1556945832, "count" : 1616 }, { "term" : 1498126311, "count" : 566 }, { "term" : 1541613928, "count" : 438 }, { "term" : 1541613412, "count" : 346 }, { "term" : 2488386185, "count" : 227 }, { "term" : 3245280414, "count" : 208 }, { "term" : 2999036429, "count" : 198 }, { "term" : 1299254797, "count" : 173 } ] } } } </code></pre></div> <p dir="auto">Mappings:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -XGET http://172.16.0.134:9200/nginx-2013.07.12/_mapping?pretty { &quot;nginx-2013.07.12&quot; : { &quot;nginx&quot; : { &quot;_all&quot; : { &quot;enabled&quot; : false }, &quot;_source&quot; : { &quot;compress&quot; : true }, &quot;properties&quot; : { &quot;@timestamp&quot; : { &quot;type&quot; : &quot;date&quot;, &quot;format&quot; : &quot;dateOptionalTime&quot; }, &quot;agent&quot; : { &quot;type&quot; : &quot;string&quot; }, &quot;app_id&quot; : { &quot;type&quot; : &quot;string&quot; }, &quot;auth&quot; : { &quot;type&quot; : &quot;string&quot; }, &quot;bytes&quot; : { &quot;type&quot; : &quot;integer&quot; }, &quot;clientip&quot; : { &quot;type&quot; : &quot;ip&quot; }, &quot;duration&quot; : { &quot;type&quot; : &quot;float&quot; }, &quot;hosting&quot; : { &quot;type&quot; : &quot;string&quot; }, &quot;httpversion&quot; : { &quot;type&quot; : &quot;string&quot; }, &quot;ident&quot; : { &quot;type&quot; : &quot;string&quot; }, &quot;message&quot; : { &quot;type&quot; : &quot;string&quot;, &quot;index&quot; : &quot;not_analyzed&quot;, &quot;omit_norms&quot; : true, &quot;index_options&quot; : &quot;docs&quot; }, &quot;physical&quot; : { &quot;type&quot; : &quot;string&quot; }, &quot;referrer&quot; : { &quot;type&quot; : &quot;string&quot; }, &quot;request&quot; : { &quot;type&quot; : &quot;string&quot; }, &quot;request_size&quot; : { &quot;type&quot; : &quot;integer&quot; }, &quot;response&quot; : { &quot;type&quot; : &quot;integer&quot; }, &quot;source&quot; : { &quot;type&quot; : &quot;string&quot;, &quot;index&quot; : &quot;not_analyzed&quot;, &quot;omit_norms&quot; : true, &quot;index_options&quot; : &quot;docs&quot; }, &quot;source_host&quot; : { &quot;type&quot; : &quot;string&quot;, &quot;index&quot; : &quot;not_analyzed&quot;, &quot;omit_norms&quot; : true, &quot;index_options&quot; : &quot;docs&quot; }, &quot;source_path&quot; : { &quot;type&quot; : &quot;string&quot;, &quot;index&quot; : &quot;not_analyzed&quot;, &quot;omit_norms&quot; : true, &quot;index_options&quot; : &quot;docs&quot; }, &quot;tags&quot; : { &quot;type&quot; : &quot;string&quot;, &quot;index&quot; : &quot;not_analyzed&quot;, &quot;omit_norms&quot; : true, &quot;index_options&quot; : &quot;docs&quot; }, &quot;timestamp&quot; : { &quot;type&quot; : &quot;date&quot;, &quot;format&quot; : &quot;dateOptionalTime&quot; }, &quot;type&quot; : { &quot;type&quot; : &quot;string&quot;, &quot;index&quot; : &quot;not_analyzed&quot;, &quot;omit_norms&quot; : true, &quot;index_options&quot; : &quot;docs&quot; }, &quot;verb&quot; : { &quot;type&quot; : &quot;string&quot; }, &quot;vhost&quot; : { &quot;type&quot; : &quot;string&quot; } } } } }"><pre class="notranslate"><code class="notranslate">curl -XGET http://172.16.0.134:9200/nginx-2013.07.12/_mapping?pretty { "nginx-2013.07.12" : { "nginx" : { "_all" : { "enabled" : false }, "_source" : { "compress" : true }, "properties" : { "@timestamp" : { "type" : "date", "format" : "dateOptionalTime" }, "agent" : { "type" : "string" }, "app_id" : { "type" : "string" }, "auth" : { "type" : "string" }, "bytes" : { "type" : "integer" }, "clientip" : { "type" : "ip" }, "duration" : { "type" : "float" }, "hosting" : { "type" : "string" }, "httpversion" : { "type" : "string" }, "ident" : { "type" : "string" }, "message" : { "type" : "string", "index" : "not_analyzed", "omit_norms" : true, "index_options" : "docs" }, "physical" : { "type" : "string" }, "referrer" : { "type" : "string" }, "request" : { "type" : "string" }, "request_size" : { "type" : "integer" }, "response" : { "type" : "integer" }, "source" : { "type" : "string", "index" : "not_analyzed", "omit_norms" : true, "index_options" : "docs" }, "source_host" : { "type" : "string", "index" : "not_analyzed", "omit_norms" : true, "index_options" : "docs" }, "source_path" : { "type" : "string", "index" : "not_analyzed", "omit_norms" : true, "index_options" : "docs" }, "tags" : { "type" : "string", "index" : "not_analyzed", "omit_norms" : true, "index_options" : "docs" }, "timestamp" : { "type" : "date", "format" : "dateOptionalTime" }, "type" : { "type" : "string", "index" : "not_analyzed", "omit_norms" : true, "index_options" : "docs" }, "verb" : { "type" : "string" }, "vhost" : { "type" : "string" } } } } } </code></pre></div>
1
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/egamma/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/egamma">@egamma</a> on January 22, 2016 9:10</em></p> <p dir="auto">Setup<br> {<br> "compilerOptions": {<br> "module": "commonjs",<br> "target": "es5",<br> "allowJs": true<br> },<br> "exclude": [<br> "node_modules"<br> ]<br> }</p> <p dir="auto">Create a single file with a single function.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/172399/12506560/2c0b9f40-c0f0-11e5-80c4-efc124be7d65.png"><img src="https://cloud.githubusercontent.com/assets/172399/12506560/2c0b9f40-c0f0-11e5-80c4-efc124be7d65.png" alt="symbols" style="max-width: 100%;"></a></p> <p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="128113817" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/2172" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/2172/hovercard" href="https://github.com/microsoft/vscode/issues/2172">microsoft/vscode#2172</a></em></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface Foo { x; } interface Bar { } var foo: Foo; var bar: Bar; foo = bar; // Type 'Bar' is not assignable to type 'Foo': // Property 'x' is missing in type 'Bar'. foo = bar; // Type 'Bar' is not assignable to type 'Foo'."><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-c1">x</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">interface</span> <span class="pl-smi">Bar</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span> <span class="pl-k">var</span> <span class="pl-s1">foo</span>: <span class="pl-smi">Foo</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">bar</span>: <span class="pl-smi">Bar</span><span class="pl-kos">;</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-s1">bar</span><span class="pl-kos">;</span> <span class="pl-c">// Type 'Bar' is not assignable to type 'Foo':</span> <span class="pl-c">// Property 'x' is missing in type 'Bar'.</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-s1">bar</span><span class="pl-kos">;</span> <span class="pl-c">// Type 'Bar' is not assignable to type 'Foo'.</span></pre></div> <p dir="auto">This happens because we cache the results of assignability checks. And the elaboration portion of an assignability error is obtained by side effects that get short circuited on a cache hit.</p>
0
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=psfung" rel="nofollow">Samuel Fung</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9370?redirect=false" rel="nofollow">SPR-9370</a></strong> and commented</p> <p dir="auto">My app use an exception reporting framework that depends on the fact that all exceptions should be serializable. When org.springframework.web.client.HttpStatusCodeException is thrown in a RestTemplate method, the exception reporting framework complains that a Charset object in the HttpStatusCodeException is not serializable.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.1.1</p> <p dir="auto"><strong>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398118291" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13911" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13911/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13911">#13911</a> HttpStatusCodeException cannot be serialized (<em><strong>"duplicates"</strong></em>)</li> </ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=veaven" rel="nofollow">Liu, Yinwei David</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7308?redirect=false" rel="nofollow">SPR-7308</a></strong> and commented</p> <p dir="auto">Hi,<br> Do you have any plan to provide a high level cache API in Spring container? such as TransacationManager which manages different transaction resource.</p> <p dir="auto">Currently, we have a lot different cache implementations, e.g. EHCache, H2, and so on. Each cache needs a different api to get data from the underlying cache. It is a kind of barrier to disallow people easily switch from one cache to another cache, we always need a extra layer to decouple the our code with the actual cache.</p> <p dir="auto">I think it would be great if Spring can provide a high level cache api which can allow people easily choose a underlying cache.</p> <p dir="auto">Please let me know your thoughts, thanks.</p> <p dir="auto">David</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0.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="398095538" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10491" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10491/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10491">#10491</a> HTTP cache and conditional requests support in RestTemplate</li> </ul> <p dir="auto">6 votes, 11 watchers</p>
0
<p dir="auto">We need ability to pass custom config information at runtime to the browser, in the same fashion next.js passes <code class="notranslate">assetPrefix</code> from <code class="notranslate">next.config.js</code>.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Ability to add custom information (like graphql endpoint) to <code class="notranslate">next.config.js</code>, something like:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="module.exports = { assetPrefix: process.env.CDN_PREFIX, config: { graphql: { uri: process.env.GRAPHQL_ENDPOINT }, myCustomThing: '2345678', myCustomList: [ 'a', 'b', 'c' ] } };"><pre class="notranslate"><code class="notranslate">module.exports = { assetPrefix: process.env.CDN_PREFIX, config: { graphql: { uri: process.env.GRAPHQL_ENDPOINT }, myCustomThing: '2345678', myCustomList: [ 'a', 'b', 'c' ] } }; </code></pre></div> <p dir="auto">and a way to consume it in the app running in the browser, like:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const { config } = __NEXT_DATA__"><pre class="notranslate"><code class="notranslate">const { config } = __NEXT_DATA__ </code></pre></div> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Nothing happens</p> <h2 dir="auto">Context</h2> <p dir="auto">We're building immutable images that later deployed to the different environments, so there is no way for us to mutate the code and bake in API endpoints, we need this feature to provide API endpoints via environment variables at runtime.</p> <p dir="auto">Thank you.</p>
<h1 dir="auto">Feature request</h1> <h2 dir="auto">Is your feature request related to a problem? Please describe.</h2> <p dir="auto">Currently, the logic to move things into the commons chunk is based on the count of pages (ie. files in the <code class="notranslate">pages/</code> directory). I think this approach doesn't scale very well and is too simplistic.</p> <ul dir="auto"> <li>If we have a larger app with different sets of pages that have shared dependencies, they won't be moved to up to shared chunks. For example, when 30% of pages depend on module "a".</li> <li>Even if we "cheat" by importing things into more pages, they will only get moved to the single commons chunk where they're unnecessary by all other pages (in our example, "a" will end up in commons but is not needed on 70% of pages)</li> <li>If I interpret the generated bundles correctly, there are no shared chunks created for anything that isn't a page.</li> </ul> <h2 dir="auto">Describe the solution you'd like</h2> <ul dir="auto"> <li>Ideally, the 30% of pages which depend on module "a" should have a shared chunk containing "a". This chunk would not be loaded/used by the other 70% of pages</li> <li>Non-page modules should also be able to have shared chunks</li> </ul> <p dir="auto">In short: chunk splitting should be more granular. I believe with the move to webpack 4 in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="334059908" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/4639" data-hovercard-type="pull_request" data-hovercard-url="/vercel/next.js/pull/4639/hovercard" href="https://github.com/vercel/next.js/pull/4639">#4639</a> this shouldn't be too hard, as it would generally mean giving more control over the chunking back to webpack.</p> <p dir="auto">I haven't analyzed the situation with the current canary branch, so my observations are still based on the current stable webpack 3 based approach. However, the same logic is in place at the moment:</p> <p dir="auto"><a href="https://github.com/zeit/next.js/blob/f4988e7fa3152920125498778dbcb9656be24072/build/webpack.js#L86-L94">https://github.com/zeit/next.js/blob/f4988e7fa3152920125498778dbcb9656be24072/build/webpack.js#L86-L94</a></p> <p dir="auto">If this sounds interesting <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/timneutkens/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/timneutkens">@timneutkens</a>, I'd be happy to spend some time on this by trying out a solution.</p> <h2 dir="auto">Additional context</h2> <p dir="auto"><a href="https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366" rel="nofollow">https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366</a></p>
0
<p dir="auto">The editor does not work tab, open only one tab</p>
<p dir="auto">I <em>really</em> miss proper tabs for open files (like VS proper), and the ability to rip a tab out into its own window.</p>
1
<p dir="auto"><strong>Isssue</strong><br> <code class="notranslate">tel</code> and <code class="notranslate">callto</code> links not opened in app despite having been registered with <code class="notranslate">setAsDefaultProtocolClient</code></p> <p dir="auto"><em>It is very similar (identical?) to <a href="https://github.com/electron/electron/issues/14108" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/14108/hovercard">this issue</a>. It is 6 months old and has received 7 thumbs up but no further attention, hence this new attempt.</em></p> <p dir="auto">Specifics:</p> <ul dir="auto"> <li> <p dir="auto">Output of <code class="notranslate">node_modules/.bin/electron --version</code>:<br> <em>v.3.0.10</em></p> </li> <li> <p dir="auto">Operating System (Platform and Version):<br> <em><strong>Windows 10</strong><br> Version 1709<br> OS Build 16299.125</em></p> </li> <li> <p dir="auto">Output of <code class="notranslate">node_modules/.bin/electron --version</code> on last known working Electron version (if applicable):<br> <em>Not applicable</em></p> </li> </ul> <p dir="auto"><strong>Expected Behavior</strong><br> <code class="notranslate">app.setAsDefaultProtocolClient('tel')</code> and <code class="notranslate">app.setAsDefaultProtocolClient('callto')</code> should make your application become available in the list of apps appearing when opening a <code class="notranslate">tel:</code> or <code class="notranslate">callto:</code> link.</p> <p dir="auto"><strong>Actual behavior</strong><br> Application is not included in the list of apps appearing when clicking a tel or callto link.</p> <p dir="auto"><strong>To Reproduce</strong></p> <ol dir="auto"> <li> <p dir="auto">Download <a href="https://github.com/electron/electron-api-demos/releases/tag/v2.0.1">the latest Electron demo (v2.0.1)</a></p> </li> <li> <p dir="auto">In function <code class="notranslate">createWindow</code> found in <code class="notranslate">main.js</code>, add these two lines:</p> </li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const defaultProtocolSet = app.setAsDefaultProtocolClient('tel'); //can also be set to 'callto' instead of 'tel' console.log('defaultProtocolSet? ', defaultProtocolSet);"><pre class="notranslate"><code class="notranslate">const defaultProtocolSet = app.setAsDefaultProtocolClient('tel'); //can also be set to 'callto' instead of 'tel' console.log('defaultProtocolSet? ', defaultProtocolSet); </code></pre></div> <ol start="3" dir="auto"> <li> <p dir="auto">Open Windows's Command Prompt and run <code class="notranslate">npm install &amp;&amp; run dev</code><br> You should now see <em>'defaultProtocolSet? true'</em> in the Command Prompt window</p> </li> <li> <p dir="auto">Open a browser and in the address field enter <code class="notranslate">tel://0123456789</code>(replace number with number of your choice) and press return. Alternatively you can click on any <code class="notranslate">tel</code> link you have available.</p> </li> </ol> <p dir="auto">Result:<br> A menu with a list of applications will be opened, but your app will not be represented here.</p> <p dir="auto"><strong>Additional Information</strong><br> There does not seem to be a problem registering and opening custom protocol links, such as <code class="notranslate">'myOwnTestProtocol'</code></p> <p dir="auto">Thanks for your time and consideration!</p>
<h3 dir="auto">Preflight Checklist</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li> </ul> <h3 dir="auto">Issue Details</h3> <ul dir="auto"> <li><strong>Electron Version:</strong> <ul dir="auto"> <li>v5.0.2</li> </ul> </li> <li><strong>Operating System:</strong> <ul dir="auto"> <li>macOS 10.13.6</li> </ul> </li> <li><strong>Last Known Working Electron version:</strong> <ul dir="auto"> <li>Haven't tried on other electron versions.</li> </ul> </li> </ul> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">I have an app which runs in electron <code class="notranslate">&lt;webview&gt;</code>. I need to render multiple iframes inside this <code class="notranslate">&lt;webview&gt;</code> and dynamic add or remove them.</p> <h3 dir="auto">Actual Behavior</h3> <p dir="auto">When I remove one <code class="notranslate">&lt;iframe&gt;</code> from the dom tree, the whole <code class="notranslate">&lt;webview&gt;</code> crashes. I didn't use JS to remove iframe node, instead, I just delete one <code class="notranslate">&lt;iframe&gt;</code> from the dom inspector, and the <code class="notranslate">&lt;webview&gt;</code> crashes.</p> <h3 dir="auto">To Reproduce</h3> <p dir="auto">This is an example : <a href="https://github.com/cloudsere/electron-quick-start">https://github.com/cloudsere/electron-quick-start</a>. You can run commands below to reproduce.</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ git clone https://github.com/cloudsere/electron-quick-start $ npm install $ npm start"><pre class="notranslate">$ git clone https://github.com/cloudsere/electron-quick-start $ npm install $ npm start</pre></div>
0
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function Decoration() {} function PropertyDecoration(target: any) { console.log(target); } @Decoration export class ClassName { @PropertyDecoration property: string = 'null'; } "><pre class="notranslate"><code class="notranslate">function Decoration() {} function PropertyDecoration(target: any) { console.log(target); } @Decoration export class ClassName { @PropertyDecoration property: string = 'null'; } </code></pre></div> <p dir="auto">compiles to:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function Decoration() { } function PropertyDecoration(target) { console.log(target); } let ClassName = class { constructor() { this.property = 'null'; } };"><pre class="notranslate"><code class="notranslate">function Decoration() { } function PropertyDecoration(target) { console.log(target); } let ClassName = class { constructor() { this.property = 'null'; } }; </code></pre></div> <p dir="auto">However this means that the console.log result will be <code class="notranslate">{}</code>. Removing the <code class="notranslate">@Decoration</code> class decorator outputs:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function PropertyDecoration(target) { console.log(target); } class ClassName { constructor() { this.property = 'null'; } }"><pre class="notranslate"><code class="notranslate">function PropertyDecoration(target) { console.log(target); } class ClassName { constructor() { this.property = 'null'; } } </code></pre></div> <p dir="auto">with the better console.log result of <code class="notranslate">ClassName {}</code>.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const bar = (target: any, name: any, value: any) =&gt; { const parentName = target.constructor.name console.log(parentName) } class a { @bar public foo() { } }"><pre class="notranslate"><code class="notranslate">const bar = (target: any, name: any, value: any) =&gt; { const parentName = target.constructor.name console.log(parentName) } class a { @bar public foo() { } } </code></pre></div> <p dir="auto">It works. <em>But</em></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const bar = (target: any, name: any, value: any) =&gt; { const parentName = target.constructor.name console.log(parentName) // it would be an empty string here!!!!!!!! } const log = (target: any) =&gt; {} @log class a { @bar public foo() { } }"><pre class="notranslate"><code class="notranslate">const bar = (target: any, name: any, value: any) =&gt; { const parentName = target.constructor.name console.log(parentName) // it would be an empty string here!!!!!!!! } const log = (target: any) =&gt; {} @log class a { @bar public foo() { } } </code></pre></div> <p dir="auto">these code is ok when compile target was <code class="notranslate">ES5</code>, but missing class name when target was <code class="notranslate">ES6</code></p>
1
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">logstash callback plugin</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 = /root/ansible/ansible.cfg configured module search path = Default w/o overrides python version = 2.7.5 (default, Nov 6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] "><pre class="notranslate"><code class="notranslate">ansible 2.3.0.0 config file = /root/ansible/ansible.cfg configured module search path = Default w/o overrides python version = 2.7.5 (default, Nov 6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="callback_plugins = callback_plugins callback_whitelist = logstash"><pre class="notranslate"><code class="notranslate">callback_plugins = callback_plugins callback_whitelist = logstash </code></pre></div> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">centos7</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">When custom callback plugin with same name as built in plugin is defined, the plugin gets called twice. The plugin called is the one in runtime folder.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">Add a callback plugin to "runtime folder/callback_plugins" and enable it. Tested with logstash plugin only.</p> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">Only relevant lines i found are:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Using /root/ansible/ansible.cfg as config file Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc Loading callback plugin logstash2 of type aggregate, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc"><pre class="notranslate"><code class="notranslate">Using /root/ansible/ansible.cfg as config file Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc Loading callback plugin logstash2 of type aggregate, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc </code></pre></div> <p dir="auto">When using different name (logstash2).</p> <h5 dir="auto">ACTUAL RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Using /root/ansible/ansible.cfg as config file Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc Loading callback plugin logstash of type aggregate, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc Loading callback plugin logstash of type aggregate, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc"><pre class="notranslate"><code class="notranslate">Using /root/ansible/ansible.cfg as config file Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc Loading callback plugin logstash of type aggregate, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc Loading callback plugin logstash of type aggregate, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc </code></pre></div> <p dir="auto">When using same name (logstash).</p>
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Feature Idea</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">vault</p> <h5 dir="auto">ANSIBLE VERSION</h5> <p dir="auto">2.x</p> <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">Inspired by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="39013985" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/8340" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/8340/hovercard" href="https://github.com/ansible/ansible/issues/8340">#8340</a>. I'm not sure if vault or the file loader already has such a feature, but if it could index loaded files by checksum, it wouldn't have to decrypt the same content multiple times.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">Make a bunch of duplicate vars files that are vault encrypted.</p> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">Only decrypt once.</p> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto">Decryption for every file.</p>
0
<p dir="auto"><strong>Elasticsearch version</strong>: 2.2.0</p> <p dir="auto"><strong>JVM version</strong>:1.8</p> <p dir="auto"><strong>OS version</strong>:Linux Mint 17.2 Cinnamon 64-bit (Cinnamon 2.6.13)</p> <p dir="auto"><strong>Description of the problem including expected versus actual behavior:</strong><br> Hi,<br> i created nativescript in java and create .zip file with (jar and plugin-descriptor.properties) and install it but when i restart or start elasticsearch then it show error</p> <p dir="auto">Steps to reproduce:<br> 1.create nativescript in java<br> 2.install nativescript as plugin<br> 3.restart or start elasticsearch</p> <p dir="auto">**Provide logs (if relevant):</p> <p dir="auto">this is log for successfully install nativescript as plugin in elasticsearch 2.2.0**</p> <p dir="auto">-&gt; Installing from file:/home/ajay/Desktop/DEVAJAY/Untitled Folder/CustomScriptFactory1.0.zip...<br> Trying file:/home/ajay/Desktop/DEVAJAY/Untitled Folder/CustomScriptFactory1.0.zip ...<br> Downloading .DONE<br> Verifying file:/home/mindarray/Desktop/DEVAJAY/Untitled Folder/CustomScriptFactory1.0.zip checksums if available ...<br> NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)<br> Installed CustomScriptFactory1.0 into /home/mindarray/Desktop/elasticsearch-2.2.0/plugins/CustomScriptFactory1.0</p> <p dir="auto"><strong>when restart or start the elasticsearch it show error</strong></p> <p dir="auto">Exception in thread "main" java.lang.ClassCastException: class org.spacevatican.elasticsearchexample.CustomScriptFactory<br> at java.lang.Class.asSubclass(Class.java:3404)<br> at org.elasticsearch.plugins.PluginsService.loadPluginClass(PluginsService.java:463)<br> at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:431)<br> at org.elasticsearch.plugins.PluginsService.(PluginsService.java:129)<br> at org.elasticsearch.node.Node.(Node.java:146)<br> at org.elasticsearch.node.Node.(Node.java:128)<br> at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)<br> at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)<br> at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)<br> at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)<br> Refer to the log for complete error details.</p> <p dir="auto"><strong>Describe the feature:</strong></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5938907/13320321/10b64b46-dbee-11e5-9ec9-7be1bfb343c2.jpg"><img src="https://cloud.githubusercontent.com/assets/5938907/13320321/10b64b46-dbee-11e5-9ec9-7be1bfb343c2.jpg" alt="7eab302a-dbd1-11e5-8eba-14fede94d5a2" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Elasticsearch version</strong>: 2.2</p> <p dir="auto"><strong>JVM version</strong>: 1.8u66</p> <p dir="auto"><strong>OS version</strong>: Win 8.1</p> <p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:</p> <p dir="auto">When specifying a bogus analyzer (maybe a typo), ES throws an internal NPE in the logs and the request blocks. Instead the exception should be thrown to the user.</p> <p dir="auto"><strong>Steps to reproduce</strong>:<br> 1.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -XPOST http://localhost:9200/_analyze -d '{ &quot;analyzer&quot; : &quot;bogus&quot;, &quot;text&quot; : &quot;this is a test&quot; }'"><pre class="notranslate"><code class="notranslate">curl -XPOST http://localhost:9200/_analyze -d '{ "analyzer" : "bogus", "text" : "this is a test" }' </code></pre></div> <p dir="auto"><strong>Provide logs (if relevant)</strong>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2016-03-14 18:17:44,393][ERROR][transport ] [Caleb Alexander] failed to handle exception for action [indices:admin/analyze[s]], handler [org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction$1@a566c0] java.lang.NullPointerException at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.perform(TransportSingleShardAction.java:195) at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.access$700(TransportSingleShardAction.java:115) at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction$1.handleException(TransportSingleShardAction.java:174) at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:821) at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:799) at org.elasticsearch.transport.TransportService$4.onFailure(TransportService.java:361) at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)"><pre class="notranslate"><code class="notranslate">[2016-03-14 18:17:44,393][ERROR][transport ] [Caleb Alexander] failed to handle exception for action [indices:admin/analyze[s]], handler [org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction$1@a566c0] java.lang.NullPointerException at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.perform(TransportSingleShardAction.java:195) at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.access$700(TransportSingleShardAction.java:115) at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction$1.handleException(TransportSingleShardAction.java:174) at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:821) at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:799) at org.elasticsearch.transport.TransportService$4.onFailure(TransportService.java:361) at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) </code></pre></div>
0
<p dir="auto">Unintended behaviour of pandas happens when one tries to create a series applying<br> tuple (or list) to two columns of a dataframe, one of which consists of timestamps:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd import numpy as np d = pd.DataFrame({'a': pd.Series(np.random.randn(4)), 'b': ['a', 'list', 'of', 'words'], 'ts': pd.date_range('2016-10-01', periods=4, freq='H')})"><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-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-s1">d</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'a'</span>: <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randn</span>(<span class="pl-c1">4</span>)), <span class="pl-s">'b'</span>: [<span class="pl-s">'a'</span>, <span class="pl-s">'list'</span>, <span class="pl-s">'of'</span>, <span class="pl-s">'words'</span>], <span class="pl-s">'ts'</span>: <span class="pl-s1">pd</span>.<span class="pl-en">date_range</span>(<span class="pl-s">'2016-10-01'</span>, <span class="pl-s1">periods</span><span class="pl-c1">=</span><span class="pl-c1">4</span>, <span class="pl-s1">freq</span><span class="pl-c1">=</span><span class="pl-s">'H'</span>)})</pre></div> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="d"><pre class="notranslate"><span class="pl-s1">d</span></pre></div> <div dir="auto"> <table role="table"> <thead> <tr> <th></th> <th>a</th> <th>b</th> <th>ts</th> </tr> </thead> <tbody> <tr> <th>0</th> <td>0.200813</td> <td>a</td> <td>2016-10-01 00:00:00</td> </tr> <tr> <th>1</th> <td>0.316971</td> <td>list</td> <td>2016-10-01 01:00:00</td> </tr> <tr> <th>2</th> <td>-0.186392</td> <td>of</td> <td>2016-10-01 02:00:00</td> </tr> <tr> <th>3</th> <td>-0.565593</td> <td>words</td> <td>2016-10-01 03:00:00</td> </tr> </tbody> </table> </div> <p dir="auto">let's try first with columns 'a'and 'b':</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="d[['a', 'b']].apply(tuple, axis=1)"><pre class="notranslate"><span class="pl-s1">d</span>[[<span class="pl-s">'a'</span>, <span class="pl-s">'b'</span>]].<span class="pl-en">apply</span>(<span class="pl-s1">tuple</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)</pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0 (0.2008128669491346, a) 1 (0.3169711841447721, list) 2 (-0.1863916899789735, of) 3 (-0.5655926199699992, words) dtype: object"><pre class="notranslate"><code class="notranslate">0 (0.2008128669491346, a) 1 (0.3169711841447721, list) 2 (-0.1863916899789735, of) 3 (-0.5655926199699992, words) dtype: object </code></pre></div> <p dir="auto">So far, everything is fine. Now let's do it with 'a' and 'ts':</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="d[['a', 'ts']].apply(tuple, axis=1)"><pre class="notranslate"><span class="pl-s1">d</span>[[<span class="pl-s">'a'</span>, <span class="pl-s">'ts'</span>]].<span class="pl-en">apply</span>(<span class="pl-s1">tuple</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)</pre></div> <div dir="auto"> <table role="table"> <thead> <tr> <th></th> <th>a</th> <th>ts</th> </tr> </thead> <tbody> <tr> <th>0</th> <td>0.200813</td> <td>2016-10-01 00:00:00</td> </tr> <tr> <th>1</th> <td>0.316971</td> <td>2016-10-01 01:00:00</td> </tr> <tr> <th>2</th> <td>-0.186392</td> <td>2016-10-01 02:00:00</td> </tr> <tr> <th>3</th> <td>-0.565593</td> <td>2016-10-01 03:00:00</td> </tr> </tbody> </table> </div> <p dir="auto">Oops.</p> <p dir="auto">It's easy to find a way around this, by coating the timestamps before apply and uncoating after:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def coating(t): return lambda: t def uncoating(x, f): return x, f()"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">coating</span>(<span class="pl-s1">t</span>): <span class="pl-k">return</span> <span class="pl-k">lambda</span>: <span class="pl-s1">t</span> <span class="pl-k">def</span> <span class="pl-en">uncoating</span>(<span class="pl-s1">x</span>, <span class="pl-s1">f</span>): <span class="pl-k">return</span> <span class="pl-s1">x</span>, <span class="pl-en">f</span>()</pre></div> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="d['coated_ts'] = d['ts'].apply(coating)"><pre class="notranslate"><span class="pl-s1">d</span>[<span class="pl-s">'coated_ts'</span>] <span class="pl-c1">=</span> <span class="pl-s1">d</span>[<span class="pl-s">'ts'</span>].<span class="pl-en">apply</span>(<span class="pl-s1">coating</span>)</pre></div> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="d[['a', 'coated_ts']].apply(tuple, axis=1).apply(lambda t: uncoating(*t))"><pre class="notranslate"><span class="pl-s1">d</span>[[<span class="pl-s">'a'</span>, <span class="pl-s">'coated_ts'</span>]].<span class="pl-en">apply</span>(<span class="pl-s1">tuple</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>).<span class="pl-en">apply</span>(<span class="pl-k">lambda</span> <span class="pl-s1">t</span>: <span class="pl-en">uncoating</span>(<span class="pl-c1">*</span><span class="pl-s1">t</span>))</pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0 (0.2008128669491346, 2016-10-01 00:00:00) 1 (0.3169711841447721, 2016-10-01 01:00:00) 2 (-0.1863916899789735, 2016-10-01 02:00:00) 3 (-0.5655926199699992, 2016-10-01 03:00:00) dtype: object"><pre class="notranslate"><code class="notranslate">0 (0.2008128669491346, 2016-10-01 00:00:00) 1 (0.3169711841447721, 2016-10-01 01:00:00) 2 (-0.1863916899789735, 2016-10-01 02:00:00) 3 (-0.5655926199699992, 2016-10-01 03:00:00) dtype: object </code></pre></div> <p dir="auto">It would be nice if this strange behaviour was corrected.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pd.show_versions()"><pre class="notranslate"><span class="pl-s1">pd</span>.<span class="pl-en">show_versions</span>()</pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="INSTALLED VERSIONS ------------------ commit: None python: 3.6.1.final.0 python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: None.None pandas: 0.20.1 pytest: 3.0.7 pip: 9.0.1 setuptools: 27.2.0 Cython: 0.25.2 numpy: 1.12.1 scipy: 0.19.0 xarray: None IPython: 5.3.0 sphinx: 1.5.6 patsy: 0.4.1 dateutil: 2.6.0 pytz: 2017.2 blosc: None bottleneck: 1.2.1 tables: 3.2.2 numexpr: 2.6.2 feather: None matplotlib: 2.0.2 openpyxl: 2.4.7 xlrd: 1.0.0 xlwt: 1.2.0 xlsxwriter: 0.9.6 lxml: 3.7.3 bs4: 4.6.0 html5lib: 0.999 sqlalchemy: 1.1.9 pymysql: None psycopg2: None jinja2: 2.9.6 s3fs: None pandas_gbq: None pandas_datareader: None"><pre class="notranslate"><code class="notranslate">INSTALLED VERSIONS ------------------ commit: None python: 3.6.1.final.0 python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: None.None pandas: 0.20.1 pytest: 3.0.7 pip: 9.0.1 setuptools: 27.2.0 Cython: 0.25.2 numpy: 1.12.1 scipy: 0.19.0 xarray: None IPython: 5.3.0 sphinx: 1.5.6 patsy: 0.4.1 dateutil: 2.6.0 pytz: 2017.2 blosc: None bottleneck: 1.2.1 tables: 3.2.2 numexpr: 2.6.2 feather: None matplotlib: 2.0.2 openpyxl: 2.4.7 xlrd: 1.0.0 xlwt: 1.2.0 xlsxwriter: 0.9.6 lxml: 3.7.3 bs4: 4.6.0 html5lib: 0.999 sqlalchemy: 1.1.9 pymysql: None psycopg2: None jinja2: 2.9.6 s3fs: None pandas_gbq: None pandas_datareader: None </code></pre></div> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div>
<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="d=[['hello',1,'GOOD','long.kw'], [1.2,'chipotle',np.nan,'bingo'], ['various',np.nan,3000,123.456]] t=pd.DataFrame(data=d, columns=['A','B','C','D']) t['combined'] = t.apply(lambda x: list([x['A'], x['B'], x['C'], x['D']]),axis=1) "><pre class="notranslate"><span class="pl-s1">d</span><span class="pl-c1">=</span>[[<span class="pl-s">'hello'</span>,<span class="pl-c1">1</span>,<span class="pl-s">'GOOD'</span>,<span class="pl-s">'long.kw'</span>], [<span class="pl-c1">1.2</span>,<span class="pl-s">'chipotle'</span>,<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>,<span class="pl-s">'bingo'</span>], [<span class="pl-s">'various'</span>,<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>,<span class="pl-c1">3000</span>,<span class="pl-c1">123.456</span>]] <span class="pl-s1">t</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-s1">d</span>, <span class="pl-s1">columns</span><span class="pl-c1">=</span>[<span class="pl-s">'A'</span>,<span class="pl-s">'B'</span>,<span class="pl-s">'C'</span>,<span class="pl-s">'D'</span>]) <span class="pl-s1">t</span>[<span class="pl-s">'combined'</span>] <span class="pl-c1">=</span> <span class="pl-s1">t</span>.<span class="pl-en">apply</span>(<span class="pl-k">lambda</span> <span class="pl-s1">x</span>: <span class="pl-en">list</span>([<span class="pl-s1">x</span>[<span class="pl-s">'A'</span>], <span class="pl-s1">x</span>[<span class="pl-s">'B'</span>], <span class="pl-s1">x</span>[<span class="pl-s">'C'</span>], <span class="pl-s1">x</span>[<span class="pl-s">'D'</span>]]),<span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>) </pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">[I am confuse why this is not working properly, if I initiate the 'combined' columns first to 0 first, it works. I understand that this is a sub-optimal approach but I am just wondering why is this breaking up]</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="t['combined'] = t.values.tolist() t Out[80]: A B C D combined 0 hello 1 GOOD long.kw [hello, 1, GOOD, long.kw] 1 1.20 chipotle NaN bingo [1.2, chipotle, nan, bingo] 2 various NaN 3000 123.46 [various, nan, 3000, 123.456]"><pre class="notranslate"><span class="pl-s1">t</span>[<span class="pl-s">'combined'</span>] <span class="pl-c1">=</span> <span class="pl-s1">t</span>.<span class="pl-s1">values</span>.<span class="pl-en">tolist</span>() <span class="pl-s1">t</span> <span class="pl-v">Out</span>[<span class="pl-c1">80</span>]: <span class="pl-v">A</span> <span class="pl-v">B</span> <span class="pl-v">C</span> <span class="pl-v">D</span> <span class="pl-s1">combined</span> <span class="pl-c1">0</span> <span class="pl-s1">hello</span> <span class="pl-c1">1</span> <span class="pl-v">GOOD</span> <span class="pl-s1">long</span>.<span class="pl-s1">kw</span> [<span class="pl-s1">hello</span>, <span class="pl-c1">1</span>, <span class="pl-v">GOOD</span>, <span class="pl-s1">long</span>.<span class="pl-s1">kw</span>] <span class="pl-c1">1</span> <span class="pl-c1">1.20</span> <span class="pl-s1">chipotle</span> <span class="pl-v">NaN</span> <span class="pl-s1">bingo</span> [<span class="pl-c1">1.2</span>, <span class="pl-s1">chipotle</span>, <span class="pl-s1">nan</span>, <span class="pl-s1">bingo</span>] <span class="pl-c1">2</span> <span class="pl-s1">various</span> <span class="pl-v">NaN</span> <span class="pl-c1">3000</span> <span class="pl-c1">123.46</span> [<span class="pl-s1">various</span>, <span class="pl-s1">nan</span>, <span class="pl-c1">3000</span>, <span class="pl-c1">123.456</span>]</pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> INSTALLED VERSIONS ------------------ commit: None python: 3.6.0.final.0 python-bits: 64 OS: Windows OS-release: 7 machine: AMD64 processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: None.None pandas: 0.19.2 nose: 1.3.7 pip: 9.0.1 setuptools: 27.2.0 Cython: 0.25.2 numpy: 1.11.3 scipy: 0.18.1 statsmodels: 0.6.1 xarray: None IPython: 5.1.0 sphinx: 1.5.1 patsy: 0.4.1 dateutil: 2.6.0 pytz: 2016.10 blosc: None bottleneck: 1.2.0 tables: 3.2.2 numexpr: 2.6.1 matplotlib: 2.0.0 openpyxl: 2.4.1 xlrd: 1.0.0 xlwt: 1.2.0 xlsxwriter: 0.9.6 lxml: 3.7.2 bs4: 4.5.3 html5lib: None httplib2: None apiclient: None sqlalchemy: 1.1.5 pymysql: None psycopg2: None jinja2: 2.9.4 boto: 2.45.0 pandas_datareader: None </details>
1
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: 1.34.3</li> <li>Operating System: Windows 11</li> <li>Browser: Chromium</li> <li>Other info: n/a</li> </ul> <h3 dir="auto">Source code</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li> </ul> <p dir="auto"><strong>Link to the GitHub repository with the repro</strong></p> <p dir="auto"><a href="https://github.com/kumarchandresh/playwright-issues">kumarchandresh/playwright-issues</a></p> <p dir="auto"><strong>Steps</strong></p> <ol dir="auto"> <li>Run the test.</li> <li>See it fail.</li> <li>Replace <code class="notranslate">/ancestor::</code> with <code class="notranslate">xpath=/ancestor::</code> or <code class="notranslate">//ancestor::</code> in the source code.</li> <li>Run the test again.</li> <li>See it pass.</li> </ol> <p dir="auto"><strong>Expected</strong></p> <p dir="auto">Test should NOT fail at step 2.</p> <p dir="auto">NOTE: If <code class="notranslate">xpath=/ancestor::</code> is a valid selector for Playwright, then <code class="notranslate">/ancestor::</code> should be too since Playwright can auto detect the type of selector being used.</p> <p dir="auto"><strong>Actual</strong></p> <p dir="auto">Test fails at step 2.</p>
<p dir="auto">For send array "data[product]" I write<br> "data[product][]:18<br> data[product][]:55"</p> <p dir="auto">In postman it looks like this:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/83776173/197211761-40c4d320-8463-4217-8158-f9628dfd8275.png"><img src="https://user-images.githubusercontent.com/83776173/197211761-40c4d320-8463-4217-8158-f9628dfd8275.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">How to make similar array to playwright?<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/83776173/197219628-c3ae290a-6f26-410a-881e-e623951bf8eb.png"><img src="https://user-images.githubusercontent.com/83776173/197219628-c3ae290a-6f26-410a-881e-e623951bf8eb.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">The following method is not working properly:<br> "data[product_ids][]": [18, 55]</p>
0
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function safeFindIndex&lt;T extends object&gt;( array: ReadonlyArray&lt;T&gt;, matcher: Partial&lt;T&gt;, recordName: string, assertMatcher: Partial&lt;T&gt; | undefined ): number { const index = findIndex(array, matcher) // ERROR HERE: immutable-array.ts:21 if (index === -1) { reportError(new TypeError(`Couldn't find ${recordName}`), { extra: { matcher } }) } else { const found = array[index] if (assertMatcher !== undefined &amp;&amp; !isMatch(found, assertMatcher)) { reportError( new TypeError(`${recordName} was in unexpected state`), { extra: { record: found, assertMatcher } } ) } } return index }"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">safeFindIndex</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span> <span class="pl-k">extends</span> <span class="pl-smi">object</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span> <span class="pl-s1">array</span>: <span class="pl-smi">ReadonlyArray</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">,</span> <span class="pl-s1">matcher</span>: <span class="pl-smi">Partial</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">,</span> <span class="pl-s1">recordName</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">assertMatcher</span>: <span class="pl-smi">Partial</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span> <span class="pl-c1">|</span> <span class="pl-c1">undefined</span> <span class="pl-kos">)</span>: <span class="pl-smi">number</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-en">findIndex</span><span class="pl-kos">(</span><span class="pl-s1">array</span><span class="pl-kos">,</span> <span class="pl-s1">matcher</span><span class="pl-kos">)</span> <span class="pl-c">// ERROR HERE: immutable-array.ts:21</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">index</span> <span class="pl-c1">===</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">reportError</span><span class="pl-kos">(</span><span class="pl-k">new</span> <span class="pl-smi">TypeError</span><span class="pl-kos">(</span><span class="pl-s">`Couldn't find <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">recordName</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-c1">extra</span>: <span class="pl-kos">{</span> matcher <span class="pl-kos">}</span> <span class="pl-kos">}</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">const</span> <span class="pl-s1">found</span> <span class="pl-c1">=</span> <span class="pl-s1">array</span><span class="pl-kos">[</span><span class="pl-s1">index</span><span class="pl-kos">]</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">assertMatcher</span> <span class="pl-c1">!==</span> <span class="pl-c1">undefined</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-c1">!</span><span class="pl-en">isMatch</span><span class="pl-kos">(</span><span class="pl-s1">found</span><span class="pl-kos">,</span> <span class="pl-s1">assertMatcher</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-en">reportError</span><span class="pl-kos">(</span> <span class="pl-k">new</span> <span class="pl-smi">TypeError</span><span class="pl-kos">(</span><span class="pl-s">`<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">recordName</span><span class="pl-kos">}</span></span> was in unexpected state`</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">extra</span>: <span class="pl-kos">{</span> <span class="pl-c1">record</span>: <span class="pl-s1">found</span><span class="pl-kos">,</span> assertMatcher <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">return</span> <span class="pl-s1">index</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">This code causes this error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR in [at-loader] TS2321: Excessive stack depth comparing types 'Partial&lt;T&gt;' and 'string | [string, any] | ListIterator&lt;T, boolean&gt; | PartialDeep&lt;T&gt; | undefined'. ERROR in [at-loader] ./app/assets/javascripts/utilities/immutable-array.ts:21:34 TS2321: Excessive stack depth comparing types 'Partial&lt;T&gt;' and 'string | [string, any] | ListIterator&lt;T, boolean&gt; | PartialDeep&lt;T&gt; | undefined'."><pre class="notranslate"><code class="notranslate">ERROR in [at-loader] TS2321: Excessive stack depth comparing types 'Partial&lt;T&gt;' and 'string | [string, any] | ListIterator&lt;T, boolean&gt; | PartialDeep&lt;T&gt; | undefined'. ERROR in [at-loader] ./app/assets/javascripts/utilities/immutable-array.ts:21:34 TS2321: Excessive stack depth comparing types 'Partial&lt;T&gt;' and 'string | [string, any] | ListIterator&lt;T, boolean&gt; | PartialDeep&lt;T&gt; | undefined'. </code></pre></div> <p dir="auto"><strong>package versions</strong></p> <ul dir="auto"> <li><code class="notranslate">@types/[email protected]</code></li> <li><code class="notranslate">[email protected]</code></li> </ul> <p dir="auto">This is not an issue with <code class="notranslate">@types/[email protected]</code></p> <p dir="auto"><strong>cc:</strong> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/aj-r/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/aj-r">@aj-r</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/andy-ms/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/andy-ms">@andy-ms</a></p>
<p dir="auto"><strong>Search Terms:</strong><br> "excessive depth"<br> "generic partial"</p> <p dir="auto"><strong>Code</strong></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const fn = &lt;T&gt;(arg: T) =&gt; { ((arg2: RecursivePartial&lt;T&gt;) =&gt; { // ... })(arg); // &lt;-- here }; type RecursivePartial&lt;T&gt; = { [P in keyof T]?: RecursivePartial&lt;T[P]&gt;; };"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-en">fn</span> <span class="pl-c1">=</span> <span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">arg</span>: <span class="pl-smi">T</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">arg2</span>: <span class="pl-smi">RecursivePartial</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-c">// ...</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-s1">arg</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// &lt;-- here</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">type</span> <span class="pl-smi">RecursivePartial</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-smi">P</span> <span class="pl-k">in</span> <span class="pl-k">keyof</span> <span class="pl-smi">T</span><span class="pl-kos">]</span>?: <span class="pl-smi">RecursivePartial</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">[</span><span class="pl-smi">P</span><span class="pl-kos">]</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Expected behavior:</strong><br> Comparing a generic with a partial of that generic working without errors.</p> <p dir="auto"><strong>Actual behavior:</strong><br> Getting "Excessive stack depth comparing types 'T' and 'RecursivePartial'." since upgrading to 2.7.x. (Also errors in 2.8.x). Working in 2.6.1.</p> <p dir="auto"><strong>Playground Link:</strong><br> <a href="https://www.typescriptlang.org/play/index.html#src=class%20Greeter%20%7B%0D%0A%20%20%20%20greeting%3A%20RecursivePartial%3Cstring%3E%3B%0D%0A%20%20%20%20constructor(message%3A%20string)%20%7B%0D%0A%20%20%20%20%20%20%20%20this.greeting%20%3D%20message%3B%0D%0A%20%20%20%20%7D%0D%0A%20%20%20%20greet()%20%7B%0D%0A%20%20%20%20%20%20%20%20return%20%22Hello%2C%20%22%20%2B%20this.greeting%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A%0D%0Alet%20greeter%20%3D%20new%20Greeter(%22world%22)%3B%0D%0A%0D%0Alet%20button%20%3D%20document.createElement('button')%3B%0D%0Abutton.textContent%20%3D%20%22Say%20Hello%22%3B%0D%0Abutton.onclick%20%3D%20function()%20%7B%0D%0A%20%20%20%20alert(greeter.greet())%3B%0D%0A%7D%0D%0A%0D%0Adocument.body.appendChild(button)%3B%0D%0A%0D%0Aconst%20fn%20%3D%20%3CT%3E(arg%3A%20T)%20%3D%3E%20%7B%0D%0A%20%20%20%20((arg2%3A%20RecursivePartial%3CT%3E)%20%3D%3E%20%7B%0D%0A%20%20%20%20%20%20%20%20%2F%2F%0D%0A%20%20%20%20%7D)(arg)%3B%0D%0A%7D%3B%0D%0A%0D%0Atype%20RecursivePartial%3CT%3E%20%3D%20%7B%0D%0A%20%20%20%20%5BP%20in%20keyof%20T%5D%3F%3A%20RecursivePartial%3CT%5BP%5D%3E%3B%0D%0A%7D%3B" rel="nofollow">https://www.typescriptlang.org/play/index.html#src=class%20Greeter%20%7B%0D%0A%20%20%20%20greeting%3A%20RecursivePartial%3Cstring%3E%3B%0D%0A%20%20%20%20constructor(message%3A%20string)%20%7B%0D%0A%20%20%20%20%20%20%20%20this.greeting%20%3D%20message%3B%0D%0A%20%20%20%20%7D%0D%0A%20%20%20%20greet()%20%7B%0D%0A%20%20%20%20%20%20%20%20return%20%22Hello%2C%20%22%20%2B%20this.greeting%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A%0D%0Alet%20greeter%20%3D%20new%20Greeter(%22world%22)%3B%0D%0A%0D%0Alet%20button%20%3D%20document.createElement('button')%3B%0D%0Abutton.textContent%20%3D%20%22Say%20Hello%22%3B%0D%0Abutton.onclick%20%3D%20function()%20%7B%0D%0A%20%20%20%20alert(greeter.greet())%3B%0D%0A%7D%0D%0A%0D%0Adocument.body.appendChild(button)%3B%0D%0A%0D%0Aconst%20fn%20%3D%20%3CT%3E(arg%3A%20T)%20%3D%3E%20%7B%0D%0A%20%20%20%20((arg2%3A%20RecursivePartial%3CT%3E)%20%3D%3E%20%7B%0D%0A%20%20%20%20%20%20%20%20%2F%2F%0D%0A%20%20%20%20%7D)(arg)%3B%0D%0A%7D%3B%0D%0A%0D%0Atype%20RecursivePartial%3CT%3E%20%3D%20%7B%0D%0A%20%20%20%20%5BP%20in%20keyof%20T%5D%3F%3A%20RecursivePartial%3CT%5BP%5D%3E%3B%0D%0A%7D%3B</a></p> <p dir="auto"><strong>Related Issues:</strong><br> None?</p>
1