text1
stringlengths
0
536k
text2
stringlengths
0
536k
label
int64
0
1
<p dir="auto"><strong>Summary</strong><br> Installing scikit-learn on aarch64 via pip using command "pip3 install scikit-learn" tries to build wheel from source code</p> <p dir="auto"><strong>Problem description</strong><br> scikit-learn don't have wheel for aarch64 on PyPI repository. So, while installing scikit-learn via pip on aarch64, pip builds wheel for same resulting in it takes more time to install scikit-learn. Making wheel available for aarch64 will benefit aarch64 users by minimizing scikit-learn installation time.</p> <p dir="auto"><strong>Expected Output</strong><br> Pip should be able to download scikit-learn wheel from PyPI repository rather than building it from source code.</p> <p dir="auto">@scikit-learn-team, please let me know if I can help you building wheel/uploading to PyPI repository. I am curious to make scikit-learn wheel available for aarch64. It will be a great opportunity for me to work with you.</p>
<p dir="auto">I recently checked the <a href="www.shippable.come">Shippable</a> CI service which offers some ARM architecture to test on. I tested it on my fork to check the required configuration and so on. However, there is a timeout of an hour, and currently, we are encountering this limit. Here, this is the log of such build:</p> <p dir="auto"><a href="https://app.shippable.com/github/glemaitre/scikit-learn/runs/24/1/console" rel="nofollow">https://app.shippable.com/github/glemaitre/scikit-learn/runs/24/1/console</a></p> <p dir="auto">On ARM 32 bits, we have a "Bus error (core dumped)":</p> <p dir="auto"><a href="https://app.shippable.com/github/glemaitre/scikit-learn/runs/24/2/console" rel="nofollow">https://app.shippable.com/github/glemaitre/scikit-learn/runs/24/2/console</a></p> <p dir="auto">I already cached the numpy, scipy, and cython wheels. Then, we still spent 15 minutes to make the scikit-learn wheel and the remaining time for the tests (the tests almost complete ~99%).</p> <p dir="auto">So I was wondering if it would be interesting to add this CI at least in a CRON job. Then, regarding the timeout constraint, we might have different strategies to overcome it:</p> <ul dir="auto"> <li>Make some nightly wheels including some for the ARM target and fetching those instead of building from source in Shippable.</li> <li>Ask Shippable if they can lift up the timeout constraint (they 120 minutes for paid plans) and offer to only use this CI for CRON job and not on all PR or master push.</li> </ul> <p dir="auto">I would be happy to have some thoughts.</p>
1
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br> Bug</p> <p dir="auto"><strong>What is the current behavior?</strong><br> I'm migrating an application from Webpack 1 to 2, where we on and off have updated code from <code class="notranslate">module.exports</code> to ES2015 <code class="notranslate">import/export</code>. Here and there, we got a mix. When cases like this occurs, Webpack seem to export/import modules in a non-backwards compatible way.<br> In the example repo I've made, I've been able to reproduce the bug.<br> <code class="notranslate">__WEBPACK_IMPORTED_MODULE_0__deps_a__</code> has object set. However, <code class="notranslate">__WEBPACK_IMPORTED_MODULE_0__deps_a__["default"]</code> is <code class="notranslate">undefined</code>.</p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p> <ol dir="auto"> <li>Here's a branch with the issue: <a href="https://github.com/jouni-kantola/webpack-output-by-build-type/tree/import-module-exports-mix">https://github.com/jouni-kantola/webpack-output-by-build-type/tree/import-module-exports-mix</a></li> <li><code class="notranslate">npm run serve</code> (to build, which doesn't cause errors: <code class="notranslate">npm run build</code>)</li> <li>I've made comments in the code where the bug is occurs and what can be done in the code itself to work around it</li> </ol> <p dir="auto"><strong>What is the expected behavior?</strong><br> It would be easier to migrate old code running with Webpack 1 ifmixing <code class="notranslate">imports/module.export</code> works. However, I fully understand if you feel it's up to the applications to not do weird things.</p> <p dir="auto"><strong>Please mention other relevant information such as the browser version, Node.js version, Operating System and programming language.</strong><br> OS: Windows 10 + MacOS Sierra 10.12.1<br> Node: Windows 10 &gt; Node v6.4.0, MacOS &gt; Node v6.8.0<br> Deps:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;devDependencies&quot;: { &quot;babel-core&quot;: &quot;^6.21.0&quot;, &quot;babel-loader&quot;: &quot;^6.2.10&quot;, &quot;babel-preset-env&quot;: &quot;^1.1.4&quot;, &quot;html-webpack-plugin&quot;: &quot;^2.24.1&quot;, &quot;webpack&quot;: &quot;^2.2.0-rc.3&quot;, &quot;webpack-dev-server&quot;: &quot;^2.2.0-rc.0&quot; }"><pre class="notranslate"><code class="notranslate">"devDependencies": { "babel-core": "^6.21.0", "babel-loader": "^6.2.10", "babel-preset-env": "^1.1.4", "html-webpack-plugin": "^2.24.1", "webpack": "^2.2.0-rc.3", "webpack-dev-server": "^2.2.0-rc.0" } </code></pre></div>
<p dir="auto">With the <code class="notranslate">2.2.0-rc.0</code> release, any module that has an <code class="notranslate">include</code> declaration is also considered a harmony module and does not go through the commonjs module interop.</p> <p dir="auto">However, such modules are still allowed to modify the <code class="notranslate">module</code> object's <code class="notranslate">exports</code>, so they can still make commonjs exports.</p> <p dir="auto">This is a breaking change when a file has an <code class="notranslate">import</code> but exports using <code class="notranslate">module.exports</code>, and is <code class="notranslate">import</code>ed via a default import declaration. The <code class="notranslate">module.exports</code> object is treated as if it was a namespace, and accessing <code class="notranslate">default</code> (most likely) results in <code class="notranslate">undefined</code>.</p> <p dir="auto">On real ES2015 modules, <code class="notranslate">module</code> or <code class="notranslate">exports</code> will no longer exist, so these variables should not be accessible (accessing should throw <code class="notranslate">ReferenceError</code> unless the user declares them in their own scope).</p> <p dir="auto">If you're going with this breaking change, I'd say you should go all the way <g-emoji class="g-emoji" alias="smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f604.png">😄</g-emoji></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// a.js import './empty' module.exports = { foo () {} } // `module` should be ReferenceError instead"><pre class="notranslate"><span class="pl-c">// a.js</span> <span class="pl-k">import</span> <span class="pl-s">'./empty'</span> <span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-en">foo</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-c">// `module` should be ReferenceError instead</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// empty.js"><pre class="notranslate"><span class="pl-c">// empty.js</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// b.js import a from './a' a.foo() // TypeError as of 2.2.0-rc.0"><pre class="notranslate"><span class="pl-c">// b.js</span> <span class="pl-k">import</span> <span class="pl-s1">a</span> <span class="pl-k">from</span> <span class="pl-s">'./a'</span> <span class="pl-s1">a</span><span class="pl-kos">.</span><span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c">// TypeError as of 2.2.0-rc.0</span></pre></div>
1
<p dir="auto">Return a Value from a Function with Return</p> <p dir="auto"><a href="https://www.freecodecamp.com/challenges/return-a-value-from-a-function-with-return#?solution=%0A%2F%2F%20Example%0Afunction%20minusSeven(num)%20%7B%0A%20%20return%20num%20-%207%3B%0A%7D%0A%0A%2F%2F%20Only%20change%20code%20below%20this%20line%0Afunction%20timesFive(num)%7B%0A%20%20return%20num*5%3B%0A%7D%0AtimesFive(10)%3B%0A" rel="nofollow">https://www.freecodecamp.com/challenges/return-a-value-from-a-function-with-return#?solution=%0A%2F%2F%20Example%0Afunction%20minusSeven(num)%20%7B%0A%20%20return%20num%20-%207%3B%0A%7D%0A%0A%2F%2F%20Only%20change%20code%20below%20this%20line%0Afunction%20timesFive(num)%7B%0A%20%20return%20num*5%3B%0A%7D%0AtimesFive(10)%3B%0A</a></p> <h4 dir="auto">Issue Description</h4> <p dir="auto">No matter what value I give my argument in this challenge, the code returns 25 as the answer.</p> <h4 dir="auto">Browser Information</h4> <ul dir="auto"> <li>Browser Name, Version: Safari 9.1.1</li> <li>Operating System: MacOS X El Capitan</li> <li>Mobile, Desktop, or Tablet: Desktop</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=" function timesFive(num){ return num*5; } timesFive(10);"><pre class="notranslate"> <span class="pl-k">function</span> <span class="pl-en">timesFive</span><span class="pl-kos">(</span><span class="pl-s1">num</span><span class="pl-kos">)</span><span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">num</span><span class="pl-c1">*</span><span class="pl-c1">5</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-en">timesFive</span><span class="pl-kos">(</span><span class="pl-c1">10</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <h4 dir="auto">Screenshot</h4> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/10235113/17140656/15673bf0-52fe-11e6-905f-b76677f80a21.png"><img width="514" alt="screen shot 2016-07-26 at 6 56 11 am" src="https://cloud.githubusercontent.com/assets/10235113/17140656/15673bf0-52fe-11e6-905f-b76677f80a21.png" style="max-width: 100%;"></a></p>
<p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/return-a-value-from-a-function-with-return#?solution=%0A%2F%2F%20Example%0Afunction%20minusSeven%28num%29%20%7B%0A%20%20return%20num%20-%207%3B%0A%7D%0Avar%20answer%20%3D%20minusSeven%287%29%3B%0A%2F%2F%20Only%20change%20code%20below%20this%20line%0A%0A%0A" rel="nofollow">Return a Value from a Function with Return</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 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:<br> function timesFive(num){<br> return num * 5;<br> }<br> var answer = timesFive(5);</p> <p dir="auto">// Example<br> function minusSeven(num) {<br> return num - 7;<br> }<br> var answer = minusSeven(7);<br> // Only change code below this line</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="**The console deck won't change no matter what you type in. Always showing &quot;timesFive(5)===25&quot;.** People who have this kind of problem could go to this link and test: https://jsbin.com/daxoyifabe/edit?html,css,output"><pre class="notranslate"><code class="notranslate">**The console deck won't change no matter what you type in. Always showing "timesFive(5)===25".** People who have this kind of problem could go to this link and test: https://jsbin.com/daxoyifabe/edit?html,css,output </code></pre></div>
1
<p dir="auto">It's wanted for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="13712724" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/6085" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/6085/hovercard" href="https://github.com/rust-lang/rust/issues/6085">#6085</a>, and generally OR-ing flags together is a common pattern for which we don't otherwise have a typesafe solution. Does EnumSet meet the high bar for inclusion in std? If so, then it's API probably needs careful consideration.</p>
<p dir="auto">I don't have a repro for this, but it's a really annoying error because it seems to be a lie and it's not at all clear how users can fix it. I had a library depending on three other libraries. The external libraries were copied into a local project/bin directory so that I had more control over them.</p> <p dir="auto">This was all working fine until I decided to rename my project. As part of this process I removed my bin directory and copied new versions of the external libraries into bin. Now when I do <code class="notranslate">rustc --out-dir bin -L bin -O src/rwebserve.rc</code> I get:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="src/rwebserve.rc:11:0: 11:42 error: duplicate definition of module socket src/rwebserve.rc:11 use socket (name = &quot;socket&quot;, vers = &quot;0.1&quot;);"><pre class="notranslate"><code class="notranslate">src/rwebserve.rc:11:0: 11:42 error: duplicate definition of module socket src/rwebserve.rc:11 use socket (name = "socket", vers = "0.1"); </code></pre></div> <p dir="auto">If I change the use statement to "use socketXXX" I get the same error which makes me think that it is not a duplicate definition (and I don't see how it would be). My guess is that this is caused when using libraries built by slightly different versions of rustc. Unfortunately I now get an ICE trying to build one of the libraries so I can't try it out atm (currently building a new rustc in the hopes that that will fix the ICE).</p>
0
<p dir="auto"><strong>Log:</strong><br> Resolving dependencies...<br> Gradle task 'assembleDebug'...<br> Built build\app\outputs\apk\debug\app-debug.apk.<br> #timeout waiting for the application to start<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="376727450" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/23861" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/23861/hovercard" href="https://github.com/flutter/flutter/issues/23861">#23861</a><br> Syncing files to device GT I9300...<br> I/Process (27308): Sending signal. PID: 27308 SIG: 9<br> Lost connection to device.</p> <p dir="auto"><strong>PLEASE HELP ME!!</strong></p>
<h2 dir="auto">Steps to Reproduce</h2> <p dir="auto">The following may be dependent on the dev machine, but I have no way to test. The following happens on my <code class="notranslate">MacBook Pro (Retina, 15-inch, Mid 2014)</code>.</p> <ol dir="auto"> <li>Open Android Studio (v3.2.1, with Flutter plugin 29.1.1 and Dart plugin 181.5656).</li> <li>Create new Flutter app</li> <li>Open iOS Simulator.</li> <li>Debug/Run the app in the Simulator</li> </ol> <p dir="auto">The debug log shows the following:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/919717/47905470-8bab2300-de87-11e8-8ec3-385a598b4d66.png"><img width="689" alt="screen shot 2018-11-02 at 10 07 01" src="https://user-images.githubusercontent.com/919717/47905470-8bab2300-de87-11e8-8ec3-385a598b4d66.png" style="max-width: 100%;"></a></p> <p dir="auto">Note that the "timeout waiting for the application to start" is red. It stays there for at least a few seconds (probably tens of seconds) before the build finishes, and the next line is printed out.</p> <p dir="auto">After that, everything works just fine.</p> <p dir="auto">I'm filing this mostly because I've seen this happen to newcomers during codelabs, and they (understandably) assume that the build failed and they should just stop it.</p> <h2 dir="auto">Logs</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Launching lib/main.dart on iPhone X in debug mode... Running pod install... Starting Xcode build... timeout waiting for the application to start Xcode build done. 127.6s Syncing files to device iPhone X... [C1.1 E9C3A58A-EFF3-459E-A2C8-C1D461C3C624 192.168.0.14:54760&lt;-&gt;172.217.23.202:443] Connected Path: satisfied (Path is satisfied), interface: en0 Duration: 120.981s, DNS @0.003s took 0.018s, TCP @0.024s took 0.012s, TLS took 0.170s bytes in/out: 3306/1028, packets in/out: 9/9, rtt: 0.025s, retransmitted packets: 0, out-of-order packets: 0 [C2.1 E0EF4920-9679-45B3-8EDE-B64A67A08769 192.168.0.14:54785&lt;-&gt;216.58.201.110:443] Connected Path: satisfied (Path is satisfied), interface: en0 Duration: 120.488s, DNS @0.000s took 0.001s, TCP @0.003s took 0.010s, TLS took 0.108s bytes in/out: 3876/1023, packets in/out: 10/9, rtt: 0.022s, retransmitted packets: 1, out-of-order packets: 0 [C3.1 9B325582-F53A-415B-8FAF-BBAFC43598B7 192.168.0.14:54786&lt;-&gt;216.58.201.110:443] Connected Path: satisfied (Path is satisfied), interface: en0 Duration: 121.090s, DNS @0.000s took 0.002s, TCP @0.004s took 0.015s, TLS took 0.121s bytes in/out: 3588/1165, packets in/out: 9/9, rtt: 0.026s, retransmitted packets: 0, out-of-order packets: 0 [...]"><pre class="notranslate"><code class="notranslate">Launching lib/main.dart on iPhone X in debug mode... Running pod install... Starting Xcode build... timeout waiting for the application to start Xcode build done. 127.6s Syncing files to device iPhone X... [C1.1 E9C3A58A-EFF3-459E-A2C8-C1D461C3C624 192.168.0.14:54760&lt;-&gt;172.217.23.202:443] Connected Path: satisfied (Path is satisfied), interface: en0 Duration: 120.981s, DNS @0.003s took 0.018s, TCP @0.024s took 0.012s, TLS took 0.170s bytes in/out: 3306/1028, packets in/out: 9/9, rtt: 0.025s, retransmitted packets: 0, out-of-order packets: 0 [C2.1 E0EF4920-9679-45B3-8EDE-B64A67A08769 192.168.0.14:54785&lt;-&gt;216.58.201.110:443] Connected Path: satisfied (Path is satisfied), interface: en0 Duration: 120.488s, DNS @0.000s took 0.001s, TCP @0.003s took 0.010s, TLS took 0.108s bytes in/out: 3876/1023, packets in/out: 10/9, rtt: 0.022s, retransmitted packets: 1, out-of-order packets: 0 [C3.1 9B325582-F53A-415B-8FAF-BBAFC43598B7 192.168.0.14:54786&lt;-&gt;216.58.201.110:443] Connected Path: satisfied (Path is satisfied), interface: en0 Duration: 121.090s, DNS @0.000s took 0.002s, TCP @0.004s took 0.015s, TLS took 0.121s bytes in/out: 3588/1165, packets in/out: 9/9, rtt: 0.026s, retransmitted packets: 0, out-of-order packets: 0 [...] </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ flutter analyze Analyzing baby_names... No issues found! (ran in 2.7s)"><pre class="notranslate"><code class="notranslate">$ flutter analyze Analyzing baby_names... No issues found! (ran in 2.7s) </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ flutter doctor -v [✓] Flutter (Channel beta, v0.9.4, on Mac OS X 10.13.6 17G65, locale en-US) • Flutter version 0.9.4 at /Users/filiph/dev/flutter • Framework revision f37c235c32 (5 weeks ago), 2018-09-25 17:45:40 -0400 • Engine revision 74625aed32 • Dart version 2.1.0-dev.5.0.flutter-a2eb050044 [✓] Android toolchain - develop for Android devices (Android SDK 28.0.3) • Android SDK at /Users/filiph/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-28, build-tools 28.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) • All Android licenses accepted. [✓] iOS toolchain - develop for iOS devices (Xcode 10.0) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 10.0, Build version 10A255 • ios-deploy 1.9.2 • CocoaPods version 1.5.3 [✓] Android Studio (version 3.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 29.1.1 • Dart plugin version 181.5656 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) [!] IntelliJ IDEA Community Edition (version 2018.1) • IntelliJ at /Applications/IntelliJ IDEA CE.app ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. • For information about installing plugins, see https://flutter.io/intellij-setup/#installing-the-plugins [✓] VS Code (version 1.28.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 2.19.0 [✓] Connected devices (1 available) • iPhone X • A4DBE660-4C39-4AEA-B258-7755F584BA6E • ios • iOS 12.0 (simulator) ! Doctor found issues in 1 category."><pre class="notranslate"><code class="notranslate">$ flutter doctor -v [✓] Flutter (Channel beta, v0.9.4, on Mac OS X 10.13.6 17G65, locale en-US) • Flutter version 0.9.4 at /Users/filiph/dev/flutter • Framework revision f37c235c32 (5 weeks ago), 2018-09-25 17:45:40 -0400 • Engine revision 74625aed32 • Dart version 2.1.0-dev.5.0.flutter-a2eb050044 [✓] Android toolchain - develop for Android devices (Android SDK 28.0.3) • Android SDK at /Users/filiph/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-28, build-tools 28.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) • All Android licenses accepted. [✓] iOS toolchain - develop for iOS devices (Xcode 10.0) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 10.0, Build version 10A255 • ios-deploy 1.9.2 • CocoaPods version 1.5.3 [✓] Android Studio (version 3.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 29.1.1 • Dart plugin version 181.5656 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) [!] IntelliJ IDEA Community Edition (version 2018.1) • IntelliJ at /Applications/IntelliJ IDEA CE.app ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. • For information about installing plugins, see https://flutter.io/intellij-setup/#installing-the-plugins [✓] VS Code (version 1.28.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 2.19.0 [✓] Connected devices (1 available) • iPhone X • A4DBE660-4C39-4AEA-B258-7755F584BA6E • ios • iOS 12.0 (simulator) ! Doctor found issues in 1 category. </code></pre></div>
1
<p dir="auto">Hello,</p> <p dir="auto">I didn't find a previous discussion about this subject.<br> Here is the code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Class Test { private _test:string; public test:number; constructor() { this._test=&quot;&quot;; this.test=1; this.test2=&quot;&quot;; // error: must be declared, but it should guess the typing is string and public this._test3 : string[]; // invalid for now: could be private string[] this.test4 : string[]; // invalid for now: could be public string[] private this.test5 : string[]; // invalid for now: could be public string[], but modified to private } }"><pre class="notranslate"><code class="notranslate">Class Test { private _test:string; public test:number; constructor() { this._test=""; this.test=1; this.test2=""; // error: must be declared, but it should guess the typing is string and public this._test3 : string[]; // invalid for now: could be private string[] this.test4 : string[]; // invalid for now: could be public string[] private this.test5 : string[]; // invalid for now: could be public string[], but modified to private } } </code></pre></div> <p dir="auto">Do you plan to support such a feature ? I mean this._test3,this.test4 and this.test5<br> Are you working on this.test2 to add better intellisense for both ts and js (this.test2 shows any in vscode) ?</p> <p dir="auto">Thanks in advance for your answers.</p>
<p dir="auto"><strong>Problem Statement:</strong> In TypeScript 1.1, there are two basic ways to initialize complex properties with strong typing via a parameterized class constructor. Both have disadvantages. I will illustrate this with a simple example that uses Knockout, but this issue applies to any other JavaScript library that implements complex objects via initializer functions.</p> <p dir="auto"><strong>"Method 1"</strong> is to instantiate the properties outside of the constructor using a throw-away value, and then to set the desired value inside the constructor (see <code class="notranslate">RightTriangle1</code> below). This method has the advantage of being rather simple to program/maintain because TypeScript automatically infers the property's type. However, this has the potential to cause ripple effects or performance issues at runtime because the code to instantiate each property is run at least twice.</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class RightTriangle1 { public height = ko.observable(0); public width = ko.observable(0); public hypotenuse = ko.computed(() =&gt; { console.log(&quot;hypotenuse 1 calculated&quot;); return Math.sqrt(this.height() * this.height() + this.width() * this.width()); }); constructor(height: number, width: number) { this.height(height); this.width(width); } } var rt1 = new RightTriangle1(3, 4); console.log(&quot;hypotenuse 1: &quot; + rt1.hypotenuse()); // 5"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">RightTriangle1</span> <span class="pl-kos">{</span> <span class="pl-k">public</span> <span class="pl-c1">height</span> <span class="pl-c1">=</span> <span class="pl-s1">ko</span><span class="pl-kos">.</span><span class="pl-en">observable</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-k">public</span> <span class="pl-c1">width</span> <span class="pl-c1">=</span> <span class="pl-s1">ko</span><span class="pl-kos">.</span><span class="pl-en">observable</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-k">public</span> <span class="pl-c1">hypotenuse</span> <span class="pl-c1">=</span> <span class="pl-s1">ko</span><span class="pl-kos">.</span><span class="pl-en">computed</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">"hypotenuse 1 calculated"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-smi">Math</span><span class="pl-kos">.</span><span class="pl-en">sqrt</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">height</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">*</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">height</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">+</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">width</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">*</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">width</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">constructor</span><span class="pl-kos">(</span><span class="pl-s1">height</span>: <span class="pl-smi">number</span><span class="pl-kos">,</span> <span class="pl-s1">width</span>: <span class="pl-smi">number</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">height</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-smi">this</span><span class="pl-kos">.</span><span class="pl-en">width</span><span class="pl-kos">(</span><span class="pl-s1">width</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">rt1</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">RightTriangle1</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-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">"hypotenuse 1: "</span> <span class="pl-c1">+</span> <span class="pl-s1">rt1</span><span class="pl-kos">.</span><span class="pl-en">hypotenuse</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">// 5</span></pre></div> <p dir="auto"><em>Knockout happens to have an advanced feature to defer execution of a computed, but that's beside the point. Other libraries may not support such a feature and it's just one more thing for the developer to keep track of.</em></p> <p dir="auto"><strong>"Method 2"</strong> is to <em>declare</em> the properties with an explicit type outside of the constructor, and then to <em>instantiate</em> them inside the constructor (see <code class="notranslate">RightTriangle2</code> below). This method has the advantage of eliminating the runtime double-instantiation issue, but it <em>also</em> eliminates the convenience of having TypeScript infer the types.</p> <p dir="auto">Method 2 has the drawback of extra work if a type is ever changed, but much worse than that, it places the burden on the developer to figure out <em>what the type of each member should be</em>. For trivial members (string, number, etc.) or libraries you've written yourself, this is merely busy-work, however for complex types used by a JavaScript library it is sometimes difficult to determine unless the developer is quite familiar with the library's definition. Lastly, this is just the sort of syntax that would make a JavaScript developer who was new to TypeScript think, <em>"This is exactly what I was afraid of! Look at all that extra code I'm forced to write that just gets thrown away in the end!"</em></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class RightTriangle2 { public height : KnockoutObservable&lt;number&gt;; public width: KnockoutObservable&lt;number&gt;; public hypotenuse: KnockoutComputed&lt;number&gt;; constructor(height: number, width: number) { this.height = ko.observable(height); this.width = ko.observable(width); this.hypotenuse = ko.computed(() =&gt; { console.log(&quot;hypotenuse 2 calculated&quot;); return Math.sqrt(this.height() * this.height() + this.width() * this.width()); }); } } var rt2 = new RightTriangle2(6, 8); console.log(&quot;hypotenuse 2: &quot; + rt2.hypotenuse()); // 10"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">RightTriangle2</span> <span class="pl-kos">{</span> <span class="pl-k">public</span> <span class="pl-c1">height</span> : <span class="pl-smi">KnockoutObservable</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-k">public</span> <span class="pl-c1">width</span>: <span class="pl-smi">KnockoutObservable</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-k">public</span> <span class="pl-c1">hypotenuse</span>: <span class="pl-smi">KnockoutComputed</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">height</span>: <span class="pl-smi">number</span><span class="pl-kos">,</span> <span class="pl-s1">width</span>: <span class="pl-smi">number</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">height</span> <span class="pl-c1">=</span> <span class="pl-s1">ko</span><span class="pl-kos">.</span><span class="pl-en">observable</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-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">width</span> <span class="pl-c1">=</span> <span class="pl-s1">ko</span><span class="pl-kos">.</span><span class="pl-en">observable</span><span class="pl-kos">(</span><span class="pl-s1">width</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">hypotenuse</span> <span class="pl-c1">=</span> <span class="pl-s1">ko</span><span class="pl-kos">.</span><span class="pl-en">computed</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">"hypotenuse 2 calculated"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-smi">Math</span><span class="pl-kos">.</span><span class="pl-en">sqrt</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">height</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">*</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">height</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">+</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">width</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">*</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">width</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">var</span> <span class="pl-s1">rt2</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">RightTriangle2</span><span class="pl-kos">(</span><span class="pl-c1">6</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">"hypotenuse 2: "</span> <span class="pl-c1">+</span> <span class="pl-s1">rt2</span><span class="pl-kos">.</span><span class="pl-en">hypotenuse</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">// 10</span></pre></div> <p dir="auto">In summary of the problem, "Method 1" begs performance or logic problems, and "Method 2" is too wordy.</p> <p dir="auto"><strong>Proposal: "Method 3"</strong> Fairly early on in the public life of TypeScript, the team added the ability to indicate retained fields by placing visibility modifiers on constructor parameters. This feature is awesome, but it only helps with trivial properties. I would like to propose adding a new feature to TypeScript to allow this idiom within the <em>body</em> of a constructor as well. This would permit compiling the code in the <code class="notranslate">RightTriangle3</code> example below. <em>Note the public modifiers on height, width, and hypotenuse.</em></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class RightTriangle3 { constructor(height: number, width: number) { public this.height = ko.observable(height); public this.width = ko.observable(width); public this.hypotenuse = ko.computed(() =&gt; { console.log(&quot;hypotenuse 3 calculated&quot;); return Math.sqrt(this.height() * this.height() + this.width() * this.width()); }); } } var rt3 = new RightTriangle3(9, 12); console.log(&quot;hypotenuse 3: &quot; + rt3.hypotenuse()); // 15"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">RightTriangle3</span> <span class="pl-kos">{</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">height</span>: <span class="pl-smi">number</span><span class="pl-kos">,</span> <span class="pl-s1">width</span>: <span class="pl-smi">number</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">public</span> <span class="pl-s1">this</span><span class="pl-kos">.</span><span class="pl-c1">height</span> <span class="pl-c1">=</span> <span class="pl-s1">ko</span><span class="pl-kos">.</span><span class="pl-en">observable</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-s1">public</span> <span class="pl-s1">this</span><span class="pl-kos">.</span><span class="pl-c1">width</span> <span class="pl-c1">=</span> <span class="pl-s1">ko</span><span class="pl-kos">.</span><span class="pl-en">observable</span><span class="pl-kos">(</span><span class="pl-s1">width</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">public</span> <span class="pl-s1">this</span><span class="pl-kos">.</span><span class="pl-c1">hypotenuse</span> <span class="pl-c1">=</span> <span class="pl-s1">ko</span><span class="pl-kos">.</span><span class="pl-en">computed</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">"hypotenuse 3 calculated"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-smi">Math</span><span class="pl-kos">.</span><span class="pl-en">sqrt</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">height</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">*</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">height</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">+</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">width</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">*</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">width</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">var</span> <span class="pl-s1">rt3</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">RightTriangle3</span><span class="pl-kos">(</span><span class="pl-c1">9</span><span class="pl-kos">,</span> <span class="pl-c1">12</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">"hypotenuse 3: "</span> <span class="pl-c1">+</span> <span class="pl-s1">rt3</span><span class="pl-kos">.</span><span class="pl-en">hypotenuse</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">// 15</span></pre></div> <p dir="auto">With this proposal:</p> <ul dir="auto"> <li>There are no breaking changes; code that compiled in TypeScript 1.0 works without any modification in this proposed future version.</li> <li>The <code class="notranslate">RightTriangle3</code> class would have the <em>identical</em> JavaScript emit as <code class="notranslate">RightTriangle2</code>.</li> <li>The <code class="notranslate">RightTriangle3</code> TypeScript compile-time type interface would <em>also be identical</em> to <code class="notranslate">RightTriangle2</code>.</li> <li>The developer is not required to separate the declaration of the property from its instantiation just to get strong typing when using a parameterized constructor.</li> <li>The developer is not required to update the type of a property if the class interface ever changes - they can just update the initializer code.</li> <li>The TypeScript code in <code class="notranslate">RightTriangle3</code> is the most succinct of the three. <code class="notranslate">RightTriangle1</code> is 12 lines long (besides being "wrong"), <code class="notranslate">RightTriangle2</code> is 13, <code class="notranslate">RightTriangle3</code> is just 10. Additional observable or computed properties in <code class="notranslate">RightTriangle1</code> and <code class="notranslate">RightTriangle2</code> add two lines of code each; with <code class="notranslate">RightTriangle3</code> only one line of code is added each.</li> <li>The TypeScript code in <code class="notranslate">RightTriangle3</code> is still very close to the emitted JavaScript (and therefore unlikely to create future incompatibility issues).</li> <li>The new syntax is also very similar to the existing TypeScript parameter property declaration shorthand.</li> <li>The pattern demonstrated in <code class="notranslate">RightTriangle3</code> enables a simple cut+paste migration path to implement a constructor (the developer would just have to paste in "this." on each line). With TypeScript 1.0, implementing a constructor is a lot more work. For example if converting <code class="notranslate">RightTriangle1</code> to <code class="notranslate">RightTriangle2</code>, the developer must determine and explicitly type out each member declaration with its type before migrating the instantiation code.</li> </ul> <p dir="auto"><strong>Specifics:</strong><br> Inside a class constructor function only, a visibility modifier (<code class="notranslate">public</code>, <code class="notranslate">private</code>, or <code class="notranslate">protected</code>) may modify a property on the instance variable <code class="notranslate">this</code>. If so, the statement is considered a declaration of that property on the class and the type is inferred according to the normal TypeScript rules. The following example class <code class="notranslate">A</code> is legal under this proposal:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class A { constructor(property3: boolean) { public this.property1; //any private this.property2 : string; //string protected this.property3 = property3; //boolean } }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">property3</span>: <span class="pl-smi">boolean</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">public</span> <span class="pl-s1">this</span><span class="pl-kos">.</span><span class="pl-c1">property1</span><span class="pl-kos">;</span> <span class="pl-c">//any</span> <span class="pl-s1">private</span> <span class="pl-s1">this</span><span class="pl-kos">.</span><span class="pl-c1">property2</span> : string<span class="pl-kos">;</span> <span class="pl-c">//string</span> <span class="pl-s1">protected</span> <span class="pl-s1">this</span><span class="pl-kos">.</span><span class="pl-c1">property3</span> <span class="pl-c1">=</span> <span class="pl-s1">property3</span><span class="pl-kos">;</span> <span class="pl-c">//boolean</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">The above code is identical to this TypeScript 1.1 code:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class A { public property1; private property2: string; constructor(protected property3: boolean) { } }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span> <span class="pl-k">public</span> <span class="pl-c1">property1</span><span class="pl-kos">;</span> <span class="pl-k">private</span> <span class="pl-c1">property2</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-k">protected</span> <span class="pl-s1">property3</span>: <span class="pl-smi">boolean</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">Use of a visibility modifier is otherwise not permitted within the body of a constructor. For example, class <code class="notranslate">B</code> below would be a syntax error because <code class="notranslate">property1</code> is not qualified as a property of <code class="notranslate">this</code>. This condition should cause a new emit-preventing type error along the lines of <code class="notranslate">Visibility modifiers within a constructor may only modify properties of "this".</code></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class B { constructor(val: string) { public property1 = val; } }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">B</span> <span class="pl-kos">{</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">val</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">public</span> <span class="pl-s1">property1</span> <span class="pl-c1">=</span> <span class="pl-s1">val</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">Use of a visibility modifier is similarly not permitted within a normal function member. For example, class <code class="notranslate">C</code> below would be a syntax error, because in this proposal class properties can only be declared in this manner within the constructor. This condition should cause a new emit-preventing type error along the lines of <code class="notranslate">Visibility modifier declarations are only legal within the parameter list and body of a class constructor.</code></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class C { doSomething() { public this.property1: string = &quot;test&quot;; } }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">C</span> <span class="pl-kos">{</span> <span class="pl-en">doSomething</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">public</span> <span class="pl-s1">this</span><span class="pl-kos">.</span><span class="pl-c1">property1</span>: string <span class="pl-c1">=</span> <span class="pl-s">"test"</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">Use of the <code class="notranslate">static</code> modifier is similarly not permitted within a normal function member or the constructor. For example, class <code class="notranslate">D</code> below would be a syntax error because under this proposal, <code class="notranslate">static</code> class properties can only be declared using the existing TypeScript 1.0 syntax (within the body of the class). This condition should cause a new emit-preventing type error along the lines of <code class="notranslate">Shorthand visibility declarations may not be used on static properties.</code></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class D { constructor(val: boolean) { public static property1: string = &quot;test&quot;; } }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">D</span> <span class="pl-kos">{</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">val</span>: <span class="pl-smi">boolean</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">public</span> <span class="pl-s1">static</span> property1: <span class="pl-s1">string</span> <span class="pl-c1">=</span> <span class="pl-s">"test"</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto"><strong>What happens if a declaration occurs inside of a branch?</strong><br> For the purpose of the TypeScript type system, any branching, looping, etc. inside the constructor should be ignored. Furthermore, the JavaScript should be emitted exactly as if the public, private, or protected modifier were not present. Under this proposal, TypeScript should consider class <code class="notranslate">E</code> below to be valid. At compile time, TypeScript will consider class <code class="notranslate">E</code> to have a property called <code class="notranslate">description</code> of type <code class="notranslate">string</code> (even though at runtime the initialization code would never execute).</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class E { constructor() { if (1 === 0) { public this.description = &quot;&quot;; } } }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">E</span> <span class="pl-kos">{</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">1</span> <span class="pl-c1">===</span> <span class="pl-c1">0</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">public</span> <span class="pl-c1">this</span><span class="pl-kos">.</span><span class="pl-c1">description</span> <span class="pl-c1">=</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"><strong>What happens if there is a duplicate declaration and the types match?</strong><br> This should not prevent the emit. The second and successive duplicates should raise <code class="notranslate">error TS2300: Duplicate identifier 'PROPERTY_NAME_HERE'.</code> just like how existing duplicate declarations work.</p> <p dir="auto"><strong>What happens if there is a duplicate, but one is a subtype of the other, or even if the types do not match?</strong><br> The same type resolution logic should be applied if the duplicates occurred as simple type declarations in the class body (outside the constructor). The second and successive duplicates should raise <code class="notranslate">error TS2300: Duplicate identifier 'PROPERTY_NAME_HERE'.</code>. This should not prevent the emit. This may incidentally result in downstream <code class="notranslate">error TS2339: Property 'PROPERTY_NAME_HERE' does not exist on type 'THE_PROPERTY_TYPE'.</code> wherever sub-properties of the property are used (just like in TypeScript 1.0).</p> <p dir="auto"><strong>In all other scenarios</strong> (such as with inheritance chains, subtypes, supertypes, assignability relationships, and generics), the same behavior as a class written like <code class="notranslate">RightTriangle2</code> in TypeScript 1.0 should be used when evaluating what should happen with a class written like <code class="notranslate">RightTriangle3</code> using the new shorthand syntax.</p> <p dir="auto">I believe that this syntax fits in nicely with both the goals and non-goals of TypeScript and I hope that you'll consider it or something similar. Thanks for reading this.</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"> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.6.2</li> <li>Operating System version: Mac Pro OS X EI Capitan</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Step to reproduce this issue</h3> <ol dir="auto"> <li>add dubbo 2.6.2 depandency</li> <li>mvn clean install -Dmaven.test.skip=true</li> <li>run application</li> </ol> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">application start up without error.</p> <h3 dir="auto">Actual Result</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4f1bfe23: startup date [Mon Sep 10 19:19:24 CST 2018]; root of context hierarchy at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404) at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:961) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:968) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1033) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:555) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) at com.treefinance.saas.management.console.ConsoleServerApplication.main(ConsoleServerApplication.java:16) [10 九月 2018 19:19:32] [main] [DefaultSingletonBeanRegistry.java:581] [ERROR] Destroy method on bean with name 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory' threw an exception java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4f1bfe23: startup date [Mon Sep 10 19:19:24 CST 2018]; root of context hierarchy at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404) at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:961) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:968) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1033) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:555) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) at com.treefinance.saas.management.console.ConsoleServerApplication.main(ConsoleServerApplication.java:16) [10 九月 2018 19:19:32] [main] [SpringApplication.java:815] [ERROR] Application startup failed org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'methodValidationPostProcessor' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Unsatisfied dependency expressed through method 'methodValidationPostProcessor' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.spring.web.ShiroFilterFactoryBean]: Factory method 'shiroFilterFactoryBean' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.web.mgt.DefaultWebSecurityManager]: Factory method 'securityManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRealm' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.treefinance.saas.management.console.biz.common.shiro.UserRealm]: Factory method 'userRealm' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseServiceCredentialsMatcher': Unsatisfied dependency expressed through field 'iSecurityCryptoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:223) at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:702) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:527) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) at com.treefinance.saas.management.console.ConsoleServerApplication.main(ConsoleServerApplication.java:16) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.spring.web.ShiroFilterFactoryBean]: Factory method 'shiroFilterFactoryBean' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.web.mgt.DefaultWebSecurityManager]: Factory method 'securityManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRealm' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.treefinance.saas.management.console.biz.common.shiro.UserRealm]: Factory method 'userRealm' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseServiceCredentialsMatcher': Unsatisfied dependency expressed through field 'iSecurityCryptoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getSingletonFactoryBeanForTypeCheck(AbstractAutowireCapableBeanFactory.java:923) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:804) at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:558) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:432) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:395) at org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:220) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1260) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1101) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ... 19 common frames omitted Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.spring.web.ShiroFilterFactoryBean]: Factory method 'shiroFilterFactoryBean' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.web.mgt.DefaultWebSecurityManager]: Factory method 'securityManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRealm' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.treefinance.saas.management.console.biz.common.shiro.UserRealm]: Factory method 'userRealm' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseServiceCredentialsMatcher': Unsatisfied dependency expressed through field 'iSecurityCryptoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ... 32 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.web.mgt.DefaultWebSecurityManager]: Factory method 'securityManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRealm' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.treefinance.saas.management.console.biz.common.shiro.UserRealm]: Factory method 'userRealm' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseServiceCredentialsMatcher': Unsatisfied dependency expressed through field 'iSecurityCryptoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.obtainBeanInstanceFromFactory(ConfigurationClassEnhancer.java:389) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.securityManager(&lt;generated&gt;) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration.shiroFilterFactoryBean(ShiroConfiguration.java:112) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.CGLIB$shiroFilterFactoryBean$9(&lt;generated&gt;) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7$$FastClassBySpringCGLIB$$ef6b35b4.invoke(&lt;generated&gt;) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.shiroFilterFactoryBean(&lt;generated&gt;) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ... 33 common frames omitted Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.web.mgt.DefaultWebSecurityManager]: Factory method 'securityManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRealm' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.treefinance.saas.management.console.biz.common.shiro.UserRealm]: Factory method 'userRealm' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseServiceCredentialsMatcher': Unsatisfied dependency expressed through field 'iSecurityCryptoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ... 55 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRealm' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.treefinance.saas.management.console.biz.common.shiro.UserRealm]: Factory method 'userRealm' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseServiceCredentialsMatcher': Unsatisfied dependency expressed through field 'iSecurityCryptoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.obtainBeanInstanceFromFactory(ConfigurationClassEnhancer.java:389) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.userRealm(&lt;generated&gt;) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration.securityManager(ShiroConfiguration.java:92) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.CGLIB$securityManager$0(&lt;generated&gt;) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7$$FastClassBySpringCGLIB$$ef6b35b4.invoke(&lt;generated&gt;) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.securityManager(&lt;generated&gt;) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ... 56 common frames omitted Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.treefinance.saas.management.console.biz.common.shiro.UserRealm]: Factory method 'userRealm' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseServiceCredentialsMatcher': Unsatisfied dependency expressed through field 'iSecurityCryptoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ... 78 common frames omitted Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseServiceCredentialsMatcher': Unsatisfied dependency expressed through field 'iSecurityCryptoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264) 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:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.obtainBeanInstanceFromFactory(ConfigurationClassEnhancer.java:389) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.baseServiceCredentialsMatcher(&lt;generated&gt;) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration.userRealm(ShiroConfiguration.java:65) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.CGLIB$userRealm$5(&lt;generated&gt;) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7$$FastClassBySpringCGLIB$$ef6b35b4.invoke(&lt;generated&gt;) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.userRealm(&lt;generated&gt;) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ... 79 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1634) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1309) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1275) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1101) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585) ... 102 common frames omitted Caused by: java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at com.alibaba.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.&lt;init&gt;(CuratorZookeeperClient.java:46) at com.alibaba.dubbo.remoting.zookeeper.curator.CuratorZookeeperTransporter.connect(CuratorZookeeperTransporter.java:27) at com.alibaba.dubbo.remoting.zookeeper.ZookeeperTransporter$Adaptive.connect(ZookeeperTransporter$Adaptive.java) at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.&lt;init&gt;(ZookeeperRegistry.java:69) at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistryFactory.createRegistry(ZookeeperRegistryFactory.java:38) at com.alibaba.dubbo.registry.support.AbstractRegistryFactory.getRegistry(AbstractRegistryFactory.java:96) at com.alibaba.dubbo.registry.RegistryFactory$Adaptive.getRegistry(RegistryFactory$Adaptive.java) at com.alibaba.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:272) at com.alibaba.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:63) at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:106) at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:65) at com.alibaba.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java) at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:394) at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:333) at com.alibaba.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:163) at com.alibaba.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:66) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168) ... 112 common frames omitted Caused by: java.lang.ClassNotFoundException: org.apache.curator.framework.CuratorFrameworkFactory at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 129 common frames omitted Disconnected from the target VM, address: '127.0.0.1:58713', transport: 'socket' Process finished with exit code 1"><pre class="notranslate"><code class="notranslate">java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4f1bfe23: startup date [Mon Sep 10 19:19:24 CST 2018]; root of context hierarchy at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404) at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:961) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:968) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1033) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:555) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) at com.treefinance.saas.management.console.ConsoleServerApplication.main(ConsoleServerApplication.java:16) [10 九月 2018 19:19:32] [main] [DefaultSingletonBeanRegistry.java:581] [ERROR] Destroy method on bean with name 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory' threw an exception java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4f1bfe23: startup date [Mon Sep 10 19:19:24 CST 2018]; root of context hierarchy at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404) at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:961) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:968) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1033) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:555) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) at com.treefinance.saas.management.console.ConsoleServerApplication.main(ConsoleServerApplication.java:16) [10 九月 2018 19:19:32] [main] [SpringApplication.java:815] [ERROR] Application startup failed org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'methodValidationPostProcessor' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Unsatisfied dependency expressed through method 'methodValidationPostProcessor' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.spring.web.ShiroFilterFactoryBean]: Factory method 'shiroFilterFactoryBean' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.web.mgt.DefaultWebSecurityManager]: Factory method 'securityManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRealm' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.treefinance.saas.management.console.biz.common.shiro.UserRealm]: Factory method 'userRealm' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseServiceCredentialsMatcher': Unsatisfied dependency expressed through field 'iSecurityCryptoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:223) at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:702) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:527) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) at com.treefinance.saas.management.console.ConsoleServerApplication.main(ConsoleServerApplication.java:16) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.spring.web.ShiroFilterFactoryBean]: Factory method 'shiroFilterFactoryBean' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.web.mgt.DefaultWebSecurityManager]: Factory method 'securityManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRealm' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.treefinance.saas.management.console.biz.common.shiro.UserRealm]: Factory method 'userRealm' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseServiceCredentialsMatcher': Unsatisfied dependency expressed through field 'iSecurityCryptoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getSingletonFactoryBeanForTypeCheck(AbstractAutowireCapableBeanFactory.java:923) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:804) at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:558) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:432) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:395) at org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:220) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1260) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1101) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ... 19 common frames omitted Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.spring.web.ShiroFilterFactoryBean]: Factory method 'shiroFilterFactoryBean' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.web.mgt.DefaultWebSecurityManager]: Factory method 'securityManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRealm' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.treefinance.saas.management.console.biz.common.shiro.UserRealm]: Factory method 'userRealm' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseServiceCredentialsMatcher': Unsatisfied dependency expressed through field 'iSecurityCryptoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ... 32 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.web.mgt.DefaultWebSecurityManager]: Factory method 'securityManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRealm' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.treefinance.saas.management.console.biz.common.shiro.UserRealm]: Factory method 'userRealm' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseServiceCredentialsMatcher': Unsatisfied dependency expressed through field 'iSecurityCryptoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.obtainBeanInstanceFromFactory(ConfigurationClassEnhancer.java:389) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.securityManager(&lt;generated&gt;) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration.shiroFilterFactoryBean(ShiroConfiguration.java:112) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.CGLIB$shiroFilterFactoryBean$9(&lt;generated&gt;) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7$$FastClassBySpringCGLIB$$ef6b35b4.invoke(&lt;generated&gt;) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.shiroFilterFactoryBean(&lt;generated&gt;) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ... 33 common frames omitted Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.web.mgt.DefaultWebSecurityManager]: Factory method 'securityManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRealm' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.treefinance.saas.management.console.biz.common.shiro.UserRealm]: Factory method 'userRealm' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseServiceCredentialsMatcher': Unsatisfied dependency expressed through field 'iSecurityCryptoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ... 55 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRealm' defined in class path resource [com/treefinance/saas/management/console/biz/common/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.treefinance.saas.management.console.biz.common.shiro.UserRealm]: Factory method 'userRealm' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseServiceCredentialsMatcher': Unsatisfied dependency expressed through field 'iSecurityCryptoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.obtainBeanInstanceFromFactory(ConfigurationClassEnhancer.java:389) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.userRealm(&lt;generated&gt;) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration.securityManager(ShiroConfiguration.java:92) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.CGLIB$securityManager$0(&lt;generated&gt;) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7$$FastClassBySpringCGLIB$$ef6b35b4.invoke(&lt;generated&gt;) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.securityManager(&lt;generated&gt;) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ... 56 common frames omitted Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.treefinance.saas.management.console.biz.common.shiro.UserRealm]: Factory method 'userRealm' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseServiceCredentialsMatcher': Unsatisfied dependency expressed through field 'iSecurityCryptoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ... 78 common frames omitted Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseServiceCredentialsMatcher': Unsatisfied dependency expressed through field 'iSecurityCryptoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264) 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:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.obtainBeanInstanceFromFactory(ConfigurationClassEnhancer.java:389) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.baseServiceCredentialsMatcher(&lt;generated&gt;) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration.userRealm(ShiroConfiguration.java:65) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.CGLIB$userRealm$5(&lt;generated&gt;) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7$$FastClassBySpringCGLIB$$ef6b35b4.invoke(&lt;generated&gt;) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) at com.treefinance.saas.management.console.biz.common.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$121022e7.userRealm(&lt;generated&gt;) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ... 79 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iSecurityCryptoService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1634) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1309) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1275) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1101) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585) ... 102 common frames omitted Caused by: java.lang.NoClassDefFoundError: org/apache/curator/framework/CuratorFrameworkFactory at com.alibaba.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.&lt;init&gt;(CuratorZookeeperClient.java:46) at com.alibaba.dubbo.remoting.zookeeper.curator.CuratorZookeeperTransporter.connect(CuratorZookeeperTransporter.java:27) at com.alibaba.dubbo.remoting.zookeeper.ZookeeperTransporter$Adaptive.connect(ZookeeperTransporter$Adaptive.java) at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.&lt;init&gt;(ZookeeperRegistry.java:69) at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistryFactory.createRegistry(ZookeeperRegistryFactory.java:38) at com.alibaba.dubbo.registry.support.AbstractRegistryFactory.getRegistry(AbstractRegistryFactory.java:96) at com.alibaba.dubbo.registry.RegistryFactory$Adaptive.getRegistry(RegistryFactory$Adaptive.java) at com.alibaba.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:272) at com.alibaba.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:63) at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:106) at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:65) at com.alibaba.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java) at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:394) at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:333) at com.alibaba.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:163) at com.alibaba.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:66) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168) ... 112 common frames omitted Caused by: java.lang.ClassNotFoundException: org.apache.curator.framework.CuratorFrameworkFactory at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 129 common frames omitted Disconnected from the target VM, address: '127.0.0.1:58713', transport: 'socket' Process finished with exit code 1 </code></pre></div> <p dir="auto">this exception is gone after adding required maven dependencies</p> <div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;dependency&gt; &lt;groupId&gt;org.apache.curator&lt;/groupId&gt; &lt;artifactId&gt;curator-framework&lt;/artifactId&gt; &lt;version&gt;4.0.1&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.curator&lt;/groupId&gt; &lt;artifactId&gt;curator-client&lt;/artifactId&gt; &lt;version&gt;4.0.1&lt;/version&gt; &lt;/dependency&gt;"><pre class="notranslate">&lt;<span class="pl-ent">dependency</span>&gt; &lt;<span class="pl-ent">groupId</span>&gt;org.apache.curator&lt;/<span class="pl-ent">groupId</span>&gt; &lt;<span class="pl-ent">artifactId</span>&gt;curator-framework&lt;/<span class="pl-ent">artifactId</span>&gt; &lt;<span class="pl-ent">version</span>&gt;4.0.1&lt;/<span class="pl-ent">version</span>&gt; &lt;/<span class="pl-ent">dependency</span>&gt; &lt;<span class="pl-ent">dependency</span>&gt; &lt;<span class="pl-ent">groupId</span>&gt;org.apache.curator&lt;/<span class="pl-ent">groupId</span>&gt; &lt;<span class="pl-ent">artifactId</span>&gt;curator-client&lt;/<span class="pl-ent">artifactId</span>&gt; &lt;<span class="pl-ent">version</span>&gt;4.0.1&lt;/<span class="pl-ent">version</span>&gt; &lt;/<span class="pl-ent">dependency</span>&gt;</pre></div> <p dir="auto">So, if we want to use dubbo:2.6.2 ,this two dependencies must be added?<br> and why not add dependency in dubbo pom file?</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/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.0</li> <li>Operating System version: mac</li> <li>Java version: 1.8</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &lt;module name=&quot;CustomImportOrder&quot;&gt; &lt;property name=&quot;specialImportsRegExp&quot; value=&quot;org.apache.dubbo.*&quot;/&gt; &lt;property name=&quot;sortImportsInGroupAlphabetically&quot; value=&quot;false&quot;/&gt; &lt;property name=&quot;customImportOrderRules&quot; value=&quot;SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE###STATIC&quot;/&gt; &lt;/module&gt;"><pre class="notranslate"><code class="notranslate"> &lt;module name="CustomImportOrder"&gt; &lt;property name="specialImportsRegExp" value="org.apache.dubbo.*"/&gt; &lt;property name="sortImportsInGroupAlphabetically" value="false"/&gt; &lt;property name="customImportOrderRules" value="SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE###STATIC"/&gt; &lt;/module&gt; </code></pre></div> <p dir="auto">should be removed from <code class="notranslate">checkstyle.xml</code> ?</p> <ol dir="auto"> <li>The original checkstyle automatically adjusts the import order.</li> <li>This rule is very easy to cause ci to fail, development experience is not good.</li> <li>Most importantly, is it meaningful to limit the import order?</li> </ol>
0
<p dir="auto">Operating System: Ubuntu 14.04.4<br> CUDA version: 7.5<br> cuNN: 4.0.7</p> <p dir="auto">Installed from sources:<br> commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/5681406e2874a02835d34be579810a93ad74a473/hovercard" href="https://github.com/tensorflow/tensorflow/commit/5681406e2874a02835d34be579810a93ad74a473"><tt>5681406</tt></a></p> <p dir="auto">running : bazel build -c opt //tensorflow/cc:tutorials_example_trainer --verbose_failures --genrule_strategy=standalone --spawn_strategy=standalone</p> <p dir="auto">Note : that i have configured my WORKSPACE file as per : <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="117675319" data-permission-text="Title is private" data-url="https://github.com/bazelbuild/bazel/issues/623" data-hovercard-type="issue" data-hovercard-url="/bazelbuild/bazel/issues/623/hovercard?comment_id=158151936&amp;comment_type=issue_comment" href="https://github.com/bazelbuild/bazel/issues/623#issuecomment-158151936">bazelbuild/bazel#623 (comment)</a>:</p> <p dir="auto">(made the following corrections:)<br> download jpeg.BUILD.txt, png.BUILD.txt, and WORKSPACE.txt from <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/srsaharoy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/srsaharoy">@srsaharoy</a> 's message <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="123925935" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/623" data-hovercard-type="pull_request" data-hovercard-url="/tensorflow/tensorflow/pull/623/hovercard" href="https://github.com/tensorflow/tensorflow/pull/623">#623</a> (comment) . (the 2nd post with attachments) and place these files in the tensorflow lib without the .txt extension instead of the existing files (in my case ~/git/tensorflow/tensorflow).<br> create folder with external source files: ~/git/tensorflow/fix/files/re2 ~/git/tensorflow/fix/files/jpeg-9a/jpeg-9a ~/git/tensorflow/fix/files/gemmlowp ~/git/tensorflow/fix/files/libpng-1.2.53/libpng-1.2.53 ~/git/tensorflow/fix/files/six-1.10.0 Note the dir-in-dir for jpeg-9a and libpng-1.2.53. This is necessary.<br> change paths in WORKSPACE file to match the location of the aux source files<br> ....</p> <p dir="auto">Now I am just stuck with the following error:</p> <p dir="auto">ERROR: /home/julialintern/tensorflow/tensorflow/core/BUILD:756:1: C++ compilation of rule '//tensorflow/core:lib_internal' failed: gcc failed: error executing command<br> (cd /home/julialintern/.cache/bazel/<em>bazel_julialintern/1a7b4f00b1b7d4c4a3ca618f554c7ad8/tensorflow &amp;&amp; <br> exec env - <br> PATH=/home/julialintern/torch/install/bin:/home/julialintern/bin:/usr/local/cuda/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/julialintern/bin <br> TMPDIR=/tmp/user/1001 <br> /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections -g0 '-std=c++0x' -iquote . -iquote bazel-out/host/genfiles -iquote external/bazel_tools -iquote bazel-out/host/genfiles/external/bazel_tools -iquote external/jpeg_archive -iquote bazel-out/host/genfiles/external/jpeg_archive -iquote external/png_archive -iquote bazel-out/host/genfiles/external/png_archive -iquote external/re2 -iquote bazel-out/host/genfiles/external/re2 -iquote external/eigen_archive -iquote bazel-out/host/genfiles/external/eigen_archive -isystem google/protobuf/src -isystem bazel-out/host/genfiles/google/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/host/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/host/genfiles/external/png_archive/libpng-1.2.53 -isystem third_party/eigen3 -isystem bazel-out/host/genfiles/third_party/eigen3 -isystem external/eigen_archive/eigen-eigen-50812b426b7c -isystem bazel-out/host/genfiles/external/eigen_archive/eigen-eigen-50812b426b7c -fno-exceptions -DEIGEN_AVOID_STL_ARRAY -DTENSORFLOW_USE_EIGEN_THREADPOOL -pthread -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE</em>_="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/host/bin/tensorflow/core/_objs/lib_internal/tensorflow/core/lib/core/threadpool.o' -MD -MF bazel-out/host/bin/tensorflow/core/_objs/lib_internal/tensorflow/core/lib/core/threadpool.d -c tensorflow/core/lib/core/threadpool.cc -o bazel-out/host/bin/tensorflow/core/_objs/lib_internal/tensorflow/core/lib/core/threadpool.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.<br> tensorflow/core/lib/core/threadpool.cc:83:49: error: expected template-name before '&lt;' token<br> struct ThreadPool::Impl : Eigen::ThreadPoolTempl {<br> ^<br> tensorflow/core/lib/core/threadpool.cc:83:49: error: expected '{' before '&lt;' token<br> tensorflow/core/lib/core/threadpool.cc:83:49: error: expected unqualified-id before '&lt;' token<br> tensorflow/core/lib/core/threadpool.cc:221:1: error: expected '}' at end of input<br> } // namespace tensorflow<br> ^<br> tensorflow/core/lib/core/threadpool.cc:221:1: error: expected '}' at end of input<br> Target //tensorflow/cc:tutorials_example_trainer failed to build</p>
<p dir="auto">Hi,<br> I try to build tensorflow from source, but I get the ERROR as following:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: /WORK/sysu_sc_ll/tf-rh/tensorflow-/tensorflow/core/BUILD:766:1: C++ compilation of rule '//tensorflow/core:lib_internal' failed: gcc failed: error executing command /HOME/sysu_sc_ll/WORKSPACE/tf-rh/bazel-/hackbin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/HOME/sysu_sc_ll/WORKSPACE/tf-rh/bazel-/hackbin -B/usr/bin ... (remaining 78 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. tensorflow/core/lib/core/threadpool.cc:82:49: error: expected template-name before '&lt;' token struct ThreadPool::Impl : Eigen::ThreadPoolTempl&lt;EigenEnvironment&gt; { ^ tensorflow/core/lib/core/threadpool.cc:82:49: error: expected '{' before '&lt;' token tensorflow/core/lib/core/threadpool.cc:82:49: error: expected unqualified-id before '&lt;' token tensorflow/core/lib/core/threadpool.cc:220:1: error: expected '}' at end of input } // namespace tensorflow ^ tensorflow/core/lib/core/threadpool.cc:220:1: error: expected '}' at end of input Target //tensorflow/tools/pip_package:build_pip_package failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 12.663s, Critical Path: 10.84s "><pre class="notranslate"><code class="notranslate">ERROR: /WORK/sysu_sc_ll/tf-rh/tensorflow-/tensorflow/core/BUILD:766:1: C++ compilation of rule '//tensorflow/core:lib_internal' failed: gcc failed: error executing command /HOME/sysu_sc_ll/WORKSPACE/tf-rh/bazel-/hackbin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/HOME/sysu_sc_ll/WORKSPACE/tf-rh/bazel-/hackbin -B/usr/bin ... (remaining 78 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. tensorflow/core/lib/core/threadpool.cc:82:49: error: expected template-name before '&lt;' token struct ThreadPool::Impl : Eigen::ThreadPoolTempl&lt;EigenEnvironment&gt; { ^ tensorflow/core/lib/core/threadpool.cc:82:49: error: expected '{' before '&lt;' token tensorflow/core/lib/core/threadpool.cc:82:49: error: expected unqualified-id before '&lt;' token tensorflow/core/lib/core/threadpool.cc:220:1: error: expected '}' at end of input } // namespace tensorflow ^ tensorflow/core/lib/core/threadpool.cc:220:1: error: expected '}' at end of input Target //tensorflow/tools/pip_package:build_pip_package failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 12.663s, Critical Path: 10.84s </code></pre></div> <p dir="auto">OS: redhat 6.7<br> gcc: 4.9.2<br> building with cuda</p> <p dir="auto">run command:<br> export EXTRA_BAZEL_ARGS='-s --verbose_failures --ignore_unsupported_sandboxing --genrule_strategy=standalone --spawn_strategy=standalone --jobs 8'<br> bazel build -c opt //tensorflow/tools/pip_package:build_pip_package</p> <p dir="auto">I did not change any source file,<br> And previously, the is another error in the source tensorflow/core/lib/io/record_reader.cc<br> which claim that the SIZE_MAX is not defined, I solve it by define it as size_t -1. And now this error show up.</p> <p dir="auto">Could anyone give me some help here? Thanks.</p>
1
<p dir="auto">Hi, I would like to see that pytorch could offer an element-wise production for Sparse * Dense -&gt; Dense.</p> <p dir="auto">for now, I need to convert Dense to Sparse then convert the result to Dense again.</p> <p dir="auto">BTW, as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="261349194" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/2886" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/2886/hovercard" href="https://github.com/pytorch/pytorch/issues/2886">#2886</a> mentioned, the Sparse function was missing. does that intentional or bug?</p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vincentqb/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vincentqb">@vincentqb</a></p>
<p dir="auto">Hi, thanks again for the great work.</p> <p dir="auto">I would like to raise an issue to discussion how to implement the following features:<br> Dense[m,1] * Sparse[m,n] -&gt; Sparse[m,n]<br> Sparse[m,n] * Dense[1,n] -&gt; Sparse[m,n]<br> Sparse[m*n] * Dense[b,1,n] -&gt; Sparse[b,m,n]</p> <p dir="auto">these features are fully supported by the <a href="https://developer.nvidia.com/cusparse" rel="nofollow">cuSPARSE Level 3</a>, as for the CPU side, I'm not quite sure weather MKL was satisfied.</p> <p dir="auto">I would like to help on the implementation if needed, could anyone give me a brief guideline that what have be done and what still need to be do?</p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ezyang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ezyang">@ezyang</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gchanan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gchanan">@gchanan</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zou3519/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zou3519">@zou3519</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bdhirsh/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bdhirsh">@bdhirsh</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jbschlosser/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jbschlosser">@jbschlosser</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/aocsa/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/aocsa">@aocsa</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nikitaved/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nikitaved">@nikitaved</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pearu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pearu">@pearu</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mruberry/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mruberry">@mruberry</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vincentqb/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vincentqb">@vincentqb</a></p>
1
<h4 dir="auto">Describe the bug</h4> <p dir="auto">When making a request to the server that generates a non 2xx status code, in node the <code class="notranslate">response.data</code> field is populated with the returned error message, in the browser, the field is consistently null for all requests (so far only tested with 4xx status codes)</p> <h4 dir="auto">To Reproduce</h4> <p dir="auto">Using axios version 0.21.1</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function testSearch_error2(client: AxiosInstance) { client.get(&quot;/api/archive/search&quot;, {params: {start: &quot;2020-01-25&quot;, long: -33.8523, lat: 151.2108}}) .then((resp) =&gt; { if (!Array.isArray(resp.data)) { return Promise.reject(&quot;response was not an array of results&quot;); } return resp.data as SearchResult[]; }) .catch(handleError); } function handleError(e: AxiosError): Promise&lt;never&gt; { if (!(e?.response?.data)) { console.dir(e); } return Promise.reject(e?.response?.data || e); }"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">testSearch_error2</span><span class="pl-kos">(</span><span class="pl-s1">client</span>: <span class="pl-v">AxiosInstance</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">client</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">"/api/archive/search"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-c1">params</span>: <span class="pl-kos">{</span><span class="pl-c1">start</span>: <span class="pl-s">"2020-01-25"</span><span class="pl-kos">,</span> <span class="pl-c1">long</span>: <span class="pl-c1">-</span><span class="pl-c1">33.8523</span><span class="pl-kos">,</span> <span class="pl-c1">lat</span>: <span class="pl-c1">151.2108</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">then</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">resp</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-c1">!</span><span class="pl-v">Array</span><span class="pl-kos">.</span><span class="pl-en">isArray</span><span class="pl-kos">(</span><span class="pl-s1">resp</span><span class="pl-kos">.</span><span class="pl-c1">data</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-v">Promise</span><span class="pl-kos">.</span><span class="pl-en">reject</span><span class="pl-kos">(</span><span class="pl-s">"response was not an array of results"</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">resp</span><span class="pl-kos">.</span><span class="pl-c1">data</span> <span class="pl-s1">as</span> <span class="pl-v">SearchResult</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-kos">.</span><span class="pl-en">catch</span><span class="pl-kos">(</span><span class="pl-s1">handleError</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">function</span> <span class="pl-en">handleError</span><span class="pl-kos">(</span><span class="pl-s1">e</span>: <span class="pl-v">AxiosError</span><span class="pl-kos">)</span>: <span class="pl-v">Promise</span><span class="pl-c1">&lt;</span><span class="pl-s1">never</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-c1">!</span><span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">?.</span><span class="pl-c1">response</span><span class="pl-kos">?.</span><span class="pl-c1">data</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">dir</span><span class="pl-kos">(</span><span class="pl-s1">e</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-v">Promise</span><span class="pl-kos">.</span><span class="pl-en">reject</span><span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">?.</span><span class="pl-c1">response</span><span class="pl-kos">?.</span><span class="pl-c1">data</span> <span class="pl-c1">||</span> <span class="pl-s1">e</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">This searches a geospatial testing API, it will return a 401 error as the lat and long have been swapped and are out of range as a result.<br> The server returns plain strings as the response to a 400 error explaining the issue</p> <p dir="auto">Normally the result is passed out to the caller, and <code class="notranslate">handleError</code> ensures we pass out the specific error from the server, and falls back to the axios error if its something more complicated.</p> <p dir="auto">As mentioned, this behaves as expected when run in node, but when the same code is bundled for the browser, it always returns the axios error.</p> <p dir="auto">Using the <code class="notranslate">console.dir</code> call added while diagnosing this, I find that the <code class="notranslate">response</code> field is populated with the response details as I would expect. However, the <code class="notranslate">data</code> field is always null.<br> Inspecting the request in the network tab of the browser (mostly chrome in testing) shows the response, and its body is present, so I know this isn't the server failing to send a body with the response.</p> <h4 dir="auto">Expected behaviour</h4> <p dir="auto">the <code class="notranslate">response.data</code> field to be populated with the body of the response</p> <p dir="auto">given some <a href="https://stackoverflow.com/questions/45417837/react-native-axios-method-post-response-data-null?r=SearchResults&amp;s=1%7C89.3093" rel="nofollow">similar issues in react-native</a> on <a href="https://stackoverflow.com/questions/59190115/react-native-axios-method-get-response-data-shows-null?r=SearchResults&amp;s=2%7C65.1607" rel="nofollow">stack overflow</a> could this potentially be an inconsistency in the library when building for the browser v node?</p> <h4 dir="auto">Environment</h4> <ul dir="auto"> <li>Axios Version 0.21.1</li> <li>Adapter XHR</li> <li>Browser Chrome</li> <li>Browser Version 87.0.4280.141</li> <li>Node.js Version v10.16.0 (on an old laptop, this has reminded me to update</li> <li>OS: Windows 10.0.19042 Build 19042</li> <li>Additional Library Versions TypeScript 4.1.3, (webpack 5.15.0 and ts-loader 8.0.14 if relevant)</li> </ul> <h4 dir="auto">Additional context/Screenshots</h4> <p dir="auto">Here you can see the <code class="notranslate">response.data</code> field being null<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/14145969/105652830-60042f80-5f0e-11eb-96bb-819da7091a00.png"><img src="https://user-images.githubusercontent.com/14145969/105652830-60042f80-5f0e-11eb-96bb-819da7091a00.png" alt="2021-01-25 (3)" style="max-width: 100%;"></a></p> <p dir="auto">The relevant network tab entry<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/14145969/105652842-65fa1080-5f0e-11eb-9683-2ef6e1fb165d.png"><img src="https://user-images.githubusercontent.com/14145969/105652842-65fa1080-5f0e-11eb-9683-2ef6e1fb165d.png" alt="2021-01-25 (2)" style="max-width: 100%;"></a></p> <p dir="auto">The network tabs response<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/14145969/105652846-698d9780-5f0e-11eb-8045-d411b624053d.png"><img src="https://user-images.githubusercontent.com/14145969/105652846-698d9780-5f0e-11eb-8045-d411b624053d.png" alt="2021-01-25 (1)" style="max-width: 100%;"></a></p>
<p dir="auto">Seems to be because the config created by create is not being merged correctly</p> <h3 dir="auto">Describe the bug</h3> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="F {message: 'options must be an object', name: 'AxiosError', code: 'ERR_BAD_OPTION_VALUE', stack: 'AxiosError: options must be an object\n at Objec…le:///Users/chenkai/Desktop/test/index.html:21:28'} code : &quot;ERR_BAD_OPTION_VALUE&quot; message : &quot;options must be an object&quot; name : &quot;AxiosError&quot; stack : &quot;AxiosError: options must be an object\n at Object.Je [as assertOptions] (https://esm.sh/v96/axios@1.1.3/es2022/axios.js:3:10223)\n at B.request (https://esm.sh/v96/axios@1.1.3/es2022/axios.js:3:10983)\n at B.&lt;computed&gt; [as get] (https://esm.sh/v96/axios@1.1.3/es2022/axios.js:3:12121)\n at Function.get (https://esm.sh/v96/axios@1.1.3/es2022/axios.js:2:148)\n at file:///Users/chenkai/Desktop/test/index.html:21:28&quot; [[Prototype]] : Error"><pre class="notranslate"><span class="pl-v">F</span> <span class="pl-kos">{</span><span class="pl-c1">message</span>: <span class="pl-s">'options must be an object'</span><span class="pl-kos">,</span> <span class="pl-c1">name</span>: <span class="pl-s">'AxiosError'</span><span class="pl-kos">,</span> <span class="pl-c1">code</span>: <span class="pl-s">'ERR_BAD_OPTION_VALUE'</span><span class="pl-kos">,</span> <span class="pl-c1">stack</span>: <span class="pl-s">'AxiosError: options must be an object\n at Objec…le:///Users/chenkai/Desktop/test/index.html:21:28'</span><span class="pl-kos">}</span> code : <span class="pl-s">"ERR_BAD_OPTION_VALUE"</span> message : <span class="pl-s">"options must be an object"</span> name : <span class="pl-s">"AxiosError"</span> stack : <span class="pl-s">"AxiosError: options must be an object\n at Object.Je [as assertOptions] (https://esm.sh/v96/axios@1.1.3/es2022/axios.js:3:10223)\n at B.request (https://esm.sh/v96/axios@1.1.3/es2022/axios.js:3:10983)\n at B.&lt;computed&gt; [as get] (https://esm.sh/v96/axios@1.1.3/es2022/axios.js:3:12121)\n at Function.get (https://esm.sh/v96/axios@1.1.3/es2022/axios.js:2:148)\n at file:///Users/chenkai/Desktop/test/index.html:21:28"</span> <span class="pl-kos">[</span><span class="pl-kos">[</span><span class="pl-v">Prototype</span><span class="pl-kos">]</span><span class="pl-kos">]</span> : <span class="pl-v">Error</span></pre></div> <h3 dir="auto">To Reproduce</h3> <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 lang=&quot;en&quot;&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;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt; &lt;title&gt;Document&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;/body&gt; &lt;script type=&quot;module&quot;&gt; import Axios from 'https://esm.sh/axios'; import Qs from 'https://esm.sh/qs@6.11.0'; const instance = Axios.create({ paramsSerializer(params) { return Qs.stringify(params, {arrayFormat: 'brackets'}) }, }); const res = await instance.get('https://jsonplaceholder.typicode.com/comments'); console.log(res); &lt;/script&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-c1">lang</span>="<span class="pl-s">en</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">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.0</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>Document<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">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">body</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">script</span> <span class="pl-c1">type</span>="<span class="pl-s">module</span>"<span class="pl-kos">&gt;</span> <span class="pl-k">import</span> <span class="pl-v">Axios</span> <span class="pl-k">from</span> <span class="pl-s">'https://esm.sh/axios'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-v">Qs</span> <span class="pl-k">from</span> <span class="pl-s">'https://esm.sh/qs@6.11.0'</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">instance</span> <span class="pl-c1">=</span> <span class="pl-v">Axios</span><span class="pl-kos">.</span><span class="pl-en">create</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-en">paramsSerializer</span><span class="pl-kos">(</span><span class="pl-s1">params</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-v">Qs</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-s1">params</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-c1">arrayFormat</span>: <span class="pl-s">'brackets'</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">const</span> <span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">instance</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">'https://jsonplaceholder.typicode.com/comments'</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">res</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">html</span><span class="pl-kos">&gt;</span></pre></div> <h3 dir="auto">Code snippet</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Expected behavior</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Axios Version</h3> <p dir="auto">v1.1.3</p> <h3 dir="auto">Adapter Version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Browser</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Browser Version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Node.js Version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">OS</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Additional Library Versions</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Additional context/Screenshots</h3> <p dir="auto"><em>No response</em></p>
0
<p dir="auto">When I add tooltip to button in buttons group then on hover button is growing a little. I've got it in table and it cause ugly effect. I include images, maybe that describe problem better.</p> <p dir="auto">Hover: <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/004346a6ba666c3fc4d4b1831b0621b8b53ceb3ce4d0ac118bd468fcaeea5437/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3239313633392f393439322f35306261626463302d343461642d313165322d393934632d3638333039653633316266632e706e67"><img src="https://camo.githubusercontent.com/004346a6ba666c3fc4d4b1831b0621b8b53ceb3ce4d0ac118bd468fcaeea5437/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3239313633392f393439322f35306261626463302d343461642d313165322d393934632d3638333039653633316266632e706e67" alt="hover" data-canonical-src="https://f.cloud.github.com/assets/291639/9492/50babdc0-44ad-11e2-994c-68309e631bfc.png" style="max-width: 100%;"></a><br> Normal: <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/a89507eccfdc79a531a5c9af054d3371aab760f50c9fa51a869bed70f9117d68/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3239313633392f393439312f35303638393738652d343461642d313165322d383163372d3238626436623162303435382e706e67"><img src="https://camo.githubusercontent.com/a89507eccfdc79a531a5c9af054d3371aab760f50c9fa51a869bed70f9117d68/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3239313633392f393439312f35303638393738652d343461642d313165322d383163372d3238626436623162303435382e706e67" alt="normal" data-canonical-src="https://f.cloud.github.com/assets/291639/9491/5068978e-44ad-11e2-81c7-28bd6b1b0458.png" style="max-width: 100%;"></a></p>
<p dir="auto"><a href="http://jsfiddle.net/JEBdk/5/" rel="nofollow">http://jsfiddle.net/JEBdk/5/</a></p> <p dir="auto">tooltip or popover on btn-group. the btn-group is not display correctly!<br> the last btn have not round corners and between the btn's is a space.</p> <p dir="auto">my suggestion, by generating the tip or popover on the end of document .</p>
1
<p dir="auto">So, I was reading the online documentation of MPL on colormaps, and noticed that there is an error in it.<br> In the section of <a href="https://matplotlib.org/3.1.1/tutorials/colors/colormap-manipulation.html#creating-listed-colormaps" rel="nofollow">"Creating listed colormaps"</a>, it mentions that the dynamic range of a colormap can be reduced by using:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="viridisBig = cm.get_cmap('viridis', 512) newcmp = ListedColormap(viridisBig(np.linspace(0.25, 0.75, 256))) plot_examples([viridis, newcmp])"><pre class="notranslate"><span class="pl-s1">viridisBig</span> <span class="pl-c1">=</span> <span class="pl-s1">cm</span>.<span class="pl-en">get_cmap</span>(<span class="pl-s">'viridis'</span>, <span class="pl-c1">512</span>) <span class="pl-s1">newcmp</span> <span class="pl-c1">=</span> <span class="pl-v">ListedColormap</span>(<span class="pl-en">viridisBig</span>(<span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0.25</span>, <span class="pl-c1">0.75</span>, <span class="pl-c1">256</span>))) <span class="pl-en">plot_examples</span>([<span class="pl-s1">viridis</span>, <span class="pl-s1">newcmp</span>])</pre></div> <p dir="auto">It also specifically mentions that this must be done in order to make sure that the new colormap does not have repeated values.</p> <p dir="auto">However, as <code class="notranslate">viridis</code> is a <code class="notranslate">ListedColormap</code> and <code class="notranslate">ListedColormap</code> objects do not allow for interpolation between values, both <code class="notranslate">viridisBig</code> and <code class="notranslate">newcmp</code> will have repeated values, despite the documentation specifically mentioning they do not.</p> <p dir="auto">This could be fixed by either changing the tutorial into:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="viridisRGB = viridis(np.linspace(0, 1, viridis.N)) viridisBig = LinearSegmentedColormap.from_list('viridisBig', viridisRGB, 512) newcmp = ListedColormap(viridisBig(np.linspace(0.25, 0.75, 256))) plot_examples([viridis, newcmp])"><pre class="notranslate"><span class="pl-s1">viridisRGB</span> <span class="pl-c1">=</span> <span class="pl-en">viridis</span>(<span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-s1">viridis</span>.<span class="pl-v">N</span>)) <span class="pl-s1">viridisBig</span> <span class="pl-c1">=</span> <span class="pl-v">LinearSegmentedColormap</span>.<span class="pl-en">from_list</span>(<span class="pl-s">'viridisBig'</span>, <span class="pl-s1">viridisRGB</span>, <span class="pl-c1">512</span>) <span class="pl-s1">newcmp</span> <span class="pl-c1">=</span> <span class="pl-v">ListedColormap</span>(<span class="pl-en">viridisBig</span>(<span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0.25</span>, <span class="pl-c1">0.75</span>, <span class="pl-c1">256</span>))) <span class="pl-en">plot_examples</span>([<span class="pl-s1">viridis</span>, <span class="pl-s1">newcmp</span>])</pre></div> <p dir="auto">as <code class="notranslate">LinearSegmentedColormap</code> objects do allow for interpolation when creating them, or obviously by making <code class="notranslate">ListedColormap</code> objects be able to perform interpolation.</p> <p dir="auto">I have however noticed that the interpolation messes up sometimes, especially at the ends of the colormap.<br> It might therefore be better to simply take the required part of the colormap when reducing the dynamic range, with something like:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="newcmp = ListedColormap(viridis(np.linspace(0.25, 0.75, viridis.N*(0.75-0.25)))) plot_examples([viridis, newcmp])"><pre class="notranslate"><span class="pl-s1">newcmp</span> <span class="pl-c1">=</span> <span class="pl-v">ListedColormap</span>(<span class="pl-en">viridis</span>(<span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0.25</span>, <span class="pl-c1">0.75</span>, <span class="pl-s1">viridis</span>.<span class="pl-v">N</span><span class="pl-c1">*</span>(<span class="pl-c1">0.75</span><span class="pl-c1">-</span><span class="pl-c1">0.25</span>)))) <span class="pl-en">plot_examples</span>([<span class="pl-s1">viridis</span>, <span class="pl-s1">newcmp</span>])</pre></div> <p dir="auto">This obviously also reduces the resolution of the colormap, so it is not a good solution, but works well enough on colormaps with 256 segments and a not too big reduction in dynamic range.</p>
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">I am updating a line plot. There is an event trigger that starts this updating. If the trigger came from the figure that contains the plot, everything is fine. However, if the trigger came from another figure, then weird results happen: the line that's been updated appears to leave its trace uncleared.</p> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt import numpy as np def onclick(event): for ii in np.linspace(0., np.pi, 100): y1 = y * np.sin(ii) line1.set_ydata(y1) ax.draw_artist(line1) line2.set_ydata(-y1) ax2.draw_artist(line2) ax2.set_ylim(y1.min(), y1.max()) fig.canvas.update() plt.pause(0.1) x = np.linspace(0., 2*np.pi, 100) y = np.sin(x) fig = plt.figure() ax = fig.add_subplot(1, 2, 1) line1 = ax.plot(x, y)[0] ax2 = fig.add_subplot(1, 2, 2) line2 = ax2.plot(x, y)[0] fig2 = plt.figure() cid = fig2.canvas.mpl_connect('button_press_event', onclick) # cid = fig.canvas.mpl_connect('button_press_event', onclick) plt.show()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">def</span> <span class="pl-en">onclick</span>(<span class="pl-s1">event</span>): <span class="pl-k">for</span> <span class="pl-s1">ii</span> <span class="pl-c1">in</span> <span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0.</span>, <span class="pl-s1">np</span>.<span class="pl-s1">pi</span>, <span class="pl-c1">100</span>): <span class="pl-s1">y1</span> <span class="pl-c1">=</span> <span class="pl-s1">y</span> <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-en">sin</span>(<span class="pl-s1">ii</span>) <span class="pl-s1">line1</span>.<span class="pl-en">set_ydata</span>(<span class="pl-s1">y1</span>) <span class="pl-s1">ax</span>.<span class="pl-en">draw_artist</span>(<span class="pl-s1">line1</span>) <span class="pl-s1">line2</span>.<span class="pl-en">set_ydata</span>(<span class="pl-c1">-</span><span class="pl-s1">y1</span>) <span class="pl-s1">ax2</span>.<span class="pl-en">draw_artist</span>(<span class="pl-s1">line2</span>) <span class="pl-s1">ax2</span>.<span class="pl-en">set_ylim</span>(<span class="pl-s1">y1</span>.<span class="pl-en">min</span>(), <span class="pl-s1">y1</span>.<span class="pl-en">max</span>()) <span class="pl-s1">fig</span>.<span class="pl-s1">canvas</span>.<span class="pl-en">update</span>() <span class="pl-s1">plt</span>.<span class="pl-en">pause</span>(<span class="pl-c1">0.1</span>) <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0.</span>, <span class="pl-c1">2</span><span class="pl-c1">*</span><span class="pl-s1">np</span>.<span class="pl-s1">pi</span>, <span class="pl-c1">100</span>) <span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">sin</span>(<span class="pl-s1">x</span>) <span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>() <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">fig</span>.<span class="pl-en">add_subplot</span>(<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">1</span>) <span class="pl-s1">line1</span> <span class="pl-c1">=</span> <span class="pl-s1">ax</span>.<span class="pl-en">plot</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>)[<span class="pl-c1">0</span>] <span class="pl-s1">ax2</span> <span class="pl-c1">=</span> <span class="pl-s1">fig</span>.<span class="pl-en">add_subplot</span>(<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">2</span>) <span class="pl-s1">line2</span> <span class="pl-c1">=</span> <span class="pl-s1">ax2</span>.<span class="pl-en">plot</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>)[<span class="pl-c1">0</span>] <span class="pl-s1">fig2</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>() <span class="pl-s1">cid</span> <span class="pl-c1">=</span> <span class="pl-s1">fig2</span>.<span class="pl-s1">canvas</span>.<span class="pl-en">mpl_connect</span>(<span class="pl-s">'button_press_event'</span>, <span class="pl-s1">onclick</span>) <span class="pl-c"># cid = fig.canvas.mpl_connect('button_press_event', onclick)</span> <span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div> <p dir="auto"><strong>Actual outcome</strong></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/25810085/34643295-d30d6034-f2d6-11e7-80ee-0855ad34a981.png"><img src="https://user-images.githubusercontent.com/25810085/34643295-d30d6034-f2d6-11e7-80ee-0855ad34a981.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto">Not the many curves saw in the above figure, just one curve being updated in each cycle. In the code snippet, if use</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cid = fig.canvas.mpl_connect('button_press_event', onclick)"><pre class="notranslate"><code class="notranslate">cid = fig.canvas.mpl_connect('button_press_event', onclick) </code></pre></div> <p dir="auto">then it works as intended.</p> <p dir="auto">Also note, if you resize the plot, or save it as figure, then all the residue curves will be gone.</p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating system: windows</li> <li>Matplotlib version: 2.0.0</li> <li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): Qt4Agg</li> <li>Python version: 2.7</li> <li>Jupyter version (if applicable):</li> <li>Other libraries:</li> </ul>
0
<p dir="auto">There are some constants in kubelet and kube-proxy that refers to the same thing. For example:<br> </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/kubernetes/kubernetes/blob/a57561b84dd436d92ae43805b63ac7bb23ae188c/pkg/kubelet/kubelet_network.go#L38">kubernetes/pkg/kubelet/kubelet_network.go</a> </p> <p class="mb-0 color-fg-muted"> Line 38 in <a data-pjax="true" class="commit-tease-sha" href="/kubernetes/kubernetes/commit/a57561b84dd436d92ae43805b63ac7bb23ae188c">a57561b</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="L38" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="38"></td> <td id="LC38" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">KubeMarkMasqChain</span> utiliptables.<span class="pl-smi">Chain</span> <span class="pl-c1">=</span> <span class="pl-s">"KUBE-MARK-MASQ"</span> </td> </tr> </tbody></table> </div> </div> <br> <div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/kubernetes/kubernetes/blob/65f3fa9caf79a5cae49ff893695c58ca63863ad1/pkg/proxy/iptables/proxier.go#L71">kubernetes/pkg/proxy/iptables/proxier.go</a> </p> <p class="mb-0 color-fg-muted"> Line 71 in <a data-pjax="true" class="commit-tease-sha" href="/kubernetes/kubernetes/commit/65f3fa9caf79a5cae49ff893695c58ca63863ad1">65f3fa9</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="L71" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="71"></td> <td id="LC71" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">KubeMarkMasqChain</span> utiliptables.<span class="pl-smi">Chain</span> <span class="pl-c1">=</span> <span class="pl-s">"KUBE-MARK-MASQ"</span> </td> </tr> </tbody></table> </div> </div> <br> <div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/kubernetes/kubernetes/blob/57604d13cd7e9985e520511efc5b3b3b3dd62000/pkg/kubelet/network/hostport/hostport.go#L284">kubernetes/pkg/kubelet/network/hostport/hostport.go</a> </p> <p class="mb-0 color-fg-muted"> Line 284 in <a data-pjax="true" class="commit-tease-sha" href="/kubernetes/kubernetes/commit/57604d13cd7e9985e520511efc5b3b3b3dd62000">57604d1</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="L284" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="284"></td> <td id="LC284" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">"-s"</span>, <span class="pl-s1">target</span>.<span class="pl-c1">podIP</span>, <span class="pl-s">"-j"</span>, <span class="pl-en">string</span>(<span class="pl-s1">iptablesproxy</span>.<span class="pl-c1">KubeMarkMasqChain</span>), </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">There must be other cases like this. Propose to have a package to store constants used by multiple components in one place.</p>
<p dir="auto">After setting up a few services, I noticed the following output in <code class="notranslate">get events</code>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Tue, 14 Jul 2015 18:04:43 -0700 Wed, 15 Jul 2015 11:26:22 -0700 3544 my-nginx Service creating loadbalancer failed {service-controller } failed to create external load balancer for service default/my-nginx: error listing AWS subnets: RequestLimitExceeded: Request limit exceeded. status code: 503, request id: [] Tue, 14 Jul 2015 18:04:44 -0700 Wed, 15 Jul 2015 11:26:22 -0700 2679 my-nginx Service creating loadbalancer failed {service-controller } failed to create external load balancer for service default/my-nginx: error listing AWS security groups: RequestLimitExceeded: Request limit exceeded. status code: 503, request id: [] Tue, 14 Jul 2015 18:04:08 -0700 Wed, 15 Jul 2015 11:26:31 -0700 4926 my-nginx Service creating loadbalancer failed {service-controller } failed to create external load balancer for service default/my-nginx: error listing AWS VPCs: RequestLimitExceeded: Request limit exceeded. status code: 503, request id: [] Tue, 14 Jul 2015 18:01:05 -0700 Wed, 15 Jul 2015 11:26:39 -0700 67946 my-nginx Service creating loadbalancer failed {service-controller } failed to create external load balancer for service default/my-nginx: error listing AWS instances: RequestLimitExceeded: Request limit exceeded. status code: 503, request id: [] Tue, 14 Jul 2015 15:55:48 -0700 Wed, 15 Jul 2015 11:26:42 -0700 25049 my-nginx Service creating loadbalancer failed {service-controller } failed to create external load balancer for service default/my-nginx: InvalidGroup.Duplicate: The security group 'k8s-elb-a744c2a772a7b11e593680276d36fbdd' already exists for VPC 'vpc-f661fa93' status code: 400, request id: []"><pre class="notranslate"><code class="notranslate">Tue, 14 Jul 2015 18:04:43 -0700 Wed, 15 Jul 2015 11:26:22 -0700 3544 my-nginx Service creating loadbalancer failed {service-controller } failed to create external load balancer for service default/my-nginx: error listing AWS subnets: RequestLimitExceeded: Request limit exceeded. status code: 503, request id: [] Tue, 14 Jul 2015 18:04:44 -0700 Wed, 15 Jul 2015 11:26:22 -0700 2679 my-nginx Service creating loadbalancer failed {service-controller } failed to create external load balancer for service default/my-nginx: error listing AWS security groups: RequestLimitExceeded: Request limit exceeded. status code: 503, request id: [] Tue, 14 Jul 2015 18:04:08 -0700 Wed, 15 Jul 2015 11:26:31 -0700 4926 my-nginx Service creating loadbalancer failed {service-controller } failed to create external load balancer for service default/my-nginx: error listing AWS VPCs: RequestLimitExceeded: Request limit exceeded. status code: 503, request id: [] Tue, 14 Jul 2015 18:01:05 -0700 Wed, 15 Jul 2015 11:26:39 -0700 67946 my-nginx Service creating loadbalancer failed {service-controller } failed to create external load balancer for service default/my-nginx: error listing AWS instances: RequestLimitExceeded: Request limit exceeded. status code: 503, request id: [] Tue, 14 Jul 2015 15:55:48 -0700 Wed, 15 Jul 2015 11:26:42 -0700 25049 my-nginx Service creating loadbalancer failed {service-controller } failed to create external load balancer for service default/my-nginx: InvalidGroup.Duplicate: The security group 'k8s-elb-a744c2a772a7b11e593680276d36fbdd' already exists for VPC 'vpc-f661fa93' status code: 400, request id: [] </code></pre></div> <p dir="auto">I assume the service tried to configure an ELB in the past (not sure when or how or what details it tried to use) and has kept trying and now can't even use the AWS API.</p> <p dir="auto">How can I either:</p> <ol dir="auto"> <li>tell it to please stop so that I can use my AWS account again</li> <li>fix it so that it does configure the ELB</li> </ol> <p dir="auto">/cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/justinsb/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/justinsb">@justinsb</a></p>
0
<p dir="auto">In requests-2.18.1 and earlier:</p> <p dir="auto"><code class="notranslate">requests.get('https://testssl-expire-r2i2.disig.sk/index.en.html')</code></p> <p dir="auto">Used to raise <code class="notranslate">SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",)</code></p> <p dir="auto">But as of requests-2.18.2 (the latest version), the same URL is returning <code class="notranslate">ConnectionError: HTTPSConnectionPool(host='testssl-expire-r2i2.disig.sk', port=443): Max retries exceeded with url: /index.en.html (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))</code></p> <p dir="auto">I just need a confirmation that this change is intentional and if it is going to remain so (or not).</p> <p dir="auto">Thanks.</p>
<p dir="auto">I'm floating this idea because currently our native <code class="notranslate">ssl</code> module support isn't being utilized by any requests users and I'm planning on making major improvements to SNI within native <code class="notranslate">ssl</code> support in urllib3 including leaning on the stdlib for hostname verification. What are the thoughts on only using pyOpenSSL when <code class="notranslate">urllib3.util.HAS_SNI</code> is false?</p>
1
<h2 dir="auto">Environment:</h2> <ul dir="auto"> <li>macOS 11.0.1 Big Sur, on an Apple Silicon (M1) chip</li> <li>Safari 14.0.1</li> <li>React 17.0.1</li> <li>React DevTools 4.10.1, running in standalone mode via Electron 11.1.0 (darwin-arm64 build)</li> <li>New project using create-react-app . with the useScript hook to add the &lt;script&gt; tag required by React DevTools.</li> </ul> <h2 dir="auto">Steps to reproduce</h2> <ol dir="auto"> <li>Install <code class="notranslate">react-devtools</code> using <code class="notranslate">npm install --save-dev react-devtools</code>.</li> <li>A &lt;script&gt; for the React DevTools is added in App.js. Start the DevTools in standalone mode</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./node_modules/react-devtools/bin.js"><pre class="notranslate"><code class="notranslate">./node_modules/react-devtools/bin.js </code></pre></div> <ol start="3" dir="auto"> <li>Start the React app's development server:</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="yarn start"><pre class="notranslate"><code class="notranslate">yarn start </code></pre></div> <p dir="auto">Refresh the React app if needed to establish a connection with the DevTools. The <em>Components</em> view is blank (no matter what filters are applied):</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer" href="https://github.com/mglukhovsky/react-devtools-components-blank/blob/master/blank-components-react-devtools.gif?raw=true"><img src="https://github.com/mglukhovsky/react-devtools-components-blank/blob/master/blank-components-react-devtools.gif?raw=true" alt="" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto">Link to code example: <a href="https://github.com/mglukhovsky/react-devtools-components-blank">mglukhovsky/react-devtools-components-blank</a></p> <h2 dir="auto">The current behavior</h2> <p dir="auto">Components view is blank; the React DevTools component seems to register the app but nothing further.</p> <h2 dir="auto">The expected behavior</h2> <p dir="auto">Full component tree and a working integration between Safari and standalone DevTools.</p>
<p dir="auto">React version: 16.8.0</p> <h2 dir="auto">Steps To Reproduce</h2> <p dir="auto">Install react 16.8.0</p> <ol dir="auto"> <li>Build a hello world with any component</li> <li>Open React Dev Tools.</li> <li>Choose components tab.</li> <li>Nothing will be seen.</li> </ol> <p dir="auto">Link to code example:</p> <h2 dir="auto">The current behavior</h2> <p dir="auto">Tab "Component" is blank</p> <h2 dir="auto">The expected behavior</h2> <p dir="auto">Tab "Component" should show React components</p> <p dir="auto">FYI: I installed Material UI library.<br> Chrome: Versión 86.0.4240.183 (Build oficial) (64 bits) Ubuntu 18.04.<br> Tested today.<br> Versión<br> 4.10.0 (11/12/2020)<br> Actualizado<br> 13 de noviembre de 2020</p>
1
<p dir="auto">Could you please make it a little bit clear for me</p> <p dir="auto">I am using pyhon generated code to read and get node attributes from the model graph.</p> <p dir="auto">I generated it this way (output is <code class="notranslate">tflite/</code> folder with autogenerated *.py files):<br> <code class="notranslate">flatc -python tensorflow/tensorflow/lite/schema/schema.fbs</code></p> <p dir="auto">Than I read the model:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" from tflite.Model import Model def read_tflite_model(file): buf = open(file, &quot;rb&quot;).read() buf = bytearray(buf) model = Model.GetRootAsModel(buf, 0) return model "><pre class="notranslate"><code class="notranslate"> from tflite.Model import Model def read_tflite_model(file): buf = open(file, "rb").read() buf = bytearray(buf) model = Model.GetRootAsModel(buf, 0) return model </code></pre></div> <p dir="auto">Getting model parameters:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" def print_model_info(model): version = model.Version() print(&quot;Model version:&quot;, version) description = model.Description().decode('utf-8') print(&quot;Description:&quot;, description) subgraph_len = model.SubgraphsLength() print(&quot;Subgraph length:&quot;, subgraph_len) "><pre class="notranslate"><code class="notranslate"> def print_model_info(model): version = model.Version() print("Model version:", version) description = model.Description().decode('utf-8') print("Description:", description) subgraph_len = model.SubgraphsLength() print("Subgraph length:", subgraph_len) </code></pre></div> <p dir="auto">Than I realized that graph nodes could be interpreted as <code class="notranslate">Tensor</code> object or <code class="notranslate">Operator</code> object.</p> <p dir="auto"><code class="notranslate">Tensor</code> object stores quantization params, shape, tensor type (I don't understand the meaning of it yet)</p> <p dir="auto"><code class="notranslate">Operator</code> object has <code class="notranslate">BuiltinOptions</code> and <code class="notranslate">CustomOptions</code> methods that seems to me should give me access to node parameters (such as paddings, dilations and all layer specific info)</p> <p dir="auto">I tried to iterate over them since there are Inputs and Outputs methods. But failed. I don't understand w</p> <p dir="auto">This is my scratch:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def print_nodes_info(model): # what does this 0 mean? should it always be zero? subgraph = model.Subgraphs(0) operators_len = subgraph.OperatorsLength() print('Operators length:', operators_len) from collections import deque nodes = deque(subgraph.InputsAsNumpy()) STEP_N = 0 MAX_STEPS = operators_len print(&quot;Nodes info:&quot;) while len(nodes) != 0 and STEP_N &lt;= MAX_STEPS: print(&quot;MAX_STEPS={} STEP_N={}&quot;.format(MAX_STEPS, STEP_N)) print(&quot;-&quot; * 60) node_id = nodes.pop() print(&quot;Node id:&quot;, node_id) tensor = subgraph.Tensors(node_id) print(&quot;Node name:&quot;, tensor.Name().decode('utf-8')) print(&quot;Node shape:&quot;, tensor.ShapeAsNumpy()) # which type is it? what does it mean? type_of_tensor = tensor.Type() print(&quot;Tensor type:&quot;, type_of_tensor) quantization = tensor.Quantization() min = quantization.MinAsNumpy() max = quantization.MaxAsNumpy() scale = quantization.ScaleAsNumpy() zero_point = quantization.ZeroPointAsNumpy() print(&quot;Quantization: ({}, {}), s={}, z={}&quot;.format(min, max, scale, zero_point)) # I do not understand it again. what is j, that I set to 0 here? operator = subgraph.Operators(0) for i in operator.OutputsAsNumpy(): nodes.appendleft(i) STEP_N += 1 print(&quot;-&quot;*60) "><pre class="notranslate"><code class="notranslate">def print_nodes_info(model): # what does this 0 mean? should it always be zero? subgraph = model.Subgraphs(0) operators_len = subgraph.OperatorsLength() print('Operators length:', operators_len) from collections import deque nodes = deque(subgraph.InputsAsNumpy()) STEP_N = 0 MAX_STEPS = operators_len print("Nodes info:") while len(nodes) != 0 and STEP_N &lt;= MAX_STEPS: print("MAX_STEPS={} STEP_N={}".format(MAX_STEPS, STEP_N)) print("-" * 60) node_id = nodes.pop() print("Node id:", node_id) tensor = subgraph.Tensors(node_id) print("Node name:", tensor.Name().decode('utf-8')) print("Node shape:", tensor.ShapeAsNumpy()) # which type is it? what does it mean? type_of_tensor = tensor.Type() print("Tensor type:", type_of_tensor) quantization = tensor.Quantization() min = quantization.MinAsNumpy() max = quantization.MaxAsNumpy() scale = quantization.ScaleAsNumpy() zero_point = quantization.ZeroPointAsNumpy() print("Quantization: ({}, {}), s={}, z={}".format(min, max, scale, zero_point)) # I do not understand it again. what is j, that I set to 0 here? operator = subgraph.Operators(0) for i in operator.OutputsAsNumpy(): nodes.appendleft(i) STEP_N += 1 print("-"*60) </code></pre></div> <p dir="auto">Please help me to get access the node attributes.<br> Thank you in advance for your help.</p>
<p dir="auto">Could you please make it a little bit clear for me</p> <p dir="auto">I am using pyhon generated code to read and get node attributes from the model graph.</p> <p dir="auto">I generated it this way (output is <code class="notranslate">tflite/</code> folder with autogenerated *.py files):<br> <code class="notranslate">flatc -python tensorflow/tensorflow/lite/schema/schema.fbs</code></p> <p dir="auto">Than I read the model:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" from tflite.Model import Model def read_tflite_model(file): buf = open(file, &quot;rb&quot;).read() buf = bytearray(buf) model = Model.GetRootAsModel(buf, 0) return model "><pre class="notranslate"><code class="notranslate"> from tflite.Model import Model def read_tflite_model(file): buf = open(file, "rb").read() buf = bytearray(buf) model = Model.GetRootAsModel(buf, 0) return model </code></pre></div> <p dir="auto">Getting model parameters:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" def print_model_info(model): version = model.Version() print(&quot;Model version:&quot;, version) description = model.Description().decode('utf-8') print(&quot;Description:&quot;, description) subgraph_len = model.SubgraphsLength() print(&quot;Subgraph length:&quot;, subgraph_len) "><pre class="notranslate"><code class="notranslate"> def print_model_info(model): version = model.Version() print("Model version:", version) description = model.Description().decode('utf-8') print("Description:", description) subgraph_len = model.SubgraphsLength() print("Subgraph length:", subgraph_len) </code></pre></div> <p dir="auto">Than I realized that graph nodes could be interpreted as <code class="notranslate">Tensor</code> object or <code class="notranslate">Operator</code> object.</p> <p dir="auto"><code class="notranslate">Tensor</code> object stores quantization params, shape, tensor type (I don't understand the meaning of it yet)</p> <p dir="auto"><code class="notranslate">Operator</code> object has <code class="notranslate">BuiltinOptions</code> and <code class="notranslate">CustomOptions</code> methods that seems to me should give me access to node parameters (such as paddings, dilations and all layer specific info)</p> <p dir="auto">I tried to iterate over them since there are Inputs and Outputs methods. But failed. I don't understand w</p> <p dir="auto">This is my scratch:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def print_nodes_info(model): # what does this 0 mean? should it always be zero? subgraph = model.Subgraphs(0) operators_len = subgraph.OperatorsLength() print('Operators length:', operators_len) from collections import deque nodes = deque(subgraph.InputsAsNumpy()) STEP_N = 0 MAX_STEPS = operators_len print(&quot;Nodes info:&quot;) while len(nodes) != 0 and STEP_N &lt;= MAX_STEPS: print(&quot;MAX_STEPS={} STEP_N={}&quot;.format(MAX_STEPS, STEP_N)) print(&quot;-&quot; * 60) node_id = nodes.pop() print(&quot;Node id:&quot;, node_id) tensor = subgraph.Tensors(node_id) print(&quot;Node name:&quot;, tensor.Name().decode('utf-8')) print(&quot;Node shape:&quot;, tensor.ShapeAsNumpy()) # which type is it? what does it mean? type_of_tensor = tensor.Type() print(&quot;Tensor type:&quot;, type_of_tensor) quantization = tensor.Quantization() min = quantization.MinAsNumpy() max = quantization.MaxAsNumpy() scale = quantization.ScaleAsNumpy() zero_point = quantization.ZeroPointAsNumpy() print(&quot;Quantization: ({}, {}), s={}, z={}&quot;.format(min, max, scale, zero_point)) # I do not understand it again. what is j, that I set to 0 here? operator = subgraph.Operators(0) for i in operator.OutputsAsNumpy(): nodes.appendleft(i) STEP_N += 1 print(&quot;-&quot;*60) "><pre class="notranslate"><code class="notranslate">def print_nodes_info(model): # what does this 0 mean? should it always be zero? subgraph = model.Subgraphs(0) operators_len = subgraph.OperatorsLength() print('Operators length:', operators_len) from collections import deque nodes = deque(subgraph.InputsAsNumpy()) STEP_N = 0 MAX_STEPS = operators_len print("Nodes info:") while len(nodes) != 0 and STEP_N &lt;= MAX_STEPS: print("MAX_STEPS={} STEP_N={}".format(MAX_STEPS, STEP_N)) print("-" * 60) node_id = nodes.pop() print("Node id:", node_id) tensor = subgraph.Tensors(node_id) print("Node name:", tensor.Name().decode('utf-8')) print("Node shape:", tensor.ShapeAsNumpy()) # which type is it? what does it mean? type_of_tensor = tensor.Type() print("Tensor type:", type_of_tensor) quantization = tensor.Quantization() min = quantization.MinAsNumpy() max = quantization.MaxAsNumpy() scale = quantization.ScaleAsNumpy() zero_point = quantization.ZeroPointAsNumpy() print("Quantization: ({}, {}), s={}, z={}".format(min, max, scale, zero_point)) # I do not understand it again. what is j, that I set to 0 here? operator = subgraph.Operators(0) for i in operator.OutputsAsNumpy(): nodes.appendleft(i) STEP_N += 1 print("-"*60) </code></pre></div> <p dir="auto">Please help me to get access the node attributes.<br> Thank you in advance for your help.</p>
1
<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p> <p dir="auto">According to the ANSI standards SQL:92, SQL:1999, and SQL:2003, a UNIQUE constraint should disallow duplicate non-NULL values, but allow multiple NULL values. SQL Server has always implemented a crippled version of this, allowing a single NULL but disallowing multiple NULL values. From <a href="http://connect.microsoft.com/SQLServer/feedback/details/299229/change-unique-constraint-to-allow-multiple-null-values" rel="nofollow">http://connect.microsoft.com/SQLServer/feedback/details/299229/change-unique-constraint-to-allow-multiple-null-values</a></p> <p dir="auto">To fix this issue SQL has added the filtered indexes feature. Using this feature it is possible to perform the logic of an index to a filter set of items in a table using a WHERE clause. i.e.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="create unique nonclustered index idx on dbo.DimCustomer(emailAddress) where EmailAddress is not null;"><pre class="notranslate"><code class="notranslate">create unique nonclustered index idx on dbo.DimCustomer(emailAddress) where EmailAddress is not null; </code></pre></div> <p dir="auto">Attached is a patch which applies the above feature when SQL 2008 or newer is used as a server. This patch has been tested on Windows 7/SQL Server 2012 using pyodbc and the normal SQL Server driver.</p> <hr> <p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/2608/sqlalchemy-feature1.patch">sqlalchemy-feature1.patch</a></p>
<h3 dir="auto">Describe the typing issue</h3> <p dir="auto">In mypy 1.1.1 we're seeing a lot of typing errors along the lines of:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" auth.py:136: error: Argument &quot;email&quot; to &quot;User&quot; has incompatible type &quot;str&quot;; expected &quot;Mapped[str]&quot; [arg-type] user = User(email=email, ***"><pre class="notranslate"><code class="notranslate"> auth.py:136: error: Argument "email" to "User" has incompatible type "str"; expected "Mapped[str]" [arg-type] user = User(email=email, *** </code></pre></div> <p dir="auto">Errors are not present in mypy 1.0.0.</p> <p dir="auto">I suspect it has to do with some new features around dataclasses.</p> <h3 dir="auto">To Reproduce</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Base defined like: class Base(MappedAsDataclass, DeclarativeBase): ..."><pre class="notranslate"><span class="pl-c"># Base defined like:</span> <span class="pl-k">class</span> <span class="pl-v">Base</span>(<span class="pl-v">MappedAsDataclass</span>, <span class="pl-v">DeclarativeBase</span>): ...</pre></div> <p dir="auto">Let me know if you can't reproduce, and I'll try to look into it further.</p> <h3 dir="auto">Versions</h3> <ul dir="auto"> <li>SQLAlchemy: 2.0.5</li> </ul>
0
<p dir="auto">If possible can Deno.emit just include all typings from other files inside it's output, instead of importing them from other files. Currently, it adds imports using <code class="notranslate">.ts</code> and my theory is that these imports then somehow break the behavior in node.js or VSC making it so the library is not able to have proper typings available.</p> <p dir="auto">For example:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/23035000/129134366-e1599d8a-7e48-47a9-86c4-4a8e1c35d834.png"><img src="https://user-images.githubusercontent.com/23035000/129134366-e1599d8a-7e48-47a9-86c4-4a8e1c35d834.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">These imports should just write out the types directly in this file at the top instead of importing them.</p>
<p dir="auto">With <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="523264961" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/3352" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/3352/hovercard" href="https://github.com/denoland/deno/pull/3352">#3352</a>, bundles are going to be a mechanism to distribute "libraries" in Deno. It is logical that someone might want to use a distribution bundle in another Deno workload (or consume it in other runtimes) and would want to have type safe consumption of those files, therefore we should generate the declarations along with a bundle.</p> <p dir="auto">Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="453754839" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/2475" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/2475/hovercard" href="https://github.com/denoland/deno/issues/2475">#2475</a>.</p>
1
<p dir="auto">Event do not trigger when node do not have "cursor: pointer" style on it.</p> <p dir="auto">Here you have an example:<br> <a href="http://jsfiddle.net/kb3gN/1345/" rel="nofollow">http://jsfiddle.net/kb3gN/1345/</a></p>
<p dir="auto">iOS Safari really doesn't want you clicking anything that's not an <code class="notranslate">&lt;a&gt;</code> tag. This is a known issue: <a href="http://stackoverflow.com/questions/5421659/html-label-command-doesnt-work-in-iphone-browser/6472181#6472181" rel="nofollow">http://stackoverflow.com/questions/5421659/html-label-command-doesnt-work-in-iphone-browser/6472181#6472181</a></p> <p dir="auto">The way you fix this is by putting an empty "onclick" attribute on nodes you wish to emit click events. Yep.</p> <p dir="auto">So presumably:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="div({onClick: function(){alert('clicked');}}, 'click me');"><pre class="notranslate"><code class="notranslate">div({onClick: function(){alert('clicked');}}, 'click me'); </code></pre></div> <p dir="auto">should emit:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;div onclick&gt;click me&lt;/div&gt;"><pre class="notranslate"><code class="notranslate">&lt;div onclick&gt;click me&lt;/div&gt; </code></pre></div> <p dir="auto">on iOS. Ensuring that the click event is actually reachable from an iOS device.</p> <p dir="auto">As the stack overflow link points out, this is also an issue for <code class="notranslate">&lt;label&gt;</code> elements associated with <code class="notranslate">&lt;input&gt;</code> elements. In order to behave as a clickable label, they must also include an empty "onclick" attribute.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="label(null, input({type: 'checkbox'}), check me); &lt;label onclick&gt;&lt;input type=&quot;checkbox&gt; check me&lt;/label&gt;"><pre class="notranslate"><code class="notranslate">label(null, input({type: 'checkbox'}), check me); &lt;label onclick&gt;&lt;input type="checkbox&gt; check me&lt;/label&gt; </code></pre></div>
1
<p dir="auto">For this source code I get an internal compiler error. I don't have a debug version of Rust so the stack backtrace is only mildly useful. I am using thestinger's 64bit Arch package at commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/776c17f476c4be92f6cfe4dab528886973ea8c03/hovercard" href="https://github.com/rust-lang/rust/commit/776c17f476c4be92f6cfe4dab528886973ea8c03"><tt>776c17f</tt></a>. If necessary, I can compile a debug version.</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use std::mem::{transmute, size_of}; pub fn as_raw_bytes&lt;'a, T&gt;(obj: &amp;'a T) -&gt; &amp;'a [u8] { unsafe { transmute(Slice{ data: transmute(obj), len: size_of::&lt;T&gt;() }) } }"><pre class="notranslate"><span class="pl-k">use</span> std<span class="pl-kos">::</span>mem<span class="pl-kos">::</span><span class="pl-kos">{</span>transmute<span class="pl-kos">,</span> size_of<span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">as_raw_bytes</span><span class="pl-kos">&lt;</span><span class="pl-c1">'</span><span class="pl-ent">a</span><span class="pl-kos">,</span> <span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">obj</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-c1">'</span><span class="pl-ent">a</span> <span class="pl-smi">T</span><span class="pl-kos">)</span> -&gt; <span class="pl-c1">&amp;</span><span class="pl-c1">'</span><span class="pl-ent">a</span> <span class="pl-kos">[</span><span class="pl-smi">u8</span><span class="pl-kos">]</span> <span class="pl-kos">{</span> <span class="pl-k">unsafe</span> <span class="pl-kos">{</span> <span class="pl-en">transmute</span><span class="pl-kos">(</span><span class="pl-smi">Slice</span><span class="pl-kos">{</span> <span class="pl-c1">data</span><span class="pl-kos">:</span> <span class="pl-en">transmute</span><span class="pl-kos">(</span>obj<span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-c1">len</span><span class="pl-kos">:</span> <span class="pl-en">size_of</span><span class="pl-kos">::</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><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="stack backtrace: 1: 0x7f1dd6635d10 - rt::backtrace::imp::write::h4e2a0deea6e16f19lxr 2: 0x7f1dd6638de0 - &lt;unknown&gt; 3: 0x7f1ddabdb420 - unwind::begin_unwind_inner::ha1744a0e31e40fb7pie 4: 0x7f1dd7fda200 - &lt;unknown&gt; 5: 0x7f1dd7fd9230 - reader::get_doc::hd591db736e2c9ccanSa 6: 0x7f1ddbab23e0 - metadata::decoder::get_type::hf1b9e21cbe87e9e4zyu 7: 0x7f1ddb4f13b0 - middle::ty::lookup_item_type::had5e7ab5a7be10d4pNI 8: 0x7f1ddb84de60 - &lt;unknown&gt; 9: 0x7f1ddb84b7c0 - &lt;unknown&gt; 10: 0x7f1ddb84de60 - &lt;unknown&gt; 11: 0x7f1ddb817d10 - &lt;unknown&gt; 12: 0x7f1ddb84de60 - &lt;unknown&gt; 13: 0x7f1ddb817d10 - &lt;unknown&gt; 14: 0x7f1ddb813aa0 - &lt;unknown&gt; 15: 0x7f1ddb8137c0 - &lt;unknown&gt; 16: 0x7f1ddb80c900 - middle::typeck::check::check_item::h63be73a18b660b1fa8T 17: 0x7f1ddb8135c0 - middle::typeck::check::check_item_types::h37ee3d140fd54ff3jyT 18: 0x7f1ddb2277b0 - &lt;unknown&gt; 19: 0x7f1ddba212e0 - middle::typeck::check_crate::he1d188a32484ea72Lbl 20: 0x7f1ddbaeed60 - driver::driver::phase_3_run_analysis_passes::hbe43a1c4d536fa03SMz 21: 0x7f1ddbae9ea0 - driver::driver::compile_input::h270b0e9df0362e39Yyz 22: 0x7f1ddbb973a0 - &lt;unknown&gt; 23: 0x7f1ddbb972b0 - &lt;unknown&gt; 24: 0x7f1ddbba9ce0 - &lt;unknown&gt; 25: 0x7f1ddbba9ae0 - &lt;unknown&gt; 26: 0x7f1ddaf37220 - &lt;unknown&gt; 27: 0x7f1ddac2ca90 - &lt;unknown&gt; 28: 0x7f1ddac2ca80 - rust_try 29: 0x7f1ddabd8a80 - unwind::try::h34e32f5beb935a03F6d 30: 0x7f1ddabd8820 - task::Task::run::hcd20cd28338e53dfZcd 31: 0x7f1ddaf36fe0 - &lt;unknown&gt; 32: 0x7f1ddabda660 - &lt;unknown&gt; 33: 0x7f1dd59a9060 - start_thread 34: 0x7f1dda8a9489 - __clone 35: 0x0 - &lt;unknown&gt;"><pre class="notranslate"><code class="notranslate">stack backtrace: 1: 0x7f1dd6635d10 - rt::backtrace::imp::write::h4e2a0deea6e16f19lxr 2: 0x7f1dd6638de0 - &lt;unknown&gt; 3: 0x7f1ddabdb420 - unwind::begin_unwind_inner::ha1744a0e31e40fb7pie 4: 0x7f1dd7fda200 - &lt;unknown&gt; 5: 0x7f1dd7fd9230 - reader::get_doc::hd591db736e2c9ccanSa 6: 0x7f1ddbab23e0 - metadata::decoder::get_type::hf1b9e21cbe87e9e4zyu 7: 0x7f1ddb4f13b0 - middle::ty::lookup_item_type::had5e7ab5a7be10d4pNI 8: 0x7f1ddb84de60 - &lt;unknown&gt; 9: 0x7f1ddb84b7c0 - &lt;unknown&gt; 10: 0x7f1ddb84de60 - &lt;unknown&gt; 11: 0x7f1ddb817d10 - &lt;unknown&gt; 12: 0x7f1ddb84de60 - &lt;unknown&gt; 13: 0x7f1ddb817d10 - &lt;unknown&gt; 14: 0x7f1ddb813aa0 - &lt;unknown&gt; 15: 0x7f1ddb8137c0 - &lt;unknown&gt; 16: 0x7f1ddb80c900 - middle::typeck::check::check_item::h63be73a18b660b1fa8T 17: 0x7f1ddb8135c0 - middle::typeck::check::check_item_types::h37ee3d140fd54ff3jyT 18: 0x7f1ddb2277b0 - &lt;unknown&gt; 19: 0x7f1ddba212e0 - middle::typeck::check_crate::he1d188a32484ea72Lbl 20: 0x7f1ddbaeed60 - driver::driver::phase_3_run_analysis_passes::hbe43a1c4d536fa03SMz 21: 0x7f1ddbae9ea0 - driver::driver::compile_input::h270b0e9df0362e39Yyz 22: 0x7f1ddbb973a0 - &lt;unknown&gt; 23: 0x7f1ddbb972b0 - &lt;unknown&gt; 24: 0x7f1ddbba9ce0 - &lt;unknown&gt; 25: 0x7f1ddbba9ae0 - &lt;unknown&gt; 26: 0x7f1ddaf37220 - &lt;unknown&gt; 27: 0x7f1ddac2ca90 - &lt;unknown&gt; 28: 0x7f1ddac2ca80 - rust_try 29: 0x7f1ddabd8a80 - unwind::try::h34e32f5beb935a03F6d 30: 0x7f1ddabd8820 - task::Task::run::hcd20cd28338e53dfZcd 31: 0x7f1ddaf36fe0 - &lt;unknown&gt; 32: 0x7f1ddabda660 - &lt;unknown&gt; 33: 0x7f1dd59a9060 - start_thread 34: 0x7f1dda8a9489 - __clone 35: 0x0 - &lt;unknown&gt; </code></pre></div>
<p dir="auto">Found this while refactoring my library after the <code class="notranslate">Vector</code> -&gt; <code class="notranslate">Slice</code> rename</p> <p dir="auto">STR:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use std::{mem, raw}; fn main() { let a = &amp;[1, 2, 3i]; let raw::Slice { data: ptr, len: len }: raw::Slice&lt;int&gt; = unsafe { mem::transmute(a) }; let b = unsafe { mem::transmute(Slice { data: ptr, len: len }) }; // ICE ^~~ forgot the `raw::` qualifier }"><pre class="notranslate"><span class="pl-k">use</span> std<span class="pl-kos">::</span><span class="pl-kos">{</span>mem<span class="pl-kos">,</span> raw<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-k">let</span> a = <span class="pl-c1">&amp;</span><span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">2</span><span class="pl-kos">,</span> <span class="pl-c1">3</span>i<span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">let</span> raw<span class="pl-kos">::</span><span class="pl-v">Slice</span> <span class="pl-kos">{</span> <span class="pl-c1">data</span><span class="pl-kos">:</span> ptr<span class="pl-kos">,</span> <span class="pl-c1">len</span><span class="pl-kos">:</span> len <span class="pl-kos">}</span><span class="pl-kos">:</span> raw<span class="pl-kos">::</span><span class="pl-smi">Slice</span><span class="pl-kos">&lt;</span><span class="pl-smi">int</span><span class="pl-kos">&gt;</span> = <span class="pl-k">unsafe</span> <span class="pl-kos">{</span> mem<span class="pl-kos">::</span><span class="pl-en">transmute</span><span class="pl-kos">(</span>a<span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">let</span> b = <span class="pl-k">unsafe</span> <span class="pl-kos">{</span> mem<span class="pl-kos">::</span><span class="pl-en">transmute</span><span class="pl-kos">(</span><span class="pl-smi">Slice</span> <span class="pl-kos">{</span> <span class="pl-c1">data</span><span class="pl-kos">:</span> ptr<span class="pl-kos">,</span> <span class="pl-c1">len</span><span class="pl-kos">:</span> len <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-c">// ICE ^~~ forgot the `raw::` qualifier</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">Backtrace:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="task 'rustc' failed at 'explicit failure', /var/tmp/paludis/build/dev-lang-rust-scm/work/rust-scm/src/librbml/lib.rs:246 stack backtrace: 1: 0x7fadbcf65980 - rt::backtrace::imp::write::h500c7cd49c94d6cbo1q 2: 0x7fadbcf68a20 - &lt;unknown&gt; 3: 0x7fadc14ddc40 - unwind::begin_unwind_inner::h78b0bc3908c6581cM8d 4: 0x7fadc03d5310 - &lt;unknown&gt; 5: 0x7fadc03d4340 - reader::get_doc::h659c9cb63ec6b27dQRa 6: 0x7fadc23b9d40 - metadata::decoder::get_type::h8aa840f508fceb99Bis 7: 0x7fadc1df73b0 - middle::ty::lookup_item_type::h0762f54f39bdc9b9J5G 8: 0x7fadc2154ec0 - &lt;unknown&gt; 9: 0x7fadc2152820 - &lt;unknown&gt; 10: 0x7fadc2154ec0 - &lt;unknown&gt; 11: 0x7fadc211dba0 - &lt;unknown&gt; 12: 0x7fadc2154ec0 - &lt;unknown&gt; 13: 0x7fadc21b39c0 - middle::typeck::check::check_decl_local::h2a1925bfb9a5b157XEW 14: 0x7fadc21b3be0 - middle::typeck::check::check_stmt::he6d6f56b73c868b94GW 15: 0x7fadc211dba0 - &lt;unknown&gt; 16: 0x7fadc2119930 - &lt;unknown&gt; 17: 0x7fadc2119650 - &lt;unknown&gt; 18: 0x7fadc2112510 - middle::typeck::check::check_item::h9d5462bdf5870d8fxhS 19: 0x7fadc2119450 - middle::typeck::check::check_item_types::h60cfbf824eb42ae21HR 20: 0x7fadc1b2a150 - &lt;unknown&gt; 21: 0x7fadc23275c0 - middle::typeck::check_crate::h322ddeef25afc167p2i 22: 0x7fadc23f6af0 - driver::driver::phase_3_run_analysis_passes::h01e8a18355fa9e80Vsx 23: 0x7fadc23f1c30 - driver::driver::compile_input::h7879a63579b438beafx 24: 0x7fadc249d400 - &lt;unknown&gt; 25: 0x7fadc249d310 - &lt;unknown&gt; 26: 0x7fadc24afc60 - &lt;unknown&gt; 27: 0x7fadc24afa60 - &lt;unknown&gt; 28: 0x7fadc1838b30 - &lt;unknown&gt; 29: 0x7fadc152d970 - &lt;unknown&gt; 30: 0x7fadc152d960 - rust_try 31: 0x7fadc14db2a0 - unwind::try::h36697dac480a0e50hXd 32: 0x7fadc14db040 - task::Task::run::h0fb2de2c85c53b00T4c 33: 0x7fadc18388f0 - &lt;unknown&gt; 34: 0x7fadc14dce80 - &lt;unknown&gt; 35: 0x7fadbc2e0000 - start_thread 36: 0x7fadc11ac269 - clone 37: 0x0 - &lt;unknown&gt;"><pre class="notranslate">task <span class="pl-c1">'</span>rustc<span class="pl-c1">'</span> failed at <span class="pl-c1">'</span>explicit failure<span class="pl-c1">'</span><span class="pl-kos">,</span> /var/tmp/paludis/build/dev-lang-rust-scm/work/rust-scm/src/librbml/lib<span class="pl-kos">.</span><span class="pl-c1">rs</span><span class="pl-kos">:</span><span class="pl-c1">246</span> stack backtrace<span class="pl-kos">:</span> <span class="pl-c1">1</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadbcf65980</span> - rt<span class="pl-kos">::</span>backtrace<span class="pl-kos">::</span>imp<span class="pl-kos">::</span>write<span class="pl-kos">::</span>h500c7cd49c94d6cbo1q <span class="pl-c1">2</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadbcf68a20</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">3</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc14ddc40</span> - unwind<span class="pl-kos">::</span>begin_unwind_inner<span class="pl-kos">::</span>h78b0bc3908c6581cM8d <span class="pl-c1">4</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc03d5310</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">5</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc03d4340</span> - reader<span class="pl-kos">::</span>get_doc<span class="pl-kos">::</span>h659c9cb63ec6b27dQRa <span class="pl-c1">6</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc23b9d40</span> - metadata<span class="pl-kos">::</span>decoder<span class="pl-kos">::</span>get_type<span class="pl-kos">::</span>h8aa840f508fceb99Bis <span class="pl-c1">7</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc1df73b0</span> - middle<span class="pl-kos">::</span>ty<span class="pl-kos">::</span>lookup_item_type<span class="pl-kos">::</span>h0762f54f39bdc9b9J5G <span class="pl-c1">8</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc2154ec0</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">9</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc2152820</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">10</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc2154ec0</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">11</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc211dba0</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">12</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc2154ec0</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">13</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc21b39c0</span> - middle<span class="pl-kos">::</span>typeck<span class="pl-kos">::</span>check<span class="pl-kos">::</span>check_decl_local<span class="pl-kos">::</span>h2a1925bfb9a5b157XEW <span class="pl-c1">14</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc21b3be0</span> - middle<span class="pl-kos">::</span>typeck<span class="pl-kos">::</span>check<span class="pl-kos">::</span>check_stmt<span class="pl-kos">::</span>he6d6f56b73c868b94GW <span class="pl-c1">15</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc211dba0</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">16</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc2119930</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">17</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc2119650</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">18</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc2112510</span> - middle<span class="pl-kos">::</span>typeck<span class="pl-kos">::</span>check<span class="pl-kos">::</span>check_item<span class="pl-kos">::</span>h9d5462bdf5870d8fxhS <span class="pl-c1">19</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc2119450</span> - middle<span class="pl-kos">::</span>typeck<span class="pl-kos">::</span>check<span class="pl-kos">::</span>check_item_types<span class="pl-kos">::</span>h60cfbf824eb42ae21HR <span class="pl-c1">20</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc1b2a150</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">21</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc23275c0</span> - middle<span class="pl-kos">::</span>typeck<span class="pl-kos">::</span>check_crate<span class="pl-kos">::</span>h322ddeef25afc167p2i <span class="pl-c1">22</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc23f6af0</span> - driver<span class="pl-kos">::</span>driver<span class="pl-kos">::</span>phase_3_run_analysis_passes<span class="pl-kos">::</span>h01e8a18355fa9e80Vsx <span class="pl-c1">23</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc23f1c30</span> - driver<span class="pl-kos">::</span>driver<span class="pl-kos">::</span>compile_input<span class="pl-kos">::</span>h7879a63579b438beafx <span class="pl-c1">24</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc249d400</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">25</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc249d310</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">26</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc24afc60</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">27</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc24afa60</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">28</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc1838b30</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">29</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc152d970</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">30</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc152d960</span> - rust_try <span class="pl-c1">31</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc14db2a0</span> - unwind<span class="pl-kos">::</span>try<span class="pl-kos">::</span>h36697dac480a0e50hXd <span class="pl-c1">32</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc14db040</span> - task<span class="pl-kos">::</span><span class="pl-smi">Task</span><span class="pl-kos">::</span>run<span class="pl-kos">::</span>h0fb2de2c85c53b00T4c <span class="pl-c1">33</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc18388f0</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">34</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc14dce80</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">35</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadbc2e0000</span> - start_thread <span class="pl-c1">36</span><span class="pl-kos">:</span> <span class="pl-c1">0x7fadc11ac269</span> - clone <span class="pl-c1">37</span><span class="pl-kos">:</span> <span class="pl-c1">0x0</span> - &lt;<span class="pl-smi">unknown</span>&gt;</pre></div> <p dir="auto">Version:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="rustc 0.12.0-pre (a8c8e3f80 2014-08-14 19:11:18 +0000)"><pre class="notranslate">rustc <span class="pl-c1">0.12</span><span class="pl-kos">.</span><span class="pl-c1">0</span>-<span class="pl-en">pre</span> <span class="pl-kos">(</span>a8c8e3f80 <span class="pl-c1">2014</span>-<span class="pl-c1">08</span>-<span class="pl-c1">14</span> <span class="pl-c1">19</span><span class="pl-kos">:</span><span class="pl-c1">11</span><span class="pl-kos">:</span><span class="pl-c1">18</span> +<span class="pl-c1">0000</span><span class="pl-kos">)</span></pre></div>
1
<p dir="auto">SELECT d.oid, d.datname AS databasename, d.datacl, pg_get_userbyid(d.datdba) AS databaseowner, d.datcollate, d.datctype, shobj_description(d.oid, 'pg_database') AS description, d.datconnlimit, t.spcname, d.encoding, pg_encoding_to_char(d.encoding) AS encodingname FROM pg_database d LEFT JOIN pg_tablespace t ON d.dattablespace = t.oid ::: DataSources: initds_master<br> [ERROR] 02:51:14.421 [pool-4-thread-1] o.a.s.s.f.c.CommandExecutorTask - Exception occur:<br> java.lang.IllegalArgumentException: Cannot find JDBC type '2003' in PostgreSQL column type</p>
<p dir="auto">Please answer these questions before submitting your issue. Thanks!<br> 开源不易,我们希望将精力放在完成新功能和解决有价值的问题上,为了让大家的配合更具有效率,请填写以下列出的全部问题</p> <h3 dir="auto">Which version of Sharding-Sphere do you using?(您使用的Sharding-Sphere版本为?)</h3> <h3 dir="auto">Expected behavior (您预期的结果是)</h3> <h3 dir="auto">Actual behavior (实际运行的结果是)</h3> <h3 dir="auto">Steps to reproduce the behavior (可重现问题的操作步骤)</h3> <h3 dir="auto">Please provide the reproduce example codes (such as github link),otherwise we will label the issue as Invalid and close it.(为了节省复现问题的时间,请务必提供可重现的代码,否则我们会将issue直接标记为invalid并关闭)</h3> <p dir="auto">Code should based on <a href="https://github.com/sharding-sphere/sharding-sphere-example">https://github.com/sharding-sphere/sharding-sphere-example</a><br> (代码请基于 <a href="https://github.com/sharding-sphere/sharding-sphere-example%EF%BC%89">https://github.com/sharding-sphere/sharding-sphere-example)</a></p>
0
<h1 dir="auto">Environment</h1> <p dir="auto">Version 1903<br> OS build : 18362.356</p> <p dir="auto">PowerToys version: v0.11.0</p> <p dir="auto">The app is installed, it does open and quickly shuts down</p> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Just double click the app</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Should show the app settings, show franzy zone</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Shuts down</p> <h1 dir="auto">Screenshots</h1> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/35785259/65299106-b51e7d00-db33-11e9-8559-a8b8a8aab2da.gif"><img src="https://user-images.githubusercontent.com/35785259/65299106-b51e7d00-db33-11e9-8559-a8b8a8aab2da.gif" alt="2019-09-19_23-15-28" data-animated-image="" style="max-width: 100%;"></a></p>
<h1 dir="auto">Environment</h1> <p dir="auto">Version 1903<br> OS build : 18362.356</p> <p dir="auto">PowerToys version: v0.11.0</p> <p dir="auto">The app is installed, it does open and quickly shuts down</p> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Just double click the app</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Should show the app settings, show franzy zone</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Shuts down</p> <h1 dir="auto">Screenshots</h1> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/35785259/65299106-b51e7d00-db33-11e9-8559-a8b8a8aab2da.gif"><img src="https://user-images.githubusercontent.com/35785259/65299106-b51e7d00-db33-11e9-8559-a8b8a8aab2da.gif" alt="2019-09-19_23-15-28" data-animated-image="" style="max-width: 100%;"></a></p>
1
<p dir="auto">'Training Deep Nets with Sublinear Memory Cost' and 'Memory-Efficient Implementation of DenseNets' indicate that use drop intermediate feature map and recompute it if needed can save memory(while add computation burden),</p> <p dir="auto">so we need some mechanism to annotate some op's inputs <code class="notranslate">recomputable</code> , and drop this input memory after op finish(set input's reference count to 0), when need this op again, recompute it.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="a = tf.get_varible(shape=[None,10]) b = tf.get_varible(shape=[None,10]) c = tf.get_varible(shape=[None,10]) d = a*b d_recomputable = tf.recomputable(d) e = d_recomputable+c"><pre class="notranslate"><span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">get_varible</span>(<span class="pl-s1">shape</span><span class="pl-c1">=</span>[<span class="pl-c1">None</span>,<span class="pl-c1">10</span>]) <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">get_varible</span>(<span class="pl-s1">shape</span><span class="pl-c1">=</span>[<span class="pl-c1">None</span>,<span class="pl-c1">10</span>]) <span class="pl-s1">c</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">get_varible</span>(<span class="pl-s1">shape</span><span class="pl-c1">=</span>[<span class="pl-c1">None</span>,<span class="pl-c1">10</span>]) <span class="pl-s1">d</span> <span class="pl-c1">=</span> <span class="pl-s1">a</span><span class="pl-c1">*</span><span class="pl-s1">b</span> <span class="pl-s1">d_recomputable</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">recomputable</span>(<span class="pl-s1">d</span>) <span class="pl-s1">e</span> <span class="pl-c1">=</span> <span class="pl-s1">d_recomputable</span><span class="pl-c1">+</span><span class="pl-s1">c</span></pre></div> <p dir="auto">relate issue</p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="148266318" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/1934" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/1934/hovercard" href="https://github.com/tensorflow/tensorflow/issues/1934">#1934</a></li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="256532521" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/12948" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/12948/hovercard" href="https://github.com/tensorflow/tensorflow/issues/12948">#12948</a></li> </ul> <p dir="auto">in short, normal reference add reference count, recomputable reference do not add reference count</p>
<p dir="auto">The python 3 gpu package listed on: <a href="https://www.tensorflow.org/install/install_mac#the_url_of_the_tensorflow_python_package" rel="nofollow">https://www.tensorflow.org/install/install_mac#the_url_of_the_tensorflow_python_package</a> is missing.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ curl https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.1.0-py3-none-any.whl &lt;?xml version='1.0' encoding='UTF-8'?&gt;&lt;Error&gt;&lt;Code&gt;NoSuchKey&lt;/Code&gt;&lt;Message&gt;The specified key does not exist.&lt;/Message&gt;&lt;/Error&gt;"><pre class="notranslate"><code class="notranslate">$ curl https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-1.1.0-py3-none-any.whl &lt;?xml version='1.0' encoding='UTF-8'?&gt;&lt;Error&gt;&lt;Code&gt;NoSuchKey&lt;/Code&gt;&lt;Message&gt;The specified key does not exist.&lt;/Message&gt;&lt;/Error&gt; </code></pre></div>
0
<pre class="notranslate">From danderson@, regarding weekly.2012-03-13 (Go 1 RC1): """ This version of Go does not work on a subset of Linux kernels. Right off the bat I'd like to say that I don't think this should hold up Go 1.0 . I would like to see a fix in Go 1.0.1 or Go 1.1.0, and I have a patch to offer. But for the initial release, it's most definitely inconsequential. Linux kernels with the grsecurity.net hardening patch enforce write-xor-execute on memory pages. Specifically, mmap() and mprotect() calls that attempt to make pages write+execute will fail unless the binary is marked as needing the W^X defense disabled. This of course makes the runtime crash on startup, as it is dependent on W+X. It's still possible to run Go binaries compiled on a different machine, by using the `paxctl` tool to tag the binary as needing W+X memory. However, unless the Go toolchain can produce binaries tagged in this way by itself, the vanilla source tarball cannot be built/used on machines with this kernel patch. I have a patch for Go's linkers that adds the appropriate ELF program header to Go binaries. The header maps no additional memory into the runtime, it's used only for its flags (similar to PT_GNU_STACK). The patch is around 5 lines (times five to put it in [568]l). Once Go 1.0 gets out there, I'll send a code review with the change needed to get the toolchain working on grsec machines. Obviously I'll leave it to you folks to decide whether it's worth supporting or not, as grsecurity users are a minority, and a workaround exists for deploying on such machines, even if you can't compile on them directly. Thanks for what's shaping up to be a great Go 1.0! - Dave """ Keywords: grsec grsecurity</pre>
<p dir="auto">by <strong>feedback.test.account</strong>:</p> <pre class="notranslate"><a href="https://feedback.corp.google.com/#/Report/1182342511" rel="nofollow">https://feedback.corp.google.com/#/Report/1182342511</a> Description: Maybe not t.Mv and (&amp;t).Mv, but t.Mp and (&amp;t).Mp? Вelow: f := t.Mp; f(7) // like (&amp;t).Mp(7) Description translated: Maybe not t.Mv and (&amp;t).Mv, but t.Mp and (&amp;t).Mp? Вelow: f := t.Mp; f(7) // like (&amp;tMp(7) UI language: en Detected language: en</pre>
0
<p dir="auto">For example, a function takes any number of parameters and return the last one.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function GetLastOne&lt;T&gt;(...rest:any[], last:T) { return last; }"><pre class="notranslate"><code class="notranslate">function GetLastOne&lt;T&gt;(...rest:any[], last:T) { return last; } </code></pre></div> <p dir="auto">and this: <a href="http://createjs.com/docs/easeljs/classes/Container.html#method_addChild" rel="nofollow">http://createjs.com/docs/easeljs/classes/Container.html#method_addChild</a></p>
<p dir="auto">Extracting this suggestion from this issue:<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="50694125" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/1336" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/1336/hovercard" href="https://github.com/microsoft/TypeScript/issues/1336">#1336</a></p> <p dir="auto">Currently the variable arguments list supports variable arguments only as the last argument to the function:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function foo(arg1: number, ...arg2: string[]) { }"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-s1">arg1</span>: <span class="pl-smi">number</span><span class="pl-kos">,</span> ...<span class="pl-s1">arg2</span>: <span class="pl-smi">string</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">This compiles to the following javascript:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function foo(arg1) { var arg2 = []; for (var _i = 1; _i &lt; arguments.length; _i++) { arg2[_i - 1] = arguments[_i]; } }"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-s1">arg1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">arg2</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">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">_i</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span><span class="pl-kos">;</span> <span class="pl-s1">_i</span> <span class="pl-c1">&lt;</span> <span class="pl-smi">arguments</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">arg2</span><span class="pl-kos">[</span><span class="pl-s1">_i</span> <span class="pl-c1">-</span> <span class="pl-c1">1</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-smi">arguments</span><span class="pl-kos">[</span><span class="pl-s1">_i</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">However, variable argument functions are limited to appearing only as the last argument and not the first argument. I propose support be added for having a variable argument appear first, followed by one or more fixed arguments:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function subscribe(...events: string[], callback: (message: string) =&gt; void) { } // the following would compile subscribe(message =&gt; alert(message)); // gets all messages subscribe('errorMessages', message =&gt; alert(message)); subscribe( 'errorMessages', 'customMessageTypeFoo123', (message: string) =&gt; { alert(message); }); // the following would not compile subscribe(); // supplied parameters do not match any signature of call target subscribe('a1'); // argument of type 'string' does not match parameter of type '(message: string) =&gt; void' subscribe('a1', 'a2'); // argument of type 'string' does not match parameter of type '(message: string) =&gt; void'"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">subscribe</span><span class="pl-kos">(</span>...<span class="pl-s1">events</span>: <span class="pl-smi">string</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">callback</span>: <span class="pl-kos">(</span><span class="pl-s1">message</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span> <span class="pl-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-kos">}</span> <span class="pl-c">// the following would compile</span> <span class="pl-en">subscribe</span><span class="pl-kos">(</span><span class="pl-s1">message</span> <span class="pl-c1">=&gt;</span> <span class="pl-en">alert</span><span class="pl-kos">(</span><span class="pl-s1">message</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// gets all messages</span> <span class="pl-en">subscribe</span><span class="pl-kos">(</span><span class="pl-s">'errorMessages'</span><span class="pl-kos">,</span> <span class="pl-s1">message</span> <span class="pl-c1">=&gt;</span> <span class="pl-en">alert</span><span class="pl-kos">(</span><span class="pl-s1">message</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">subscribe</span><span class="pl-kos">(</span> <span class="pl-s">'errorMessages'</span><span class="pl-kos">,</span> <span class="pl-s">'customMessageTypeFoo123'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">message</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-en">alert</span><span class="pl-kos">(</span><span class="pl-s1">message</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">// the following would not compile</span> <span class="pl-en">subscribe</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// supplied parameters do not match any signature of call target</span> <span class="pl-en">subscribe</span><span class="pl-kos">(</span><span class="pl-s">'a1'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// argument of type 'string' does not match parameter of type '(message: string) =&gt; void'</span> <span class="pl-en">subscribe</span><span class="pl-kos">(</span><span class="pl-s">'a1'</span><span class="pl-kos">,</span> <span class="pl-s">'a2'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// argument of type 'string' does not match parameter of type '(message: string) =&gt; void'</span></pre></div> <p dir="auto">subscribe compiles to the following JavaScript:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function subscribe() { var events= []; var callback = arguments[arguments.length - 1]; for(var _i = 0; _i &lt; arguments.length - 2; _i++) { events[_i] = arguments[_i]; } }"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">subscribe</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">events</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">var</span> <span class="pl-s1">callback</span> <span class="pl-c1">=</span> <span class="pl-smi">arguments</span><span class="pl-kos">[</span><span class="pl-smi">arguments</span><span class="pl-kos">.</span><span class="pl-c1">length</span> <span class="pl-c1">-</span> <span class="pl-c1">1</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">for</span><span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">_i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">_i</span> <span class="pl-c1">&lt;</span> <span class="pl-smi">arguments</span><span class="pl-kos">.</span><span class="pl-c1">length</span> <span class="pl-c1">-</span> <span class="pl-c1">2</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">events</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-smi">arguments</span><span class="pl-kos">[</span><span class="pl-s1">_i</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">notes: it should be impossible for typescript code to call this function with zero arguments when typechecking. If JS or untyped TS code calls it without arguments, callback will be undefined. However, the same is true of fixed arguments at the beginning of the function.</p> <p dir="auto">edit: used a more realistic/motivating example for the fixed-last/variable-arguments-first function.</p>
1
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.0.2.0 config file = /home/gross/experiments/ansible-bug/ansible.cfg configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.0.2.0 config file = /home/gross/experiments/ansible-bug/ansible.cfg configured module search path = Default w/o overrides </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">System <code class="notranslate">/etc/ansible/ansible.cfg</code> isn't changed.</p> <p dir="auto"><code class="notranslate">/home/gross/experiments/ansible-bug/ansible.cfg</code>:</p> <div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[defaults] hostfile = servers"><pre class="notranslate"><span class="pl-en">[defaults]</span> <span class="pl-k">hostfile</span> = servers</pre></div> <p dir="auto"><code class="notranslate">servers</code>:</p> <div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="localhost ansible_python_interpreter=/usr/bin/python2"><pre class="notranslate">localhost <span class="pl-k">ansible_python_interpreter</span>=/usr/bin/python2</pre></div> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">ArchLinux x86_64, python 2.7.11 (at <code class="notranslate">/usr/bin/python2</code>)</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">Ansible fails when playbook contains <code class="notranslate">failed_when</code> with <code class="notranslate">not in [...]</code> with more than 1 element in list.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">Run <code class="notranslate">ansible-playbook site.yml</code></p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" --- - hosts: - localhost tasks: - shell: /bin/false register: res failed_when: res.rc not in [0,2] - debug: msg={{ res }}"><pre class="notranslate">--- - <span class="pl-ent">hosts</span>: - <span class="pl-s">localhost</span> <span class="pl-ent">tasks</span>: - <span class="pl-ent">shell</span>: <span class="pl-s">/bin/false</span> <span class="pl-ent">register</span>: <span class="pl-s">res</span> <span class="pl-ent">failed_when</span>: <span class="pl-s">res.rc not in [0,2]</span> - <span class="pl-ent">debug</span>: <span class="pl-s">msg={{ res }}</span></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto"><code class="notranslate">ansible-playbook</code> finishes without a error.</p> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto"><code class="notranslate">ansible-playbook</code> error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [command] ***************************************************************** fatal: [localhost]: FAILED! =&gt; {&quot;failed&quot;: true, &quot;msg&quot;: &quot;The conditional check 'res.rc not in [1' failed. The error was: template error while templating string: unexpected '}', expected ']'. String: {% if res.rc not in [1 %} True {% else %} False {% endif %}&quot;}"><pre class="notranslate"><code class="notranslate">TASK [command] ***************************************************************** fatal: [localhost]: FAILED! =&gt; {"failed": true, "msg": "The conditional check 'res.rc not in [1' failed. The error was: template error while templating string: unexpected '}', expected ']'. String: {% if res.rc not in [1 %} True {% else %} False {% endif %}"} </code></pre></div>
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.0.2.0 config file = /home/sfox/.ansible.cfg configured module search path = /home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/library"><pre class="notranslate"><code class="notranslate">ansible 2.0.2.0 config file = /home/sfox/.ansible.cfg configured module search path = /home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/library </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="library = /home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/library forks = 20 sudo_flags = -H -i jinja2_extensions = jinja2.ext.do,jinja2.ext.i18n,jinja2.ext.loopcontrols,jinja2.ext.with_ ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host} action_plugins = /usr/share/ansible_plugins/action_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/action callback_plugins = /usr/share/ansible_plugins/callback_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/callback connection_plugins = /usr/share/ansible_plugins/connection_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/connection lookup_plugins = /usr/share/ansible_plugins/lookup_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/lookup vars_plugins = /usr/share/ansible_plugins/vars_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/vars filter_plugins = /usr/share/ansible_plugins/filter_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/filter nocows = 1"><pre class="notranslate"><code class="notranslate">library = /home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/library forks = 20 sudo_flags = -H -i jinja2_extensions = jinja2.ext.do,jinja2.ext.i18n,jinja2.ext.loopcontrols,jinja2.ext.with_ ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host} action_plugins = /usr/share/ansible_plugins/action_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/action callback_plugins = /usr/share/ansible_plugins/callback_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/callback connection_plugins = /usr/share/ansible_plugins/connection_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/connection lookup_plugins = /usr/share/ansible_plugins/lookup_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/lookup vars_plugins = /usr/share/ansible_plugins/vars_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/vars filter_plugins = /usr/share/ansible_plugins/filter_plugins:/home/sfox/src/sysops/ops/branches/ansible-2.0/ansible/plugins/filter nocows = 1 </code></pre></div> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">From: Fedora 23<br> Managing: Ubuntu Trusty (14.04)</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">I can no longer specify lists or tuples in a failed_when statement like I could with 1.9.x</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">Using this inventory file</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test_host ansible_host=10.0.0.208"><pre class="notranslate"><code class="notranslate">test_host ansible_host=10.0.0.208 </code></pre></div> <p dir="auto">and this playbook</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: My Playbook hosts: test_host gather_facts: no tasks: - shell: ls pants register: result failed_when: result.rc not in [0, 1] #failed_when: &quot;result.rc not in [0, 1]&quot; #failed_when: result.rc not in (0, 1)"><pre class="notranslate"><code class="notranslate">- name: My Playbook hosts: test_host gather_facts: no tasks: - shell: ls pants register: result failed_when: result.rc not in [0, 1] #failed_when: "result.rc not in [0, 1]" #failed_when: result.rc not in (0, 1) </code></pre></div> <p dir="auto">I cannot get Ansible to execute this with or without quotes. Both lists and tuples worked previously.</p> <h5 dir="auto">EXPECTED RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [My Playbook] ************************************************************ TASK: [shell ls pants] ******************************************************** failed: [test_host] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: &quot;ls pants&quot;, &quot;delta&quot;: &quot;0:00:00.003004&quot;, &quot;end&quot;: &quot;2016-04-05 16:29:21.478688&quot;, &quot;failed&quot;: true, &quot;failed_when_result&quot;: true, &quot;rc&quot;: 2, &quot;start&quot;: &quot;2016-04-05 16:29:21.475684&quot;, &quot;stdout_lines&quot;: [], &quot;warnings&quot;: []} stderr: ls: cannot access pants: No such file or directory FATAL: all hosts have already failed -- aborting"><pre class="notranslate"><code class="notranslate">PLAY [My Playbook] ************************************************************ TASK: [shell ls pants] ******************************************************** failed: [test_host] =&gt; {"changed": true, "cmd": "ls pants", "delta": "0:00:00.003004", "end": "2016-04-05 16:29:21.478688", "failed": true, "failed_when_result": true, "rc": 2, "start": "2016-04-05 16:29:21.475684", "stdout_lines": [], "warnings": []} stderr: ls: cannot access pants: No such file or directory FATAL: all hosts have already failed -- aborting </code></pre></div> <h5 dir="auto">ACTUAL RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [My Playbook] ************************************************************* TASK [command] ***************************************************************** fatal: [test_host]: FAILED! =&gt; {&quot;failed&quot;: true, &quot;msg&quot;: &quot;The conditional check 'result.rc not in [0' failed. The error was: template error while templating string: unexpected '}', expected ']'. String: {% if result.rc not in [0 %} True {% else %} False {% endif %}&quot;} NO MORE HOSTS LEFT *************************************************************"><pre class="notranslate"><code class="notranslate">PLAY [My Playbook] ************************************************************* TASK [command] ***************************************************************** fatal: [test_host]: FAILED! =&gt; {"failed": true, "msg": "The conditional check 'result.rc not in [0' failed. The error was: template error while templating string: unexpected '}', expected ']'. String: {% if result.rc not in [0 %} True {% else %} False {% endif %}"} NO MORE HOSTS LEFT ************************************************************* </code></pre></div>
1
<p dir="auto"><strong>Symfony version(s) affected</strong>: 4.2.5</p> <p dir="auto"><strong>Description</strong><br> Issue is related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="428852708" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/30854" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/30854/hovercard" href="https://github.com/symfony/symfony/issues/30854">#30854</a><br> A Service defined in separate file (but not services_{env}.yaml) loose to autowiring in services.yaml</p> <p dir="auto"><strong>How to reproduce</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# config/services/extra.yaml services: _defaults: autowire: true autoconfigure: true App\Foo: arguments: $bar: 'string'"><pre class="notranslate"><code class="notranslate"># config/services/extra.yaml services: _defaults: autowire: true autoconfigure: true App\Foo: arguments: $bar: 'string' </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# config/services.yaml imports: - {resource: 'services/extra.yaml'} services: _defaults: autowire: true autoconfigure: true App\: resource: '../src/*' exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}' App\Controller\: resource: '../src/Controller' tags: ['controller.service_arguments']"><pre class="notranslate"><code class="notranslate"># config/services.yaml imports: - {resource: 'services/extra.yaml'} services: _defaults: autowire: true autoconfigure: true App\: resource: '../src/*' exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}' App\Controller\: resource: '../src/Controller' tags: ['controller.service_arguments'] </code></pre></div> <p dir="auto">Then I got a message <code class="notranslate">Cannot resolve argument $foo of "App\Controller\DefaultController::index()": Cannot autowire service "App\Foo": argument "$bar" of method "__construct()" is type-hinted "string", you should configure its value explicitly</code></p> <p dir="auto"><strong>Additional context</strong><br> In same time moving services/extra.yaml to services_dev.yaml will solve the problem. <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nicolas-grekas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nicolas-grekas">@nicolas-grekas</a> <a href="https://github.com/symfony/symfony/issues/30854#issuecomment-479569049" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/30854/hovercard">said</a> it depends on definition order but I would really expect autowiring has less priority than services defined by hands.</p>
<p dir="auto"><strong>Symfony version(s) affected</strong>: 4.2.4 (not tested on previous versions)</p> <p dir="auto"><strong>Description</strong><br> Services declared in a separate file imported in <code class="notranslate">services.yaml</code> are not initialized correctly.<br> It looks like the <code class="notranslate">autowire: false</code> is not taken into account? <g-emoji class="g-emoji" alias="thinking" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f914.png">🤔</g-emoji></p> <p dir="auto"><strong>How to reproduce</strong><br> See relevant commit in this dedicated repository:<br> <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/odolbeau/symfony_dic_bug/commit/97d710645efae62d0fe1c50b586b96f46a6f8767/hovercard" href="https://github.com/odolbeau/symfony_dic_bug/commit/97d710645efae62d0fe1c50b586b96f46a6f8767">odolbeau/symfony_dic_bug@<tt>97d7106</tt></a></p> <p dir="auto">I have the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Circular reference detected for service &quot;App\Storage\CacheStorage&quot;, path: &quot;App\Storage\CacheStorage -&gt; App\Storage\CacheStorage&quot;."><pre class="notranslate"><code class="notranslate">Circular reference detected for service "App\Storage\CacheStorage", path: "App\Storage\CacheStorage -&gt; App\Storage\CacheStorage". </code></pre></div> <p dir="auto">If you move the configuration from <code class="notranslate">custom_services.yaml</code> to <code class="notranslate">services.yaml</code> &amp; remove the <code class="notranslate">imports</code> at the beginning of the file, it works as expected.<br> If you remove the <code class="notranslate">imports</code> at the beginning of the <code class="notranslate">services.yaml</code> and include <code class="notranslate">custom_services.yaml</code> from the Kernel (method: <code class="notranslate">configureContainer</code>) it works as expected as well.</p>
1
<p dir="auto">Encountering a MemoryError when creating a large sparse random matrix.<br> The matrix is created with scipy.sparse.rand, and even if the density is low enough that only a few elements in the whole matrix should be nonzero (or even none at all), it still tries to allocate a large integer array.</p> <p dir="auto">I'm not sure if this really is a bug, or I'm just using the function wrong. I know it's possible to create an empty sparse matrix and fill it with random values manually. But I thought it a bit strange that it would try to allocate that much.</p> <h4 dir="auto">Reproducing code example:</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from scipy.sparse import rand rand(10**5, 10**5, density=0) "><pre class="notranslate"><code class="notranslate">from scipy.sparse import rand rand(10**5, 10**5, density=0) </code></pre></div> <h4 dir="auto">Error message:</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--------------------------------------------------------------------------- MemoryError Traceback (most recent call last) &lt;ipython-input-68-4d3ba46fe0a7&gt; in &lt;module&gt; ----&gt; 1 rand(10**5, 10**5, density=0) ~/anaconda3/lib/python3.7/site-packages/scipy/sparse/construct.py in rand(m, n, density, format, dtype, random_state) 840 841 &quot;&quot;&quot; --&gt; 842 return random(m, n, density, format, dtype, random_state) ~/anaconda3/lib/python3.7/site-packages/scipy/sparse/construct.py in random(m, n, density, format, dtype, random_state, data_rvs) 786 data_rvs = random_state.rand 787 --&gt; 788 ind = random_state.choice(mn, size=k, replace=False) 789 790 j = np.floor(ind * 1. / m).astype(tp, copy=False) mtrand.pyx in numpy.random.mtrand.RandomState.choice() mtrand.pyx in numpy.random.mtrand.RandomState.permutation() MemoryError: Unable to allocate 74.5 GiB for an array with shape (10000000000,) and data type int64 "><pre class="notranslate"><code class="notranslate">--------------------------------------------------------------------------- MemoryError Traceback (most recent call last) &lt;ipython-input-68-4d3ba46fe0a7&gt; in &lt;module&gt; ----&gt; 1 rand(10**5, 10**5, density=0) ~/anaconda3/lib/python3.7/site-packages/scipy/sparse/construct.py in rand(m, n, density, format, dtype, random_state) 840 841 """ --&gt; 842 return random(m, n, density, format, dtype, random_state) ~/anaconda3/lib/python3.7/site-packages/scipy/sparse/construct.py in random(m, n, density, format, dtype, random_state, data_rvs) 786 data_rvs = random_state.rand 787 --&gt; 788 ind = random_state.choice(mn, size=k, replace=False) 789 790 j = np.floor(ind * 1. / m).astype(tp, copy=False) mtrand.pyx in numpy.random.mtrand.RandomState.choice() mtrand.pyx in numpy.random.mtrand.RandomState.permutation() MemoryError: Unable to allocate 74.5 GiB for an array with shape (10000000000,) and data type int64 </code></pre></div> <h4 dir="auto">Scipy/Numpy/Python version information:</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.4.1 1.18.1 sys.version_info(major=3, minor=7, micro=6, releaselevel='final', serial=0)"><pre class="notranslate"><code class="notranslate">1.4.1 1.18.1 sys.version_info(major=3, minor=7, micro=6, releaselevel='final', serial=0) </code></pre></div>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="341323117" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/9036" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/9036/hovercard" href="https://github.com/scipy/scipy/issues/9036">gh-9036</a> removed a special case in the <code class="notranslate">scipy.sparse.random</code> code, as the numpy implementation of <code class="notranslate">random.choice(..., replace=False)</code> had improved significantly.</p> <p dir="auto">I think we may need to reintroduce the special case, but only for more extreme cases. A quick test shows that <code class="notranslate">np.random.choice(N, k, replace=False)</code> scales linearly in <code class="notranslate">N</code>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [2]: np.__version__ Out[2]: '1.15.4' In [3]: %timeit np.random.choice(100, 10, replace=False) 17 µs ± 62.3 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) In [4]: %timeit np.random.choice(1000, 10, replace=False) 28.9 µs ± 204 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each) In [5]: %timeit np.random.choice(10000, 10, replace=False) 152 µs ± 1.17 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) In [6]: %timeit np.random.choice(100000, 10, replace=False) 1.45 ms ± 6.24 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) In [7]: %timeit np.random.choice(1000000, 10, replace=False) 14.6 ms ± 101 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)"><pre class="notranslate"><code class="notranslate">In [2]: np.__version__ Out[2]: '1.15.4' In [3]: %timeit np.random.choice(100, 10, replace=False) 17 µs ± 62.3 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) In [4]: %timeit np.random.choice(1000, 10, replace=False) 28.9 µs ± 204 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each) In [5]: %timeit np.random.choice(10000, 10, replace=False) 152 µs ± 1.17 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) In [6]: %timeit np.random.choice(100000, 10, replace=False) 1.45 ms ± 6.24 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) In [7]: %timeit np.random.choice(1000000, 10, replace=False) 14.6 ms ± 101 µs per loop (mean ± std. dev. of 7 runs, 100 loops each) </code></pre></div> <p dir="auto">The result I've observed is that <code class="notranslate">scipy.sparse.random</code> gets unbearably slow. For example, when running the example code in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="400566780" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/9697" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/9697/hovercard" href="https://github.com/scipy/scipy/issues/9697">gh-9697</a> on scipy master, constructing the matrix takes over 2 minutes and completely locks my machine for the duration of the <code class="notranslate">np.random.choice</code> call.</p> <p dir="auto">Perhaps the new logic should be:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" if mn &lt; 1e8 or k &gt; 1e4: ind = random_state.choice(mn, size=k, replace=False) else: ind = np.empty(k, dtype=tp) selected = set() for i in xrange(k): j = random_state.randint(mn) while j in selected: j = random_state.randint(mn) selected.add(j) ind[i] = j"><pre class="notranslate"> <span class="pl-k">if</span> <span class="pl-s1">mn</span> <span class="pl-c1">&lt;</span> <span class="pl-c1">1e8</span> <span class="pl-c1">or</span> <span class="pl-s1">k</span> <span class="pl-c1">&gt;</span> <span class="pl-c1">1e4</span>: <span class="pl-s1">ind</span> <span class="pl-c1">=</span> <span class="pl-s1">random_state</span>.<span class="pl-en">choice</span>(<span class="pl-s1">mn</span>, <span class="pl-s1">size</span><span class="pl-c1">=</span><span class="pl-s1">k</span>, <span class="pl-s1">replace</span><span class="pl-c1">=</span><span class="pl-c1">False</span>) <span class="pl-k">else</span>: <span class="pl-s1">ind</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">empty</span>(<span class="pl-s1">k</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">tp</span>) <span class="pl-s1">selected</span> <span class="pl-c1">=</span> <span class="pl-en">set</span>() <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">xrange</span>(<span class="pl-s1">k</span>): <span class="pl-s1">j</span> <span class="pl-c1">=</span> <span class="pl-s1">random_state</span>.<span class="pl-en">randint</span>(<span class="pl-s1">mn</span>) <span class="pl-k">while</span> <span class="pl-s1">j</span> <span class="pl-c1">in</span> <span class="pl-s1">selected</span>: <span class="pl-s1">j</span> <span class="pl-c1">=</span> <span class="pl-s1">random_state</span>.<span class="pl-en">randint</span>(<span class="pl-s1">mn</span>) <span class="pl-s1">selected</span>.<span class="pl-en">add</span>(<span class="pl-s1">j</span>) <span class="pl-s1">ind</span>[<span class="pl-s1">i</span>] <span class="pl-c1">=</span> <span class="pl-s1">j</span></pre></div>
1
<p dir="auto">Can anybody know why kernel is always died? When I excute this cell, a part of Lenet CNN.</p> <ol dir="auto"> <li>Code :</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="with tf.Session() as sess: sess.run(tf.global_variables_initializer()) num_examples = len(X_train) print(&quot;Training...&quot;) print() for i in range(EPOCHS): X_train, y_train = shuffle(X_train, y_train) for offset in range(0, num_examples, BATCH_SIZE): end = offset + BATCH_SIZE batch_x, batch_y = X_train[offset:end], y_train[offset:end] sess.run(training_operation, feed_dict={x: batch_x, y: batch_y}) validation_accuracy = evaluate(X_validation, y_validation) print(&quot;EPOCH {} ...&quot;.format(i+1)) print(&quot;Validation Accuracy = {:.3f}&quot;.format(validation_accuracy)) print() try: saver except NameError: saver=tf.train.Saver() saver.save(sess, './lenet') print(&quot;Model saved&quot;)"><pre class="notranslate"><code class="notranslate">with tf.Session() as sess: sess.run(tf.global_variables_initializer()) num_examples = len(X_train) print("Training...") print() for i in range(EPOCHS): X_train, y_train = shuffle(X_train, y_train) for offset in range(0, num_examples, BATCH_SIZE): end = offset + BATCH_SIZE batch_x, batch_y = X_train[offset:end], y_train[offset:end] sess.run(training_operation, feed_dict={x: batch_x, y: batch_y}) validation_accuracy = evaluate(X_validation, y_validation) print("EPOCH {} ...".format(i+1)) print("Validation Accuracy = {:.3f}".format(validation_accuracy)) print() try: saver except NameError: saver=tf.train.Saver() saver.save(sess, './lenet') print("Model saved") </code></pre></div> <ol start="2" dir="auto"> <li>Error Message :</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_dnn.cc:385] could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_dnn.cc:352] could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM F c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\kernels\conv_ops.cc:532] Check failed: stream-&gt;parent()-&gt;GetConvolveAlgorithms(&amp;algorithms)"><pre class="notranslate"><code class="notranslate">E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_dnn.cc:385] could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_dnn.cc:352] could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM F c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\kernels\conv_ops.cc:532] Check failed: stream-&gt;parent()-&gt;GetConvolveAlgorithms(&amp;algorithms) </code></pre></div> <p dir="auto">Then, the kernel is died....it is crazy. Please let me know the solution</p> <ol start="3" dir="auto"> <li>Environment<br> Window 10 (No Ubantu)<br> Anaconda w/Jupyter Notebook<br> Tensorflow w/GPU (Cuda 8.0, cuDNN 5.1)</li> </ol> <p dir="auto">Thank you!!</p>
<p dir="auto">Tensorflow (GPU) was imported successfully, but when running a session that involves a convolutional neural network (CNN), Python crashes with the following message:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E tensorflow/stream_executor/cuda/cuda_dnn.cc:385] could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR E tensorflow/stream_executor/cuda/cuda_dnn.cc:352] could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM F tensorflow/core/kernels/conv_ops.cc:605] Check failed: stream-&gt;parent()-&gt;GetConvolveAlgorithms(&amp;algorithms) "><pre class="notranslate"><code class="notranslate">E tensorflow/stream_executor/cuda/cuda_dnn.cc:385] could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR E tensorflow/stream_executor/cuda/cuda_dnn.cc:352] could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM F tensorflow/core/kernels/conv_ops.cc:605] Check failed: stream-&gt;parent()-&gt;GetConvolveAlgorithms(&amp;algorithms) </code></pre></div> <p dir="auto">The problem persists on any combination of CUDA toolkit 7.5/8.0 and Tensorflow installed from pip/source. Test sessions that do not use CNNs are run successfully.</p> <h3 dir="auto">What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?</h3> <p dir="auto">The issue is similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="198250581" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/6586" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/6586/hovercard" href="https://github.com/tensorflow/tensorflow/issues/6586">#6586</a>, where I first commented. But since I experience the problem on a Mac, I was suggested to open a separate issue.</p> <h3 dir="auto">Environment info</h3> <p dir="auto">Operating System: macOS Sierra 10.12.2<br> Xcode version 8.2 (8C38) (When I later tried CUDA 7.5, I installed Command Line Tools version 7.3.1 because CUDA 7.5 lacked support of the more recent compilers.)<br> Python 3.5.2 (anaconda)</p> <p dir="auto">Installed version of CUDA: tried both 8.0 (initially) and 7.5 (reported here, toolkit only -- the driver is still 8.0)<br> Installed version of cuDNN: 5.1 (different installations according to CUDA versions)<br> (please attach the output of <code class="notranslate">ls -l /path/to/cuda/lib/libcud*</code>):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="lrwxr-xr-x 1 root wheel 33 5 Jan 20:33 /usr/local/cuda/lib/libcuda.1.dylib -&gt; /usr/local/cuda/lib/libcuda.dylib -rwxr-xr-x@ 1 root wheel 8280 13 Apr 2016 /usr/local/cuda/lib/libcuda.dylib lrwxr-xr-x@ 1 root wheel 45 13 Apr 2016 /usr/local/cuda/lib/libcudadevrt.a -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudadevrt.a lrwxr-xr-x@ 1 root wheel 50 13 Apr 2016 /usr/local/cuda/lib/libcudart.7.5.dylib -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudart.7.5.dylib lrwxr-xr-x@ 1 root wheel 46 13 Apr 2016 /usr/local/cuda/lib/libcudart.dylib -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudart.dylib lrwxr-xr-x@ 1 root wheel 49 13 Apr 2016 /usr/local/cuda/lib/libcudart_static.a -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudart_static.a lrwxr-xr-x 1 root wheel 16 5 Jan 17:14 /usr/local/cuda/lib/libcudnn.5 -&gt; libcudnn.5.dylib -rwxr-xr-x@ 1 ymfa staff 58975112 10 Jun 2016 /usr/local/cuda/lib/libcudnn.5.dylib lrwxr-xr-x@ 1 ymfa staff 16 10 Jun 2016 /usr/local/cuda/lib/libcudnn.dylib -&gt; libcudnn.5.dylib lrwxr-xr-x 1 root wheel 16 5 Jan 17:14 /usr/local/cuda/lib/libcudnn5.dylib -&gt; libcudnn.5.dylib -rw-r--r--@ 1 ymfa staff 56392320 10 Jun 2016 /usr/local/cuda/lib/libcudnn_static.a"><pre class="notranslate"><code class="notranslate">lrwxr-xr-x 1 root wheel 33 5 Jan 20:33 /usr/local/cuda/lib/libcuda.1.dylib -&gt; /usr/local/cuda/lib/libcuda.dylib -rwxr-xr-x@ 1 root wheel 8280 13 Apr 2016 /usr/local/cuda/lib/libcuda.dylib lrwxr-xr-x@ 1 root wheel 45 13 Apr 2016 /usr/local/cuda/lib/libcudadevrt.a -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudadevrt.a lrwxr-xr-x@ 1 root wheel 50 13 Apr 2016 /usr/local/cuda/lib/libcudart.7.5.dylib -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudart.7.5.dylib lrwxr-xr-x@ 1 root wheel 46 13 Apr 2016 /usr/local/cuda/lib/libcudart.dylib -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudart.dylib lrwxr-xr-x@ 1 root wheel 49 13 Apr 2016 /usr/local/cuda/lib/libcudart_static.a -&gt; /Developer/NVIDIA/CUDA-7.5/lib/libcudart_static.a lrwxr-xr-x 1 root wheel 16 5 Jan 17:14 /usr/local/cuda/lib/libcudnn.5 -&gt; libcudnn.5.dylib -rwxr-xr-x@ 1 ymfa staff 58975112 10 Jun 2016 /usr/local/cuda/lib/libcudnn.5.dylib lrwxr-xr-x@ 1 ymfa staff 16 10 Jun 2016 /usr/local/cuda/lib/libcudnn.dylib -&gt; libcudnn.5.dylib lrwxr-xr-x 1 root wheel 16 5 Jan 17:14 /usr/local/cuda/lib/libcudnn5.dylib -&gt; libcudnn.5.dylib -rw-r--r--@ 1 ymfa staff 56392320 10 Jun 2016 /usr/local/cuda/lib/libcudnn_static.a </code></pre></div> <p dir="auto">I tried both installing from pip and source. I first installed from binary pip package:</p> <ol dir="auto"> <li>A link to the pip package you installed:<br> <code class="notranslate">tensorflow-gpu</code></li> <li>The output from <code class="notranslate">python -c "import tensorflow; print(tensorflow.__version__)"</code>.<br> <code class="notranslate">0.12.head</code></li> </ol> <p dir="auto">Later I installed from source (the pip package was uninstalled):</p> <ol dir="auto"> <li> <p dir="auto">The commit hash (<code class="notranslate">git rev-parse HEAD</code>)<br> <code class="notranslate">d67c09d98a576e1fbf2f3609ddb842e53890f31c</code></p> </li> <li> <p dir="auto">The output of <code class="notranslate">bazel version</code></p> <p dir="auto">Build label: 0.4.3-homebrew<br> Build target: bazel-out/local-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar<br> Build time: Thu Dec 22 15:20:15 2016 (1482420015)<br> Build timestamp: 1482420015<br> Build timestamp as int: 1482420015</p> </li> </ol> <h3 dir="auto">If possible, provide a minimal reproducible example</h3> <p dir="auto">I made a minimal example by simplifying the network and reducing the training data to only twenty images and two classes for classification. <a href="https://github.com/tensorflow/tensorflow/files/691561/issue.zip">issue.zip</a> contains the Python code and the data. I wrote two convolutional layers because I found the network with only one convolutional layer runs without problem.</p> <h3 dir="auto">Complete log using CUDA 7.5 and Tensorflow compiled from source</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.7.5.dylib locally I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.5.dylib locally I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.7.5.dylib locally I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcuda.1.dylib locally I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.7.5.dylib locally W tensorflow/core/platform/cpu_feature_guard.cc:95] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:95] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:95] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:874] OS X does not support NUMA - returning NUMA node zero I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties: name: GeForce GT 650M major: 3 minor: 0 memoryClockRate (GHz) 0.9 pciBusID 0000:01:00.0 Total memory: 1023.69MiB Free memory: 740.18MiB I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0 I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0: Y I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -&gt; (device: 0, name: GeForce GT 650M, pci bus id: 0000:01:00.0) E tensorflow/stream_executor/cuda/cuda_dnn.cc:385] could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR E tensorflow/stream_executor/cuda/cuda_dnn.cc:352] could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM F tensorflow/core/kernels/conv_ops.cc:605] Check failed: stream-&gt;parent()-&gt;GetConvolveAlgorithms(&amp;algorithms) "><pre class="notranslate"><code class="notranslate">I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.7.5.dylib locally I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.5.dylib locally I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.7.5.dylib locally I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcuda.1.dylib locally I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.7.5.dylib locally W tensorflow/core/platform/cpu_feature_guard.cc:95] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:95] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:95] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:874] OS X does not support NUMA - returning NUMA node zero I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties: name: GeForce GT 650M major: 3 minor: 0 memoryClockRate (GHz) 0.9 pciBusID 0000:01:00.0 Total memory: 1023.69MiB Free memory: 740.18MiB I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0 I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0: Y I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -&gt; (device: 0, name: GeForce GT 650M, pci bus id: 0000:01:00.0) E tensorflow/stream_executor/cuda/cuda_dnn.cc:385] could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR E tensorflow/stream_executor/cuda/cuda_dnn.cc:352] could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM F tensorflow/core/kernels/conv_ops.cc:605] Check failed: stream-&gt;parent()-&gt;GetConvolveAlgorithms(&amp;algorithms) </code></pre></div> <h3 dir="auto">Complete log using CUDA 8.0 and Tensorflow installed from pip</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.dylib locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.dylib locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.dylib locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.1.dylib locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.dylib locally I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:901] OS X does not support NUMA - returning NUMA node zero I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties: name: GeForce GT 650M major: 3 minor: 0 memoryClockRate (GHz) 0.9 pciBusID 0000:01:00.0 Total memory: 1023.69MiB Free memory: 590.00MiB I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0 I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0: Y I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -&gt; (device: 0, name: GeForce GT 650M, pci bus id: 0000:01:00.0) E tensorflow/stream_executor/cuda/cuda_dnn.cc:385] could not create cudnn handle: CUDNN_STATUS_NOT_INITIALIZED E tensorflow/stream_executor/cuda/cuda_dnn.cc:392] error retrieving driver version: Invalid argument: expected %d.%d or %d.%d.%d form for driver version; got &quot;&quot; E tensorflow/stream_executor/cuda/cuda_dnn.cc:352] could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM F tensorflow/core/kernels/conv_ops.cc:532] Check failed: stream-&gt;parent()-&gt;GetConvolveAlgorithms(&amp;algorithms)"><pre class="notranslate"><code class="notranslate">I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.dylib locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.dylib locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.dylib locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.1.dylib locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.dylib locally I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:901] OS X does not support NUMA - returning NUMA node zero I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties: name: GeForce GT 650M major: 3 minor: 0 memoryClockRate (GHz) 0.9 pciBusID 0000:01:00.0 Total memory: 1023.69MiB Free memory: 590.00MiB I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0 I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0: Y I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -&gt; (device: 0, name: GeForce GT 650M, pci bus id: 0000:01:00.0) E tensorflow/stream_executor/cuda/cuda_dnn.cc:385] could not create cudnn handle: CUDNN_STATUS_NOT_INITIALIZED E tensorflow/stream_executor/cuda/cuda_dnn.cc:392] error retrieving driver version: Invalid argument: expected %d.%d or %d.%d.%d form for driver version; got "" E tensorflow/stream_executor/cuda/cuda_dnn.cc:352] could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM F tensorflow/core/kernels/conv_ops.cc:532] Check failed: stream-&gt;parent()-&gt;GetConvolveAlgorithms(&amp;algorithms) </code></pre></div>
1
<pre class="notranslate">In the go.tools repo, godoc/vfs/vfs.go defines a very useful FileSystem type: type FileSystem interface { Opener Lstat(path string) (os.FileInfo, error) Stat(path string) (os.FileInfo, error) ReadDir(path string) ([]os.FileInfo, error) String() string } type Opener interface { Open(name string) (ReadSeekCloser, error) } type ReadSeekCloser interface { io.Reader io.Seeker io.Closer } There are other useful packages in go.tools (and elsewhere on GitHub) that make use of FileSystem interface implementations. But the fact that ReadSeekCloser is a named type makes it impossible (as best I can tell) to implement vfs.FileSystem in an external package without importing vfs (and thus pulling down the whole go.tools repo). This goes against the spirit of implicit satisfaction of interfaces. For example, I created a package (<a href="https://sourcegraph.com/sourcegraph/go-vcs)" rel="nofollow">https://sourcegraph.com/sourcegraph/go-vcs)</a> that implements an almost identical interface to vfs.FileSystem, but to avoid adding go.tools as a dependency, I copied the 3 above types to my package. Now people want to use my package's VCS FileSystem implementation with other godoc/vfs/... packages, and they can't (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="45719242" data-permission-text="Title is private" data-url="https://github.com/sourcegraph/go-vcs/issues/11" data-hovercard-type="issue" data-hovercard-url="/sourcegraph/go-vcs/issues/11/hovercard" href="https://github.com/sourcegraph/go-vcs/issues/11">sourcegraph/go-vcs#11</a>. I believe that vfs.FileSystem is an extremely useful building block, and it would make it much easier if people could build interchangeable implementations of it without importing go.tools. (As an aside, we use it in multiple places at Sourcegraph, and Jeremy Saenz mentioned it on stage at dotGo as a "hidden gem".) Would you consider any of the following solutions? 1) Changing godoc/vfs's (Opener).Open method to return (interface{io.Reader;io.Seeker;io.Closer},error) instead of creating a separate named ReadSeekCloser type (external packages could satisfy the interface by simply using the anonymous interface type) 2) Adding ReadSeekCloser to the stdlib as io.ReadSeekCloser</pre>
<p dir="auto">by <strong>ibit.zee</strong>:</p> <pre class="notranslate">go version go1.2.1 windows/386 command line is : go run _test1.go error is : no buildable Go source files in C:\APL\!PROGRAMMING\GO the problem is the underscore (_) in the file name, causes the file to not be found... ZEE ;-)</pre>
0
<p dir="auto">See sample playbook at <a href="https://github.com/abdulg/ansible-common-roles">https://github.com/abdulg/ansible-common-roles</a></p> <p dir="auto">Using ansible 1.4.4.</p> <p dir="auto">When using Ansible roles I ran into a problem where common roles were being skipped. The linked repo is a demonstration of the issue. There are 2 roles, <em>role1</em> and <em>role2</em>, each of which depend on a 3rd role, <em>common</em>.</p> <p dir="auto">I have three playbooks, <em>playbook.yml</em>, <em>role1.yml</em>, and <em>role2.yml</em>. The first playbook selects a role to execute based upon a variable passed via the command line. The second 2 simply execute <em>role1</em> and <em>role2</em> respectively.</p> <p dir="auto">Here is the result of running the <em>role1</em> playbook:-</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="⚡ ansible-playbook -i inventory role1.yml PLAY [Playbook to do role 1] ************************************************** GATHERING FACTS *************************************************************** ok: [abdul] TASK: [common | A common task] ************************************************ changed: [abdul] TASK: [role1 | A role1 task] ************************************************** changed: [abdul] PLAY RECAP ******************************************************************** abdul : ok=3 changed=2 unreachable=0 failed=0"><pre class="notranslate"><code class="notranslate">⚡ ansible-playbook -i inventory role1.yml PLAY [Playbook to do role 1] ************************************************** GATHERING FACTS *************************************************************** ok: [abdul] TASK: [common | A common task] ************************************************ changed: [abdul] TASK: [role1 | A role1 task] ************************************************** changed: [abdul] PLAY RECAP ******************************************************************** abdul : ok=3 changed=2 unreachable=0 failed=0 </code></pre></div> <p dir="auto">And as expected, running <em>role2</em> is similar:-</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [Playbook to do role2] *************************************************** GATHERING FACTS *************************************************************** ok: [abdul] TASK: [common | A common task] ************************************************ changed: [abdul] TASK: [role2 | A role2 task] ************************************************** changed: [abdul] PLAY RECAP ******************************************************************** abdul : ok=3 changed=2 unreachable=0 failed=0"><pre class="notranslate"><code class="notranslate">PLAY [Playbook to do role2] *************************************************** GATHERING FACTS *************************************************************** ok: [abdul] TASK: [common | A common task] ************************************************ changed: [abdul] TASK: [role2 | A role2 task] ************************************************** changed: [abdul] PLAY RECAP ******************************************************************** abdul : ok=3 changed=2 unreachable=0 failed=0 </code></pre></div> <p dir="auto">But see what happens when I run <em>playbook.yml</em>, wherein I select the role to run via a CL variable. First select to run <em>role1</em>:-</p> <p dir="auto"><g-emoji class="g-emoji" alias="zap" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/26a1.png">⚡</g-emoji> ansible-playbook -i inventory playbook.yml -e do_role=role1</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [Configure depending on passed in variable] ****************************** GATHERING FACTS *************************************************************** ok: [abdul] TASK: [common | A common task] ************************************************ changed: [abdul] TASK: [role1 | A role1 task] ************************************************** changed: [abdul] TASK: [role2 | A role2 task] ************************************************** skipping: [abdul] PLAY RECAP ******************************************************************** abdul : ok=3 changed=2 unreachable=0 failed=0"><pre class="notranslate"><code class="notranslate">PLAY [Configure depending on passed in variable] ****************************** GATHERING FACTS *************************************************************** ok: [abdul] TASK: [common | A common task] ************************************************ changed: [abdul] TASK: [role1 | A role1 task] ************************************************** changed: [abdul] TASK: [role2 | A role2 task] ************************************************** skipping: [abdul] PLAY RECAP ******************************************************************** abdul : ok=3 changed=2 unreachable=0 failed=0 </code></pre></div> <p dir="auto">The roles <em>common</em> and <em>role1</em> are run, and <em>role2</em> is skipped. All ok.</p> <p dir="auto">Now I select <em>role2</em> in <em>playbook.yml</em>_:-</p> <p dir="auto"><g-emoji class="g-emoji" alias="zap" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/26a1.png">⚡</g-emoji> ansible-playbook -i inventory playbook.yml -e do_role=role2</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [Configure depending on passed in variable] ****************************** GATHERING FACTS *************************************************************** ok: [abdul] TASK: [common | A common task] ************************************************ skipping: [abdul] TASK: [role1 | A role1 task] ************************************************** skipping: [abdul] TASK: [role2 | A role2 task] ************************************************** changed: [abdul] PLAY RECAP ******************************************************************** abdul : ok=2 changed=1 unreachable=0 failed=0"><pre class="notranslate"><code class="notranslate">PLAY [Configure depending on passed in variable] ****************************** GATHERING FACTS *************************************************************** ok: [abdul] TASK: [common | A common task] ************************************************ skipping: [abdul] TASK: [role1 | A role1 task] ************************************************** skipping: [abdul] TASK: [role2 | A role2 task] ************************************************** changed: [abdul] PLAY RECAP ******************************************************************** abdul : ok=2 changed=1 unreachable=0 failed=0 </code></pre></div> <p dir="auto">The <em>common</em> role is skipped because <em>role1</em> is skipped, and <em>common</em> is a dependency of <em>role1</em>. <em>common</em> should be not be skipped because it's a dependency of <em>role2</em> .</p>
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto"><code class="notranslate">iptables.py</code></p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.4.2.0 config file = /etc/ansible/ansible.cfg configured module search path = [u'/usr/share/my_modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]"><pre class="notranslate"><code class="notranslate">ansible 2.4.2.0 config file = /etc/ansible/ansible.cfg configured module search path = [u'/usr/share/my_modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 5 DEFAULT_MODULE_PATH(/etc/ansible/ansible.cfg) = [u'/usr/share/my_modules'] DEFAULT_MODULE_UTILS_PATH(/etc/ansible/ansible.cfg) = [u'/usr/share/my_module_utils'] DEFAULT_REMOTE_USER(/etc/ansible/ansible.cfg) = root DEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = [u'/etc/ansible/roles', u'/usr/share/ansible/roles'] HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False"><pre class="notranslate"><code class="notranslate">DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 5 DEFAULT_MODULE_PATH(/etc/ansible/ansible.cfg) = [u'/usr/share/my_modules'] DEFAULT_MODULE_UTILS_PATH(/etc/ansible/ansible.cfg) = [u'/usr/share/my_module_utils'] DEFAULT_REMOTE_USER(/etc/ansible/ansible.cfg) = root DEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = [u'/etc/ansible/roles', u'/usr/share/ansible/roles'] HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False </code></pre></div> <h5 dir="auto">OS / ENVIRONMENT</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="running CentOS Linux release 7.4.1708 manage CentOS Linux 6.X and 7.X"><pre class="notranslate"><code class="notranslate">running CentOS Linux release 7.4.1708 manage CentOS Linux 6.X and 7.X </code></pre></div> <h5 dir="auto">SUMMARY</h5> <p dir="auto">i have iptables rule:<br> <code class="notranslate">iptables -A OUTPUT -p tcp --tcp-flags ALL ACK,RST,SYN,FIN -j DROP</code></p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: TCP ALL ACK,RST,SYN,FIN iptables: chain: OUTPUT protocol: tcp tcp_flags: flags=&quot;ALL&quot; flags_set=&quot;ACK,RST,SYN,FIN&quot; jump: drop"><pre class="notranslate"><code class="notranslate">- name: TCP ALL ACK,RST,SYN,FIN iptables: chain: OUTPUT protocol: tcp tcp_flags: flags="ALL" flags_set="ACK,RST,SYN,FIN" jump: drop </code></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto"><code class="notranslate">/usr/sbin/iptables -t filter -A OUTPUT -p tcp --tcp-flags ALL ACK,RST,SYN,FIN -j drop</code></p> <h5 dir="auto">ACTUAL RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [192.168.0.151]: FAILED! =&gt; { &quot;changed&quot;: false, &quot;cmd&quot;: &quot;/usr/sbin/iptables -t filter -A OUTPUT -p tcp --tcp-flags A,L,L A,C,K,,,R,S,T,,,S,Y,N,,,F,I,N -j drop&quot;, &quot;invocation&quot;: { &quot;module_args&quot;: { &quot;action&quot;: &quot;append&quot;, &quot;chain&quot;: &quot;OUTPUT&quot;, &quot;comment&quot;: null, &quot;ctstate&quot;: [], &quot;destination&quot;: null, &quot;destination_port&quot;: null, &quot;flush&quot;: false, &quot;fragment&quot;: null, &quot;goto&quot;: null, &quot;icmp_type&quot;: null, &quot;in_interface&quot;: null, &quot;ip_version&quot;: &quot;ipv4&quot;, &quot;jump&quot;: &quot;drop&quot;, &quot;limit&quot;: null, &quot;limit_burst&quot;: null, &quot;match&quot;: [], &quot;out_interface&quot;: null, &quot;policy&quot;: null, &quot;protocol&quot;: &quot;tcp&quot;, &quot;reject_with&quot;: null, &quot;set_counters&quot;: null, &quot;set_dscp_mark&quot;: null, &quot;set_dscp_mark_class&quot;: null, &quot;source&quot;: null, &quot;source_port&quot;: null, &quot;state&quot;: &quot;present&quot;, &quot;table&quot;: &quot;filter&quot;, &quot;tcp_flags&quot;: { &quot;flags&quot;: &quot;ALL&quot;, &quot;flags_set&quot;: &quot;ACK,RST,SYN,FIN&quot; }, &quot;to_destination&quot;: null, &quot;to_ports&quot;: null, &quot;to_source&quot;: null, &quot;uid_owner&quot;: null } }, &quot;msg&quot;: &quot;iptables v1.4.21: Unknown TCP flag `A'\nTry `iptables -h' or 'iptables --help' for more information.&quot;, &quot;rc&quot;: 2, &quot;stderr&quot;: &quot;iptables v1.4.21: Unknown TCP flag `A'\nTry `iptables -h' or 'iptables --help' for more information.\n&quot;, &quot;stderr_lines&quot;: [ &quot;iptables v1.4.21: Unknown TCP flag `A'&quot;, &quot;Try `iptables -h' or 'iptables --help' for more information.&quot; ], &quot;stdout&quot;: &quot;&quot;, &quot;stdout_lines&quot;: [] } "><pre class="notranslate"><code class="notranslate">fatal: [192.168.0.151]: FAILED! =&gt; { "changed": false, "cmd": "/usr/sbin/iptables -t filter -A OUTPUT -p tcp --tcp-flags A,L,L A,C,K,,,R,S,T,,,S,Y,N,,,F,I,N -j drop", "invocation": { "module_args": { "action": "append", "chain": "OUTPUT", "comment": null, "ctstate": [], "destination": null, "destination_port": null, "flush": false, "fragment": null, "goto": null, "icmp_type": null, "in_interface": null, "ip_version": "ipv4", "jump": "drop", "limit": null, "limit_burst": null, "match": [], "out_interface": null, "policy": null, "protocol": "tcp", "reject_with": null, "set_counters": null, "set_dscp_mark": null, "set_dscp_mark_class": null, "source": null, "source_port": null, "state": "present", "table": "filter", "tcp_flags": { "flags": "ALL", "flags_set": "ACK,RST,SYN,FIN" }, "to_destination": null, "to_ports": null, "to_source": null, "uid_owner": null } }, "msg": "iptables v1.4.21: Unknown TCP flag `A'\nTry `iptables -h' or 'iptables --help' for more information.", "rc": 2, "stderr": "iptables v1.4.21: Unknown TCP flag `A'\nTry `iptables -h' or 'iptables --help' for more information.\n", "stderr_lines": [ "iptables v1.4.21: Unknown TCP flag `A'", "Try `iptables -h' or 'iptables --help' for more information." ], "stdout": "", "stdout_lines": [] } </code></pre></div>
0
<h1 dir="auto">Version Info</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; versioninfo() Julia Version 1.1.1 Platform Info: OS: Linux (x86_64-conda_cos6-linux-gnu) CPU: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-6.0.1 (ORCJIT, ivybridge)"><pre class="notranslate"><code class="notranslate">julia&gt; versioninfo() Julia Version 1.1.1 Platform Info: OS: Linux (x86_64-conda_cos6-linux-gnu) CPU: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-6.0.1 (ORCJIT, ivybridge) </code></pre></div> <h1 dir="auto">Julia Console</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; global_vote = zeros(1) 1-element Array{Float64,1}: 0.0 julia&gt; for i in 1:1 global_vote = global_vote .+ 1 end ERROR: UndefVarError: global_vote not defined Stacktrace: [1] top-level scope at ./REPL[2]:2 [inlined] [2] top-level scope at ./none:0"><pre class="notranslate"><code class="notranslate">julia&gt; global_vote = zeros(1) 1-element Array{Float64,1}: 0.0 julia&gt; for i in 1:1 global_vote = global_vote .+ 1 end ERROR: UndefVarError: global_vote not defined Stacktrace: [1] top-level scope at ./REPL[2]:2 [inlined] [2] top-level scope at ./none:0 </code></pre></div> <h1 dir="auto">Jupyter Kernel</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="global_vote = zeros(1) for i in 1:1 global_vote = global_vote .+ 1 end print(global_vote) [1.0]"><pre class="notranslate"><code class="notranslate">global_vote = zeros(1) for i in 1:1 global_vote = global_vote .+ 1 end print(global_vote) [1.0] </code></pre></div> <h1 dir="auto">Work Around in Julia Console</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="for i in 1:1 global global_vote = global_vote .+ 1 end"><pre class="notranslate"><code class="notranslate">for i in 1:1 global global_vote = global_vote .+ 1 end </code></pre></div>
<h3 dir="auto">Example 1</h3> <p dir="auto">This came up with a student who upgraded from 0.6 to 1.0 directly, so never even got a chance to see a deprecation warning, let alone find an explanation for new behavior:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; beforefor = true true julia&gt; for i in 1:2 beforefor = false end julia&gt; beforefor # this is surprising bit true julia&gt; beforeif = true true julia&gt; if 1 == 1 beforeif = false end false julia&gt; beforeif # Another surprise! false julia&gt; function foo() infunc = true for i in 1:10 infunc = false end @show infunc end foo (generic function with 1 method) julia&gt; foo() # &quot;I don't get this&quot; infunc = false "><pre class="notranslate">julia<span class="pl-k">&gt;</span> beforefor <span class="pl-k">=</span> <span class="pl-c1">true</span> <span class="pl-c1">true</span> julia<span class="pl-k">&gt;</span> <span class="pl-k">for</span> i <span class="pl-k">in</span> <span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">2</span> beforefor <span class="pl-k">=</span> <span class="pl-c1">false</span> <span class="pl-k">end</span> julia<span class="pl-k">&gt;</span> beforefor <span class="pl-c"><span class="pl-c">#</span> this is surprising bit</span> <span class="pl-c1">true</span> julia<span class="pl-k">&gt;</span> beforeif <span class="pl-k">=</span> <span class="pl-c1">true</span> <span class="pl-c1">true</span> julia<span class="pl-k">&gt;</span> <span class="pl-k">if</span> <span class="pl-c1">1</span> <span class="pl-k">==</span> <span class="pl-c1">1</span> beforeif <span class="pl-k">=</span> <span class="pl-c1">false</span> <span class="pl-k">end</span> <span class="pl-c1">false</span> julia<span class="pl-k">&gt;</span> beforeif <span class="pl-c"><span class="pl-c">#</span> Another surprise!</span> <span class="pl-c1">false</span> julia<span class="pl-k">&gt;</span> <span class="pl-k">function</span> <span class="pl-en">foo</span>() infunc <span class="pl-k">=</span> <span class="pl-c1">true</span> <span class="pl-k">for</span> i <span class="pl-k">in</span> <span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">10</span> infunc <span class="pl-k">=</span> <span class="pl-c1">false</span> <span class="pl-k">end</span> <span class="pl-c1">@show</span> infunc <span class="pl-k">end</span> foo (generic <span class="pl-k">function</span> with <span class="pl-c1">1</span> method) julia<span class="pl-k">&gt;</span> <span class="pl-c1">foo</span>() <span class="pl-c"><span class="pl-c">#</span> "I don't get this"</span> infunc <span class="pl-k">=</span> <span class="pl-c1">false</span> </pre></div> <h3 dir="auto">Example 2</h3> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; total_lines = 0 0 julia&gt; list_of_files = [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;] 3-element Array{String,1}: &quot;a&quot; &quot;b&quot; &quot;c&quot; julia&gt; for file in list_of_files # fake read file lines_in_file = 5 total_lines += lines_in_file end ERROR: UndefVarError: total_lines not defined Stacktrace: [1] top-level scope at ./REPL[3]:4 [inlined] [2] top-level scope at ./none:0 julia&gt; total_lines # This crushs the students willingness to learn 0"><pre class="notranslate">julia<span class="pl-k">&gt;</span> total_lines <span class="pl-k">=</span> <span class="pl-c1">0</span> <span class="pl-c1">0</span> julia<span class="pl-k">&gt;</span> list_of_files <span class="pl-k">=</span> [<span class="pl-s"><span class="pl-pds">"</span>a<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>b<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>c<span class="pl-pds">"</span></span>] <span class="pl-c1">3</span><span class="pl-k">-</span>element Array{String,<span class="pl-c1">1</span>}<span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">"</span>a<span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">"</span>b<span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">"</span>c<span class="pl-pds">"</span></span> julia<span class="pl-k">&gt;</span> <span class="pl-k">for</span> file <span class="pl-k">in</span> list_of_files <span class="pl-c"><span class="pl-c">#</span> fake read file</span> lines_in_file <span class="pl-k">=</span> <span class="pl-c1">5</span> total_lines <span class="pl-k">+=</span> lines_in_file <span class="pl-k">end</span> ERROR<span class="pl-k">:</span> UndefVarError<span class="pl-k">:</span> total_lines not defined Stacktrace<span class="pl-k">:</span> [<span class="pl-c1">1</span>] top<span class="pl-k">-</span>level scope at <span class="pl-k">./</span>REPL[<span class="pl-c1">3</span>]<span class="pl-k">:</span><span class="pl-c1">4</span> [inlined] [<span class="pl-c1">2</span>] top<span class="pl-k">-</span>level scope at <span class="pl-k">./</span>none<span class="pl-k">:</span><span class="pl-c1">0</span> julia<span class="pl-k">&gt;</span> total_lines <span class="pl-c"><span class="pl-c">#</span> This crushs the students willingness to learn</span> <span class="pl-c1">0</span></pre></div> <p dir="auto">I "get" why this happens in the sense that I think I can explain, with sufficient reference to the arcana in the manual about what introduces scopes and what doesn't, but I think that this is problematic for interactive use.</p> <p dir="auto">In example one, you get a silent failure. In example two, you get an error message that is very there-is-no-spoon. Thats roughly comparable to some Python code I wrote in a notebook at work today.</p> <p dir="auto">I'm not sure what the rules are in Python, but I do know that generally you can't assign to things at the global scope without invoking global. But at the REPL it does work, presumably because at the REPL the rules are different or the same logic as if they were all are in the scope of function is applied.</p> <p dir="auto">I can't language-lawyer the rules enough to propose the concrete change I would like, and based on Slack this isn't even necessarily perceived as an issue by some people, so I don't know where to go with this except to flag it.</p> <p dir="auto">Cross-refs:<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="189236901" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/19324" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/19324/hovercard" href="https://github.com/JuliaLang/julia/pull/19324">#19324</a><br> <a href="https://discourse.julialang.org/t/repl-and-for-loops-scope-behavior-change/13514" rel="nofollow">https://discourse.julialang.org/t/repl-and-for-loops-scope-behavior-change/13514</a><br> <a href="https://stackoverflow.com/questions/51930537/scope-of-variables-in-julia" rel="nofollow">https://stackoverflow.com/questions/51930537/scope-of-variables-in-julia</a></p>
1
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: [v1.31.0]</li> <li>Operating System: [All]</li> <li>Browser: [All, Chromium, Firefox, WebKit]</li> <li>Other info:</li> </ul> <p dir="auto">I am doing visual regression test with @web/test-runner and playwright library, after the playwright upgrade to 1.31.0 from 1.22.0 then screenshots started breaking due to fonts rendering change and screenshot width and height change, most of the issues are in firefox and webkit</p>
<p dir="auto"><strong>Context:</strong></p> <ul dir="auto"> <li>Playwright Version: @playwright/test, @playwright/experimental-ct-react, playwright 1.27.1</li> <li>Operating System: PopOS 20.04 LTS</li> <li>Node.js version: 19.0.0</li> <li>Browser: All</li> <li>Extra:</li> </ul> <p dir="auto"><strong>Describe the bug</strong></p> <p dir="auto">My tests were just working fine until a few days ago. I have no idea what I changed to make it behave this way. I have tried removing node_modules and <code class="notranslate">./playwright/.cache/</code> and re-installing, but the same errors occur. I have no idea why the tests are running twice and there is no info online about the error I'm seeing.</p> <p dir="auto">Failed tests:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/505c0828506baf289224e654314737d93b3f9698d71dee915e09e38ff5f56c72/68747470733a2f2f692e696d6775722e636f6d2f4250577168324d2e706e67"><img src="https://camo.githubusercontent.com/505c0828506baf289224e654314737d93b3f9698d71dee915e09e38ff5f56c72/68747470733a2f2f692e696d6775722e636f6d2f4250577168324d2e706e67" alt="test failure" data-canonical-src="https://i.imgur.com/BPWqh2M.png" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Code Snippet</strong></p> <p dir="auto">One of the tests that both fails and succeeds:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { test, expect } from '@playwright/experimental-ct-react' import FolderSelector from './FolderSelector' test.describe('has correct styles', async () =&gt; { test('has full width', async ({ mount }) =&gt; { const component = await mount(&lt;FolderSelector /&gt;) const button = component.locator('button') await expect(component).toHaveClass(/w-full/) await expect(button).toHaveClass(/w-full/) }) test('has correct icon', async ({ mount }) =&gt; { const component = await mount(&lt;FolderSelector /&gt;) const button = component.locator('button&gt;svg') await expect(button).toHaveScreenshot() }) }) test('has correct text', async ({ mount }) =&gt; { const component = await mount(&lt;FolderSelector /&gt;) const button = component.locator('button') await expect(button).toContainText('Select Data Folder') }) test('has file input', async ({ mount }) =&gt; { const component = await mount(&lt;FolderSelector /&gt;) const input = component.locator('input') await expect(input).toHaveAttribute('type', 'file') })"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">test</span><span class="pl-kos">,</span> <span class="pl-s1">expect</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/experimental-ct-react'</span> <span class="pl-k">import</span> <span class="pl-smi">FolderSelector</span> <span class="pl-k">from</span> <span class="pl-s">'./FolderSelector'</span> <span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-c1">describe</span><span class="pl-kos">(</span><span class="pl-s">'has correct styles'</span><span class="pl-kos">,</span> <span class="pl-k">async</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-s1">test</span><span class="pl-kos">(</span><span class="pl-s">'has full width'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> mount <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">component</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">mount</span><span class="pl-kos">(</span><span class="pl-kos">&lt;</span><span class="pl-smi">FolderSelector</span><span class="pl-kos"></span> <span class="pl-c1">/</span>&gt;<span class="pl-kos">)</span> <span class="pl-s1">const</span> <span class="pl-s1">button</span> <span class="pl-c1">=</span> <span class="pl-s1">component</span><span class="pl-kos">.</span><span class="pl-en">locator</span><span class="pl-kos">(</span><span class="pl-s">'button'</span><span class="pl-kos">)</span> <span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">component</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toHaveClass</span><span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>w-full<span class="pl-c1">/</span></span><span class="pl-kos">)</span> <span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">button</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toHaveClass</span><span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>w-full<span class="pl-c1">/</span></span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'has correct icon'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> mount <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">component</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">mount</span><span class="pl-kos">(</span><span class="pl-kos">&lt;</span><span class="pl-smi">FolderSelector</span><span class="pl-kos"></span> <span class="pl-c1">/</span>&gt;<span class="pl-kos">)</span> <span class="pl-s1">const</span> <span class="pl-s1">button</span> <span class="pl-c1">=</span> <span class="pl-s1">component</span><span class="pl-kos">.</span><span class="pl-en">locator</span><span class="pl-kos">(</span><span class="pl-s">'button&gt;svg'</span><span class="pl-kos">)</span> <span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">button</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toHaveScreenshot</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">test</span><span class="pl-kos">(</span><span class="pl-s">'has correct text'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> mount <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">component</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">mount</span><span class="pl-kos">(</span><span class="pl-kos">&lt;</span><span class="pl-smi">FolderSelector</span><span class="pl-kos"></span> <span class="pl-c1">/</span>&gt;<span class="pl-kos">)</span> <span class="pl-s1">const</span> <span class="pl-s1">button</span> <span class="pl-c1">=</span> <span class="pl-s1">component</span><span class="pl-kos">.</span><span class="pl-en">locator</span><span class="pl-kos">(</span><span class="pl-s">'button'</span><span class="pl-kos">)</span> <span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">button</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toContainText</span><span class="pl-kos">(</span><span class="pl-s">'Select Data Folder'</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-s1">test</span><span class="pl-kos">(</span><span class="pl-s">'has file input'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> mount <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">component</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">mount</span><span class="pl-kos">(</span><span class="pl-kos">&lt;</span><span class="pl-smi">FolderSelector</span><span class="pl-kos"></span> <span class="pl-c1">/</span>&gt;<span class="pl-kos">)</span> <span class="pl-s1">const</span> <span class="pl-s1">input</span> <span class="pl-c1">=</span> <span class="pl-s1">component</span><span class="pl-kos">.</span><span class="pl-en">locator</span><span class="pl-kos">(</span><span class="pl-s">'input'</span><span class="pl-kos">)</span> <span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">input</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toHaveAttribute</span><span class="pl-kos">(</span><span class="pl-s">'type'</span><span class="pl-kos">,</span> <span class="pl-s">'file'</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div> <p dir="auto">The passing tests look completely normal:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/4e611435a7a8e58314bf97fec9da9e3c24c40e40674ee021717a0f045f7f3561/68747470733a2f2f692e696d6775722e636f6d2f3050476a394f4d2e706e67"><img src="https://camo.githubusercontent.com/4e611435a7a8e58314bf97fec9da9e3c24c40e40674ee021717a0f045f7f3561/68747470733a2f2f692e696d6775722e636f6d2f3050476a394f4d2e706e67" alt="passing-test" data-canonical-src="https://i.imgur.com/0PGj9OM.png" style="max-width: 100%;"></a></p> <p dir="auto">Here's the error from the respective failing test:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/b68aeb68fbd65bb1fff2965be947b14c446a3ce92e540f2d5d81dbeff4dce9f6/68747470733a2f2f692e696d6775722e636f6d2f743655794f71702e706e67"><img src="https://camo.githubusercontent.com/b68aeb68fbd65bb1fff2965be947b14c446a3ce92e540f2d5d81dbeff4dce9f6/68747470733a2f2f692e696d6775722e636f6d2f743655794f71702e706e67" alt="failing-test" data-canonical-src="https://i.imgur.com/t6UyOqp.png" style="max-width: 100%;"></a></p> <p dir="auto"><code class="notranslate">playwright-ct.config.js</code> - almost completely unchanged from default:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import type { PlaywrightTestConfig } from '@playwright/experimental-ct-react' import { devices } from '@playwright/experimental-ct-react' /** * See https://playwright.dev/docs/test-configuration. */ const config: PlaywrightTestConfig = { testDir: './', /* The base directory, relative to the config file, for snapshot files created with toMatchSnapshot and toHaveScreenshot. */ snapshotDir: './__snapshots__', /* Folders and files to ignore. */ testIgnore: ['e2e/**'], /* Maximum time one test can run for. */ timeout: (process.env.CI ? 30 : 10) * 1000, /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ forbidOnly: !!process.env.CI, /* Retry on CI only */ retries: process.env.CI ? 2 : 0, /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: 'html', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', /* Port to use for Playwright component endpoint. */ ctPort: 3100, ctViteConfig: { css: { preprocessorOptions: { less: { javascriptEnabled: true, }, }, }, resolve: { alias: [{ find: /^~/, replacement: '' }], }, }, }, /* Configure projects for major browsers */ projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'], }, }, // { // name: 'firefox', // use: { // ...devices['Desktop Firefox'], // }, // }, // { // name: 'webkit', // use: { // ...devices['Desktop Safari'], // }, // }, ], } export default config"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">type</span> <span class="pl-kos">{</span> <span class="pl-v">PlaywrightTestConfig</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/experimental-ct-react'</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/experimental-ct-react'</span> <span class="pl-c">/**</span> <span class="pl-c"> * See https://playwright.dev/docs/test-configuration.</span> <span class="pl-c"> */</span> <span class="pl-k">const</span> <span class="pl-s1">config</span>: <span class="pl-v">PlaywrightTestConfig</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">testDir</span>: <span class="pl-s">'./'</span><span class="pl-kos">,</span> <span class="pl-c">/* The base directory, relative to the config file, for snapshot files created with toMatchSnapshot and toHaveScreenshot. */</span> <span class="pl-c1">snapshotDir</span>: <span class="pl-s">'./__snapshots__'</span><span class="pl-kos">,</span> <span class="pl-c">/* Folders and files to ignore. */</span> <span class="pl-c1">testIgnore</span>: <span class="pl-kos">[</span><span class="pl-s">'e2e/**'</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-c">/* Maximum time one test can run for. */</span> <span class="pl-c1">timeout</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">CI</span> ? <span class="pl-c1">30</span> : <span class="pl-c1">10</span><span class="pl-kos">)</span> <span class="pl-c1">*</span> <span class="pl-c1">1000</span><span class="pl-kos">,</span> <span class="pl-c">/* Run tests in files in parallel */</span> <span class="pl-c1">fullyParallel</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c">/* Fail the build on CI if you accidentally left test.only in the source code. */</span> <span class="pl-c1">forbidOnly</span>: <span class="pl-c1">!</span><span class="pl-c1">!</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span><span class="pl-kos">,</span> <span class="pl-c">/* Retry on CI only */</span> <span class="pl-c1">retries</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-c1">2</span> : <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c">/* Opt out of parallel tests on CI. */</span> <span class="pl-c1">workers</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-c1">1</span> : <span class="pl-c1">undefined</span><span class="pl-kos">,</span> <span class="pl-c">/* Reporter to use. See https://playwright.dev/docs/test-reporters */</span> <span class="pl-c1">reporter</span>: <span class="pl-s">'html'</span><span class="pl-kos">,</span> <span class="pl-c">/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> <span class="pl-c">/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */</span> <span class="pl-c1">trace</span>: <span class="pl-s">'on-first-retry'</span><span class="pl-kos">,</span> <span class="pl-c">/* Port to use for Playwright component endpoint. */</span> <span class="pl-c1">ctPort</span>: <span class="pl-c1">3100</span><span class="pl-kos">,</span> <span class="pl-c1">ctViteConfig</span>: <span class="pl-kos">{</span> <span class="pl-c1">css</span>: <span class="pl-kos">{</span> <span class="pl-c1">preprocessorOptions</span>: <span class="pl-kos">{</span> <span class="pl-c1">less</span>: <span class="pl-kos">{</span> <span class="pl-c1">javascriptEnabled</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">resolve</span>: <span class="pl-kos">{</span> <span class="pl-c1">alias</span>: <span class="pl-kos">[</span><span class="pl-kos">{</span> <span class="pl-c1">find</span>: <span class="pl-pds"><span class="pl-c1">/</span><span class="pl-cce">^</span>~<span class="pl-c1">/</span></span><span class="pl-kos">,</span> <span class="pl-c1">replacement</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><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">/* Configure projects for major browsers */</span> <span class="pl-c1">projects</span>: <span class="pl-kos">[</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">'chromium'</span><span class="pl-kos">,</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Chrome'</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">// {</span> <span class="pl-c">// name: 'firefox',</span> <span class="pl-c">// use: {</span> <span class="pl-c">// ...devices['Desktop Firefox'],</span> <span class="pl-c">// },</span> <span class="pl-c">// },</span> <span class="pl-c">// {</span> <span class="pl-c">// name: 'webkit',</span> <span class="pl-c">// use: {</span> <span class="pl-c">// ...devices['Desktop Safari'],</span> <span class="pl-c">// },</span> <span class="pl-c">// },</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-s1">config</span></pre></div> <p dir="auto">The e2e tests on my main Electron process are working just fine and only run once like normal. I have absolutely no idea why the component tests started running twice and failing.</p> <p dir="auto">Thanks for any help.</p>
0
<p dir="auto">I need to render React components on the server for SEO. My component fetches data in <code class="notranslate">ComponentWillMount</code>, based on the query parameters - but on the server (Node 4.0.0), <code class="notranslate">SetState</code> fails in the request's callback. The error can be reproduced with a simpler <code class="notranslate">setTimeout</code> too, as in the code example below.</p> <p dir="auto">I have found numerous discussion on the web relating to complications between React and server-side rendering. I'm working on two work-around approaches:</p> <ul dir="auto"> <li>removing all ajax requests from the server, instead rendering the result of the request directly into a global variable embedded in the first-serve HTML</li> <li>moving the ajax request prior to initialization of the React components, on the server only (the request would still have to live in <code class="notranslate">ComponentWillMount</code> (or <code class="notranslate">ComponentDidMount</code>) for the client version.</li> </ul> <p dir="auto">Please let me know if there is an alternative or recommended approach instead.</p> <p dir="auto">n.b. the reason I chose React over say Angular is because of <code class="notranslate">renderToString</code> is to ensure search engines can index the page, so this is all a bit of a bother for me right now...</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var React = require('react'); // Reproduced in React 0.13.3 and 0.14.0-beta1 var ReactDOMServer = require(&quot;react-dom/server&quot;); var A = React.createClass({ componentWillMount: function() { var _this = this; // for example an ajax call to fetch data based on request parameters: setTimeout(function(err, res) { // state is set based on results _this.setState({ a: 1 }); }, 100); }, render: function() { return React.createElement('div', null); } }); ReactDOMServer.renderToString(React.createElement(A, null));"><pre class="notranslate"><code class="notranslate">var React = require('react'); // Reproduced in React 0.13.3 and 0.14.0-beta1 var ReactDOMServer = require("react-dom/server"); var A = React.createClass({ componentWillMount: function() { var _this = this; // for example an ajax call to fetch data based on request parameters: setTimeout(function(err, res) { // state is set based on results _this.setState({ a: 1 }); }, 100); }, render: function() { return React.createElement('div', null); } }); ReactDOMServer.renderToString(React.createElement(A, null)); </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ node index.js /app/node_modules/react/lib/getActiveElement.js:25 return document.body; ^ ReferenceError: document is not defined at getActiveElement (/app/node_modules/react/lib/getActiveElement.js:25:12) at ReactReconcileTransaction.ReactInputSelection.getSelectionInformation (/app/node_modules/react/lib/ReactInputSelection.js:38:23) at ReactReconcileTransaction.Mixin.initializeAll (/app/node_modules/react/lib/Transaction.js:168:75) at ReactReconcileTransaction.Mixin.perform (/app/node_modules/react/lib/Transaction.js:135:12) at ReactUpdatesFlushTransaction.Mixin.perform (/app/node_modules/react/lib/Transaction.js:136:20) at ReactUpdatesFlushTransaction.assign.perform (/app/node_modules/react/lib/ReactUpdates.js:86:38) at Object.flushBatchedUpdates (/app/node_modules/react/lib/ReactUpdates.js:147:19) at Object.wrapper [as flushBatchedUpdates] (/app/node_modules/react/lib/ReactPerf.js:66:21) at ReactDefaultBatchingStrategyTransaction.Mixin.closeAll (/app/node_modules/react/lib/Transaction.js:202:25) at ReactDefaultBatchingStrategyTransaction.Mixin.perform (/app/node_modules/react/lib/Transaction.js:149:16)"><pre class="notranslate"><code class="notranslate">$ node index.js /app/node_modules/react/lib/getActiveElement.js:25 return document.body; ^ ReferenceError: document is not defined at getActiveElement (/app/node_modules/react/lib/getActiveElement.js:25:12) at ReactReconcileTransaction.ReactInputSelection.getSelectionInformation (/app/node_modules/react/lib/ReactInputSelection.js:38:23) at ReactReconcileTransaction.Mixin.initializeAll (/app/node_modules/react/lib/Transaction.js:168:75) at ReactReconcileTransaction.Mixin.perform (/app/node_modules/react/lib/Transaction.js:135:12) at ReactUpdatesFlushTransaction.Mixin.perform (/app/node_modules/react/lib/Transaction.js:136:20) at ReactUpdatesFlushTransaction.assign.perform (/app/node_modules/react/lib/ReactUpdates.js:86:38) at Object.flushBatchedUpdates (/app/node_modules/react/lib/ReactUpdates.js:147:19) at Object.wrapper [as flushBatchedUpdates] (/app/node_modules/react/lib/ReactPerf.js:66:21) at ReactDefaultBatchingStrategyTransaction.Mixin.closeAll (/app/node_modules/react/lib/Transaction.js:202:25) at ReactDefaultBatchingStrategyTransaction.Mixin.perform (/app/node_modules/react/lib/Transaction.js:149:16) </code></pre></div>
<p dir="auto">This is a first-class API for sideways data loading of stateless (although potentially memoized) data from a global store/network/resource, potentially using props/state as input.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type RecordOfObservables = { [key:string]: Observable&lt;mixed&gt; }; class Foo { observe(): RecordOfObservables { return { myContent: xhr(this.props.url) }; } render() { var myContent : ?string = this.data.myContent; return &lt;div&gt;{myContent}&lt;/div&gt;; } }"><pre class="notranslate"><span class="pl-s1">type</span> <span class="pl-v">RecordOfObservables</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-s1">key</span>:<span class="pl-s1">string</span><span class="pl-kos">]</span>: <span class="pl-v">Observable</span><span class="pl-c1">&lt;</span><span class="pl-s1">mixed</span><span class="pl-c1">&gt;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">class</span> <span class="pl-v">Foo</span> <span class="pl-kos">{</span> <span class="pl-en">observe</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-v">RecordOfObservables</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-kos">{</span> <span class="pl-c1">myContent</span>: <span class="pl-en">xhr</span><span class="pl-kos">(</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">url</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">myContent</span> : ?<span class="pl-s1">string</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">data</span><span class="pl-kos">.</span><span class="pl-c1">myContent</span><span class="pl-kos">;</span> <span class="pl-k">return</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-s1">myContent</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><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">observe() executes after componentWillMount/componentWillUpdate but before render.</p> <p dir="auto">For each key/value in the record. Subscribe to the Observable in the value.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="subscription = observable.subscribe({ onNext: handleNext });"><pre class="notranslate"><span class="pl-s1">subscription</span> <span class="pl-c1">=</span> <span class="pl-s1">observable</span><span class="pl-kos">.</span><span class="pl-en">subscribe</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">onNext</span>: <span class="pl-s1">handleNext</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">We allow onNext to be synchronously invoked from subscribe. If it is, we set:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="this.data[key] = nextValue;"><pre class="notranslate"><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">data</span><span class="pl-kos">[</span><span class="pl-s1">key</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">nextValue</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Otherwise we leave it as undefined for the initial render. (Maybe we set it to null?)</p> <p dir="auto">Then render proceeds as usual.</p> <p dir="auto">Every time onNext gets invoked, we schedule a new "this.data[key]" which effectively triggers a forcedUpdate on this component. If this is the only change, then observe is not reexecuted (componentWillUpdate -&gt; render -&gt; componentDidUpdate).</p> <p dir="auto">If props / state changed (i.e. an update from recieveProps or setState), then observe() is reexecuted (during reconciliation).</p> <p dir="auto">At this point we loop over the new record, and subscribe to all the new Observables.</p> <p dir="auto">After that, unsubscribe to the previous Observables.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="subscription.dispose();"><pre class="notranslate"><span class="pl-s1">subscription</span><span class="pl-kos">.</span><span class="pl-en">dispose</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">This ordering is important since it allows the provider of data to do reference counting of their cache. I.e. I can cache data for as long as nobody listens to it. If I unsubscribed immediately, then the reference count would go down to zero before I subscribe to the same data again.</p> <p dir="auto">When a component is unmounted, we automatically unsubscribe from all the active subscriptions.</p> <p dir="auto">If the new subscription didn't immediately call onNext, then we will keep using the previous value.</p> <p dir="auto">So if my <code class="notranslate">this.props.url</code> from my example changes, and I'm subscribing to a new URL, myContent will keep showing the content of the previous url until the next url has fully loaded.</p> <p dir="auto">This has the same semantics as the <code class="notranslate">&lt;img /&gt;</code> tag. We've seen that, while this can be confusing and lead to inconsistencies it is a fairly sane default, and it is easier to make it show a spinner than it would be to have the opposite default.</p> <p dir="auto">Best practice might be to immediately send a "null" value if you don't have the data cached. Another alternative is for an Observable to provide both the URL (or ID) and the content in the result.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Foo { observe() { return { user: loadUser(this.props.userID) }; } render() { if (this.data.user.id !== this.props.userID) { // Ensure that we never show inconsistent userID / user.name combinations. return &lt;Spinner /&gt;; } return &lt;div&gt;Hello, {this.data.user.name} [{this.props.userID}]!&lt;/div&gt;; } }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Foo</span> <span class="pl-kos">{</span> <span class="pl-en">observe</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-kos">{</span> <span class="pl-c1">user</span>: <span class="pl-en">loadUser</span><span class="pl-kos">(</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">userID</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">data</span><span class="pl-kos">.</span><span class="pl-c1">user</span><span class="pl-kos">.</span><span class="pl-c1">id</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-kos">.</span><span class="pl-c1">userID</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// Ensure that we never show inconsistent userID / user.name combinations.</span> <span class="pl-k">return</span> <span class="pl-c1">&lt;</span><span class="pl-ent">Spinner</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span>Hello, <span class="pl-kos">{</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">data</span><span class="pl-kos">.</span><span class="pl-c1">user</span><span class="pl-kos">.</span><span class="pl-c1">name</span><span class="pl-kos">}</span> [<span class="pl-kos">{</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">userID</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><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">We should use the RxJS contract of Observable since that is more in common use and allows synchronous execution, but once <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jhusain/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jhusain">@jhusain</a>'s proposal is in more common use, we'll switch to that contract instead.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var subscription = observable.subscribe({ onNext, onError, onCompleted }); subscription.dispose();"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">subscription</span> <span class="pl-c1">=</span> <span class="pl-s1">observable</span><span class="pl-kos">.</span><span class="pl-en">subscribe</span><span class="pl-kos">(</span><span class="pl-kos">{</span> onNext<span class="pl-kos">,</span> onError<span class="pl-kos">,</span> onCompleted <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">subscription</span><span class="pl-kos">.</span><span class="pl-en">dispose</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">We can add more life-cycle hooks that respond to these events if necessary.</p> <p dir="auto">Note: This concept allows sideways data to behave like "behaviors" - just like props. This means that we don't have to overload the notion state for these things. It allows for optimizations such as throwing away the data only to resubscribe later. It is restorable.</p>
1
<p dir="auto">Hi,</p> <p dir="auto">I am running on the git cloned version of <code class="notranslate">pandas</code>, and there seems to be quite a few issues with user defined classes extending <code class="notranslate">DataFrame</code>.</p> <p dir="auto">It seems that <code class="notranslate">DataFrame</code> class constructor is hardcoded in a lot of places, where <code class="notranslate">self.__class__</code> or <code class="notranslate">cls</code> constructors should be used instead. This causes some weird behaviour.</p> <p dir="auto">Allow me to illustrate, let's import pandas and define some class that would extend <code class="notranslate">DataFrame</code></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In[2]: import pandas as pd In [3]: pd.__version__ Out[3]: '0.10.1' In [4]: class ClassExtendingDataFrame(pd.DataFrame): ...: pass ...: "><pre class="notranslate"><span class="pl-v">In</span>[<span class="pl-c1">2</span>]: <span class="pl-s1">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-v">In</span> [<span class="pl-c1">3</span>]: <span class="pl-s1">pd</span>.<span class="pl-s1">__version__</span> <span class="pl-v">Out</span>[<span class="pl-c1">3</span>]: <span class="pl-s">'0.10.1'</span> <span class="pl-v">In</span> [<span class="pl-c1">4</span>]: <span class="pl-s1">class</span> <span class="pl-v">ClassExtendingDataFrame</span>(<span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>): ...: <span class="pl-s1">pass</span> ...: </pre></div> <p dir="auto">Note that <code class="notranslate">ClassExtendingDataFrame</code> does not override anything and is essentially the same <code class="notranslate">DataFrame</code>, just renamed.</p> <p dir="auto">Now one would expect a new instance of <code class="notranslate">ClassExtendingDataFrame</code> to be created by the following code:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [5]: dict = {'a' : [1,2,3], 'b': [2,3,4]} In [6]: x = ClassExtendingDataFrame.from_dict(dict)"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">5</span>]: <span class="pl-s1">dict</span> <span class="pl-c1">=</span> {<span class="pl-s">'a'</span> : [<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>], <span class="pl-s">'b'</span>: [<span class="pl-c1">2</span>,<span class="pl-c1">3</span>,<span class="pl-c1">4</span>]} <span class="pl-v">In</span> [<span class="pl-c1">6</span>]: <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-v">ClassExtendingDataFrame</span>.<span class="pl-en">from_dict</span>(<span class="pl-s1">dict</span>)</pre></div> <p dir="auto">Unfortunately:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [10]: assert(isinstance(x, ClassExtendingDataFrame)) --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) &lt;ipython-input-10-3f1ceeb1b90f&gt; in &lt;module&gt;() ----&gt; 1 assert(isinstance(x, ClassExtendingDataFrame)) AssertionError: In [11]: type(x) Out[11]: pandas.core.frame.DataFrame"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">10</span>]: <span class="pl-en">assert</span>(<span class="pl-en">isinstance</span>(<span class="pl-s1">x</span>, <span class="pl-v">ClassExtendingDataFrame</span>)) <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-v">AssertionError</span> <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>) <span class="pl-c1">&lt;</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-c1">3</span><span class="pl-s1">f1ceeb1b90f</span><span class="pl-c1">&gt;</span> <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span>() <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1</span> <span class="pl-en">assert</span>(<span class="pl-en">isinstance</span>(<span class="pl-s1">x</span>, <span class="pl-v">ClassExtendingDataFrame</span>)) <span class="pl-v">AssertionError</span>: <span class="pl-v">In</span> [<span class="pl-c1">11</span>]: <span class="pl-s1">type</span>(<span class="pl-s1">x</span>) <span class="pl-v">Out</span>[<span class="pl-c1">11</span>]: <span class="pl-s1">pandas</span>.<span class="pl-s1">core</span>.<span class="pl-s1">frame</span>.<span class="pl-v">DataFrame</span></pre></div> <p dir="auto">This is due to <code class="notranslate">DataFrame</code> being hardcoded in <code class="notranslate">from_dict</code>: <a href="https://github.com/pydata/pandas/blob/master/pandas/core/frame.py#L905">https://github.com/pydata/pandas/blob/master/pandas/core/frame.py#L905</a> .<br> <code class="notranslate">cls</code> variable should be used here.</p> <p dir="auto">Note that <code class="notranslate">ClassExtendingDataFrame</code> is initialised using constructor, rather than <code class="notranslate">from_dict</code> method, correct object is created:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [12]: a = ClassExtendingDataFrame(dict) In [13]: isinstance(a, ClassExtendingDataFrame) Out[13]: True"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">12</span>]: <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-v">ClassExtendingDataFrame</span>(<span class="pl-s1">dict</span>) <span class="pl-v">In</span> [<span class="pl-c1">13</span>]: <span class="pl-en">isinstance</span>(<span class="pl-s1">a</span>, <span class="pl-v">ClassExtendingDataFrame</span>) <span class="pl-v">Out</span>[<span class="pl-c1">13</span>]: <span class="pl-c1">True</span></pre></div> <p dir="auto">However, operations as simple as slicing break this:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [14]: isinstance(a[:5], ClassExtendingDataFrame) Out[14]: False"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">14</span>]: <span class="pl-en">isinstance</span>(<span class="pl-s1">a</span>[:<span class="pl-c1">5</span>], <span class="pl-v">ClassExtendingDataFrame</span>) <span class="pl-v">Out</span>[<span class="pl-c1">14</span>]: <span class="pl-c1">False</span></pre></div> <p dir="auto">These are just the two examples I have noticed myself, but I am sure there could be more.<br> A thorough review of Hardcoded <code class="notranslate">DataFrame</code> constructors is needed to check if they could be replaced by <code class="notranslate">self.__class__</code> or <code class="notranslate">cls</code> instead.</p>
<p dir="auto"><a href="https://travis-ci.org/pandas-dev/pandas/jobs/267760269" rel="nofollow">https://travis-ci.org/pandas-dev/pandas/jobs/267760269</a></p> <p dir="auto">Master and some PRs (strangely not all) are all failing on the same test, but only on Mac:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="=================================== FAILURES =================================== _____________________ TestCategoricalIndex.test_reindexing _____________________ [gw1] darwin -- Python 3.5.4 /Users/travis/miniconda3/envs/pandas/bin/python self = &lt;pandas.tests.indexes.test_category.TestCategoricalIndex object at 0x111d5e860&gt; def test_reindexing(self): ci = self.create_index() oidx = Index(np.array(ci)) for n in [1, 2, 5, len(ci)]: finder = oidx[np.random.randint(0, len(ci), size=n)] expected = oidx.get_indexer_non_unique(finder)[0] actual = ci.get_indexer(finder) &gt; tm.assert_numpy_array_equal(expected, actual) pandas/tests/indexes/test_category.py:389: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pandas/util/testing.py:1174: in assert_numpy_array_equal _raise(left, right, err_msg) pandas/util/testing.py:1157: in _raise .format(obj=obj), left.shape, right.shape) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ obj = 'numpy array', message = 'numpy array shapes are different', left = (14,) right = (6,), diff = None def raise_assert_detail(obj, message, left, right, diff=None): if isinstance(left, np.ndarray): left = pprint_thing(left) if isinstance(right, np.ndarray): right = pprint_thing(right) msg = &quot;&quot;&quot;{obj} are different {message} [left]: {left} [right]: {right}&quot;&quot;&quot;.format(obj=obj, message=message, left=left, right=right) if diff is not None: msg += &quot;\n[diff]: {diff}&quot;.format(diff=diff) &gt; raise AssertionError(msg) E AssertionError: numpy array are different E E numpy array shapes are different E [left]: (14,) E [right]: (6,) pandas/util/testing.py:1105: AssertionError"><pre class="notranslate"><code class="notranslate">=================================== FAILURES =================================== _____________________ TestCategoricalIndex.test_reindexing _____________________ [gw1] darwin -- Python 3.5.4 /Users/travis/miniconda3/envs/pandas/bin/python self = &lt;pandas.tests.indexes.test_category.TestCategoricalIndex object at 0x111d5e860&gt; def test_reindexing(self): ci = self.create_index() oidx = Index(np.array(ci)) for n in [1, 2, 5, len(ci)]: finder = oidx[np.random.randint(0, len(ci), size=n)] expected = oidx.get_indexer_non_unique(finder)[0] actual = ci.get_indexer(finder) &gt; tm.assert_numpy_array_equal(expected, actual) pandas/tests/indexes/test_category.py:389: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pandas/util/testing.py:1174: in assert_numpy_array_equal _raise(left, right, err_msg) pandas/util/testing.py:1157: in _raise .format(obj=obj), left.shape, right.shape) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ obj = 'numpy array', message = 'numpy array shapes are different', left = (14,) right = (6,), diff = None def raise_assert_detail(obj, message, left, right, diff=None): if isinstance(left, np.ndarray): left = pprint_thing(left) if isinstance(right, np.ndarray): right = pprint_thing(right) msg = """{obj} are different {message} [left]: {left} [right]: {right}""".format(obj=obj, message=message, left=left, right=right) if diff is not None: msg += "\n[diff]: {diff}".format(diff=diff) &gt; raise AssertionError(msg) E AssertionError: numpy array are different E E numpy array shapes are different E [left]: (14,) E [right]: (6,) pandas/util/testing.py:1105: AssertionError </code></pre></div>
0
<h2 dir="auto">Observed behavior</h2> <p dir="auto">When creating a <code class="notranslate">histplot</code> with a legend, duplicate labels show up in the legend. It seems to be creating entries in the legend for more than one <code class="notranslate">BarContainer</code> artist.</p> <h2 dir="auto">Expected behavior</h2> <p dir="auto">A single entry in the legend for the histogram. In my use case, this histogram is part of a collection of overlaid plots on the same axes, and the legend is required so that the various plot artists are clearly labeled.</p> <h2 dir="auto">Minimal example</h2> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np import seaborn as sns rng = np.random.default_rng(43) data = rng.random(1000) ax = sns.histplot(data, label=&quot;Random Data&quot;, stat=&quot;density&quot;) ax.legend() # Multiple artists are shown here ax.get_legend_handles_labels()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">import</span> <span class="pl-s1">seaborn</span> <span class="pl-k">as</span> <span class="pl-s1">sns</span> <span class="pl-s1">rng</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">default_rng</span>(<span class="pl-c1">43</span>) <span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-s1">rng</span>.<span class="pl-en">random</span>(<span class="pl-c1">1000</span>) <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">sns</span>.<span class="pl-en">histplot</span>(<span class="pl-s1">data</span>, <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">"Random Data"</span>, <span class="pl-s1">stat</span><span class="pl-c1">=</span><span class="pl-s">"density"</span>) <span class="pl-s1">ax</span>.<span class="pl-en">legend</span>() <span class="pl-c"># Multiple artists are shown here</span> <span class="pl-s1">ax</span>.<span class="pl-en">get_legend_handles_labels</span>()</pre></div> <h2 dir="auto">Outputs from minimal example</h2> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1363287/198343727-e4b2588f-ec9f-4af8-8d22-c276b5a6c151.png"><img src="https://user-images.githubusercontent.com/1363287/198343727-e4b2588f-ec9f-4af8-8d22-c276b5a6c151.png" alt="image" style="max-width: 100%;"></a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="([&lt;BarContainer object of 1 artists&gt;, &lt;BarContainer object of 11 artists&gt;], ['Random Data', 'Random Data'])"><pre class="notranslate"><code class="notranslate">([&lt;BarContainer object of 1 artists&gt;, &lt;BarContainer object of 11 artists&gt;], ['Random Data', 'Random Data']) </code></pre></div> <h2 dir="auto">Version</h2> <p dir="auto">Version where behavior is observed: 0.12.1<br> This behavior was not present in 0.11.2.</p>
<p dir="auto">Using joinplot( type = 'hex' ) to make hexbin plot.</p> <p dir="auto">The function call hangs (never comes back, with 100% CPU usage) when I tried to do it with my data (variables a and b)</p> <p dir="auto">The same plot works for randomly generated data (variables x and y)</p> <p dir="auto">This Jupyter notebook provides data for both working and buggy behavior. <a href="https://github.com/odoublewen/seaborn_bug/blob/master/seaborn_test.ipynb">https://github.com/odoublewen/seaborn_bug/blob/master/seaborn_test.ipynb</a></p> <p dir="auto">Cheers</p>
0
<p dir="auto">This question came out when I tried to validate some proxies.<br> If proxy-scheme is uppercase as follows, it will return 200. (The host of proxy is not a true one.)<br> import requests<br> proxy = {<br> 'HTTP': '<a href="HTTP://111.1.11.1:8000" rel="nofollow">HTTP://111.1.11.1:8000</a>'<br> }<br> r = requests.get('<a href="http://www.sina.com',proxies" rel="nofollow">http://www.sina.com',proxies</a> = proxy)<br> print (r.status_code)</p> <p dir="auto">However, if changing 'HTTP' to 'http', it will raise an error about httpconnectionerror.<br> So, it is confused me that proxy-scheme is case sensitivity or not? Or something went wrong about my code ?</p> <p dir="auto">Hoping to receive your instruction.</p>
<p dir="auto">Hi there,</p> <p dir="auto">First off, Requests is awesome. Thank you for the great library!</p> <p dir="auto">I'm writing a script that places a series of requests and manually follows some redirects, and one of the redirects is to a URL that starts with "HTTPS" (that is, the protocol is uppercase, like <a href="HTTPS://www.example.com" rel="nofollow">HTTPS://www.example.com</a> instead of <a href="https://www.example.com" rel="nofollow">https://www.example.com</a>). It would seem that Requests generates the wrong request when the following three conditions are met:</p> <ol dir="auto"> <li>The protocol is HTTPS.</li> <li>The protocol contains one or more uppercase letters. (e.g. "HTTPS", "httpS", "hTTps", "Https", etc.)</li> <li>Proxies are being used.</li> </ol> <p dir="auto">I wrote a test script that uses a Session to GET <a href="http://www.example.com" rel="nofollow">www.example.com</a> with variations in case for both http and https protocols, and here are the results:</p> <table role="table"> <thead> <tr> <th>proto</th> <th>proxies</th> <th>result</th> </tr> </thead> <tbody> <tr> <td>http</td> <td>no</td> <td>[OK]</td> </tr> <tr> <td>htTp</td> <td>no</td> <td>[OK]</td> </tr> <tr> <td>HTTP</td> <td>no</td> <td>[OK]</td> </tr> <tr> <td>https</td> <td>no</td> <td>[OK]</td> </tr> <tr> <td>HTTPS</td> <td>no</td> <td>[OK]</td> </tr> <tr> <td>htTps</td> <td>no</td> <td>[OK]</td> </tr> <tr> <td>httpS</td> <td>no</td> <td>[OK]</td> </tr> <tr> <td>Https</td> <td>no</td> <td>[OK]</td> </tr> <tr> <td>http</td> <td>YES</td> <td>[OK]</td> </tr> <tr> <td>htTp</td> <td>YES</td> <td>[OK]</td> </tr> <tr> <td>HTTP</td> <td>YES</td> <td>[OK]</td> </tr> <tr> <td>https</td> <td>YES</td> <td>[OK]</td> </tr> <tr> <td>HTTPS</td> <td>YES</td> <td>[ERROR]</td> </tr> <tr> <td>htTps</td> <td>YES</td> <td>[ERROR]</td> </tr> <tr> <td>httpS</td> <td>YES</td> <td>[ERROR]</td> </tr> <tr> <td>Https</td> <td>YES</td> <td>[ERROR]</td> </tr> </tbody> </table> <p dir="auto">In the ERROR case, my proxy (Burp) was generating the following error:<br> <strong>Error</strong><br> Invalid client request received: First line of request did not contain an absolute URL - try enabling invisible proxy support.<br> GET / HTTP/1.1<br> Host: localhost:8080<br> Connection: keep-alive<br> Accept-Encoding: gzip, deflate<br> Accept: <em>/</em><br> User-Agent: python-requests/2.9.1</p> <p dir="auto">The issue can be replicated with the following couple lines of code:<br> <code class="notranslate">import requests</code><br> <code class="notranslate">requests.request('GET', 'HTTPS://www.example.com/test', proxies=dict(http='localhost:8080', https='localhost:8080'))</code></p> <p dir="auto">What happens will depend on your proxy. With Burp, when errors are given back as valid HTTP responses, the above will result in a 200 OK response object, and when you inspect the content of the response, you'll see Burp's error. However, if you suppress Burp errors, then Burp returns an empty response, causing requests to raise a ConnectionError exception:<br> requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))</p> <p dir="auto">Thank you for your time!</p> <p dir="auto">Best Regards,<br> -Justin</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">pacman module</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 = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides python version = 2.7.13 (default, Feb 11 2017, 12:22:40) [GCC 6.3.1 20170109]"><pre class="notranslate"><code class="notranslate">ansible 2.3.0.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides python version = 2.7.13 (default, Feb 11 2017, 12:22:40) [GCC 6.3.1 20170109] </code></pre></div> <p dir="auto">This worked fine in Ansible 2.2.</p> <h5 dir="auto">CONFIGURATION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[defaults] nocows=1"><pre class="notranslate"><code class="notranslate">[defaults] nocows=1 </code></pre></div> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">I'm running on Arch Linux</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">Running</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto"><a href="https://github.com/thomwiggers/odroid-playbooks/blob/master/roles/common/tasks/common.yml#L8-L16">https://github.com/thomwiggers/odroid-playbooks/blob/master/roles/common/tasks/common.yml#L8-L16</a></p> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">Updated/installed packages</p> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto">Crashes.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [common : Install packages] ************************************************************************************************************************************************************************************************************ task path: /home/thom/git/stage/management/roles/common/tasks/common.yml:8 Using module file /usr/lib/python2.7/site-packages/ansible/modules/packaging/os/pacman.py &lt;homer&gt; ESTABLISH SSH CONNECTION FOR USER: None &lt;homer&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/thom/.ansible/cp/fdc2bea664 homer '/bin/sh -c '&quot;'&quot;'echo ~ &amp;&amp; sleep 0'&quot;'&quot;'' &lt;homer&gt; (0, '/home/thom\n', &quot;OpenSSH_7.5p1, OpenSSL 1.1.0e 16 Feb 2017\r\ndebug1: Reading configuration data /home/thom/.ssh/config\r\ndebug1: /home/thom/.ssh/config line 3: Applying options for *\r\ndebug3: kex names ok: [curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256]\r\ndebug1: /home/thom/.ssh/config line 82: Applying options for homer\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: Setting implicit ProxyCommand from ProxyJump: ssh -l twiggers -vvv -W '[%h]:%p' lilo.science.ru.nl\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 7302\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n&quot;) &lt;homer&gt; ESTABLISH SSH CONNECTION FOR USER: None &lt;homer&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/thom/.ansible/cp/fdc2bea664 homer '/bin/sh -c '&quot;'&quot;'( umask 77 &amp;&amp; mkdir -p &quot;` echo /home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474 `&quot; &amp;&amp; echo ansible-tmp-1493382410.32-244000386629474=&quot;` echo /home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474 `&quot; ) &amp;&amp; sleep 0'&quot;'&quot;'' &lt;homer&gt; (0, 'ansible-tmp-1493382410.32-244000386629474=/home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474\n', &quot;OpenSSH_7.5p1, OpenSSL 1.1.0e 16 Feb 2017\r\ndebug1: Reading configuration data /home/thom/.ssh/config\r\ndebug1: /home/thom/.ssh/config line 3: Applying options for *\r\ndebug3: kex names ok: [curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256]\r\ndebug1: /home/thom/.ssh/config line 82: Applying options for homer\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: Setting implicit ProxyCommand from ProxyJump: ssh -l twiggers -vvv -W '[%h]:%p' lilo.science.ru.nl\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 7302\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n&quot;) &lt;homer&gt; PUT /tmp/tmp3nwsZr TO /home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474/pacman.py &lt;homer&gt; SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/thom/.ansible/cp/fdc2bea664 '[homer]' &lt;homer&gt; (0, 'sftp&gt; put /tmp/tmp3nwsZr /home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474/pacman.py\n', 'OpenSSH_7.5p1, OpenSSL 1.1.0e 16 Feb 2017\r\ndebug1: Reading configuration data /home/thom/.ssh/config\r\ndebug1: /home/thom/.ssh/config line 3: Applying options for *\r\ndebug3: kex names ok: [curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256]\r\ndebug1: /home/thom/.ssh/config line 82: Applying options for homer\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: Setting implicit ProxyCommand from ProxyJump: ssh -l twiggers -vvv -W \'[%h]:%p\' lilo.science.ru.nl\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 7302\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension &quot;posix-rename@openssh.com&quot; revision 1\r\ndebug2: Server supports extension &quot;statvfs@openssh.com&quot; revision 2\r\ndebug2: Server supports extension &quot;fstatvfs@openssh.com&quot; revision 2\r\ndebug2: Server supports extension &quot;hardlink@openssh.com&quot; revision 1\r\ndebug2: Server supports extension &quot;fsync@openssh.com&quot; revision 1\r\ndebug3: Sent message fd 5 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -&gt; /home/thom size 0\r\ndebug3: Looking up /tmp/tmp3nwsZr\r\ndebug3: Sent message fd 5 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474/pacman.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:27437\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 27437 bytes at 32768\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n') &lt;homer&gt; ESTABLISH SSH CONNECTION FOR USER: None &lt;homer&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/thom/.ansible/cp/fdc2bea664 homer '/bin/sh -c '&quot;'&quot;'chmod u+x /home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474/ /home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474/pacman.py &amp;&amp; sleep 0'&quot;'&quot;'' &lt;homer&gt; (0, '', &quot;OpenSSH_7.5p1, OpenSSL 1.1.0e 16 Feb 2017\r\ndebug1: Reading configuration data /home/thom/.ssh/config\r\ndebug1: /home/thom/.ssh/config line 3: Applying options for *\r\ndebug3: kex names ok: [curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256]\r\ndebug1: /home/thom/.ssh/config line 82: Applying options for homer\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: Setting implicit ProxyCommand from ProxyJump: ssh -l twiggers -vvv -W '[%h]:%p' lilo.science.ru.nl\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 7302\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n&quot;) &lt;homer&gt; ESTABLISH SSH CONNECTION FOR USER: None &lt;homer&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/thom/.ansible/cp/fdc2bea664 -tt homer '/bin/sh -c '&quot;'&quot;'sudo -H -S -n -u root /bin/sh -c '&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'echo BECOME-SUCCESS-tixkiailijheyhbmsllbeczwqwdaiueq; /usr/bin/python /home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474/pacman.py; rm -rf &quot;/home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474/&quot; &gt; /dev/null 2&gt;&amp;1'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;' &amp;&amp; sleep 0'&quot;'&quot;'' &lt;homer&gt; (0, 'Traceback (most recent call last):\r\n File &quot;/tmp/ansible_nbtluy_z/ansible_module_pacman.py&quot;, line 451, in &lt;module&gt;\r\n main()\r\n File &quot;/tmp/ansible_nbtluy_z/ansible_module_pacman.py&quot;, line 443, in main\r\n install_packages(module, pacman_path, p[\'state\'], pkgs, pkg_files)\r\n File &quot;/tmp/ansible_nbtluy_z/ansible_module_pacman.py&quot;, line 306, in install_packages\r\n data = stdout.split(\'\\n\')[3].split(\' \')[2:]\r\nIndexError: list index out of range\r\n', &quot;OpenSSH_7.5p1, OpenSSL 1.1.0e 16 Feb 2017\r\ndebug1: Reading configuration data /home/thom/.ssh/config\r\ndebug1: /home/thom/.ssh/config line 3: Applying options for *\r\ndebug3: kex names ok: [curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256]\r\ndebug1: /home/thom/.ssh/config line 82: Applying options for homer\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: Setting implicit ProxyCommand from ProxyJump: ssh -l twiggers -vvv -W '[%h]:%p' lilo.science.ru.nl\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 7302\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 131.174.12.215 closed.\r\n&quot;) failed: [homer] (item=[u'ack', u'base-devel', u'clang', u'cmake', u'cronie', u'curl', u'git', u'htop', u'ltrace', u'ntp', u'openbsd-netcat', u'python', u'python-pip', u'python-virtualenv', u'python-virtualenvwrapper', u'python2', u'python2-pip', u'rsync', u'strace', u'svn', u'the_silver_searcher', u'tmux', u'valgrind', u'vim', u'wget', u'zsh']) =&gt; { &quot;failed&quot;: true, &quot;item&quot;: [ &quot;ack&quot;, &quot;base-devel&quot;, &quot;clang&quot;, &quot;cmake&quot;, &quot;cronie&quot;, &quot;curl&quot;, &quot;git&quot;, &quot;htop&quot;, &quot;ltrace&quot;, &quot;ntp&quot;, &quot;openbsd-netcat&quot;, &quot;python&quot;, &quot;python-pip&quot;, &quot;python-virtualenv&quot;, &quot;python-virtualenvwrapper&quot;, &quot;python2&quot;, &quot;python2-pip&quot;, &quot;rsync&quot;, &quot;strace&quot;, &quot;svn&quot;, &quot;the_silver_searcher&quot;, &quot;tmux&quot;, &quot;valgrind&quot;, &quot;vim&quot;, &quot;wget&quot;, &quot;zsh&quot; ], &quot;module_stderr&quot;: &quot;OpenSSH_7.5p1, OpenSSL 1.1.0e 16 Feb 2017\r\ndebug1: Reading configuration data /home/thom/.ssh/config\r\ndebug1: /home/thom/.ssh/config line 3: Applying options for *\r\ndebug3: kex names ok: [curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256]\r\ndebug1: /home/thom/.ssh/config line 82: Applying options for homer\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: Setting implicit ProxyCommand from ProxyJump: ssh -l twiggers -vvv -W '[%h]:%p' lilo.science.ru.nl\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 7302\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 131.174.12.215 closed.\r\n&quot;, &quot;module_stdout&quot;: &quot;Traceback (most recent call last):\r\n File \&quot;/tmp/ansible_nbtluy_z/ansible_module_pacman.py\&quot;, line 451, in &lt;module&gt;\r\n main()\r\n File \&quot;/tmp/ansible_nbtluy_z/ansible_module_pacman.py\&quot;, line 443, in main\r\n install_packages(module, pacman_path, p['state'], pkgs, pkg_files)\r\n File \&quot;/tmp/ansible_nbtluy_z/ansible_module_pacman.py\&quot;, line 306, in install_packages\r\n data = stdout.split('\\n')[3].split(' ')[2:]\r\nIndexError: list index out of range\r\n&quot;, &quot;msg&quot;: &quot;MODULE FAILURE&quot;, &quot;rc&quot;: 0 }"><pre class="notranslate"><code class="notranslate">TASK [common : Install packages] ************************************************************************************************************************************************************************************************************ task path: /home/thom/git/stage/management/roles/common/tasks/common.yml:8 Using module file /usr/lib/python2.7/site-packages/ansible/modules/packaging/os/pacman.py &lt;homer&gt; ESTABLISH SSH CONNECTION FOR USER: None &lt;homer&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/thom/.ansible/cp/fdc2bea664 homer '/bin/sh -c '"'"'echo ~ &amp;&amp; sleep 0'"'"'' &lt;homer&gt; (0, '/home/thom\n', "OpenSSH_7.5p1, OpenSSL 1.1.0e 16 Feb 2017\r\ndebug1: Reading configuration data /home/thom/.ssh/config\r\ndebug1: /home/thom/.ssh/config line 3: Applying options for *\r\ndebug3: kex names ok: [curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256]\r\ndebug1: /home/thom/.ssh/config line 82: Applying options for homer\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: Setting implicit ProxyCommand from ProxyJump: ssh -l twiggers -vvv -W '[%h]:%p' lilo.science.ru.nl\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 7302\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n") &lt;homer&gt; ESTABLISH SSH CONNECTION FOR USER: None &lt;homer&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/thom/.ansible/cp/fdc2bea664 homer '/bin/sh -c '"'"'( umask 77 &amp;&amp; mkdir -p "` echo /home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474 `" &amp;&amp; echo ansible-tmp-1493382410.32-244000386629474="` echo /home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474 `" ) &amp;&amp; sleep 0'"'"'' &lt;homer&gt; (0, 'ansible-tmp-1493382410.32-244000386629474=/home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474\n', "OpenSSH_7.5p1, OpenSSL 1.1.0e 16 Feb 2017\r\ndebug1: Reading configuration data /home/thom/.ssh/config\r\ndebug1: /home/thom/.ssh/config line 3: Applying options for *\r\ndebug3: kex names ok: [curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256]\r\ndebug1: /home/thom/.ssh/config line 82: Applying options for homer\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: Setting implicit ProxyCommand from ProxyJump: ssh -l twiggers -vvv -W '[%h]:%p' lilo.science.ru.nl\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 7302\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n") &lt;homer&gt; PUT /tmp/tmp3nwsZr TO /home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474/pacman.py &lt;homer&gt; SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/thom/.ansible/cp/fdc2bea664 '[homer]' &lt;homer&gt; (0, 'sftp&gt; put /tmp/tmp3nwsZr /home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474/pacman.py\n', 'OpenSSH_7.5p1, OpenSSL 1.1.0e 16 Feb 2017\r\ndebug1: Reading configuration data /home/thom/.ssh/config\r\ndebug1: /home/thom/.ssh/config line 3: Applying options for *\r\ndebug3: kex names ok: [curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256]\r\ndebug1: /home/thom/.ssh/config line 82: Applying options for homer\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: Setting implicit ProxyCommand from ProxyJump: ssh -l twiggers -vvv -W \'[%h]:%p\' lilo.science.ru.nl\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 7302\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "posix-rename@openssh.com" revision 1\r\ndebug2: Server supports extension "statvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "fstatvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "hardlink@openssh.com" revision 1\r\ndebug2: Server supports extension "fsync@openssh.com" revision 1\r\ndebug3: Sent message fd 5 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -&gt; /home/thom size 0\r\ndebug3: Looking up /tmp/tmp3nwsZr\r\ndebug3: Sent message fd 5 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474/pacman.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:27437\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 27437 bytes at 32768\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n') &lt;homer&gt; ESTABLISH SSH CONNECTION FOR USER: None &lt;homer&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/thom/.ansible/cp/fdc2bea664 homer '/bin/sh -c '"'"'chmod u+x /home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474/ /home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474/pacman.py &amp;&amp; sleep 0'"'"'' &lt;homer&gt; (0, '', "OpenSSH_7.5p1, OpenSSL 1.1.0e 16 Feb 2017\r\ndebug1: Reading configuration data /home/thom/.ssh/config\r\ndebug1: /home/thom/.ssh/config line 3: Applying options for *\r\ndebug3: kex names ok: [curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256]\r\ndebug1: /home/thom/.ssh/config line 82: Applying options for homer\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: Setting implicit ProxyCommand from ProxyJump: ssh -l twiggers -vvv -W '[%h]:%p' lilo.science.ru.nl\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 7302\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n") &lt;homer&gt; ESTABLISH SSH CONNECTION FOR USER: None &lt;homer&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/thom/.ansible/cp/fdc2bea664 -tt homer '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-tixkiailijheyhbmsllbeczwqwdaiueq; /usr/bin/python /home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474/pacman.py; rm -rf "/home/thom/.ansible/tmp/ansible-tmp-1493382410.32-244000386629474/" &gt; /dev/null 2&gt;&amp;1'"'"'"'"'"'"'"'"' &amp;&amp; sleep 0'"'"'' &lt;homer&gt; (0, 'Traceback (most recent call last):\r\n File "/tmp/ansible_nbtluy_z/ansible_module_pacman.py", line 451, in &lt;module&gt;\r\n main()\r\n File "/tmp/ansible_nbtluy_z/ansible_module_pacman.py", line 443, in main\r\n install_packages(module, pacman_path, p[\'state\'], pkgs, pkg_files)\r\n File "/tmp/ansible_nbtluy_z/ansible_module_pacman.py", line 306, in install_packages\r\n data = stdout.split(\'\\n\')[3].split(\' \')[2:]\r\nIndexError: list index out of range\r\n', "OpenSSH_7.5p1, OpenSSL 1.1.0e 16 Feb 2017\r\ndebug1: Reading configuration data /home/thom/.ssh/config\r\ndebug1: /home/thom/.ssh/config line 3: Applying options for *\r\ndebug3: kex names ok: [curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256]\r\ndebug1: /home/thom/.ssh/config line 82: Applying options for homer\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: Setting implicit ProxyCommand from ProxyJump: ssh -l twiggers -vvv -W '[%h]:%p' lilo.science.ru.nl\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 7302\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 131.174.12.215 closed.\r\n") failed: [homer] (item=[u'ack', u'base-devel', u'clang', u'cmake', u'cronie', u'curl', u'git', u'htop', u'ltrace', u'ntp', u'openbsd-netcat', u'python', u'python-pip', u'python-virtualenv', u'python-virtualenvwrapper', u'python2', u'python2-pip', u'rsync', u'strace', u'svn', u'the_silver_searcher', u'tmux', u'valgrind', u'vim', u'wget', u'zsh']) =&gt; { "failed": true, "item": [ "ack", "base-devel", "clang", "cmake", "cronie", "curl", "git", "htop", "ltrace", "ntp", "openbsd-netcat", "python", "python-pip", "python-virtualenv", "python-virtualenvwrapper", "python2", "python2-pip", "rsync", "strace", "svn", "the_silver_searcher", "tmux", "valgrind", "vim", "wget", "zsh" ], "module_stderr": "OpenSSH_7.5p1, OpenSSL 1.1.0e 16 Feb 2017\r\ndebug1: Reading configuration data /home/thom/.ssh/config\r\ndebug1: /home/thom/.ssh/config line 3: Applying options for *\r\ndebug3: kex names ok: [curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256]\r\ndebug1: /home/thom/.ssh/config line 82: Applying options for homer\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: Setting implicit ProxyCommand from ProxyJump: ssh -l twiggers -vvv -W '[%h]:%p' lilo.science.ru.nl\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 7302\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 131.174.12.215 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_nbtluy_z/ansible_module_pacman.py\", line 451, in &lt;module&gt;\r\n main()\r\n File \"/tmp/ansible_nbtluy_z/ansible_module_pacman.py\", line 443, in main\r\n install_packages(module, pacman_path, p['state'], pkgs, pkg_files)\r\n File \"/tmp/ansible_nbtluy_z/ansible_module_pacman.py\", line 306, in install_packages\r\n data = stdout.split('\\n')[3].split(' ')[2:]\r\nIndexError: list index out of range\r\n", "msg": "MODULE FAILURE", "rc": 0 } </code></pre></div>
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <ul dir="auto"> <li>package</li> <li>pacman</li> </ul> <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 = /home/user/code/ansible/ansible.cfg configured module search path = Default w/o overrides python version = 2.7.11 (default, Mar 20 2016, 15:46:50) [GCC 5.3.0]"><pre class="notranslate"><code class="notranslate">ansible 2.3.0.0 config file = /home/user/code/ansible/ansible.cfg configured module search path = Default w/o overrides python version = 2.7.11 (default, Mar 20 2016, 15:46:50) [GCC 5.3.0] </code></pre></div> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">Host: Arch Linux<br> Node: Arch Linux</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">The pacman and package modules fail with a Traceback when trying to install a non-existing package.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <ul dir="auto"> <li>A playbook with the following content:</li> </ul> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--- - hosts: all tasks: - name: Try to install a non-existing package package: name: thispackagedoesnotexist state: latest"><pre class="notranslate">--- - <span class="pl-ent">hosts</span>: <span class="pl-s">all</span> <span class="pl-ent">tasks</span>: - <span class="pl-ent">name</span>: <span class="pl-s">Try to install a non-existing package</span> <span class="pl-ent">package</span>: <span class="pl-ent">name</span>: <span class="pl-s">thispackagedoesnotexist</span> <span class="pl-ent">state</span>: <span class="pl-s">latest</span></pre></div> <ul dir="auto"> <li>An inventory that references a single Arch Linux host.</li> </ul> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">A warning/error message that the package does not exist.</p> <h5 dir="auto">ACTUAL RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible-playbook -i inventories/development.ini installtraceback.yml PLAY [all] ************************************************************************************************************************************************************************************************************************************ TASK [Gathering Facts] ************************************************************************************************************************************************************************************************************************ ok: [devel] TASK [Try to install a non-existing package] ************************************************************************************************************************************************************************************************** fatal: [devel]: FAILED! =&gt; {&quot;changed&quot;: false, &quot;failed&quot;: true, &quot;module_stderr&quot;: &quot;Shared connection to 192.168.122.125 closed.\r\n&quot;, &quot;module_stdout&quot;: &quot;Traceback (most recent call last):\r\n File \&quot;/tmp/ansible_nQG_Kl/ansible_module_pacman.py\&quot;, line 451, in &lt;module&gt;\r\n main()\r\n File \&quot;/tmp/ansible_nQG_Kl/ansible_module_pacman.py\&quot;, line 443, in main\r\n install_packages(module, pacman_path, p['state'], pkgs, pkg_files)\r\n File \&quot;/tmp/ansible_nQG_Kl/ansible_module_pacman.py\&quot;, line 306, in install_packages\r\n data = stdout.split('\\n')[3].split(' ')[2:]\r\nIndexError: list index out of range\r\n&quot;, &quot;msg&quot;: &quot;MODULE FAILURE&quot;, &quot;rc&quot;: 0} to retry, use: --limit @/home/user/code/ansible/installtraceback.retry PLAY RECAP ************************************************************************************************************************************************************************************************************************************ devel : ok=1 changed=0 unreachable=0 failed=1 "><pre class="notranslate"><code class="notranslate">$ ansible-playbook -i inventories/development.ini installtraceback.yml PLAY [all] ************************************************************************************************************************************************************************************************************************************ TASK [Gathering Facts] ************************************************************************************************************************************************************************************************************************ ok: [devel] TASK [Try to install a non-existing package] ************************************************************************************************************************************************************************************************** fatal: [devel]: FAILED! =&gt; {"changed": false, "failed": true, "module_stderr": "Shared connection to 192.168.122.125 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_nQG_Kl/ansible_module_pacman.py\", line 451, in &lt;module&gt;\r\n main()\r\n File \"/tmp/ansible_nQG_Kl/ansible_module_pacman.py\", line 443, in main\r\n install_packages(module, pacman_path, p['state'], pkgs, pkg_files)\r\n File \"/tmp/ansible_nQG_Kl/ansible_module_pacman.py\", line 306, in install_packages\r\n data = stdout.split('\\n')[3].split(' ')[2:]\r\nIndexError: list index out of range\r\n", "msg": "MODULE FAILURE", "rc": 0} to retry, use: --limit @/home/user/code/ansible/installtraceback.retry PLAY RECAP ************************************************************************************************************************************************************************************************************************************ devel : ok=1 changed=0 unreachable=0 failed=1 </code></pre></div>
1
<p dir="auto">(pandas versions: 0.17.0, 0.18.0)</p> <p dir="auto">It seems that <code class="notranslate">Series.replace</code> is orders of magnitude slower than <code class="notranslate">Series.map</code> when called with a dict, and consumes enormous amounts of RAM:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; np.random.seed(0) &gt;&gt;&gt; s = pd.Series(np.random.randint(0, 10000, 1000000)) &gt;&gt;&gt; r = {np.random.randint(0, 10000): np.random.randint(10000) for _ in range(1000)} &gt;&gt;&gt; assert (s.map(r).fillna(s) == s.replace(r)).all() &gt;&gt;&gt; %timeit s.replace(r) 1 loop, best of 3: 1.63 s per loop &gt;&gt;&gt; %timeit s.map(r).fillna(s) 10 loops, best of 3: 26.6 ms per loop"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">seed</span>(<span class="pl-c1">0</span>) <span class="pl-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-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randint</span>(<span class="pl-c1">0</span>, <span class="pl-c1">10000</span>, <span class="pl-c1">1000000</span>)) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">r</span> <span class="pl-c1">=</span> {<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randint</span>(<span class="pl-c1">0</span>, <span class="pl-c1">10000</span>): <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randint</span>(<span class="pl-c1">10000</span>) <span class="pl-k">for</span> <span class="pl-s1">_</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">1000</span>)} <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">assert</span> (<span class="pl-s1">s</span>.<span class="pl-en">map</span>(<span class="pl-s1">r</span>).<span class="pl-en">fillna</span>(<span class="pl-s1">s</span>) <span class="pl-c1">==</span> <span class="pl-s1">s</span>.<span class="pl-en">replace</span>(<span class="pl-s1">r</span>)).<span class="pl-en">all</span>() <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-c1">%</span><span class="pl-s1">timeit</span> <span class="pl-s1">s</span>.<span class="pl-en">replace</span>(<span class="pl-s1">r</span>) <span class="pl-c1">1</span> <span class="pl-s1">loop</span>, <span class="pl-s1">best</span> <span class="pl-s1">of</span> <span class="pl-c1">3</span>: <span class="pl-c1">1.63</span> <span class="pl-s1">s</span> <span class="pl-s1">per</span> <span class="pl-s1">loop</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-c1">%</span><span class="pl-s1">timeit</span> <span class="pl-s1">s</span>.<span class="pl-en">map</span>(<span class="pl-s1">r</span>).<span class="pl-en">fillna</span>(<span class="pl-s1">s</span>) <span class="pl-c1">10</span> <span class="pl-s1">loops</span>, <span class="pl-s1">best</span> <span class="pl-s1">of</span> <span class="pl-c1">3</span>: <span class="pl-c1">26.6</span> <span class="pl-s1">ms</span> <span class="pl-s1">per</span> <span class="pl-s1">loop</span></pre></div> <p dir="auto">Memory stats not provided here but I've seen it explode (e.g. use 60+ GB RAM).</p> <p dir="auto">An old issue, not sure if related: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="30024660" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/6697" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/6697/hovercard" href="https://github.com/pandas-dev/pandas/issues/6697">#6697</a>.</p>
<p dir="auto">Polish government provides <a href="http://www.pse.pl/index.php?dzid=78" rel="nofollow">data on power demand</a> with local timestamps. DST switches are unfortunately not accounted for, so some timestamps are duplicated. Thankfully, the differences aren't big to matter in some applications, but it seems the way these timestamps are provided in the file do not work with <code class="notranslate">tz_localize</code>, which seems to be the tool to fix this problem.</p> <h4 dir="auto">Code Sample</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from pandas import Series, Timestamp Series([14603.9, 14559.700000000001, 14239.0, 14371.0, 13914.5, 14427.200000000001, 14300.5, 14267.5, 14162.200000000001, 14148.5, 14028.1, 14083.1, 14122.9], index=[Timestamp('2015-10-25 01:30:00'), Timestamp('2015-10-25 01:45:00'), Timestamp('2015-10-25 02:00:00'), Timestamp('2015-10-25 02:00:00'), Timestamp('2015-10-25 02:15:00'), Timestamp('2015-10-25 02:15:00'), Timestamp('2015-10-25 02:30:00'), Timestamp('2015-10-25 02:30:00'), Timestamp('2015-10-25 02:45:00'), Timestamp('2015-10-25 02:45:00'), Timestamp('2015-10-25 03:00:00'), Timestamp('2015-10-25 03:15:00'), Timestamp('2015-10-25 03:30:00')]).tz_localize('Europe/Warsaw', ambiguous='infer')"><pre class="notranslate"><code class="notranslate">from pandas import Series, Timestamp Series([14603.9, 14559.700000000001, 14239.0, 14371.0, 13914.5, 14427.200000000001, 14300.5, 14267.5, 14162.200000000001, 14148.5, 14028.1, 14083.1, 14122.9], index=[Timestamp('2015-10-25 01:30:00'), Timestamp('2015-10-25 01:45:00'), Timestamp('2015-10-25 02:00:00'), Timestamp('2015-10-25 02:00:00'), Timestamp('2015-10-25 02:15:00'), Timestamp('2015-10-25 02:15:00'), Timestamp('2015-10-25 02:30:00'), Timestamp('2015-10-25 02:30:00'), Timestamp('2015-10-25 02:45:00'), Timestamp('2015-10-25 02:45:00'), Timestamp('2015-10-25 03:00:00'), Timestamp('2015-10-25 03:15:00'), Timestamp('2015-10-25 03:30:00')]).tz_localize('Europe/Warsaw', ambiguous='infer') </code></pre></div> <h4 dir="auto">Current Output</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[…] pandas/tslib.pyx in pandas.tslib.tz_localize_to_utc (pandas/tslib.c:69085)() AmbiguousTimeError: There are 4 dst switches when there should only be 1."><pre class="notranslate"><code class="notranslate">[…] pandas/tslib.pyx in pandas.tslib.tz_localize_to_utc (pandas/tslib.c:69085)() AmbiguousTimeError: There are 4 dst switches when there should only be 1. </code></pre></div> <h4 dir="auto">Expected Output</h4> <p dir="auto">Obviously, we don't know what should be the exact result. My understanding of <code class="notranslate">ambiguous='infer'</code> is that at this point, I'm just letting <code class="notranslate">pandas</code> find some timezone assignment that is not totally wrong, because in some applications this will still be better than NaT. For example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2015-10-25 01:30:00+02:00 14603.9 2015-10-25 01:45:00+02:00 14559.7 2015-10-25 02:00:00+02:00 14239.0 2015-10-25 02:00:00+01:00 14371.0 2015-10-25 02:15:00+02:00 13914.5 2015-10-25 02:15:00+01:00 14427.2 2015-10-25 02:30:00+02:00 14300.5 2015-10-25 02:30:00+01:00 14267.5 2015-10-25 02:45:00+02:00 14162.2 2015-10-25 02:45:00+01:00 14148.5 2015-10-25 03:00:00+01:00 14028.1 2015-10-25 03:15:00+01:00 14083.1 2015-10-25 03:30:00+01:00 14122.9 dtype: float64"><pre class="notranslate"><code class="notranslate">2015-10-25 01:30:00+02:00 14603.9 2015-10-25 01:45:00+02:00 14559.7 2015-10-25 02:00:00+02:00 14239.0 2015-10-25 02:00:00+01:00 14371.0 2015-10-25 02:15:00+02:00 13914.5 2015-10-25 02:15:00+01:00 14427.2 2015-10-25 02:30:00+02:00 14300.5 2015-10-25 02:30:00+01:00 14267.5 2015-10-25 02:45:00+02:00 14162.2 2015-10-25 02:45:00+01:00 14148.5 2015-10-25 03:00:00+01:00 14028.1 2015-10-25 03:15:00+01:00 14083.1 2015-10-25 03:30:00+01:00 14122.9 dtype: float64 </code></pre></div> <h4 dir="auto">output of <code class="notranslate">pd.show_versions()</code></h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [4]: pandas.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 2.7.9.final.0 python-bits: 64 OS: Linux OS-release: 4.6.0-0.bpo.1-amd64 machine: x86_64 processor: byteorder: little LC_ALL: None LANG: en_US.utf8 pandas: 0.18.1 nose: None pip: 1.5.6 setuptools: 24.0.3 Cython: 0.24.1 numpy: 1.11.1 scipy: 0.17.1 statsmodels: None xarray: None IPython: 5.0.0 sphinx: None patsy: None dateutil: 2.5.3 pytz: 2016.6.1 blosc: None bottleneck: None tables: None numexpr: None matplotlib: 1.5.1 openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: 0.999 httplib2: None apiclient: None sqlalchemy: None pymysql: None psycopg2: None jinja2: 2.8 boto: None pandas_datareader: None "><pre class="notranslate"><code class="notranslate">In [4]: pandas.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 2.7.9.final.0 python-bits: 64 OS: Linux OS-release: 4.6.0-0.bpo.1-amd64 machine: x86_64 processor: byteorder: little LC_ALL: None LANG: en_US.utf8 pandas: 0.18.1 nose: None pip: 1.5.6 setuptools: 24.0.3 Cython: 0.24.1 numpy: 1.11.1 scipy: 0.17.1 statsmodels: None xarray: None IPython: 5.0.0 sphinx: None patsy: None dateutil: 2.5.3 pytz: 2016.6.1 blosc: None bottleneck: None tables: None numexpr: None matplotlib: 1.5.1 openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: 0.999 httplib2: None apiclient: None sqlalchemy: None pymysql: None psycopg2: None jinja2: 2.8 boto: None pandas_datareader: None </code></pre></div>
0
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p> <p dir="auto">apparently its all possible now. might as well make a new syntax bonanza out of it:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="WITH upsert AS ( UPDATE metric k SET k.count = k.count + 5 WHERE event = &quot;foo&quot; AND interval = &quot;D&quot; and date = &quot;whatever&quot; RETURNING k.* ) INSERT INTO metric (event, interval, date, count) SELECT (&quot;foo&quot;, &quot;D&quot;, &quot;whatever&quot;, 5) WHERE NOT EXISTS ( SELECT 1 FROM upsert );"><pre class="notranslate"><code class="notranslate">WITH upsert AS ( UPDATE metric k SET k.count = k.count + 5 WHERE event = "foo" AND interval = "D" and date = "whatever" RETURNING k.* ) INSERT INTO metric (event, interval, date, count) SELECT ("foo", "D", "whatever", 5) WHERE NOT EXISTS ( SELECT 1 FROM upsert ); </code></pre></div> <p dir="auto"><a href="http://www.postgresql.org/docs/9.1/static/sql-insert.html" rel="nofollow">http://www.postgresql.org/docs/9.1/static/sql-insert.html</a></p> <hr> <p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/2551/ticket_2551.patch">ticket_2551.patch</a> | <a href="../wiki/imported_issue_attachments/2551/CTE.sqlalchemy">CTE.sqlalchemy</a></p>
<p dir="auto"><strong>Migrated issue, originally created by Oleg Talalov (<a href="https://github.com/olegtalalov">@olegtalalov</a>)</strong></p> <p dir="auto">Customer's database contains BINARY_FLOAT_INFINITY value in one column in few rows.</p> <p dir="auto">During requsting rows in fetch, function _detect_decimal called with value '<del>' and raise exception:<br> ValueError: invalid literal for int() with base 10: '</del>'</p> <p dir="auto">I use cx_orcale 5.3 and 6.0</p> <p dir="auto">Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production</p>
0
<p dir="auto">This is nitpick and not high priority, but it would be nice if the navigation items on the left nav could uses <code class="notranslate">&lt;a&gt;</code> tags somehow. That way you can right click and open in a new tab.</p>
<p dir="auto">While browsing the Material UI doc website, it is not possible to do right click on a component-link and open it in a new tab.</p> <p dir="auto">For example, it is not posible to browse the list of components and open a new browser window/tab for each of them. Instead I am forced to manually copy the url and paste it into a new window.</p> <p dir="auto">Is there any shortcut to avoid this? Or is it a problem considered in the roadmap?</p>
1
<p dir="auto">This behaviour might be related to these two bugs<br> <a href="url">https://github.com/numpy/numpy/issues/5745</a><br> <a href="url">https://github.com/numpy/numpy/issues/7126</a><br> but regards int and not uint. I'm running the following code in both python2 and python3 with Numpy v.1.8.2 and v1.10.4.</p> <p dir="auto">The issue comes up when running the following code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np a = 9223372036854775808 type(a) b = np.int64(0) type(b) type(b*a)"><pre class="notranslate"><code class="notranslate">import numpy as np a = 9223372036854775808 type(a) b = np.int64(0) type(b) type(b*a) </code></pre></div> <p dir="auto">The result being (in Python3):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="builtins.int numpy.int64 numpy.float64"><pre class="notranslate"><code class="notranslate">builtins.int numpy.int64 numpy.float64 </code></pre></div> <p dir="auto">Note that if I change it to:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="a = 9223372036854775807 type(b*a)"><pre class="notranslate"><code class="notranslate">a = 9223372036854775807 type(b*a) </code></pre></div> <p dir="auto">I get the correct casting:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="numpy.int64"><pre class="notranslate"><code class="notranslate">numpy.int64 </code></pre></div> <p dir="auto">If I change the example to:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="a = 92233720368547758100 type(b*a)"><pre class="notranslate"><code class="notranslate">a = 92233720368547758100 type(b*a) </code></pre></div> <p dir="auto">I get again the expected (correct) casting:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="builtins.int"><pre class="notranslate"><code class="notranslate">builtins.int </code></pre></div> <p dir="auto">I came by this error while working with indices which should always be integer, so this casting to float64 was a very unexpected behaviour.</p>
<p dir="auto">Is this behavior expected?</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; print type(np.uint32(0) + int(0)) &lt;type 'numpy.int64'&gt; &gt;&gt;&gt; print type(np.uint64(0) + int(0)) &lt;type 'numpy.float64'&gt;"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">print</span> <span class="pl-en">type</span>(<span class="pl-s1">np</span>.<span class="pl-en">uint32</span>(<span class="pl-c1">0</span>) <span class="pl-c1">+</span> <span class="pl-en">int</span>(<span class="pl-c1">0</span>)) <span class="pl-c1">&lt;</span><span class="pl-s1">type</span> <span class="pl-s">'numpy.int64'</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">print</span> <span class="pl-en">type</span>(<span class="pl-s1">np</span>.<span class="pl-en">uint64</span>(<span class="pl-c1">0</span>) <span class="pl-c1">+</span> <span class="pl-en">int</span>(<span class="pl-c1">0</span>)) <span class="pl-c1">&lt;</span><span class="pl-s1">type</span> <span class="pl-s">'numpy.float64'</span><span class="pl-c1">&gt;</span></pre></div> <p dir="auto">The latter took me by surprise!</p>
1
<p dir="auto">Hello.</p> <p dir="auto">Working on a scheduler (calendar week view w/ side-by-side events by time) and am considering using a DataTable to display the activities.</p> <p dir="auto">Is it possible to span multiple rows in a TableCell?<br> See <a href="https://calendar.teamup.com/wp-content/uploads/2016/03/Staff-Schedule-Scheduler-View.jpg" rel="nofollow">Scheduler</a></p> <p dir="auto">Is there a better approach to this?</p>
<p dir="auto">Hi,</p> <p dir="auto">How can I have a colspan in the Table Widget ?</p> <p dir="auto">Mean:<br> |--------|--------|<br> |..<strong><code class="notranslate">col1</code></strong>..|..<strong><code class="notranslate">col2</code></strong>.|<br> |--------|--------|<br> |.........<strong><code class="notranslate">col3</code></strong>........|<br> |--------|--------|</p> <p dir="auto">Thank you.</p>
1
<p dir="auto">I have typescript version 1.4.1.0 and have noticed that if I have a return statement that looks something like this in my TS file</p> <p dir="auto">return<br> "This is a really long so I had to put it in on it's own line to avoid horizontal scrolling.";</p> <p dir="auto">after it has been transpiled into the JS file the code ends up looking like this</p> <p dir="auto">return;<br> "This is a really long so I had to put it in on it's own line to avoid horizontal scrolling.";</p> <p dir="auto">This is obviously problematic because the intended return statement will never execute properly now that a semicolon has been added right after the return keyword treating any line after it as if it wasn't part of the return statement to begin with.</p> <p dir="auto">If this has already been reported somewhere I apologize for the duplicate posting but the search terms I used to find it didn't seem to bring up any result that referenced this problem.</p>
<p dir="auto"><strong>TypeScript Version:</strong> 1.8.4</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="type stringType1 = &quot;foo&quot; | &quot;bar&quot;; type stringType2 = &quot;baz&quot; | &quot;bar&quot;; interface Temp1 { getValue(name: stringType1); } interface Temp2 { getValue(name: stringType2); } function test(t: Temp1 | Temp2) { var z = t.getValue(&quot;bar&quot;); // Error here }"><pre class="notranslate"><span class="pl-k">type</span> <span class="pl-smi">stringType1</span> <span class="pl-c1">=</span> <span class="pl-s">"foo"</span> <span class="pl-c1">|</span> <span class="pl-s">"bar"</span><span class="pl-kos">;</span> <span class="pl-k">type</span> <span class="pl-smi">stringType2</span> <span class="pl-c1">=</span> <span class="pl-s">"baz"</span> <span class="pl-c1">|</span> <span class="pl-s">"bar"</span><span class="pl-kos">;</span> <span class="pl-k">interface</span> <span class="pl-smi">Temp1</span> <span class="pl-kos">{</span> <span class="pl-c1">getValue</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-smi">stringType1</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">interface</span> <span class="pl-smi">Temp2</span> <span class="pl-kos">{</span> <span class="pl-c1">getValue</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-smi">stringType2</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">function</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s1">t</span>: <span class="pl-smi">Temp1</span> <span class="pl-c1">|</span> <span class="pl-smi">Temp2</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">z</span> <span class="pl-c1">=</span> <span class="pl-s1">t</span><span class="pl-kos">.</span><span class="pl-en">getValue</span><span class="pl-kos">(</span><span class="pl-s">"bar"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Error here</span> <span class="pl-kos">}</span></pre></div> <p dir="auto"><strong>Expected behavior:</strong><br> I was hoping everything would go fine (which is the case when I only use one interface in the function <code class="notranslate">test</code></p> <p dir="auto"><strong>Actual behavior:</strong><br> I get an error: "Cannot invoke an expression whose type lacks a call signature". Is this by design?</p>
0
<p dir="auto"><a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gci-gke-staging-parallel/530/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gci-gke-staging-parallel/530/</a></p> <p dir="auto">Failed: [k8s.io] Services should be able to create a functioning NodePort service {Kubernetes e2e suite}</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/service.go:406 Oct 4 10:45:12.299: Failed waiting for pods to be running: Timeout waiting for 1 pods to be ready"><pre class="notranslate"><code class="notranslate">/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/service.go:406 Oct 4 10:45:12.299: Failed waiting for pods to be running: Timeout waiting for 1 pods to be ready </code></pre></div> <p dir="auto">Previous issues for this test: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="162257617" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28064" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28064/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28064">#28064</a></p>
<p dir="auto"><a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke/10679/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke/10679/</a></p> <p dir="auto">Failed: [k8s.io] Services should be able to create a functioning NodePort service {Kubernetes e2e suite}</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/service.go:403 Jul 6 19:51:55.035: expected node port 31810 to be in use, stdout: . err: Error running &amp;{/workspace/kubernetes/platforms/linux/amd64/kubectl [kubectl --server=https://104.155.147.88 --kubeconfig=/workspace/.kube/config exec --namespace=e2e-tests-services-57c5g hostexec -- /bin/sh -c for i in $(seq 1 300); do if ss -ant46 'sport = :31810' | grep ^LISTEN; then exit 0; fi; sleep 1; done; exit 1] [] &lt;nil&gt; error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information. [] &lt;nil&gt; 0xc8209224e0 exit status 1 &lt;nil&gt; true [0xc8201642d8 0xc820164398 0xc820164470] [0xc8201642d8 0xc820164398 0xc820164470] [0xc820164368 0xc820164448] [0xa9c260 0xa9c260] 0xc8215b3680}: Command stdout: stderr: error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information. error: exit status 1 "><pre class="notranslate"><code class="notranslate">/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/service.go:403 Jul 6 19:51:55.035: expected node port 31810 to be in use, stdout: . err: Error running &amp;{/workspace/kubernetes/platforms/linux/amd64/kubectl [kubectl --server=https://104.155.147.88 --kubeconfig=/workspace/.kube/config exec --namespace=e2e-tests-services-57c5g hostexec -- /bin/sh -c for i in $(seq 1 300); do if ss -ant46 'sport = :31810' | grep ^LISTEN; then exit 0; fi; sleep 1; done; exit 1] [] &lt;nil&gt; error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information. [] &lt;nil&gt; 0xc8209224e0 exit status 1 &lt;nil&gt; true [0xc8201642d8 0xc820164398 0xc820164470] [0xc8201642d8 0xc820164398 0xc820164470] [0xc820164368 0xc820164448] [0xa9c260 0xa9c260] 0xc8215b3680}: Command stdout: stderr: error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information. error: exit status 1 </code></pre></div> <p dir="auto">Previous issues for this test: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="162257617" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28064" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28064/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28064">#28064</a></p>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=scyip" rel="nofollow">Sunny Ip</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3522?redirect=false" rel="nofollow">SPR-3522</a></strong> and commented</p> <p dir="auto">I have two aspects that run one right after the other. Aspect 1 has an around advice that passes in a different argument to the proceed method than the original method call had. In Aspect 2's before advice, the getArgs returns the original argument passed into the target method instead of the one Aspect 1 passed into the proceed. Aspect 2's around advice works fine, getArgs returning the new argument. I noticed this is working in 2.0-rc4.</p> <hr> <p dir="auto"><strong>Affects:</strong> 2.0.4, 2.0.5</p> <p dir="auto"><strong>Attachments:</strong></p> <ul dir="auto"> <li><a href="https://jira.spring.io/secure/attachment/12632/test.zip" rel="nofollow">test.zip</a> (<em>144.74 kB</em>)</li> </ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=gdub" rel="nofollow">Greg Wiley</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3519?redirect=false" rel="nofollow">SPR-3519</a></strong> and commented</p> <p dir="auto">Using the AspectJ annotation configuration method.</p> <p dir="auto">If two advice apply to the same join point and the lower-priority advice has (non JP) parameters, those parameters will not be bound.</p> <p dir="auto">This occurs in Spring 2.0.5 but not in Spring 2.0.2.</p> <p dir="auto">Only jars on the CP are those in the -with-dependencies Spring distribution.</p> <p dir="auto">\spring-framework-2.0.5\lib\aspectj\aspectjrt.jar<br> \spring-framework-2.0.5\lib\aspectj\aspectjweaver.jar<br> \spring-framework-2.0.5\lib\asm\asm-2.2.3.jar<br> \spring-framework-2.0.5\dist\spring-aspects.jar<br> \spring-framework-2.0.5\dist\spring.jar<br> \spring-framework-2.0.5\lib\jakarta-commons\commons-logging.jar<br> \spring-framework-2.0.5\lib\asm\asm-commons-2.2.3.jar<br> \spring-framework-2.0.5\lib\asm\asm-util-2.2.3.jar</p> <p dir="auto">Demonstration spike attached.</p> <p dir="auto">Note that in the demonstration, the exception can be eliminated by either:</p> <ol dir="auto"> <li>removing one of the advice classes from the configuration</li> <li>re-ordering the advice (so that the non-arg advice is lower priority)</li> <li>switching to Spring 2.0.2</li> </ol> <p dir="auto">This problem has been documented by others in the Spring forums.</p> <p dir="auto">-dub</p> <hr> <p dir="auto"><strong>Affects:</strong> 2.0.5</p> <p dir="auto"><strong>Attachments:</strong></p> <ul dir="auto"> <li><a href="https://jira.spring.io/secure/attachment/12628/eg.zip" rel="nofollow">eg.zip</a> (<em>2.04 kB</em>)</li> </ul> <p dir="auto"><strong>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398077968" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8155" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8155/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8155">#8155</a> Bad interactions betwen advice when one binds the original method parameters and one does not. (<em><strong>"duplicates"</strong></em>)</li> </ul>
1
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: 1.36</li> <li>Operating System: macOS 13.4.1</li> <li>Browser: Chromium</li> </ul> <p dir="auto">I've looked into <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1311898011" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright/issues/15819" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright/issues/15819/hovercard" href="https://github.com/microsoft/playwright/issues/15819">#15819</a> &amp; <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1292825955" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright/issues/15349" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright/issues/15349/hovercard" href="https://github.com/microsoft/playwright/issues/15349">#15349</a> but didn't find a solution for my problem.</p> <h3 dir="auto">Bug description</h3> <p dir="auto">I have a monorepo that utilizes yarn workspaces, in this project, I have a package for the Playwright framework and another project that uses this package as a local dependency.<br> Both package and the test project have their own <code class="notranslate">@playwright/test</code> dependency inside the <code class="notranslate">package.json</code> and both have <code class="notranslate">playwright.config.ts</code>.<br> The test project imports files from the framework package, such as fixtures and other utilities. The test project holds the tests and the POMs to serve the tests.<br> When running tests from the test project I'm getting the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error: Requiring @playwright/test second time, First: Error: "><pre class="notranslate"><code class="notranslate">Error: Requiring @playwright/test second time, First: Error: </code></pre></div>
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: 1.28.1</li> <li>Operating System: Ubuntu 20</li> <li>Browser: All</li> <li>Other info:</li> </ul> <p dir="auto"><strong>Steps</strong></p> <ul dir="auto"> <li>Run playwright on a system where multiple users have been using it</li> </ul> <p dir="auto"><strong>Actual</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Running 651 tests using 2 workers Error: EACCES: permission denied, open '/tmp/playwright-transform-cache/3f/connectionFailurespec_3fcb2d59d7f1ac9abe23f187eeeed5065482bbfa.map' 651 skipped 1 error was not a part of any test, see above for details "><pre class="notranslate"><code class="notranslate">Running 651 tests using 2 workers Error: EACCES: permission denied, open '/tmp/playwright-transform-cache/3f/connectionFailurespec_3fcb2d59d7f1ac9abe23f187eeeed5065482bbfa.map' 651 skipped 1 error was not a part of any test, see above for details </code></pre></div> <p dir="auto">The permissions on /tmp/playwright-transform-cache:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="drwxrwxrwx 162 BrentBaccala BrentBaccala 4096 Mar 21 23:28 /tmp/playwright-transform-cache/"><pre class="notranslate"><code class="notranslate">drwxrwxrwx 162 BrentBaccala BrentBaccala 4096 Mar 21 23:28 /tmp/playwright-transform-cache/ </code></pre></div> <p dir="auto"><code class="notranslate">BrentBaccala</code> is one of the users on the system. Permissions on some subdirectories:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="drwxrwxrwx 2 BrentBaccala BrentBaccala 4096 Feb 21 12:04 3e drwxr-xr-x 2 MaximKhlobystov MaximKhlobystov 4096 Mar 1 13:44 3f drwxrwxrwx 2 BrentBaccala BrentBaccala 4096 Feb 21 12:04 42"><pre class="notranslate"><code class="notranslate">drwxrwxrwx 2 BrentBaccala BrentBaccala 4096 Feb 21 12:04 3e drwxr-xr-x 2 MaximKhlobystov MaximKhlobystov 4096 Mar 1 13:44 3f drwxrwxrwx 2 BrentBaccala BrentBaccala 4096 Feb 21 12:04 42 </code></pre></div> <p dir="auto"><code class="notranslate">MaximKhlobystov</code> is also a user on the system, and I'm running this test (that's trying to access <code class="notranslate">3f</code>) as user <code class="notranslate">baccala</code>, so obviously there's a problem.</p> <p dir="auto">It looks like Maxim is also running Playwright 1.28.1.</p> <p dir="auto">What explanation is there for how this directory <code class="notranslate">3f</code> was created with these restrictive permissions? It surely happened on a previous playwright run, and I really don't know what the exact test configuration was that caused this. The directory is dated March 1, and today is March 21, so reproducing exactly what caused this might be problematic (if it isn't obvious to somebody).</p>
0
<p dir="auto"><a href="http://getbootstrap.com/examples/non-responsive/" rel="nofollow">http://getbootstrap.com/examples/non-responsive/</a></p> <p dir="auto">In the above example page, the three right side links of navbar get hiding while resizing the browser window.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/6b8f3d31b82612ff582a8ab5d780005fa4d54176f0ca0dd980287f92a59e1dae/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313339333532302f313735323133312f35616464346436612d363631302d313165332d393835382d3563336631303639306131362e474946"><img src="https://camo.githubusercontent.com/6b8f3d31b82612ff582a8ab5d780005fa4d54176f0ca0dd980287f92a59e1dae/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313339333532302f313735323133312f35616464346436612d363631302d313165332d393835382d3563336631303639306131362e474946" alt="expanded page" data-animated-image="" data-canonical-src="https://f.cloud.github.com/assets/1393520/1752131/5add4d6a-6610-11e3-9858-5c3f10690a16.GIF" style="max-width: 100%;"></a><br> the above is full size page<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/4cb9d38976def08321f0e42b3aa2b8fba67d552b37fe48ab2d6d476876e75b46/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313339333532302f313735323133322f37353633316633342d363631302d313165332d386332622d3035366232313538363033342e474946"><img src="https://camo.githubusercontent.com/4cb9d38976def08321f0e42b3aa2b8fba67d552b37fe48ab2d6d476876e75b46/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313339333532302f313735323133322f37353633316633342d363631302d313165332d386332622d3035366232313538363033342e474946" alt="same resized page" data-animated-image="" data-canonical-src="https://f.cloud.github.com/assets/1393520/1752132/75631f34-6610-11e3-8c2b-056b21586034.GIF" style="max-width: 100%;"></a><br> when we resize the navbar links get disappears.</p> <p dir="auto">Thanks</p>
<p dir="auto">To reproduce this issue:</p> <p dir="auto">1.) Open Firefox 24 and go to <a href="http://getbootstrap.com/examples/non-responsive/" rel="nofollow">http://getbootstrap.com/examples/non-responsive/</a><br> 2.) Double click the title bar of the window and scale the window so that part of the Navbar is obscured.<br> 3.) Scroll the window horizontally and the page with scroll, but the Navbar stays where it is and will not allow access to the buttons on the right side of the bar.</p> <p dir="auto">This could be a potential issue with smaller devices that put the Navbar off the page when loaded. (Do to shutting off the responsive features)</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/19b24591fdcff6a62ca4b3fc19ed0e11b612c664047b078981ca4e09963924d2/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f353735313731352f313430353039372f61346661373963382d336431612d313165332d393061352d3035643435383134343532612e706e67"><img src="https://camo.githubusercontent.com/19b24591fdcff6a62ca4b3fc19ed0e11b612c664047b078981ca4e09963924d2/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f353735313731352f313430353039372f61346661373963382d336431612d313165332d393061352d3035643435383134343532612e706e67" alt="navbar-error" data-canonical-src="https://f.cloud.github.com/assets/5751715/1405097/a4fa79c8-3d1a-11e3-90a5-05d45814452a.png" style="max-width: 100%;"></a></p>
1
<h1 dir="auto">Summary</h1> <p dir="auto">This isn't necessarily a <em>bug</em>, but it's an interesting find. It's probably even intentional.</p> <p dir="auto">Anyway, instead of rewriting the <code class="notranslate">Math.floor(Math.random() * (1 - 3 + 1)) + 1</code> code three times, I wanted to try writing a custom function to generate the numbers:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function generateRandomNumber(min, max) { return Math.floor(Math.random() * (min - max + 1)) + 1; } slotOne = generateRandomNumber(1, 3); ..."><pre class="notranslate"><code class="notranslate">function generateRandomNumber(min, max) { return Math.floor(Math.random() * (min - max + 1)) + 1; } slotOne = generateRandomNumber(1, 3); ... </code></pre></div> <p dir="auto">The result is the same, but the last test is marked wrong because I didn't retype the random number generation line. No big deal! Just thought I would make mention of it.</p> <h1 dir="auto">Code</h1> <p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-create-a-javascript-slot-machine" rel="nofollow">Waypoint: Create a JavaScript Slot Machine</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 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; function runSlots(){ var slotOne; var slotTwo; var slotThree; var images = [&quot;http://i.imgur.com/9H17QFk.png&quot;, &quot;http://i.imgur.com/9RmpXTy.png&quot;, &quot;http://i.imgur.com/VJnmtt5.png&quot;]; // Only change code below this line. function generateRandomNumber(min, max) { return Math.floor(Math.random() * (min - max + 1)) + 1; } slotOne = generateRandomNumber(1, 3); slotTwo = generateRandomNumber(1, 3); slotThree = generateRandomNumber(1, 3); // Only change code above this line. $(&quot;.logger&quot;).html(&quot;&quot;); $(&quot;.logger&quot;).html(&quot;Not A Win&quot;) if(slotOne !== undefined &amp;&amp; slotTwo !== undefined &amp;&amp; slotThree !== undefined){ $(&quot;.logger&quot;).html(slotOne + &quot; &quot; + slotTwo + &quot; &quot; + slotThree); } return [slotOne, slotTwo, slotThree]; } $(document).ready(function(){ $(&quot;.go&quot;).click(function(){ runSlots(); }); }); &lt;/script&gt; &lt;div&gt; &lt;div class = &quot;container inset&quot;&gt; &lt;div class = &quot;header inset&quot;&gt; &lt;img src=&quot;https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg.gz&quot; alt=&quot;learn to code javascript at Free Code Camp logo&quot; class=&quot;img-responsive nav-logo&quot;&gt; &lt;h2&gt;FCC Slot Machine&lt;/h2&gt; &lt;/div&gt; &lt;div class = &quot;slots inset&quot;&gt; &lt;div class = &quot;slot inset&quot;&gt; &lt;/div&gt; &lt;div class = &quot;slot inset&quot;&gt; &lt;/div&gt; &lt;div class = &quot;slot inset&quot;&gt; &lt;/div&gt; &lt;/div&gt; &lt;br/&gt; &lt;div class = &quot;outset&quot;&gt; &lt;button class = &quot;go inset&quot;&gt; Go &lt;/button&gt; &lt;/div&gt; &lt;br/&gt; &lt;div class = &quot;foot inset&quot;&gt; &lt;span class = &quot;logger&quot;&gt;&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;style&gt; .container { background-color: #4a2b0f; height: 400px; width: 260px; margin: 50px auto; border-radius: 4px; } .header { border: 2px solid #fff; border-radius: 4px; height: 55px; margin: 14px auto; background-color: #457f86 } .header h2 { height: 30px; margin: auto; } .header h2 { font-size: 14px; margin: 0 0; padding: 0; color: #fff; text-align: center; } .slots{ display: flex; background-color: #457f86; border-radius: 6px; border: 2px solid #fff; } .slot{ flex: 1 0 auto; background: white; height: 75px; margin: 8px; border: 2px solid #215f1e; border-radius: 4px; } .go { width: 100%; color: #fff; background-color: #457f86; border: 2px solid #fff; border-radius: 2px; box-sizing: none; outline: none!important; } .foot { height: 150px; background-color: 457f86; border: 2px solid #fff; } .logger { color: white; margin: 10px; } .outset { -webkit-box-shadow: 0px 0px 15px -2px rgba(0,0,0,0.75); -moz-box-shadow: 0px 0px 15px -2px rgba(0,0,0,0.75); box-shadow: 0px 0px 15px -2px rgba(0,0,0,0.75); } .inset { -webkit-box-shadow: inset 0px 0px 15px -2px rgba(0,0,0,0.75); -moz-box-shadow: inset 0px 0px 15px -2px rgba(0,0,0,0.75); box-shadow: inset 0px 0px 15px -2px rgba(0,0,0,0.75); } &lt;/style&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-k">function</span> <span class="pl-en">runSlots</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">slotOne</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">slotTwo</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">slotThree</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">images</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-s">"http://i.imgur.com/9H17QFk.png"</span><span class="pl-kos">,</span> <span class="pl-s">"http://i.imgur.com/9RmpXTy.png"</span><span class="pl-kos">,</span> <span class="pl-s">"http://i.imgur.com/VJnmtt5.png"</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-c">// Only change code below this line.</span> <span class="pl-k">function</span> <span class="pl-en">generateRandomNumber</span><span class="pl-kos">(</span><span class="pl-s1">min</span><span class="pl-kos">,</span> <span class="pl-s1">max</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-v">Math</span><span class="pl-kos">.</span><span class="pl-en">floor</span><span class="pl-kos">(</span><span class="pl-v">Math</span><span class="pl-kos">.</span><span class="pl-en">random</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">*</span> <span class="pl-kos">(</span><span class="pl-s1">min</span> <span class="pl-c1">-</span> <span class="pl-s1">max</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-c1">+</span> <span class="pl-c1">1</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-s1">slotOne</span> <span class="pl-c1">=</span> <span class="pl-en">generateRandomNumber</span><span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">3</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">slotTwo</span> <span class="pl-c1">=</span> <span class="pl-en">generateRandomNumber</span><span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">3</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">slotThree</span> <span class="pl-c1">=</span> <span class="pl-en">generateRandomNumber</span><span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">3</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Only change code above this line.</span> <span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">".logger"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">html</span><span class="pl-kos">(</span><span class="pl-s">""</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">".logger"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">html</span><span class="pl-kos">(</span><span class="pl-s">"Not A Win"</span><span class="pl-kos">)</span> <span class="pl-k">if</span><span class="pl-kos">(</span><span class="pl-s1">slotOne</span> <span class="pl-c1">!==</span> <span class="pl-c1">undefined</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">slotTwo</span> <span class="pl-c1">!==</span> <span class="pl-c1">undefined</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">slotThree</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-en">$</span><span class="pl-kos">(</span><span class="pl-s">".logger"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">html</span><span class="pl-kos">(</span><span class="pl-s1">slotOne</span> <span class="pl-c1">+</span> <span class="pl-s">" "</span> <span class="pl-c1">+</span> <span class="pl-s1">slotTwo</span> <span class="pl-c1">+</span> <span class="pl-s">" "</span> <span class="pl-c1">+</span> <span class="pl-s1">slotThree</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-kos">[</span><span class="pl-s1">slotOne</span><span class="pl-kos">,</span> <span class="pl-s1">slotTwo</span><span class="pl-kos">,</span> <span class="pl-s1">slotThree</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-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">".go"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">click</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">runSlots</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">&lt;/</span><span class="pl-ent">script</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">container inset</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">header inset</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">img</span> <span class="pl-c1">src</span>="<span class="pl-s">https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg.gz</span>" <span class="pl-c1">alt</span>="<span class="pl-s">learn to code javascript at Free Code Camp logo</span>" <span class="pl-c1">class</span>="<span class="pl-s">img-responsive nav-logo</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">h2</span><span class="pl-kos">&gt;</span>FCC Slot Machine<span class="pl-kos">&lt;/</span><span class="pl-ent">h2</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">slots inset</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">slot inset</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">slot inset</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">slot inset</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">br</span>/&gt; <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span> = "<span class="pl-s">outset</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">go inset</span>"<span class="pl-kos">&gt;</span> Go <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">br</span>/&gt; <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span> = "<span class="pl-s">foot inset</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">span</span> <span class="pl-c1">class</span> = "<span class="pl-s">logger</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">span</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">style</span><span class="pl-kos">&gt;</span> .<span class="pl-c1">container</span> { <span class="pl-c1">background-color</span><span class="pl-kos">:</span> <span class="pl-pds"><span class="pl-kos">#</span>4a2b0f</span>; <span class="pl-c1">height</span><span class="pl-kos">:</span> <span class="pl-c1">400<span class="pl-smi">px</span></span>; <span class="pl-c1">width</span><span class="pl-kos">:</span> <span class="pl-c1">260<span class="pl-smi">px</span></span>; <span class="pl-c1">margin</span><span class="pl-kos">:</span> <span class="pl-c1">50<span class="pl-smi">px</span></span> auto; <span class="pl-c1">border-radius</span><span class="pl-kos">:</span> <span class="pl-c1">4<span class="pl-smi">px</span></span>; } .<span class="pl-c1">header</span> { <span class="pl-c1">border</span><span class="pl-kos">:</span> <span class="pl-c1">2<span class="pl-smi">px</span></span> solid <span class="pl-pds"><span class="pl-kos">#</span>fff</span>; <span class="pl-c1">border-radius</span><span class="pl-kos">:</span> <span class="pl-c1">4<span class="pl-smi">px</span></span>; <span class="pl-c1">height</span><span class="pl-kos">:</span> <span class="pl-c1">55<span class="pl-smi">px</span></span>; <span class="pl-c1">margin</span><span class="pl-kos">:</span> <span class="pl-c1">14<span class="pl-smi">px</span></span> auto; <span class="pl-c1">background-color</span><span class="pl-kos">:</span> <span class="pl-pds"><span class="pl-kos">#</span>457f86</span> } .<span class="pl-c1">header</span> <span class="pl-ent">h2</span> { <span class="pl-c1">height</span><span class="pl-kos">:</span> <span class="pl-c1">30<span class="pl-smi">px</span></span>; <span class="pl-c1">margin</span><span class="pl-kos">:</span> auto; } .<span class="pl-c1">header</span> <span class="pl-ent">h2</span> { <span class="pl-c1">font-size</span><span class="pl-kos">:</span> <span class="pl-c1">14<span class="pl-smi">px</span></span>; <span class="pl-c1">margin</span><span class="pl-kos">:</span> <span class="pl-c1">0</span> <span class="pl-c1">0</span>; <span class="pl-c1">padding</span><span class="pl-kos">:</span> <span class="pl-c1">0</span>; <span class="pl-c1">color</span><span class="pl-kos">:</span> <span class="pl-pds"><span class="pl-kos">#</span>fff</span>; <span class="pl-c1">text-align</span><span class="pl-kos">:</span> center; } .<span class="pl-c1">slots</span>{ <span class="pl-c1">display</span><span class="pl-kos">:</span> flex; <span class="pl-c1">background-color</span><span class="pl-kos">:</span> <span class="pl-pds"><span class="pl-kos">#</span>457f86</span>; <span class="pl-c1">border-radius</span><span class="pl-kos">:</span> <span class="pl-c1">6<span class="pl-smi">px</span></span>; <span class="pl-c1">border</span><span class="pl-kos">:</span> <span class="pl-c1">2<span class="pl-smi">px</span></span> solid <span class="pl-pds"><span class="pl-kos">#</span>fff</span>; } .<span class="pl-c1">slot</span>{ <span class="pl-c1">flex</span><span class="pl-kos">:</span> <span class="pl-c1">1</span> <span class="pl-c1">0</span> auto; <span class="pl-c1">background</span><span class="pl-kos">:</span> white; <span class="pl-c1">height</span><span class="pl-kos">:</span> <span class="pl-c1">75<span class="pl-smi">px</span></span>; <span class="pl-c1">margin</span><span class="pl-kos">:</span> <span class="pl-c1">8<span class="pl-smi">px</span></span>; <span class="pl-c1">border</span><span class="pl-kos">:</span> <span class="pl-c1">2<span class="pl-smi">px</span></span> solid <span class="pl-pds"><span class="pl-kos">#</span>215f1e</span>; <span class="pl-c1">border-radius</span><span class="pl-kos">:</span> <span class="pl-c1">4<span class="pl-smi">px</span></span>; } .<span class="pl-c1">go</span> { <span class="pl-c1">width</span><span class="pl-kos">:</span> <span class="pl-c1">100<span class="pl-smi">%</span></span>; <span class="pl-c1">color</span><span class="pl-kos">:</span> <span class="pl-pds"><span class="pl-kos">#</span>fff</span>; <span class="pl-c1">background-color</span><span class="pl-kos">:</span> <span class="pl-pds"><span class="pl-kos">#</span>457f86</span>; <span class="pl-c1">border</span><span class="pl-kos">:</span> <span class="pl-c1">2<span class="pl-smi">px</span></span> solid <span class="pl-pds"><span class="pl-kos">#</span>fff</span>; <span class="pl-c1">border-radius</span><span class="pl-kos">:</span> <span class="pl-c1">2<span class="pl-smi">px</span></span>; <span class="pl-c1">box-sizing</span><span class="pl-kos">:</span> none; <span class="pl-c1">outline</span><span class="pl-kos">:</span> none<span class="pl-k">!important</span>; } .<span class="pl-c1">foot</span> { <span class="pl-c1">height</span><span class="pl-kos">:</span> <span class="pl-c1">150<span class="pl-smi">px</span></span>; <span class="pl-c1">background-color</span><span class="pl-kos">:</span> <span class="pl-c1">457</span>f86; <span class="pl-c1">border</span><span class="pl-kos">:</span> <span class="pl-c1">2<span class="pl-smi">px</span></span> solid <span class="pl-pds"><span class="pl-kos">#</span>fff</span>; } .<span class="pl-c1">logger</span> { <span class="pl-c1">color</span><span class="pl-kos">:</span> white; <span class="pl-c1">margin</span><span class="pl-kos">:</span> <span class="pl-c1">10<span class="pl-smi">px</span></span>; } .<span class="pl-c1">outset</span> { <span class="pl-c1">-webkit-box-shadow</span><span class="pl-kos">:</span> <span class="pl-c1">0<span class="pl-smi">px</span></span> <span class="pl-c1">0<span class="pl-smi">px</span></span> <span class="pl-c1">15<span class="pl-smi">px</span></span> <span class="pl-c1">-2<span class="pl-smi">px</span></span> <span class="pl-en">rgba</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-c1">0</span><span class="pl-kos">,</span><span class="pl-c1">0.75</span>); <span class="pl-c1">-moz-box-shadow</span><span class="pl-kos">:</span> <span class="pl-c1">0<span class="pl-smi">px</span></span> <span class="pl-c1">0<span class="pl-smi">px</span></span> <span class="pl-c1">15<span class="pl-smi">px</span></span> <span class="pl-c1">-2<span class="pl-smi">px</span></span> <span class="pl-en">rgba</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-c1">0</span><span class="pl-kos">,</span><span class="pl-c1">0.75</span>); <span class="pl-c1">box-shadow</span><span class="pl-kos">:</span> <span class="pl-c1">0<span class="pl-smi">px</span></span> <span class="pl-c1">0<span class="pl-smi">px</span></span> <span class="pl-c1">15<span class="pl-smi">px</span></span> <span class="pl-c1">-2<span class="pl-smi">px</span></span> <span class="pl-en">rgba</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-c1">0</span><span class="pl-kos">,</span><span class="pl-c1">0.75</span>); } .<span class="pl-c1">inset</span> { <span class="pl-c1">-webkit-box-shadow</span><span class="pl-kos">:</span> inset <span class="pl-c1">0<span class="pl-smi">px</span></span> <span class="pl-c1">0<span class="pl-smi">px</span></span> <span class="pl-c1">15<span class="pl-smi">px</span></span> <span class="pl-c1">-2<span class="pl-smi">px</span></span> <span class="pl-en">rgba</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-c1">0</span><span class="pl-kos">,</span><span class="pl-c1">0.75</span>); <span class="pl-c1">-moz-box-shadow</span><span class="pl-kos">:</span> inset <span class="pl-c1">0<span class="pl-smi">px</span></span> <span class="pl-c1">0<span class="pl-smi">px</span></span> <span class="pl-c1">15<span class="pl-smi">px</span></span> <span class="pl-c1">-2<span class="pl-smi">px</span></span> <span class="pl-en">rgba</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-c1">0</span><span class="pl-kos">,</span><span class="pl-c1">0.75</span>); <span class="pl-c1">box-shadow</span><span class="pl-kos">:</span> inset <span class="pl-c1">0<span class="pl-smi">px</span></span> <span class="pl-c1">0<span class="pl-smi">px</span></span> <span class="pl-c1">15<span class="pl-smi">px</span></span> <span class="pl-c1">-2<span class="pl-smi">px</span></span> <span class="pl-en">rgba</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-c1">0</span><span class="pl-kos">,</span><span class="pl-c1">0.75</span>); } <span class="pl-kos">&lt;/</span><span class="pl-ent">style</span><span class="pl-kos">&gt;</span></pre></div>
<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-create-a-javascript-slot-machine" rel="nofollow">http://freecodecamp.com/challenges/waypoint-create-a-javascript-slot-machine</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p> <p dir="auto">The example in the first screenshot should pass, but fails because the last test checks to see if the random number formula appears exactly three times.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2019665/9375333/2d56f996-46b4-11e5-9d0a-3ba1f1f588c3.png"><img src="https://cloud.githubusercontent.com/assets/2019665/9375333/2d56f996-46b4-11e5-9d0a-3ba1f1f588c3.png" alt="screen shot 2015-08-19 at 8 51 21 pm" style="max-width: 100%;"></a></p> <p dir="auto">It's more efficient to write a single function that returns a random number and then have each variable call that function.</p> <p dir="auto">In fact, it doesn't matter where the formula appears, as long as it appears three times. Here, I passed by repeating it twice in comments.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2019665/9375389/e201c1be-46b4-11e5-87c8-9a63dd181f7c.png"><img src="https://cloud.githubusercontent.com/assets/2019665/9375389/e201c1be-46b4-11e5-87c8-9a63dd181f7c.png" alt="screen shot 2015-08-19 at 8 56 47 pm" style="max-width: 100%;"></a></p>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=sbrannen" rel="nofollow">Sam Brannen</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7161?redirect=false" rel="nofollow">SPR-7161</a></strong> and commented</p> <p dir="auto">The reference manual should updated regarding PetClinic's new location (i.e., available in a separate subversion repository), etc.</p> <p dir="auto">See comments in the forums.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0.2</p> <p dir="auto"><strong>Reference URL:</strong> <a href="http://forum.springsource.org/showthread.php?t=73291&amp;page=2" rel="nofollow">http://forum.springsource.org/showthread.php?t=73291&amp;page=2</a></p> <p dir="auto"><strong>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398104950" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11822" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11822/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11822">#11822</a> Link to location of Spring samples in reference documentation (<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="398098286" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10890" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10890/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10890">#10890</a> Update PetClinic tutorial, readme files, and DB scripts for Spring 3.0</li> </ul> <p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/42cdfbcd89c3116622fee5d1c57435ae70fcc344/hovercard" href="https://github.com/spring-projects/spring-framework/commit/42cdfbcd89c3116622fee5d1c57435ae70fcc344"><tt>42cdfbc</tt></a></p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=bbrady" rel="nofollow">Bob Brady</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3616?redirect=false" rel="nofollow">SPR-3616</a></strong> and commented</p> <p dir="auto">I am using HibernateTemplate to load all persisted objects of a class that has a collection of enums. The problem is that for each enum in the collection, I get a copy of the parent object when calling HibernateTemplate's loadAll.</p> <p dir="auto">Say ExampleDomain is the parent class and it has a collection of Units like so:</p> <p dir="auto">[CODE]<br> <code class="notranslate">@CollectionOfElements</code>(fetch=FetchType.EAGER)<br> <code class="notranslate">@JoinTable</code>(joinColumns = <code class="notranslate">@JoinColumn</code>(name="MY_EXAMPLE_ID"))<br> <code class="notranslate">@Column</code>(nullable=true)<br> <code class="notranslate">@Enumerated</code>(value=EnumType.STRING)<br> public Set&lt;Units&gt; getChosenUnits()<br> {<br> return this.chosenUnits;<br> }<br> [/CODE]</p> <p dir="auto">Then If I add three Units to the an instance of ExampleDomain and persist it, HibernateTemplate will return three identical copies of the persisted object! Here's a snippet:</p> <p dir="auto">[CODE]<br> ExampleDomain ed = new ExampleDomain();<br> ...<br> // Add 3 Units to collection<br> Set&lt;Units&gt; allUnits = new HashSet&lt;Units&gt;();<br> allUnits.add(units1);<br> allUnits.add(units2);<br> allUnits.add(units3);<br> ed.setChosenUnits(allUnits);<br> // We're, clean: this returns an empty list<br> List&lt;ExampleDomain&gt; domains = this.getHibernateTemplate().loadAll(ExampleDomain.class);<br> // Persist the newly created ExampleDomain object<br> this.getHibernateTemplate().saveOrUpdatel(ed);<br> // Now we get back three duplicate objects!<br> domains = this.getHibernateTemplate().loadAll(ExampleDomain.class);<br> [/CODE]</p> <p dir="auto">Myself and a co-worker have duplicated this behavior with different classes, but the same collection of enum elements format. Also, others have reported a similar issue in the Spring forums (Re: <a href="http://forum.springframework.org/showthread.php?p=128103&amp;posted=1#post128103" rel="nofollow">http://forum.springframework.org/showthread.php?p=128103&amp;posted=1#post128103</a> ).</p> <p dir="auto">Our workaround is simple to use HQL instead of loadAll:</p> <p dir="auto">[CODE]<br> this.getHibernateTemplate().find("from ExampleDomain");<br> [/CODE]</p> <p dir="auto">Thank you,<br> Bob</p> <hr> <p dir="auto"><strong>Affects:</strong> 2.0.6</p>
0
<h1 dir="auto">Description of the new feature/enhancement</h1> <p dir="auto">Hello everybody, I think it is a good idea to give the user the possibility to pick colors of the currently opened tabs. The use case is the following: I use command line git and I work on multiple projects in parallel. This means that I have multiple tabs, each for a different git repo.</p> <p dir="auto">I want to be able to differentiate at a quick glance which tab is for which folder/repo/project/whatever and a tab color (if I can set one) is very strong visual cue.</p> <p dir="auto">For example, Visual Studio Code has the <a href="https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock" rel="nofollow">Peacock extension</a>, which gives you the possibility to color your editors differently, according to the project you are currently working on.</p> <p dir="auto">Visual Studio has similarly <a href="https://marketplace.visualstudio.com/items?itemName=Wumpf.SolutionColor" rel="nofollow">SolutionColor</a></p> <h1 dir="auto">Proposed technical implementation details (optional)</h1> <p dir="auto">What I imagine is that, if the user does a right click on a tab, a menu is shown, with an element called 'Choose a color' or something similar. When the element is clicked, a simple color picker (ala OneNote) is displayed:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3358056/65906648-36db9980-e3c3-11e9-8496-8012f68d1117.png"><img src="https://user-images.githubusercontent.com/3358056/65906648-36db9980-e3c3-11e9-8496-8012f68d1117.png" alt="color_picker" style="max-width: 100%;"></a></p> <p dir="auto">Then there are two possibilities:</p> <ul dir="auto"> <li>the simple one is that the tabs are colored in the selected color and after the application is closed, this information is lost</li> <li>the more complex one: the application takes note of the current working dir of the shell, belonging to the tab and as long as the shell remains in this folder or a subfolder, the tab is colored in the chosen color. If this is even possible, one can store the folder/chosen color list in the settings and restore the tab colors, after the application is restarted.</li> </ul> <p dir="auto">If this is interesting to you, I would like to try to implement it. What are your thoughts?</p> <p dir="auto">Regards</p>
<h1 dir="auto">Environment</h1> <p dir="auto">OS - Windows 10</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Version 10.0.18362.239] Windows Terminal version (if applicable):0.2.1831.0 Any other software?"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Version 10.0.18362.239] Windows Terminal version (if applicable):0.2.1831.0 Any other software? </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ul dir="auto"> <li>Type a any command in the new terminal for example <code class="notranslate">md new_folder_name</code></li> <li>change directory to the new folder</li> <li>Press the arrow up key<br> Causes the misaligned text in the terminal and duplication of the text randomly on the terminal window. See the below image<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/2546640/61137201-17536580-a493-11e9-9eef-1c5eee3c2aea.PNG"><img src="https://user-images.githubusercontent.com/2546640/61137201-17536580-a493-11e9-9eef-1c5eee3c2aea.PNG" alt="Capture" style="max-width: 100%;"></a></li> </ul>
0
<h3 dir="auto">Is your feature request related to a problem</h3> <p dir="auto">Not a bug, just a problem with my CI system.</p> <p dir="auto">I want to be able to programmatically access the openapi schema and save it to a file without running the web server</p> <h3 dir="auto">The solution you would like</h3> <p dir="auto">Ideally, I'd like to write a script that would output the openapi schema without running the webserver.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from myapp.api import api json.dump( get_schema_from_app(api), open('openapi_schema.json', 'w') )"><pre class="notranslate"><code class="notranslate">from myapp.api import api json.dump( get_schema_from_app(api), open('openapi_schema.json', 'w') ) </code></pre></div> <h3 dir="auto">Describe alternatives you've considered</h3> <p dir="auto">I've considered running the app in my CICD workflow and requesting the schema via http, but that seems like a lot of overhead, and I'd bet the functions to do what I want are already in the code and just need to be invoked in the right order.</p> <h3 dir="auto">Additional context</h3> <p dir="auto">Nothing to add, other than I'm gonna open a PR and see if I can figure it out.</p>
<h3 dir="auto">Is your feature request related to a problem</h3> <p dir="auto">Is your feature request related to a problem?</p> <p dir="auto">In a common CI environment there are cases when automatically deploying an openapi.json to services like Github Pages can very useful. However, in order to access the openapi.json thats generated after fastapi instance is running and providing the <code class="notranslate">docs</code> endpoint is sub-optimal because it requires spinning up the service in CI just to curl that file.</p> <h3 dir="auto">The solution you would like</h3> <p dir="auto">Add extra flags to <code class="notranslate">fastapi</code> that will allow to generate the <code class="notranslate">openapi.json</code> without running the service instance.</p> <p dir="auto">For example when invoking via uvicorn pass extra args that fastapi will somehow intercept and produce the openapi file to specified location:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="uvicorn main:app --fastapi_generate_openapi --fastapi_openapi_output &quot;{output_path_goes_here}&quot;"><pre class="notranslate"><code class="notranslate">uvicorn main:app --fastapi_generate_openapi --fastapi_openapi_output "{output_path_goes_here}" </code></pre></div> <p dir="auto">If its not possible to intercept the args when invoked via <code class="notranslate">uvicorn</code>, then perhaps another alternative is to provide a simple <code class="notranslate">fastapi</code> cli, pre packaged with the python module and do something like:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fastapi --fastapi_generate_openapi --fastapi_openapi_output &quot;{output_path_goes_here}&quot;"><pre class="notranslate"><code class="notranslate">fastapi --fastapi_generate_openapi --fastapi_openapi_output "{output_path_goes_here}" </code></pre></div> <h3 dir="auto">Describe alternatives you've considered</h3> <p dir="auto">As described in problem description, the working alternative is running the instance and curling the openapi.json from the docs endpoint.</p> <h3 dir="auto">Additional comments</h3> <p dir="auto">If this feature is somehow already available and someone could provide a link to how to use/invoke it ill greatly appreciate it and close the GitHub issue :-)</p>
1
<p dir="auto"><strong>Migrated issue, originally created by Varialus (<a href="https://github.com/varialus">@varialus</a>)</strong></p> <p dir="auto">Flushing data to disk with SQLite locks the whole database until a commit has been performed. Because the autoflush setting is enabled by default, if a flush goes unnoticed, the database will stay locked, blocking all other threads. SQLite is commonly used while evaluating SQLAlchemy, so the your default settings should work seamlessly with it.</p> <p dir="auto">Risk Mitigation Ideas</p> <ol dir="auto"> <li> <p dir="auto">If the autoflush value is manually specified while making a session, then if an SQLite engine is being used, autoflush should be set to False by default.</p> </li> <li> <p dir="auto">Add some bright warnings to your documentation.</p> </li> <li> <p dir="auto">Don't allow autoflush to be set while using SQLite.</p> </li> <li> <p dir="auto">Disable autoflush by default regardless of the database.</p> </li> <li> <p dir="auto">Change the behavior of SQLite to not lock the whole database while performing writes to disk. The optional support for write-ahead logging which was added in SQLite version 3.7.0 may be of interest.</p> </li> <li> <p dir="auto">Flush to a cache.</p> </li> <li> <p dir="auto">Demand that SQLite change their default behavior to suit SQLAlchemy.</p> </li> </ol> <hr> <p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/2447/TestCaseAutoflushLocksSQLite.py">TestCaseAutoflushLocksSQLite.py</a></p>
<p dir="auto"><strong>Migrated issue, originally created by Andrew Paulo Robillo (<a href="https://github.com/shimofuri">@shimofuri</a>)</strong></p> <p dir="auto">I'd been copying this <a href="https://bitbucket.org/snippets/shimofuri/bALAz" rel="nofollow">snippet</a> from my old cookbook to add a surrogate key to a declarative table class:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class MixinIntKey(object): @declared_attr def key(cls): return Column( pg.INTEGER, Sequence(f&quot;sqk_{cls.__tablename__}&quot;, 1, 1), nullable=False, primary_key=True )"><pre class="notranslate"><code class="notranslate">class MixinIntKey(object): @declared_attr def key(cls): return Column( pg.INTEGER, Sequence(f"sqk_{cls.__tablename__}", 1, 1), nullable=False, primary_key=True ) </code></pre></div> <p dir="auto">This code was working before (some 3-4 years ago, I think around version 0.8 ): it generates the Sequence when I build the database objects through metadata.create_all(). The only change I made to the snippet was to update it to use format strings (Python 3.6).</p> <p dir="auto">After some googling around and testing (see attached file/<a href="https://bitbucket.org/snippets/shimofuri/bALAz" rel="nofollow">link</a>), the Sequence can be generated only if the metadata is passed during Sequence init:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Sequence(f&quot;sqk_{cls.__tablename__}&quot;, 1, 1, metadata=metadata)"><pre class="notranslate"><code class="notranslate">Sequence(f"sqk_{cls.__tablename__}", 1, 1, metadata=metadata) </code></pre></div> <p dir="auto">My environment: psycopg2==2.7.1, SQLAlchemy==1.1.8, Python 3.6 64bit on Windows 8.1 64bit, PostgreSQL 9.6 server</p> <hr> <p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/3951/sequence_bug.py">sequence_bug.py</a></p>
0
<p dir="auto">Even if my code is working i get this error<br> Challenge <a href="http://www.freecodecamp.com/challenges/checkpoint-stand-in-line#?solution=%2F%2F%20Setup%0Avar%20myArr%20%3D%20%5B1%2C2%2C3%2C4%2C5%5D%3B%0A%0Afunction%20queue%28arr%2C%20item%29%20%7B%0A%20%20%2F%2F%20Your%20code%20here%0A%20%20arr.push%28item%29%3B%0A%20%20item%20%3D%20arr.shift%28%29%3B%0A%20%20return%20item%3B%20%20%2F%2F%20Change%20this%20line%0A%7D%0A%0A%2F%2F%20Display%20Code%0Aconsole.log%28%22Before%3A%20%22%20%2B%20JSON.stringify%28myArr%29%29%3B%0Aconsole.log%28queue%28myArr%2C%206%29%29%3B%20%2F%2F%20Modify%20this%20line%20to%20test%0Aconsole.log%28%22After%3A%20%22%20%2B%20JSON.stringify%28myArr%29%29%3B%0A" rel="nofollow">Checkpoint: Stand in Line</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36</code>.<br> Please describe how to reproduce this issue, and include links to screenshots if possible.</p> <p dir="auto">My code:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Setup var myArr = [1,2,3,4,5]; function queue(arr, item) { // Your code here arr.push(item); item = arr.shift(); return item; // Change this line } // Display Code console.log(&quot;Before: &quot; + JSON.stringify(myArr)); console.log(queue(myArr, 6)); // Modify this line to test console.log(&quot;After: &quot; + JSON.stringify(myArr)); "><pre class="notranslate"><span class="pl-c">// Setup</span> <span class="pl-k">var</span> <span class="pl-s1">myArr</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span><span class="pl-c1">2</span><span class="pl-kos">,</span><span class="pl-c1">3</span><span class="pl-kos">,</span><span class="pl-c1">4</span><span class="pl-kos">,</span><span class="pl-c1">5</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">function</span> <span class="pl-en">queue</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">,</span> <span class="pl-s1">item</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// Your code here</span> <span class="pl-s1">arr</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">item</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">item</span> <span class="pl-c1">=</span> <span class="pl-s1">arr</span><span class="pl-kos">.</span><span class="pl-en">shift</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">item</span><span class="pl-kos">;</span> <span class="pl-c">// Change this line</span> <span class="pl-kos">}</span> <span class="pl-c">// Display Code</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">"Before: "</span> <span class="pl-c1">+</span> <span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-s1">myArr</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-en">queue</span><span class="pl-kos">(</span><span class="pl-s1">myArr</span><span class="pl-kos">,</span> <span class="pl-c1">6</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Modify this line to test</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">"After: "</span> <span class="pl-c1">+</span> <span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-s1">myArr</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/bonfire-stand-in-line#?solution=%2F%2F%20Setup%0Avar%20myArr%20%3D%20%5B1%2C2%2C3%2C4%2C5%5D%3B%0A%0Afunction%20queue%28arr%2C%20item%29%20%7B%0A%20%20arr.push%28item%29%3B%0A%20%20return%20arr.shift%28%29%3B%20%20%2F%2F%20Change%20this%20line%0A%7D%0A%0A%0A" rel="nofollow">Bonfire: Stand in Line</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36</code>.<br> Please describe how to reproduce this issue, and include links to screenshots if possible.</p> <p dir="auto">My code:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Setup var myArr = [1,2,3,4,5]; function queue(arr, item) { arr.push(item); return arr.shift(); // Change this line } "><pre class="notranslate"><span class="pl-c">// Setup</span> <span class="pl-k">var</span> <span class="pl-s1">myArr</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span><span class="pl-c1">2</span><span class="pl-kos">,</span><span class="pl-c1">3</span><span class="pl-kos">,</span><span class="pl-c1">4</span><span class="pl-kos">,</span><span class="pl-c1">5</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">function</span> <span class="pl-en">queue</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">,</span> <span class="pl-s1">item</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">arr</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">item</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-s1">arr</span><span class="pl-kos">.</span><span class="pl-en">shift</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Change this line</span> <span class="pl-kos">}</span> </pre></div> <p dir="auto">The above version passes, since the three initially-supplied calls at the bottom to Console.log have been removed. Without the removal, submitting the code yields a stack overflow error.</p> <p dir="auto">In other Bonfires and Waypoints that I've done (a lot of them), there was no instance where the testing code (usually, just an illustrative function call) needed to be removed for a submittal to pass. Thus, this Bonfire does not conform to the normal pattern.</p> <p dir="auto">IMO, providing this testing code at the bottom for this Bonfire is overkill. By this time, if campers want to test in their own environment, they have figured out how to do so. Also, the calls to JSON.stringify are unnecessary - console.log can handle an array of integers without it.</p>
1
<p dir="auto">React version: 16.13.1</p> <h2 dir="auto">Steps To Reproduce</h2> <ol dir="auto"> <li>Create function with generic type parameter</li> <li>Use that generic type parameter in <code class="notranslate">useCallback</code>, <code class="notranslate">useEffect</code> or <code class="notranslate">useMemo</code></li> </ol> <p dir="auto">Example:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export function useDocument&lt;TDocument&gt;(path: string, defaultValue: TDocument | undefined = undefined): TDocument | undefined { const [value, setValue] = useState&lt;TDocument | undefined&gt;(defaultValue); const onNext = useCallback((snapshot: FirebaseFirestoreTypes.DocumentSnapshot&lt;FirebaseFirestoreTypes.DocumentData&gt;) =&gt; { if (snapshot.exists) setValue(build&lt;TDocument&gt;(snapshot.data(), snapshot.id)); else setValue(undefined); }, []); useEffect(() =&gt; firestore().doc(path).onSnapshot(onNext), [onNext, path]); return value; }"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">useDocument</span><span class="pl-c1">&lt;</span><span class="pl-smi">TDocument</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">path</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">defaultValue</span>: <span class="pl-smi">TDocument</span> <span class="pl-c1">|</span> <span class="pl-c1">undefined</span> <span class="pl-c1">=</span> <span class="pl-c1">undefined</span><span class="pl-kos">)</span>: <span class="pl-smi">TDocument</span> <span class="pl-c1">|</span> <span class="pl-c1">undefined</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-kos">[</span><span class="pl-s1">value</span><span class="pl-kos">,</span> <span class="pl-s1">setValue</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-en">useState</span><span class="pl-kos">&lt;</span><span class="pl-smi">TDocument</span> <span class="pl-c1">|</span> <span class="pl-c1">undefined</span><span class="pl-kos">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">defaultValue</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">onNext</span> <span class="pl-c1">=</span> <span class="pl-en">useCallback</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">snapshot</span>: <span class="pl-smi">FirebaseFirestoreTypes</span><span class="pl-kos">.</span><span class="pl-smi">DocumentSnapshot</span><span class="pl-kos">&lt;</span><span class="pl-smi">FirebaseFirestoreTypes</span><span class="pl-kos">.</span><span class="pl-smi">DocumentData</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-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">snapshot</span><span class="pl-kos">.</span><span class="pl-c1">exists</span><span class="pl-kos">)</span> <span class="pl-en">setValue</span><span class="pl-kos">(</span><span class="pl-en">build</span><span class="pl-kos">&lt;</span><span class="pl-smi">TDocument</span><span class="pl-kos">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">snapshot</span><span class="pl-kos">.</span><span class="pl-en">data</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-s1">snapshot</span><span class="pl-kos">.</span><span class="pl-c1">id</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-en">setValue</span><span class="pl-kos">(</span><span class="pl-c1">undefined</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">useEffect</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-en">firestore</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">doc</span><span class="pl-kos">(</span><span class="pl-s1">path</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">onSnapshot</span><span class="pl-kos">(</span><span class="pl-s1">onNext</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s1">onNext</span><span class="pl-kos">,</span> <span class="pl-s1">path</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">value</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/15199031/92776710-ce9d8200-f39f-11ea-84bb-3d03fb76f8f1.png"><img src="https://user-images.githubusercontent.com/15199031/92776710-ce9d8200-f39f-11ea-84bb-3d03fb76f8f1.png" alt="Screenshot 2020-09-10 at 19 57 06" style="max-width: 100%;"></a></p> <h2 dir="auto">The current behavior</h2> <p dir="auto">Shows error <code class="notranslate">React Hook useCallback has a missing dependency: 'TDocument'. Either include it or remove the dependency array.eslintreact-hooks/exhaustive-deps)</code></p> <h2 dir="auto">The expected behavior</h2> <p dir="auto">Should not show any errors, because it isn't possible to add types to the dependencies array (types don't exist at runtime!)</p>
<p dir="auto">React version: <code class="notranslate">16.13.1</code> (although this is related to the eslint plugin).</p> <h2 dir="auto">Steps To Reproduce</h2> <ol dir="auto"> <li>Install <code class="notranslate">eslint-plugin-react-hooks@4.1.0</code> with <code class="notranslate">@typescript-eslint/parser@4.0.1</code> in a TypeScript project.</li> <li>Within your hook define a type, or cast a value to a certain type` <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const actions = useMemo( () =&gt; bindActionCreators(MultishiftActions, dispatch) as Partial&lt;Item&gt;, [dispatch], );"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">actions</span> <span class="pl-c1">=</span> <span class="pl-en">useMemo</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-en">bindActionCreators</span><span class="pl-kos">(</span><span class="pl-smi">MultishiftActions</span><span class="pl-kos">,</span> <span class="pl-s1">dispatch</span><span class="pl-kos">)</span> <span class="pl-k">as</span> <span class="pl-smi">Partial</span><span class="pl-kos">&lt;</span><span class="pl-smi">Item</span><span class="pl-kos">&gt;</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s1">dispatch</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> </li> <li><code class="notranslate">eslint-plugin-react-hooks</code> responds with this error <code class="notranslate">React Hook useMemo has a missing dependency: Item. Either include it or remove the dependency array.</code></li> </ol> <p dir="auto">Link to code example: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="690407705" data-permission-text="Title is private" data-url="https://github.com/remirror/remirror/issues/619" data-hovercard-type="pull_request" data-hovercard-url="/remirror/remirror/pull/619/hovercard" href="https://github.com/remirror/remirror/pull/619">remirror/remirror/pull/619</a></p> <ul dir="auto"> <li>Checkout the remirror codebase <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" git clone https://github.com/remirror/remirror git checkout typedoc"><pre class="notranslate"> git clone https://github.com/remirror/remirror git checkout typedoc</pre></div> </li> <li>Install the dependencies with <code class="notranslate">pnpm</code>. To setup <code class="notranslate">pnpm </code> run <code class="notranslate">npm i -g pnpm</code>.</li> <li>Run the command <code class="notranslate">pnpm run lint:es</code> to lint the codebase.</li> </ul> <h2 dir="auto">The current behavior</h2> <p dir="auto">Types are identified as missing dependencies within a hook and <a href="https://github.com/remirror/remirror/pull/619/checks?check_run_id=1058210430">CI fails</a>.</p> <h2 dir="auto">The expected behavior</h2> <p dir="auto">Types shouldn't be identified as missing dependencies.</p>
1
<p dir="auto">Bug is reproducible in Babel 5.x REPL. I wasn't able to test it with Babel 6, sorry.</p> <p dir="auto"><a href="https://babeljs.io/repl/#?experimental=true&amp;evaluate=true&amp;loose=false&amp;spec=true&amp;playground=true&amp;code=function%20composeSync%28f%2C%20g%29%20%7B%0A%20%20return%20%28...args%29%20%3D%3E%20f%28g%28...args%29%29%3B%0A%7D%0A%0Afunction%20composeAsync%28f%2C%20g%29%20%7B%0A%20%20return%20async%20%28...args%29%20%3D%3E%20f%28await%20g%28...args%29%29%3B%0A%7D%0A" rel="nofollow">Code example</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function composeSync(f, g) { return (...args) =&gt; f(g(...args)); } function composeAsync(f, g) { return async (...args) =&gt; f(await g(...args)); }"><pre class="notranslate"><code class="notranslate">function composeSync(f, g) { return (...args) =&gt; f(g(...args)); } function composeAsync(f, g) { return async (...args) =&gt; f(await g(...args)); } </code></pre></div> <p dir="auto">In first function everything is good: the result of <code class="notranslate">composeSync</code> will be an arrow function which uses rest operator for getting all arguments.</p> <p dir="auto">In the <code class="notranslate">composeAsync</code> function behavior is different (maybe because of regenerator's runtime?): arguments for rest operator are taken from outer scope, from <code class="notranslate">composeAsync</code> function.</p> <p dir="auto">Any thoughts?</p>
<p dir="auto">Choose one: bug report</p> <p dir="auto">The error message</p> <blockquote> <p dir="auto">TypeError: test.js: Duplicate declaration "tmp" (This is an error on an internal node. Probably an internal error.)</p> </blockquote> <p dir="auto">is shown when transpiling the input code. node successfully executes the input code.</p> <h3 dir="auto">Input Code</h3> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="async function foo() { (async function (number) { const tmp = number }) }"><pre class="notranslate"><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-kos">{</span> <span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">number</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">tmp</span> <span class="pl-c1">=</span> <span class="pl-s1">number</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> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;presets&quot;: [ [ &quot;@babel/env&quot; , { &quot;targets&quot;: { &quot;browsers&quot;: [ &quot;last 2 chrome versions&quot; , &quot;last 2 chromeandroid versions&quot; , &quot;firefox esr&quot; , &quot;last 2 firefox versions&quot; , &quot;edge &gt;= 15&quot; , &quot;safari &gt;= 11&quot; ] } , &quot;debug&quot;: true } ] ] }"><pre class="notranslate"><span class="pl-kos">{</span> <span class="pl-s">"presets"</span>: <span class="pl-kos">[</span> <span class="pl-kos">[</span> <span class="pl-s">"@babel/env"</span> <span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"targets"</span>: <span class="pl-kos">{</span> <span class="pl-s">"browsers"</span>: <span class="pl-kos">[</span> <span class="pl-s">"last 2 chrome versions"</span> <span class="pl-kos">,</span> <span class="pl-s">"last 2 chromeandroid versions"</span> <span class="pl-kos">,</span> <span class="pl-s">"firefox esr"</span> <span class="pl-kos">,</span> <span class="pl-s">"last 2 firefox versions"</span> <span class="pl-kos">,</span> <span class="pl-s">"edge &gt;= 15"</span> <span class="pl-kos">,</span> <span class="pl-s">"safari &gt;= 11"</span> <span class="pl-kos">]</span> <span class="pl-kos">}</span> <span class="pl-kos">,</span> <span class="pl-s">"debug"</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></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;dependencies&quot;: { &quot;@babel/cli&quot;: &quot;^7.0.0-beta.32&quot;, &quot;@babel/core&quot;: &quot;^7.0.0-beta.32&quot;, &quot;@babel/preset-env&quot;: &quot;^7.0.0-beta.32&quot;, &quot;regenerator-runtime&quot;: &quot;^0.11.0&quot; } }"><pre class="notranslate"><span class="pl-kos">{</span> <span class="pl-s">"dependencies"</span>: <span class="pl-kos">{</span> <span class="pl-s">"@babel/cli"</span>: <span class="pl-s">"^7.0.0-beta.32"</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/core"</span>: <span class="pl-s">"^7.0.0-beta.32"</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/preset-env"</span>: <span class="pl-s">"^7.0.0-beta.32"</span><span class="pl-kos">,</span> <span class="pl-s">"regenerator-runtime"</span>: <span class="pl-s">"^0.11.0"</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">The script is successfully transpiled.</p> <h3 dir="auto">Current Behavior</h3> <p dir="auto">The given error message appears:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root@3f46f465fd04:/pwd# yarn run babel test.js yarn run v1.3.2 warning package.json: No license field $ /pwd/node_modules/.bin/babel test.js @babel/preset-env: `DEBUG` option Using targets: { &quot;chrome&quot;: &quot;61&quot;, &quot;edge&quot;: &quot;15&quot;, &quot;firefox&quot;: &quot;52&quot;, &quot;safari&quot;: &quot;11&quot; } Using modules transform: commonjs Using plugins: transform-destructuring { &quot;edge&quot;:&quot;15&quot;, &quot;firefox&quot;:&quot;52&quot; } transform-for-of { &quot;firefox&quot;:&quot;52&quot; } transform-function-name { &quot;edge&quot;:&quot;15&quot;, &quot;firefox&quot;:&quot;52&quot; } transform-literals { &quot;firefox&quot;:&quot;52&quot; } transform-parameters { &quot;firefox&quot;:&quot;52&quot; } transform-regenerator { &quot;firefox&quot;:&quot;52&quot; } Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set. TypeError: test.js: Duplicate declaration &quot;tmp&quot; (This is an error on an internal node. Probably an internal error.) at File.buildCodeFrameError (/pwd/node_modules/@babel/core/lib/transformation/file/file.js:209:12) at Scope.checkBlockScopedCollisions (/pwd/node_modules/@babel/traverse/lib/scope/index.js:295:27) at Scope.registerBinding (/pwd/node_modules/@babel/traverse/lib/scope/index.js:477:16) at Scope.registerDeclaration (/pwd/node_modules/@babel/traverse/lib/scope/index.js:396:14) at Object.Declaration (/pwd/node_modules/@babel/traverse/lib/scope/index.js:89:12) at NodePath._call (/pwd/node_modules/@babel/traverse/lib/path/context.js:64:19) at NodePath.call (/pwd/node_modules/@babel/traverse/lib/path/context.js:38:17) at NodePath.visit (/pwd/node_modules/@babel/traverse/lib/path/context.js:95:12) at TraversalContext.visitQueue (/pwd/node_modules/@babel/traverse/lib/context.js:139:18) at TraversalContext.visitMultiple (/pwd/node_modules/@babel/traverse/lib/context.js:93:17) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command."><pre class="notranslate"><code class="notranslate">root@3f46f465fd04:/pwd# yarn run babel test.js yarn run v1.3.2 warning package.json: No license field $ /pwd/node_modules/.bin/babel test.js @babel/preset-env: `DEBUG` option Using targets: { "chrome": "61", "edge": "15", "firefox": "52", "safari": "11" } Using modules transform: commonjs Using plugins: transform-destructuring { "edge":"15", "firefox":"52" } transform-for-of { "firefox":"52" } transform-function-name { "edge":"15", "firefox":"52" } transform-literals { "firefox":"52" } transform-parameters { "firefox":"52" } transform-regenerator { "firefox":"52" } Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set. TypeError: test.js: Duplicate declaration "tmp" (This is an error on an internal node. Probably an internal error.) at File.buildCodeFrameError (/pwd/node_modules/@babel/core/lib/transformation/file/file.js:209:12) at Scope.checkBlockScopedCollisions (/pwd/node_modules/@babel/traverse/lib/scope/index.js:295:27) at Scope.registerBinding (/pwd/node_modules/@babel/traverse/lib/scope/index.js:477:16) at Scope.registerDeclaration (/pwd/node_modules/@babel/traverse/lib/scope/index.js:396:14) at Object.Declaration (/pwd/node_modules/@babel/traverse/lib/scope/index.js:89:12) at NodePath._call (/pwd/node_modules/@babel/traverse/lib/path/context.js:64:19) at NodePath.call (/pwd/node_modules/@babel/traverse/lib/path/context.js:38:17) at NodePath.visit (/pwd/node_modules/@babel/traverse/lib/path/context.js:95:12) at TraversalContext.visitQueue (/pwd/node_modules/@babel/traverse/lib/context.js:139:18) at TraversalContext.visitMultiple (/pwd/node_modules/@babel/traverse/lib/context.js:93:17) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. </code></pre></div> <h3 dir="auto">Possible Solution</h3> <h3 dir="auto">Context</h3> <p dir="auto">It worked fine with <code class="notranslate">babel-preset-env</code> in version <code class="notranslate">1.5.2</code>. It is broken with <code class="notranslate">@babel/preset-env</code> in version <code class="notranslate">7.0.0-beta.32</code>.</p> <h3 dir="auto">Your Environment</h3> <table role="table"> <thead> <tr> <th>software</th> <th>version(s)</th> </tr> </thead> <tbody> <tr> <td>Babel</td> <td>7.0.0-beta.32 (@babel/core 7.0.0-beta.32)</td> </tr> <tr> <td>Babylon</td> <td></td> </tr> <tr> <td>node</td> <td>v9.2.0</td> </tr> <tr> <td>npm</td> <td>5.5.1</td> </tr> <tr> <td>Operating System</td> <td>Official node.js Docker container</td> </tr> </tbody> </table>
0
<p dir="auto">Small, nickpicky-issue: a lot of applications, especially document-based apps offer a quick way to create a new document/window directly from the dock. Terminal.app is a great example of this:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2067774/7305813/cf4c82cc-e9ce-11e4-9499-2c8825376f73.png"><img src="https://cloud.githubusercontent.com/assets/2067774/7305813/cf4c82cc-e9ce-11e4-9499-2c8825376f73.png" alt="" style="max-width: 100%;"></a></p> <p dir="auto">It’d be useful if Atom could do the same thing, but the current options are:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2067774/7305861/31aef76a-e9cf-11e4-9839-4557ae3f00b8.png"><img src="https://cloud.githubusercontent.com/assets/2067774/7305861/31aef76a-e9cf-11e4-9839-4557ae3f00b8.png" alt="screen shot 2015-04-23 at 3 41 19 pm" style="max-width: 100%;"></a></p>
<p dir="auto">Please consider adding a "New Window" option on the dock context menu for Atom. This change would make working with many spaces much more pleasant.</p> <p dir="auto">Post-change:</p> <ol dir="auto"> <li>Change to intended space for new window.</li> <li>Click and hold (or Ctrl-click, or right/two-finger click) on the Atom icon.</li> <li>Select "New Window".</li> <li>Work.</li> </ol> <p dir="auto">Currently:</p> <ol dir="auto"> <li>Change to intended space for new window.</li> <li>Click and hold (or Ctrl-click, or right/two-finger click) on the Atom icon.</li> <li>Curse because there's no "New Window" option, using an irreverent compound "swearword" with another swearword added (and presumably set off by hyphens) in the middle.</li> <li>Click the Atom icon and watch transition to another space.</li> <li>Press Shift-Cmd-N (or use the menu).</li> <li>Use the Mission Control gesture (three finger upward swipe).</li> <li>Drag the new window to the intended space.</li> <li>Click the intended space.</li> <li>Work.</li> </ol> <p dir="auto">I'm having a little bit of fun with the procedure above, but the change would be really helpful.</p> <p dir="auto">Examples of current behavior and the context menu option in Safari:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3935135/6579687/22f65e40-c722-11e4-9d05-2e5c3837528d.png"><img src="https://cloud.githubusercontent.com/assets/3935135/6579687/22f65e40-c722-11e4-9d05-2e5c3837528d.png" alt="screen shot 2015-03-10 at 12 35 58 pm" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3935135/6579688/2305ce52-c722-11e4-84b5-760d5c4256b3.png"><img src="https://cloud.githubusercontent.com/assets/3935135/6579688/2305ce52-c722-11e4-84b5-760d5c4256b3.png" alt="screen shot 2015-03-10 at 12 36 32 pm" style="max-width: 100%;"></a></p>
1
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.18362.0 Windows Terminal version (if applicable): 0.6.2951.0"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18362.0 Windows Terminal version (if applicable): 0.6.2951.0 </code></pre></div> <p dir="auto">Using a windows port of ncurses to work with a TUI application.</p> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Print key code received on key press to terminal. Specifically the issue is with key codes for arrow keys. In <code class="notranslate">cmd</code> and <code class="notranslate">powershell</code> these are in the range 258 to 261, while when using windows terminal is in the 450-456 range with each being an even number in that range, inclusive. Most other keys seem to retain the same key values.</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">It would be nice to have the same key code for arrow keys so that TUI applications can work in windows terminal, if not, then is there documentation for the keycodes for each key and their differences with those found in cmd or powershell?</p>
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 18945.1001] Windows Terminal version (if applicable): commit id 3f62c8b"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 18945.1001] Windows Terminal version (if applicable): commit id 3f62c8b </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="473155047" data-permission-text="Title is private" data-url="https://github.com/microsoft/terminal/issues/2113" data-hovercard-type="issue" data-hovercard-url="/microsoft/terminal/issues/2113/hovercard" href="https://github.com/microsoft/terminal/issues/2113">#2113</a></p> <blockquote> <p dir="auto">Open tab too fast and many of them.<br> Using shortcut key(default ctrl+shift+number) makes easy to open lots of tab at once</p> <p dir="auto">Which I was doing was holding shortcut key(crtl+shift+2 to open cmd) for few seconds.</p> </blockquote> <blockquote> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/29011440/62143582-34a98000-b32b-11e9-9c47-6d5ef494a2a6.png"><img src="https://user-images.githubusercontent.com/29011440/62143582-34a98000-b32b-11e9-9c47-6d5ef494a2a6.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/29011440/62143745-91a53600-b32b-11e9-8a53-2346e22324df.png"><img src="https://user-images.githubusercontent.com/29011440/62143745-91a53600-b32b-11e9-8a53-2346e22324df.png" alt="image" style="max-width: 100%;"></a><br> (with tabTitle as cmd)</p> <p dir="auto">clicking on a tab and clicking in the console makes "only that" tab name to be shown like as normal.</p> </blockquote> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Title shows.</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">newly fastly opend tab's title doesn't show before clicking a tab and clicking in the console.</p>
0
<p dir="auto">In the BS3 grid and form documentation, you show offsets with classes like<br> class="col-lg-10 col-lg-offset-2"</p> <p dir="auto">Couldn't get it to work, till I looked in the stylesheet and realized there is no style for col-lg-offset-whatever. There is only col-offset-whatever.</p> <p dir="auto">Is my stylesheet incomplete or is the documentation incorrect?</p>
<p dir="auto">Reproducible on iPhone and iPad. Visit <a href="http://twitter.github.com/bootstrap/javascript.html#tooltips">http://twitter.github.com/bootstrap/javascript.html#tooltips</a></p> <p dir="auto">Tap on any of the tooltip examples to show a tooltip then tap away on empty space on the body, the tooltip does not close.</p>
0
<p dir="auto">Say I have two indexes, one with a field named "sortfield" and the other is missing a mapping for this field.</p> <p dir="auto">I'd like to run a query against both indexes and sort on sortfield. The index that does not contain this value would treat it as being missing and then use the logic defined in this feature to determine if they go at top or bottom:<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="667519" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/772" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/772/hovercard" href="https://github.com/elastic/elasticsearch/issues/772">#772</a></p> <p dir="auto">Let me know if there are any questions.</p> <p dir="auto">Thanks!</p>
<p dir="auto">This is a follow up to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="667519" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/772" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/772/hovercard" href="https://github.com/elastic/elasticsearch/issues/772">#772</a> that supports special sorting for 'null' values for numeric fields. The same would be very useful for (not analyzed) string fields as well. If feasible, special handling for empty and blank strings would be useful. The latter is however optional as it is possible to achieve uniform handling by filtering out blank values at indexing time.</p>
1
<p dir="auto">Found in variables.less (and, possibly in other files .less source files), comments that start with <code class="notranslate">//*</code> can trick some compilers or style highlighters as <code class="notranslate">/*</code> combination typically means start of a comment block. Add a space after the double-slash (e.g. <code class="notranslate">// *</code>) or use a different (<em>and consistent</em>) commenting style that does not create comment style clashes.</p>
<p dir="auto">I'm not sure why the comments in the <code class="notranslate">variables.less</code> got changed to this style <code class="notranslate">//**</code>, but it my opinion it was a brave move.</p> <p dir="auto">For me at least it prevents compilation when using the nodejs compiler <code class="notranslate">lessc</code>.</p> <p dir="auto">At also breaks the syntax highlighting in my IDE, Visual Studio 2013</p>
1
<p dir="auto">This is a follow-up to my comments in issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="13582476" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/7828" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/7828/hovercard" href="https://github.com/symfony/symfony/issues/7828">#7828</a>.</p> <p dir="auto">All subscribers listening for a PRE_SET_DATA event will receive <em>model</em> data. This can be problematic since certain field types start to dictate a very specific format for data in the model. even with a data transformer in place.</p> <p dir="auto">For example, in my usecase I have model data which could work with the CollectionType, which registers a ResizeListener internally. My data needs transforming before hitting the ResizeListener, as it expects a certain format of data. Since the ResizeListener receives <em>model</em> data on PRE_SET_DATA, there is no mechanism to prepare the data for the listener. The end result is I have to modify the model data itself to get it through the ResizeListener.</p> <p dir="auto">Ultimately, a PRE_SET_DATA listener can introduce a specific data format requirement on the model, which can't be solved by simply adding a data transformer.</p> <p dir="auto">My thoughts are that if listeners (or at least the ResizeListener specifically) received normalised data, which a transformer can take care of, it wouldn't be possible to impose specific format requirements on the model.</p>
<p dir="auto">Starting on a PR regarding another issue and I hooked up on of my applications to 2.8 instead of 2.6. For me this was 2 seconds to figure out it was caused by the old way of defining a factory service + method, but the error message might cause a lot of confusion for others. The message is thrown in the Definition class rather than the place where you expect it (Yaml Loader in this case).</p> <p dir="auto">The fix for this is to change your service definition:</p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" # old app.layout.menu.beta: class: Knp\Menu\MenuItem factory_service: app.layout.menu_builder factory_method: createBetaMenu tags: - { name: knp_menu.menu, alias: beta } # new app.layout.menu.beta: class: Knp\Menu\MenuItem factory: [@app.layout.menu_builder, createBetaMenu] tags: - { name: knp_menu.menu, alias: beta }"><pre class="notranslate"> <span class="pl-c"><span class="pl-c">#</span> old</span> <span class="pl-ent">app.layout.menu.beta</span>: <span class="pl-ent">class</span>: <span class="pl-s">Knp\Menu\MenuItem</span> <span class="pl-ent">factory_service</span>: <span class="pl-s">app.layout.menu_builder</span> <span class="pl-ent">factory_method</span>: <span class="pl-s">createBetaMenu</span> <span class="pl-ent">tags</span>: - <span class="pl-s">{ name: knp_menu.menu, alias: beta }</span> <span class="pl-c"><span class="pl-c">#</span> new</span> <span class="pl-ent">app.layout.menu.beta</span>: <span class="pl-ent">class</span>: <span class="pl-s">Knp\Menu\MenuItem</span> <span class="pl-ent">factory</span>: <span class="pl-s">[@app.layout.menu_builder, createBetaMenu]</span> <span class="pl-ent">tags</span>: - <span class="pl-s">{ name: knp_menu.menu, alias: beta }</span></pre></div> <p dir="auto">The thing is that the error message below does not clearly reflect that. I don't think it's desired to put this information in the message below, but maybe someone has a nice idea where to put it instead.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Deprecated: The Symfony\Component\DependencyInjection\Definition::setFactoryMethod method is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead. in /home/ivanderberg/projects/symfony/src/Symfony/Component/DependencyInjection/Definition.php on line 137"><pre class="notranslate"><code class="notranslate">Deprecated: The Symfony\Component\DependencyInjection\Definition::setFactoryMethod method is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead. in /home/ivanderberg/projects/symfony/src/Symfony/Component/DependencyInjection/Definition.php on line 137 </code></pre></div>
0
<p dir="auto">I am aware of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="169910113" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/6773" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/6773/hovercard" href="https://github.com/electron/electron/issues/6773">#6773</a>, but I thought this should be a separate issue (the former being Ubuntu specific).<br> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/seppestas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/seppestas">@seppestas</a> maybe can tell if it's a duplicate ?</p> <p dir="auto">Consider the following simple app:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const {app, Menu, Tray} = require('electron') app.on('ready', () =&gt; { const appIcon = new Tray('/path/to/icon.png') const contextMenu = Menu.buildFromTemplate([ {label: 'Item1', type: 'radio'}, {label: 'Item2', type: 'radio'} ]) appIcon.setContextMenu(contextMenu) appIcon.on('click', () =&gt; console.log('click')) })"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span>app<span class="pl-kos">,</span> Menu<span class="pl-kos">,</span> Tray<span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'electron'</span><span class="pl-kos">)</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'ready'</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">appIcon</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Tray</span><span class="pl-kos">(</span><span class="pl-s">'/path/to/icon.png'</span><span class="pl-kos">)</span> <span class="pl-k">const</span> <span class="pl-s1">contextMenu</span> <span class="pl-c1">=</span> <span class="pl-v">Menu</span><span class="pl-kos">.</span><span class="pl-en">buildFromTemplate</span><span class="pl-kos">(</span><span class="pl-kos">[</span> <span class="pl-kos">{</span><span class="pl-c1">label</span>: <span class="pl-s">'Item1'</span><span class="pl-kos">,</span> <span class="pl-c1">type</span>: <span class="pl-s">'radio'</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-c1">label</span>: <span class="pl-s">'Item2'</span><span class="pl-kos">,</span> <span class="pl-c1">type</span>: <span class="pl-s">'radio'</span><span class="pl-kos">}</span> <span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-s1">appIcon</span><span class="pl-kos">.</span><span class="pl-en">setContextMenu</span><span class="pl-kos">(</span><span class="pl-s1">contextMenu</span><span class="pl-kos">)</span> <span class="pl-s1">appIcon</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'click'</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'click'</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"><code class="notranslate">click</code> events are not fired when clicking the tray icon. As noted in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="169910113" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/6773" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/6773/hovercard" href="https://github.com/electron/electron/issues/6773">#6773</a>, this means <a href="https://github.com/maxogden/menubar">menubar</a> apps will not work.</p> <p dir="auto">macOS version: 10.12<br> Electron version: 1.4.6</p>
<ul dir="auto"> <li>Electron version: 0.35.0</li> <li>Operating system: OS X</li> </ul> <p dir="auto">Currently the click event on the tray doesn't trigger on OS X, it does so on Windows</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="tray = new Tray(path.join(__dirname, '/img/app.png')); tray.on('click', function(){ if (mainWindow.isMinimized()) mainWindow.restore(); mainWindow.focus(); });"><pre class="notranslate"><span class="pl-s1">tray</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Tray</span><span class="pl-kos">(</span><span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-s1">__dirname</span><span class="pl-kos">,</span> <span class="pl-s">'/img/app.png'</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">tray</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'click'</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-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">mainWindow</span><span class="pl-kos">.</span><span class="pl-en">isMinimized</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-s1">mainWindow</span><span class="pl-kos">.</span><span class="pl-en">restore</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">mainWindow</span><span class="pl-kos">.</span><span class="pl-en">focus</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
1
<p dir="auto">When trying to embed a Video you can use the <source> HTML tag. For some reason if you put the muted attribute on it, it won't stick to the DOM, which doesn't allow videos to autoplay what makes it difficult with privacy settings of a couple of browsers like Safari on IOS. So here is a proof. I noticed it after a couple of tests on IOS. For me the muted tag wasn't important for playing videos on Chrome. On IOS the video just autoplays when the muted-tag is set.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/50872737/128626265-f11a09b5-514c-4928-a152-c6abd1db7fb5.jpg"><img src="https://user-images.githubusercontent.com/50872737/128626265-f11a09b5-514c-4928-a152-c6abd1db7fb5.jpg" alt="IMG_20210808_103818" style="max-width: 100%;"></a></p> <p dir="auto">--&gt;<br> My research has shown that the bug has existed since 2016.</p> <p dir="auto">Fix just for now but not practically:<br> let’s use dangerouslySetInnerHtml to ensure the muted attribute is written to the DOM:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/50872737/128626324-630b6a88-ffbf-4c1a-aa3a-99b3561c485e.png"><img src="https://user-images.githubusercontent.com/50872737/128626324-630b6a88-ffbf-4c1a-aa3a-99b3561c485e.png" alt="1_hewat2uh6MghJvBcQoyLmA (1)" style="max-width: 100%;"></a></p>
<p dir="auto">React version: 16.12.0</p> <h2 dir="auto">Steps To Reproduce</h2> <ol dir="auto"> <li>Have a form with controlled input (i.e. value is set through <code class="notranslate">onChange</code> handler)</li> <li>Type <code class="notranslate">cheese</code> into the input</li> <li>Submit the form</li> <li>Reload the page</li> <li>Focus the input, type <code class="notranslate">c</code></li> <li><code class="notranslate">cheese</code> is <em>not</em> suggested</li> </ol> <p dir="auto"><a href="https://codesandbox.io/s/ancient-currying-oqgt6" rel="nofollow">https://codesandbox.io/s/ancient-currying-oqgt6</a></p> <p dir="auto">It works when a uncontrolled input is used (i.e. value is not set by react <code class="notranslate">onChange</code> handler)</p> <ol dir="auto"> <li>Have a form with uncontrolled input</li> <li>Type <code class="notranslate">cheese</code> into the input</li> <li>Submit the form</li> <li>Reload the page</li> <li>Focus the input, type <code class="notranslate">c</code></li> <li><code class="notranslate">cheese</code> is being suggested</li> </ol> <p dir="auto"><a href="https://codesandbox.io/s/naughty-dijkstra-p3n42" rel="nofollow">https://codesandbox.io/s/naughty-dijkstra-p3n42</a></p> <p dir="auto">It's not about autofilling address data or passwords, but data previously filled in by the user.<br> We noticed this issue in Chrome, Firefox and Safari. Even though we could not get any autocompletion to work in Safari, even without React. (We could in Chrome and Firefox)</p> <p dir="auto">Thanks!</p>
0
<p dir="auto">Since TypeScript 1.4, using the Compile on Save feature, enum members are not being replaced with their literal values in the output js file.</p> <p dir="auto">The same operation via a full project build inserts the literal value as expected. This occurs for both regular and const enums.</p> <p dir="auto">In the linked example project, there is an enum file "Animals.ts" which is being AMD-imported into the class file "Farm.ts". If you make a minor edit to the Farm.ts file (e.g. insert a space and save), then line 4 of Farm.js shows:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" this.animals = [Animals.Chicken, Animals.Cow, Animals.Sheep];"><pre class="notranslate"><code class="notranslate"> this.animals = [Animals.Chicken, Animals.Cow, Animals.Sheep]; </code></pre></div> <p dir="auto">Whereas, if you do a project build, the line 4 of Farm.js shows the expected output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" this.animals = [3 /* Chicken */, 0 /* Cow */, 1 /* Sheep */];"><pre class="notranslate"><code class="notranslate"> this.animals = [3 /* Chicken */, 0 /* Cow */, 1 /* Sheep */]; </code></pre></div> <p dir="auto">Example project: <a href="https://www.dropbox.com/s/xc34f0q6rhc0amm/ExampleProject.zip?dl=0" rel="nofollow">https://www.dropbox.com/s/xc34f0q6rhc0amm/ExampleProject.zip?dl=0</a></p> <p dir="auto">I can confirm that this is happening in both VS2013 + TS1.4 and VS2015 CTP.</p>
<p dir="auto">Hi,<br> I installed Visual Studio Community 2013 and Typescript 1.4. When I changed all my enums to const enum (btw, very nice feature, thanks!) I noticed that compile-on-save feature doesn't handle this feature well.</p> <p dir="auto">When I use those const enums in other file than the one it was defined in then when I save file, they are not resolved to constant numbers.</p> <p dir="auto">For example I have file firstFile.ts:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const enum TestEnum { Foo, Bar } var testFirstFile = TestEnum.Bar;"><pre class="notranslate"><code class="notranslate">const enum TestEnum { Foo, Bar } var testFirstFile = TestEnum.Bar; </code></pre></div> <p dir="auto">and when I save file (by pressing Ctrl+S) i get file firstFile.js:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var testFirstFile = 1 /* Bar */; //# sourceMappingURL=firstFile.js.map"><pre class="notranslate"><code class="notranslate">var testFirstFile = 1 /* Bar */; //# sourceMappingURL=firstFile.js.map </code></pre></div> <p dir="auto">but When i have secondFile.ts file:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/// &lt;reference path=&quot;firstfile.ts&quot; /&gt; var testInOtherFile = TestEnum.Bar;"><pre class="notranslate"><code class="notranslate">/// &lt;reference path="firstfile.ts" /&gt; var testInOtherFile = TestEnum.Bar; </code></pre></div> <p dir="auto">and save file I get secondFile.js:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/// &lt;reference path=&quot;firstfile.ts&quot; /&gt; var testInOtherFile = TestEnum.Bar; //# sourceMappingURL=secondFile.js.map"><pre class="notranslate"><code class="notranslate">/// &lt;reference path="firstfile.ts" /&gt; var testInOtherFile = TestEnum.Bar; //# sourceMappingURL=secondFile.js.map </code></pre></div> <p dir="auto">only when I build project in Visual Studio I get proper secondFile.js file:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/// &lt;reference path=&quot;firstfile.ts&quot; /&gt; var testInOtherFile = 1 /* Bar */; //# sourceMappingURL=secondFile.js.map"><pre class="notranslate"><code class="notranslate">/// &lt;reference path="firstfile.ts" /&gt; var testInOtherFile = 1 /* Bar */; //# sourceMappingURL=secondFile.js.map </code></pre></div>
1
<p dir="auto"><strong>Is your feature request related to a problem? Please describe.</strong><br> scipy.cluster.hierarchy.linkage uses double (float64) to store and do its computation for hierarchical clustering. However, I have a very large dataset (292000x292000) that I would like to perform hclust on but my computer is RAM limited. I have 252GB RAM and I think the clustering algorithm should be able to work on my dataset when all values are stored and computed using float16s instead.</p> <p dir="auto">For large datasets on machines with insufficient RAM to store and compute on Arrays of float64s, it would be awesome if computation could be done on a different precision float to reduce the memory footprint.</p> <p dir="auto">Additionally, adding choices for datatypes could be very useful for almost all scipy functions.</p> <p dir="auto"><strong>Describe the solution you'd like</strong><br> Allow for an argument to specify what datatype you'd like to use (e.g. np.float64, np.float32, np.float16)</p> <p dir="auto">The argument could be like dtype='np.double' by default but changable to whatever datatype is chosen.</p>
<p dir="auto">I try the scipy ward clustering, when calculating linkage, it report follow error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ward_h = linkage(X, method='ward', metric='euclidean') Python(2557,0x7fff732cc310) malloc: *** mach_vm_map(size=18446744067627675648) failed (error code=3) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug --------------------------------------------------------------------------- MemoryError Traceback (most recent call last) &lt;ipython-input-10-769ae7c53f7c&gt; in &lt;module&gt;() ----&gt; 1 ward_h = linkage(X, method='ward', metric='euclidean') /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/cluster/hierarchy.pyc in linkage(y, method, metric) 652 Z = np.zeros((n - 1, 4)) 653 _hierarchy_wrap.linkage_euclid_wrap(dm, Z, X, m, n, --&gt; 654 int(_cpy_euclid_methods[method])) 655 return Z 656 MemoryError: out of memory while computing linkage"><pre class="notranslate"><code class="notranslate">ward_h = linkage(X, method='ward', metric='euclidean') Python(2557,0x7fff732cc310) malloc: *** mach_vm_map(size=18446744067627675648) failed (error code=3) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug --------------------------------------------------------------------------- MemoryError Traceback (most recent call last) &lt;ipython-input-10-769ae7c53f7c&gt; in &lt;module&gt;() ----&gt; 1 ward_h = linkage(X, method='ward', metric='euclidean') /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/cluster/hierarchy.pyc in linkage(y, method, metric) 652 Z = np.zeros((n - 1, 4)) 653 _hierarchy_wrap.linkage_euclid_wrap(dm, Z, X, m, n, --&gt; 654 int(_cpy_euclid_methods[method])) 655 return Z 656 MemoryError: out of memory while computing linkage </code></pre></div> <p dir="auto">How can I solve this?</p> <p dir="auto">The data set I use is here: <a href="https://dl.dropboxusercontent.com/u/68126956/df.csv" rel="nofollow">https://dl.dropboxusercontent.com/u/68126956/df.csv</a>.</p> <p dir="auto">Thanks.</p>
1
<p dir="auto">by <strong>fuzxxl</strong>:</p> <pre class="notranslate">Right now, the package io specifies the Seeker with its sole method Seek(). The whence-parameter of Seek() is specified to accept one of the constants 1 to 3 with certain semantics. io does not provide symbolic constants for the whence-parameter, even there should clearly be a set for clarity. os provides such constants though: const ( SEEK_SET int = 0 // seek relative to the origin of the file SEEK_CUR int = 1 // seek relative to the current offset SEEK_END int = 2 // seek relative to the end ) I think these constants are at the wrong place since if you want to use a generic Seeker, you have to import os, a module with a concrete Seeker implementation, if you want to use symbolic constants for the whence parameter. This gives people who have a glance at your code the wrong idea that the source code they are looking at actually communicates with the operating system which it might not do. To fix this issue, I suggest duplicating the constants SEEK_SET, SEEK_CUR and SEEK_END into the io module and suggesting people to use the symbolic constants from there instead from os, as they semantically belong to io IMHO. This change would only affect backwards-compatibility if somebody declared SEEK_SET, SEEK_CUR and SEEK_END in their own source code while importing io without a qualifier, but this is explicitly allowed by the compatibility rules.</pre>
<p dir="auto">In <a href="https://godoc.org/golang.org/x/net/context#Context" rel="nofollow">https://godoc.org/golang.org/x/net/context#Context</a>, there are two possible readings for the documentation of Err:</p> <ol dir="auto"> <li>Err() must return nil before Done() isn't closed, and atomically switch to returning some non-nil error when Done() IS closed</li> <li>Err() is undefined before Done() is closed, and the only valid use for Err() is after blocking on Done()</li> </ol> <p dir="auto">Looking at the implementation, I suspect that 1 is the correct interpretation. I would propose that the documentation on this function be amended to read:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" // Err returns a non-nil error value after Done is closed. Err returns // Canceled if the context was canceled or DeadlineExceeded if the // context's deadline passed. If Done is not yet closed, Err must return nil. // No other values for Err are defined. After Done is closed, successive // calls to Err return the same value. Err() error"><pre class="notranslate"> <span class="pl-c">// Err returns a non-nil error value after Done is closed. Err returns</span> <span class="pl-c">// Canceled if the context was canceled or DeadlineExceeded if the</span> <span class="pl-c">// context's deadline passed. If Done is not yet closed, Err must return nil.</span> <span class="pl-c">// No other values for Err are defined. After Done is closed, successive</span> <span class="pl-c">// calls to Err return the same value.</span> <span class="pl-en">Err</span>() <span class="pl-s1">error</span></pre></div> <p dir="auto">Note the added "If Done is not yet closed, Err must return nil." sentence.</p>
0
<h2 dir="auto">Problem Description</h2> <p dir="auto">This is not necessarily an issue with material ui. I am trying to integrate <code class="notranslate">TextField</code> and <code class="notranslate">DatePicker</code> by setting the type of <code class="notranslate">TextField</code> to date. This adds an icon that allows you to open a date picker like this.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/14262127/28425574-4fc3ba64-6d36-11e7-921e-f8b7fc435cd5.png"><img width="1334" alt="screen shot 2017-07-20 at 10 28 24 am" src="https://user-images.githubusercontent.com/14262127/28425574-4fc3ba64-6d36-11e7-921e-f8b7fc435cd5.png" style="max-width: 100%;"></a><br> This <code class="notranslate">DatePicker</code> is not a material UI date picker though. Is there a way to hook the material ui date picker to that selection?<br> The motivation is to let the user type the date or select it using a material ui date picker. Looks like the current date picker does not allow that functionality.</p>
<p dir="auto">The only thing preventing me to use the date picker from material-ui is the fact that the user is not capable to use keyboard to write a date.</p> <p dir="auto">Sometimes its just faster or more suitable to just use keyboard to select dates.</p> <p dir="auto">Imagine a scenario where the user has a form with a lot of TextFields, he can keep pressing tab and filling the form, but once he encounters a Date picker he needs to use the mouse to open the date picker... And if wants to select a really old date he will have a nightmare selecting the year... Its just not nearly as fast as just typing it.</p> <p dir="auto">Related issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="190922371" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/5612" data-hovercard-type="issue" data-hovercard-url="/mui/material-ui/issues/5612/hovercard" href="https://github.com/mui/material-ui/issues/5612">mui/material-ui#5612</a>.</p>
1
<p dir="auto">In latest Firefox (currently 19.0.2), clicking on links with Ctrl, or Cmd (mac) button doesn't open them in new window (tab), but doesn't do anything, using latest 2.3.1 javascript.<br> With 2.3.0 js, it works fine.</p>
<p dir="auto">Issue: middle mouse click on a link in Firefox, nothing happens.<br> Expected behavior: middle mouse click on a link, open in new browser tab.<br> Live example: <a href="http://twitter.github.com/bootstrap/">http://twitter.github.com/bootstrap/</a></p> <p dir="auto">Tested on Win7/Firefox19 Safemode/Non-Safemode failed. IE9/Chrome25 ok.<br> Notice it when I upgrade to bootstrap v2.3.1.<br> Switch back to v2.3 and the middle button works again.</p>
1
<p dir="auto"><strong>Context:</strong></p> <ul dir="auto"> <li>Playwright CT Version: [1.26.1]</li> <li>Operating System: [e.g. Mac]</li> <li>Node.js version: [e.g. 16.15.0]</li> <li>Browser: [tested in FF]</li> </ul> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const component = await mount(CustomSelect, { props: { prepare: (option) =&gt; option.label } });"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">component</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">mount</span><span class="pl-kos">(</span><span class="pl-smi">CustomSelect</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">props</span>: <span class="pl-kos">{</span> <span class="pl-en">prepare</span>: <span class="pl-kos">(</span><span class="pl-s1">option</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">option</span><span class="pl-kos">.</span><span class="pl-c1">label</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Describe the bug</strong></p> <p dir="auto">This issue has been discussed <a href="https://github.com/microsoft/playwright/issues/17254" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright/issues/17254/hovercard">here</a>, but it's quite blocking since the function output is crucial for the component itself.</p> <p dir="auto">For <code class="notranslate">option</code> being <code class="notranslate">{id: 1, label: 'Foo'}</code> does not return <code class="notranslate">Foo</code>, is logged as <code class="notranslate">(...args) =&gt; { window['__ct_dispatch'](ordinal, args); }</code>, however returns <code class="notranslate">undefined</code> instead of an empty string in the above issue.</p> <p dir="auto">If a viable workaround exists, it'd be great if someone could provide a minimum example, thank you.</p>
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: 1.33.0</li> <li>Operating System: Windows 11</li> <li>Browser: Chromium</li> <li>Other info:</li> </ul> <h3 dir="auto">Source code</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li> </ul> <p dir="auto"><strong>Steps</strong></p> <ol dir="auto"> <li>Add Playwright to your .NET 6 project.</li> <li>Run this code:</li> </ol> <div class="highlight highlight-source-cs notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="using Microsoft.Playwright; using var playwright = await Playwright.CreateAsync(); await using var browser = await playwright.Chromium.LaunchAsync();"><pre class="notranslate"><span class="pl-k">using</span> Microsoft<span class="pl-kos">.</span>Playwright<span class="pl-kos">;</span> <span class="pl-k">using</span> <span class="pl-smi">var</span> <span class="pl-s1">playwright</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> Playwright<span class="pl-kos">.</span><span class="pl-en">CreateAsync</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-k">using</span> <span class="pl-smi">var</span> <span class="pl-s1">browser</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> playwright<span class="pl-kos">.</span>Chromium<span class="pl-kos">.</span><span class="pl-en">LaunchAsync</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <ol start="3" dir="auto"> <li>Open Terminal as an administrator at your project and run:</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Set-ExecutionPolicy -ExecutionPolicy Bypass powershell bin/Debug/net6.0/playwright.ps1 install"><pre class="notranslate"><code class="notranslate">Set-ExecutionPolicy -ExecutionPolicy Bypass powershell bin/Debug/net6.0/playwright.ps1 install </code></pre></div> <p dir="auto"><strong>Expected</strong></p> <p dir="auto">Should install browser</p> <p dir="auto"><strong>Actual</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Downloading Chromium 113.0.5672.53 (playwright build v1060) from https://playwright.azureedge.net/builds/chromium/1060/chromium-win64.zip 113.5 Mb [=================== ] 97% 2.7sFailed to install browsers Error: Failed to download Chromium 113.0.5672.53 (playwright build v1060), caused by Error: end of central directory record signature not found at your-project\bin\Debug\net6.0\.playwright\package\lib\zipBundleImpl.js:1:24033 at your-project\bin\Debug\net6.0\.playwright\package\lib\zipBundleImpl.js:1:31712 at your-project\bin\Debug\net6.0\.playwright\package\lib\zipBundleImpl.js:1:17288 at FSReqCallback.wrapper [as oncomplete] (node:fs:682:5)"><pre class="notranslate"><code class="notranslate">Downloading Chromium 113.0.5672.53 (playwright build v1060) from https://playwright.azureedge.net/builds/chromium/1060/chromium-win64.zip 113.5 Mb [=================== ] 97% 2.7sFailed to install browsers Error: Failed to download Chromium 113.0.5672.53 (playwright build v1060), caused by Error: end of central directory record signature not found at your-project\bin\Debug\net6.0\.playwright\package\lib\zipBundleImpl.js:1:24033 at your-project\bin\Debug\net6.0\.playwright\package\lib\zipBundleImpl.js:1:31712 at your-project\bin\Debug\net6.0\.playwright\package\lib\zipBundleImpl.js:1:17288 at FSReqCallback.wrapper [as oncomplete] (node:fs:682:5) </code></pre></div>
0
<p dir="auto">After initializing git repository, but before committing, I can select "Undo Last Commit" from the "..." menu. That fails, of course. The resulting git reset HEAD~ won't work if there are no commits.</p> <p dir="auto">Undo Last Commit should be grayed out if HEAD doesn't have a parent.</p> <p dir="auto">Here's the log:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="git init git fetch fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched. git reset HEAD~ fatal: ambiguous argument 'HEAD~': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git &lt;command&gt; [&lt;revision&gt;...] -- [&lt;file&gt;...]' git fetch fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched. git fetch fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched. git fetch fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched."><pre class="notranslate"><code class="notranslate">git init git fetch fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched. git reset HEAD~ fatal: ambiguous argument 'HEAD~': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git &lt;command&gt; [&lt;revision&gt;...] -- [&lt;file&gt;...]' git fetch fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched. git fetch fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched. git fetch fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched. </code></pre></div>
<p dir="auto">on <a href="https://code.visualstudio.com/docs/languages/javascript" rel="nofollow">https://code.visualstudio.com/docs/languages/javascript</a></p> <p dir="auto">"The typings are easily managed using TSD, the TypeScript Definition manager."</p> <p dir="auto">But on <a href="https://github.com/Definitelytyped/tsd#readme">https://github.com/Definitelytyped/tsd#readme</a></p> <p dir="auto">"DEPRECATED: TSD is deprecated, please use Typings and see this issue for more information."</p>
0
<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>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.3</li> <li>Operating System version: OSX 10.15.4</li> <li>Java version: OpenJDK 1.8.0_212</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>Dockerfile文件</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="FROM openjdk:8 MAINTAINER hello@world.cn RUN echo &quot;Asia/Shanghai&quot; &gt; /etc/timezone &amp;&amp; dpkg-reconfigure -f noninteractive tzdata COPY ./target/dubbo273-0.0.1-SNAPSHOT.jar /dubbo.jar ENV NACOS_DISCONVER_ADDR &quot;&quot; ENV DUBBO_REGISTRY_ADDRESS &quot;&quot; ENV DUBBO_IP_TO_REGISTRY &quot;&quot; ENV DUBBO_PORT_TO_REGISTRY &quot;&quot; ENV TZ Asia/Shanghai EXPOSE ${DUBBO_PORT_TO_REGISTRY} ENTRYPOINT java -jar /dubbo.jar \ -Djava.security.egd=file:/dev/./urandom \ --spring.cloud.nacos.discovery.server-addr=${NACOS_DISCONVER_ADDR} \ --dubbo.registry.address=${DUBBO_REGISTRY_ADDRESS} \ --dubbo.protocol.port=${DUBBO_PORT_TO_REGISTRY}"><pre class="notranslate"><code class="notranslate">FROM openjdk:8 MAINTAINER hello@world.cn RUN echo "Asia/Shanghai" &gt; /etc/timezone &amp;&amp; dpkg-reconfigure -f noninteractive tzdata COPY ./target/dubbo273-0.0.1-SNAPSHOT.jar /dubbo.jar ENV NACOS_DISCONVER_ADDR "" ENV DUBBO_REGISTRY_ADDRESS "" ENV DUBBO_IP_TO_REGISTRY "" ENV DUBBO_PORT_TO_REGISTRY "" ENV TZ Asia/Shanghai EXPOSE ${DUBBO_PORT_TO_REGISTRY} ENTRYPOINT java -jar /dubbo.jar \ -Djava.security.egd=file:/dev/./urandom \ --spring.cloud.nacos.discovery.server-addr=${NACOS_DISCONVER_ADDR} \ --dubbo.registry.address=${DUBBO_REGISTRY_ADDRESS} \ --dubbo.protocol.port=${DUBBO_PORT_TO_REGISTRY} </code></pre></div> <ol start="2" dir="auto"> <li>容器启动语句</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sudo docker run --rm --name dubbo273 \ -p 30000:30000 \ -e NACOS_DISCONVER_ADDR=10.0.0.20:8848 \ -e DUBBO_REGISTRY_ADDRESS=spring-cloud://10.0.0.20:8848 \ -e DUBBO_IP_TO_REGISTRY=10.0.0.20 \ -e DUBBO_PORT_TO_REGISTRY=30000 \ demo/dubbo273:0.1"><pre class="notranslate"><code class="notranslate">sudo docker run --rm --name dubbo273 \ -p 30000:30000 \ -e NACOS_DISCONVER_ADDR=10.0.0.20:8848 \ -e DUBBO_REGISTRY_ADDRESS=spring-cloud://10.0.0.20:8848 \ -e DUBBO_IP_TO_REGISTRY=10.0.0.20 \ -e DUBBO_PORT_TO_REGISTRY=30000 \ demo/dubbo273:0.1 </code></pre></div> <ol start="3" dir="auto"> <li> <p dir="auto">Nacos上显示的注册信息<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/54215370/83091727-6e275500-a0ce-11ea-816c-97f9ba9f0f3b.png"><img src="https://user-images.githubusercontent.com/54215370/83091727-6e275500-a0ce-11ea-816c-97f9ba9f0f3b.png" alt="image" style="max-width: 100%;"></a></p> </li> <li> <p dir="auto">容器里获取DUBBO_IP_TO_REGISTRY<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/54215370/83092031-15a48780-a0cf-11ea-82e4-acfd77d97bdb.png"><img src="https://user-images.githubusercontent.com/54215370/83092031-15a48780-a0cf-11ea-82e4-acfd77d97bdb.png" alt="image" style="max-width: 100%;"></a></p> </li> <li> <p dir="auto">pom.xml</p> </li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;parent&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt; &lt;version&gt;2.3.0.RELEASE&lt;/version&gt; &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt; &lt;/parent&gt; &lt;groupId&gt;com.example&lt;/groupId&gt; &lt;artifactId&gt;dubbo273&lt;/artifactId&gt; &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt; &lt;name&gt;dubbo273&lt;/name&gt; &lt;description&gt;Demo project for Spring Boot&lt;/description&gt; &lt;properties&gt; &lt;java.version&gt;1.8&lt;/java.version&gt; &lt;spring-cloud-alibaba.version&gt;2.1.0.RELEASE&lt;/spring-cloud-alibaba.version&gt; &lt;spring-boot.version&gt;2.1.4.RELEASE&lt;/spring-boot.version&gt; &lt;/properties&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.alibaba.cloud&lt;/groupId&gt; &lt;artifactId&gt;spring-cloud-starter-alibaba-nacos-discovery&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;io.netty&lt;/groupId&gt; &lt;artifactId&gt;netty-all&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.dubbo&lt;/groupId&gt; &lt;artifactId&gt;dubbo-registry-nacos&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.dubbo&lt;/groupId&gt; &lt;artifactId&gt;dubbo-spring-boot-starter&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.alibaba.nacos&lt;/groupId&gt; &lt;artifactId&gt;nacos-client&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.dubbo&lt;/groupId&gt; &lt;artifactId&gt;dubbo&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.alibaba.cloud&lt;/groupId&gt; &lt;artifactId&gt;spring-cloud-starter-dubbo&lt;/artifactId&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;dependencyManagement&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;com.alibaba.cloud&lt;/groupId&gt; &lt;artifactId&gt;spring-cloud-alibaba-dependencies&lt;/artifactId&gt; &lt;version&gt;${spring-cloud-alibaba.version}&lt;/version&gt; &lt;type&gt;pom&lt;/type&gt; &lt;scope&gt;import&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-dependencies&lt;/artifactId&gt; &lt;version&gt;${spring-boot.version}&lt;/version&gt; &lt;type&gt;pom&lt;/type&gt; &lt;scope&gt;import&lt;/scope&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;/dependencyManagement&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;source&gt;1.8&lt;/source&gt; &lt;target&gt;1.8&lt;/target&gt; &lt;encoding&gt;UTF-8&lt;/encoding&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/project&gt; "><pre class="notranslate"><code class="notranslate">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;parent&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt; &lt;version&gt;2.3.0.RELEASE&lt;/version&gt; &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt; &lt;/parent&gt; &lt;groupId&gt;com.example&lt;/groupId&gt; &lt;artifactId&gt;dubbo273&lt;/artifactId&gt; &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt; &lt;name&gt;dubbo273&lt;/name&gt; &lt;description&gt;Demo project for Spring Boot&lt;/description&gt; &lt;properties&gt; &lt;java.version&gt;1.8&lt;/java.version&gt; &lt;spring-cloud-alibaba.version&gt;2.1.0.RELEASE&lt;/spring-cloud-alibaba.version&gt; &lt;spring-boot.version&gt;2.1.4.RELEASE&lt;/spring-boot.version&gt; &lt;/properties&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.alibaba.cloud&lt;/groupId&gt; &lt;artifactId&gt;spring-cloud-starter-alibaba-nacos-discovery&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;io.netty&lt;/groupId&gt; &lt;artifactId&gt;netty-all&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.dubbo&lt;/groupId&gt; &lt;artifactId&gt;dubbo-registry-nacos&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.dubbo&lt;/groupId&gt; &lt;artifactId&gt;dubbo-spring-boot-starter&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.alibaba.nacos&lt;/groupId&gt; &lt;artifactId&gt;nacos-client&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.dubbo&lt;/groupId&gt; &lt;artifactId&gt;dubbo&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.alibaba.cloud&lt;/groupId&gt; &lt;artifactId&gt;spring-cloud-starter-dubbo&lt;/artifactId&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;dependencyManagement&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;com.alibaba.cloud&lt;/groupId&gt; &lt;artifactId&gt;spring-cloud-alibaba-dependencies&lt;/artifactId&gt; &lt;version&gt;${spring-cloud-alibaba.version}&lt;/version&gt; &lt;type&gt;pom&lt;/type&gt; &lt;scope&gt;import&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-dependencies&lt;/artifactId&gt; &lt;version&gt;${spring-boot.version}&lt;/version&gt; &lt;type&gt;pom&lt;/type&gt; &lt;scope&gt;import&lt;/scope&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;/dependencyManagement&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;source&gt;1.8&lt;/source&gt; &lt;target&gt;1.8&lt;/target&gt; &lt;encoding&gt;UTF-8&lt;/encoding&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/project&gt; </code></pre></div> <h3 dir="auto">Expected Result</h3> <ul dir="auto"> <li>能正确读到DUBBO_IP_TO_REGISTRY的IP</li> </ul> <h3 dir="auto">Actual Result</h3> <ul dir="auto"> <li>即便设置了DUBBO_IP_TO_REGISTRY为宿主机的IP,但dubbo注册的IP是容器的IP,端口是SpringBoot应用的web端口.导致其他服务无法调用此服务.</li> </ul>
0
<h2 dir="auto">Bug Report</h2> <h3 dir="auto">Which version of ShardingSphere did you use?</h3> <p dir="auto">Current master branch.</p> <h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3> <p dir="auto">ShardingSphere-JDBC</p> <h3 dir="auto">Expected behavior</h3> <p dir="auto">when i user shardingSephere-jdbc, this sql will occur error.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="insert into social_count (image, video, feeds, organization,createTime,updateTime) values ( ?, ?, ?, ?, now(), now()) on duplicate key update image = image + ?,video = video + ?,feeds = feeds + ?,updateTime = now()"><pre class="notranslate"><code class="notranslate">insert into social_count (image, video, feeds, organization,createTime,updateTime) values ( ?, ?, ?, ?, now(), now()) on duplicate key update image = image + ?,video = video + ?,feeds = feeds + ?,updateTime = now() </code></pre></div> <p dir="auto">social_count is single table in single database.</p> <p dir="auto">error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bad SQL grammar []; nested exception is java.sql.SQLException: No value specified for parameter 6"><pre class="notranslate"><code class="notranslate">bad SQL grammar []; nested exception is java.sql.SQLException: No value specified for parameter 6 </code></pre></div> <h3 dir="auto">Reason analyze (If you can)</h3> <p dir="auto">In code of <strong>org.apache.shardingsphere.infra.binder.segment.insert.values.OnDuplicateUpdateContext</strong>, we have a function</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" private int calculateParameterCount(final Collection&lt;ExpressionSegment&gt; assignments) { int result = 0; for (ExpressionSegment each : assignments) { if (each instanceof ParameterMarkerExpressionSegment) { result++; } } return result; }"><pre class="notranslate"><code class="notranslate"> private int calculateParameterCount(final Collection&lt;ExpressionSegment&gt; assignments) { int result = 0; for (ExpressionSegment each : assignments) { if (each instanceof ParameterMarkerExpressionSegment) { result++; } } return result; } </code></pre></div> <p dir="auto">when i step into this function, each of element in assignments is an instanceof <strong>BinaryOperationExpression</strong>, not <strong>ParameterMarkerExpressionSegment</strong>, so it will course <code class="notranslate">parameterCount</code> always be 0.</p> <h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3> <p dir="auto">To fix this bug, i modified the code as below.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="private int calculateParameterCount(final Collection&lt;ExpressionSegment&gt; assignments) { int result = 0; for (ExpressionSegment each : assignments) { if (each instanceof ParameterMarkerExpressionSegment) { result++; } else if (each instanceof BinaryOperationExpression) { if (((BinaryOperationExpression) each).getRight() instanceof ParameterMarkerExpressionSegment) { result++; } } } return result; }"><pre class="notranslate"><code class="notranslate">private int calculateParameterCount(final Collection&lt;ExpressionSegment&gt; assignments) { int result = 0; for (ExpressionSegment each : assignments) { if (each instanceof ParameterMarkerExpressionSegment) { result++; } else if (each instanceof BinaryOperationExpression) { if (((BinaryOperationExpression) each).getRight() instanceof ParameterMarkerExpressionSegment) { result++; } } } return result; } </code></pre></div>
<h2 dir="auto">Version</h2> <p dir="auto">io.shardingsphere.sharding-jdbc-spring-boot-starter:3.0.0</p> <p dir="auto">During the initializing, shardingspere will load all table meta in TableMetaDataInitializer.</p> <p dir="auto">TableMetaDataInitializer.load(final ShardingRule shardingRule) {<br> ...<br> result.putAll(loadDefaultTables(shardingRule));<br> }</p> <p dir="auto">It takes much time(almost 2 minutes) to load all meta data.</p> <h2 dir="auto">Question</h2> <p dir="auto">Why shardingspere need to load all meta data? If I don't load them, what will happen?</p> <p dir="auto">Thanks a lot.</p>
0
<p dir="auto">As title</p>
<p dir="auto">As much as I have managed to follow the API section of tensorflow the depthwise_conv2d doesn't fulfill my thoughts on what I would like to do with the input/filters.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="shape = (2,5,5,48,128) initializer = tf.truncated_normal_initializer(stddev=1e-2) kernel = tf.get_variable(name='weights', shape=shape, initializer=initializer)"><pre class="notranslate"><code class="notranslate">shape = (2,5,5,48,128) initializer = tf.truncated_normal_initializer(stddev=1e-2) kernel = tf.get_variable(name='weights', shape=shape, initializer=initializer) </code></pre></div> <p dir="auto">Considering the input is of shape (batch_size, 55, 55, 96),<br> the function definition would be:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def depthwise_group_conv2d(input, filter, groups, strides, padding, name)"><pre class="notranslate"><code class="notranslate">def depthwise_group_conv2d(input, filter, groups, strides, padding, name) </code></pre></div> <p dir="auto">which would be able to do</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="conv = tf.nn.depthwise_group_conv2d(input, kernel, [48,48], strides, padding, name)"><pre class="notranslate"><code class="notranslate">conv = tf.nn.depthwise_group_conv2d(input, kernel, [48,48], strides, padding, name) </code></pre></div> <p dir="auto">that would split the input depthwise into depths from given 'groups' parameter and perform the convolution with shared parameters (i.e. depths [:48] take weights[0] and depths[48:] take weights[1]) inside a group. Then the outputs of convolutions by groups would be concatenated depthwise.</p> <p dir="auto">This would make it easier to define groups such as one used in AlexNet/CaffeNet architectures.</p> <p dir="auto">Hopefully I have missed a certain feature already existing for making this easier.</p> <p dir="auto">Best regards,<br> Filip</p>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues?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">App should work after upgrading to Next v5.1.0. in <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-js">Next-js</a> supported browsers.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Noticed <code class="notranslate"> 'Symbol' is undefined</code> issue in IE11 after upgrading to Next v5.1.0. We don't see this issue with Next v4.x.</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>Upgrade app, which has for-of loop in its source code, to Nextv5.1.0.</li> <li>Open the application in IE 11 after build process and check the dev console.</li> </ol> <h2 dir="auto">Context</h2> <p dir="auto">This is happening with Next v5.1.0.</p> <p dir="auto">Code generated for <code class="notranslate">for-of</code> loop with Next v5.1.0</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="for (var g = l[Symbol.iterator](), w; !(h = (w = g.next()).done); h = true) { }"><pre class="notranslate"><code class="notranslate">for (var g = l[Symbol.iterator](), w; !(h = (w = g.next()).done); h = true) { } </code></pre></div> <p dir="auto">Next v4.x version with same source code.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="for (var h, g = (0,r.default)(l); !(y = (h = g.next()).done); y = !0) { }"><pre class="notranslate"><code class="notranslate">for (var h, g = (0,r.default)(l); !(y = (h = g.next()).done); y = !0) { } </code></pre></div> <p dir="auto">We can fix the issue by adding <code class="notranslate">babel-polyfill</code> or <code class="notranslate">babel runtime-transform</code> to our code but it would be consistent if we have a solution as part of Next build.</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>next</td> <td>5.1.0</td> </tr> <tr> <td>node</td> <td>8.11.1</td> </tr> <tr> <td>OS</td> <td>windows</td> </tr> <tr> <td>browser</td> <td>IE 11</td> </tr> <tr> <td>etc</td> <td></td> </tr> </tbody> </table> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/10725504/39061558-49b228c8-448a-11e8-9fc9-6a79f3c90e22.png"><img width="1075" alt="screen shot 2018-04-20 at 9 51 03 am" src="https://user-images.githubusercontent.com/10725504/39061558-49b228c8-448a-11e8-9fc9-6a79f3c90e22.png" style="max-width: 100%;"></a></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/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> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li></li> <li></li> <li></li> <li></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></td> </tr> <tr> <td>node</td> <td></td> </tr> <tr> <td>OS</td> <td></td> </tr> <tr> <td>browser</td> <td></td> </tr> <tr> <td>etc</td> <td></td> </tr> </tbody> </table>
0
<p dir="auto">This is a template helping you to create an issue which can be processes as quickly as possible. Feel free to add additional information or remove not relevant points if you do not need them.</p> <p dir="auto">If you have a question rather than reporting a bug please go to <a href="http://answers.opencv.org" rel="nofollow">http://answers.opencv.org</a> where you get much faster responses.</p> <h3 dir="auto">Please state the information for your system</h3> <ul dir="auto"> <li>OpenCV version: 3.1</li> <li>Host OS: Linux (Fedora 23)</li> <li>Compiler &amp; CMake: GCC 5.3.1 &amp; CMake 3.4.1</li> </ul> <p dir="auto">Problem with:</p> <ul dir="auto"> <li>C examples<br> When I try to compile this way :</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -DINSTALL_C_EXAMPLES=1 .."><pre class="notranslate"><code class="notranslate">cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -DINSTALL_C_EXAMPLES=1 .. </code></pre></div> <p dir="auto">I got this error: <a href="http://pastebin.com/4bcJzke4" rel="nofollow">http://pastebin.com/4bcJzke4</a></p> <p dir="auto">I have installed both v4l and v4l-devel.</p> <p dir="auto">Without tests it works OK</p> <p dir="auto">Thanks</p>
<h5 dir="auto">System information (version)</h5> <ul dir="auto"> <li>OpenCV =&gt; <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li> <li>Operating System / Platform =&gt; <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li> <li>Compiler =&gt; <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li> </ul> <h5 dir="auto">Detailed description</h5> <h5 dir="auto">Steps to reproduce</h5>
0
<h2 dir="auto">Motivation</h2> <p dir="auto">Currently, Druid has three web consoles:</p> <ol dir="auto"> <li>The coordinator console at <a href="http://coordinator:8081/#/" rel="nofollow">http://coordinator:8081/#/</a>, whose source lives at <a href="https://github.com/druid-io/druid-console">https://github.com/druid-io/druid-console</a></li> <li>The overlord console at <a href="http://overlord:8090/" rel="nofollow">http://overlord:8090/</a>.</li> <li>The old coordinator console at <a href="http://coordinator:8081/old-console/" rel="nofollow">http://coordinator:8081/old-console/</a>.</li> </ol> <p dir="auto">Each one has a distinct design and there are very few cross-links between them. This leads to a disjointed user experience. Also, the fact that the sources for console (1) are not in the Druid repo make it difficult to keep it up-to-date.</p> <p dir="auto">A unified console would improve the user experience and would make it easier for Druid developers to keep it up-to-date as Druid's APIs evolve. The change also provides an opportunity to update their design and functionality a bit.</p> <h2 dir="auto">Proposed change</h2> <p dir="auto">The proposed change is to create a new unified web console that subsumes the functionality of the three existing consoles. The unified UI would have its code live inside the Druid repository, making it easier to keep up to date.</p> <p dir="auto">The UI may end up being based on Druid SQL system tables (<a href="http://druid.io/docs/latest/querying/sql#retrieving-metadata" rel="nofollow">http://druid.io/docs/latest/querying/sql#retrieving-metadata</a>), which would allow it to be more flexible than a console based on the currently-available coordinator and overlord APIs. The currently-available APIs were designed to support the existing consoles and return exactly what they need to know, but the system tables are more generic, and could power a more flexible new UI. (Imagine being able to show the distribution of data on historical nodes just for a particular datasource -- that kind of thing.) It would also allow the UI to more easily gain new powers as new columns or tables are added to system tables.</p> <p dir="auto">Since a unified UI would presumably need to access APIs on both the coordinator and overlord, we would need to either use proxying or CORS to allow that to happen. Proxying makes more sense, imo, since CORS requires extra configuration and some kind of consistent domain, which is not necessarily common amongst Druid deployments (many of which would use raw IPs). It could be hosted on the coordinator if the coordinator makes a proxy available to the overlord and broker. Or, it could be hosted on the router, which can already proxy to the coordinator, overlord, and broker (the former two via the optional management proxy). Or, it could be hosted on a new node type (CliWebConsole?). But we have enough node types already…</p> <h2 dir="auto">New or changed public interfaces</h2> <p dir="auto">No new or changed APIs, but there would be a new human interface.</p> <h2 dir="auto">Migration plan and compatibility</h2> <p dir="auto">Keep the existing consoles as-is and offer the new console as a new option. But deprecate the existing consoles and plan to remove them in a future version.</p> <h2 dir="auto">Rejected alternatives</h2> <p dir="auto">None.</p>
<p dir="auto">Complement of roaring bit map returns incorrect result.<br> It seems that complement does not work on the last bit of the roaring bitmap.</p> <p dir="auto">I used following test code and all tests passed with concise bitmap but failed with roaring bitmap.<br> Result shows the last bit of roaring bitmap is unchanged even after complement operation.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public class RoaringBitmapTest { @Parameterized.Parameters public static Iterable&lt;Object[]&gt; constructorFeeder() { return ImmutableList.of( new Object[]{new ConciseBitmapFactory()}, new Object[]{new RoaringBitmapFactory()} ); } private final BitmapFactory testBitmapFactory; public RoaringBitmapTest(BitmapFactory bitmapFactory) { this.testBitmapFactory = bitmapFactory; } @Test public void testComplement1() { final MutableBitmap mutableBitmap = testBitmapFactory.makeEmptyMutableBitmap(); mutableBitmap.add(0); mutableBitmap.add(2); mutableBitmap.add(7); ImmutableBitmap testBitmap = testBitmapFactory.makeImmutableBitmap(mutableBitmap); ImmutableBitmap immutableBitmap = testBitmapFactory.complement(testBitmap, 8); String result = immutableBitmap.toString().replaceAll(&quot;\\s&quot;,&quot;&quot;).split(&quot;\\[|\\]|\\{|\\}&quot;)[1]; Assert.assertEquals(&quot;1,3,4,5,6&quot;, result); } @Test public void testComplement2() { final MutableBitmap mutableBitmap = testBitmapFactory.makeEmptyMutableBitmap(); mutableBitmap.add(0); mutableBitmap.add(2); ImmutableBitmap testBitmap = testBitmapFactory.makeImmutableBitmap(mutableBitmap); ImmutableBitmap immutableBitmap = testBitmapFactory.complement(testBitmap, 4); String result = immutableBitmap.toString().replaceAll(&quot;\\s&quot;,&quot;&quot;).split(&quot;\\[|\\]|\\{|\\}&quot;)[1]; Assert.assertEquals(&quot;1,3&quot;, result); } @Test public void testComplement3() { final MutableBitmap mutableBitmap = testBitmapFactory.makeEmptyMutableBitmap(); mutableBitmap.add(4); mutableBitmap.add(5); ImmutableBitmap testBitmap = testBitmapFactory.makeImmutableBitmap(mutableBitmap); ImmutableBitmap immutableBitmap = testBitmapFactory.complement(testBitmap, 10); String result = immutableBitmap.toString().replaceAll(&quot;\\s&quot;,&quot;&quot;).split(&quot;\\[|\\]|\\{|\\}&quot;)[1]; Assert.assertEquals(&quot;0,1,2,3,6,7,8,9&quot;, result); } }"><pre lang="@RunWith(Parameterized.class)" class="notranslate"><code class="notranslate">public class RoaringBitmapTest { @Parameterized.Parameters public static Iterable&lt;Object[]&gt; constructorFeeder() { return ImmutableList.of( new Object[]{new ConciseBitmapFactory()}, new Object[]{new RoaringBitmapFactory()} ); } private final BitmapFactory testBitmapFactory; public RoaringBitmapTest(BitmapFactory bitmapFactory) { this.testBitmapFactory = bitmapFactory; } @Test public void testComplement1() { final MutableBitmap mutableBitmap = testBitmapFactory.makeEmptyMutableBitmap(); mutableBitmap.add(0); mutableBitmap.add(2); mutableBitmap.add(7); ImmutableBitmap testBitmap = testBitmapFactory.makeImmutableBitmap(mutableBitmap); ImmutableBitmap immutableBitmap = testBitmapFactory.complement(testBitmap, 8); String result = immutableBitmap.toString().replaceAll("\\s","").split("\\[|\\]|\\{|\\}")[1]; Assert.assertEquals("1,3,4,5,6", result); } @Test public void testComplement2() { final MutableBitmap mutableBitmap = testBitmapFactory.makeEmptyMutableBitmap(); mutableBitmap.add(0); mutableBitmap.add(2); ImmutableBitmap testBitmap = testBitmapFactory.makeImmutableBitmap(mutableBitmap); ImmutableBitmap immutableBitmap = testBitmapFactory.complement(testBitmap, 4); String result = immutableBitmap.toString().replaceAll("\\s","").split("\\[|\\]|\\{|\\}")[1]; Assert.assertEquals("1,3", result); } @Test public void testComplement3() { final MutableBitmap mutableBitmap = testBitmapFactory.makeEmptyMutableBitmap(); mutableBitmap.add(4); mutableBitmap.add(5); ImmutableBitmap testBitmap = testBitmapFactory.makeImmutableBitmap(mutableBitmap); ImmutableBitmap immutableBitmap = testBitmapFactory.complement(testBitmap, 10); String result = immutableBitmap.toString().replaceAll("\\s","").split("\\[|\\]|\\{|\\}")[1]; Assert.assertEquals("0,1,2,3,6,7,8,9", result); } } </code></pre></div>
0
<p dir="auto">If two objects have the same name and the second object has animations the animations on the second object will instead be applied to the first on export.</p>
<p dir="auto">Names of nodes are user-specified, and not guaranteed to be unique within a glTF file. But because THREE.PropertyBinding relies on track names to target animation, having two nodes with the same name will cause animation to affect the wrong part of a model. We should de-duplicate node names on import, to ensure that every node ends up with a unique name.</p> <p dir="auto">Filing to follow up on <a href="https://discourse.threejs.org/t/gltf-animation-bug-or-wrong-usage/4536/2" rel="nofollow">https://discourse.threejs.org/t/gltf-animation-bug-or-wrong-usage/4536/2</a>.</p>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=harish" rel="nofollow">harish</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9311?redirect=false" rel="nofollow">SPR-9311</a></strong> and commented</p> <p dir="auto">Currently Resttemplate uses an enum of 'standard' HTTP status codes, that is subset of all legally possible HTTP status codes that services can return. When a non standard HTTP status code is returned by services, an IllegalArgumentException is thrown and all response body is ignored. We call services that use custom code 450 for user validation errors along with an xml containing list of messages codes and message text. Unfortunately we get only an illegal argument exception and response body is lost. I think it would be helpful if say all 4xx, 1xx, 2xx, 5xx are treated as legal responses and their response bodies are preserved and passed to the caller. At the least a hook could be provided to extend the enum used by Resttemplate to add additional HTTP codes that caller might expect.</p> <hr> <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="398102304" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11418" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11418/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11418">#11418</a> RestTemplate throws IllegalArgumentException when HTTP status is not in the HttpStatus enum (<em><strong>"duplicates"</strong></em>)</li> </ul> <p dir="auto">2 votes, 3 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=ps466" rel="nofollow">Paul Sideleau</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7795?redirect=false" rel="nofollow">SPR-7795</a></strong> and commented</p> <p dir="auto">I have setup a MultipartFilter and HtmlHiddenMethodFilter following the instructions in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398101171" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11260" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11260/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11260">#11260</a> and the javadoc.</p> <p dir="auto">I have a java bean that has a org.springframework.web.multipart.MultipartFile property. I attempt to bind my bean with the standard <code class="notranslate">@ModelAttribute</code> annotation. The rest of its properties get resolved correctly but the MultipartFile property is set to null.</p> <p dir="auto">I believe the issue is that on line 106 of the ServletRequestDataBinder it does an instanceof check: "request instanceof MultipartRequest" which will return false because its the HttpMethodRequestWrapper class from the HtmlHiddenMethodFilter.</p> <p dir="auto">However, if I move the property out of my javabean and bind it via a RequestParam annoation, it works correctly.</p> <p dir="auto">public ModelAndView uploadFile(<code class="notranslate">@RequestParam</code>("file") MultipartFile file) {<br> // code<br> }</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0.4</p> <p dir="auto"><strong>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398110693" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12695" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12695/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12695">#12695</a> ServletRequestDataBinder.bind should also consider wrapped ServletRequests when checking for Multipart, to comply with HiddenHttpMethodFilter. (<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="398101171" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11260" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11260/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11260">#11260</a> HiddenHttpMethodFilter does not support multipart requests</li> </ul> <p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/b3f039ae5f0b54a325cdb23f6720e5002b054cee/hovercard" href="https://github.com/spring-projects/spring-framework/commit/b3f039ae5f0b54a325cdb23f6720e5002b054cee"><tt>b3f039a</tt></a></p> <p dir="auto">1 votes, 2 watchers</p>
0
<p dir="auto">I would like to see the total number of search results displayed in the UI.</p> <p dir="auto">(I think I've seen this in the issue list before, sorry if its a duplicate.)</p>
0
<h2 dir="auto">Environment info</h2> <ul dir="auto"> <li><code class="notranslate">transformers</code> version: 4.6.1</li> <li>Platform: Darwin-20.4.0-x86_64-i386-64bit</li> <li>Python version: 3.7.5</li> <li>PyTorch version (GPU?): 1.7.1 (False)</li> <li>Tensorflow version (GPU?): 2.4.1 (False)</li> <li>Using GPU in script?: no</li> <li>Using distributed or parallel set-up in script?: no</li> </ul> <h3 dir="auto">Who can help</h3> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/LysandreJik/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/LysandreJik">@LysandreJik</a></p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/patrickvonplaten/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/patrickvonplaten">@patrickvonplaten</a></p> <h2 dir="auto">Information</h2> <p dir="auto">Model I am using (Bert, XLNet ...): GPT-2</p> <p dir="auto">The problem arises when using:</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> the official example scripts: (give details below)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> my own modified scripts: (give details below)</li> </ul> <p dir="auto">The tasks I am working on is:</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> an official GLUE/SQUaD task: (give the name)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> my own task or dataset: (give details below)</li> </ul> <h2 dir="auto">To reproduce</h2> <p dir="auto">I have noticed that there are quite a few duplicate tokens in the tokenizer. Out of the vocab size of 50257 there are 353 duplicate tokens by my crude calculation. Am I doing anything wrong here?</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="VOCAB_SIZE = 50257 tokenizer = GPT2Tokenizer.from_pretrained('gpt2') all_tokens = set() duplicates = [] for i in range(VOCAB_SIZE): x = tokenizer.decode(i).encode('utf8') if x not in all_tokens: all_tokens.add(x) else: print(f'{i}\t\t {x}') duplicates.append(x)"><pre class="notranslate"><span class="pl-v">VOCAB_SIZE</span> <span class="pl-c1">=</span> <span class="pl-c1">50257</span> <span class="pl-s1">tokenizer</span> <span class="pl-c1">=</span> <span class="pl-v">GPT2Tokenizer</span>.<span class="pl-en">from_pretrained</span>(<span class="pl-s">'gpt2'</span>) <span class="pl-s1">all_tokens</span> <span class="pl-c1">=</span> <span class="pl-en">set</span>() <span class="pl-s1">duplicates</span> <span class="pl-c1">=</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-v">VOCAB_SIZE</span>): <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">tokenizer</span>.<span class="pl-en">decode</span>(<span class="pl-s1">i</span>).<span class="pl-en">encode</span>(<span class="pl-s">'utf8'</span>) <span class="pl-k">if</span> <span class="pl-s1">x</span> <span class="pl-c1">not</span> <span class="pl-c1">in</span> <span class="pl-s1">all_tokens</span>: <span class="pl-s1">all_tokens</span>.<span class="pl-en">add</span>(<span class="pl-s1">x</span>) <span class="pl-k">else</span>: <span class="pl-en">print</span>(<span class="pl-s">f'<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">i</span><span class="pl-kos">}</span></span><span class="pl-cce">\t</span><span class="pl-cce">\t</span> <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">x</span><span class="pl-kos">}</span></span>'</span>) <span class="pl-s1">duplicates</span>.<span class="pl-en">append</span>(<span class="pl-s1">x</span>)</pre></div> <p dir="auto">When I print <code class="notranslate">len(duplicates)</code> I get 353. The output from this loop is</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="95 b'\xef\xbf\xbd' 96 b'\xef\xbf\xbd' 97 b'\xef\xbf\xbd' 98 b'\xef\xbf\xbd' 99 b'\xef\xbf\xbd' 100 b'\xef\xbf\xbd' 101 b'\xef\xbf\xbd' 102 b'\xef\xbf\xbd' 103 b'\xef\xbf\xbd' 104 b'\xef\xbf\xbd' 105 b'\xef\xbf\xbd' 106 b'\xef\xbf\xbd' 107 b'\xef\xbf\xbd' 108 b'\xef\xbf\xbd' 109 b'\xef\xbf\xbd' 110 b'\xef\xbf\xbd' 111 b'\xef\xbf\xbd' 112 b'\xef\xbf\xbd' 113 b'\xef\xbf\xbd' 114 b'\xef\xbf\xbd' 115 b'\xef\xbf\xbd' 116 b'\xef\xbf\xbd' 117 b'\xef\xbf\xbd' 118 b'\xef\xbf\xbd' 119 b'\xef\xbf\xbd' 120 b'\xef\xbf\xbd' 121 b'\xef\xbf\xbd' 122 b'\xef\xbf\xbd' 123 b'\xef\xbf\xbd' 124 b'\xef\xbf\xbd' 125 b'\xef\xbf\xbd' 126 b'\xef\xbf\xbd' 127 b'\xef\xbf\xbd' 128 b'\xef\xbf\xbd' 129 b'\xef\xbf\xbd' 130 b'\xef\xbf\xbd' 131 b'\xef\xbf\xbd' 132 b'\xef\xbf\xbd' 133 b'\xef\xbf\xbd' 134 b'\xef\xbf\xbd' 135 b'\xef\xbf\xbd' 136 b'\xef\xbf\xbd' 137 b'\xef\xbf\xbd' 138 b'\xef\xbf\xbd' 139 b'\xef\xbf\xbd' 140 b'\xef\xbf\xbd' 141 b'\xef\xbf\xbd' 142 b'\xef\xbf\xbd' 143 b'\xef\xbf\xbd' 144 b'\xef\xbf\xbd' 145 b'\xef\xbf\xbd' 146 b'\xef\xbf\xbd' 147 b'\xef\xbf\xbd' 148 b'\xef\xbf\xbd' 149 b'\xef\xbf\xbd' 150 b'\xef\xbf\xbd' 151 b'\xef\xbf\xbd' 152 b'\xef\xbf\xbd' 153 b'\xef\xbf\xbd' 154 b'\xef\xbf\xbd' 155 b'\xef\xbf\xbd' 156 b'\xef\xbf\xbd' 157 b'\xef\xbf\xbd' 158 b'\xef\xbf\xbd' 159 b'\xef\xbf\xbd' 160 b'\xef\xbf\xbd' 161 b'\xef\xbf\xbd' 162 b'\xef\xbf\xbd' 163 b'\xef\xbf\xbd' 164 b'\xef\xbf\xbd' 165 b'\xef\xbf\xbd' 166 b'\xef\xbf\xbd' 167 b'\xef\xbf\xbd' 168 b'\xef\xbf\xbd' 169 b'\xef\xbf\xbd' 170 b'\xef\xbf\xbd' 171 b'\xef\xbf\xbd' 172 b'\xef\xbf\xbd' 173 b'\xef\xbf\xbd' 174 b'\xef\xbf\xbd' 175 b'\xef\xbf\xbd' 176 b'\xef\xbf\xbd' 177 b'\xef\xbf\xbd' 178 b'\xef\xbf\xbd' 179 b'\xef\xbf\xbd' 180 b'\xef\xbf\xbd' 181 b'\xef\xbf\xbd' 182 b'\xef\xbf\xbd' 183 b'\xef\xbf\xbd' 184 b'\xef\xbf\xbd' 185 b'\xef\xbf\xbd' 186 b'\xef\xbf\xbd' 187 b'\xef\xbf\xbd' 222 b'\xef\xbf\xbd' 223 b'\xef\xbf\xbd' 224 b'\xef\xbf\xbd' 225 b'\xef\xbf\xbd' 226 b'\xef\xbf\xbd' 227 b'\xef\xbf\xbd' 228 b'\xef\xbf\xbd' 229 b'\xef\xbf\xbd' 230 b'\xef\xbf\xbd' 231 b'\xef\xbf\xbd' 232 b'\xef\xbf\xbd' 233 b'\xef\xbf\xbd' 234 b'\xef\xbf\xbd' 235 b'\xef\xbf\xbd' 236 b'\xef\xbf\xbd' 237 b'\xef\xbf\xbd' 238 b'\xef\xbf\xbd' 239 b'\xef\xbf\xbd' 240 b'\xef\xbf\xbd' 241 b'\xef\xbf\xbd' 242 b'\xef\xbf\xbd' 243 b'\xef\xbf\xbd' 244 b'\xef\xbf\xbd' 245 b'\xef\xbf\xbd' 246 b'\xef\xbf\xbd' 247 b'\xef\xbf\xbd' 248 b'\xef\xbf\xbd' 249 b'\xef\xbf\xbd' 250 b'\xef\xbf\xbd' 251 b'\xef\xbf\xbd' 252 b'\xef\xbf\xbd' 253 b'\xef\xbf\xbd' 254 b'\xef\xbf\xbd' 255 b'\xef\xbf\xbd' 447 b'\xef\xbf\xbd' 764 b'.' 837 b',' 1209 b'\xef\xbf\xbd' 1587 b' \xef\xbf\xbd' 1792 b'\xef\xbf\xbd' 2343 b' \xef\xbf\xbd' 2515 b'\xef\xbf\xbd' 2644 b'...' 4210 b'\xef\xbf\xbd' 5008 b'\xef\xbf\xbd' 5099 b'\xef\xbf\xbd' 5145 b'!' 5525 b' \xef\xbf\xbd' 5633 b'?' 6184 b' \xef\xbf\xbd' 6353 b'\xef\xbf\xbd\xef\xbf\xbd' 6408 b'\xef\xbf\xbd\xef\xbf\xbd' 6552 b'\xef\xbf\xbd' 7134 b'\xef\xbf\xbd\xef\xbf\xbd' 7377 b' \xef\xbf\xbd' 8008 b'\xef\xbf\xbd\xef\xbf\xbd' 8582 b'\xef\xbf\xbd' 8955 b'\xef\xbf\xbd\xef\xbf\xbd' 10253 b'\xef\xbf\xbd\xef\xbf\xbd' 10263 b' \xef\xbf\xbd' 10310 b'\xef\xbf\xbd' 10545 b' \xef\xbf\xbd' 11019 b' \xef\xbf\xbd' 11485 b'..' 11737 b'\xef\xbf\xbd' 11805 b'\xef\xbf\xbd\xef\xbf\xbd' 11976 b'\xef\xbf\xbd' 12466 b' \xef\xbf\xbd' 12520 b' \xef\xbf\xbd' 12859 b'\xef\xbf\xbd' 13305 b' \xef\xbf\xbd' 13328 b' \xef\xbf\xbd' 13783 b'\xef\xbf\xbd' 13945 b'\xef\xbf\xbd\xef\xbf\xbd' 14360 b' \xef\xbf\xbd' 14519 b' \xef\xbf\xbd' 14524 b' \xef\xbf\xbd' 15139 b' \xef\xbf\xbd' 15926 b'\xef\xbf\xbd' 16268 b' \xef\xbf\xbd' 17312 b'\xef\xbf\xbd' 17358 b'\xef\xbf\xbd' 17433 b' \xef\xbf\xbd' 17550 b' \xef\xbf\xbd' 17683 b'\xe3\x81\xae\xef\xbf\xbd' 17739 b'\xef\xbf\xbd' 17804 b' \xef\xbf\xbd' 17992 b'\xef\xbf\xbd' 18004 b'\xef\xbf\xbd' 18074 b' \xef\xbf\xbd' 18433 b'\xef\xbf\xbd\xef\xbf\xbd' 18796 b'\xef\xbf\xbd' 18872 b' \xef\xbf\xbd' 18923 b' \xef\xbf\xbd' 19021 b'\xef\xbf\xbd' 19153 b'??' 19424 b'....' 19469 b'\xef\xbf\xbd' 19526 b'\xef\xbf\xbd' 19567 b'\xef\xbf\xbd' 20004 b'........' 20015 b'\xef\xbf\xbd' 20046 b'\xef\xbf\xbd' 20543 b' \xef\xbf\xbd' 20724 b' \xef\xbf\xbd' 20998 b'\xef\xbf\xbd' 21253 b'\xef\xbf\xbd\xef\xbf\xbd' 22135 b'.&quot;' 22522 b'\xef\xbf\xbd' 22755 b'\xef\xbf\xbd' 22880 b'\xef\xbf\xbd' 22887 b'\xef\xbf\xbd' 23294 b' \xef\xbf\xbd' 23329 b'\xef\xbf\xbd\xef\xbf\xbd' 23596 b'\xef\xbf\xbd\xef\xbf\xbd' 23626 b'\xef\xbf\xbd' 23821 b' \xef\xbf\xbd' 23877 b'\xef\xbf\xbd' 24231 b'\xef\xbf\xbd' 24457 b'./' 24583 b'\xef\xbf\xbd' 24861 b'\xef\xbf\xbd' 24966 b' \xef\xbf\xbd' 25001 b'\xef\xbf\xbd' 25081 b'\xef\xbf\xbd\xef\xbf\xbd' 25370 b' \xef\xbf\xbd' 26193 b'\xef\xbf\xbd' 26292 b'\xef\xbf\xbd' 26344 b'\xef\xbf\xbd' 26486 b'\xef\xbf\xbd' 26534 b'\xef\xbf\xbd\xef\xbf\xbd' 27032 b'\xe3\x81\xae\xef\xbf\xbd' 27332 b' \xef\xbf\xbd' 27670 b'\xef\xbf\xbd' 27764 b'\xef\xbf\xbd' 27950 b'\xef\xbf\xbd' 28053 b' \xef\xbf\xbd' 28156 b'\xef\xbf\xbd' 28225 b' \xef\xbf\xbd' 28839 b'\xef\xbf\xbd' 28938 b'\xef\xbf\xbd' 29705 b'\xef\xbf\xbd' 29773 b'\xef\xbf\xbd' 29785 b'\xef\xbf\xbd' 29826 b'\xef\xbf\xbd' 30266 b'\xef\xbf\xbd' 30298 b'\xef\xbf\xbd' 30325 b' \xef\xbf\xbd' 30585 b'\xef\xbf\xbd' 31204 b'\xef\xbf\xbd\xef\xbf\xbd' 31479 b'\xef\xbf\xbd' 31619 b' \xef\xbf\xbd' 31965 b'\xef\xbf\xbd' 32003 b'\xef\xbf\xbd' 32368 b'\xef\xbf\xbd' 32391 b'\xef\xbf\xbd' 32432 b'\xef\xbf\xbd' 32518 b'\xef\xbf\xbd' 32573 b'\xef\xbf\xbd' 32849 b'\xef\xbf\xbd' 33176 b'\xef\xbf\xbd' 33232 b'\xef\xbf\xbd' 33426 b'\xe3\x81\xae\xef\xbf\xbd' 33566 b'\xef\xbf\xbd' 33699 b'\xef\xbf\xbd' 33768 b'\xef\xbf\xbd' 34402 b'\xef\xbf\xbd' 34460 b'\xef\xbf\xbd' 34504 b' \xe8\xa3\x8f\xef\xbf\xbd' 34650 b'\xef\xbf\xbd' 34719 b' \xef\xbf\xbd' 34754 b' \xef\xbf\xbd' 34913 b'???' 34932 b'\xef\xbf\xbd' 35050 b'\xef\xbf\xbd\xef\xbf\xbd' 35069 b'\xef\xbf\xbd\xef\xbf\xbd' 35266 b'\xef\xbf\xbd' 35705 b'\xef\xbf\xbd' 35707 b'\xef\xbf\xbd' 35713 b'...&quot;' 35975 b'\xef\xbf\xbd' 36181 b'\xef\xbf\xbd' 36365 b'\xef\xbf\xbd' 36469 b' \xef\xbf\xbd' 36596 b'\xef\xbf\xbd\xef\xbf\xbd' 36685 b'\xef\xbf\xbd' 37239 b'\xef\xbf\xbd' 37345 b'\xef\xbf\xbd' 37605 b'\xef\xbf\xbd' 37772 b'\xef\xbf\xbd' 37863 b'\xef\xbf\xbd' 37867 b'!!' 38184 b'\xef\xbf\xbd' 38461 b'\xef\xbf\xbd' 39333 b'\xef\xbf\xbd\xef\xbf\xbd' 39355 b'\xef\xbf\xbd' 39611 b'\xef\xbf\xbd' 39820 b'\xe9\xbe\x8d\xef\xbf\xbd' 40367 b'\xef\xbf\xbd' 41340 b'\xef\xbf\xbd' 41349 b'?)' 41365 b'\xef\xbf\xbd\xef\xbf\xbd' 41585 b'\xef\xbf\xbd' 41678 b'\xef\xbf\xbd\xef\xbf\xbd' 41753 b'\xef\xbf\xbd' 41840 b'\xef\xbf\xbd' 42062 b'\xef\xbf\xbd\xef\xbf\xbd' 42164 b' \xef\xbf\xbd' 42314 b' \xef\xbf\xbd' 42527 b' \xef\xbf\xbd' 42911 b',&quot;' 43074 b' \xef\xbf\xbd' 43102 b'\xef\xbf\xbd' 43297 b'\xef\xbf\xbd' 43380 b'\xef\xbf\xbd' 43518 b'\xef\xbf\xbd\xef\xbf\xbd' 43636 b'\xef\xbf\xbd' 43718 b'\xef\xbf\xbd' 43769 b'\xef\xbf\xbd\xef\xbf\xbd' 43889 b'\xef\xbf\xbd' 43897 b'\xef\xbf\xbd' 44165 b'\xef\xbf\xbd' 44293 b'\xef\xbf\xbd' 44713 b'................' 45250 b'\xef\xbf\xbd' 45379 b'\xef\xbf\xbd' 45433 b'\xef\xbf\xbd\xef\xbf\xbd' 45495 b'\xef\xbf\xbd' 45539 b'\xef\xbf\xbd\xef\xbf\xbd' 45617 b'\xef\xbf\xbd' 45739 b'\xef\xbf\xbd' 45784 b'\xef\xbf\xbd' 45865 b'\xef\xbf\xbd\xef\xbf\xbd' 45911 b'\xef\xbf\xbd' 46237 b'\xef\xbf\xbd' 46256 b'\xef\xbf\xbd' 46328 b'.)' 46349 b'\xef\xbf\xbd' 46479 b'\xef\xbf\xbd' 46695 b'\xef\xbf\xbd' 46763 b'\xef\xbf\xbd' 46788 b'\xef\xbf\xbd\xef\xbf\xbd' 47078 b'\xef\xbf\xbd' 47082 b'......' 47249 b'\xef\xbf\xbd' 47540 b'._' 47728 b'\xef\xbf\xbd' 47797 b'\xef\xbf\xbd' 47947 b'\xef\xbf\xbd' 47991 b'\xef\xbf\xbd' 48071 b'\xef\xbf\xbd' 48585 b'\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd' 48953 b'\xef\xbf\xbd\xef\xbf\xbd' 48958 b'\xef\xbf\xbd' 49035 b'\xef\xbf\xbd' 49149 b'\xe3\x81\xae\xef\xbf\xbd' 49426 b'\xef\xbf\xbd' 49694 b'\xef\xbf\xbd' 50159 b'\xef\xbf\xbd\xef\xbf\xbd' 50169 b' \xef\xbf\xbd'"><pre class="notranslate"><code class="notranslate">95 b'\xef\xbf\xbd' 96 b'\xef\xbf\xbd' 97 b'\xef\xbf\xbd' 98 b'\xef\xbf\xbd' 99 b'\xef\xbf\xbd' 100 b'\xef\xbf\xbd' 101 b'\xef\xbf\xbd' 102 b'\xef\xbf\xbd' 103 b'\xef\xbf\xbd' 104 b'\xef\xbf\xbd' 105 b'\xef\xbf\xbd' 106 b'\xef\xbf\xbd' 107 b'\xef\xbf\xbd' 108 b'\xef\xbf\xbd' 109 b'\xef\xbf\xbd' 110 b'\xef\xbf\xbd' 111 b'\xef\xbf\xbd' 112 b'\xef\xbf\xbd' 113 b'\xef\xbf\xbd' 114 b'\xef\xbf\xbd' 115 b'\xef\xbf\xbd' 116 b'\xef\xbf\xbd' 117 b'\xef\xbf\xbd' 118 b'\xef\xbf\xbd' 119 b'\xef\xbf\xbd' 120 b'\xef\xbf\xbd' 121 b'\xef\xbf\xbd' 122 b'\xef\xbf\xbd' 123 b'\xef\xbf\xbd' 124 b'\xef\xbf\xbd' 125 b'\xef\xbf\xbd' 126 b'\xef\xbf\xbd' 127 b'\xef\xbf\xbd' 128 b'\xef\xbf\xbd' 129 b'\xef\xbf\xbd' 130 b'\xef\xbf\xbd' 131 b'\xef\xbf\xbd' 132 b'\xef\xbf\xbd' 133 b'\xef\xbf\xbd' 134 b'\xef\xbf\xbd' 135 b'\xef\xbf\xbd' 136 b'\xef\xbf\xbd' 137 b'\xef\xbf\xbd' 138 b'\xef\xbf\xbd' 139 b'\xef\xbf\xbd' 140 b'\xef\xbf\xbd' 141 b'\xef\xbf\xbd' 142 b'\xef\xbf\xbd' 143 b'\xef\xbf\xbd' 144 b'\xef\xbf\xbd' 145 b'\xef\xbf\xbd' 146 b'\xef\xbf\xbd' 147 b'\xef\xbf\xbd' 148 b'\xef\xbf\xbd' 149 b'\xef\xbf\xbd' 150 b'\xef\xbf\xbd' 151 b'\xef\xbf\xbd' 152 b'\xef\xbf\xbd' 153 b'\xef\xbf\xbd' 154 b'\xef\xbf\xbd' 155 b'\xef\xbf\xbd' 156 b'\xef\xbf\xbd' 157 b'\xef\xbf\xbd' 158 b'\xef\xbf\xbd' 159 b'\xef\xbf\xbd' 160 b'\xef\xbf\xbd' 161 b'\xef\xbf\xbd' 162 b'\xef\xbf\xbd' 163 b'\xef\xbf\xbd' 164 b'\xef\xbf\xbd' 165 b'\xef\xbf\xbd' 166 b'\xef\xbf\xbd' 167 b'\xef\xbf\xbd' 168 b'\xef\xbf\xbd' 169 b'\xef\xbf\xbd' 170 b'\xef\xbf\xbd' 171 b'\xef\xbf\xbd' 172 b'\xef\xbf\xbd' 173 b'\xef\xbf\xbd' 174 b'\xef\xbf\xbd' 175 b'\xef\xbf\xbd' 176 b'\xef\xbf\xbd' 177 b'\xef\xbf\xbd' 178 b'\xef\xbf\xbd' 179 b'\xef\xbf\xbd' 180 b'\xef\xbf\xbd' 181 b'\xef\xbf\xbd' 182 b'\xef\xbf\xbd' 183 b'\xef\xbf\xbd' 184 b'\xef\xbf\xbd' 185 b'\xef\xbf\xbd' 186 b'\xef\xbf\xbd' 187 b'\xef\xbf\xbd' 222 b'\xef\xbf\xbd' 223 b'\xef\xbf\xbd' 224 b'\xef\xbf\xbd' 225 b'\xef\xbf\xbd' 226 b'\xef\xbf\xbd' 227 b'\xef\xbf\xbd' 228 b'\xef\xbf\xbd' 229 b'\xef\xbf\xbd' 230 b'\xef\xbf\xbd' 231 b'\xef\xbf\xbd' 232 b'\xef\xbf\xbd' 233 b'\xef\xbf\xbd' 234 b'\xef\xbf\xbd' 235 b'\xef\xbf\xbd' 236 b'\xef\xbf\xbd' 237 b'\xef\xbf\xbd' 238 b'\xef\xbf\xbd' 239 b'\xef\xbf\xbd' 240 b'\xef\xbf\xbd' 241 b'\xef\xbf\xbd' 242 b'\xef\xbf\xbd' 243 b'\xef\xbf\xbd' 244 b'\xef\xbf\xbd' 245 b'\xef\xbf\xbd' 246 b'\xef\xbf\xbd' 247 b'\xef\xbf\xbd' 248 b'\xef\xbf\xbd' 249 b'\xef\xbf\xbd' 250 b'\xef\xbf\xbd' 251 b'\xef\xbf\xbd' 252 b'\xef\xbf\xbd' 253 b'\xef\xbf\xbd' 254 b'\xef\xbf\xbd' 255 b'\xef\xbf\xbd' 447 b'\xef\xbf\xbd' 764 b'.' 837 b',' 1209 b'\xef\xbf\xbd' 1587 b' \xef\xbf\xbd' 1792 b'\xef\xbf\xbd' 2343 b' \xef\xbf\xbd' 2515 b'\xef\xbf\xbd' 2644 b'...' 4210 b'\xef\xbf\xbd' 5008 b'\xef\xbf\xbd' 5099 b'\xef\xbf\xbd' 5145 b'!' 5525 b' \xef\xbf\xbd' 5633 b'?' 6184 b' \xef\xbf\xbd' 6353 b'\xef\xbf\xbd\xef\xbf\xbd' 6408 b'\xef\xbf\xbd\xef\xbf\xbd' 6552 b'\xef\xbf\xbd' 7134 b'\xef\xbf\xbd\xef\xbf\xbd' 7377 b' \xef\xbf\xbd' 8008 b'\xef\xbf\xbd\xef\xbf\xbd' 8582 b'\xef\xbf\xbd' 8955 b'\xef\xbf\xbd\xef\xbf\xbd' 10253 b'\xef\xbf\xbd\xef\xbf\xbd' 10263 b' \xef\xbf\xbd' 10310 b'\xef\xbf\xbd' 10545 b' \xef\xbf\xbd' 11019 b' \xef\xbf\xbd' 11485 b'..' 11737 b'\xef\xbf\xbd' 11805 b'\xef\xbf\xbd\xef\xbf\xbd' 11976 b'\xef\xbf\xbd' 12466 b' \xef\xbf\xbd' 12520 b' \xef\xbf\xbd' 12859 b'\xef\xbf\xbd' 13305 b' \xef\xbf\xbd' 13328 b' \xef\xbf\xbd' 13783 b'\xef\xbf\xbd' 13945 b'\xef\xbf\xbd\xef\xbf\xbd' 14360 b' \xef\xbf\xbd' 14519 b' \xef\xbf\xbd' 14524 b' \xef\xbf\xbd' 15139 b' \xef\xbf\xbd' 15926 b'\xef\xbf\xbd' 16268 b' \xef\xbf\xbd' 17312 b'\xef\xbf\xbd' 17358 b'\xef\xbf\xbd' 17433 b' \xef\xbf\xbd' 17550 b' \xef\xbf\xbd' 17683 b'\xe3\x81\xae\xef\xbf\xbd' 17739 b'\xef\xbf\xbd' 17804 b' \xef\xbf\xbd' 17992 b'\xef\xbf\xbd' 18004 b'\xef\xbf\xbd' 18074 b' \xef\xbf\xbd' 18433 b'\xef\xbf\xbd\xef\xbf\xbd' 18796 b'\xef\xbf\xbd' 18872 b' \xef\xbf\xbd' 18923 b' \xef\xbf\xbd' 19021 b'\xef\xbf\xbd' 19153 b'??' 19424 b'....' 19469 b'\xef\xbf\xbd' 19526 b'\xef\xbf\xbd' 19567 b'\xef\xbf\xbd' 20004 b'........' 20015 b'\xef\xbf\xbd' 20046 b'\xef\xbf\xbd' 20543 b' \xef\xbf\xbd' 20724 b' \xef\xbf\xbd' 20998 b'\xef\xbf\xbd' 21253 b'\xef\xbf\xbd\xef\xbf\xbd' 22135 b'."' 22522 b'\xef\xbf\xbd' 22755 b'\xef\xbf\xbd' 22880 b'\xef\xbf\xbd' 22887 b'\xef\xbf\xbd' 23294 b' \xef\xbf\xbd' 23329 b'\xef\xbf\xbd\xef\xbf\xbd' 23596 b'\xef\xbf\xbd\xef\xbf\xbd' 23626 b'\xef\xbf\xbd' 23821 b' \xef\xbf\xbd' 23877 b'\xef\xbf\xbd' 24231 b'\xef\xbf\xbd' 24457 b'./' 24583 b'\xef\xbf\xbd' 24861 b'\xef\xbf\xbd' 24966 b' \xef\xbf\xbd' 25001 b'\xef\xbf\xbd' 25081 b'\xef\xbf\xbd\xef\xbf\xbd' 25370 b' \xef\xbf\xbd' 26193 b'\xef\xbf\xbd' 26292 b'\xef\xbf\xbd' 26344 b'\xef\xbf\xbd' 26486 b'\xef\xbf\xbd' 26534 b'\xef\xbf\xbd\xef\xbf\xbd' 27032 b'\xe3\x81\xae\xef\xbf\xbd' 27332 b' \xef\xbf\xbd' 27670 b'\xef\xbf\xbd' 27764 b'\xef\xbf\xbd' 27950 b'\xef\xbf\xbd' 28053 b' \xef\xbf\xbd' 28156 b'\xef\xbf\xbd' 28225 b' \xef\xbf\xbd' 28839 b'\xef\xbf\xbd' 28938 b'\xef\xbf\xbd' 29705 b'\xef\xbf\xbd' 29773 b'\xef\xbf\xbd' 29785 b'\xef\xbf\xbd' 29826 b'\xef\xbf\xbd' 30266 b'\xef\xbf\xbd' 30298 b'\xef\xbf\xbd' 30325 b' \xef\xbf\xbd' 30585 b'\xef\xbf\xbd' 31204 b'\xef\xbf\xbd\xef\xbf\xbd' 31479 b'\xef\xbf\xbd' 31619 b' \xef\xbf\xbd' 31965 b'\xef\xbf\xbd' 32003 b'\xef\xbf\xbd' 32368 b'\xef\xbf\xbd' 32391 b'\xef\xbf\xbd' 32432 b'\xef\xbf\xbd' 32518 b'\xef\xbf\xbd' 32573 b'\xef\xbf\xbd' 32849 b'\xef\xbf\xbd' 33176 b'\xef\xbf\xbd' 33232 b'\xef\xbf\xbd' 33426 b'\xe3\x81\xae\xef\xbf\xbd' 33566 b'\xef\xbf\xbd' 33699 b'\xef\xbf\xbd' 33768 b'\xef\xbf\xbd' 34402 b'\xef\xbf\xbd' 34460 b'\xef\xbf\xbd' 34504 b' \xe8\xa3\x8f\xef\xbf\xbd' 34650 b'\xef\xbf\xbd' 34719 b' \xef\xbf\xbd' 34754 b' \xef\xbf\xbd' 34913 b'???' 34932 b'\xef\xbf\xbd' 35050 b'\xef\xbf\xbd\xef\xbf\xbd' 35069 b'\xef\xbf\xbd\xef\xbf\xbd' 35266 b'\xef\xbf\xbd' 35705 b'\xef\xbf\xbd' 35707 b'\xef\xbf\xbd' 35713 b'..."' 35975 b'\xef\xbf\xbd' 36181 b'\xef\xbf\xbd' 36365 b'\xef\xbf\xbd' 36469 b' \xef\xbf\xbd' 36596 b'\xef\xbf\xbd\xef\xbf\xbd' 36685 b'\xef\xbf\xbd' 37239 b'\xef\xbf\xbd' 37345 b'\xef\xbf\xbd' 37605 b'\xef\xbf\xbd' 37772 b'\xef\xbf\xbd' 37863 b'\xef\xbf\xbd' 37867 b'!!' 38184 b'\xef\xbf\xbd' 38461 b'\xef\xbf\xbd' 39333 b'\xef\xbf\xbd\xef\xbf\xbd' 39355 b'\xef\xbf\xbd' 39611 b'\xef\xbf\xbd' 39820 b'\xe9\xbe\x8d\xef\xbf\xbd' 40367 b'\xef\xbf\xbd' 41340 b'\xef\xbf\xbd' 41349 b'?)' 41365 b'\xef\xbf\xbd\xef\xbf\xbd' 41585 b'\xef\xbf\xbd' 41678 b'\xef\xbf\xbd\xef\xbf\xbd' 41753 b'\xef\xbf\xbd' 41840 b'\xef\xbf\xbd' 42062 b'\xef\xbf\xbd\xef\xbf\xbd' 42164 b' \xef\xbf\xbd' 42314 b' \xef\xbf\xbd' 42527 b' \xef\xbf\xbd' 42911 b',"' 43074 b' \xef\xbf\xbd' 43102 b'\xef\xbf\xbd' 43297 b'\xef\xbf\xbd' 43380 b'\xef\xbf\xbd' 43518 b'\xef\xbf\xbd\xef\xbf\xbd' 43636 b'\xef\xbf\xbd' 43718 b'\xef\xbf\xbd' 43769 b'\xef\xbf\xbd\xef\xbf\xbd' 43889 b'\xef\xbf\xbd' 43897 b'\xef\xbf\xbd' 44165 b'\xef\xbf\xbd' 44293 b'\xef\xbf\xbd' 44713 b'................' 45250 b'\xef\xbf\xbd' 45379 b'\xef\xbf\xbd' 45433 b'\xef\xbf\xbd\xef\xbf\xbd' 45495 b'\xef\xbf\xbd' 45539 b'\xef\xbf\xbd\xef\xbf\xbd' 45617 b'\xef\xbf\xbd' 45739 b'\xef\xbf\xbd' 45784 b'\xef\xbf\xbd' 45865 b'\xef\xbf\xbd\xef\xbf\xbd' 45911 b'\xef\xbf\xbd' 46237 b'\xef\xbf\xbd' 46256 b'\xef\xbf\xbd' 46328 b'.)' 46349 b'\xef\xbf\xbd' 46479 b'\xef\xbf\xbd' 46695 b'\xef\xbf\xbd' 46763 b'\xef\xbf\xbd' 46788 b'\xef\xbf\xbd\xef\xbf\xbd' 47078 b'\xef\xbf\xbd' 47082 b'......' 47249 b'\xef\xbf\xbd' 47540 b'._' 47728 b'\xef\xbf\xbd' 47797 b'\xef\xbf\xbd' 47947 b'\xef\xbf\xbd' 47991 b'\xef\xbf\xbd' 48071 b'\xef\xbf\xbd' 48585 b'\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd' 48953 b'\xef\xbf\xbd\xef\xbf\xbd' 48958 b'\xef\xbf\xbd' 49035 b'\xef\xbf\xbd' 49149 b'\xe3\x81\xae\xef\xbf\xbd' 49426 b'\xef\xbf\xbd' 49694 b'\xef\xbf\xbd' 50159 b'\xef\xbf\xbd\xef\xbf\xbd' 50169 b' \xef\xbf\xbd' </code></pre></div> <h2 dir="auto">Expected behavior</h2> <p dir="auto">I would expect that there are no duplicate tokens. I might be decoding tokens incorrectly which would explain why there are so many replacement character <code class="notranslate">b'\xef\xbf\xbd'</code> tokens but there are even duplicates in the normal utf8 characters such as <code class="notranslate">?</code> which occurs in tokens 30 and 5633:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[i for i in range(VOCAB_SIZE) if tokenizer.decode(i) == '?']"><pre class="notranslate">[<span class="pl-s1">i</span> <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-v">VOCAB_SIZE</span>) <span class="pl-k">if</span> <span class="pl-s1">tokenizer</span>.<span class="pl-en">decode</span>(<span class="pl-s1">i</span>) <span class="pl-c1">==</span> <span class="pl-s">'?'</span>]</pre></div>
<h2 dir="auto">❓ Questions &amp; Help</h2> <p dir="auto">Does anyone knows how to mask a word in a sentence and then get predictions with probabilities from XLM models</p>
0
<p dir="auto">I am having the following configuration:</p> <ul dir="auto"> <li>Neo4j version: 3.2.2</li> <li>Operating system: Ubuntu 14.04)</li> <li>API/Driver: Java API</li> </ul> <p dir="auto">I am trying to load a nodes.csv and relationships.csv like this:</p> <p dir="auto">./neo4j-community-3.2.2/bin/neo4j-import --into neo4j-community-3.2.2/data/databases/graph.db --nodes nodes.csv --relationships rels.csv --stacktrace true --skip-bad-relationships true --skip-bad-nodes true --skip-duplicate-nodes true --ignore-empty-strings true --ignore-extra-columns true</p> <p dir="auto">I think it is almost done importing but I get the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="IMPORT DONE in 35m 27s 271ms. Imported: 3436328 nodes 71988252 relationships 3436328 properties Peak memory usage: 592.64 MB Exception in thread &quot;main&quot; java.lang.OutOfMemoryError: GC overhead limit exceeded at org.neo4j.kernel.impl.store.kvstore.ConcurrentMapState.sortedUpdates(ConcurrentMapState.java:390) at org.neo4j.kernel.impl.store.kvstore.ConcurrentMapState.dataProvider(ConcurrentMapState.java:377) at org.neo4j.kernel.impl.store.kvstore.ConcurrentMapState.dataProvider(ConcurrentMapState.java:363) at org.neo4j.kernel.impl.store.kvstore.RotationState$Rotation.rotate(RotationState.java:92) at org.neo4j.kernel.impl.store.kvstore.RotationState$Rotation.rotate(RotationState.java:52) at org.neo4j.kernel.impl.store.kvstore.AbstractKeyValueStore$RotationTask.rotate(AbstractKeyValueStore.java:311) at org.neo4j.kernel.impl.store.kvstore.AbstractKeyValueStore$RotationTask.run(AbstractKeyValueStore.java:296) at org.neo4j.kernel.impl.store.kvstore.ConcurrentMapState$1.close(ConcurrentMapState.java:149) at org.neo4j.kernel.impl.store.counts.CountsUpdater.close(CountsUpdater.java:155) at org.neo4j.unsafe.impl.batchimport.ParallelBatchImporter.doImport(ParallelBatchImporter.java:249) at org.neo4j.tooling.ImportTool.doImport(ImportTool.java:505) at org.neo4j.tooling.ImportTool.main(ImportTool.java:438) at org.neo4j.tooling.ImportTool.main(ImportTool.java:347)"><pre class="notranslate"><code class="notranslate">IMPORT DONE in 35m 27s 271ms. Imported: 3436328 nodes 71988252 relationships 3436328 properties Peak memory usage: 592.64 MB Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded at org.neo4j.kernel.impl.store.kvstore.ConcurrentMapState.sortedUpdates(ConcurrentMapState.java:390) at org.neo4j.kernel.impl.store.kvstore.ConcurrentMapState.dataProvider(ConcurrentMapState.java:377) at org.neo4j.kernel.impl.store.kvstore.ConcurrentMapState.dataProvider(ConcurrentMapState.java:363) at org.neo4j.kernel.impl.store.kvstore.RotationState$Rotation.rotate(RotationState.java:92) at org.neo4j.kernel.impl.store.kvstore.RotationState$Rotation.rotate(RotationState.java:52) at org.neo4j.kernel.impl.store.kvstore.AbstractKeyValueStore$RotationTask.rotate(AbstractKeyValueStore.java:311) at org.neo4j.kernel.impl.store.kvstore.AbstractKeyValueStore$RotationTask.run(AbstractKeyValueStore.java:296) at org.neo4j.kernel.impl.store.kvstore.ConcurrentMapState$1.close(ConcurrentMapState.java:149) at org.neo4j.kernel.impl.store.counts.CountsUpdater.close(CountsUpdater.java:155) at org.neo4j.unsafe.impl.batchimport.ParallelBatchImporter.doImport(ParallelBatchImporter.java:249) at org.neo4j.tooling.ImportTool.doImport(ImportTool.java:505) at org.neo4j.tooling.ImportTool.main(ImportTool.java:438) at org.neo4j.tooling.ImportTool.main(ImportTool.java:347) </code></pre></div> <p dir="auto">Here are samples of the nodes.csv:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;CUI:ID&quot;,&quot;:LABEL&quot; &quot;C3609949&quot;,&quot;['Hippeastrum morelianum Lem.', 'Hippeastrum morelianum']&quot; &quot;C2056228&quot;,&quot;['tenderness on palpation of distal phalanx of fifth toe of left foot (physical finding)', 'tenderness on palpation of distal phalanx of fifth toe of left foot']&quot;"><pre class="notranslate"><code class="notranslate">"CUI:ID",":LABEL" "C3609949","['Hippeastrum morelianum Lem.', 'Hippeastrum morelianum']" "C2056228","['tenderness on palpation of distal phalanx of fifth toe of left foot (physical finding)', 'tenderness on palpation of distal phalanx of fifth toe of left foot']" </code></pre></div> <p dir="auto">and from the relationships.csv:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;CUI:START_ID&quot;,&quot;CUI:END_ID&quot;,&quot;:TYPE&quot; &quot;C0236642&quot;,&quot;C0270715&quot;,&quot;RB&quot; &quot;C0003787&quot;,&quot;C0037728&quot;,&quot;RB&quot; &quot;C0018090&quot;,&quot;C0032636&quot;,&quot;RB&quot; &quot;C0039194&quot;,&quot;C0024264&quot;,&quot;RB&quot; &quot;C0004561&quot;,&quot;C0024264&quot;,&quot;RB&quot; &quot;C0022801&quot;,&quot;C0035287&quot;,&quot;RB&quot; &quot;C0022801&quot;,&quot;C0227525&quot;,&quot;RB&quot; &quot;C0022801&quot;,&quot;C0449475&quot;,&quot;RB&quot; &quot;C0034143&quot;,&quot;C0682702&quot;,&quot;RB&quot; "><pre class="notranslate"><code class="notranslate">"CUI:START_ID","CUI:END_ID",":TYPE" "C0236642","C0270715","RB" "C0003787","C0037728","RB" "C0018090","C0032636","RB" "C0039194","C0024264","RB" "C0004561","C0024264","RB" "C0022801","C0035287","RB" "C0022801","C0227525","RB" "C0022801","C0449475","RB" "C0034143","C0682702","RB" </code></pre></div>
<p dir="auto">There is a display issue when displaying 64bit integers, when they are near the max value, the last few digits get rounded</p> <p dir="auto">True ID: 436565277858205696 | Web Admin: 436565277858205700<br> True ID: 436570021204987904 | Web Admin: 436570021204987900</p> <p dir="auto">this issue is unfortunately not in with neo4j itself, but a problem with how javascript handles long numbers... It does however make the web based management tools hard to use as you cannot use the values you are seeing. We encountered a similar issue on the front end of our application, and overcame by serializing our Id's as strings on our client view models (not ideal, but we're using a lot of javascript in our front end)<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/62c4da075e0786957e7f6e550fccc7df18439c91c1e5fde91c35f2af63d53bdf/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f363733373238372f323233323230332f62636666303334382d396231382d313165332d393530392d3863373863303064373839392e706e67"><img src="https://camo.githubusercontent.com/62c4da075e0786957e7f6e550fccc7df18439c91c1e5fde91c35f2af63d53bdf/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f363733373238372f323233323230332f62636666303334382d396231382d313165332d393530392d3863373863303064373839392e706e67" alt="image" data-canonical-src="https://f.cloud.github.com/assets/6737287/2232203/bcff0348-9b18-11e3-9509-8c78c00d7899.png" style="max-width: 100%;"></a></p>
0
<p dir="auto">Building latest HEAD with Visual Studio 14.22.27905 (Visual Studio 2019 Community Edition) fails, there are warnings that are turned into an error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="_simd.dispatch.avx512_skx.c numpy\core\src\_simd\_simd.dispatch.c.src(425): warning C4244: 'initializing': conversion from '__mmask16' to 'npyv_b64', \ possible loss of data ... and 3 more like that"><pre class="notranslate"><code class="notranslate">_simd.dispatch.avx512_skx.c numpy\core\src\_simd\_simd.dispatch.c.src(425): warning C4244: 'initializing': conversion from '__mmask16' to 'npyv_b64', \ possible loss of data ... and 3 more like that </code></pre></div> <p dir="auto">The warnings point to this code (the first SIMD_IMPL_INTRIN_2` is line 425):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// Logical /**begin repeat * #bsfx = b8, b16, b32, b64# */ SIMD_IMPL_INTRIN_2(and_@bsfx@, v@bsfx@, v@bsfx@, v@bsfx@) SIMD_IMPL_INTRIN_2(or_@bsfx@, v@bsfx@, v@bsfx@, v@bsfx@) SIMD_IMPL_INTRIN_2(xor_@bsfx@, v@bsfx@, v@bsfx@, v@bsfx@) SIMD_IMPL_INTRIN_1(not_@bsfx@, v@bsfx@, v@bsfx@)"><pre class="notranslate"><code class="notranslate">// Logical /**begin repeat * #bsfx = b8, b16, b32, b64# */ SIMD_IMPL_INTRIN_2(and_@bsfx@, v@bsfx@, v@bsfx@, v@bsfx@) SIMD_IMPL_INTRIN_2(or_@bsfx@, v@bsfx@, v@bsfx@, v@bsfx@) SIMD_IMPL_INTRIN_2(xor_@bsfx@, v@bsfx@, v@bsfx@, v@bsfx@) SIMD_IMPL_INTRIN_1(not_@bsfx@, v@bsfx@, v@bsfx@) </code></pre></div> <p dir="auto">It seems the first line is preprocessed into (for <code class="notranslate">b16</code>):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#line 425 &quot;numpy\\core\\src\\_simd\\_simd.dispatch.c.src&quot; static PyObject *simd__intrin_and_b16 (PyObject* (__NPY_UNUSED_TAGGEDself) , PyObject *args) { simd_arg arg1 = {.dtype = simd_data_vb16}; simd_arg arg2 = {.dtype = simd_data_vb16}; if (!PyArg_ParseTuple( args, &quot;O&amp;O&amp;:&quot;&quot;and_b16&quot;, simd_arg_converter, &amp;arg1, simd_arg_converter, &amp;arg2 )) return ((void *)0); simd_data data = {.vb16 = _kand_mask32( arg1.data.vb16, arg2.data.vb16 )}; simd_arg_free(&amp;arg1); simd_arg_free(&amp;arg2); simd_arg ret = { .data = data, .dtype = simd_data_vb16 }; return simd_arg_to_obj(&amp;ret); }"><pre class="notranslate"><code class="notranslate">#line 425 "numpy\\core\\src\\_simd\\_simd.dispatch.c.src" static PyObject *simd__intrin_and_b16 (PyObject* (__NPY_UNUSED_TAGGEDself) , PyObject *args) { simd_arg arg1 = {.dtype = simd_data_vb16}; simd_arg arg2 = {.dtype = simd_data_vb16}; if (!PyArg_ParseTuple( args, "O&amp;O&amp;:""and_b16", simd_arg_converter, &amp;arg1, simd_arg_converter, &amp;arg2 )) return ((void *)0); simd_data data = {.vb16 = _kand_mask32( arg1.data.vb16, arg2.data.vb16 )}; simd_arg_free(&amp;arg1); simd_arg_free(&amp;arg2); simd_arg ret = { .data = data, .dtype = simd_data_vb16 }; return simd_arg_to_obj(&amp;ret); } </code></pre></div> <p dir="auto">Note the call to <code class="notranslate">_kand_mask32</code> in the middle. That is defined elsewhere as</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="extern __mmask32 __cdecl _kand_mask32(__mmask32, __mmask32);"><pre class="notranslate"><code class="notranslate">extern __mmask32 __cdecl _kand_mask32(__mmask32, __mmask32); </code></pre></div> <p dir="auto">So somehow the macro is setting up the wrong function?</p> <details> <summary>`build.log`</summary> <p dir="auto">Some of the log lines are very long.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild\src.win-amd64-3.8\numpy\core\src\_simd -Inumpy\core\include -Ibuild\src.win-amd64-3.8\numpy\core\include/numpy -Ibuild\src.win-amd64-3.8\numpy\distutils\include -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\pypy_stuff\Python38\include -IC:\pypy_stuff\Python38\include -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt /Tcbuild\src.win-amd64-3.8\numpy\core\src\_simd\_simd.dispatch.avx512_skx.c /Fobuild\temp.win-amd64-3.8\Release\build\src.win-amd64-3.8\numpy\core\src\_simd\_simd.dispatch.avx512_skx.obj /WX /arch:AVX512 Running from numpy source directory. C:\pypy_stuff\numpy\numpy\distutils\system_info.py:1989: UserWarning: Optimized (vendor) Blas libraries are not found. Falls back to netlib Blas library which has worse performance. A better performance should be easily gained by switching Blas library. if self._calc_info(blas): C:\pypy_stuff\numpy\numpy\distutils\system_info.py:1989: UserWarning: Blas (http://www.netlib.org/blas/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [blas]) or by setting the BLAS environment variable. if self._calc_info(blas): C:\pypy_stuff\numpy\numpy\distutils\system_info.py:1989: UserWarning: Blas (http://www.netlib.org/blas/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [blas_src]) or by setting the BLAS_SRC environment variable. if self._calc_info(blas): C:\pypy_stuff\numpy\numpy\distutils\system_info.py:1849: UserWarning: Lapack (http://www.netlib.org/lapack/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [lapack]) or by setting the LAPACK environment variable. return getattr(self, '_calc_info_{}'.format(name))() C:\pypy_stuff\numpy\numpy\distutils\system_info.py:1849: UserWarning: Lapack (http://www.netlib.org/lapack/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [lapack_src]) or by setting the LAPACK_SRC environment variable. return getattr(self, '_calc_info_{}'.format(name))() Warning: attempted relative import with no known parent package C:\pypy_stuff\Python38\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'define_macros' warnings.warn(msg) _simd.dispatch.avx512_skx.c numpy\core\src\_simd\_simd.dispatch.c.src(425): error C2220: warning treated as error - no 'object' file generated numpy\core\src\_simd\_simd.dispatch.c.src(425): warning C4244: 'initializing': conversion from '__mmask16' to 'npyv_b64', possible loss of data numpy\core\src\_simd\_simd.dispatch.c.src(426): warning C4244: 'initializing': conversion from '__mmask16' to 'npyv_b64', possible loss of data numpy\core\src\_simd\_simd.dispatch.c.src(427): warning C4244: 'initializing': conversion from '__mmask16' to 'npyv_b64', possible loss of data numpy\core\src\_simd\_simd.dispatch.c.src(428): warning C4244: 'initializing': conversion from '__mmask16' to 'npyv_b64', possible loss of data ########### EXT COMPILER OPTIMIZATION ########### Platform : Architecture: x64 Compiler : msvc CPU baseline : Requested : 'min' Enabled : SSE SSE2 SSE3 Flags : none Extra checks: none CPU dispatch : Requested : 'max -xop -fma4' Enabled : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL Generated : : SSE41 : SSE SSE2 SSE3 SSSE3 Flags : Extra checks: none Detect : SSE SSE2 SSE3 SSSE3 SSE41 : numpy\core\src\umath\_umath_tests.dispatch.c : SSE42 : SSE SSE2 SSE3 SSSE3 SSE41 POPCNT Flags : Extra checks: none Detect : SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42 : build\src.win-amd64-3.8\numpy\core\src\_simd\_simd.dispatch.c : AVX2 : SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 Flags : /arch:AVX2 Extra checks: none Detect : AVX F16C FMA3 AVX2 : build\src.win-amd64-3.8\numpy\core\src\umath\loops_arithm_fp.dispatch.c : build\src.win-amd64-3.8\numpy\core\src\umath\loops_trigonometric.dispatch.c : numpy\core\src\umath\_umath_tests.dispatch.c : build\src.win-amd64-3.8\numpy\core\src\_simd\_simd.dispatch.c : AVX512F : SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512CD AVX512_SKX Flags : /arch:AVX512 Extra checks: none Detect : AVX512_SKX : build\src.win-amd64-3.8\numpy\core\src\umath\loops_arithm_fp.dispatch.c : build\src.win-amd64-3.8\numpy\core\src\umath\loops_trigonometric.dispatch.c : AVX512_SKX : SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD Flags : /arch:AVX512 Extra checks: AVX512BW_MASK Detect : AVX512_SKX : build\src.win-amd64-3.8\numpy\core\src\_simd\_simd.dispatch.c CCompilerOpt._cache_write[796] : write cache to path -&gt; C:\pypy_stuff\numpy\build\temp.win-amd64-3.8\Release\ccompiler_opt_cache_ext.py ########### CLIB COMPILER OPTIMIZATION ########### Platform : Architecture: x64 Compiler : msvc CPU baseline : Requested : 'min' Enabled : SSE SSE2 SSE3 Flags : none Extra checks: none CPU dispatch : Requested : 'max -xop -fma4' Enabled : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL Generated : none CCompilerOpt._cache_write[796] : write cache to path -&gt; C:\pypy_stuff\numpy\build\temp.win-amd64-3.8\ccompiler_opt_cache_clib.py error: Command &quot;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild\src.win-amd64-3.8\numpy\core\src\_simd -Inumpy\core\include -Ibuild\src.win-amd64-3.8\numpy\core\include/numpy -Ibuild\src.win-amd64-3.8\numpy\distutils\include -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\pypy_stuff\Python38\include -IC:\pypy_stuff\Python38\include -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt /Tcbuild\src.win-amd64-3.8\numpy\core\src\_simd\_simd.dispatch.avx512_skx.c /Fobuild\temp.win-amd64-3.8\Release\build\src.win-amd64-3.8\numpy\core\src\_simd\_simd.dispatch.avx512_skx.obj /WX /arch:AVX512&quot; failed with exit status 2"><pre class="notranslate"><code class="notranslate">C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild\src.win-amd64-3.8\numpy\core\src\_simd -Inumpy\core\include -Ibuild\src.win-amd64-3.8\numpy\core\include/numpy -Ibuild\src.win-amd64-3.8\numpy\distutils\include -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\pypy_stuff\Python38\include -IC:\pypy_stuff\Python38\include -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt /Tcbuild\src.win-amd64-3.8\numpy\core\src\_simd\_simd.dispatch.avx512_skx.c /Fobuild\temp.win-amd64-3.8\Release\build\src.win-amd64-3.8\numpy\core\src\_simd\_simd.dispatch.avx512_skx.obj /WX /arch:AVX512 Running from numpy source directory. C:\pypy_stuff\numpy\numpy\distutils\system_info.py:1989: UserWarning: Optimized (vendor) Blas libraries are not found. Falls back to netlib Blas library which has worse performance. A better performance should be easily gained by switching Blas library. if self._calc_info(blas): C:\pypy_stuff\numpy\numpy\distutils\system_info.py:1989: UserWarning: Blas (http://www.netlib.org/blas/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [blas]) or by setting the BLAS environment variable. if self._calc_info(blas): C:\pypy_stuff\numpy\numpy\distutils\system_info.py:1989: UserWarning: Blas (http://www.netlib.org/blas/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [blas_src]) or by setting the BLAS_SRC environment variable. if self._calc_info(blas): C:\pypy_stuff\numpy\numpy\distutils\system_info.py:1849: UserWarning: Lapack (http://www.netlib.org/lapack/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [lapack]) or by setting the LAPACK environment variable. return getattr(self, '_calc_info_{}'.format(name))() C:\pypy_stuff\numpy\numpy\distutils\system_info.py:1849: UserWarning: Lapack (http://www.netlib.org/lapack/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [lapack_src]) or by setting the LAPACK_SRC environment variable. return getattr(self, '_calc_info_{}'.format(name))() Warning: attempted relative import with no known parent package C:\pypy_stuff\Python38\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'define_macros' warnings.warn(msg) _simd.dispatch.avx512_skx.c numpy\core\src\_simd\_simd.dispatch.c.src(425): error C2220: warning treated as error - no 'object' file generated numpy\core\src\_simd\_simd.dispatch.c.src(425): warning C4244: 'initializing': conversion from '__mmask16' to 'npyv_b64', possible loss of data numpy\core\src\_simd\_simd.dispatch.c.src(426): warning C4244: 'initializing': conversion from '__mmask16' to 'npyv_b64', possible loss of data numpy\core\src\_simd\_simd.dispatch.c.src(427): warning C4244: 'initializing': conversion from '__mmask16' to 'npyv_b64', possible loss of data numpy\core\src\_simd\_simd.dispatch.c.src(428): warning C4244: 'initializing': conversion from '__mmask16' to 'npyv_b64', possible loss of data ########### EXT COMPILER OPTIMIZATION ########### Platform : Architecture: x64 Compiler : msvc CPU baseline : Requested : 'min' Enabled : SSE SSE2 SSE3 Flags : none Extra checks: none CPU dispatch : Requested : 'max -xop -fma4' Enabled : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL Generated : : SSE41 : SSE SSE2 SSE3 SSSE3 Flags : Extra checks: none Detect : SSE SSE2 SSE3 SSSE3 SSE41 : numpy\core\src\umath\_umath_tests.dispatch.c : SSE42 : SSE SSE2 SSE3 SSSE3 SSE41 POPCNT Flags : Extra checks: none Detect : SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42 : build\src.win-amd64-3.8\numpy\core\src\_simd\_simd.dispatch.c : AVX2 : SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 Flags : /arch:AVX2 Extra checks: none Detect : AVX F16C FMA3 AVX2 : build\src.win-amd64-3.8\numpy\core\src\umath\loops_arithm_fp.dispatch.c : build\src.win-amd64-3.8\numpy\core\src\umath\loops_trigonometric.dispatch.c : numpy\core\src\umath\_umath_tests.dispatch.c : build\src.win-amd64-3.8\numpy\core\src\_simd\_simd.dispatch.c : AVX512F : SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512CD AVX512_SKX Flags : /arch:AVX512 Extra checks: none Detect : AVX512_SKX : build\src.win-amd64-3.8\numpy\core\src\umath\loops_arithm_fp.dispatch.c : build\src.win-amd64-3.8\numpy\core\src\umath\loops_trigonometric.dispatch.c : AVX512_SKX : SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD Flags : /arch:AVX512 Extra checks: AVX512BW_MASK Detect : AVX512_SKX : build\src.win-amd64-3.8\numpy\core\src\_simd\_simd.dispatch.c CCompilerOpt._cache_write[796] : write cache to path -&gt; C:\pypy_stuff\numpy\build\temp.win-amd64-3.8\Release\ccompiler_opt_cache_ext.py ########### CLIB COMPILER OPTIMIZATION ########### Platform : Architecture: x64 Compiler : msvc CPU baseline : Requested : 'min' Enabled : SSE SSE2 SSE3 Flags : none Extra checks: none CPU dispatch : Requested : 'max -xop -fma4' Enabled : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL Generated : none CCompilerOpt._cache_write[796] : write cache to path -&gt; C:\pypy_stuff\numpy\build\temp.win-amd64-3.8\ccompiler_opt_cache_clib.py error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild\src.win-amd64-3.8\numpy\core\src\_simd -Inumpy\core\include -Ibuild\src.win-amd64-3.8\numpy\core\include/numpy -Ibuild\src.win-amd64-3.8\numpy\distutils\include -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\pypy_stuff\Python38\include -IC:\pypy_stuff\Python38\include -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt /Tcbuild\src.win-amd64-3.8\numpy\core\src\_simd\_simd.dispatch.avx512_skx.c /Fobuild\temp.win-amd64-3.8\Release\build\src.win-amd64-3.8\numpy\core\src\_simd\_simd.dispatch.avx512_skx.obj /WX /arch:AVX512" failed with exit status 2 </code></pre></div></details>
<p dir="auto">This would probably help with SEO pointing to the new docs site.</p> <p dir="auto">As it is, a lot of links are now pointing at stale 1.17 docs, without the reader really being aware that they're looking in the wrong place.</p> <p dir="auto">I'm not sure exactly how <code class="notranslate">docs.scipy.org</code> is hosted, but one option might just be to add something like this to a <code class="notranslate">.htaccess</code>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Redirect 301 /doc/numpy/ https://numpy.org/doc/1.17/"><pre class="notranslate"><code class="notranslate">Redirect 301 /doc/numpy/ https://numpy.org/doc/1.17/ </code></pre></div>
0
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8758457/52703240-da08ab80-2fb8-11e9-8a74-0ad59060358d.png"><img src="https://user-images.githubusercontent.com/8758457/52703240-da08ab80-2fb8-11e9-8a74-0ad59060358d.png" alt="image" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8758457/52703293-03293c00-2fb9-11e9-9991-3ab54a123bbe.png"><img src="https://user-images.githubusercontent.com/8758457/52703293-03293c00-2fb9-11e9-9991-3ab54a123bbe.png" alt="image" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8758457/52703337-1cca8380-2fb9-11e9-8940-c1c0065ff132.png"><img src="https://user-images.githubusercontent.com/8758457/52703337-1cca8380-2fb9-11e9-8940-c1c0065ff132.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">dubbo-registry-nacos 0.0.2 + org.apache.dubbo 2.7.0<br> dubbo-registry-nacos 0.0.2 required com.alibaba.dubbo.registry.support.AbstractRegistryFactory<br> but in org.apache.dubbo 2.7.0 jar found org.apache.dubbo.registry.support.AbstractRegistryFactory</p>
<p dir="auto">dubbo 2.6.5 + nacos0.0.2 报错<br> Exception in thread "main" java.lang.IllegalStateException: Failed to load extension class(interface: interface com.alibaba.dubbo.registry.RegistryFactory, class line: com.alibaba.dubbo.registry.nacos.NacosRegistryFactory)</p> <p dir="auto">目录结构还是有问题</p> <p dir="auto">换成最新的2.7.1版本<br> 无法注册成功<br> java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance after all servers([127.0.0.1:8848]) tried: failed to req API:<a href="http://127.0.0.1:8848/nacos/v1/ns/instance" rel="nofollow">http://127.0.0.1:8848/nacos/v1/ns/instance</a>. code:400 msg: dom not found: DEFAULT_GROUP@<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/providers/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/providers">@providers</a>:com.orange.service.DemoService</p>
1
<p dir="auto"><strong>UPD</strong> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="464857873" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/14705" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/14705/hovercard" href="https://github.com/matplotlib/matplotlib/pull/14705">#14705</a> fixes this issue</p> <p dir="auto">Unfortunately I can't provide a full MWE at this moment (I'll try to find time and update with code), but I thought reporting will still be good anyway.</p> <p dir="auto">I want to use cyrillic text ticks in order to debug a speech recognition system. I plot either the top-1 character prediction or top-2. I use mutli-line ticks in order to plot two character predictions. In top-2 mode the labels get cut off, including the label that's on the first line.</p> <p dir="auto">When top-1 prediction is plotted:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1041752/67884763-a8d00b80-fb46-11e9-8f6b-a13f120758e1.png"><img src="https://user-images.githubusercontent.com/1041752/67884763-a8d00b80-fb46-11e9-8f6b-a13f120758e1.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">When top-2 predictions are plotted (note the cut-off labels).<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1041752/67884776-ae2d5600-fb46-11e9-9c0e-88dd98ec332c.png"><img src="https://user-images.githubusercontent.com/1041752/67884776-ae2d5600-fb46-11e9-9c0e-88dd98ec332c.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">The labels are not affected by any randomness, the only difference is using ticks of 1 character or 3 characters (counting the newline character). Essentially I'd use an appropriate <code class="notranslate">rotation</code> mode if it existed.</p> <p dir="auto">Potentially related issue with a MWE: <a href="https://stackoverflow.com/questions/53942480/how-can-i-change-the-text-direction-of-tick-labels-in-matplotlib" rel="nofollow">https://stackoverflow.com/questions/53942480/how-can-i-change-the-text-direction-of-tick-labels-in-matplotlib</a></p>
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">Similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="50689483" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/3872" data-hovercard-type="issue" data-hovercard-url="/matplotlib/matplotlib/issues/3872/hovercard" href="https://github.com/matplotlib/matplotlib/issues/3872">#3872</a></p> <p dir="auto"><strong>Code for reproduction</strong></p> <p dir="auto">I can't attach a CSV or an .ipynb, but I'll zip them up together and attach that.<br> <a href="https://github.com/matplotlib/matplotlib/files/3980465/span_where.zip">span_where.zip</a></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="collection = collections.BrokenBarHCollection.span_where(df.index,ymin=0,ymax=df['numeric_col'].max(), where=df['bool_col']==True, facecolor='g', edgecolor='red', linewidth=2.0, linestyle='--', alpha=0.2, label='span') axes.add_collection(collection)"><pre class="notranslate"><span class="pl-s1">collection</span> <span class="pl-c1">=</span> <span class="pl-s1">collections</span>.<span class="pl-v">BrokenBarHCollection</span>.<span class="pl-en">span_where</span>(<span class="pl-s1">df</span>.<span class="pl-s1">index</span>,<span class="pl-s1">ymin</span><span class="pl-c1">=</span><span class="pl-c1">0</span>,<span class="pl-s1">ymax</span><span class="pl-c1">=</span><span class="pl-s1">df</span>[<span class="pl-s">'numeric_col'</span>].<span class="pl-en">max</span>(), <span class="pl-s1">where</span><span class="pl-c1">=</span><span class="pl-s1">df</span>[<span class="pl-s">'bool_col'</span>]<span class="pl-c1">==</span><span class="pl-c1">True</span>, <span class="pl-s1">facecolor</span><span class="pl-c1">=</span><span class="pl-s">'g'</span>, <span class="pl-s1">edgecolor</span><span class="pl-c1">=</span><span class="pl-s">'red'</span>, <span class="pl-s1">linewidth</span><span class="pl-c1">=</span><span class="pl-c1">2.0</span>, <span class="pl-s1">linestyle</span><span class="pl-c1">=</span><span class="pl-s">'--'</span>, <span class="pl-s1">alpha</span><span class="pl-c1">=</span><span class="pl-c1">0.2</span>, <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">'span'</span>) <span class="pl-s1">axes</span>.<span class="pl-en">add_collection</span>(<span class="pl-s1">collection</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="--------------------------------------------------------------------------- TypeError Traceback (most recent call last) &lt;ipython-input-9-264dcc0313f6&gt; in &lt;module&gt; 6 linewidth=2.0, linestyle='--', 7 alpha=0.2, ----&gt; 8 label='span') 9 axes.add_collection(collection) /opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/collections.py in span_where(x, ymin, ymax, where, **kwargs) 1131 1132 collection = BrokenBarHCollection( -&gt; 1133 xranges, [ymin, ymax - ymin], **kwargs) 1134 return collection 1135 /opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/collections.py in __init__(self, xranges, yrange, **kwargs) 1111 (xmin + xwidth, ymin), 1112 (xmin, ymin)] for xmin, xwidth in xranges] -&gt; 1113 PolyCollection.__init__(self, verts, **kwargs) 1114 1115 @staticmethod /opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/collections.py in __init__(self, verts, sizes, closed, **kwargs) 1044 Collection.__init__(self, **kwargs) 1045 self.set_sizes(sizes) -&gt; 1046 self.set_verts(verts, closed) 1047 self.stale = True 1048 /opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/collections.py in set_verts(self, verts, closed) 1065 codes[0] = mpath.Path.MOVETO 1066 codes[-1] = mpath.Path.CLOSEPOLY -&gt; 1067 self._paths.append(mpath.Path(xy, codes)) 1068 else: 1069 self._paths.append(mpath.Path(xy)) /opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/path.py in __init__(self, vertices, codes, _interpolation_steps, closed, readonly) 125 and codes as read-only arrays. 126 &quot;&quot;&quot; --&gt; 127 vertices = _to_unmasked_float_array(vertices) 128 if vertices.ndim != 2 or vertices.shape[1] != 2: 129 raise ValueError( /opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/cbook/__init__.py in _to_unmasked_float_array(x) 1388 return np.ma.asarray(x, float).filled(np.nan) 1389 else: -&gt; 1390 return np.asarray(x, float) 1391 1392 /opt/anaconda3/envs/eda/lib/python3.7/site-packages/numpy/core/_asarray.py in asarray(a, dtype, order) 83 84 &quot;&quot;&quot; ---&gt; 85 return array(a, dtype, copy=False, order=order) 86 87 TypeError: float() argument must be a string or a number, not 'Timestamp'"><pre class="notranslate"><code class="notranslate">--------------------------------------------------------------------------- TypeError Traceback (most recent call last) &lt;ipython-input-9-264dcc0313f6&gt; in &lt;module&gt; 6 linewidth=2.0, linestyle='--', 7 alpha=0.2, ----&gt; 8 label='span') 9 axes.add_collection(collection) /opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/collections.py in span_where(x, ymin, ymax, where, **kwargs) 1131 1132 collection = BrokenBarHCollection( -&gt; 1133 xranges, [ymin, ymax - ymin], **kwargs) 1134 return collection 1135 /opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/collections.py in __init__(self, xranges, yrange, **kwargs) 1111 (xmin + xwidth, ymin), 1112 (xmin, ymin)] for xmin, xwidth in xranges] -&gt; 1113 PolyCollection.__init__(self, verts, **kwargs) 1114 1115 @staticmethod /opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/collections.py in __init__(self, verts, sizes, closed, **kwargs) 1044 Collection.__init__(self, **kwargs) 1045 self.set_sizes(sizes) -&gt; 1046 self.set_verts(verts, closed) 1047 self.stale = True 1048 /opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/collections.py in set_verts(self, verts, closed) 1065 codes[0] = mpath.Path.MOVETO 1066 codes[-1] = mpath.Path.CLOSEPOLY -&gt; 1067 self._paths.append(mpath.Path(xy, codes)) 1068 else: 1069 self._paths.append(mpath.Path(xy)) /opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/path.py in __init__(self, vertices, codes, _interpolation_steps, closed, readonly) 125 and codes as read-only arrays. 126 """ --&gt; 127 vertices = _to_unmasked_float_array(vertices) 128 if vertices.ndim != 2 or vertices.shape[1] != 2: 129 raise ValueError( /opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/cbook/__init__.py in _to_unmasked_float_array(x) 1388 return np.ma.asarray(x, float).filled(np.nan) 1389 else: -&gt; 1390 return np.asarray(x, float) 1391 1392 /opt/anaconda3/envs/eda/lib/python3.7/site-packages/numpy/core/_asarray.py in asarray(a, dtype, order) 83 84 """ ---&gt; 85 return array(a, dtype, copy=False, order=order) 86 87 TypeError: float() argument must be a string or a number, not 'Timestamp' </code></pre></div> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto">this works:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="axes = df['numeric_col'].plot() axes.fill_between(df.index,0,df['numeric_col'].max(),where=df['bool_col']==False, interpolate=True, color='lightskyblue')"><pre class="notranslate"><span class="pl-s1">axes</span> <span class="pl-c1">=</span> <span class="pl-s1">df</span>[<span class="pl-s">'numeric_col'</span>].<span class="pl-en">plot</span>() <span class="pl-s1">axes</span>.<span class="pl-en">fill_between</span>(<span class="pl-s1">df</span>.<span class="pl-s1">index</span>,<span class="pl-c1">0</span>,<span class="pl-s1">df</span>[<span class="pl-s">'numeric_col'</span>].<span class="pl-en">max</span>(),<span class="pl-s1">where</span><span class="pl-c1">=</span><span class="pl-s1">df</span>[<span class="pl-s">'bool_col'</span>]<span class="pl-c1">==</span><span class="pl-c1">False</span>, <span class="pl-s1">interpolate</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s">'lightskyblue'</span>)</pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5185401/71121883-323daa80-2194-11ea-97a8-5f069d03eabd.png"><img src="https://user-images.githubusercontent.com/5185401/71121883-323daa80-2194-11ea-97a8-5f069d03eabd.png" alt="Screen Shot 2019-12-17 at 5 39 52 PM" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li> <p dir="auto">Operating system: Mac OS 10.14.6</p> </li> <li> <p dir="auto">Matplotlib version: 3.1.1</p> </li> <li> <p dir="auto">Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): module://ipykernel.pylab.backend_inline</p> </li> <li> <p dir="auto">Python version: python 3.7.5</p> </li> <li> <p dir="auto">Jupyter version (if applicable):<br> jupyter 1.0.0 py37_7<br> jupyter_client 5.3.4 py37_0<br> jupyter_console 6.0.0 py37_0<br> jupyter_core 4.6.1 py37_0</p> </li> <li> <p dir="auto">Other libraries:<br> pandas 0.25.3</p> </li> </ul> <p dir="auto">installed with conda</p> <p dir="auto">conda default channel</p>
0
<h5 dir="auto">System information (version)</h5> <ul dir="auto"> <li>OpenCV =&gt; <code class="notranslate">3.4</code></li> <li>Operating System / Platform =&gt; <code class="notranslate">Android x86 and Android x86_64</code></li> <li>Compiler =&gt; <code class="notranslate">Android NDK GCC</code></li> </ul> <h5 dir="auto">Detailed description</h5> <p dir="auto">Link ipp library error.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error:error: opencv/sdk/native/3rdparty/libs/x86/libippicv.a(jmp_icvippsSortRadixIndexAscend_32f_as.s.o): relocation R_386_GOTOFF against preemptible symbol icv_ippJumpIndexForMergedLibs cannot be used when making a shared object Error:error: opencv/sdk/native/3rdparty/libs/x86/libippicv.a(jmp_icvippiNormDiff_L2_32f_C1MR_as.s.o): relocation R_386_GOTOFF against preemptible symbol icv_ippJumpIndexForMergedLibs cannot be used when making a shared object Error:error: opencv/sdk/native/3rdparty/libs/x86/libippicv.a(jmp_icvippiSqrDistanceNormGetBufferSize_as.s.o): relocation R_386_GOTOFF against preemptible symbol icv_ippJumpIndexForMergedLibs cannot be used when making a shared object More...."><pre class="notranslate"><code class="notranslate">Error:error: opencv/sdk/native/3rdparty/libs/x86/libippicv.a(jmp_icvippsSortRadixIndexAscend_32f_as.s.o): relocation R_386_GOTOFF against preemptible symbol icv_ippJumpIndexForMergedLibs cannot be used when making a shared object Error:error: opencv/sdk/native/3rdparty/libs/x86/libippicv.a(jmp_icvippiNormDiff_L2_32f_C1MR_as.s.o): relocation R_386_GOTOFF against preemptible symbol icv_ippJumpIndexForMergedLibs cannot be used when making a shared object Error:error: opencv/sdk/native/3rdparty/libs/x86/libippicv.a(jmp_icvippiSqrDistanceNormGetBufferSize_as.s.o): relocation R_386_GOTOFF against preemptible symbol icv_ippJumpIndexForMergedLibs cannot be used when making a shared object More.... </code></pre></div> <h5 dir="auto">Steps to reproduce</h5> <p dir="auto">Downlod <a href="https://sourceforge.net/projects/opencvlibrary/files/opencv-android/3.4.0/opencv-3.4.0-android-sdk.zip/download" rel="nofollow"> OpenCV for Android SDK 3.4. 0 </a></p> <p dir="auto">Extract it to your project, and write cmake:</p> <div class="highlight highlight-source-cmake notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="cmake_minimum_required(VERSION 3.6) set ( OpenCV_DIR &quot;../opencv/sdk/native/jni&quot;) find_package ( OpenCV REQUIRED ) include_directories ( ${OpenCV_INCLUDE_DIRS} ) add_library( image_analyze SHARED # Provides a relative path to your source file(s). src/main/cpp/image_analyze.cpp src/main/cpp/pattern_recognition.cpp src/main/cpp/pretreatment.cpp ) target_link_libraries( image_analyze ${OpenCV_LIBS} )"><pre class="notranslate"><span class="pl-c1">cmake_minimum_required</span>(<span class="pl-k">VERSION</span> 3.6) <span class="pl-c1">set</span> ( OpenCV_DIR <span class="pl-s">"../opencv/sdk/native/jni"</span>) <span class="pl-c1">find_package</span> ( OpenCV <span class="pl-k">REQUIRED</span> ) <span class="pl-c1">include_directories</span> ( <span class="pl-smi">${OpenCV_INCLUDE_DIRS}</span> ) <span class="pl-c1">add_library</span>( image_analyze <span class="pl-k">SHARED</span> <span class="pl-c"><span class="pl-c">#</span> Provides a relative path to your source file(s).</span> src/main/cpp/image_analyze.cpp src/main/cpp/pattern_recognition.cpp src/main/cpp/pretreatment.cpp ) <span class="pl-c1">target_link_libraries</span>( image_analyze <span class="pl-smi">${OpenCV_LIBS}</span> )</pre></div> <p dir="auto">Then build, when link to the ippicv wiil be failed!</p>
<h5 dir="auto">System information (version)</h5> <ul dir="auto"> <li>OpenCV =&gt; 3.3.0</li> <li>Operating System / Platform =&gt; Android x86/x86_64</li> <li>Compiler =&gt; Android toolchain (OpenCV binaries downloaded from github 3.3.0/3.3.1 release, My binary built from Android Studio, ndk-bundle-16.0.4442984 darwin-x86_64-gcc-i686-linux-android-4.9.x)</li> </ul> <h5 dir="auto">Detailed description</h5> <p dir="auto">Can no longer link application for x86 or x86_64, get <code class="notranslate">relocation R_386_GOTOFF against preemptible symbol</code> in symbols from <code class="notranslate">libippiw.a</code> and <code class="notranslate">libippicw.a</code>. Rebuilding OpenCV for Android without IPP support fixes the problem. IPP are only used on x86/x86_64 so this is not a problem for arm builds, but the x86 builds are useful for debugging on HAX accelerated emulator.</p> <p dir="auto">Problem appeared after Android ndk upgrade (don't know my old version). The IPP binaries seems to be a binary only release compiled by Intel so I can't test rebuilding those libraries, otherwise searching the net suggests that the binaries should be compiled with <code class="notranslate">-fPIC</code> to fix this issue.</p>
1
<h1 dir="auto">Bug report</h1> <p dir="auto"><strong>What is the current behavior?</strong><br> i want modify vue source in webpack</p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const Dependency = require('webpack/lib/Dependency'); class MyDependency extends Dependency { // Use the constructor to save any information you need for later constructor(module) { super(); this.module = module; } } MyDependency.Template = class MyDependencyTemplate { apply(dep, source) { // dep is the MyDependency instance, so the module is dep.module source.replace(0, source.source().length - 1, source.source() ) } }; module.exports = class MyPlugin { apply(compiler) { compiler.hooks.compilation.tap('MyPluginName', compilation =&gt; { compilation.dependencyTemplates.set( MyDependency, new MyDependency.Template() ); compilation.hooks.buildModule.tap('MyPluginName', module =&gt; { module.addDependency(new MyDependency(module)); }); }); } };"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-v">Dependency</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'webpack/lib/Dependency'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">class</span> <span class="pl-v">MyDependency</span> <span class="pl-k">extends</span> <span class="pl-v">Dependency</span> <span class="pl-kos">{</span> <span class="pl-c">// Use the constructor to save any information you need for later</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">module</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">super</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">module</span> <span class="pl-c1">=</span> <span class="pl-s1">module</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-v">MyDependency</span><span class="pl-kos">.</span><span class="pl-c1">Template</span> <span class="pl-c1">=</span> <span class="pl-k">class</span> <span class="pl-v">MyDependencyTemplate</span> <span class="pl-kos">{</span> <span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-s1">dep</span><span class="pl-kos">,</span> <span class="pl-s1">source</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// dep is the MyDependency instance, so the module is dep.module</span> <span class="pl-s1">source</span><span class="pl-kos">.</span><span class="pl-en">replace</span><span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-s1">source</span><span class="pl-kos">.</span><span class="pl-en">source</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">length</span> <span class="pl-c1">-</span> <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-s1">source</span><span class="pl-kos">.</span><span class="pl-en">source</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-k">class</span> <span class="pl-v">MyPlugin</span> <span class="pl-kos">{</span> <span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-s1">compiler</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">compiler</span><span class="pl-kos">.</span><span class="pl-c1">hooks</span><span class="pl-kos">.</span><span class="pl-c1">compilation</span><span class="pl-kos">.</span><span class="pl-en">tap</span><span class="pl-kos">(</span><span class="pl-s">'MyPluginName'</span><span class="pl-kos">,</span> <span class="pl-s1">compilation</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-s1">compilation</span><span class="pl-kos">.</span><span class="pl-c1">dependencyTemplates</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span> <span class="pl-v">MyDependency</span><span class="pl-kos">,</span> <span class="pl-k">new</span> <span class="pl-v">MyDependency</span><span class="pl-kos">.</span><span class="pl-c1">Template</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">compilation</span><span class="pl-kos">.</span><span class="pl-c1">hooks</span><span class="pl-kos">.</span><span class="pl-c1">buildModule</span><span class="pl-kos">.</span><span class="pl-en">tap</span><span class="pl-kos">(</span><span class="pl-s">'MyPluginName'</span><span class="pl-kos">,</span> <span class="pl-smi">module</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-en">addDependency</span><span class="pl-kos">(</span><span class="pl-k">new</span> <span class="pl-v">MyDependency</span><span class="pl-kos">(</span><span class="pl-smi">module</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><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>What is the expected behavior?</strong><br> I can replace all code in Source<br> because Code I need to convert Babel conversion</p> <p dir="auto"><strong>Other relevant information:</strong><br> webpack version: 4.46.4<br> Node.js version: v16.5.0<br> Operating System: mac<br> Additional tools: vscode</p>
<h2 dir="auto">Feature request</h2> <p dir="auto"><strong>What is the expected behavior?</strong><br> Be able to intercept async load failures and retry by recreating the script tag with cache busted url</p> <p dir="auto"><strong>What is motivation or use case for adding/changing the behavior?</strong><br> We found that retrying the download with the use of cache busting params is very effective, and we could not find a way to utilize it correctly. existing plugins replace the jsonp loading code which is not possible with version 5, causing the need to duplicate the logic and patch it to use the duplicated code instead of the original</p> <p dir="auto"><strong>How should this be implemented in your opinion?</strong><br> Either expose a way to be able to add search params for the purpose of cache busing in user land. or add a hook to augment the <code class="notranslate">loadingEnded</code> function in jsonp runtime</p> <p dir="auto"><strong>Are you willing to work on this yourself?</strong><br> yes, with guidance from a contributer</p>
0
<p dir="auto">Hello! The Chef cookbook for Elasticsearch has received a bug report regarding the packaging of ES, specifically the init scripts and status reporting. Here's the actual report: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="163777422" data-permission-text="Title is private" data-url="https://github.com/sous-chefs/elasticsearch/issues/483" data-hovercard-type="issue" data-hovercard-url="/sous-chefs/elasticsearch/issues/483/hovercard" href="https://github.com/sous-chefs/elasticsearch/issues/483">sous-chefs/elasticsearch#483</a></p> <p dir="auto">In short, the user is seeing the init script for Ubuntu 14.04 report "OK" when starting Elasticsearch, even though parsing of the YAML configuration file has failed. Perhaps Elasticsearch needs a 'configtest' akin to the way Apache and Nginx have implemented it, or perhaps the init script just needs improvement to catch when Elasticsearch has exited or failed to start.</p> <p dir="auto"><strong>Elasticsearch version</strong>: 2.3.3<br> <strong>JVM version</strong>: 1.8.0_91<br> <strong>OS version</strong>: ubuntu 14.04</p> <p dir="auto"><strong>Steps to reproduce</strong>:</p> <ol dir="auto"> <li>Add <code class="notranslate">http.cors.allow-origin: *</code> to elasticsearch.yml</li> <li>Attempt to start the service</li> </ol> <p dir="auto"><strong>Provide logs (if relevant)</strong>:<br> The user reporting the issue found this in his logs:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Exception in thread &quot;main&quot; SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: ScannerException[while scanning an alias in 'reader', line 41, column 25: http.cors.allow-origin: * ^ expected alphabetic or numeric character, but found but found in 'reader', line 41, column 26: http.cors.allow-origin: * ^ ]; Likely root cause: while scanning an alias in 'reader', line 41, column 25: http.cors.allow-origin: * ^"><pre class="notranslate"><code class="notranslate">Exception in thread "main" SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: ScannerException[while scanning an alias in 'reader', line 41, column 25: http.cors.allow-origin: * ^ expected alphabetic or numeric character, but found but found in 'reader', line 41, column 26: http.cors.allow-origin: * ^ ]; Likely root cause: while scanning an alias in 'reader', line 41, column 25: http.cors.allow-origin: * ^ </code></pre></div>
<p dir="auto">On ubuntu 14.04 for Elasticsearch 1.7.0 debian package,<br> If we start twice elasticsearch very shortly, the pidofproc function doesn't return the PID of the first elasticsearch.<br> So 2 elasticsearch can be started at the same time. In my case this causes an OOM trigger.</p> <p dir="auto">How to reproduce:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# service elasticsearch stop # service elasticsearch start; service elasticsearch start; "><pre class="notranslate"><code class="notranslate"># service elasticsearch stop # service elasticsearch start; service elasticsearch start; </code></pre></div>
1
<p dir="auto">To me it's looks like JSX is JS+ and Intellisense should work at least like what it does in JS but in practice it doesn't.</p>
<p dir="auto">I think it is not expect behaviour. Other keyword like <code class="notranslate">if</code> <code class="notranslate">else</code> <code class="notranslate">return</code> <code class="notranslate">while</code> even <code class="notranslate">true</code> <code class="notranslate">false</code> <code class="notranslate">null</code> is highlighted but <code class="notranslate">function</code> and <code class="notranslate">var</code> is not</p> <p dir="auto">Is it a bug or you have any reason to?</p> <p dir="auto">Also <code class="notranslate">require</code> should be highlighted too</p>
0
<p dir="auto">I have border<br> <a href="http://prntscr.com/8vc4j3" rel="nofollow">http://prntscr.com/8vc4j3</a></p>
<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-add-borders-around-your-elements" rel="nofollow">http://freecodecamp.com/challenges/waypoint-add-borders-around-your-elements</a> has an issue. "Give your image a border width of 10px doesn't work.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/589755355db80b2b5bf6cdc491c5d610e532d09c7608d3af7affbc40aee974ca/687474703a2f2f692e696d6775722e636f6d2f54635a366776372e706e67"><img src="https://camo.githubusercontent.com/589755355db80b2b5bf6cdc491c5d610e532d09c7608d3af7affbc40aee974ca/687474703a2f2f692e696d6775722e636f6d2f54635a366776372e706e67" data-canonical-src="http://i.imgur.com/TcZ6gv7.png" style="max-width: 100%;"></a></p>
1
<p dir="auto"><strong>When only use shardingsphere : sharding is OK (only choise one db and one table)</strong></p> <p dir="auto"><strong>When only use shardingsphere with seata : sharding is ERROR(Scan all db and table) like</strong><br> 15:16:15.370 INFO [main] ShardingSphere-SQL - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_0</code> LIMIT 1<br> 15:16:15.370 INFO [main] ShardingSphere-SQL - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_1</code> LIMIT 1<br> 15:16:15.370 INFO [main] ShardingSphere-SQL - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_2</code> LIMIT 1<br> 15:16:15.370 INFO [main] ShardingSphere-SQL - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_3</code> LIMIT 1<br> 15:16:15.370 INFO [main] ShardingSphere-SQL - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_4</code> LIMIT 1<br> 15:16:15.370 INFO [main] ShardingSphere-SQL - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_5</code> LIMIT 1<br> 15:16:15.370 INFO [main] ShardingSphere-SQL - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_6</code> LIMIT 1<br> 15:16:15.370 INFO [main] ShardingSphere-SQL - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_7</code> LIMIT 1<br> 15:16:15.370 INFO [main] ShardingSphere-SQL - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_8</code> LIMIT 1<br> 15:16:15.370 INFO [main] ShardingSphere-SQL - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_9</code> LIMIT 1<br> 15:16:15.371 INFO [main] ShardingSphere-SQL - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_10</code> LIMIT 1<br> ......<br> <strong><em>sharding-transaction-base-seata-at</em> It doesn't help.</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &lt;dependency&gt; &lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt; &lt;artifactId&gt;sharding-jdbc-spring-boot-starter&lt;/artifactId&gt; &lt;version&gt;4.1.1&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt; &lt;artifactId&gt;sharding-jdbc-spring-namespace&lt;/artifactId&gt; &lt;version&gt;4.1.1&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt; &lt;artifactId&gt;sharding-transaction-base-seata-at&lt;/artifactId&gt; &lt;version&gt;4.1.2&lt;/version&gt; &lt;/dependency&gt; notice :4.1.2 is my version be used for fix SeataATShardingTransactionManager can't read seata.conf &lt;dependency&gt; &lt;groupId&gt;io.seata&lt;/groupId&gt; &lt;artifactId&gt;seata-spring-boot-starter&lt;/artifactId&gt; &lt;version&gt;1.3.0&lt;/version&gt; &lt;/dependency&gt;"><pre class="notranslate"><code class="notranslate"> &lt;dependency&gt; &lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt; &lt;artifactId&gt;sharding-jdbc-spring-boot-starter&lt;/artifactId&gt; &lt;version&gt;4.1.1&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt; &lt;artifactId&gt;sharding-jdbc-spring-namespace&lt;/artifactId&gt; &lt;version&gt;4.1.1&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt; &lt;artifactId&gt;sharding-transaction-base-seata-at&lt;/artifactId&gt; &lt;version&gt;4.1.2&lt;/version&gt; &lt;/dependency&gt; notice :4.1.2 is my version be used for fix SeataATShardingTransactionManager can't read seata.conf &lt;dependency&gt; &lt;groupId&gt;io.seata&lt;/groupId&gt; &lt;artifactId&gt;seata-spring-boot-starter&lt;/artifactId&gt; &lt;version&gt;1.3.0&lt;/version&gt; &lt;/dependency&gt; </code></pre></div>
<p dir="auto">two kind of oracle batch insert didn't work.</p> <p dir="auto">version</p> <div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt; &lt;artifactId&gt;shardingsphere-jdbc-core-spring-boot-starter&lt;/artifactId&gt; &lt;version&gt;5.1.1&lt;/version&gt;"><pre class="notranslate">&lt;<span class="pl-ent">groupId</span>&gt;org.apache.shardingsphere&lt;/<span class="pl-ent">groupId</span>&gt; &lt;<span class="pl-ent">artifactId</span>&gt;shardingsphere-jdbc-core-spring-boot-starter&lt;/<span class="pl-ent">artifactId</span>&gt; &lt;<span class="pl-ent">version</span>&gt;5.1.1&lt;/<span class="pl-ent">version</span>&gt;</pre></div> <p dir="auto">testcase</p> <div class="highlight highlight-source-groovy notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" def &quot;testOracleInsertAll&quot;(){ when: &quot;insert all case 1&quot; def insert_all_sql = &quot;&quot;&quot; insert all into t_user( usename ) values ( ? ) select 1 from dual &quot;&quot;&quot; prepareStatement(insert_all_sql) then: thrown NullPointerException when: &quot;insert all case 2&quot; def insert_all_sql2 = &quot;&quot;&quot; insert into pager (PAG_ID,PAG_PARENT,PAG_NAME,PAG_ACTIVE) select ?, ?, ?, 1 from dual union all select ?, ?, ?, 1 from dual &quot;&quot;&quot; prepareStatement(insert_all_sql2) then: thrown ClassCastException } private void prepareStatement(def sql) { try (def connection = sqlSessionFactory.openSession().getConnection()) { connection.prepareStatement(sql) } } "><pre class="notranslate"> <span class="pl-k">def</span> <span class="pl-s"><span class="pl-pds">"</span>testOracleInsertAll<span class="pl-pds">"</span></span>(){ <span class="pl-c1">when</span>: <span class="pl-s"><span class="pl-pds">"</span>insert all case 1<span class="pl-pds">"</span></span> <span class="pl-k">def</span> insert_all_sql <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"""</span></span> <span class="pl-s">insert all into t_user( usename ) values ( ? ) select 1 from dual</span> <span class="pl-s"><span class="pl-pds">"""</span></span> prepareStatement(insert_all_sql) <span class="pl-c1">then</span>: thrown <span class="pl-k">NullPointerException</span> <span class="pl-c1">when</span>: <span class="pl-s"><span class="pl-pds">"</span>insert all case 2<span class="pl-pds">"</span></span> <span class="pl-k">def</span> insert_all_sql2 <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"""</span></span> <span class="pl-s">insert into pager (PAG_ID,PAG_PARENT,PAG_NAME,PAG_ACTIVE)</span> <span class="pl-s"> select ?, ?, ?, 1 from dual union all</span> <span class="pl-s"> select ?, ?, ?, 1 from dual</span> <span class="pl-s"><span class="pl-pds">"""</span></span> prepareStatement(insert_all_sql2) <span class="pl-c1">then</span>: thrown <span class="pl-k">ClassCastException</span> } <span class="pl-k">private</span> <span class="pl-k">void</span> <span class="pl-en">prepareStatement</span>(<span class="pl-k">def</span> <span class="pl-v">sql</span>) { <span class="pl-k">try</span> (<span class="pl-k">def</span> connection <span class="pl-k">=</span> sqlSessionFactory<span class="pl-k">.</span>openSession()<span class="pl-k">.</span>getConnection()) { connection<span class="pl-k">.</span>prepareStatement(sql) } } </pre></div> <p dir="auto">detail of exception</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Caused by: java.lang.NullPointerException at org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementContext.&lt;init&gt;(InsertStatementContext.java:94) at org.apache.shardingsphere.infra.binder.SQLStatementContextFactory.getDMLStatementContext(SQLStatementContextFactory.java:155) at org.apache.shardingsphere.infra.binder.SQLStatementContextFactory.newInstance(SQLStatementContextFactory.java:129) at org.apache.shardingsphere.infra.binder.SQLStatementContextFactory.newInstance(SQLStatementContextFactory.java:114) at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.&lt;init&gt;(ShardingSpherePreparedStatement.java:181) at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.&lt;init&gt;(ShardingSpherePreparedStatement.java:149) at org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection.prepareStatement(ShardingSphereConnection.java:80) Caused by: java.lang.ClassCastException: class org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to class org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.LiteralExpressionSegment (org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.ParameterMarkerExpressionSegment and org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.LiteralExpressionSegment are in unnamed module of loader 'app') at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.createProjection(OracleDMLStatementSQLVisitor.java:754) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectProjection(OracleDMLStatementSQLVisitor.java:700) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectProjection(OracleDMLStatementSQLVisitor.java:162) at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$SelectProjectionContext.accept(OracleStatementParser.java:10829) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectList(OracleDMLStatementSQLVisitor.java:670) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectList(OracleDMLStatementSQLVisitor.java:162) at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$SelectListContext.accept(OracleStatementParser.java:10507) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitQueryBlock(OracleDMLStatementSQLVisitor.java:503) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitQueryBlock(OracleDMLStatementSQLVisitor.java:162) at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$QueryBlockContext.accept(OracleStatementParser.java:4790) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectSubquery(OracleDMLStatementSQLVisitor.java:488) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectSubquery(OracleDMLStatementSQLVisitor.java:162) at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$SelectSubqueryContext.accept(OracleStatementParser.java:4501) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitInsertSingleTable(OracleDMLStatementSQLVisitor.java:188) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitInsertSingleTable(OracleDMLStatementSQLVisitor.java:162) at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$InsertSingleTableContext.accept(OracleStatementParser.java:1548) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitInsert(OracleDMLStatementSQLVisitor.java:173) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitInsert(OracleDMLStatementSQLVisitor.java:162) at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$InsertContext.accept(OracleStatementParser.java:1469) at org.apache.shardingsphere.sql.parser.api.SQLVisitorEngine.visit(SQLVisitorEngine.java:55) at org.apache.shardingsphere.infra.parser.sql.SQLStatementParserExecutor.parse(SQLStatementParserExecutor.java:48) at org.apache.shardingsphere.infra.parser.cache.SQLStatementCacheLoader.load(SQLStatementCacheLoader.java:41) at org.apache.shardingsphere.infra.parser.cache.SQLStatementCacheLoader.load(SQLStatementCacheLoader.java:30) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3533) at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2282) at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2159) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2049) ... 11 more"><pre lang="log" class="notranslate"><code class="notranslate">Caused by: java.lang.NullPointerException at org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementContext.&lt;init&gt;(InsertStatementContext.java:94) at org.apache.shardingsphere.infra.binder.SQLStatementContextFactory.getDMLStatementContext(SQLStatementContextFactory.java:155) at org.apache.shardingsphere.infra.binder.SQLStatementContextFactory.newInstance(SQLStatementContextFactory.java:129) at org.apache.shardingsphere.infra.binder.SQLStatementContextFactory.newInstance(SQLStatementContextFactory.java:114) at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.&lt;init&gt;(ShardingSpherePreparedStatement.java:181) at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.&lt;init&gt;(ShardingSpherePreparedStatement.java:149) at org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection.prepareStatement(ShardingSphereConnection.java:80) Caused by: java.lang.ClassCastException: class org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to class org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.LiteralExpressionSegment (org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.ParameterMarkerExpressionSegment and org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.LiteralExpressionSegment are in unnamed module of loader 'app') at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.createProjection(OracleDMLStatementSQLVisitor.java:754) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectProjection(OracleDMLStatementSQLVisitor.java:700) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectProjection(OracleDMLStatementSQLVisitor.java:162) at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$SelectProjectionContext.accept(OracleStatementParser.java:10829) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectList(OracleDMLStatementSQLVisitor.java:670) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectList(OracleDMLStatementSQLVisitor.java:162) at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$SelectListContext.accept(OracleStatementParser.java:10507) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitQueryBlock(OracleDMLStatementSQLVisitor.java:503) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitQueryBlock(OracleDMLStatementSQLVisitor.java:162) at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$QueryBlockContext.accept(OracleStatementParser.java:4790) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectSubquery(OracleDMLStatementSQLVisitor.java:488) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectSubquery(OracleDMLStatementSQLVisitor.java:162) at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$SelectSubqueryContext.accept(OracleStatementParser.java:4501) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitInsertSingleTable(OracleDMLStatementSQLVisitor.java:188) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitInsertSingleTable(OracleDMLStatementSQLVisitor.java:162) at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$InsertSingleTableContext.accept(OracleStatementParser.java:1548) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitInsert(OracleDMLStatementSQLVisitor.java:173) at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitInsert(OracleDMLStatementSQLVisitor.java:162) at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$InsertContext.accept(OracleStatementParser.java:1469) at org.apache.shardingsphere.sql.parser.api.SQLVisitorEngine.visit(SQLVisitorEngine.java:55) at org.apache.shardingsphere.infra.parser.sql.SQLStatementParserExecutor.parse(SQLStatementParserExecutor.java:48) at org.apache.shardingsphere.infra.parser.cache.SQLStatementCacheLoader.load(SQLStatementCacheLoader.java:41) at org.apache.shardingsphere.infra.parser.cache.SQLStatementCacheLoader.load(SQLStatementCacheLoader.java:30) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3533) at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2282) at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2159) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2049) ... 11 more </code></pre></div>
0
<h2 dir="auto"><g-emoji class="g-emoji" alias="information_source" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2139.png">ℹ</g-emoji> Computer information</h2> <ul dir="auto"> <li>Windows build number: [run "winver"] 1903</li> <li>PowerToys version: .2</li> <li>PowerToy module: install</li> </ul> <h2 dir="auto"><g-emoji class="g-emoji" alias="memo" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png">📝</g-emoji> Provide detailed reproduction steps (if any)</h2> <ol dir="auto"> <li>…as part of install, clicked OK to restart File Explorer; failed, blank monitors, OS restart and all OK</li> <li>…</li> <li>…</li> </ol> <h3 dir="auto"><g-emoji class="g-emoji" alias="heavy_check_mark" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2714.png">✔️</g-emoji> Expected result</h3> <p dir="auto"><em>What is the expected result of the above steps?</em> file explorer restart should work, OS restart not needed</p> <h3 dir="auto">❌ Actual result</h3> <p dir="auto"><em>What is the actual result of the above steps?</em> file explorer did not restart</p> <h2 dir="auto"><g-emoji class="g-emoji" alias="camera" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4f7.png">📷</g-emoji> Screenshots</h2> <p dir="auto"><em>Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form</em></p>
<h2 dir="auto">ℹ Computer information</h2> <ul dir="auto"> <li>Windows build number: [run "winver"] 19041.388</li> <li>PowerToys version: 0.20.0</li> <li>PowerToy module: Installation</li> </ul> <h2 dir="auto">📝 Provide detailed reproduction steps (if any)</h2> <ol dir="auto"> <li>Run the update from 0.19.2 to 0.20.0.</li> <li>At the end, it asks to restart Windows Explorer and I click to let that proceed.</li> <li>It apparently gets stuck in the restart, with a blank background and current foreground apps showing on top (in this case, Google Chrome and Mozilla Thunderbird, in one tabbed window using TidyTabs).</li> <li>I Ctrl-Alt-Del and select Sign out.</li> <li>I sign back in again, and my user account loads normally with Windows Explorer working fine.</li> </ol> <h3 dir="auto">✔️ Expected result</h3> <p dir="auto"><em>What is the expected result of the above steps?</em><br> The Windows Explorer restart should have completed the restart process without any intervention.</p> <h3 dir="auto"><g-emoji class="g-emoji" alias="x" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/274c.png">❌</g-emoji> Actual result</h3> <p dir="auto"><em>What is the actual result of the above steps?</em><br> The actual result is me having to intervene, signing off and signing on again to complete the restart.</p> <h2 dir="auto"><g-emoji class="g-emoji" alias="camera" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4f7.png">📷</g-emoji> Screenshots</h2> <p dir="auto"><em>Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form</em><br> I think my descriptions cover it.</p>
1
<p dir="auto"><a href="mailto:Vue@2.x">Vue@2.x</a><br> I use single file component to render page, but very slow? i don't know why?</p> <p dir="auto">simple example, and does not use complex nested components</p> <p dir="auto"><a href="https://github.com/bluemsn/vue-render-performance-comparisons/tree/sfc-test">https://github.com/bluemsn/vue-render-performance-comparisons/tree/sfc-test</a></p> <p dir="auto">At first, I wanted to test the rendering performance of nested components in complex scenes, but now it's very slow to render in a simple nested component</p>
<h3 dir="auto">Version</h3> <p dir="auto">2.6.11</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://jsfiddle.net/Soviut/0nmfpz9h/4/" rel="nofollow">https://jsfiddle.net/Soviut/0nmfpz9h/4/</a></p> <h3 dir="auto">Steps to reproduce</h3> <ul dir="auto"> <li>Note the component emits an $event along with an extra argument string</li> <li>Click the "no prevent" button</li> <li>Note that the message is passed and is displayed</li> <li>Click the "has prevent" button</li> <li>Note that the message is undefined and clears the display</li> </ul> <p dir="auto">Both buttons also log to the console for more detailed output.</p> <h3 dir="auto">What is expected?</h3> <p dir="auto">Additional arguments would be passed when event modifiers are used.</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">Additional arguments are being ignored/removed.</p>
0
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=johnalewis" rel="nofollow">John Lewis</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4259?redirect=false" rel="nofollow">SPR-4259</a></strong> and commented</p> <p dir="auto">I've updated the description of this issue to change it to a general place to work out Portlet 2.0 (JSR 286) support for Spring MVC. I think a general approach to this larger issue will result in a resolution to the original point of this issue.</p> <p dir="auto">Original Description: Add support for Portlet WindowState to org.springframework.web.bind.annotation.RequestMapping</p> <hr> <p dir="auto"><strong>Affects:</strong> 2.5 final</p> <p dir="auto">25 votes, 19 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=jloureiro" rel="nofollow">João Loureiro</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9753?redirect=false" rel="nofollow">SPR-9753</a></strong> and commented</p> <p dir="auto">MapSqlParameterSource and BeanPropertySqlParameterSource should override toString() appropriately, that is, the returned string should represent the object in terms of the parameter values it contains (at least; optionally, the types as well). The returned string can use a Map-like representation.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.2 M1</p> <p dir="auto"><strong>Reference URL:</strong> <a href="http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/jdbc/core/namedparam/SqlParameterSource.html" rel="nofollow">http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/jdbc/core/namedparam/SqlParameterSource.html</a></p> <p dir="auto"><strong>Referenced from:</strong> pull request <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="396967255" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/2080" data-hovercard-type="pull_request" data-hovercard-url="/spring-projects/spring-framework/pull/2080/hovercard" href="https://github.com/spring-projects/spring-framework/pull/2080">#2080</a></p>
0
<p dir="auto">[Enter steps to reproduce below:]</p> <ol dir="auto"> <li>Delete a file that is already in project</li> <li>Open that session.</li> </ol> <p dir="auto"><strong>Atom Version</strong>: 1.0.1-375cf27<br> <strong>System</strong>: "Sabayon Linux<br> <strong>Thrown From</strong>: Atom Core</p> <h3 dir="auto">Stack Trace</h3> <p dir="auto">Uncaught Error: ENOENT: no such file or directory, open '/home/v3ss/workspace/phwa.re/gui/phwabe/source/class/phwabe/utils/list/InfiniListDebounce.js'</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At events.js:141 Error: ENOENT: no such file or directory, open '/home/v3ss/workspace/phwa.re/gui/phwabe/source/class/phwabe/utils/list/InfiniListDebounce.js' at Error (native) at EventEmitter.ipc.sendSync (/opt/atom/resources/atom.asar/renderer/api/lib/ipc.js:21:31) at Object.exports.require (/opt/atom/resources/atom.asar/renderer/api/lib/remote.js:160:16) at Object.&lt;anonymous&gt; (/home/v3ss/.atom/init.coffee:1:19) at Object.&lt;anonymous&gt; (/home/v3ss/.atom/init.coffee:1:1) at Module._compile (module.js:452:26) at Object.requireCoffeeScript (/opt/atom/resources/app.asar/node_modules/coffee-cash/lib/coffee-cash.js:85:19) at Module.load (module.js:347:32) at Function.Module._load (module.js:302:12) at Module.require (module.js:357:17) at require (module.js:376:17) at Atom.module.exports.Atom.requireUserInitScript (/opt/atom/resources/app.asar/src/atom.js:924:20) at Atom.module.exports.Atom.startEditorWindow (/opt/atom/resources/app.asar/src/atom.js:644:14) at Object.&lt;anonymous&gt; (/opt/atom/resources/app.asar/src/window-bootstrap.js:12:8) at Object.&lt;anonymous&gt; (/opt/atom/resources/app.asar/src/window-bootstrap.js:23:4) at Module._compile (module.js:452:26) at Object.loadFile [as .js] (/opt/atom/resources/app.asar/src/babel.js:162:21) at Module.load (module.js:347:32) at Function.Module._load (module.js:302:12) at Module.require (module.js:357:17) at require (module.js:376:17) at setupWindow (file:///opt/atom/resources/app.asar/static/index.js:96:23) at window.onload (file:///opt/atom/resources/app.asar/static/index.js:36:7) "><pre class="notranslate"><code class="notranslate">At events.js:141 Error: ENOENT: no such file or directory, open '/home/v3ss/workspace/phwa.re/gui/phwabe/source/class/phwabe/utils/list/InfiniListDebounce.js' at Error (native) at EventEmitter.ipc.sendSync (/opt/atom/resources/atom.asar/renderer/api/lib/ipc.js:21:31) at Object.exports.require (/opt/atom/resources/atom.asar/renderer/api/lib/remote.js:160:16) at Object.&lt;anonymous&gt; (/home/v3ss/.atom/init.coffee:1:19) at Object.&lt;anonymous&gt; (/home/v3ss/.atom/init.coffee:1:1) at Module._compile (module.js:452:26) at Object.requireCoffeeScript (/opt/atom/resources/app.asar/node_modules/coffee-cash/lib/coffee-cash.js:85:19) at Module.load (module.js:347:32) at Function.Module._load (module.js:302:12) at Module.require (module.js:357:17) at require (module.js:376:17) at Atom.module.exports.Atom.requireUserInitScript (/opt/atom/resources/app.asar/src/atom.js:924:20) at Atom.module.exports.Atom.startEditorWindow (/opt/atom/resources/app.asar/src/atom.js:644:14) at Object.&lt;anonymous&gt; (/opt/atom/resources/app.asar/src/window-bootstrap.js:12:8) at Object.&lt;anonymous&gt; (/opt/atom/resources/app.asar/src/window-bootstrap.js:23:4) at Module._compile (module.js:452:26) at Object.loadFile [as .js] (/opt/atom/resources/app.asar/src/babel.js:162:21) at Module.load (module.js:347:32) at Function.Module._load (module.js:302:12) at Module.require (module.js:357:17) at require (module.js:376:17) at setupWindow (file:///opt/atom/resources/app.asar/static/index.js:96:23) at window.onload (file:///opt/atom/resources/app.asar/static/index.js:36:7) </code></pre></div> <h3 dir="auto">Commands</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div> <h3 dir="auto">Config</h3> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;core&quot;: { &quot;disabledPackages&quot;: [ &quot;language-ruby-on-rails&quot;, &quot;mobile-preview&quot;, &quot;atom-html-preview&quot;, &quot;color-picker&quot;, &quot;run-command&quot;, &quot;runcoderun&quot;, &quot;whitespace&quot;, &quot;svg-preview&quot;, &quot;autosave&quot;, &quot;autocomplete-jedi&quot;, &quot;autocomplete-plus-async&quot;, &quot;cute-cursor&quot;, &quot;pulsing-cursor&quot;, &quot;neon-selection&quot;, &quot;atom-lint&quot;, &quot;animation-showcase&quot;, &quot;tree-view-open-files&quot;, &quot;autocomplete&quot;, &quot;ease-blink&quot;, &quot;highlight-line&quot;, &quot;minimap-highlight-selected&quot;, &quot;minimap&quot;, &quot;markdown-writer&quot;, &quot;atom-alignment&quot;, &quot;autocomplete-atom-api&quot;, &quot;fancy-input&quot;, &quot;sublime-tabs&quot;, &quot;spell-check&quot;, &quot;tool-bar-main&quot;, &quot;tool-bar&quot;, &quot;flex-tool-bar&quot;, &quot;atom-ternjs&quot;, &quot;gutter-shadow&quot;, &quot;local-history&quot;, &quot;tab-rename&quot;, &quot;open-in&quot;, &quot;pigments&quot;, &quot;linter&quot;, &quot;goto&quot;, &quot;cursor-blink-interval&quot; ], &quot;ignoredNames&quot;: [ &quot;*.pyc&quot;, &quot;/home/v3ss/workspace/phwa.be/condaenv&quot;, &quot;/home/v3ss/workspace/phwa.be/pypyenv&quot;, &quot;*.zip&quot;, &quot;*.tar&quot;, &quot;.hg&quot; ], &quot;autoHideMenuBar&quot;: true, &quot;themes&quot;: [ &quot;steam-pirate-ui&quot;, &quot;steam-pirate-syntax&quot; ] }, &quot;editor&quot;: { &quot;preferredLineLength&quot;: 120, &quot;tabLength&quot;: 4, &quot;confirmCheckoutHeadRevision&quot;: false, &quot;autoIndentOnPaste&quot;: false, &quot;scrollSensitivity&quot;: 120, &quot;invisibles&quot;: {}, &quot;showIndentGuide&quot;: true, &quot;lineHeight&quot;: 1.35, &quot;scrollPastEnd&quot;: true, &quot;zoomFontWhenCtrlScrolling&quot;: false, &quot;fontSize&quot;: 12, &quot;fontFamily&quot;: &quot;NK57 Monospace&quot; } }"><pre class="notranslate">{ <span class="pl-ent">"core"</span>: { <span class="pl-ent">"disabledPackages"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>language-ruby-on-rails<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>mobile-preview<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>atom-html-preview<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>color-picker<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>run-command<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>runcoderun<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>whitespace<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>svg-preview<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>autosave<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>autocomplete-jedi<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>autocomplete-plus-async<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>cute-cursor<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>pulsing-cursor<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>neon-selection<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>atom-lint<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>animation-showcase<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>tree-view-open-files<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>autocomplete<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>ease-blink<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>highlight-line<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>minimap-highlight-selected<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>minimap<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>markdown-writer<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>atom-alignment<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>autocomplete-atom-api<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>fancy-input<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>sublime-tabs<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>spell-check<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>tool-bar-main<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>tool-bar<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>flex-tool-bar<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>atom-ternjs<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>gutter-shadow<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>local-history<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>tab-rename<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>open-in<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>pigments<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>linter<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>goto<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>cursor-blink-interval<span class="pl-pds">"</span></span> ], <span class="pl-ent">"ignoredNames"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>*.pyc<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>/home/v3ss/workspace/phwa.be/condaenv<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>/home/v3ss/workspace/phwa.be/pypyenv<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>*.zip<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>*.tar<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>.hg<span class="pl-pds">"</span></span> ], <span class="pl-ent">"autoHideMenuBar"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"themes"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>steam-pirate-ui<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>steam-pirate-syntax<span class="pl-pds">"</span></span> ] }, <span class="pl-ent">"editor"</span>: { <span class="pl-ent">"preferredLineLength"</span>: <span class="pl-c1">120</span>, <span class="pl-ent">"tabLength"</span>: <span class="pl-c1">4</span>, <span class="pl-ent">"confirmCheckoutHeadRevision"</span>: <span class="pl-c1">false</span>, <span class="pl-ent">"autoIndentOnPaste"</span>: <span class="pl-c1">false</span>, <span class="pl-ent">"scrollSensitivity"</span>: <span class="pl-c1">120</span>, <span class="pl-ent">"invisibles"</span>: {}, <span class="pl-ent">"showIndentGuide"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"lineHeight"</span>: <span class="pl-c1">1.35</span>, <span class="pl-ent">"scrollPastEnd"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"zoomFontWhenCtrlScrolling"</span>: <span class="pl-c1">false</span>, <span class="pl-ent">"fontSize"</span>: <span class="pl-c1">12</span>, <span class="pl-ent">"fontFamily"</span>: <span class="pl-s"><span class="pl-pds">"</span>NK57 Monospace<span class="pl-pds">"</span></span> } }</pre></div> <h3 dir="auto">Installed Packages</h3> <div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User auto-reveal-in-sidebar, v0.5.0 autocomplete-plus-python-jedi, v0.3.6 autohide-tree-view, v0.20.2 block-cursor, v0.13.1 block-travel, v1.0.2 build, v0.38.0 editorconfig, v1.0.0 file-icons, v1.5.8 file-type-icons, v0.7.0 hashrocket, v0.4.8 highlight-column, v0.5.0 highlight-selected, v0.10.1 language-javascript-better, v1.5.0 language-nim, v0.2.2 linter-coffeelint, v0.3.2 linter-csslint, v0.0.14 linter-flake8, v1.4.2 linter-jshint, v0.1.7 linter-tidy, v1.0.1 linter-xmllint, v0.0.6 minimap-bookmarks, v0.1.0 minimap-find-and-replace, v4.2.0 minimap-selection, v4.2.0 pdf-view, v0.22.0 script-runner, v1.8.3 steam-pirate-syntax, v0.3.0 steam-pirate-ui, v0.6.1 symbols-tree-view, v0.9.3 tabs-to-spaces, v0.11.0 web-browser, v1.5.0 # Dev No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span> auto<span class="pl-k">-</span>reveal<span class="pl-k">-</span><span class="pl-k">in</span><span class="pl-k">-</span>sidebar, v0.<span class="pl-ii">5</span>.<span class="pl-ii">0</span> autocomplete<span class="pl-k">-</span>plus<span class="pl-k">-</span>python<span class="pl-k">-</span>jedi, v0.<span class="pl-ii">3</span>.<span class="pl-ii">6</span> autohide<span class="pl-k">-</span>tree<span class="pl-k">-</span>view, v0.<span class="pl-ii">20</span>.<span class="pl-ii">2</span> block<span class="pl-k">-</span>cursor, v0.<span class="pl-ii">13</span>.<span class="pl-ii">1</span> block<span class="pl-k">-</span>travel, v1.<span class="pl-ii">0</span>.<span class="pl-ii">2</span> build, v0.<span class="pl-ii">38</span>.<span class="pl-ii">0</span> editorconfig, v1.<span class="pl-ii">0</span>.<span class="pl-ii">0</span> file<span class="pl-k">-</span>icons, v1.<span class="pl-ii">5</span>.<span class="pl-ii">8</span> file<span class="pl-k">-</span>type<span class="pl-k">-</span>icons, v0.<span class="pl-ii">7</span>.<span class="pl-ii">0</span> hashrocket, v0.<span class="pl-ii">4</span>.<span class="pl-ii">8</span> highlight<span class="pl-k">-</span>column, v0.<span class="pl-ii">5</span>.<span class="pl-ii">0</span> highlight<span class="pl-k">-</span>selected, v0.<span class="pl-ii">10</span>.<span class="pl-ii">1</span> language<span class="pl-k">-</span>javascript<span class="pl-k">-</span>better, v1.<span class="pl-ii">5</span>.<span class="pl-ii">0</span> language<span class="pl-k">-</span>nim, v0.<span class="pl-ii">2</span>.<span class="pl-ii">2</span> linter<span class="pl-k">-</span>coffeelint, v0.<span class="pl-ii">3</span>.<span class="pl-ii">2</span> linter<span class="pl-k">-</span>csslint, v0.<span class="pl-ii">0</span>.<span class="pl-ii">14</span> linter<span class="pl-k">-</span>flake8, v1.<span class="pl-ii">4</span>.<span class="pl-ii">2</span> linter<span class="pl-k">-</span>jshint, v0.<span class="pl-ii">1</span>.<span class="pl-ii">7</span> linter<span class="pl-k">-</span>tidy, v1.<span class="pl-ii">0</span>.<span class="pl-ii">1</span> linter<span class="pl-k">-</span>xmllint, v0.<span class="pl-ii">0</span>.<span class="pl-ii">6</span> minimap<span class="pl-k">-</span>bookmarks, v0.<span class="pl-ii">1</span>.<span class="pl-ii">0</span> minimap<span class="pl-k">-</span>find<span class="pl-k">-</span><span class="pl-k">and</span><span class="pl-k">-</span>replace, v4.<span class="pl-ii">2</span>.<span class="pl-ii">0</span> minimap<span class="pl-k">-</span>selection, v4.<span class="pl-ii">2</span>.<span class="pl-ii">0</span> pdf<span class="pl-k">-</span>view, v0.<span class="pl-ii">22</span>.<span class="pl-ii">0</span> script<span class="pl-k">-</span>runner, v1.<span class="pl-ii">8</span>.<span class="pl-ii">3</span> steam<span class="pl-k">-</span>pirate<span class="pl-k">-</span>syntax, v0.<span class="pl-ii">3</span>.<span class="pl-ii">0</span> steam<span class="pl-k">-</span>pirate<span class="pl-k">-</span>ui, v0.<span class="pl-ii">6</span>.<span class="pl-ii">1</span> symbols<span class="pl-k">-</span>tree<span class="pl-k">-</span>view, v0.<span class="pl-ii">9</span>.<span class="pl-ii">3</span> tabs<span class="pl-k">-</span>to<span class="pl-k">-</span>spaces, v0.<span class="pl-ii">11</span>.<span class="pl-ii">0</span> web<span class="pl-k">-</span>browser, v1.<span class="pl-ii">5</span>.<span class="pl-ii">0</span> <span class="pl-c"><span class="pl-c">#</span> Dev</span> <span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div>
<p dir="auto">Some repro steps that I gathered from the existing issues:</p> <ol dir="auto"> <li>Have a file open in branch <code class="notranslate">something</code> that doesn't exist in branch <code class="notranslate">atom</code></li> <li><code class="notranslate">git checkout atom</code></li> <li>ENOENT <g-emoji class="g-emoji" alias="boom" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4a5.png">💥</g-emoji><br> OR</li> <li>Have a file open in Atom that will be affected by <code class="notranslate">git rebase</code></li> <li><code class="notranslate">git rebase</code></li> <li>ENOENT <g-emoji class="g-emoji" alias="-1" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f44e.png">👎</g-emoji><br> OR<br> Just simply rename a file outside of Atom that's currently open inside of Atom.</li> </ol>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=scottyfred" rel="nofollow">Scott Frederick</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6693?redirect=false" rel="nofollow">SPR-6693</a></strong> and commented</p> <p dir="auto">Spring MVC <code class="notranslate">@ExceptionHandler</code> controller methods support a flexible argument list and return value, similiar to <code class="notranslate">@RequestMapping-annotated</code> methods. One option that is supported by <code class="notranslate">@RequestMapping</code> methods but not <code class="notranslate">@ExceptionHandler</code> methods is returning naked bean objects from the exception handler method.</p> <p dir="auto">For example, this type of exception handler method would be very convenient, especially when building RESTful services using a MarshallingView (the important detail is the "HelloResponse" return value from the handleBindException method):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Controller @RequestMapping(&quot;/Hello&quot;) public class HelloController { @RequestMapping(value = &quot;/greet&quot;, method = RequestMethod.GET) public HelloResponse greetGet(@Valid HelloRequest request) { String message = &quot;Hello, &quot; + request.getTitle() + &quot; &quot; + request.getName(); return new HelloResponse(message); } @ExceptionHandler(BindException.class) public HelloResponse handleBindException(BindException be) { List&lt;FieldError&gt; errors = be.getFieldErrors(); HelloResponse response = new HelloResponse(); for (FieldError error : errors) { response.addError(error.toString()); } return response; } }"><pre class="notranslate"><code class="notranslate">@Controller @RequestMapping("/Hello") public class HelloController { @RequestMapping(value = "/greet", method = RequestMethod.GET) public HelloResponse greetGet(@Valid HelloRequest request) { String message = "Hello, " + request.getTitle() + " " + request.getName(); return new HelloResponse(message); } @ExceptionHandler(BindException.class) public HelloResponse handleBindException(BindException be) { List&lt;FieldError&gt; errors = be.getFieldErrors(); HelloResponse response = new HelloResponse(); for (FieldError error : errors) { response.addError(error.toString()); } return response; } } </code></pre></div> <p dir="auto">With a response object that looks like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@XmlRootElement(name = &quot;response&quot;) public class HelloResponse { private String message; private List&lt;String&gt; errors; // getters and setters }"><pre class="notranslate"><code class="notranslate">@XmlRootElement(name = "response") public class HelloResponse { private String message; private List&lt;String&gt; errors; // getters and setters } </code></pre></div> <p dir="auto">Currently this code will throw an exception when the exception handler method returns to the framework:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.IllegalArgumentException: Invalid handler method return value: HelloResponse@caf0ed at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.getModelAndView(AnnotationMethodHandlerExceptionResolver.java:353) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.doResolveException(AnnotationMethodHandlerExceptionResolver.java:101) at org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:109) at org.springframework.web.servlet.DispatcherServlet.processHandlerException(DispatcherServlet.java:1004) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:792) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)"><pre class="notranslate"><code class="notranslate">java.lang.IllegalArgumentException: Invalid handler method return value: HelloResponse@caf0ed at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.getModelAndView(AnnotationMethodHandlerExceptionResolver.java:353) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.doResolveException(AnnotationMethodHandlerExceptionResolver.java:101) at org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:109) at org.springframework.web.servlet.DispatcherServlet.processHandlerException(DispatcherServlet.java:1004) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:792) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) </code></pre></div> <hr> <p dir="auto"><strong>Affects:</strong> 3.0 GA</p> <p dir="auto"><strong>Attachments:</strong></p> <ul dir="auto"> <li><a href="https://jira.spring.io/secure/attachment/16092/ExceptionHandler-return.patch" rel="nofollow">ExceptionHandler-return.patch</a> (<em>5.70 kB</em>)</li> </ul> <p dir="auto">13 votes, 19 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=btiernay" rel="nofollow">Bob Tiernay</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9044?redirect=false" rel="nofollow">SPR-9044</a></strong> and commented</p> <h2 dir="auto">Problem</h2> <p dir="auto">One common request I see quite frequently on the internet is the ability to have spring autowire a main class:</p> <ul dir="auto"> <li><a href="http://hvijay.wordpress.com/2011/07/02/spring-dependency-injection-in-applications-main-class/" rel="nofollow">http://hvijay.wordpress.com/2011/07/02/spring-dependency-injection-in-applications-main-class/</a></li> <li><a href="http://forum.springsource.org/archive/index.php/t-47933.html" rel="nofollow">http://forum.springsource.org/archive/index.php/t-47933.html</a></li> <li><a href="http://stackoverflow.com/questions/6820724/how-to-inject-properties-into-a-spring-bean-from-main-class" rel="nofollow">http://stackoverflow.com/questions/6820724/how-to-inject-properties-into-a-spring-bean-from-main-class</a></li> <li><a href="http://stackoverflow.com/questions/8313070/spring-bean-injection-in-main-method-class" rel="nofollow">http://stackoverflow.com/questions/8313070/spring-bean-injection-in-main-method-class</a></li> <li><a href="http://stackoverflow.com/questions/3659720/spring-3-autowire-in-standalone-application" rel="nofollow">http://stackoverflow.com/questions/3659720/spring-3-autowire-in-standalone-application</a></li> <li><a href="http://stackoverflow.com/questions/4787719/spring-console-application-configured-using-annotations" rel="nofollow">http://stackoverflow.com/questions/4787719/spring-console-application-configured-using-annotations</a></li> <li><a href="http://forum.springsource.org/showthread.php?75991-ContextConfiguration" rel="nofollow">http://forum.springsource.org/showthread.php?75991-ContextConfiguration</a></li> </ul> <p dir="auto">There is no shortage of questions / solutions to this problem which illustrates a need for a standardized approach.</p> <h2 dir="auto">Solution</h2> <p dir="auto">What I am proposing is combination of features between the following existing classes:</p> <ol dir="auto"> <li><code class="notranslate">org.springframework.test.context.junit4.SpringJUnit4ClassRunner</code> - provides functionality of the Spring TestContext Framework to standard JUnit 4.5+ tests</li> <li><code class="notranslate">org.springframework.test.context.ContextConfiguration</code> - class-level metadata that is used to determine how to load and configure an ApplicationContext for test classes</li> <li><code class="notranslate">org.springframework.web.context.support.SpringBeanAutowiringSupport</code> a convenient base class for self-autowiring classes that gets constructed within a Spring-based web application.</li> </ol> <p dir="auto">Thus provinding first class support for console based application context management and DI.</p> <h2 dir="auto">Features</h2> <ol dir="auto"> <li>Autowiring of main class dependencies</li> <li>Auto-destruction of application context</li> <li>Ability in the future to handle command line arguments as beans</li> </ol> <h2 dir="auto">Properties</h2> <ol dir="auto"> <li>Standardization</li> <li>Consistency with other APIs</li> <li>Minimal configuration</li> <li>Intent revealing</li> </ol> <h2 dir="auto">Example</h2> <p dir="auto">My visions is something like the following:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MainSupport; import org.springframework.context.ContextConfiguration; import org.springframework.context.support.AnnotationConfigContextLoader; @ContextConfiguration(classes=AppConfig.class, loader=AnnotationConfigContextLoader.class) public class Main extends MainSupport { @Autowired private Service service; public static void main( String[] args ) { // MainSupport.execute execute(args); } @Main public void main() { service.run(); } }"><pre class="notranslate"><code class="notranslate">import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MainSupport; import org.springframework.context.ContextConfiguration; import org.springframework.context.support.AnnotationConfigContextLoader; @ContextConfiguration(classes=AppConfig.class, loader=AnnotationConfigContextLoader.class) public class Main extends MainSupport { @Autowired private Service service; public static void main( String[] args ) { // MainSupport.execute execute(args); } @Main public void main() { service.run(); } } </code></pre></div> <p dir="auto">The way this would work is as follows:</p> <ol dir="auto"> <li>JVM calls <code class="notranslate">main</code></li> <li><code class="notranslate">main</code> delegates to super class method <code class="notranslate">MainSupport.execute</code> provided by spring (analog of <code class="notranslate">SpringBeanAutowiringSupport</code>)</li> <li><code class="notranslate">MainSupport.execute</code> reads the <code class="notranslate">@ContextConfiguration</code> annotation and looks for a <code class="notranslate">@Main</code> annotation (analog of <code class="notranslate">@Test</code>)</li> <li><code class="notranslate">MainSupport.execute</code> creates the application context</li> <li><code class="notranslate">MainSupport.execute</code> create an application <code class="notranslate">Main</code> class instance</li> <li><code class="notranslate">MainSupport.execute</code> injects dependencies</li> <li><code class="notranslate">MainSupport.execute</code> wraps instance in a proxy that will advise the method annotated with <code class="notranslate">@Main</code>. This proxy will first call the annotated method and then destroy the application context</li> </ol> <hr> <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="398110895" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12732" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12732/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12732">#12732</a> Provide Java main() for launching Spring applications</li> </ul> <p dir="auto">4 votes, 10 watchers</p>
0
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-introducing-javascript-object-notation-json#?solution=var%20myMusic%20%3D%20%5B%0A%20%20%7B%0A%20%20%20%20%22artist%22%3A%20%22Billy%20Joel%22%2C%0A%20%20%20%20%22title%22%3A%20%22Piano%20Man%22%2C%0A%20%20%20%20%22release_year%22%3A%201993%2C%0A%20%20%20%20%22formats%22%3A%20%5B%20%0A%20%20%20%20%20%20%22CS%22%2C%20%0A%20%20%20%20%20%20%228T%22%2C%20%0A%20%20%20%20%20%20%22LP%22%20%5D%2C%0A%20%20%20%20%22gold%22%3A%20true%0A%20%20%7D%2C%0A%20%20%2F%2F%20Add%20record%20here%0A%20%20%7B%0A%20%20%20%20%22artist%22%3A%20%22Daft%20Punk%22%2C%0A%20%20%20%20%22title%22%3A%20%22Homework%22%2C%0A%20%20%20%20%22release_year%22%3A%201997%2C%0A%20%20%20%20%22formats%22%3A%20%5B%20%0A%20%20%20%20%20%20%22CD%22%2C%20%0A%20%20%20%20%20%20%22Cassette%22%2C%20%0A%20%20%20%20%20%20%22LP%22%20%5D%2C%0A%20%20%20%20%22gold%22%3A%20true%0A%20%20%7D%0A%5D%3B%0A%0A" rel="nofollow">Waypoint: Introducing JavaScript Object Notation JSON</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/47.0.2526.73 Chrome/47.0.2526.73 Safari/537.36</code>.<br> Please describe how to reproduce this issue, and include links to screenshots if possible.</p> <p dir="auto">My code:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var myMusic = [ { &quot;artist&quot;: &quot;Billy Joel&quot;, &quot;title&quot;: &quot;Piano Man&quot;, &quot;release_year&quot;: 1993, &quot;formats&quot;: [ &quot;CS&quot;, &quot;8T&quot;, &quot;LP&quot; ], &quot;gold&quot;: true } // Add record here ]; "><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">myMusic</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span> <span class="pl-kos">{</span> <span class="pl-s">"artist"</span>: <span class="pl-s">"Billy Joel"</span><span class="pl-kos">,</span> <span class="pl-s">"title"</span>: <span class="pl-s">"Piano Man"</span><span class="pl-kos">,</span> <span class="pl-s">"release_year"</span>: <span class="pl-c1">1993</span><span class="pl-kos">,</span> <span class="pl-s">"formats"</span>: <span class="pl-kos">[</span> <span class="pl-s">"CS"</span><span class="pl-kos">,</span> <span class="pl-s">"8T"</span><span class="pl-kos">,</span> <span class="pl-s">"LP"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s">"gold"</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span> <span class="pl-c">// Add record here</span> <span class="pl-kos">]</span><span class="pl-kos">;</span> </pre></div> <p dir="auto">The curly bracket ending the Billy Joel object needs a comma, otherwise the next artist object wont be processed by the browser.</p>
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-introducing-javascript-object-notation-json#?solution=var%20myMusic%20%3D%20%5B%0A%20%20%7B%0A%20%20%20%20%22artist%22%3A%20%22Billy%20Joel%22%2C%0A%20%20%20%20%22title%22%3A%20%22Piano%20Man%22%2C%0A%20%20%20%20%22release_year%22%3A%201993%2C%0A%20%20%20%20%22formats%22%3A%20%5B%20%0A%20%20%20%20%20%20%22CS%22%2C%20%0A%20%20%20%20%20%20%228T%22%2C%20%0A%20%20%20%20%20%20%22LP%22%20%5D%2C%0A%20%20%20%20%22gold%22%3A%20true%0A%20%20%7D%2C%0A%20%20%2F%2F%20Add%20record%20here%0A%20%20%7B%0A%20%20%20%20%22artist%22%3A%20%22Tsuyoshi%20Hiroshi%22%2C%0A%20%20%20%20%22title%22%3A%20%22Tonboyou%22%2C%0A%20%20%20%20%22release_year%22%3A%201987%2C%0A%20%20%20%20%22formats%22%3A%20%5B%0A%20%20%20%20%20%20%22CD%22%2C%0A%20%20%20%20%20%20%22DVD%22%2C%0A%20%20%20%20%20%20%22LP%22%5D%0A%20%20%7D%0A%5D%3B%0A%0A" rel="nofollow">Waypoint: Introducing JavaScript Object Notation JSON</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36</code>.<br> Please describe how to reproduce this issue, and include links to screenshots if possible.</p> <p dir="auto">My code:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var myMusic = [ { &quot;artist&quot;: &quot;Billy Joel&quot;, &quot;title&quot;: &quot;Piano Man&quot;, &quot;release_year&quot;: 1993, &quot;formats&quot;: [ &quot;CS&quot;, &quot;8T&quot;, &quot;LP&quot; ], &quot;gold&quot;: true }, &lt;---------------------perhaps is a missing a comma, here? // Add record here { &quot;artist&quot;: &quot;Tsuyoshi Hiroshi&quot;, &quot;title&quot;: &quot;Tonboyou&quot;, &quot;release_year&quot;: 1987, &quot;formats&quot;: [ &quot;CD&quot;, &quot;DVD&quot;, &quot;LP&quot;] } ]; "><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">myMusic</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span> <span class="pl-kos">{</span> <span class="pl-s">"artist"</span>: <span class="pl-s">"Billy Joel"</span><span class="pl-kos">,</span> <span class="pl-s">"title"</span>: <span class="pl-s">"Piano Man"</span><span class="pl-kos">,</span> <span class="pl-s">"release_year"</span>: <span class="pl-c1">1993</span><span class="pl-kos">,</span> <span class="pl-s">"formats"</span>: <span class="pl-kos">[</span> <span class="pl-s">"CS"</span><span class="pl-kos">,</span> <span class="pl-s">"8T"</span><span class="pl-kos">,</span> <span class="pl-s">"LP"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s">"gold"</span>: <span class="pl-c1">true</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-c1">--</span><span class="pl-c1">--</span><span class="pl-c1">--</span><span class="pl-c1">--</span><span class="pl-c1">--</span><span class="pl-c1">--</span><span class="pl-c1">--</span><span class="pl-c1">--</span><span class="pl-c1">--</span><span class="pl-c1">-</span><span class="pl-s1">perhaps</span> <span class="pl-s1">is</span> <span class="pl-s1">a</span> <span class="pl-s1">missing</span> <span class="pl-s1">a</span> <span class="pl-s1">comma</span><span class="pl-kos">,</span> <span class="pl-s1">here</span>? <span class="pl-c">// Add record here</span> <span class="pl-kos">{</span> <span class="pl-s">"artist"</span>: <span class="pl-s">"Tsuyoshi Hiroshi"</span><span class="pl-kos">,</span> <span class="pl-s">"title"</span>: <span class="pl-s">"Tonboyou"</span><span class="pl-kos">,</span> <span class="pl-s">"release_year"</span>: <span class="pl-c1">1987</span><span class="pl-kos">,</span> <span class="pl-s">"formats"</span>: <span class="pl-kos">[</span> <span class="pl-s">"CD"</span><span class="pl-kos">,</span> <span class="pl-s">"DVD"</span><span class="pl-kos">,</span> <span class="pl-s">"LP"</span><span class="pl-kos">]</span> <span class="pl-kos">}</span> <span class="pl-kos">]</span><span class="pl-kos">;</span> </pre></div>
1
<p dir="auto">If I create a TypeScript project with, say, the following properties directly in the .csproj file</p> <div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;PropertyGroup&gt; &lt;TypeScriptOutFile&gt;..\Output\combined.js&lt;/TypeScriptOutFile&gt; &lt;TypeScriptOutDir&gt;&lt;/TypeScriptOutDir&gt; &lt;/PropertyGroup&gt;"><pre class="notranslate">&lt;<span class="pl-ent">PropertyGroup</span>&gt; &lt;<span class="pl-ent">TypeScriptOutFile</span>&gt;..\Output\combined.js&lt;/<span class="pl-ent">TypeScriptOutFile</span>&gt; &lt;<span class="pl-ent">TypeScriptOutDir</span>&gt;&lt;/<span class="pl-ent">TypeScriptOutDir</span>&gt; &lt;/<span class="pl-ent">PropertyGroup</span>&gt;</pre></div> <p dir="auto">Then both msbuild and the compilation triggered by saving a ts file both correctly update the output in the combined.js file in the output folder.</p> <p dir="auto">However if I extract those properties into an external SharedTypeScript.props file, and instead import the props file in the .csproj file, i.e.</p> <div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;Import Project=&quot;SharedTypeScript.props&quot; /&gt; "><pre class="notranslate">&lt;<span class="pl-ent">Import</span> <span class="pl-e">Project</span>=<span class="pl-s"><span class="pl-pds">"</span>SharedTypeScript.props<span class="pl-pds">"</span></span> /&gt; </pre></div> <p dir="auto">Then only msbuild will correctly build to the combined.js file in the output folder. Compilation on saving a ts file behaves as if no properties were specified and does not combine the output, instead putting individual js files next to the source ts files.</p> <p dir="auto">This is using the latest release (<a href="https://github.com/Microsoft/TypeScript/releases/tag/v1.6.2">https://github.com/Microsoft/TypeScript/releases/tag/v1.6.2</a>) and VS2015. This is a regression from VS2013 and typescript 1.4 where this was not a problem.</p>
<p dir="auto">When project does import properties from separate MSBuild file via <code class="notranslate">&lt;Import Project="build.props" /&gt;</code>, The MSBuild is using defined properties, but on file save of TS file it is being ignored.<br> It worked with with VS13/VS15RC and TS 1.5 beta, but after release it is broken.</p> <p dir="auto">I can provide ZIP file with example solution, but I cannot add it to github issue.</p>
1
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface IFoo { func (str: string): number; } declare class CFoo implements IFoo { func2 (): void; }"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">IFoo</span> <span class="pl-kos">{</span> <span class="pl-c1">func</span> <span class="pl-kos">(</span><span class="pl-s1">str</span>: <span class="pl-smi">string</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">declare</span> <span class="pl-k">class</span> <span class="pl-smi">CFoo</span> <span class="pl-k">implements</span> <span class="pl-smi">IFoo</span> <span class="pl-kos">{</span> <span class="pl-c1">func2</span> <span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <blockquote> <p dir="auto">error TS2420: Class 'CFoo' incorrectly implements interface 'IFoo'.<br> Property 'func' is missing in type 'CFoo'.</p> </blockquote> <p dir="auto">Since this is just a declaration, we shouldn't have to manually redeclare all implemented methods, this should be implied by declaring that the class implements the interface. We are simply declaring that this class exists and it implements said interface and additionally defines these methods. The requirement for the class to implement those methods should only apply to the actual class definition.</p>
<p dir="auto">Hi, I realize that this has been <a href="http://stackoverflow.com/q/14583231/351836" rel="nofollow">asked on Stackoverflow</a> before and <a href="http://stackoverflow.com/a/14587529/351836" rel="nofollow">Ryan gave a short answer</a>, but I would really like to see this discussed more, since I believe this could be a huge time and ressource saver if it was implemented differently:</p> <p dir="auto">I am trying to write a compact typescript definition file, but I am having troubles doing so for a larger project.</p> <p dir="auto">My project has lots of interfaces that are implemented by a number of classes.</p> <p dir="auto">From what I can see I always need to re"implement"/redeclare the methods of the interfaces in the classes like so:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" declare module someModule { interface InterfaceOne { /** * Some lengthy description */ someStuff():any; /** * Some lengthy description */ moreStuff():any; } class OneClass implements InterfaceOne { /** * Some lengthy description */ someStuff():any; /** * Some lengthy description */ moreStuff():any; /** * Even more description */ classStuff(): any; } class TwoClass implements InterfaceOne { /** * Some lengthy description */ someStuff():any; /** * Some lengthy description */ moreStuff():any; /** * Even more description */ classStuff(): any; } } "><pre class="notranslate"> <span class="pl-k">declare</span> module <span class="pl-s1">someModule</span> <span class="pl-kos">{</span> <span class="pl-k">interface</span> <span class="pl-smi">InterfaceOne</span> <span class="pl-kos">{</span> <span class="pl-c">/**</span> <span class="pl-c"> * Some lengthy description</span> <span class="pl-c"> */</span> <span class="pl-c1">someStuff</span><span class="pl-kos">(</span><span class="pl-kos">)</span>:<span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-c">/**</span> <span class="pl-c"> * Some lengthy description</span> <span class="pl-c"> */</span> <span class="pl-c1">moreStuff</span><span class="pl-kos">(</span><span class="pl-kos">)</span>:<span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">OneClass</span> <span class="pl-k">implements</span> <span class="pl-smi">InterfaceOne</span> <span class="pl-kos">{</span> <span class="pl-c">/**</span> <span class="pl-c"> * Some lengthy description</span> <span class="pl-c"> */</span> <span class="pl-c1">someStuff</span><span class="pl-kos">(</span><span class="pl-kos">)</span>:<span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-c">/**</span> <span class="pl-c"> * Some lengthy description</span> <span class="pl-c"> */</span> <span class="pl-c1">moreStuff</span><span class="pl-kos">(</span><span class="pl-kos">)</span>:<span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-c">/**</span> <span class="pl-c"> * Even more description</span> <span class="pl-c"> */</span> <span class="pl-c1">classStuff</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">TwoClass</span> <span class="pl-k">implements</span> <span class="pl-smi">InterfaceOne</span> <span class="pl-kos">{</span> <span class="pl-c">/**</span> <span class="pl-c"> * Some lengthy description</span> <span class="pl-c"> */</span> <span class="pl-c1">someStuff</span><span class="pl-kos">(</span><span class="pl-kos">)</span>:<span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-c">/**</span> <span class="pl-c"> * Some lengthy description</span> <span class="pl-c"> */</span> <span class="pl-c1">moreStuff</span><span class="pl-kos">(</span><span class="pl-kos">)</span>:<span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-c">/**</span> <span class="pl-c"> * Even more description</span> <span class="pl-c"> */</span> <span class="pl-c1">classStuff</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> </pre></div> <p dir="auto">If I leave out the <code class="notranslate">someStuff</code> and <code class="notranslate">moreStuff</code> declarations from the interfaces in the class declarations<br> I get this error:</p> <blockquote> <p dir="auto">error TS2137: Class TwoClass declares interface InterfaceOne but does not implement it:</p> </blockquote> <p dir="auto">So I always need to copy all of the declarations to each and every class that implements the interface.</p> <p dir="auto">In his answer to the similar question Ryan wrote this:</p> <blockquote> <p dir="auto">Let's say you didn't have to write out the interface members:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" class Base { } class Derived extends Base { } interface Foo { method(t: number): Base; } declare class FooImpl1 implements Foo { // Empty } declare class FooImpl2 implements Foo { public method(): Derived; }"><pre class="notranslate"> <span class="pl-k">class</span> <span class="pl-smi">Base</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">Derived</span> <span class="pl-k">extends</span> <span class="pl-smi">Base</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span> <span class="pl-k">interface</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-c1">method</span><span class="pl-kos">(</span><span class="pl-s1">t</span>: <span class="pl-smi">number</span><span class="pl-kos">)</span>: <span class="pl-smi">Base</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">declare</span> <span class="pl-k">class</span> <span class="pl-smi">FooImpl1</span> <span class="pl-k">implements</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-c">// Empty</span> <span class="pl-kos">}</span> <span class="pl-k">declare</span> <span class="pl-k">class</span> <span class="pl-smi">FooImpl2</span> <span class="pl-k">implements</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-k">public</span> <span class="pl-c1">method</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Derived</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">Is <code class="notranslate">FooImpl2</code> trying to declare an additional overload of <code class="notranslate">method</code>, or is <code class="notranslate">FooImpl2</code> implementing<br> <code class="notranslate">method</code> using a signature that takes fewer parameters and returns a more derived type? Either<br> would be a valid interpretation. You'd have to make rules for all sorts of cases like this so the<br> programmer could specify what they actually meant, making the language less predictable.</p> </blockquote> <p dir="auto">I don't understand his arguments:</p> <p dir="auto">First: for the vast majority of cases the <code class="notranslate">//Empty</code> case is the case that is totally _un_ambiguous: I have a class that implements Foo and thus I can call all methods from Foo, why do I need to redeclare all of them?</p> <p dir="auto">Second: It's the same thing with classes, too, and there the existing rules seem to suffice: If I extend a class (in a definition .d.ts file) I don't have to reenumerate all the base type members either:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Base { baseMethod():any; } class Derived extends Base { derivedMethod():any; } class Foo { public method(t: number): Base; } class FooImpl1 extends Foo { // Empty - works! why not for interfaces? } class FooImpl2 extends Foo { public method(): Derived; public method(t: number): Base; // need to redeclare in case of overload if I want to use that method! }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Base</span> <span class="pl-kos">{</span> <span class="pl-c1">baseMethod</span><span class="pl-kos">(</span><span class="pl-kos">)</span>:<span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">Derived</span> <span class="pl-k">extends</span> <span class="pl-smi">Base</span> <span class="pl-kos">{</span> <span class="pl-c1">derivedMethod</span><span class="pl-kos">(</span><span class="pl-kos">)</span>:<span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-k">public</span> <span class="pl-c1">method</span><span class="pl-kos">(</span><span class="pl-s1">t</span>: <span class="pl-smi">number</span><span class="pl-kos">)</span>: <span class="pl-smi">Base</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">FooImpl1</span> <span class="pl-k">extends</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-c">// Empty - works! why not for interfaces?</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">FooImpl2</span> <span class="pl-k">extends</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-k">public</span> <span class="pl-c1">method</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Derived</span><span class="pl-kos">;</span> <span class="pl-k">public</span> <span class="pl-c1">method</span><span class="pl-kos">(</span><span class="pl-s1">t</span>: <span class="pl-smi">number</span><span class="pl-kos">)</span>: <span class="pl-smi">Base</span><span class="pl-kos">;</span> <span class="pl-c">// need to redeclare in case of overload if I want to use that method!</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">So why should this not work for interfaces, too?</p> <p dir="auto">By the way I really don't understand why you cannot do the following if you <em>leave out</em> the redeclaration in the last line of <code class="notranslate">FooImpl2</code> above:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="new FooImpl2().method(2); // TS2081: Supplied parameters do not match any signature of call target. TS2087: Could not select overload for 'call' expression."><pre class="notranslate"><span class="pl-k">new</span> <span class="pl-smi">FooImpl2</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">method</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// TS2081: Supplied parameters do not match any signature of call target. TS2087: Could not select overload for 'call' expression.</span></pre></div> <p dir="auto">If <code class="notranslate">FooImpl2</code> extends <code class="notranslate">Foo</code>, it <em>must</em> be possible to call <code class="notranslate">method(t:number)</code> from the base type <em>and</em> the method declared. After all it's all about library definition files (.d.ts) that declare how the library will behave, so the overload resolution happens at runtime and if multiple members are declared, then all of them should work and be available, shouldn't they?</p> <p dir="auto">So back to the original question: Why can't <code class="notranslate">implements SomeInterface</code> behave like <code class="notranslate">extends SomeClass</code> in <code class="notranslate">.d.ts</code> declaration files? This would save us so much duplicated declarations and documentation, decrease the <code class="notranslate">d.ts</code> file size and speed up compilation and parsing, wouldn't it?</p> <p dir="auto">Edit 2015-10-31: I had accidentally written that my desired way of writing the declaration would be "ambiguous" in the most common case - of course I meant "_un_ambiguous", otherwise this would all make no sense.</p>
1
<p dir="auto"><a href="https://github.com/collinjackson"><img src="https://avatars.githubusercontent.com/u/394889?v=3" align="left" width="96" height="96" hspace="10" style="max-width: 100%;"></a> <strong>Issue by <a href="https://github.com/collinjackson">collinjackson</a></strong><br> <em>Wednesday Aug 12, 2015 at 21:03 GMT</em><br> <em>Originally opened as <a href="https://github.com/flutter/engine/issues/580">https://github.com/flutter/engine/issues/580</a></em></p> <hr> <p dir="auto">jackson-macpro:playfair jackson$ dart --version<br> Dart VM version: 1.11.0-dev.3.0 (Thu May 28 03:42:12 2015) on "macos_x64"</p> <p dir="auto">jackson-macpro:playfair jackson$ pub run test test/playfair_test.dart<br> Wrong script snapshot version, expected '146df3da808a6da22679d25262d18cfb' found '6ab2a2a1aedc6faea804a9c1850edf4b'<br> 00:00 +0 -1: loading test/playfair_test.dart<br> Failed to load "test/playfair_test.dart":<br> The built-in library 'dart:sky' is not available on the stand-alone VM.<br> 'package:playfair/playfair.dart': error: line 7 pos 1: library handler failed<br> import 'dart:sky' as sky;<br> ^<br> 00:00 +0 -1: Some tests failed.</p> <p dir="auto">If we included the Sky shell executable in the Sky package we could run these tests.</p>
<p dir="auto">Device: <strong>iOS Simulator</strong></p> <p dir="auto"><strong>Sorry there isn't any log or error message here as nothing is being emitted from Flutter.</strong></p> <p dir="auto">I am getting a weird crash when using a <code class="notranslate">RefreshIndicator</code> attached to a <code class="notranslate">get</code> http action. The crash doesn't occur until I tap on a <code class="notranslate">TabBar</code> that has a listener attached to it. I'm not sure if that is relevant but its the only thing that will cause a crash.</p> <p dir="auto">The following is the refresh indicator code.</p> <p dir="auto">Please let me know what other information I can provide.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Future&lt;Null&gt; _handleRefresh() { Completer&lt;Null&gt; completer = new Completer&lt;Null&gt;(); get(&quot;http://api.myapp.com/endpoint&quot;).then((response) { print(&quot;loaded data&quot;); return response.body; }) .then((jsonString) { print(jsonString) }) .then((_) =&gt; completer.complete()); return completer.future; } @override Widget build(BuildContext context) { return new Padding( padding: EdgeInsets.zero, child: new RefreshIndicator( onRefresh: _handleRefresh, child: new ListView( children: _cells, ), ) ); }"><pre class="notranslate"><code class="notranslate"> Future&lt;Null&gt; _handleRefresh() { Completer&lt;Null&gt; completer = new Completer&lt;Null&gt;(); get("http://api.myapp.com/endpoint").then((response) { print("loaded data"); return response.body; }) .then((jsonString) { print(jsonString) }) .then((_) =&gt; completer.complete()); return completer.future; } @override Widget build(BuildContext context) { return new Padding( padding: EdgeInsets.zero, child: new RefreshIndicator( onRefresh: _handleRefresh, child: new ListView( children: _cells, ), ) ); } </code></pre></div>
0