text1
stringlengths 0
536k
| text2
stringlengths 0
536k
| label
int64 0
1
|
---|---|---|
<p dir="auto">I downloaded neo4j-master from github, today.<br>
Within neo4j-master there is a directory : neo4j-master/community/io/src/main/java/org/neo4j/io</p>
<p dir="auto">I also obtained the community edition 2.16, which should contain all the jars for neo4j projects.<br>
However, there is no neo4j.io.jar corresponding to the neo4j-master code above.</p>
<p dir="auto">I tried to compile neo4j-master/community/embedded-examples/src/main/java/org/neo4j/examples/NewMatrix.java<br>
The last import :: "import org.neo4j.io.fs.FileUtils;" was missing.</p>
<p dir="auto">I obtained neo4j-io-2.2.0-M02.jar from <a href="http://mvnrepository.com/artifact/org.neo4j/neo4j-io/2.2.0-M02" rel="nofollow">http://mvnrepository.com/artifact/org.neo4j/neo4j-io/2.2.0-M02</a><br>
and added it to my project. The project then compiled and ran fine...<br>
Further, the online javadoc for neo4j 2.16 does not cover package org.neo4j.io<br>
(<a href="http://neo4j.com/docs/2.1.6/javadocs/" rel="nofollow">http://neo4j.com/docs/2.1.6/javadocs/</a>)</p>
<p dir="auto">It would be nice if there was a community version of neo4j which would compile the examples, out of the box.</p> | <p dir="auto">I have a total of 200,001 nodes out of which one node joins with 200,000 other nodes. so 200,000 relationships total.</p>
<p dir="auto">All these nodes are coming from Kafka so my Kafka Consumer reads a set of nodes(a batch) from Kafka and applies the following operation.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MATCH (a:Dense1) where a.id <> "1"
WITH a
MATCH (b:Dense1) where b.id = "1"
WITH a,b
WHERE a.key = b.key
MERGE (a)-[:PARENT_OF]->(b)"><pre class="notranslate"><code class="notranslate">MATCH (a:Dense1) where a.id <> "1"
WITH a
MATCH (b:Dense1) where b.id = "1"
WITH a,b
WHERE a.key = b.key
MERGE (a)-[:PARENT_OF]->(b)
</code></pre></div>
<p dir="auto">And this takes forever to build 200,001 relationships both with index or without index on id and key. If I change <code class="notranslate">Merge</code> to <code class="notranslate">CREATE</code> then it is super quick(the fastest)! however, since I have to read a batch from kafka and apply the same operation incrementally the relationships are getting duplicated if I use <code class="notranslate">CREATE</code> for every batch.</p>
<p dir="auto">Ideally, if a relationship exists I don't want Neo4j to do anything or even better throw an exception or something to the client driver that way application can do something useful with it. I also tried changing <code class="notranslate">MERGE</code> to <code class="notranslate">CREATE UNIQUE</code> in the above code it is 50% faster than <code class="notranslate">MERGE</code> but still slow compared to <code class="notranslate">CREATE</code>.</p>
<p dir="auto">If <code class="notranslate">MERGE</code> is this slow due to double locking as explained <a href="https://stackoverflow.com/questions/56884135/creating-200k-relationships-to-a-node-is-taking-a-lot-of-time-in-neo4j-3-5/56910110" rel="nofollow">here</a> Then it almost becomes unusable.</p>
<p dir="auto">Any approach to make it better would be great!</p> | 0 |
<p dir="auto">It would be awesome if there is an option for an off-canvas navigation. There is nothing wrong with the current dropdown style navigation in mobile and I'm not against it, I just like the off-canvas style more.</p>
<p dir="auto">Of course this would not be applicable for every website, but same as the dropdown style either. So it would be good if we can have an option depending on what kind of website we are working on. In my own opinion, the off-canvas style is more "mobile" than the dropdown because we can see it more often in mobile apps.</p>
<p dir="auto">Here is a very good example:<br>
<a href="http://designmodo.github.io/startup-demo/framework/samples/sample-04/index.html" rel="nofollow">http://designmodo.github.io/startup-demo/framework/samples/sample-04/index.html</a><br>
As you can see the links automatically becomes the off-canvas navigation when in small screen.</p>
<p dir="auto">Anyone with me?</p> | <p dir="auto">Please make lateral the navbar when it collapses on mobile devices such as foundation or purecss.<br>
Tks</p> | 1 |
<h2 dir="auto">Feature request</h2>
<p dir="auto">add "hot module introspection"<br>
as a feedback channel from browser to editor</p>
<p dir="auto"><strong>situation in my code editor</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Class1 {constructor() {this.key1 = 'val1'}};
class Class2 {constructor() {this.key2 = 'val2'}};
obj1 = new Class1();
obj2 = new Class2();
obj1.k
// ^
// at this point i want "hot code completion" in my code editor
// so only "key1" is suggested, but not "key2"
// code introspection at runtime
Object.keys(obj1)
// = [ 'key1' ]
// the node.js shell can do it
obj1.k
// ^
// the tab-key does the right completion to "key1""><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Class1</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-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">key1</span> <span class="pl-c1">=</span> <span class="pl-s">'val1'</span><span class="pl-kos">}</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">class</span> <span class="pl-v">Class2</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-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">key2</span> <span class="pl-c1">=</span> <span class="pl-s">'val2'</span><span class="pl-kos">}</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-s1">obj1</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Class1</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">obj2</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Class2</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">obj1</span><span class="pl-kos">.</span><span class="pl-c1">k</span>
<span class="pl-c">// ^</span>
<span class="pl-c">// at this point i want "hot code completion" in my code editor</span>
<span class="pl-c">// so only "key1" is suggested, but not "key2"</span>
<span class="pl-c">// code introspection at runtime</span>
<span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">keys</span><span class="pl-kos">(</span><span class="pl-s1">obj1</span><span class="pl-kos">)</span>
<span class="pl-c">// = [ 'key1' ]</span>
<span class="pl-c">// the node.js shell can do it</span>
<span class="pl-s1">obj1</span><span class="pl-kos">.</span><span class="pl-c1">k</span>
<span class="pl-c">// ^</span>
<span class="pl-c">// the tab-key does the right completion to "key1"</span></pre></div>
<p dir="auto"><strong>Ideal?</strong></p>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="obj1.k
// ^
// at this point i want "hot code completion" in my code editor
// so only "key1" is suggested, but not "key2""><pre class="notranslate"><span class="pl-s1">obj1</span><span class="pl-kos">.</span><span class="pl-c1">k</span>
<span class="pl-c">// ^</span>
<span class="pl-c">// at this point i want "hot code completion" in my code editor</span>
<span class="pl-c">// so only "key1" is suggested, but not "key2"</span></pre></div>
<p dir="auto">as far as i know<br>
all code editors fail at this point of "dynamic code analysis"<br>
the best they can offer is: <code class="notranslate">key1</code> or <code class="notranslate">key2</code></p>
<p dir="auto">vscode and eclipse do this by default<br>
vscode calls this "intellisense text suggestions"</p>
<p dir="auto">but i dont want to be limited by "static code analysis"<br>
when the program is started anyway, after every file change</p>
<p dir="auto"><strong>Solution?</strong></p>
<p dir="auto"><strong>How should this be implemented in your opinion?</strong></p>
<p dir="auto">extend the "hot module replacement" system<br>
to feed back "hot module introspection" data to the editor</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12958815/70218504-613f2f80-1743-11ea-9d66-a725eb8b558f.jpg"><img src="https://user-images.githubusercontent.com/12958815/70218504-613f2f80-1743-11ea-9d66-a725eb8b558f.jpg" alt="js-webpack-hmr--hot-module-introspection-feedback" style="max-width: 100%;"></a></p>
<p dir="auto">this introspection-data can be sent over http<br>
so the editor has a keep-alive connection<br>
and is waiting for the server to push new introspection data</p>
<p dir="auto">.... or use the browser as code editor, using <a href="https://codemirror.net/demo/tern.html" rel="nofollow">CodeMirror</a><br>
and show the program inside a frame, like on jsfiddle.net<br>
[ the code completion function of codemirror seems broken to me ]</p>
<p dir="auto">the data format should be optimized for machine-readability<br>
for example by using length-prefixed lists and strings,<br>
like in BSON, messagepack, python-pickle, EXI, flatbuffers, ....</p>
<p dir="auto">in an ideal world, the javascript runtime does offer a fast way<br>
to access the "internal representation" of the running program</p>
<p dir="auto"><strong>limits</strong></p>
<p dir="auto">introspection requires a valid program,<br>
so you must have a running "last version"<br>
to provide introspection data for your not-running "current version"</p>
<p dir="auto"><strong>potential problems</strong></p>
<p dir="auto">circular references must be detected and handled<br>
like <code class="notranslate">object.child.parent.child.parent.child</code>....</p>
<p dir="auto"><strong>related</strong></p>
<p dir="auto"><a href="https://stackoverflow.com/questions/15690706/recursively-looping-through-an-object-to-build-a-property-list" rel="nofollow">recursive introspection in javascript</a></p>
<p dir="auto"><a href="https://stackoverflow.com/questions/8024149/is-it-possible-to-get-the-non-enumerable-inherited-property-names-of-an-object" rel="nofollow">get inherited properties of javascript objects</a></p>
<p dir="auto"><a href="https://news.ycombinator.com/item?id=16289698" rel="nofollow">VS Code to autocomplete JavaScript class 'this' properties automatically</a><br>
-- "doesn't work too well if you bind things to the class at runtime"</p>
<p dir="auto"><a href="https://www.youtube.com/watch?v=j-kj2qwJa_E&t=228s" rel="nofollow">the ahaa moment of hot reloading in clojurescript/figwheel, by bruce hauman</a></p>
<p dir="auto"><strong>Why?</strong></p>
<p dir="auto"><strong>What is motivation or use case for adding/changing the behavior?</strong></p>
<p dir="auto">this allows for "zero knowledge programming"</p>
<p dir="auto">let the machine do the boring-precise part of<br>
"how did i call this property? where is it hidden?"<br>
and focus on the creative-fuzzy part of<br>
"let me just add something like ...."</p>
<p dir="auto">this also makes it much easier to learn new libraries.<br>
instead of depending on good documentation,<br>
you can make full use of the existing introspection functions.</p>
<p dir="auto">for "distant properties" who are hidden in child/parent objects,<br>
you can browse a "map of properties", like a mind-map.</p>
<p dir="auto">also, why not? : P</p>
<p dir="auto"><strong>Are you willing to work on this yourself?</strong></p>
<p dir="auto">no, not today.<br>
i hope that the "insider people" can solve this much faster than me<br>
and i can avoid digging into unfamiliar projects</p>
<p dir="auto"><strong>more keywords</strong></p>
<p dir="auto">code hinting, runtime analysis, dynamic analysis, runtime introspection, live object introspection, hierarchy of variable names, javascript object graph</p> | <h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<p dir="auto">Many modules published to npm are using "auto" exports (<a href="https://rollupjs.org/guide/en#output-exports-exports" rel="nofollow">https://rollupjs.org/guide/en#output-exports-exports</a>, but there is also a popular babel plugin which adds this behaviour <a href="https://github.com/59naga/babel-plugin-add-module-exports#readme">https://github.com/59naga/babel-plugin-add-module-exports#readme</a>) which is supposed to ease interop with node (removing "pesky" <code class="notranslate">.default</code> for CJS consumers when there is only a default export in the module).</p>
<p dir="auto">And with that depending on a package authored <strong>solely</strong> in CJS (which still is really common) which depends on a package authored using the mentioned "auto" mode is dangerous and broken.</p>
<p dir="auto">Why? Because webpack is using the "module" entry from package.json (thus using real default export) without checking the requester module type (which is cjs here). CJS requester did not use a <code class="notranslate">.default</code> when requiring the package with auto mode, because from its perspective there was no such thing.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<p dir="auto"><a href="https://github.com/Andarist/webpack-module-entry-from-cjs-issue">https://github.com/Andarist/webpack-module-entry-from-cjs-issue</a> . Exported value should be <code class="notranslate">"foobar42"</code> instead of <code class="notranslate">"foo[object Module]42"</code></p>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">Webpack should deopt (ignoring .mjs & "module") its requiring behaviour based on the requester type.</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: latest<br>
Node.js version: irrelevant<br>
Operating System: irrelevant<br>
Additional tools: irrelevant</p>
<p dir="auto">Mentioning rollup team as probably its the tool outputting the most auto mode libraries ( <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lukastaegert/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lukastaegert">@lukastaegert</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/guybedford/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/guybedford">@guybedford</a> ) and <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/developit/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/developit">@developit</a> (who I think might be interested in the discussion).</p> | 0 |
<p dir="auto">In a number of places, sklearn controls flow according to the existence of some method on an estimator. For example: <code class="notranslate">*SearchCV.score</code> checks for <code class="notranslate">score</code> on the estimator; <code class="notranslate">Scorer</code> and <code class="notranslate">multiclass</code> functions check for <code class="notranslate">decision_function</code>; and it is used for validation in <code class="notranslate">AdaBoostClassifier.fit</code>, <code class="notranslate">multiclass._check_estimator</code> and <code class="notranslate">Pipeline</code>; and for testing in <code class="notranslate">test_common</code>.</p>
<p dir="auto">Meta-estimators such as <code class="notranslate">*SearchCV</code>, <code class="notranslate">Pipeline</code>, <code class="notranslate">RFECV</code>, etc. should respond to such <code class="notranslate">hasattr</code>s in agreement with their underlying estimators (or else the <code class="notranslate">hasattr</code> approach should be avoided).</p>
<p dir="auto">This is possible by implementing such methods with a <code class="notranslate">property</code> that returns the correct method from the sub-estimator (or a closure around it), or raises <code class="notranslate">AttributeError</code> if the sub-estimator is found lacking (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="12308912" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/1801" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/1801/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/1801">#1801</a>). <code class="notranslate">hasattr</code> would then function correctly. Caveats: the code would be less straightforward in some cases; <code class="notranslate">help()</code>/<code class="notranslate">pydoc</code> won't show the methods as methods (with an argument list, etc.), though the <code class="notranslate">property</code>'s docstring will show.</p> | <h3 dir="auto">Describe the bug</h3>
<p dir="auto">For some samples and requested n_clusters MiniBatchKMeans does not return a proper clustering in terms of the number of clusters and consecutive labels.<br>
The example given below shows, that when requesting 11 clusters the result only consists of 9 and requesting 12 results in 11 clusters. Requesting 13 clusters then yields only 10 clusters.<br>
When using KMeans instead of MiniBatchKMeans there is no such issue.</p>
<h3 dir="auto">Steps/Code to Reproduce</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
from sklearn.cluster import MiniBatchKMeans
points = [
[-2636.705, 892.6364, 239.4284], [-2676.219, 922.741, 227.3839], [-2628.628, 902.6482, 245.5609], [-2612.497, 860.9032, 248.924],
[-2639.552, 993.8482, 211.2253], [-2602.453, 958.7801, 211.5786], [-2598.118, 1032.398, 177.4023], [-2582.155, 972.5088, 203.5048],
[-2548.377, 803.9934, 279.4388], [-2550.095, 979.9586, 222.6467], [-2746.966, 1021.456, 188.8456], [-2745.181, 984.1931, 199.6674],
[-2729.113, 973.8251, 201.8876], [-2720.765, 1014.262, 205.0213], [-2747.317, 1099.313, 146.2305], [-2739.32, 1005.173, 200.297]
]
for numClusters in range(7, 17):
model = MiniBatchKMeans(n_clusters=numClusters, random_state=0)
clusters = model.fit_predict(points)
unique = np.unique(clusters)
print("requested", str(numClusters).rjust(2), "clusters and result has", str(len(unique)).rjust(2), "clusters with labels", unique)"><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">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">cluster</span> <span class="pl-k">import</span> <span class="pl-v">MiniBatchKMeans</span>
<span class="pl-s1">points</span> <span class="pl-c1">=</span> [
[<span class="pl-c1">-</span><span class="pl-c1">2636.705</span>, <span class="pl-c1">892.6364</span>, <span class="pl-c1">239.4284</span>], [<span class="pl-c1">-</span><span class="pl-c1">2676.219</span>, <span class="pl-c1">922.741</span>, <span class="pl-c1">227.3839</span>], [<span class="pl-c1">-</span><span class="pl-c1">2628.628</span>, <span class="pl-c1">902.6482</span>, <span class="pl-c1">245.5609</span>], [<span class="pl-c1">-</span><span class="pl-c1">2612.497</span>, <span class="pl-c1">860.9032</span>, <span class="pl-c1">248.924</span>],
[<span class="pl-c1">-</span><span class="pl-c1">2639.552</span>, <span class="pl-c1">993.8482</span>, <span class="pl-c1">211.2253</span>], [<span class="pl-c1">-</span><span class="pl-c1">2602.453</span>, <span class="pl-c1">958.7801</span>, <span class="pl-c1">211.5786</span>], [<span class="pl-c1">-</span><span class="pl-c1">2598.118</span>, <span class="pl-c1">1032.398</span>, <span class="pl-c1">177.4023</span>], [<span class="pl-c1">-</span><span class="pl-c1">2582.155</span>, <span class="pl-c1">972.5088</span>, <span class="pl-c1">203.5048</span>],
[<span class="pl-c1">-</span><span class="pl-c1">2548.377</span>, <span class="pl-c1">803.9934</span>, <span class="pl-c1">279.4388</span>], [<span class="pl-c1">-</span><span class="pl-c1">2550.095</span>, <span class="pl-c1">979.9586</span>, <span class="pl-c1">222.6467</span>], [<span class="pl-c1">-</span><span class="pl-c1">2746.966</span>, <span class="pl-c1">1021.456</span>, <span class="pl-c1">188.8456</span>], [<span class="pl-c1">-</span><span class="pl-c1">2745.181</span>, <span class="pl-c1">984.1931</span>, <span class="pl-c1">199.6674</span>],
[<span class="pl-c1">-</span><span class="pl-c1">2729.113</span>, <span class="pl-c1">973.8251</span>, <span class="pl-c1">201.8876</span>], [<span class="pl-c1">-</span><span class="pl-c1">2720.765</span>, <span class="pl-c1">1014.262</span>, <span class="pl-c1">205.0213</span>], [<span class="pl-c1">-</span><span class="pl-c1">2747.317</span>, <span class="pl-c1">1099.313</span>, <span class="pl-c1">146.2305</span>], [<span class="pl-c1">-</span><span class="pl-c1">2739.32</span>, <span class="pl-c1">1005.173</span>, <span class="pl-c1">200.297</span>]
]
<span class="pl-k">for</span> <span class="pl-s1">numClusters</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">7</span>, <span class="pl-c1">17</span>):
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-v">MiniBatchKMeans</span>(<span class="pl-s1">n_clusters</span><span class="pl-c1">=</span><span class="pl-s1">numClusters</span>, <span class="pl-s1">random_state</span><span class="pl-c1">=</span><span class="pl-c1">0</span>)
<span class="pl-s1">clusters</span> <span class="pl-c1">=</span> <span class="pl-s1">model</span>.<span class="pl-en">fit_predict</span>(<span class="pl-s1">points</span>)
<span class="pl-s1">unique</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">unique</span>(<span class="pl-s1">clusters</span>)
<span class="pl-en">print</span>(<span class="pl-s">"requested"</span>, <span class="pl-en">str</span>(<span class="pl-s1">numClusters</span>).<span class="pl-en">rjust</span>(<span class="pl-c1">2</span>), <span class="pl-s">"clusters and result has"</span>, <span class="pl-en">str</span>(<span class="pl-en">len</span>(<span class="pl-s1">unique</span>)).<span class="pl-en">rjust</span>(<span class="pl-c1">2</span>), <span class="pl-s">"clusters with labels"</span>, <span class="pl-s1">unique</span>)</pre></div>
<h3 dir="auto">Expected Results</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="requested 7 clusters and result has 7 clusters with labels [ 0 1 2 3 4 5 6]
requested 8 clusters and result has 8 clusters with labels [ 0 1 2 3 4 5 6 7]
requested 9 clusters and result has 9 clusters with labels [ 0 1 2 3 4 5 6 7 8]
requested 10 clusters and result has 10 clusters with labels [ 0 1 2 3 4 5 6 7 8 9]
requested 11 clusters and result has 11 clusters with labels [ 0 1 2 3 4 5 6 7 8 9 10]
requested 12 clusters and result has 12 clusters with labels [ 0 1 2 3 4 5 6 7 8 9 10 11]
requested 13 clusters and result has 13 clusters with labels [ 0 1 2 3 4 5 6 7 8 9 10 11 12]
requested 14 clusters and result has 14 clusters with labels [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13]
requested 15 clusters and result has 15 clusters with labels [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14]
requested 16 clusters and result has 16 clusters with labels [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]"><pre class="notranslate"><code class="notranslate">requested 7 clusters and result has 7 clusters with labels [ 0 1 2 3 4 5 6]
requested 8 clusters and result has 8 clusters with labels [ 0 1 2 3 4 5 6 7]
requested 9 clusters and result has 9 clusters with labels [ 0 1 2 3 4 5 6 7 8]
requested 10 clusters and result has 10 clusters with labels [ 0 1 2 3 4 5 6 7 8 9]
requested 11 clusters and result has 11 clusters with labels [ 0 1 2 3 4 5 6 7 8 9 10]
requested 12 clusters and result has 12 clusters with labels [ 0 1 2 3 4 5 6 7 8 9 10 11]
requested 13 clusters and result has 13 clusters with labels [ 0 1 2 3 4 5 6 7 8 9 10 11 12]
requested 14 clusters and result has 14 clusters with labels [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13]
requested 15 clusters and result has 15 clusters with labels [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14]
requested 16 clusters and result has 16 clusters with labels [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]
</code></pre></div>
<h3 dir="auto">Actual Results</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="requested 7 clusters and result has 7 clusters with labels [ 0 1 2 3 4 5 6]
requested 8 clusters and result has 7 clusters with labels [ 0 1 3 4 5 6 7]
requested 9 clusters and result has 9 clusters with labels [ 0 1 2 3 4 5 6 7 8]
requested 10 clusters and result has 10 clusters with labels [ 0 1 2 3 4 5 6 7 8 9]
requested 11 clusters and result has 9 clusters with labels [ 0 1 2 3 5 6 7 8 9]
requested 12 clusters and result has 11 clusters with labels [ 1 2 3 4 5 6 7 8 9 10 11]
requested 13 clusters and result has 10 clusters with labels [ 0 2 4 5 6 7 9 10 11 12]
requested 14 clusters and result has 12 clusters with labels [ 1 2 3 4 5 6 7 8 9 10 11 12]
requested 15 clusters and result has 11 clusters with labels [ 0 1 3 4 6 7 8 10 11 12 14]
requested 16 clusters and result has 13 clusters with labels [ 0 1 3 4 5 6 7 9 10 11 12 13 15]"><pre class="notranslate"><code class="notranslate">requested 7 clusters and result has 7 clusters with labels [ 0 1 2 3 4 5 6]
requested 8 clusters and result has 7 clusters with labels [ 0 1 3 4 5 6 7]
requested 9 clusters and result has 9 clusters with labels [ 0 1 2 3 4 5 6 7 8]
requested 10 clusters and result has 10 clusters with labels [ 0 1 2 3 4 5 6 7 8 9]
requested 11 clusters and result has 9 clusters with labels [ 0 1 2 3 5 6 7 8 9]
requested 12 clusters and result has 11 clusters with labels [ 1 2 3 4 5 6 7 8 9 10 11]
requested 13 clusters and result has 10 clusters with labels [ 0 2 4 5 6 7 9 10 11 12]
requested 14 clusters and result has 12 clusters with labels [ 1 2 3 4 5 6 7 8 9 10 11 12]
requested 15 clusters and result has 11 clusters with labels [ 0 1 3 4 6 7 8 10 11 12 14]
requested 16 clusters and result has 13 clusters with labels [ 0 1 3 4 5 6 7 9 10 11 12 13 15]
</code></pre></div>
<h3 dir="auto">Versions</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="System:
python: 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:20:16) [MSC v.1916 64 bit (AMD64)]
executable: C:\Users\USER\.conda\envs\sklearn-env\python.exe
machine: Windows-10-10.0.22000-SP0
Python dependencies:
pip: 21.3.1
setuptools: 58.5.3
sklearn: 1.0.1
numpy: 1.21.4
scipy: 1.7.2
Cython: None
pandas: None
matplotlib: 3.4.3
joblib: 1.1.0
threadpoolctl: 3.0.0
Built with OpenMP: True"><pre class="notranslate">System:
python: 3.9.7 <span class="pl-k">|</span> packaged by conda-forge <span class="pl-k">|</span> (default, Sep 29 2021, 19:20:16) [MSC v.1916 64 bit (AMD64)]
executable: C:<span class="pl-cce">\U</span>sers<span class="pl-cce">\U</span>SER<span class="pl-cce">\.</span>conda<span class="pl-cce">\e</span>nvs<span class="pl-cce">\s</span>klearn-env<span class="pl-cce">\p</span>ython.exe
machine: Windows-10-10.0.22000-SP0
Python dependencies:
pip: 21.3.1
setuptools: 58.5.3
sklearn: 1.0.1
numpy: 1.21.4
scipy: 1.7.2
Cython: None
pandas: None
matplotlib: 3.4.3
joblib: 1.1.0
threadpoolctl: 3.0.0
Built with OpenMP: True</pre></div> | 0 |
<p dir="auto">I was hoping to find a routine in base that would give me the first <code class="notranslate">k</code> elements of <code class="notranslate">sortperm(v)</code>.</p>
<p dir="auto">This would be much like <code class="notranslate">select(v, 1:k)</code>, but instead of returning the actual elements, it would return the index where those elements can be found.</p>
<p dir="auto">Does such a function exist?</p> | <p dir="auto">One of the first things we need to do is make the runtime thread safe. This work is on the <code class="notranslate">threads</code> branch, and this tracker predates the new GC. I thought it is worth capturing a tracker that <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/StefanKarpinski/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/StefanKarpinski">@StefanKarpinski</a> prepared earlier in an issue to ease the thread safety work.</p>
<p dir="auto">This list is organized as <code class="notranslate">Variable; Approach</code></p>
<h1 dir="auto">builtins.c</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> extern size_t jl_page_size; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> extern int jl_in_inference; lock</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> extern int jl_boot_file_loaded; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> int in_jl_ = 0; thread-local</li>
</ul>
<h1 dir="auto">ccall.cpp</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static std::mapstd::stringstd::string sonameMap; lock</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static bool got_sonames = false; lock, write-once</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static std::mapstd::stringuv_lib_t* libMap; lock</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static std::mapstd::stringGlobalVariable* libMapGV; lock</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static std::mapstd::stringGlobalVariable* symMapGV; lock</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <del>static char *temp_arg_area; thread-local (will be deleted very soon)</del></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <del>static const uint32_t arg_area_sz = 4196; constant (will be deleted very soon)</del></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <del>static uint32_t arg_area_loc; thread-local (will be deleted very soon)</del></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <del>static void *temp_arg_blocks[N_TEMP_ARG_BLOCKS]; thread-local (will be deleted very soon)</del></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <del>static uint32_t arg_block_n = 0; thread-local (will be deleted very soon)</del></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <del>static Function *save_arg_area_loc_func; constant (will be deleted very soon)</del></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <del>static Function *restore_arg_area_loc_func; constant (will be deleted very soon)</del></li>
</ul>
<h1 dir="auto">cgutils.cpp</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static std::map<const std::stringGlobalVariable*> stringConstants; lock</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static std::map<void*jl_value_llvm> jl_value_to_llvm; lock</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static std::map<Value <em>void</em>> llvm_to_jl_value; lock</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static std::vector<Constant*> jl_sysimg_gvars; lock</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static std::map<intjl_value_t*> typeIdToType; lock</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> jl_array_t *typeToTypeId; lock</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static int cur_type_id = 1; lock</li>
</ul>
<h1 dir="auto">codegen.cpp</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> void *__stack_chk_guard = NULL; thread-local (jwn: why is this on the list? it's a constant and not thread local)</li>
</ul>
<h1 dir="auto">debuginfo.cpp</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> extern "C" volatile int jl_in_stackwalk;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> JuliaJITEventListener *jl_jit_events;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static obfiletype objfilemap;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> extern char *jl_sysimage_name; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static logdata_t coverageData;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static logdata_t mallocData;</li>
</ul>
<h1 dir="auto">dump.c</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static jl_array_t *tree_literal_values=NULL; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static jl_value_t *jl_idtable_type=NULL; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static jl_array_t *datatype_list=NULL; thread 0 only</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> jl_value_t ***sysimg_gvars = NULL; thread 0 only</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> extern int globalUnique; thread 0 only</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static size_t delayed_fptrs_n = 0; thread 0 only</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static size_t delayed_fptrs_max = 0; thread 0 only</li>
</ul>
<h1 dir="auto">gc.c</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static volatile size_t allocd_bytes = 0; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static volatile int64_t total_allocd_bytes = 0; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static int64_t last_gc_total_bytes = 0; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static size_t freed_bytes = 0; barrier</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static uint64_t total_gc_time=0; barrier</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> int jl_in_gc=0; * referenced from switchto task.c barrier</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static htable_t obj_counts; barrier</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static size_t total_freed_bytes=0; barrier</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static arraylist_t to_finalize; barrier</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static jl_value_t **mark_stack = NULL; barrier</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static size_t mark_stack_size = 0; barrier</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static size_t mark_sp = 0; barrier</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> extern jl_module_t *jl_old_base_module; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> extern jl_array_t *typeToTypeId; barrier</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> extern jl_array_t *jl_module_init_order; barrier</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static int is_gc_enabled = 1; atomic</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static double process_t0; constant</li>
</ul>
<h1 dir="auto">init.c</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> char *jl_stack_lo; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> char *jl_stack_hi; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> volatile sig_atomic_t jl_signal_pending = 0; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> volatile sig_atomic_t jl_defer_signal = 0; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> uv_loop_t *jl_io_loop; I/O thread ?</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static void *signal_stack; thread-local (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="54277793" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/9763" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/9763/hovercard?comment_id=69864396&comment_type=issue_comment" href="https://github.com/JuliaLang/julia/issues/9763#issuecomment-69864396">#9763 (comment)</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static mach_port_t segv_port = 0; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> extern void * __stack_chk_guard; thread-local (duplicate of above)</li>
</ul>
<h1 dir="auto">jltypes.c</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> int inside_typedef = 0; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static int match_intersection_mode = 0; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static int has_ntuple_intersect_tuple = 0; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static int t_uid_ctr = 1; lock</li>
</ul>
<h1 dir="auto">llvm-simdloop.cpp</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static unsigned simd_loop_mdkind = 0; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static MDNode* simd_loop_md = NULL; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> char LowerSIMDLoop::ID = 0; lock</li>
</ul>
<h1 dir="auto">module.c</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> jl_module_t *jl_main_module=NULL; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> jl_module_t *jl_core_module=NULL; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> jl_module_t *jl_base_module=NULL; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> jl_module_t *jl_current_module=NULL; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> jl_array_t *jl_module_init_order = NULL; lock (this code is bady broken anyways: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="54539866" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/9799" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/9799/hovercard" href="https://github.com/JuliaLang/julia/issues/9799">#9799</a>)</li>
</ul>
<h1 dir="auto">profile.c</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static volatile ptrint_t* bt_data_prof = NULL;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static volatile size_t bt_size_max = 0;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static volatile size_t bt_size_cur = 0;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static volatile u_int64_t nsecprof = 0;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static volatile int running = 0;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> volatile HANDLE hBtThread = 0;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static pthread_t profiler_thread;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static mach_port_t main_thread;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> clock_serv_t clk;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static int profile_started = 0;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static mach_port_t profile_port = 0;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> volatile static int forceDwarf = -2;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> volatile mach_port_t mach_profiler_thread = 0;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static unw_context_t profiler_uc;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> mach_timespec_t timerprof;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> struct itimerval timerprof;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static timer_t timerprof;</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static struct itimerspec itsprof;</li>
</ul>
<h1 dir="auto">sys.c</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> JL_STREAM *JL_STDIN=0; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> JL_STREAM *JL_STDOUT=0; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> JL_STREAM *JL_STDERR=0; constant</li>
</ul>
<h1 dir="auto">task.c</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> volatile int jl_in_stackwalk = 0; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static size_t _frame_offset; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> DLLEXPORT jl_task_t * volatile jl_current_task; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> jl_task_t *jl_root_task; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> jl_value_t * volatile jl_task_arg_in_transit; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> jl_value_t *jl_exception_in_transit; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> __JL_THREAD jl_gcframe_t *jl_pgcstack = NULL; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> jl_jmp_buf * volatile jl_jmp_target; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> extern int jl_in_gc; barrier</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static jl_function_t *task__hook_func=NULL; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> ptrint_t bt_data[MAX_BT_SIZE+1]; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> size_t bt_size = 0; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> int needsSymRefreshModuleList; lock</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> jl_function_t *jl_unprotect_stack_func; constant</li>
</ul>
<h1 dir="auto">toplevel.c</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> int jl_lineno = 0; thread-local</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> jl_module_t *jl_old_base_module = NULL; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> jl_module_t *jl_internal_main_module = NULL; constant</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> extern int jl_in_inference; lock</li>
</ul> | 0 |
<p dir="auto"><a href="https://github.com/kennethreitz/requests/pull/1103#issuecomment-12370830">Comment by Kenneth Reitz</a>:</p>
<blockquote>
<p dir="auto">We need to support MultiDict. This is long overdue.</p>
</blockquote> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Duplicate #6261"><pre class="notranslate"><code class="notranslate"> Duplicate #6261
</code></pre></div>
<p dir="auto">Nate: Sorry i posted duplicate. Probably posted in the wrong place. Newbie and my first post on the forum.<br>
You closed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1506909615" data-permission-text="Title is private" data-url="https://github.com/psf/requests/issues/6314" data-hovercard-type="issue" data-hovercard-url="/psf/requests/issues/6314/hovercard" href="https://github.com/psf/requests/issues/6314">#6314</a> as duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1416344534" data-permission-text="Title is private" data-url="https://github.com/psf/requests/issues/6261" data-hovercard-type="pull_request" data-hovercard-url="/psf/requests/pull/6261/hovercard" href="https://github.com/psf/requests/pull/6261">#6261</a>. I was not making a feature request but seeking help.<br>
I was hoping to get help in solving the issue I am experiencing with RequestsDependencyWarning error messages.</p> | 0 |
<p dir="auto">In some case a DataFrame exported to excel present some bad values.<br>
It's is not a problem of Excel reading (the data inside the sheet1.xml of the .xlsx file is also incorrect).</p>
<p dir="auto">The same DataFrame exported to ".csv" is correct.</p>
<p dir="auto">The problem could be "solved" by renaming the column header as [col-1, col-2,...]. Maybe an encoding problem ?</p>
<p dir="auto">The issue is that there is no warning/error during the export. It's very easy to miss it.</p>
<p dir="auto">To reproduce:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pandas as pd
df = pd.read_pickle('problematic_df.pkl')
df.to_excel('problematic_df.xlsx')
df.to_csv('problematic_df.csv')"><pre class="notranslate"><code class="notranslate">import pandas as pd
df = pd.read_pickle('problematic_df.pkl')
df.to_excel('problematic_df.xlsx')
df.to_csv('problematic_df.csv')
</code></pre></div>
<p dir="auto">with the file available here: <a href="https://drive.google.com/file/d/0Bzz_ZaP_wS_HMFdlMkVzaTR0cjA/view?usp=sharing" rel="nofollow">https://drive.google.com/file/d/0Bzz_ZaP_wS_HMFdlMkVzaTR0cjA/view?usp=sharing</a></p>
<p dir="auto">Note that the content of cell M14 is different in both file (at least when run on my computer)</p>
<p dir="auto">Using:</p>
<ul dir="auto">
<li>Python 3.4.3 |Anaconda 2.3.0 (64-bit)</li>
<li>pandas 0.16.2</li>
<li>Windows 7 64 bits</li>
</ul> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="store_id_map"><pre class="notranslate"><code class="notranslate">store_id_map
</code></pre></div>
<blockquote>
<p dir="auto"><class 'pandas.io.pytables.HDFStore'><br>
File path: C:\output\identifier_map.h5<br>
/identifier_map frame_table (typ->appendable_multi,nrows->26779823,ncols->9,indexers->[index],dc->[RefIdentifierID])</p>
</blockquote>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="store_id_map.select('identifier_map')"><pre class="notranslate"><code class="notranslate">store_id_map.select('identifier_map')
</code></pre></div>
<blockquote>
<hr>
<p dir="auto">KeyError Traceback (most recent call last)<br>
in ()<br>
----> 1 store_id_map.select('identifier_map')</p>
<p dir="auto">C:\Python27\lib\site-packages\pandas\io\pytables.pyc in select(self, key, where, start, stop, columns, iterator, chunksize, auto_close, *_kwargs)<br>
456 return TableIterator(self, func, nrows=s.nrows, start=start, stop=stop, chunksize=chunksize, auto_close=auto_close)<br>
457<br>
--> 458 return TableIterator(self, func, nrows=s.nrows, start=start, stop=stop, auto_close=auto_close).get_values()<br>
459<br>
460 def select_as_coordinates(self, key, where=None, start=None, stop=None, *_kwargs):</p>
<p dir="auto">C:\Python27\lib\site-packages\pandas\io\pytables.pyc in get_values(self)<br>
982<br>
983 def get_values(self):<br>
--> 984 results = self.func(self.start, self.stop)<br>
985 self.close()<br>
986 return results</p>
<p dir="auto">C:\Python27\lib\site-packages\pandas\io\pytables.pyc in func(_start, _stop)<br>
449 # what we are actually going to do for a chunk<br>
450 def func(_start, _stop):<br>
--> 451 return s.read(where=where, start=_start, stop=_stop, columns=columns, **kwargs)<br>
452<br>
453 if iterator or chunksize is not None:</p>
<p dir="auto">C:\Python27\lib\site-packages\pandas\io\pytables.pyc in read(self, columns, *_kwargs)<br>
3259 columns.insert(0, n)<br>
3260 df = super(AppendableMultiFrameTable, self).read(columns=columns, *_kwargs)<br>
-> 3261 df.set_index(self.levels, inplace=True)<br>
3262 return df<br>
3263</p>
<p dir="auto">C:\Python27\lib\site-packages\pandas\core\frame.pyc in set_index(self, keys, drop, append, inplace, verify_integrity)<br>
2827 names.append(None)<br>
2828 else:<br>
-> 2829 level = frame[col].values<br>
2830 names.append(col)<br>
2831 if drop:</p>
<p dir="auto">C:\Python27\lib\site-packages\pandas\core\frame.pyc in <strong>getitem</strong>(self, key)<br>
2001 # get column<br>
2002 if self.columns.is_unique:<br>
-> 2003 return self._get_item_cache(key)<br>
2004<br>
2005 # duplicate columns</p>
<p dir="auto">C:\Python27\lib\site-packages\pandas\core\generic.pyc in _get_item_cache(self, item)<br>
665 return cache[item]<br>
666 except Exception:<br>
--> 667 values = self._data.get(item)<br>
668 res = self._box_item_values(item, values)<br>
669 cache[item] = res</p>
<p dir="auto">C:\Python27\lib\site-packages\pandas\core\internals.pyc in get(self, item)<br>
1653 def get(self, item):<br>
1654 if self.items.is_unique:<br>
-> 1655 _, block = self._find_block(item)<br>
1656 return block.get(item)<br>
1657 else:</p>
<p dir="auto">C:\Python27\lib\site-packages\pandas\core\internals.pyc in _find_block(self, item)<br>
1933<br>
1934 def _find_block(self, item):<br>
-> 1935 self._check_have(item)<br>
1936 for i, block in enumerate(self.blocks):<br>
1937 if item in block:</p>
<p dir="auto">C:\Python27\lib\site-packages\pandas\core\internals.pyc in _check_have(self, item)<br>
1940 def _check_have(self, item):<br>
1941 if item not in self.items:<br>
-> 1942 raise KeyError('no item named %s' % com.pprint_thing(item))<br>
1943<br>
1944 def reindex_axis(self, new_axis, method=None, axis=0, copy=True):</p>
<p dir="auto">KeyError: u'no item named None'</p>
</blockquote>
<p dir="auto">I am at a loss. What does that mean? I successfully saved the DataFrame but I cannot read it back.</p> | 0 |
<p dir="auto">I've seen other similar posts, but I they seem not to apply to me. The role in question worked fine in 2.2.</p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">Loop</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.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]"><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.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[defaults]
host_key_checking = False
ansible_managed = DO NOT MODIFY by hand. This file is under control of Ansible on {host}.
vault_password_file = /var/lib/semaphore/.vpf"><pre class="notranslate"><code class="notranslate">[defaults]
host_key_checking = False
ansible_managed = DO NOT MODIFY by hand. This file is under control of Ansible on {host}.
vault_password_file = /var/lib/semaphore/.vpf
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">When trying to create a list of users, it throws the an error about an invalid value error.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">I am running this task</p>
<p dir="auto">This is the task I am trying to run.</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- name: create user
user:
name: "{{ item.username }}"
password: "{{ item.password|default(omit) }}"
shell: /bin/bash
become: true
with_items: '{{ users }}'
no_log: true"><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s">create user </span>
<span class="pl-ent">user</span>:
<span class="pl-ent">name</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ item.username }}<span class="pl-pds">"</span></span>
<span class="pl-ent">password</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ item.password|default(omit) }}<span class="pl-pds">"</span></span>
<span class="pl-ent">shell</span>: <span class="pl-s">/bin/bash</span>
<span class="pl-ent">become</span>: <span class="pl-c1">true</span>
<span class="pl-ent">with_items</span>: <span class="pl-s"><span class="pl-pds">'</span>{{ users }}<span class="pl-pds">'</span></span>
<span class="pl-ent">no_log</span>: <span class="pl-c1">true</span></pre></div>
<p dir="auto">This is the <code class="notranslate">users</code> variable. I have truncated the vault values for brevity.</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="users:
- username: ptadmin
password: !vault-encrypted |
$ANSIBLE_VAULT;1.1;AES256
...
use_sudo: true
use_ssh: false
- username: ansibleremote
password: "{{ petra_ansibleremote_password }}"
use_sudo: true
use_ssh: true
public_key: !vault-encrypted |
$ANSIBLE_VAULT;1.1;AES256
...
- username: semaphore
password: "{{ petra_ansibleremote_password }}"
use_sudo: true
use_ssh: true
- username: frosty
password: !vault-encrypted |
$ANSIBLE_VAULT;1.1;AES256
...
use_sudo: true
use_ssh: true
public_key: !vault-encrypted |
$ANSIBLE_VAULT;1.1;AES256
...
- username: thebeardedone
password: !vault-encrypted |
$ANSIBLE_VAULT;1.1;AES256
...
use_sudo: true
use_ssh: true
public_key: !vault-encrypted |
$ANSIBLE_VAULT;1.1;AES256
...
- username: senanufc
password: !vault-encrypted |
$ANSIBLE_VAULT;1.1;AES256
...
use_sudo: true
use_ssh: true
public_key: !vault-encrypted |
$ANSIBLE_VAULT;1.1;AES256
..."><pre class="notranslate"><span class="pl-ent">users</span>:
- <span class="pl-ent">username</span>: <span class="pl-s">ptadmin</span>
<span class="pl-ent">password</span>: <span class="pl-k">!vault-encrypted</span> <span class="pl-s">|</span>
<span class="pl-s"> $ANSIBLE_VAULT;1.1;AES256</span>
<span class="pl-s"> ...</span>
<span class="pl-s"></span> <span class="pl-ent">use_sudo</span>: <span class="pl-c1">true</span>
<span class="pl-ent">use_ssh</span>: <span class="pl-c1">false</span>
- <span class="pl-ent">username</span>: <span class="pl-s">ansibleremote</span>
<span class="pl-ent">password</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ petra_ansibleremote_password }}<span class="pl-pds">"</span></span>
<span class="pl-ent">use_sudo</span>: <span class="pl-c1">true</span>
<span class="pl-ent">use_ssh</span>: <span class="pl-c1">true</span>
<span class="pl-ent">public_key</span>: <span class="pl-k">!vault-encrypted</span> <span class="pl-s">|</span>
<span class="pl-s"> $ANSIBLE_VAULT;1.1;AES256</span>
<span class="pl-s"> ...</span>
<span class="pl-s"></span>
<span class="pl-s"></span> - <span class="pl-ent">username</span>: <span class="pl-s">semaphore</span>
<span class="pl-ent">password</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ petra_ansibleremote_password }}<span class="pl-pds">"</span></span>
<span class="pl-ent">use_sudo</span>: <span class="pl-c1">true</span>
<span class="pl-ent">use_ssh</span>: <span class="pl-c1">true</span>
- <span class="pl-ent">username</span>: <span class="pl-s">frosty</span>
<span class="pl-ent">password</span>: <span class="pl-k">!vault-encrypted</span> <span class="pl-s">|</span>
<span class="pl-s"> $ANSIBLE_VAULT;1.1;AES256</span>
<span class="pl-s"> ...</span>
<span class="pl-s"></span> <span class="pl-ent">use_sudo</span>: <span class="pl-c1">true</span>
<span class="pl-ent">use_ssh</span>: <span class="pl-c1">true</span>
<span class="pl-ent">public_key</span>: <span class="pl-k">!vault-encrypted</span> <span class="pl-s">|</span>
<span class="pl-s"> $ANSIBLE_VAULT;1.1;AES256</span>
<span class="pl-s"> ...</span>
<span class="pl-s"></span>
<span class="pl-s"></span> - <span class="pl-ent">username</span>: <span class="pl-s">thebeardedone</span>
<span class="pl-ent">password</span>: <span class="pl-k">!vault-encrypted</span> <span class="pl-s">|</span>
<span class="pl-s"> $ANSIBLE_VAULT;1.1;AES256</span>
<span class="pl-s"> ...</span>
<span class="pl-s"></span> <span class="pl-ent">use_sudo</span>: <span class="pl-c1">true</span>
<span class="pl-ent">use_ssh</span>: <span class="pl-c1">true</span>
<span class="pl-ent">public_key</span>: <span class="pl-k">!vault-encrypted</span> <span class="pl-s">|</span>
<span class="pl-s"> $ANSIBLE_VAULT;1.1;AES256</span>
<span class="pl-s"> ...</span>
<span class="pl-s"></span>
<span class="pl-s"></span> - <span class="pl-ent">username</span>: <span class="pl-s">senanufc</span>
<span class="pl-ent">password</span>: <span class="pl-k">!vault-encrypted</span> <span class="pl-s">|</span>
<span class="pl-s"> $ANSIBLE_VAULT;1.1;AES256</span>
<span class="pl-s"> ...</span>
<span class="pl-s"></span> <span class="pl-ent">use_sudo</span>: <span class="pl-c1">true</span>
<span class="pl-ent">use_ssh</span>: <span class="pl-c1">true</span>
<span class="pl-ent">public_key</span>: <span class="pl-k">!vault-encrypted</span> <span class="pl-s">|</span>
<span class="pl-s"> $ANSIBLE_VAULT;1.1;AES256</span>
<span class="pl-s"> ...</span></pre></div>
<p dir="auto">I tried a <code class="notranslate">debug</code> before it and the results are in this <a href="https://gist.github.com/thedumbtechguy/33a2de0c2b841f360e89ec29559a4790">gist</a>.</p>
<p dir="auto">I also tried with below and the same thing happens</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- name: test loop
debug:
msg: "{{ item.username }}"
with_items: "{{ users }}""><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s">test loop</span>
<span class="pl-ent">debug</span>:
<span class="pl-ent">msg</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ item.username }}<span class="pl-pds">"</span></span>
<span class="pl-ent">with_items</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ users }}<span class="pl-pds">"</span></span></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Users created</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [petra-hq-dev-master]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'ansible.vars.unsafe_proxy.AnsibleUnsafeText object' has no attribute 'username'\n\nThe error appears to have been in '/etc/ansible/roles/thedumbtechguy.manage-users/tasks/create_users.yml': line 6, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: create user\n ^ here\n"}
to retry, use: --limit @/var/lib/semaphore/repository_1/playbooks/setup_new_hosts.retry"><pre class="notranslate"><code class="notranslate">fatal: [petra-hq-dev-master]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'ansible.vars.unsafe_proxy.AnsibleUnsafeText object' has no attribute 'username'\n\nThe error appears to have been in '/etc/ansible/roles/thedumbtechguy.manage-users/tasks/create_users.yml': line 6, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: create user\n ^ here\n"}
to retry, use: --limit @/var/lib/semaphore/repository_1/playbooks/setup_new_hosts.retry
</code></pre></div> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">ansible-vault or jinja</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.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]"><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.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">No special configuration</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Ubuntu 16.04</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">When using the newly introduced <a href="http://docs.ansible.com/ansible/playbooks_vault.html#single-encrypted-variable" rel="nofollow">single encrypted variables </a> in lists or dictionaries these cannot be looped like expected with <code class="notranslate">with_items</code> or <code class="notranslate">with_dict</code>. The list or dictionary is somehow treated as one object and not as a "loopable" object.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Simple playbook containing a single encrypted variable <code class="notranslate">vaulted</code> in the list <code class="notranslate">test_with_vaulted_variable</code>. The vault password is "test" (without quotes) and the <code class="notranslate">vaulted</code> variable content is "vaulted variable".</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---
- hosts: all
vars:
test_without_vaulted_variable:
- not_vaulted: not vaulted variable
- another_standard_variable: standard
test_with_vaulted_variable:
- not_vaulted: not vaulted variable
- vaulted: !vault |
$ANSIBLE_VAULT;1.1;AES256
66376230363937306331353166333731633037326166626530393462636666346630366463313134
6635313236366537346339313338633539643665313931390a373264326437663530616630623734
31666136343232666235323865653838393830613432343561633465333837633531643564343064
3237353766313835310a643963313163663632623064313034363531356330653131303833646138
65366139376134396231353864383662623832376239336433623630383464303161
tasks:
- debug: var=test_without_vaulted_variable
- debug: var=test_with_vaulted_variable
- debug:
with_items: "{{ test_without_vaulted_variable }}"
- debug:
with_items: "{{ test_with_vaulted_variable }}""><pre class="notranslate">---
- <span class="pl-ent">hosts</span>: <span class="pl-s">all</span>
<span class="pl-ent">vars</span>:
<span class="pl-ent">test_without_vaulted_variable</span>:
- <span class="pl-ent">not_vaulted</span>: <span class="pl-s">not vaulted variable</span>
- <span class="pl-ent">another_standard_variable</span>: <span class="pl-s">standard</span>
<span class="pl-ent">test_with_vaulted_variable</span>:
- <span class="pl-ent">not_vaulted</span>: <span class="pl-s">not vaulted variable</span>
- <span class="pl-ent">vaulted</span>: <span class="pl-k">!vault</span> <span class="pl-s">|</span>
<span class="pl-s"> $ANSIBLE_VAULT;1.1;AES256</span>
<span class="pl-s"> 66376230363937306331353166333731633037326166626530393462636666346630366463313134</span>
<span class="pl-s"> 6635313236366537346339313338633539643665313931390a373264326437663530616630623734</span>
<span class="pl-s"> 31666136343232666235323865653838393830613432343561633465333837633531643564343064</span>
<span class="pl-s"> 3237353766313835310a643963313163663632623064313034363531356330653131303833646138</span>
<span class="pl-s"> 65366139376134396231353864383662623832376239336433623630383464303161</span>
<span class="pl-s"></span> <span class="pl-ent">tasks</span>:
- <span class="pl-ent">debug</span>: <span class="pl-s">var=test_without_vaulted_variable</span>
- <span class="pl-ent">debug</span>: <span class="pl-s">var=test_with_vaulted_variable</span>
- <span class="pl-ent">debug</span>:
<span class="pl-ent">with_items</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ test_without_vaulted_variable }}<span class="pl-pds">"</span></span>
- <span class="pl-ent">debug</span>:
<span class="pl-ent">with_items</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ test_with_vaulted_variable }}<span class="pl-pds">"</span></span></pre></div>
<p dir="auto">Start the play with (and enter the vault pass "test")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible-playbook -i 'lavego-test,' vault-with-items.yml --ask-vault-pass"><pre class="notranslate"><code class="notranslate">ansible-playbook -i 'lavego-test,' vault-with-items.yml --ask-vault-pass
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">The list processing should be the same for the lists <code class="notranslate">test_without_vaulted_variable</code>and <code class="notranslate">test_with_vaulted_variable</code>: The loops should output each element of each list.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">The list containing the vaulted variable is not looped like expected. In the last debug statement: Note that there is only one "Hello world!" message printed instead of two, one for each element, for the list with no vaulted variable.</p>
<p dir="auto">Note that also the normal debug output of the two lists differs (first and second debug statements) - the list containing the vaulted variable "has no structure".</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible-playbook -i 'localhost,' vault-with-items.yml --ask-vault-pass
Vault password:
PLAY [all] *********************************************************************************************************************************************************************************************************
TASK [Gathering Facts] *********************************************************************************************************************************************************************************************
ok: [localhost]
TASK [debug] *******************************************************************************************************************************************************************************************************
ok: [localhost] => {
"changed": false,
"test_without_vaulted_variable": [
{
"not_vaulted": "not vaulted variable"
},
{
"another_standard_variable": "standard"
}
]
}
TASK [debug] *******************************************************************************************************************************************************************************************************
ok: [localhost] => {
"changed": false,
"test_with_vaulted_variable": "[{u'not_vaulted': u'not vaulted variable'}, {u'vaulted': AnsibleVaultEncryptedUnicode($ANSIBLE_VAULT;1.1;AES256\n66376230363937306331353166333731633037326166626530393462636666346630366463313134\n6635313236366537346339313338633539643665313931390a373264326437663530616630623734\n31666136343232666235323865653838393830613432343561633465333837633531643564343064\n3237353766313835310a643963313163663632623064313034363531356330653131303833646138\n65366139376134396231353864383662623832376239336433623630383464303161\n)}]"
}
TASK [debug] *******************************************************************************************************************************************************************************************************
ok: [localhost] => (item={u'not_vaulted': u'not vaulted variable'}) => {
"item": {
"not_vaulted": "not vaulted variable"
},
"msg": "Hello world!"
}
ok: [localhost] => (item={u'another_standard_variable': u'standard'}) => {
"item": {
"another_standard_variable": "standard"
},
"msg": "Hello world!"
}
TASK [debug] *******************************************************************************************************************************************************************************************************
ok: [localhost => (item=[{u'not_vaulted': u'not vaulted variable'}, {u'vaulted': AnsibleVaultEncryptedUnicode($ANSIBLE_VAULT;1.1;AES256
66376230363937306331353166333731633037326166626530393462636666346630366463313134
6635313236366537346339313338633539643665313931390a373264326437663530616630623734
31666136343232666235323865653838393830613432343561633465333837633531643564343064
3237353766313835310a643963313163663632623064313034363531356330653131303833646138
65366139376134396231353864383662623832376239336433623630383464303161
)}]) => {
"item": "[{u'not_vaulted': u'not vaulted variable'}, {u'vaulted': AnsibleVaultEncryptedUnicode($ANSIBLE_VAULT;1.1;AES256\n66376230363937306331353166333731633037326166626530393462636666346630366463313134\n6635313236366537346339313338633539643665313931390a373264326437663530616630623734\n31666136343232666235323865653838393830613432343561633465333837633531643564343064\n3237353766313835310a643963313163663632623064313034363531356330653131303833646138\n65366139376134396231353864383662623832376239336433623630383464303161\n)}]",
"msg": "Hello world!"
}
PLAY RECAP *********************************************************************************************************************************************************************************************************
localhost : ok=5 changed=0 unreachable=0 failed=0 "><pre class="notranslate"><code class="notranslate">$ ansible-playbook -i 'localhost,' vault-with-items.yml --ask-vault-pass
Vault password:
PLAY [all] *********************************************************************************************************************************************************************************************************
TASK [Gathering Facts] *********************************************************************************************************************************************************************************************
ok: [localhost]
TASK [debug] *******************************************************************************************************************************************************************************************************
ok: [localhost] => {
"changed": false,
"test_without_vaulted_variable": [
{
"not_vaulted": "not vaulted variable"
},
{
"another_standard_variable": "standard"
}
]
}
TASK [debug] *******************************************************************************************************************************************************************************************************
ok: [localhost] => {
"changed": false,
"test_with_vaulted_variable": "[{u'not_vaulted': u'not vaulted variable'}, {u'vaulted': AnsibleVaultEncryptedUnicode($ANSIBLE_VAULT;1.1;AES256\n66376230363937306331353166333731633037326166626530393462636666346630366463313134\n6635313236366537346339313338633539643665313931390a373264326437663530616630623734\n31666136343232666235323865653838393830613432343561633465333837633531643564343064\n3237353766313835310a643963313163663632623064313034363531356330653131303833646138\n65366139376134396231353864383662623832376239336433623630383464303161\n)}]"
}
TASK [debug] *******************************************************************************************************************************************************************************************************
ok: [localhost] => (item={u'not_vaulted': u'not vaulted variable'}) => {
"item": {
"not_vaulted": "not vaulted variable"
},
"msg": "Hello world!"
}
ok: [localhost] => (item={u'another_standard_variable': u'standard'}) => {
"item": {
"another_standard_variable": "standard"
},
"msg": "Hello world!"
}
TASK [debug] *******************************************************************************************************************************************************************************************************
ok: [localhost => (item=[{u'not_vaulted': u'not vaulted variable'}, {u'vaulted': AnsibleVaultEncryptedUnicode($ANSIBLE_VAULT;1.1;AES256
66376230363937306331353166333731633037326166626530393462636666346630366463313134
6635313236366537346339313338633539643665313931390a373264326437663530616630623734
31666136343232666235323865653838393830613432343561633465333837633531643564343064
3237353766313835310a643963313163663632623064313034363531356330653131303833646138
65366139376134396231353864383662623832376239336433623630383464303161
)}]) => {
"item": "[{u'not_vaulted': u'not vaulted variable'}, {u'vaulted': AnsibleVaultEncryptedUnicode($ANSIBLE_VAULT;1.1;AES256\n66376230363937306331353166333731633037326166626530393462636666346630366463313134\n6635313236366537346339313338633539643665313931390a373264326437663530616630623734\n31666136343232666235323865653838393830613432343561633465333837633531643564343064\n3237353766313835310a643963313163663632623064313034363531356330653131303833646138\n65366139376134396231353864383662623832376239336433623630383464303161\n)}]",
"msg": "Hello world!"
}
PLAY RECAP *********************************************************************************************************************************************************************************************************
localhost : ok=5 changed=0 unreachable=0 failed=0
</code></pre></div>
<p dir="auto">Thank you for your help!</p> | 1 |
<p dir="auto">Let's add a link on a atom-packages website, which will open editor and install selected package. Something like an AppStore link</p> | <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/560ce22bdb344f9927a799ffe9bc16d79dd6599a97f56ae34f4a5503e6d72efd/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313437362f313636303334372f38636665653637342d356262612d313165332d396234342d3164393939353564333236632e706e67"><img src="https://camo.githubusercontent.com/560ce22bdb344f9927a799ffe9bc16d79dd6599a97f56ae34f4a5503e6d72efd/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313437362f313636303334372f38636665653637342d356262612d313165332d396234342d3164393939353564333236632e706e67" alt="2013-12-02 at 5 28 pm" data-canonical-src="https://f.cloud.github.com/assets/1476/1660347/8cfee674-5bba-11e3-9b44-1d99955d326c.png" style="max-width: 100%;"></a></p>
<p dir="auto">I believe we casually discussed this in person or in Chat, but I couldn't find a follow-up issue. I think it would be really excellent. In the meantime we can work around on the site with instructions for install through the editor or CLI, but that's a bit clunky.</p> | 1 |
<h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">I think there are some applications that are used very frequently. So it's a good idea to show a list of applications that are pined and the most used. Therefore, we don't need to type in a keyword to find them again.</p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">The list can be above the input textbox or at the sides of it.<br>
Items can be selected by keyboard "ALT + number", so one of my fingers does not have to leave the ALT key after a "ALT + Space".</p> | <p dir="auto">Hi everybody ? What about a new feature to FancyZones: dynamic resizing of the zone hosting the currently focused application ? I'm thinking about something like resizing windows in tiling window mangers such as i3 :)</p> | 0 |
<p dir="auto"><strong>Context:</strong></p>
<ul dir="auto">
<li>Playwright Version: 1.12</li>
<li>Operating System: Mac</li>
<li>Node.js version: 14.6</li>
<li>Browser: Firefox</li>
<li>Extra: NA</li>
</ul>
<p dir="auto"><strong>Code Snippet</strong></p>
<p dir="auto">Help us help you! Put down a short code snippet that illustrates your bug and<br>
that we can run and debug locally. For example:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const {firefox} = require('playwright');
(async () => {
const browser = await firefox.launch();
const page = await browser.newPage("Page with SELF SIGNED certificate");
// ...
})();"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span>firefox<span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'playwright'</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-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">browser</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">firefox</span><span class="pl-kos">.</span><span class="pl-en">launch</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">page</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">newPage</span><span class="pl-kos">(</span><span class="pl-s">"Page with SELF SIGNED certificate"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// ...</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Describe the bug</strong></p>
<p dir="auto">We are facing issues with Self Signed Certificates on firefox and while doing browser.newPage() we are getting SEC_ERROR_UNKNOWN_ISSUER.<br>
Can we allow please fix this behaviour for Self Signed Certificates on firefox?</p> | <p dir="auto">We are facing issues with Self Signed Certificates on firefox and while doing browser.newPage() we are getting SEC_ERROR_UNKNOWN_ISSUER which gets resolved by setting ignoreHTTPSErrors: true.<br>
Can we allow Self Signed Certificates by default or provide an option to pass these as options in launchServer options?</p>
<p dir="auto">Working code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const browser = await firefox.connect({
wsEndpoint: "ws://127.0.0.1:55614/a4de39415b37282b3f8ee16845753bf8",
});
const context = await browser.newContext({
ignoreHTTPSErrors: true
});
// Use the default browser context to create a new tab and navigate to URL
const page = await context.newPage();"><pre class="notranslate"><code class="notranslate">const browser = await firefox.connect({
wsEndpoint: "ws://127.0.0.1:55614/a4de39415b37282b3f8ee16845753bf8",
});
const context = await browser.newContext({
ignoreHTTPSErrors: true
});
// Use the default browser context to create a new tab and navigate to URL
const page = await context.newPage();
</code></pre></div>
<p dir="auto">Not Working:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const browser = await firefox.connect({
wsEndpoint: "ws://127.0.0.1:55614/a4de39415b37282b3f8ee16845753bf8",
});
// Use the default browser context to create a new tab and navigate to URL
const page = await browser.newPage();"><pre class="notranslate"><code class="notranslate">const browser = await firefox.connect({
wsEndpoint: "ws://127.0.0.1:55614/a4de39415b37282b3f8ee16845753bf8",
});
// Use the default browser context to create a new tab and navigate to URL
const page = await browser.newPage();
</code></pre></div> | 1 |
<p dir="auto">I am trying to compile tensorflow from source. I can build it <strong>successfully</strong> with CPU support only( i.e. not use <code class="notranslate">--config=cuda</code>) .</p>
<p dir="auto">But when I try to build it with GPU support, I get error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[chaowei@node07 tensorflow]$ export EXTRA_BAZEL_ARGS='-s --verbose_failures --ignore_unsupported_sandboxing --genrule_strategy=standalone --spawn_strategy=standalone --jobs 8'
[chaowei@node07 tensorflow]$
[chaowei@node07 tensorflow]$ /gpfs/home/chaowei/download/bazel-0.1.5/output/bazel build -c opt --config=cuda --linkopt '-lrt' --copt="-DGPR_BACKWARDS_COMPATIBILITY_MODE" --conlyopt="-std=c99" //tensorflow/tools/pip_package:build_pip_package
...........
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
INFO: Found 1 target...
ERROR: /gpfs/home/chaowei/.cache/bazel/_bazel_chaowei/2ce35f089de902cec16e4a2c6a450834/external/grpc/BUILD:485:1: C++ compilation of rule '@grpc//:grpc_unsecure' failed: gcc failed: error executing command /gpfs/home/chaowei/software/gcc-6.1.0/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 ... (remaining 39 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
external/grpc/src/core/compression/message_compress.c:41:18: fatal error: zlib.h: No such file or directory
#include <zlib.h>
^
compilation terminated.
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: 71.894s, Critical Path: 58.77s"><pre class="notranslate"><code class="notranslate">[chaowei@node07 tensorflow]$ export EXTRA_BAZEL_ARGS='-s --verbose_failures --ignore_unsupported_sandboxing --genrule_strategy=standalone --spawn_strategy=standalone --jobs 8'
[chaowei@node07 tensorflow]$
[chaowei@node07 tensorflow]$ /gpfs/home/chaowei/download/bazel-0.1.5/output/bazel build -c opt --config=cuda --linkopt '-lrt' --copt="-DGPR_BACKWARDS_COMPATIBILITY_MODE" --conlyopt="-std=c99" //tensorflow/tools/pip_package:build_pip_package
...........
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
INFO: Found 1 target...
ERROR: /gpfs/home/chaowei/.cache/bazel/_bazel_chaowei/2ce35f089de902cec16e4a2c6a450834/external/grpc/BUILD:485:1: C++ compilation of rule '@grpc//:grpc_unsecure' failed: gcc failed: error executing command /gpfs/home/chaowei/software/gcc-6.1.0/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 ... (remaining 39 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
external/grpc/src/core/compression/message_compress.c:41:18: fatal error: zlib.h: No such file or directory
#include <zlib.h>
^
compilation terminated.
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: 71.894s, Critical Path: 58.77s
</code></pre></div>
<p dir="auto"><strong>I also compile python3 from source in my computer. And when I <code class="notranslate">import zlib</code>, it works fine.</strong></p>
<p dir="auto">Here is the information of my system:<br>
<code class="notranslate">[chaowei@mgt ~]$ cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.5 (Santiago)</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[chaowei@node07 gcc-6.1.0]$ gcc -v
built-in specs。
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/gpfs/home/chaowei/software/gcc-6.1.0/libexec/gcc/x86_64-pc-linux-gnu/6.1.0/lto-wrapper
Target:x86_64-pc-linux-gnu
Configured with:./configure --prefix=/gpfs/home/chaowei/software/gcc-6.1.0
Thread model:posix
gcc version 6.1.0 (GCC) "><pre class="notranslate"><code class="notranslate">[chaowei@node07 gcc-6.1.0]$ gcc -v
built-in specs。
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/gpfs/home/chaowei/software/gcc-6.1.0/libexec/gcc/x86_64-pc-linux-gnu/6.1.0/lto-wrapper
Target:x86_64-pc-linux-gnu
Configured with:./configure --prefix=/gpfs/home/chaowei/software/gcc-6.1.0
Thread model:posix
gcc version 6.1.0 (GCC)
</code></pre></div>
<p dir="auto">I wonder why I get <code class="notranslate">zlib.h</code> error when I only build tensorflow with GPU support.</p> | <h3 dir="auto">Environment info</h3>
<p dir="auto">Operating System: Red Hat Enterprise Linux Server release 7.2</p>
<p dir="auto">Installed version of CUDA and cuDNN: CUDA 7, cuDNN 4<br>
(please attach the output of <code class="notranslate">ls -l /path/to/cuda/lib/libcud*</code>):</p>
<p dir="auto">-rw-r--r-- 1 root root 179466 Jan 26 22:19 /usr/local/cuda/lib/libcudadevrt.a<br>
lrwxrwxrwx 1 root root 16 Jan 26 22:19 /usr/local/cuda/lib/libcudart.so -> libcudart.so.7.0<br>
lrwxrwxrwx 1 root root 19 Jan 26 22:19 /usr/local/cuda/lib/libcudart.so.7.0 -> libcudart.so.7.0.28<br>
-rwxr-xr-x 1 root root 303052 Jan 26 22:19 /usr/local/cuda/lib/libcudart.so.7.0.28<br>
-rw-r--r-- 1 root root 546514 Jan 26 22:19 /usr/local/cuda/lib/libcudart_static.a</p>
<p dir="auto">cuDNN is installed for the local user only.</p>
<p dir="auto">If installed from sources, provide the commit hash:</p>
<p dir="auto"><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/b289bc7a50fc0254970c60aaeba01c33de61a728/hovercard" href="https://github.com/tensorflow/tensorflow/commit/b289bc7a50fc0254970c60aaeba01c33de61a728"><tt>b289bc7</tt></a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">I have followed the instructions at: <a href="https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html#requirements" rel="nofollow">https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html#requirements</a></p>
<p dir="auto">Since I am not root, I had to install everything for the local user, but it seems to have worked.</p>
<p dir="auto">I get an error at this line:</p>
<p dir="auto">bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer</p>
<p dir="auto">Saying:</p>
<p dir="auto">ERROR: [...]/vlad/.cache/bazel/_bazel_vlad/6607a39fc04ec931b523fac975ff3100/external/png_archive/BUILD:23:1: Executing genrule @png_archive//:configure failed: bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.<br>
[...]/vlad/.cache/bazel/_bazel_vlad/6607a39fc04ec931b523fac975ff3100/tensorflow/external/png_archive/libpng-1.2.53 [...]/vlad/.cache/bazel/_bazel_vlad/6607a39fc04ec931b523fac975ff3100/tensorflow<br>
/tmp/tmp.pCUaj9eIKr [...]/vlad/.cache/bazel/_bazel_vlad/6607a39fc04ec931b523fac975ff3100/tensorflow/external/png_archive/libpng-1.2.53 [...]/vlad/.cache/bazel/_bazel_vlad/6607a39fc04ec931b523fac975ff3100/tensorflow</p>
<p dir="auto">... a bunch more lines until:</p>
<p dir="auto">checking for pow... no<br>
checking for pow in -lm... yes<br>
checking for zlibVersion in -lz... no<br>
<strong>configure: error: zlib not installed</strong><br>
Target //tensorflow/cc:tutorials_example_trainer failed to build<br>
Use --verbose_failures to see the command lines of failed build steps.<br>
INFO: Elapsed time: 57.196s, Critical Path: 22.12s</p>
<h3 dir="auto">What have you tried?</h3>
<p dir="auto">I installed zlib, and the following program compiles with g++</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#include <cstdio>
#include <zlib.h>
int main()
{
printf("Hello world");
return 0;
}"><pre class="notranslate"><code class="notranslate">#include <cstdio>
#include <zlib.h>
int main()
{
printf("Hello world");
return 0;
}
</code></pre></div>
<p dir="auto">I have the following in my .bashrc:</p>
<p dir="auto">export LD_LIBRARY_PATH="$HOME/local/cuda/lib64:$LD_LIBRARY_PATH"<br>
export LD_LIBRARY_PATH="$HOME/bin/zlibdev/lib:$LD_LIBRARY_PATH"<br>
export CPATH="$HOME/local/cuda/include:$CPATH"<br>
export CPATH="$HOME/bin/zlibdev/include:$CPATH"<br>
export LIBRARY_PATH="$HOME/local/cuda/lib64:$LIBRARY_PATH"</p>
<p dir="auto">export PKG_CONFIG_PATH="$HOME/bin/zlibdev/lib/pkgconfig"</p>
<p dir="auto">Why can't bazel / tensorflow find zlib.h? It's there and accessible.</p> | 1 |
<h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>6.0.10</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>Windows 7 / macOS 10.13.6</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>4.1.5</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Electron Main Process should receive incoming <code class="notranslate">messages</code> from another process.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Electron Main Process can only send messages, but not receive</p>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">TBD</p>
<h3 dir="auto">Screenshots</h3>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">Is there a reason anyone suspects this wouldn't work? I reviewed the changelog meticulously but I don't see anything that seems relevant in either 5.x or 6.x. I see the sandbox is enabled by default, but it seems to only apply to the <code class="notranslate">renderer</code> processes and not the <code class="notranslate">main</code> as far as I can tell. Currently I haven't a clue what the cause could be, but if any Electron Team dev or anyone else could point me in the right direction I'd appreciate it hugely.</p> | <h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h1 dir="auto">Issue Details</h1>
<ul dir="auto">
<li><strong>Electron Version:</strong> <code class="notranslate">6.0.10</code></li>
<li><strong>Operating System:</strong> <code class="notranslate">Windows 7</code></li>
<li><strong>Last Known Working Electron version:</strong> <code class="notranslate">4.1.5</code></li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Debugger does not bug out and freeze/eat CPU indefinitely</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Debugging innocuous and functional code that was debuggable in Electron 4 can lead to freezes that require destroying the BrowserWindow or restarting Electron entirely.</p>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">No idea :(</p>
<h3 dir="auto">Screenshots</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6835891/65904339-4390cb00-e38c-11e9-8a70-9d0231dfb57c.png"><img src="https://user-images.githubusercontent.com/6835891/65904339-4390cb00-e38c-11e9-8a70-9d0231dfb57c.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">I upgraded and setting breakpoints in working code that was previously debuggable in Electron 4 there are issues. There's been no changes to that code and the debugger worked fine in Electron 4. I've been working on new code and figured that the issue was caused by a bug in my newly written code until just now.</p>
<p dir="auto">It will stop properly at the breakpoints (in a number of places in my code), and then CPU usage spikes and stays high, taking up 40-45% CPU on my dual core machine. It appears to respond, but if you resume or step ahead nothing happens. If you press Pause script execution, similarly nothing seems to happen except the UI updates. CPU usage remains the same throughout. This code also runs properly when not debugging and last time I ran it in React Native and debugged with React Native Debugger (based on Electron 1.8 I think?)</p>
<p dir="auto">Hitting Ctrl+P, the quick nav feature comes up as expected, but there's no files there except the HTML file loaded. Any additional files no longer appear.</p>
<p dir="auto">Electron 6 is based on Chromium 76, and on some machines Chrome 76 (and 77) shoots to using a full CPU core and doesn't stop until the process is ended. I wonder if perhaps I'm seeing the same thing here.</p> | 1 |
<p dir="auto">My app doesn't need <code class="notranslate">werkzeug</code> directly except for type annotations of views that contain a <code class="notranslate">redirect</code> call, even when I explicitly provide <code class="notranslate">Response=flask.Response</code>.<br>
</p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/pallets/flask/blob/5cdfeae2e82541577e17f5179d91775550e34ebd/src/flask/helpers.py#L233-L235">flask/src/flask/helpers.py</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 233 to 235
in
<a data-pjax="true" class="commit-tease-sha" href="/pallets/flask/commit/5cdfeae2e82541577e17f5179d91775550e34ebd">5cdfeae</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="L233" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="233"></td>
<td id="LC233" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">def</span> <span class="pl-en">redirect</span>( </td>
</tr>
<tr class="border-0">
<td id="L234" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="234"></td>
<td id="LC234" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">location</span>: <span class="pl-s1">str</span>, <span class="pl-s1">code</span>: <span class="pl-s1">int</span> <span class="pl-c1">=</span> <span class="pl-c1">302</span>, <span class="pl-v">Response</span>: <span class="pl-s1">t</span>.<span class="pl-v">Optional</span>[<span class="pl-s1">t</span>.<span class="pl-v">Type</span>[<span class="pl-s">"BaseResponse"</span>]] <span class="pl-c1">=</span> <span class="pl-c1">None</span> </td>
</tr>
<tr class="border-0">
<td id="L235" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="235"></td>
<td id="LC235" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> ) <span class="pl-c1">-></span> <span class="pl-s">"BaseResponse"</span>: </td>
</tr>
</tbody></table>
</div>
</div>
<br>
I think this can be achieved in a similar way to <code class="notranslate">classmethod</code>s:<p></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="_BaseResponse = t.TypeVar("_BaseResponse", bound="BaseResponse")
def redirect(
location: str, code: int = 302, Response: t.Optional[t.Type[_BaseResponse]] = None
) -> _BaseResponse:"><pre class="notranslate"><span class="pl-s1">_BaseResponse</span> <span class="pl-c1">=</span> <span class="pl-s1">t</span>.<span class="pl-v">TypeVar</span>(<span class="pl-s">"_BaseResponse"</span>, <span class="pl-s1">bound</span><span class="pl-c1">=</span><span class="pl-s">"BaseResponse"</span>)
<span class="pl-k">def</span> <span class="pl-en">redirect</span>(
<span class="pl-s1">location</span>: <span class="pl-s1">str</span>, <span class="pl-s1">code</span>: <span class="pl-s1">int</span> <span class="pl-c1">=</span> <span class="pl-c1">302</span>, <span class="pl-v">Response</span>: <span class="pl-s1">t</span>.<span class="pl-v">Optional</span>[<span class="pl-s1">t</span>.<span class="pl-v">Type</span>[<span class="pl-s1">_BaseResponse</span>]] <span class="pl-c1">=</span> <span class="pl-c1">None</span>
) <span class="pl-c1">-></span> <span class="pl-s1">_BaseResponse</span>:</pre></div> | <p dir="auto">I have been having issues for 3-4 days now to get a hello world up and running on the remote server. I figured out that it would be nice if there was a documentation from A-Z how to get that done and working.</p>
<p dir="auto"><a href="http://flask.pocoo.org/docs/deploying/mod_wsgi/" rel="nofollow">http://flask.pocoo.org/docs/deploying/mod_wsgi/</a></p>
<p dir="auto">The current documentation does not provide an example what to put into an exact python file, and what url to open up in the web browser to get the desired python module running on the remote server. It is okay to have references to other places if that is more logical, but the idea is to have a self-contained page which I can start reading, and by I reach the end, I will have a working remote hello world.</p>
<p dir="auto">This would be well appreciated.</p> | 0 |
<p dir="auto">TensorFlow should have a Rust interface.</p>
<p dir="auto">Original e-mail:<br>
I'd like to write Rust bindings for TensorFlow, and I had a few questions. First of all, is anyone already working on this, and if so, can I lend a hand? If not, is this something the TensorFlow team would be interested in? I assume that the TensorFlow team would not be willing to commit right now to supporting Rust, so I thought a separate open source project (with the option to fold into the main project later) would be the way to go.</p> | <h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>:<br>
No</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>:<br>
Ubuntu 14.04</li>
<li><strong>TensorFlow installed from (source or binary)</strong>:<br>
pip install</li>
<li><strong>TensorFlow version (use command below)</strong>:<br>
1.2.1</li>
<li><strong>Python version</strong>:<br>
3.6</li>
<li><strong>Exact command to reproduce</strong>:<br>
<code class="notranslate">tensorboard --logdir=gs://mybucket </code></li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">When trying to run tensorboard from a google cloud storage bucket the following error occurs:</p>
<p dir="auto"><code class="notranslate">tensorflow.python.framework.errors_impl.UnimplementedError: File system scheme gs not implemented </code></p>
<p dir="auto">Even after running gs authentication<br>
<code class="notranslate">gcloud auth application-default login</code></p>
<h3 dir="auto">Source code / logs</h3>
<p dir="auto">I was following <a href="https://github.com/tensorflow/models/blob/master/object_detection/g3doc/running_pets.md">this guide</a> on training a pet object detector</p> | 0 |
<p dir="auto">Hard to reproduce. I attached an array where this happens:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
np.seterr(all='raise')
a = np.load('weird_array.npy')
print(a.shape, a.dtype)
for i, val in enumerate(a):
try:
np.isfinite(np.array(val, ndmin=1))
except:
strange_index = i
print(type(val))
print(val.__class__.__name__)
print(i)
print(val)
print(np.isfinite(a[strange_index]))
"><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-s1">np</span>.<span class="pl-en">seterr</span>(<span class="pl-s1">all</span><span class="pl-c1">=</span><span class="pl-s">'raise'</span>)
<span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">load</span>(<span class="pl-s">'weird_array.npy'</span>)
<span class="pl-en">print</span>(<span class="pl-s1">a</span>.<span class="pl-s1">shape</span>, <span class="pl-s1">a</span>.<span class="pl-s1">dtype</span>)
<span class="pl-k">for</span> <span class="pl-s1">i</span>, <span class="pl-s1">val</span> <span class="pl-c1">in</span> <span class="pl-en">enumerate</span>(<span class="pl-s1">a</span>):
<span class="pl-k">try</span>:
<span class="pl-s1">np</span>.<span class="pl-en">isfinite</span>(<span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-s1">val</span>, <span class="pl-s1">ndmin</span><span class="pl-c1">=</span><span class="pl-c1">1</span>))
<span class="pl-k">except</span>:
<span class="pl-s1">strange_index</span> <span class="pl-c1">=</span> <span class="pl-s1">i</span>
<span class="pl-en">print</span>(<span class="pl-en">type</span>(<span class="pl-s1">val</span>))
<span class="pl-en">print</span>(<span class="pl-s1">val</span>.<span class="pl-s1">__class__</span>.<span class="pl-s1">__name__</span>)
<span class="pl-en">print</span>(<span class="pl-s1">i</span>)
<span class="pl-en">print</span>(<span class="pl-s1">val</span>)
<span class="pl-en">print</span>(<span class="pl-s1">np</span>.<span class="pl-en">isfinite</span>(<span class="pl-s1">a</span>[<span class="pl-s1">strange_index</span>]))</pre></div>
<p dir="auto">Results in:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<class 'numpy.float64'>
float64
1023450
nan
Traceback (most recent call last):
File "test.py", line 15, in <module>
print(np.isfinite(a[strange_index]))
FloatingPointError: invalid value encountered in isfinite"><pre class="notranslate"><code class="notranslate"><class 'numpy.float64'>
float64
1023450
nan
Traceback (most recent call last):
File "test.py", line 15, in <module>
print(np.isfinite(a[strange_index]))
FloatingPointError: invalid value encountered in isfinite
</code></pre></div>
<p dir="auto"><a href="https://github.com/numpy/numpy/files/365889/weird_array.zip">weird_array.zip</a></p> | <p dir="auto">My code failed with a <code class="notranslate">FloatingPointError</code> because <code class="notranslate">isfinite</code> encountered an invalid value. The offending value was... <code class="notranslate">nan</code>. Apparently, it was <em>the wrong kind of nan</em>. I reproduced it as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# (earlier: seterr(all='raise'))
In [204]: x = uint32(0x7f831681).view("<f4")
In [205]: print(x)
nan
In [206]: isnan(x)
---------------------------------------------------------------------------
FloatingPointError Traceback (most recent call last)
<ipython-input-206-b5e847e0f3bf> in <module>()
----> 1 isnan(x)
FloatingPointError: invalid value encountered in isnan
In [207]: isfinite(x)
---------------------------------------------------------------------------
FloatingPointError Traceback (most recent call last)
<ipython-input-207-3d4ef4d5266d> in <module>()
----> 1 isfinite(x)
FloatingPointError: invalid value encountered in isfinite"><pre class="notranslate"><code class="notranslate"># (earlier: seterr(all='raise'))
In [204]: x = uint32(0x7f831681).view("<f4")
In [205]: print(x)
nan
In [206]: isnan(x)
---------------------------------------------------------------------------
FloatingPointError Traceback (most recent call last)
<ipython-input-206-b5e847e0f3bf> in <module>()
----> 1 isnan(x)
FloatingPointError: invalid value encountered in isnan
In [207]: isfinite(x)
---------------------------------------------------------------------------
FloatingPointError Traceback (most recent call last)
<ipython-input-207-3d4ef4d5266d> in <module>()
----> 1 isfinite(x)
FloatingPointError: invalid value encountered in isfinite
</code></pre></div>
<p dir="auto">I'm not sure how this ended up in my data, but it was not on purpose.</p> | 1 |
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9477742/36406284-b8e3922c-15c3-11e8-952d-5a67a5c08146.PNG"><img width="337" alt="py1" src="https://user-images.githubusercontent.com/9477742/36406284-b8e3922c-15c3-11e8-952d-5a67a5c08146.PNG" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9477742/36406286-bb97ce3e-15c3-11e8-98b0-cddfd0bb889e.PNG"><img width="248" alt="py3" src="https://user-images.githubusercontent.com/9477742/36406286-bb97ce3e-15c3-11e8-98b0-cddfd0bb889e.PNG" style="max-width: 100%;"></a></p>
<p dir="auto">When creating an array from 0.2 to 0.8, the maximum value in the array is 0.8, but when I run max of the whole array, I found the maximum value different from 0.8. It has digits in the 15th and 16th decimal.<br>
When the same is done with 0.7 as the ending value, the maximum of the array is 0.60000000009.. and the value of 0.7 is not included in the array.</p>
<p dir="auto">PFA the screenshots.</p> | <p dir="auto">If I do <code class="notranslate">np.arange(3.18,3.21,0.01)</code>, it gives <code class="notranslate">array([ 3.18, 3.19, 3.2 ])</code>. However, if I do <code class="notranslate">np.arange(3.18,3.22,0.01)</code>, it gives <code class="notranslate">array([ 3.18, 3.19, 3.2 , 3.21, 3.22])</code>. This seems inconsistent. Why is this so? I am using numpy 1.11.2 on Python 2.7.13.</p> | 1 |
<p dir="auto">Been using React (Native) for half a year now, really enjoying it! I'm no expert but have run up against what seems like a weakness in the framework that I'd like to bring up.</p>
<p dir="auto"><strong>The problem</strong></p>
<p dir="auto"><em>Sending one-off events down the chain (parent-to-child) in a way that works with the component lifecycle.</em></p>
<p dir="auto">The issue arises from the fact that props are semi-persistent values, which differs in nature from one-time events. So for example if a deep-link URL was received you want to say 'respond to this once when you're ready', not 'store this URL'. The mechanism of caching a one-time event value breaks down if the same URL is then sent again, which is a valid event case.</p>
<p dir="auto">Children have an easy and elegant way to communicate back to parents via callbacks, but there doesn't seem to be a way to do this same basic thing the other direction.</p>
<p dir="auto"><strong>Example cases</strong></p>
<ul dir="auto">
<li>A deep-link was received and an app wants to tell child pages to respond appropriately</li>
<li>A tab navigator wants to tell a child to scroll to top on secondary tap</li>
<li>A list view wants to trigger all of its list items to animate each time the page is shown</li>
</ul>
<p dir="auto">From everything I've read, the two normal ways to do this are 1) call a method on a child directly using a ref, or 2) emit an event that children may listen for. But those ignore the component lifecycle, so the child isn't ready to receive a direct call or event yet.</p>
<p dir="auto">These also feel clunky compared to the elegance of React's architecture. But React is a one-way top-down model, so the idea of passing one-time events down the component chain seems like it would fit nicely and be a real improvement.</p>
<p dir="auto"><strong>Best workarounds we've found</strong></p>
<ul dir="auto">
<li>Add a 'trigger' state variable in the parent that is a number, and wire this to children. Children use a lifecycle method to sniff for a change to their trigger prop, and then do a known action. We've done this a bunch now to handle some of the cases listed above.</li>
<li>(really tacky) Set and then clear a prop immediately after setting it. Yuck.</li>
</ul>
<p dir="auto">Is there is some React Way to solve this common need? If so, no one on our team knows of one, and the few articles I've found on the web addressing component communication only suggest dispatching events or calling methods directly refs. Thanks for the open discussion!</p> | <p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br>
Bug<br>
<strong>What is the current behavior?</strong><br>
When an undefined object is assigned a property, the component in which this is done re-renders.<br>
<strong>If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (<a href="https://jsfiddle.net/Luktwrdm/" rel="nofollow">https://jsfiddle.net/Luktwrdm/</a>) or CodeSandbox (<a href="https://codesandbox.io/s/new" rel="nofollow">https://codesandbox.io/s/new</a>) example below:</strong><br>
function ashwin() {<br>
let obj = undefined;<br>
obj["hasBasket"] = true;<br>
}<br>
call this function inside a functional component. It will result in the code being rendered again before throwing an error.<br>
<a href="https://codesandbox.io/s/priceless-wing-6xh8r" rel="nofollow">https://codesandbox.io/s/priceless-wing-6xh8r</a><br>
<strong>What is the expected behavior?</strong><br>
Shouldn't render again and just throw an error<br>
<strong>Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?</strong><br>
React:- 16.10.2<br>
Was able to reproduce it in chrome and safari.<br>
Didn't test it in previous versions of React</p> | 0 |
<p dir="auto">Please add standarized/easy way to implement dependent selects form field..</p> | <p dir="auto">We long have the problem of creating fields that depend on the value of other fields now. See also:</p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3948579" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/3767" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/3767/hovercard" href="https://github.com/symfony/symfony/issues/3767">#3767</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3954416" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/3768" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/3768/hovercard" href="https://github.com/symfony/symfony/pull/3768">#3768</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="4993683" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/4548" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/4548/hovercard" href="https://github.com/symfony/symfony/pull/4548">#4548</a></li>
</ul>
<p dir="auto">I want to propose a solution that seems feasible from my current point of view.</p>
<p dir="auto">Currently, I can think of two different APIs:</p>
<h5 dir="auto">API 1</h5>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<?php
$builder->addIf(function (FormInterface $form) {
return $form->get('field1')->getData() >= 1
&& !$form->get('field2')->getData();
}, 'myfield', 'text');
$builder->addUnless(function (FormInterface $form) {
return $form->get('field1')->getData() < 1
|| $form->get('field2')->getData();
}, 'myfield', 'text');"><pre class="notranslate"><span class="pl-ent"><?php</span>
<span class="pl-s1"><span class="pl-c1">$</span>builder</span>-><span class="pl-en">addIf</span>(<span class="pl-k">function</span> (<span class="pl-smi"><span class="pl-smi">FormInterface</span></span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>) {
<span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">get</span>(<span class="pl-s">'field1'</span>)-><span class="pl-en">getData</span>() >= <span class="pl-c1">1</span>
&& !<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">get</span>(<span class="pl-s">'field2'</span>)-><span class="pl-en">getData</span>();
}, <span class="pl-s">'myfield'</span>, <span class="pl-s">'text'</span>);
<span class="pl-s1"><span class="pl-c1">$</span>builder</span>-><span class="pl-en">addUnless</span>(<span class="pl-k">function</span> (<span class="pl-smi"><span class="pl-smi">FormInterface</span></span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>) {
<span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">get</span>(<span class="pl-s">'field1'</span>)-><span class="pl-en">getData</span>() < <span class="pl-c1">1</span>
|| <span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">get</span>(<span class="pl-s">'field2'</span>)-><span class="pl-en">getData</span>();
}, <span class="pl-s">'myfield'</span>, <span class="pl-s">'text'</span>);</pre></div>
<h5 dir="auto">API 2</h5>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<?php
$builder
->_if(function (FormInterface $form) {
return $form->get('field1')->getData() >= 1
&& !$form->get('field2')->getData();
})
->add('myfield', 'text')
->add('myotherfield', 'text')
->_endif()
;
$builder
->_switch(function (FormInterface $form) {
return $form->get('field1')->getData();
})
->_case('foo')
->_case('bar')
->add('myfield', 'text', array('foo' => 'bar'))
->add('myotherfield', 'text')
->_case('baz')
->add('myfield', 'text', array('foo' => 'baz'))
->_default()
->add('myfield', 'text')
->_endswitch()
;"><pre class="notranslate"><span class="pl-ent"><?php</span>
<span class="pl-s1"><span class="pl-c1">$</span>builder</span>
-><span class="pl-en">_if</span>(<span class="pl-k">function</span> (<span class="pl-smi"><span class="pl-smi">FormInterface</span></span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>) {
<span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">get</span>(<span class="pl-s">'field1'</span>)-><span class="pl-en">getData</span>() >= <span class="pl-c1">1</span>
&& !<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">get</span>(<span class="pl-s">'field2'</span>)-><span class="pl-en">getData</span>();
})
-><span class="pl-en">add</span>(<span class="pl-s">'myfield'</span>, <span class="pl-s">'text'</span>)
-><span class="pl-en">add</span>(<span class="pl-s">'myotherfield'</span>, <span class="pl-s">'text'</span>)
-><span class="pl-en">_endif</span>()
;
<span class="pl-s1"><span class="pl-c1">$</span>builder</span>
-><span class="pl-en">_switch</span>(<span class="pl-k">function</span> (<span class="pl-smi"><span class="pl-smi">FormInterface</span></span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>) {
<span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">get</span>(<span class="pl-s">'field1'</span>)-><span class="pl-en">getData</span>();
})
-><span class="pl-en">_case</span>(<span class="pl-s">'foo'</span>)
-><span class="pl-en">_case</span>(<span class="pl-s">'bar'</span>)
-><span class="pl-en">add</span>(<span class="pl-s">'myfield'</span>, <span class="pl-s">'text'</span>, <span class="pl-en">array</span>(<span class="pl-s">'foo'</span> => <span class="pl-s">'bar'</span>))
-><span class="pl-en">add</span>(<span class="pl-s">'myotherfield'</span>, <span class="pl-s">'text'</span>)
-><span class="pl-en">_case</span>(<span class="pl-s">'baz'</span>)
-><span class="pl-en">add</span>(<span class="pl-s">'myfield'</span>, <span class="pl-s">'text'</span>, <span class="pl-en">array</span>(<span class="pl-s">'foo'</span> => <span class="pl-s">'baz'</span>))
-><span class="pl-en">_default</span>()
-><span class="pl-en">add</span>(<span class="pl-s">'myfield'</span>, <span class="pl-s">'text'</span>)
-><span class="pl-en">_endswitch</span>()
;</pre></div>
<p dir="auto">The second API obviously is a lot more expressive, but also a bit more complicated than the first one.</p>
<p dir="auto">Please give me your opinions on what API you prefer or whether you can think of further limitations in these APIs.</p>
<h5 dir="auto">Implementation</h5>
<p dir="auto">The issue of creating dependencies between fields can be solved by a lazy dependency resolution graph like in the OptionsResolver.</p>
<p dir="auto">During form prepopulation, the conditions are invoked with a <code class="notranslate">FormPrepopulator</code> object implementing <code class="notranslate">FormInterface</code>. When <code class="notranslate">FormPrepopulator::get('field')</code> is called, "field" is prepopulated. If "field" is also dependent on some condition, that condition will be evaluated now in order to construct "field". After evaluating the condition, fields are added or removed accordingly.</p>
<p dir="auto">During form binding, the conditions are invoked with a <code class="notranslate">FormBinder</code> object, that also implements <code class="notranslate">FormInterface</code>. This object works like <code class="notranslate">FormPrepopulator</code>, only that it binds the fields instead of filling them with default data.</p>
<p dir="auto">In both cases, circular dependencies can be detected and reported.</p> | 1 |
<h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>9.0.0 and later</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>macOS 10.13.6</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>8.3.3</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">in BrowserWindow set to do http CORS request<br>
webPreferences: {<br>
webSecurity: false<br>
},<br>
in low version electron, can do CORS request.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Access to XMLHttpRequest at '<a href="https://xxx" rel="nofollow">https://xxx</a>' from origin '<a href="http://localhost:9080" rel="nofollow">http://localhost:9080</a>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.</p> | <h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong><br>
12.0.0-beta.21</li>
<li><strong>Operating System:</strong><br>
Windows 10</li>
<li><strong>Last Known Working Electron version:</strong><br>
12.0.0-beta.20</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">No crash.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Crash reported to Sentry using minidump uploader:<br>
<a href="https://sentry.io/share/issue/70e843318a304dae9616805c3223a1cc/" rel="nofollow">https://sentry.io/share/issue/70e843318a304dae9616805c3223a1cc/</a></p>
<h3 dir="auto">To Reproduce this might be enough</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Use Electron.WebRequest .onBeforeRequest(
{
urls: [],
},
({ url }, callback) => {
if (url.startsWith('https://test..com')) {
callback({ cancel: true });
} else {
callback({ cancel: false });
}
},
);"><pre class="notranslate"><code class="notranslate">Use Electron.WebRequest .onBeforeRequest(
{
urls: [],
},
({ url }, callback) => {
if (url.startsWith('https://test..com')) {
callback({ cancel: true });
} else {
callback({ cancel: false });
}
},
);
</code></pre></div> | 0 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=david_syer" rel="nofollow">Dave Syer</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-5850?redirect=false" rel="nofollow">SPR-5850</a></strong> and commented</p>
<p dir="auto">Provide a ContextLoader for WebApplicationApplicationContext: some components (e.g. View implementations) are hard or impossible to test without an instance of WebApplicationContext.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 M3</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="398091548" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9917" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9917/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9917">#9917</a> Support loading WebApplicationContexts with the TestContext Framework (<em><strong>"duplicates"</strong></em>)</li>
</ul> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=fritz" rel="nofollow">Fritz Richter</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7784?redirect=false" rel="nofollow">SPR-7784</a></strong> and commented</p>
<p dir="auto">In my current webapp project, I found out, that if I post something to the server in the form of ?list=1&list=2&list=3 and I have got a Mapping on my controller, which has the following parameter <code class="notranslate">@RequestParam</code> List<Long>, it will contain String objects, and not Long objects.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0.5</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398108979" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12437" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12437/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12437">#12437</a> <code class="notranslate">@RequestParam</code> - wanting List getting List (<em><strong>"duplicates"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398108979" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12437" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12437/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12437">#12437</a> <code class="notranslate">@RequestParam</code> - wanting List getting List</li>
</ul> | 0 |
<p dir="auto">Is it possible to build a subset of babel to just use the <code class="notranslate">transform</code> function for compiling es6/es7/jsx to js in the browser, does it generally have to be this huge? Are there any tricks for using it with webpack?</p>
<p dir="auto"><code class="notranslate">JSXTransformer</code> and <code class="notranslate">react-tools</code> are going away and babel seems to remain the only available option for transpiling JSX in the browser, however it's 10 times bigger than those two which is often quite a problem.</p> | <p dir="auto">Current size <code class="notranslate">browser-polyfill.min.js</code> ~80kb. Possible serious reduce it. Browserify, by default, saves modules path, it's not required.</p>
<p dir="auto">Full shim version of <code class="notranslate">core-js</code> with <code class="notranslate">browserify</code> (w/o <code class="notranslate">bundle-collapser</code>) - 65kb, with <code class="notranslate">webpack</code> - 43kb.</p>
<p dir="auto">Possible use <code class="notranslate">webpack</code> or add <code class="notranslate">bundle-collapser</code>.</p>
<p dir="auto">I think, possible do the same with <code class="notranslate">browser.js</code>.</p> | 1 |
<h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">Bug on current git devel, introduced with <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/eeb597360e6d766bf700e2af4b7b2ae236d55b69/hovercard" href="https://github.com/ansible/ansible/commit/eeb597360e6d766bf700e2af4b7b2ae236d55b69"><tt>eeb5973</tt></a></p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">Ubuntu 12.04 and 14.04</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">When applying some filters on a list, when the resulting list is empty, it is not recognised as a list anymore.</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
---
- hosts: localhost
gather_facts: false
connection: local
tasks:
- command: cat /proc/cpuinfo
register: cpuinfo
- debug: var=cpuinfo.stdout_lines|difference(cpuinfo.stdout_lines)
- debug: var=item
with_items: cpuinfo.stdout_lines|difference(cpuinfo.stdout_lines)"><pre class="notranslate"><code class="notranslate">
---
- hosts: localhost
gather_facts: false
connection: local
tasks:
- command: cat /proc/cpuinfo
register: cpuinfo
- debug: var=cpuinfo.stdout_lines|difference(cpuinfo.stdout_lines)
- debug: var=item
with_items: cpuinfo.stdout_lines|difference(cpuinfo.stdout_lines)
</code></pre></div>
<h5 dir="auto">Expected Results:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK: [debug var=cpuinfo.stdout_lines|difference(cpuinfo.stdout_lines)] *******
ok: [localhost] => {
"cpuinfo.stdout_lines|difference(cpuinfo.stdout_lines)": "set([])"
}
TASK: [debug var=item] ********************************************************
skipping: [localhost]"><pre class="notranslate"><code class="notranslate">TASK: [debug var=cpuinfo.stdout_lines|difference(cpuinfo.stdout_lines)] *******
ok: [localhost] => {
"cpuinfo.stdout_lines|difference(cpuinfo.stdout_lines)": "set([])"
}
TASK: [debug var=item] ********************************************************
skipping: [localhost]
</code></pre></div>
<h5 dir="auto">Actual Results:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK: [debug var=cpuinfo.stdout_lines|difference(cpuinfo.stdout_lines)] *******
ok: [localhost] => {
"cpuinfo.stdout_lines|difference(cpuinfo.stdout_lines)": "set([])"
}
TASK: [debug var=item] ********************************************************
fatal: [localhost] => with_items expects a list or a set
FATAL: all hosts have already failed -- aborting"><pre class="notranslate"><code class="notranslate">TASK: [debug var=cpuinfo.stdout_lines|difference(cpuinfo.stdout_lines)] *******
ok: [localhost] => {
"cpuinfo.stdout_lines|difference(cpuinfo.stdout_lines)": "set([])"
}
TASK: [debug var=item] ********************************************************
fatal: [localhost] => with_items expects a list or a set
FATAL: all hosts have already failed -- aborting
</code></pre></div> | <h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">ansible 1.6.6</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">What OS are you running Ansible from and what OS are you managing? Examples include RHEL 5/6, Centos 5/6, Ubuntu 12.04/13.10, *BSD, Solaris. If this is a generic feature request or it doesn't apply, just say “N/A”.</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">I have an ansible task that looks like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Distribute Jar files to all other cluster nodes
shell: rsync -avz {{ home }}/.m2 {{ user }}@{{ item }}:{{ home }}/
with_items: groups.hadoop_all | difference(inventory_hostname)
when: groups.hadoop_all | difference(inventory_hostname) | length > 1
ignore_errors: yes
sudo: no
tags:
- distribute_jars"><pre class="notranslate"><code class="notranslate">- name: Distribute Jar files to all other cluster nodes
shell: rsync -avz {{ home }}/.m2 {{ user }}@{{ item }}:{{ home }}/
with_items: groups.hadoop_all | difference(inventory_hostname)
when: groups.hadoop_all | difference(inventory_hostname) | length > 1
ignore_errors: yes
sudo: no
tags:
- distribute_jars
</code></pre></div>
<p dir="auto">which works fine on ansible 1.6.5 but fails on 1.6.6</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto">Working on a reduced test case now.</p>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">I would expect the playbook to complete without errors.</p>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">The actual result is that it fails in 1.6.6 with this output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK: [dev | Distribute Jar files to all other cluster nodes] ***********
fatal: [dev] => with_items expects a list or a set
FATAL: all hosts have already failed -- aborting"><pre class="notranslate"><code class="notranslate">TASK: [dev | Distribute Jar files to all other cluster nodes] ***********
fatal: [dev] => with_items expects a list or a set
FATAL: all hosts have already failed -- aborting
</code></pre></div>
<p dir="auto">I've stepped back through ansible versions on a machine, keeping everything else the same and as soon as you upgrade to 1.6.6, it starts falling with this error. I'm using ansible installed via pip, if that makes any difference.</p> | 1 |
<p dir="auto">Today I've upgraded our codebase from r88 -> r91, everything seems to work fine aside from the reflectors (code which has not significantly changed since r88 from what I see). I've noticed that when checking individual upgrades, the problem starts at r90.</p>
<p dir="auto">It seems to go exponentially bad when our entire model + mirror are in the frustrum, when I'm right in front of it & little else of the model, the performance is OK. Now since I can't provide live examples, I was wondering if someone could point me on where to look/investigate, or what could have changed in that release that affects them?</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r91</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r90</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> r89</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> r88</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Linux</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li>
</ul>
<h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5> | <p dir="auto">Right now, there are two ways to adjust the positioning of a texture on an object:</p>
<ul dir="auto">
<li>UV coordinates in geometry</li>
<li><code class="notranslate">.offset</code> and <code class="notranslate">.repeat</code> properties on <code class="notranslate">Texture</code></li>
</ul>
<p dir="auto">It would be useful to also have <code class="notranslate">.offset</code> and <code class="notranslate">.repeat</code> properties on <code class="notranslate">Material</code> as well, so that these values could be varied on different objects without having to allocate additional geometries or texture resources.</p>
<p dir="auto">I'm considering an interesting use case: breaking down sky spheres/domes into smaller components. Rather than create a single, large, solid sphere, imagine a fraction of an icosahedron (subdivided) and repeated as multiple meshes to construct a sphere out of pieces. It would cost a few extra draw calls, but provide at least two benefits:</p>
<ol dir="auto">
<li>Significantly reduce the number of vertices computed by excluding the ones that are off camera, which is well more than half. Spheres can have hundreds of vertices, depending on the level of detail. This is not such a big deal on desktop, but I suspect it could make a big difference on mobile devices with <a href="https://en.wikipedia.org/wiki/Tiled_rendering" rel="nofollow">tiled GPU</a> architectures that would cause the vertex shader to be run many times.</li>
<li>Reduce overdraw by fixing z-sorting. If an entire sky sphere is positioned at [0, 0, 0], it will almost certainly be sorted incorrectly and drawn first every time, even though it should be drawn last. By positioning individual sphere components far away, they should be correctly sorted last.</li>
</ol>
<p dir="auto">Implementing this approach today would require duplicating either the geometry (for different UV coordinates) or the texture (for different offsets) for each piece of the sky. If we could set the offset on the material, each piece would use the same geometry, shader and sampler, only varying the uniform values between draw calls.</p> | 0 |
<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</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/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</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/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</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/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>:</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Celery Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<details>
<p dir="auto">
Swap the commented line setting `c` for expected behaviour.
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import celery
app = celery.Celery(broker="redis://", backend="redis://")
@app.task
def nop(*_):
pass
@app.task
def die(*_):
raise RuntimeError
@app.task(bind=True)
def replace(self, with_):
with_ = celery.Signature.from_dict(with_)
raise self.replace(with_)
@app.task
def cb(*args):
print("CALLBACK", *args)
#c = celery.chain(nop.s(), die.s())
c = celery.chain(nop.s(), replace.si(die.s()))
c.link_error(cb.s())
c.apply_async()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">celery</span>
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-s1">celery</span>.<span class="pl-v">Celery</span>(<span class="pl-s1">broker</span><span class="pl-c1">=</span><span class="pl-s">"redis://"</span>, <span class="pl-s1">backend</span><span class="pl-c1">=</span><span class="pl-s">"redis://"</span>)
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-s1">task</span></span>
<span class="pl-k">def</span> <span class="pl-en">nop</span>(<span class="pl-c1">*</span><span class="pl-s1">_</span>):
<span class="pl-k">pass</span>
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-s1">task</span></span>
<span class="pl-k">def</span> <span class="pl-en">die</span>(<span class="pl-c1">*</span><span class="pl-s1">_</span>):
<span class="pl-k">raise</span> <span class="pl-v">RuntimeError</span>
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">task</span>(<span class="pl-s1">bind</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">replace</span>(<span class="pl-s1">self</span>, <span class="pl-s1">with_</span>):
<span class="pl-s1">with_</span> <span class="pl-c1">=</span> <span class="pl-s1">celery</span>.<span class="pl-v">Signature</span>.<span class="pl-en">from_dict</span>(<span class="pl-s1">with_</span>)
<span class="pl-k">raise</span> <span class="pl-s1">self</span>.<span class="pl-en">replace</span>(<span class="pl-s1">with_</span>)
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-s1">task</span></span>
<span class="pl-k">def</span> <span class="pl-en">cb</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>):
<span class="pl-en">print</span>(<span class="pl-s">"CALLBACK"</span>, <span class="pl-c1">*</span><span class="pl-s1">args</span>)
<span class="pl-c">#c = celery.chain(nop.s(), die.s())</span>
<span class="pl-s1">c</span> <span class="pl-c1">=</span> <span class="pl-s1">celery</span>.<span class="pl-en">chain</span>(<span class="pl-s1">nop</span>.<span class="pl-en">s</span>(), <span class="pl-s1">replace</span>.<span class="pl-en">si</span>(<span class="pl-s1">die</span>.<span class="pl-en">s</span>()))
<span class="pl-s1">c</span>.<span class="pl-en">link_error</span>(<span class="pl-s1">cb</span>.<span class="pl-en">s</span>())
<span class="pl-s1">c</span>.<span class="pl-en">apply_async</span>()</pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto"><code class="notranslate">cb</code> should be called as a new-style errback because it accepts starargs</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto"><code class="notranslate">cb</code> is not called</p> | <p dir="auto">when trying to start a worker.</p>
<p dir="auto">[2013-06-28 12:28:07,258: ERROR/MainProcess] Unrecoverable error: AttributeError("'Connection' object has no attribute 'setblocking'",) Traceback (most recent call last): File "/Users/yannick/.pythonbrew/pythons/Python-3.3.0/lib/python3.3/site-packages/celery-3.1.0rc3-py3.3.egg/celery/worker/<strong>init</strong>.py", line 189, in start self.blueprint.start(self) File "/Users/yannick/.pythonbrew/pythons/Python-3.3.0/lib/python3.3/site-packages/celery-3.1.0rc3-py3.3.egg/celery/bootsteps.py", line 119, in start step.start(parent) File "/Users/yannick/.pythonbrew/pythons/Python-3.3.0/lib/python3.3/site-packages/celery-3.1.0rc3-py3.3.egg/celery/bootsteps.py", line 352, in start return self.obj.start() File "/Users/yannick/.pythonbrew/pythons/Python-3.3.0/lib/python3.3/site-packages/celery-3.1.0rc3-py3.3.egg/celery/concurrency/base.py", line 112, in start self.on_start() File "/Users/yannick/.pythonbrew/pythons/Python-3.3.0/lib/python3.3/site-packages/celery-3.1.0rc3-py3.3.egg/celery/concurrency/processes.py", line 461, in on_start **self.options) File "/Users/yannick/.pythonbrew/pythons/Python-3.3.0/lib/python3.3/site-packages/celery-3.1.0rc3-py3.3.egg/celery/concurrency/processes.py", line 236, in <strong>init</strong> for _ in range(processes)) File "/Users/yannick/.pythonbrew/pythons/Python-3.3.0/lib/python3.3/site-packages/celery-3.1.0rc3-py3.3.egg/celery/concurrency/processes.py", line 236, in for _ in range(processes)) File "/Users/yannick/.pythonbrew/pythons/Python-3.3.0/lib/python3.3/site-packages/celery-3.1.0rc3-py3.3.egg/celery/concurrency/processes.py", line 268, in create_process_queues inq._writer.setblocking(0) AttributeError: 'Connection' object has no attribute 'setblocking'</p> | 0 |
<p dir="auto">Hello, folks.</p>
<p dir="auto">Version 3.0.3 of bootstrap.css has ineffective rules for striped tables which have rows with .danger or other contextual class(es), if <em>tbody</em> is used</p>
<p dir="auto">Given a table with the following structure...</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<table class="table table-striped table-hover">
<tbody>
<tr class="danger">
<td>Row 1</td>
</tr>
<tr class="danger">
<td>Row 2</td>
</tr>
<tr class="danger">
<td>Row 3</td>
</tr>
</tbody>
</table>"><pre class="notranslate"><code class="notranslate"><table class="table table-striped table-hover">
<tbody>
<tr class="danger">
<td>Row 1</td>
</tr>
<tr class="danger">
<td>Row 2</td>
</tr>
<tr class="danger">
<td>Row 3</td>
</tr>
</tbody>
</table>
</code></pre></div>
<p dir="auto">...only Row 2 gets emphasized with the <em>.danger</em> contextual class rules. On hovering these rows, the normal emphasis returns, including the darker color on the shaded rows.</p>
<p dir="auto">In dist, the rule for <em>table-striped</em> in bootstrap.css : 1712 overrides the rule in bootstrap : 1770, because the former contains a <em>tbody</em> selector node, which determines the rule to be sharper than the latter, where this node is missing.</p>
<p dir="auto">This bug has probably been introduced with the super-specific rules for .table-striped class in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/twbs/bootstrap/commit/224296f6950ce0e5b00ba88aacf54fe4c638f14a/hovercard" href="https://github.com/twbs/bootstrap/commit/224296f6950ce0e5b00ba88aacf54fe4c638f14a"><tt>224296f</tt></a>/less/tables.less, purposed to fix <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="12027468" data-permission-text="Title is private" data-url="https://github.com/twbs/bootstrap/issues/7281" data-hovercard-type="issue" data-hovercard-url="/twbs/bootstrap/issues/7281/hovercard" href="https://github.com/twbs/bootstrap/issues/7281">#7281</a>.</p> | <p dir="auto">i have table with class .table-striped. it has 3 rows with tr.danger. only the middle one is red, the other two are default color.</p>
<p dir="auto">when i remove .table-striped, it works correctly</p> | 1 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=blurryrunner" rel="nofollow">Stephen Todd</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3450?redirect=false" rel="nofollow">SPR-3450</a></strong> and commented</p>
<p dir="auto">Spring's current code makes it difficult to use java collections as a command in command controllers. Specifically, referencing elements in the collection is prevented. Currently, elements in an collection are references using []. Support needs to be added to allw paths to start with [index/key] as in "[1].property".</p>
<p dir="auto">The application for this is probably rare, which is probably why it hasn't been brought up before (at least I couldn't find an similarly reported issues). I use the functionality for executing multiple of the same commands. I currently have a form that has multiple objects that can be selected. If the user clicks "Delete" with multiple objects selected, I have an array of id's that get passed to a delete form. This form creates a delete command for each object specified. Details for the way the objects are deleted are stored in an object, which is put in to a list. When the user submits the form, each command is executed in succession (the list is actually passed to the business layer and executed in a single transaction).</p>
<p dir="auto">The current work around is to create a subclass of the java collection you want and make a getter that returns this. Then you can reference the array as (using a getter getSelf()) "self[1].property". Although this method works, a method that doesn't require this simple extension would be preferable.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0.4</p> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=aantono" rel="nofollow">Alex Antonov</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2058?redirect=false" rel="nofollow">SPR-2058</a></strong> and commented</p>
<p dir="auto">When a BeanWrapper wraps an object that is a map or a collection of sorts, it has trouble retrieving a value using a key property<br>
i.e.<br>
Person p = new Person("John");<br>
Map map = new HashMap();<br>
map.put("key", person);<br>
BeanWrapperImpl wrapper = new BeanWrapperImpl(map);<br>
String name = wrapper.getPropertyValue("[key].name")</p>
<p dir="auto">This kind of access is very possible when comming from a web-layer using a bind-path of something like [key].name when the top-level object is itself a map.<br>
In this case, when calling errros.rejectValue("[key].name", ...) in the validator, the call throws an exception due to inability to find an object referenced by [key].</p>
<p dir="auto">Currently a work-around this problem is to subclass a map and provide a getter for every key you might have in the map, so that the path looks like key.name, but<br>
this approach requires a lot of overhead of the getter creation.</p>
<hr>
<p dir="auto">11 votes, 9 watchers</p> | 1 |
<p dir="auto">The first build against master where this happened is <a href="https://ci.appveyor.com/project/StefanKarpinski/julia/build/1.0.5994/job/l01nwf0rwaedju0o" rel="nofollow">https://ci.appveyor.com/project/StefanKarpinski/julia/build/1.0.5994/job/l01nwf0rwaedju0o</a>, for <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/6ec7c21ff66bb5ec31e674134976d4c5beac7322/hovercard" href="https://github.com/JuliaLang/julia/commit/6ec7c21ff66bb5ec31e674134976d4c5beac7322"><tt>6ec7c21</tt></a></p>
<p dir="auto">I can reproduce locally, will try to see whether it's repeatable or intermittent (once I walk over to stata)</p> | <p dir="auto">I've gotten this to happen on 2 different Win64 computers, one Sandy Bridge, one Haswell. Happens when running <code class="notranslate">runtests.jl all</code> in parallel, seemingly more often the more cores I use for the tests. One of the workers gets stuck on its first test - so usually linalg, but I just got it to happen even on the strings test - while the rest of the workers happily finish everything else, waiting right before running <code class="notranslate">parallel</code> at the very end like they're supposed to.</p>
<p dir="auto">This isn't just the usual linalg slowness, I've left these going on multiple computers for half an hour or longer. The offending processes are stuck at 100% of a single core, but the memory consumption isn't changing at all.</p>
<p dir="auto">This doesn't happen on Win32, or when <code class="notranslate">JULIA_CPU_CORES=1</code>. Any ideas how to narrow this down? OpenBlas interaction? Win64 codegen problem? Something to do with libuv and task spawning? Ignore it and hope it doesn't show up in normal code?</p> | 1 |
<p dir="auto">There's now a number of issues open for thoughts about how to make the printing of types more readable. Here's another notion: it would be nice if printing could replace <code class="notranslate">Union</code>s with appropriate typealiases. For example:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> methods(permutedims)
#2 methods for generic function "permutedims":
permutedims(B::Union{Base.ReshapedArray{T<:Any,N<:Any,A<:DenseArray,MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N<:Any}}},DenseArray{T<:Any,N<:Any},SubArray{T<:Any,N<:Any,A<:Union{Base.ReshapedArray{T<:Any,N<:Any,A<:DenseArray,MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N<:Any}}},DenseArray},I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex,Colon,Int64,Range{Int64}},N<:Any}},L<:Any}}, perm) at multidimensional.jl:959
permutedims{T,N}(A::AbstractArray{T,N}, perm) at permuteddimsarray.jl:47"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-c1">methods</span>(permutedims)
<span class="pl-c"><span class="pl-c">#</span>2 methods for generic function "permutedims":</span>
<span class="pl-c1">permutedims</span>(B<span class="pl-k">::</span><span class="pl-c1">Union</span>{Base<span class="pl-k">.</span>ReshapedArray{T<span class="pl-k"><:</span><span class="pl-c1">Any</span>,N<span class="pl-k"><:</span><span class="pl-c1">Any</span>,A<span class="pl-k"><:</span><span class="pl-c1">DenseArray</span>,MI<span class="pl-k"><:</span><span class="pl-c1">Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N<:Any}}</span>},DenseArray{T<span class="pl-k"><:</span><span class="pl-c1">Any</span>,N<span class="pl-k"><:</span><span class="pl-c1">Any</span>},SubArray{T<span class="pl-k"><:</span><span class="pl-c1">Any</span>,N<span class="pl-k"><:</span><span class="pl-c1">Any</span>,A<span class="pl-k"><:</span><span class="pl-c1">Union</span>{Base<span class="pl-k">.</span>ReshapedArray{T<span class="pl-k"><:</span><span class="pl-c1">Any</span>,N<span class="pl-k"><:</span><span class="pl-c1">Any</span>,A<span class="pl-k"><:</span><span class="pl-c1">DenseArray</span>,MI<span class="pl-k"><:</span><span class="pl-c1">Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N<:Any}}</span>},DenseArray},I<span class="pl-k"><:</span><span class="pl-c1">Tuple</span>{Vararg{Union{Base<span class="pl-k">.</span>AbstractCartesianIndex,Colon,Int64,Range{Int64}},N<span class="pl-k"><:</span><span class="pl-c1">Any</span>}},L<span class="pl-k"><:</span><span class="pl-c1">Any</span>}}, perm) at multidimensional<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">959</span>
<span class="pl-c1">permutedims</span><span class="pl-c1">{T,N}</span>(A<span class="pl-k">::</span><span class="pl-c1">AbstractArray{T,N}</span>, perm) at permuteddimsarray<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">47</span></pre></div>
<p dir="auto">But the first method is actually defined as <code class="notranslate">permutedims(B::StridedArray, perm)</code> which is rather simpler to read.</p>
<p dir="auto">This is easy to point out, but actually implementing it seems likely to be hard starting from the <code class="notranslate">jl_uniontype_t</code> itself. Unless <code class="notranslate">Union</code> types get modified to record whether they come from a <code class="notranslate">typealias</code>.</p> | <p dir="auto">I'd like to request some speculative brain cells spent on how we print method signatures to the REPL.</p>
<p dir="auto">Currently, we expand out all typealiases. While this policy has the advantage of producing unambiguous output, the composition of type aliases through type parameters leads to combinatorially long string representations.</p>
<p dir="auto">A particularly egregious example in Base is <code class="notranslate">eigfact!</code>:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> methods(eigfact!)
#12 methods for generic function "eigfact!":
...
eigfact!{T<:Union{Complex{Float32},Complex{Float64}}}(A::Union{DenseArray{T,2},SubArray{T,2,A<:DenseArray{T<:Any,N<:Any},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD<:Any}}) at linalg/eigen.jl:50
eigfact!{T<:Union{Float32,Float64}}(A::Union{DenseArray{T,2},SubArray{T,2,A<:DenseArray{T<:Any,N<:Any},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD<:Any}}, B::Union{DenseArray{T,2},SubArray{T,2,A<:DenseArray{T<:Any,N<:Any},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD<:Any}}) at linalg/eigen.jl:121
eigfact!{T<:Union{Complex{Float32},Complex{Float64}}}(A::Union{DenseArray{T,2},SubArray{T,2,A<:DenseArray{T<:Any,N<:Any},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD<:Any}}, B::Union{DenseArray{T,2},SubArray{T,2,A<:DenseArray{T<:Any,N<:Any},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD<:Any}}) at linalg/eigen.jl:142
..."><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-c1">methods</span>(eigfact!)
<span class="pl-c"><span class="pl-c">#</span>12 methods for generic function "eigfact!":</span>
<span class="pl-k">...</span>
<span class="pl-c1">eigfact!</span><span class="pl-c1">{T<:Union{Complex{Float32},Complex{Float64}}}</span>(A<span class="pl-k">::</span><span class="pl-c1">Union</span>{DenseArray{T,<span class="pl-c1">2</span>},SubArray{T,<span class="pl-c1">2</span>,A<span class="pl-k"><:</span><span class="pl-c1">DenseArray{T<:Any,N<:Any}</span>,I<span class="pl-k"><:</span><span class="pl-c1">Tuple</span>{Vararg{Union{Colon,Int64,Range{Int64}}}},LD<span class="pl-k"><:</span><span class="pl-c1">Any</span>}}) at linalg<span class="pl-k">/</span>eigen<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">50</span>
<span class="pl-c1">eigfact!</span><span class="pl-c1">{T<:Union{Float32,Float64}}</span>(A<span class="pl-k">::</span><span class="pl-c1">Union</span>{DenseArray{T,<span class="pl-c1">2</span>},SubArray{T,<span class="pl-c1">2</span>,A<span class="pl-k"><:</span><span class="pl-c1">DenseArray{T<:Any,N<:Any}</span>,I<span class="pl-k"><:</span><span class="pl-c1">Tuple</span>{Vararg{Union{Colon,Int64,Range{Int64}}}},LD<span class="pl-k"><:</span><span class="pl-c1">Any</span>}}, B<span class="pl-k">::</span><span class="pl-c1">Union</span>{DenseArray{T,<span class="pl-c1">2</span>},SubArray{T,<span class="pl-c1">2</span>,A<span class="pl-k"><:</span><span class="pl-c1">DenseArray{T<:Any,N<:Any}</span>,I<span class="pl-k"><:</span><span class="pl-c1">Tuple</span>{Vararg{Union{Colon,Int64,Range{Int64}}}},LD<span class="pl-k"><:</span><span class="pl-c1">Any</span>}}) at linalg<span class="pl-k">/</span>eigen<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">121</span>
<span class="pl-c1">eigfact!</span><span class="pl-c1">{T<:Union{Complex{Float32},Complex{Float64}}}</span>(A<span class="pl-k">::</span><span class="pl-c1">Union</span>{DenseArray{T,<span class="pl-c1">2</span>},SubArray{T,<span class="pl-c1">2</span>,A<span class="pl-k"><:</span><span class="pl-c1">DenseArray{T<:Any,N<:Any}</span>,I<span class="pl-k"><:</span><span class="pl-c1">Tuple</span>{Vararg{Union{Colon,Int64,Range{Int64}}}},LD<span class="pl-k"><:</span><span class="pl-c1">Any</span>}}, B<span class="pl-k">::</span><span class="pl-c1">Union</span>{DenseArray{T,<span class="pl-c1">2</span>},SubArray{T,<span class="pl-c1">2</span>,A<span class="pl-k"><:</span><span class="pl-c1">DenseArray{T<:Any,N<:Any}</span>,I<span class="pl-k"><:</span><span class="pl-c1">Tuple</span>{Vararg{Union{Colon,Int64,Range{Int64}}}},LD<span class="pl-k"><:</span><span class="pl-c1">Any</span>}}) at linalg<span class="pl-k">/</span>eigen<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">142</span>
<span class="pl-k">...</span></pre></div>
<p dir="auto">I estimate that only three people in the world can read the first method signature and immediately recognize that the original calling signature was</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="eigfact!{T<:BlasComplex}(A::StridedMatrix{T})"><pre class="notranslate"><code class="notranslate">eigfact!{T<:BlasComplex}(A::StridedMatrix{T})
</code></pre></div>
<p dir="auto">and it would take an eagle eye to realize that the first method takes one argument whereas the other two take two inputs each.</p>
<p dir="auto">It would be much nicer to print something like the original method signature instead of feeling overwhelmed by C++ expression template-like verbal diarrhea. It's clear, though, that the additional bookkeeping of typealiases and matching of typealiases to method signatures is a hard problem.</p> | 1 |
<p dir="auto">When a typeahead <code class="notranslate">process</code> call receives an array of objects instead of strings it passes "[Object object]" to <a href="https://github.com/twitter/bootstrap/blob/master/js/bootstrap-typeahead.js#L54"><code class="notranslate">updater</code></a>. One would expect that updater would receive the object, as <code class="notranslate">matcher</code>, <code class="notranslate">sorter</code>, and <code class="notranslate">highlighter</code> work as expected.</p>
<p dir="auto">The problem seems to be that the data is being stored by way of calls to jQuery.attr.</p>
<p dir="auto">One potential fix is changing <a href="https://github.com/twitter/bootstrap/blob/master/js/bootstrap-typeahead.js#L47">https://github.com/twitter/bootstrap/blob/master/js/bootstrap-typeahead.js#L47</a> and <a href="https://github.com/twitter/bootstrap/blob/master/js/bootstrap-typeahead.js#L141">https://github.com/twitter/bootstrap/blob/master/js/bootstrap-typeahead.js#L141</a> respectively as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="47 var val = this.$menu.find('.active').attr('data-value')"><pre class="notranslate"><code class="notranslate">47 var val = this.$menu.find('.active').attr('data-value')
</code></pre></div>
<p dir="auto">becomes</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="47 var val = this.$menu.find('.active').data('typeahead-value')"><pre class="notranslate"><code class="notranslate">47 var val = this.$menu.find('.active').data('typeahead-value')
</code></pre></div>
<p dir="auto">and</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="141 i = $(that.options.item).attr('data-value', item)"><pre class="notranslate"><code class="notranslate">141 i = $(that.options.item).attr('data-value', item)
</code></pre></div>
<p dir="auto">becomes</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" 141 i = $(that.options.item).data('typeahead-value', item)"><pre class="notranslate"><code class="notranslate"> 141 i = $(that.options.item).data('typeahead-value', item)
</code></pre></div>
<p dir="auto">The underlying issue is jQuery's <a href="http://api.jquery.com/attr/" rel="nofollow">'attr'</a> function calls <code class="notranslate">toString</code> instead of serializing, whereas <a href="http://api.jquery.com/jQuery.data/" rel="nofollow">'data'</a> serializes properly - preserving all the useful bits of the object.</p>
<p dir="auto">Note that I changed 'data-value' to 'typeahead-value' just to avoid any name collisions (although I am sure they are pretty unlikely).</p>
<p dir="auto">A workaround is to serialize with eg <code class="notranslate">JSON.stringify</code> the results of <code class="notranslate">sorter</code>, and then <code class="notranslate">JSON.parse</code> the item passed to <code class="notranslate">updater</code>.</p> | <p dir="auto">your current set up is so:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=".clearfix() {
&:before,
&:after {
content: " "; // 1
display: table; // 2
}
&:after {
clear: both;
}
}
.clearfix {
.clearfix();
}"><pre class="notranslate"><code class="notranslate">.clearfix() {
&:before,
&:after {
content: " "; // 1
display: table; // 2
}
&:after {
clear: both;
}
}
.clearfix {
.clearfix();
}
</code></pre></div>
<p dir="auto">consider switching to this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=".clearfix {
&:before,
&:after {
content: " "; // 1
display: table; // 2
}
&:after {
clear: both;
}
}
.clearfix() {
&:extend(.clearfix all);
}"><pre class="notranslate"><code class="notranslate">.clearfix {
&:before,
&:after {
content: " "; // 1
display: table; // 2
}
&:after {
clear: both;
}
}
.clearfix() {
&:extend(.clearfix all);
}
</code></pre></div>
<p dir="auto">it will reduce the amount of resulting css when devs use your mixin in their own less files. There will still be some duplicate with .clearfix() calling both mixin .clearfix() and selector .clearfix (known issue with less.js, and I do wish you would change .clearfix() to .makeclearfix() or .addclearfix() or whatever to alleviate this problem, but I know you won't).</p>
<p dir="auto">When the good fellas over at LESS do fix that problem, this code (combined with my suggested change)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=".my-class {
.clearfix();
}"><pre class="notranslate"><code class="notranslate">.my-class {
.clearfix();
}
</code></pre></div>
<p dir="auto">will result in:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=".clearfix:before,
.clearfix:after,
.my-class:before,
.my-class:after {
content: " ";
display: table;
}
.clearfix:after,
.my-class:after {
clear: both;
}
.my-class {
color: blue;
}"><pre class="notranslate"><code class="notranslate">.clearfix:before,
.clearfix:after,
.my-class:before,
.my-class:after {
content: " ";
display: table;
}
.clearfix:after,
.my-class:after {
clear: both;
}
.my-class {
color: blue;
}
</code></pre></div>
<p dir="auto">and of course if a dev uses .clearfix(); throught their own less files, the resultant compiled css will see a pretty significant reduction in size</p> | 0 |
<p dir="auto">Google search (at the top right corner) is broken in both:</p>
<ul dir="auto">
<li><a href="http://scikit-learn.org/stable/" rel="nofollow">http://scikit-learn.org/stable/</a></li>
<li><a href="http://scikit-learn.org/dev/" rel="nofollow">http://scikit-learn.org/dev/</a></li>
</ul>
<p dir="auto">It is still working in:</p>
<ul dir="auto">
<li><a href="http://scikit-learn.org/0.17/" rel="nofollow">http://scikit-learn.org/0.17/</a></li>
</ul> | <h4 dir="auto">Description</h4>
<p dir="auto">I noticed problems with the search results on the scikit-learn website. I am not sure if this problem just occurred today after 0.18 went live. Below is a screenshot of how it looks like when I do a search on the main page; on subpages the search does not seem to work altogether -- tested it on Chrome and Safari.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5618407/18935286/03ee3446-85ad-11e6-9e7f-f5614287e2b1.png"><img src="https://cloud.githubusercontent.com/assets/5618407/18935286/03ee3446-85ad-11e6-9e7f-f5614287e2b1.png" alt="screen shot 2016-09-28 at 6 51 47 pm" style="max-width: 100%;"></a></p>
<h4 dir="auto">Steps/Code to Reproduce</h4>
<h4 dir="auto">Expected Results</h4>
<h4 dir="auto">Actual Results</h4>
<h4 dir="auto">Versions</h4> | 1 |
<p dir="auto">Sometime copy paste hightlighted text from Atom to other app likes browser , skype ... or reversed cause ubuntu 14.04 freeze keyboard , mouse move super slow/lag then whole system hang up need to hold power button to turn off</p> | <ol dir="auto">
<li>Have two panes open</li>
<li>Visit the same file in both of 'em</li>
<li>Hit <code class="notranslate">M-b</code></li>
<li>See two entries for the file</li>
</ol>
<p dir="auto">I expect to see one.</p> | 0 |
<p dir="auto">Hello,</p>
<p dir="auto">I was trying to create czech lemmatisation analyzer using <a href="http://www.elasticsearch.org/guide/reference/index-modules/analysis/stemmer-override-tokenfilter.html" rel="nofollow">stemmer override filter</a> and czech dictionary from aspell.</p>
<p dir="auto">This dictionary contains around <code class="notranslate">300 000</code> words in base form and some suffix/prefix rules. After expansion format file looks like this</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Aakjaer Aakjaerech Aakjaery Aakjaerům Aakjaerů Aakjaerem Aakjaere Aakjaerovi Aakjaeru Aakjaera Aakjaerové
Aakjaerová Aakjaerovými Aakjaerovým Aakjaerových Aakjaerovou Aakjaerové
Aakjaerův Aakjaerovýma Aakjaerovými Aakjaerových Aakjaerovou Aakjaerovo Aakjaerovy Aakjaerovi Aakjaerovým "><pre class="notranslate"><code class="notranslate">Aakjaer Aakjaerech Aakjaery Aakjaerům Aakjaerů Aakjaerem Aakjaere Aakjaerovi Aakjaeru Aakjaera Aakjaerové
Aakjaerová Aakjaerovými Aakjaerovým Aakjaerových Aakjaerovou Aakjaerové
Aakjaerův Aakjaerovýma Aakjaerovými Aakjaerových Aakjaerovou Aakjaerovo Aakjaerovy Aakjaerovi Aakjaerovým
</code></pre></div>
<p dir="auto">each line is one word with its forms.</p>
<p dir="auto">Because of rules format <code class="notranslate">form => lemma</code> the final rule set is expanded from <code class="notranslate">300 000</code> to <code class="notranslate">4 364 674</code> lines.</p>
<p dir="auto">When I was trying on my local machine to index czech wikipedia pages (around <code class="notranslate">400 000</code> documents) <code class="notranslate">java.lang.OutOfMemoryError: Java heap space</code> error occured after approx 10 minutes of indexing (log file <a href="https://gist.github.com/vhyza/9f88b921a1d0f650ccd8#file-elasticsearch-log">here</a>)</p>
<p dir="auto">I'm using snapshot build of elasticsearch (<a href="https://github.com/elasticsearch/elasticsearch/commit/54e7e309a5d407b2fb1123a79e6af9d62e41ea1e">54e7e309a5d407b2fb1123a79e6af9d62e41ea1e</a>), <code class="notranslate">JAVA_OPTS -Xss200000 -Xms2g -Xmx2g</code> with no other indices.</p>
<p dir="auto">Index settings/mapping and river settings are in separate <a href="https://gist.github.com/vhyza/9f88b921a1d0f650ccd8#file-stemmer_override_test-sh">gist</a></p>
<p dir="auto">I was trying to achieve this functionality using <a href="http://www.elasticsearch.org/guide/reference/index-modules/analysis/synonym-tokenfilter.html" rel="nofollow">synonym token filter</a>, because of better format of synonym rules - <code class="notranslate">form1, form2, form3, form4 => lemma</code> (so number of rules are only about <code class="notranslate">300 000</code>).</p>
<p dir="auto">But it's not the same. In the case of using <code class="notranslate">stemmer override filter</code>, when token was not found in rule set, stemmer was used. I probably can do the same by adding <a href="http://www.elasticsearch.org/guide/reference/index-modules/analysis/keyword-marker-tokenfilter.html" rel="nofollow">keyword marker</a> and <a href="http://www.elasticsearch.org/guide/reference/index-modules/analysis/stemmer-tokenfilter.html" rel="nofollow">stemmer</a> in the filter chain, but I don't think it is the right way to do that.</p>
<p dir="auto">Please, is there some better 'compressed' format of <code class="notranslate">stemmer override filter</code> rules? Any thoughts how to avoid <code class="notranslate">java.lang.OutOfMemoryError: Java heap space</code> error?</p> | <p dir="auto"><strong>Elasticsearch version</strong>: 5.0.0</p>
<p dir="auto"><strong>Plugins installed</strong>: None</p>
<p dir="auto"><strong>JVM version</strong>: 1.8.0_101</p>
<p dir="auto"><strong>OS version</strong>: Ubuntu 16.04</p>
<p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:<br>
I have added multiple context mappings to a completion suggester field. In version 2.x and earlier, when filtering on those contexts, suggestions were only returned if they matched all of the contexts. But that does not seem to be the case with 5.0.0.</p>
<p dir="auto"><strong>Steps to reproduce</strong>:</p>
<ol dir="auto">
<li>Mapping for my suggest field:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""suggest": {
"type": "completion",
"contexts": [
{
"name": "companyContext",
"type": "category"
},
{
"name": "usersContext",
"type": "category"
}
]
}"><pre class="notranslate"><code class="notranslate">"suggest": {
"type": "completion",
"contexts": [
{
"name": "companyContext",
"type": "category"
},
{
"name": "usersContext",
"type": "category"
}
]
}
</code></pre></div>
<ol start="2" dir="auto">
<li>Index a document with suggest field contexts populated:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""suggest": {
"input": "test team site",
"contexts": {
"companyContext": "vendor",
"usersContext": ["chad", "fred"]
}
}"><pre class="notranslate"><code class="notranslate">"suggest": {
"input": "test team site",
"contexts": {
"companyContext": "vendor",
"usersContext": ["chad", "fred"]
}
}
</code></pre></div>
<ol start="3" dir="auto">
<li>Run a query supplying only one matching context:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""suggest": {
"suggestions": {
"text": "tes",
"completion": {
"field": "suggest",
"contexts":{
"companyContext": "vendor",
"usersContext": "bill"
}
}
}
}"><pre class="notranslate"><code class="notranslate">"suggest": {
"suggestions": {
"text": "tes",
"completion": {
"field": "suggest",
"contexts":{
"companyContext": "vendor",
"usersContext": "bill"
}
}
}
}
</code></pre></div>
<p dir="auto">I would expect that this would not return the indexed document, because the usersContext is not a match. And that was the behavior in 2.x. But in 5.0.0, the document that matches only the companyContext is returned.</p> | 0 |
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong></p>
<p dir="auto">When using multiple @ HostListener decorator on same function, such as code below</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" @HostListener('click', ['$event'])
@HostListener('mouseover', ['$event'])
@HostListener('focus',['$event'])
private eventRouter(e) {
console.log(e);
}"><pre class="notranslate"> @<span class="pl-smi">HostListener</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-s">'$event'</span><span class="pl-kos">]</span><span class="pl-kos">)</span>
@<span class="pl-smi">HostListener</span><span class="pl-kos">(</span><span class="pl-s">'mouseover'</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">'$event'</span><span class="pl-kos">]</span><span class="pl-kos">)</span>
@<span class="pl-smi">HostListener</span><span class="pl-kos">(</span><span class="pl-s">'focus'</span><span class="pl-kos">,</span><span class="pl-kos">[</span><span class="pl-s">'$event'</span><span class="pl-kos">]</span><span class="pl-kos">)</span>
<span class="pl-k">private</span> <span class="pl-s1">eventRouter</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</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></pre></div>
<p dir="auto">Only the first decorator will be listened, but the function got the latest decorator event, and the middle decorator and the last decorator will never be trigger.</p>
<p dir="auto"><strong>Expected behavior</strong></p>
<p dir="auto">fix this bug</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.3.0</li>
</ul>
<ul dir="auto">
<li><strong>Browser:</strong> [all ]</li>
</ul>
<ul dir="auto">
<li><strong>Language:</strong> [TypeScript 2.0.7]</li>
<li><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =</li>
</ul> | <p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong></p>
<p dir="auto">Angular library authors should inline templates (html/css) to ensure overall compatibility between different consumer types.</p>
<p dir="auto">This can be done with a fairly simple <a href="https://github.com/filipesilva/angular-quickstart-lib/blob/master/inline-resources.js">script</a>, but it has a few pitfalls:</p>
<ul dir="auto">
<li>special care must be taken to maintain sourcemap lines (inline over TS sources before <code class="notranslate">ngc</code>).</li>
<li>unit testing requires a separate module.id based setup to load templates into karma.</li>
<li>no watch mode.</li>
</ul>
<p dir="auto"><strong>Expected behavior</strong></p>
<p dir="auto">Since inlining is heavily encouraged for library AOT compilation, it should be included as an option for <code class="notranslate">ngc</code> (e.g. <code class="notranslate">angularCompilerOptions.inlineTemplates</code>).</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
An example library can be found at <a href="https://github.com/filipesilva/angular-quickstart-lib">https://github.com/filipesilva/angular-quickstart-lib</a>.</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
Less work for everyone building and shipping components, one less point of failure.</p>
<ul dir="auto">
<li>
<p dir="auto"><strong>Angular version:</strong> 4.x</p>
</li>
<li>
<p dir="auto"><strong>Language:</strong> [ TypeScript 2.x ]</p>
</li>
</ul>
<p dir="auto">/cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/IgorMinar/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/IgorMinar">@IgorMinar</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jasonaden/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jasonaden">@jasonaden</a></p> | 0 |
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">include_role 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.4.0.0
config file = /home/esio/work/ansible/ansible.cfg
configured module search path = [u'/home/esio/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.13 (default, Sep 5 2017, 08:53:59) [GCC 7.1.1 20170622 (Red Hat 7.1.1-3)]
"><pre class="notranslate"><code class="notranslate">ansible 2.4.0.0
config file = /home/esio/work/ansible/ansible.cfg
configured module search path = [u'/home/esio/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.13 (default, Sep 5 2017, 08:53:59) [GCC 7.1.1 20170622 (Red Hat 7.1.1-3)]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ANSIBLE_NOCOWS(/home/esio/work/ansible/ansible.cfg) = True
DEFAULT_BECOME_EXE(/home/esio/work/ansible/ansible.cfg) = sudo su -
DEFAULT_BECOME_METHOD(/home/esio/work/ansible/ansible.cfg) = su
DEFAULT_HASH_BEHAVIOUR(/home/esio/work/ansible/ansible.cfg) = merge
DEFAULT_HOST_LIST(/home/esio/work/ansible/ansible.cfg) = [u'/home/esio/work/ansible/inventories/test/hosts']
DEFAULT_REMOTE_TMP(/home/esio/work/ansible/ansible.cfg) = /tmp/.ansible-${USER}/tmp # workaround become permission issues
DEFAULT_ROLES_PATH(/home/esio/work/ansible/ansible.cfg) = [u'/home/esio/work/ansible/roles', u'/home/esio/work/ansible/vendor']
HOST_KEY_CHECKING(/home/esio/work/ansible/ansible.cfg) = False
RETRY_FILES_SAVE_PATH(/home/esio/work/ansible/ansible.cfg) = /home/esio/work/ansible/.retryfiles"><pre class="notranslate"><code class="notranslate">ANSIBLE_NOCOWS(/home/esio/work/ansible/ansible.cfg) = True
DEFAULT_BECOME_EXE(/home/esio/work/ansible/ansible.cfg) = sudo su -
DEFAULT_BECOME_METHOD(/home/esio/work/ansible/ansible.cfg) = su
DEFAULT_HASH_BEHAVIOUR(/home/esio/work/ansible/ansible.cfg) = merge
DEFAULT_HOST_LIST(/home/esio/work/ansible/ansible.cfg) = [u'/home/esio/work/ansible/inventories/test/hosts']
DEFAULT_REMOTE_TMP(/home/esio/work/ansible/ansible.cfg) = /tmp/.ansible-${USER}/tmp # workaround become permission issues
DEFAULT_ROLES_PATH(/home/esio/work/ansible/ansible.cfg) = [u'/home/esio/work/ansible/roles', u'/home/esio/work/ansible/vendor']
HOST_KEY_CHECKING(/home/esio/work/ansible/ansible.cfg) = False
RETRY_FILES_SAVE_PATH(/home/esio/work/ansible/ansible.cfg) = /home/esio/work/ansible/.retryfiles
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Fedora 26 x86_64</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">When I use include_role ansible doesn't apply default variables.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">I have directories and files in my ansible config:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="└── roles
├── r1
│ └── tasks
│ └── main.yml
└── r2
├── defaults
│ └── main.yml
└── tasks
└── main.yml"><pre class="notranslate"><code class="notranslate">└── roles
├── r1
│ └── tasks
│ └── main.yml
└── r2
├── defaults
│ └── main.yml
└── tasks
└── main.yml
</code></pre></div>
<p dir="auto">In roles/r1/tasks/main.yml</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- name: Run role r2
include_role:
name: gpdw.deploy-hdfs-component
vars:
artifact_version: "{{ x[2] }}"
artifact_id: "{{ x[1] }}"
with_list: "{{ list }}"
loop_control:
loop_var: x"><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s">Run role r2</span>
<span class="pl-ent">include_role</span>:
<span class="pl-ent">name</span>: <span class="pl-s">gpdw.deploy-hdfs-component</span>
<span class="pl-ent">vars</span>:
<span class="pl-ent">artifact_version</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ x[2] }}<span class="pl-pds">"</span></span>
<span class="pl-ent">artifact_id</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ x[1] }}<span class="pl-pds">"</span></span>
<span class="pl-ent">with_list</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ list }}<span class="pl-pds">"</span></span>
<span class="pl-ent">loop_control</span>:
<span class="pl-ent">loop_var</span>: <span class="pl-s">x</span></pre></div>
<p dir="auto">In roles/r2/tasks/main.yml</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- name: debug
debug:
msg: "{{ artifact_extension }}"><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s">debug</span>
<span class="pl-ent">debug</span>:
<span class="pl-ent">msg</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ artifact_extension }}</span></pre></div>
<p dir="auto">In roles/r2/defaults/main.yml</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="artifact_extension: "tar.gz""><pre class="notranslate"><span class="pl-ent">artifact_extension</span>: <span class="pl-s"><span class="pl-pds">"</span>tar.gz<span class="pl-pds">"</span></span></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">It should work and print tar.gz as debug.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">Ansible fails with error, that variable artifact_extension is undefined. In my opinion ansible should use variables from defaults/main.yml file in included role.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [ap-hdpen1t]: FAILED! => {
"msg": "The task includes an option with an undefined variable. The error was: 'artifact_extension' is undefined\n\nThe error appears to have been in '/home/esio/work/ansible/roles/gpdw.deploy-dq-all/tasks/main.yml': line 29, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: debug\n ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'artifact_extension' is undefined"
}"><pre class="notranslate"><code class="notranslate">fatal: [ap-hdpen1t]: FAILED! => {
"msg": "The task includes an option with an undefined variable. The error was: 'artifact_extension' is undefined\n\nThe error appears to have been in '/home/esio/work/ansible/roles/gpdw.deploy-dq-all/tasks/main.yml': line 29, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: debug\n ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'artifact_extension' is undefined"
}
</code></pre></div> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Feature Idea</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">include_role</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.2.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">None.</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">OS: CentOS7, but shouldn't matter.</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">When including a role using include_role its vars do not become available to the rest of the playbook. This does work when using the regular roles definition.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">A minimal test-case lives here: <a href="https://github.com/wouterhund/demo-ansible-include_role-bug/blob/master/bad-playbook.yml">https://github.com/wouterhund/demo-ansible-include_role-bug/blob/master/bad-playbook.yml</a> <a href="https://github.com/wouterhund/demo-ansible-include_role-bug/blob/master/roles/testrole/vars/main.yml">https://github.com/wouterhund/demo-ansible-include_role-bug/blob/master/roles/testrole/vars/main.yml</a></p>
<p dir="auto">The actual code that triggers the issue:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---
- hosts: localhost
tasks:
- include_role:
name: testrole
- debug: msg="{{some_var}}""><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">include_role</span>:
<span class="pl-ent">name</span>: <span class="pl-s">testrole</span>
- <span class="pl-ent">debug</span>: <span class="pl-s">msg="{{some_var}}"</span></pre></div>
<p dir="auto"><code class="notranslate">roles/testrole/vars/main.yml</code></p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---
some_var: "Hello world!""><pre class="notranslate">---
<span class="pl-ent">some_var</span>: <span class="pl-s"><span class="pl-pds">"</span>Hello world!<span class="pl-pds">"</span></span></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">I would expect <code class="notranslate">good-playbook.yml</code> and <code class="notranslate">bad-playbook.yml</code> from the linked github to work identically, however <code class="notranslate">bad-playbook.yml</code> fails. I expect variables defined within an included role to be made available to the rest of the playbook.</p>
<p dir="auto">For the example above I'd expect it to pass and display "Hello world!"</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="» ansible-playbook -vvvv bad-playbook.yml 1 ↵
Using /etc/ansible/ansible.cfg as config file
[WARNING]: provided hosts list is empty, only localhost is available
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
PLAYBOOK: bad-playbook.yml *****************************************************
1 plays in bad-playbook.yml
PLAY [localhost] ***************************************************************
TASK [setup] *******************************************************************
Using module file /usr/lib/python2.7/site-packages/ansible/modules/core/system/setup.py
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: vagrant
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo ~/.ansible/tmp/ansible-tmp-1487936470.27-110880382737009 `" && echo ansible-tmp-1487936470.27-110880382737009="` echo ~/.ansible/tmp/ansible-tmp-1487936470.27-110880382737009 `" ) && sleep 0'
<127.0.0.1> PUT /tmp/tmp017eF_ TO /home/vagrant/.ansible/tmp/ansible-tmp-1487936470.27-110880382737009/setup.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/vagrant/.ansible/tmp/ansible-tmp-1487936470.27-110880382737009/ /home/vagrant/.ansible/tmp/ansible-tmp-1487936470.27-110880382737009/setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python2 /home/vagrant/.ansible/tmp/ansible-tmp-1487936470.27-110880382737009/setup.py; rm -rf "/home/vagrant/.ansible/tmp/ansible-tmp-1487936470.27-110880382737009/" > /dev/null 2>&1 && sleep 0'
ok: [localhost]
TASK [testrole : debug] ********************************************************
task path: /home/vagrant/demo-ansible-include_role-bug/roles/testrole/tasks/main.yml:2
ok: [localhost] => {
"msg": "Hello world!"
}
TASK [debug] *******************************************************************
task path: /home/vagrant/demo-ansible-include_role-bug/bad-playbook.yml:7
fatal: [localhost]: FAILED! => {
"failed": true,
"msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'some_var' is undefined\n\nThe error appears to have been in '/home/vagrant/demo-ansible-include_role-bug/bad-playbook.yml': line 7, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n name: testrole\n - debug: msg=\"{{some_var}}\"\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"
}
to retry, use: --limit @/home/vagrant/demo-ansible-include_role-bug/bad-playbook.retry
PLAY RECAP *********************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=1 "><pre class="notranslate"><code class="notranslate">» ansible-playbook -vvvv bad-playbook.yml 1 ↵
Using /etc/ansible/ansible.cfg as config file
[WARNING]: provided hosts list is empty, only localhost is available
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
PLAYBOOK: bad-playbook.yml *****************************************************
1 plays in bad-playbook.yml
PLAY [localhost] ***************************************************************
TASK [setup] *******************************************************************
Using module file /usr/lib/python2.7/site-packages/ansible/modules/core/system/setup.py
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: vagrant
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo ~/.ansible/tmp/ansible-tmp-1487936470.27-110880382737009 `" && echo ansible-tmp-1487936470.27-110880382737009="` echo ~/.ansible/tmp/ansible-tmp-1487936470.27-110880382737009 `" ) && sleep 0'
<127.0.0.1> PUT /tmp/tmp017eF_ TO /home/vagrant/.ansible/tmp/ansible-tmp-1487936470.27-110880382737009/setup.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/vagrant/.ansible/tmp/ansible-tmp-1487936470.27-110880382737009/ /home/vagrant/.ansible/tmp/ansible-tmp-1487936470.27-110880382737009/setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python2 /home/vagrant/.ansible/tmp/ansible-tmp-1487936470.27-110880382737009/setup.py; rm -rf "/home/vagrant/.ansible/tmp/ansible-tmp-1487936470.27-110880382737009/" > /dev/null 2>&1 && sleep 0'
ok: [localhost]
TASK [testrole : debug] ********************************************************
task path: /home/vagrant/demo-ansible-include_role-bug/roles/testrole/tasks/main.yml:2
ok: [localhost] => {
"msg": "Hello world!"
}
TASK [debug] *******************************************************************
task path: /home/vagrant/demo-ansible-include_role-bug/bad-playbook.yml:7
fatal: [localhost]: FAILED! => {
"failed": true,
"msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'some_var' is undefined\n\nThe error appears to have been in '/home/vagrant/demo-ansible-include_role-bug/bad-playbook.yml': line 7, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n name: testrole\n - debug: msg=\"{{some_var}}\"\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"
}
to retry, use: --limit @/home/vagrant/demo-ansible-include_role-bug/bad-playbook.retry
PLAY RECAP *********************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=1
</code></pre></div> | 1 |
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p>
<p dir="auto">stack trace for reserved bind names only on the second go, meaning the insert() has changed state upon compile():</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import sqlalchemy as sa
meta = sa.MetaData()
table = sa.Table('mytable', meta,
sa.Column('foo', sa.String),
sa.Column('bar', sa.String, default='baz'),
)
select = sa.select([table.c.foo])
insert = table.insert().from_select(['foo'], select)
print insert.compile()
print insert.compile()"><pre class="notranslate"><code class="notranslate">import sqlalchemy as sa
meta = sa.MetaData()
table = sa.Table('mytable', meta,
sa.Column('foo', sa.String),
sa.Column('bar', sa.String, default='baz'),
)
select = sa.select([table.c.foo])
insert = table.insert().from_select(['foo'], select)
print insert.compile()
print insert.compile()
</code></pre></div> | <p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p>
<p dir="auto">these may all be from test_baked not cleaning up connections</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#!
_ ERROR at teardown of ResultTest_postgresql_psycopg2cffi.test_w_new_entities __
[gw0] linux2 -- Python 2.7.8 /var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/bin/python
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/testing/fixtures.py", line 273, in teardown_class
cls._teardown_once_metadata_bind()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/testing/fixtures.py", line 155, in _teardown_once_metadata_bind
drop_all_tables(cls.metadata, cls.bind)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/testing/engines.py", line 108, in drop_all_tables
metadata.drop_all(bind)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/sql/schema.py", line 3641, in drop_all
tables=tables)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 1850, in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
File "/opt/pypy-python2.7/lib-python/2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 1843, in _optional_conn_ctx_manager
with self.contextual_connect() as conn:
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 2034, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 2069, in _wrap_pool_connect
return fn()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 376, in connect
return _ConnectionFairy._checkout(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 708, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 480, in checkout
rec = pool._do_get()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 1042, in _do_get
(self.size(), self.overflow(), self._timeout))
TimeoutError: QueuePool limit of size 5 overflow 0 reached, connection timed out, timeout 0
--------------------------- Captured stdout teardown ---------------------------
2015-05-01 01:44:56,618 ERROR sqlalchemy.pool.QueuePool Exception during reset or similar
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 631, in _finalize_fairy
fairy._reset(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 765, in _reset
pool._dialect.do_rollback(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/default.py", line 412, in do_rollback
dbapi_connection.rollback()
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/connection.py", line 42, in check_closed_
raise exceptions.InterfaceError('connection already closed')
InterfaceError: connection already closed
2015-05-01 01:44:56,619 ERROR sqlalchemy.pool.QueuePool Exception during reset or similar
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 631, in _finalize_fairy
fairy._reset(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 765, in _reset
pool._dialect.do_rollback(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/default.py", line 412, in do_rollback
dbapi_connection.rollback()
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/connection.py", line 42, in check_closed_
raise exceptions.InterfaceError('connection already closed')
InterfaceError: connection already closed
2015-05-01 01:44:56,620 ERROR sqlalchemy.pool.QueuePool Exception during reset or similar
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 631, in _finalize_fairy
fairy._reset(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 765, in _reset
pool._dialect.do_rollback(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/default.py", line 412, in do_rollback
dbapi_connection.rollback()
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/connection.py", line 42, in check_closed_
raise exceptions.InterfaceError('connection already closed')
InterfaceError: connection already closed
2015-05-01 01:44:56,621 ERROR sqlalchemy.pool.QueuePool Exception during reset or similar
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 631, in _finalize_fairy
fairy._reset(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 765, in _reset
pool._dialect.do_rollback(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/default.py", line 412, in do_rollback
dbapi_connection.rollback()
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/connection.py", line 42, in check_closed_
raise exceptions.InterfaceError('connection already closed')
InterfaceError: connection already closed
2015-05-01 01:44:56,621 ERROR sqlalchemy.pool.QueuePool Exception during reset or similar
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 631, in _finalize_fairy
fairy._reset(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 765, in _reset
pool._dialect.do_rollback(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/default.py", line 412, in do_rollback
dbapi_connection.rollback()
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/connection.py", line 42, in check_closed_
raise exceptions.InterfaceError('connection already closed')
InterfaceError: connection already closed
=================================== FAILURES ===================================
________ ResultTest_postgresql_psycopg2cffi.test_spoiled_half_w_params _________
[gw0] linux2 -- Python 2.7.8 /var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/bin/python
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/test/ext/test_baked.py", line 341, in test_spoiled_half_w_params
bq.spoil().add_criteria(fn3)(sess).params(id=7).all(),
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/ext/baked.py", line 295, in all
return list(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/ext/baked.py", line 241, in __iter__
return iter(self._as_query())
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/query.py", line 2515, in __iter__
return self._execute_and_instances(context)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/query.py", line 2528, in _execute_and_instances
close_with_result=True)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/query.py", line 2519, in _connection_from_session
**kw)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 882, in connection
execution_options=execution_options)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 887, in _connection_for_bind
engine, execution_options)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 334, in _connection_for_bind
conn = bind.contextual_connect()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 2034, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 2069, in _wrap_pool_connect
return fn()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 376, in connect
return _ConnectionFairy._checkout(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 708, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 480, in checkout
rec = pool._do_get()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 1042, in _do_get
(self.size(), self.overflow(), self._timeout))
TimeoutError: QueuePool limit of size 5 overflow 0 reached, connection timed out, timeout 0
________ ResultTest_postgresql_psycopg2cffi.test_subquery_eagerloading _________
[gw0] linux2 -- Python 2.7.8 /var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/bin/python
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/test/ext/test_baked.py", line 527, in test_subquery_eagerloading
self.assert_sql_count(testing.db, go, 2)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/testing/assertions.py", line 466, in assert_sql_count
db, callable_, assertsql.CountStatements(count))
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/testing/assertions.py", line 447, in assert_sql_execution
callable_()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/test/ext/test_baked.py", line 525, in go
result = bq(sess).all()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/ext/baked.py", line 295, in all
return list(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/ext/baked.py", line 257, in __iter__
with_session(self.session)._execute_and_instances(context)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/query.py", line 2528, in _execute_and_instances
close_with_result=True)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/query.py", line 2519, in _connection_from_session
**kw)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 882, in connection
execution_options=execution_options)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 887, in _connection_for_bind
engine, execution_options)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 334, in _connection_for_bind
conn = bind.contextual_connect()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 2034, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 2069, in _wrap_pool_connect
return fn()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 376, in connect
return _ConnectionFairy._checkout(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 708, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 480, in checkout
rec = pool._do_get()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 1042, in _do_get
(self.size(), self.overflow(), self._timeout))
TimeoutError: QueuePool limit of size 5 overflow 0 reached, connection timed out, timeout 0
____________ ResultTest_postgresql_psycopg2cffi.test_w_new_entities ____________
[gw0] linux2 -- Python 2.7.8 /var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/bin/python
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/test/ext/test_baked.py", line 368, in test_w_new_entities
bq(session).all(),
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/ext/baked.py", line 295, in all
return list(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/ext/baked.py", line 257, in __iter__
with_session(self.session)._execute_and_instances(context)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/query.py", line 2528, in _execute_and_instances
close_with_result=True)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/query.py", line 2519, in _connection_from_session
**kw)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 882, in connection
execution_options=execution_options)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 887, in _connection_for_bind
engine, execution_options)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 334, in _connection_for_bind
conn = bind.contextual_connect()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 2034, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 2069, in _wrap_pool_connect
return fn()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 376, in connect
return _ConnectionFairy._checkout(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 708, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 480, in checkout
rec = pool._do_get()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 1042, in _do_get
(self.size(), self.overflow(), self._timeout))
TimeoutError: QueuePool limit of size 5 overflow 0 reached, connection timed out, timeout 0
_________ ExecutionTest_postgresql_psycopg2cffi.test_parameter_execute _________
[gw0] linux2 -- Python 2.7.8 /var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/bin/python
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/test/orm/test_session.py", line 61, in test_parameter_execute
{"id": 8, "name": "u8"}
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 1023, in execute
bind, close_with_result=True).execute(clause, params or {})
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 914, in execute
return meth(self, multiparams, params)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
compiled_sql, distilled_params
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
context)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 1339, in _handle_dbapi_exception
exc_info
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 1116, in _execute_context
context)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/default.py", line 439, in do_executemany
cursor.executemany(statement, parameters)
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/cursor.py", line 26, in check_closed_
return func(self, *args, **kwargs)
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/cursor.py", line 49, in check_async_
return func(self, *args, **kwargs)
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/cursor.py", line 286, in executemany
self.execute(query, params)
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/cursor.py", line 26, in check_closed_
return func(self, *args, **kwargs)
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/cursor.py", line 259, in execute
self._pq_execute(self._query, conn._async)
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/cursor.py", line 692, in _pq_execute
self._pq_fetch()
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/cursor.py", line 753, in _pq_fetch
raise self._conn._create_exception(cursor=self)
IntegrityError: (psycopg2cffi._impl.exceptions.IntegrityError) duplicate key value violates unique constraint "users_pkey"
DETAIL: Key (id)=(7) already exists.
[SQL: u'INSERT INTO users (id, name) VALUES (%(id)s, %(name)s)'] [parameters: ({'id': 7, 'name': 'u7'}, {'id': 8, 'name': 'u8'})]"><pre class="notranslate"><code class="notranslate">#!
_ ERROR at teardown of ResultTest_postgresql_psycopg2cffi.test_w_new_entities __
[gw0] linux2 -- Python 2.7.8 /var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/bin/python
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/testing/fixtures.py", line 273, in teardown_class
cls._teardown_once_metadata_bind()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/testing/fixtures.py", line 155, in _teardown_once_metadata_bind
drop_all_tables(cls.metadata, cls.bind)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/testing/engines.py", line 108, in drop_all_tables
metadata.drop_all(bind)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/sql/schema.py", line 3641, in drop_all
tables=tables)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 1850, in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
File "/opt/pypy-python2.7/lib-python/2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 1843, in _optional_conn_ctx_manager
with self.contextual_connect() as conn:
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 2034, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 2069, in _wrap_pool_connect
return fn()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 376, in connect
return _ConnectionFairy._checkout(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 708, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 480, in checkout
rec = pool._do_get()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 1042, in _do_get
(self.size(), self.overflow(), self._timeout))
TimeoutError: QueuePool limit of size 5 overflow 0 reached, connection timed out, timeout 0
--------------------------- Captured stdout teardown ---------------------------
2015-05-01 01:44:56,618 ERROR sqlalchemy.pool.QueuePool Exception during reset or similar
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 631, in _finalize_fairy
fairy._reset(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 765, in _reset
pool._dialect.do_rollback(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/default.py", line 412, in do_rollback
dbapi_connection.rollback()
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/connection.py", line 42, in check_closed_
raise exceptions.InterfaceError('connection already closed')
InterfaceError: connection already closed
2015-05-01 01:44:56,619 ERROR sqlalchemy.pool.QueuePool Exception during reset or similar
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 631, in _finalize_fairy
fairy._reset(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 765, in _reset
pool._dialect.do_rollback(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/default.py", line 412, in do_rollback
dbapi_connection.rollback()
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/connection.py", line 42, in check_closed_
raise exceptions.InterfaceError('connection already closed')
InterfaceError: connection already closed
2015-05-01 01:44:56,620 ERROR sqlalchemy.pool.QueuePool Exception during reset or similar
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 631, in _finalize_fairy
fairy._reset(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 765, in _reset
pool._dialect.do_rollback(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/default.py", line 412, in do_rollback
dbapi_connection.rollback()
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/connection.py", line 42, in check_closed_
raise exceptions.InterfaceError('connection already closed')
InterfaceError: connection already closed
2015-05-01 01:44:56,621 ERROR sqlalchemy.pool.QueuePool Exception during reset or similar
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 631, in _finalize_fairy
fairy._reset(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 765, in _reset
pool._dialect.do_rollback(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/default.py", line 412, in do_rollback
dbapi_connection.rollback()
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/connection.py", line 42, in check_closed_
raise exceptions.InterfaceError('connection already closed')
InterfaceError: connection already closed
2015-05-01 01:44:56,621 ERROR sqlalchemy.pool.QueuePool Exception during reset or similar
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 631, in _finalize_fairy
fairy._reset(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 765, in _reset
pool._dialect.do_rollback(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/default.py", line 412, in do_rollback
dbapi_connection.rollback()
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/connection.py", line 42, in check_closed_
raise exceptions.InterfaceError('connection already closed')
InterfaceError: connection already closed
=================================== FAILURES ===================================
________ ResultTest_postgresql_psycopg2cffi.test_spoiled_half_w_params _________
[gw0] linux2 -- Python 2.7.8 /var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/bin/python
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/test/ext/test_baked.py", line 341, in test_spoiled_half_w_params
bq.spoil().add_criteria(fn3)(sess).params(id=7).all(),
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/ext/baked.py", line 295, in all
return list(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/ext/baked.py", line 241, in __iter__
return iter(self._as_query())
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/query.py", line 2515, in __iter__
return self._execute_and_instances(context)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/query.py", line 2528, in _execute_and_instances
close_with_result=True)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/query.py", line 2519, in _connection_from_session
**kw)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 882, in connection
execution_options=execution_options)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 887, in _connection_for_bind
engine, execution_options)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 334, in _connection_for_bind
conn = bind.contextual_connect()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 2034, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 2069, in _wrap_pool_connect
return fn()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 376, in connect
return _ConnectionFairy._checkout(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 708, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 480, in checkout
rec = pool._do_get()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 1042, in _do_get
(self.size(), self.overflow(), self._timeout))
TimeoutError: QueuePool limit of size 5 overflow 0 reached, connection timed out, timeout 0
________ ResultTest_postgresql_psycopg2cffi.test_subquery_eagerloading _________
[gw0] linux2 -- Python 2.7.8 /var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/bin/python
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/test/ext/test_baked.py", line 527, in test_subquery_eagerloading
self.assert_sql_count(testing.db, go, 2)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/testing/assertions.py", line 466, in assert_sql_count
db, callable_, assertsql.CountStatements(count))
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/testing/assertions.py", line 447, in assert_sql_execution
callable_()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/test/ext/test_baked.py", line 525, in go
result = bq(sess).all()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/ext/baked.py", line 295, in all
return list(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/ext/baked.py", line 257, in __iter__
with_session(self.session)._execute_and_instances(context)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/query.py", line 2528, in _execute_and_instances
close_with_result=True)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/query.py", line 2519, in _connection_from_session
**kw)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 882, in connection
execution_options=execution_options)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 887, in _connection_for_bind
engine, execution_options)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 334, in _connection_for_bind
conn = bind.contextual_connect()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 2034, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 2069, in _wrap_pool_connect
return fn()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 376, in connect
return _ConnectionFairy._checkout(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 708, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 480, in checkout
rec = pool._do_get()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 1042, in _do_get
(self.size(), self.overflow(), self._timeout))
TimeoutError: QueuePool limit of size 5 overflow 0 reached, connection timed out, timeout 0
____________ ResultTest_postgresql_psycopg2cffi.test_w_new_entities ____________
[gw0] linux2 -- Python 2.7.8 /var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/bin/python
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/test/ext/test_baked.py", line 368, in test_w_new_entities
bq(session).all(),
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/ext/baked.py", line 295, in all
return list(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/ext/baked.py", line 257, in __iter__
with_session(self.session)._execute_and_instances(context)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/query.py", line 2528, in _execute_and_instances
close_with_result=True)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/query.py", line 2519, in _connection_from_session
**kw)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 882, in connection
execution_options=execution_options)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 887, in _connection_for_bind
engine, execution_options)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 334, in _connection_for_bind
conn = bind.contextual_connect()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 2034, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 2069, in _wrap_pool_connect
return fn()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 376, in connect
return _ConnectionFairy._checkout(self)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 708, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 480, in checkout
rec = pool._do_get()
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/pool.py", line 1042, in _do_get
(self.size(), self.overflow(), self._timeout))
TimeoutError: QueuePool limit of size 5 overflow 0 reached, connection timed out, timeout 0
_________ ExecutionTest_postgresql_psycopg2cffi.test_parameter_execute _________
[gw0] linux2 -- Python 2.7.8 /var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/bin/python
Traceback (most recent call last):
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/test/orm/test_session.py", line 61, in test_parameter_execute
{"id": 8, "name": "u8"}
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/orm/session.py", line 1023, in execute
bind, close_with_result=True).execute(clause, params or {})
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 914, in execute
return meth(self, multiparams, params)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
compiled_sql, distilled_params
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
context)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 1339, in _handle_dbapi_exception
exc_info
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/base.py", line 1116, in _execute_context
context)
File "/var/jenkins/workspace/sqlalchemy-default-sqlite-pypy-2.7/.tox/full/site-packages/sqlalchemy/engine/default.py", line 439, in do_executemany
cursor.executemany(statement, parameters)
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/cursor.py", line 26, in check_closed_
return func(self, *args, **kwargs)
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/cursor.py", line 49, in check_async_
return func(self, *args, **kwargs)
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/cursor.py", line 286, in executemany
self.execute(query, params)
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/cursor.py", line 26, in check_closed_
return func(self, *args, **kwargs)
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/cursor.py", line 259, in execute
self._pq_execute(self._query, conn._async)
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/cursor.py", line 692, in _pq_execute
self._pq_fetch()
File "/opt/pypy-python2.7/site-packages/psycopg2cffi/_impl/cursor.py", line 753, in _pq_fetch
raise self._conn._create_exception(cursor=self)
IntegrityError: (psycopg2cffi._impl.exceptions.IntegrityError) duplicate key value violates unique constraint "users_pkey"
DETAIL: Key (id)=(7) already exists.
[SQL: u'INSERT INTO users (id, name) VALUES (%(id)s, %(name)s)'] [parameters: ({'id': 7, 'name': 'u7'}, {'id': 8, 'name': 'u8'})]
</code></pre></div> | 0 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="spec:
selector:
app: foobar-service
track: prod
track: post-prod-staging"><pre class="notranslate"><code class="notranslate">spec:
selector:
app: foobar-service
track: prod
track: post-prod-staging
</code></pre></div>
<p dir="auto">I can't seem to find how to define <em>IN</em> semantic for svc's selector, I tried to above and it resulted in only the last one being used:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="> kubectl describe svc svc-prod-svc
Name: svc-prod-svc
Namespace: default
Labels: <none>
Selector: app=foobar-service,track=post-prod-staging"><pre class="notranslate"><code class="notranslate">> kubectl describe svc svc-prod-svc
Name: svc-prod-svc
Namespace: default
Labels: <none>
Selector: app=foobar-service,track=post-prod-staging
</code></pre></div>
<p dir="auto">kubectl should probably notify of duplication and fail, or are least print warning.</p> | <p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):</p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):</p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>:</li>
<li><strong>OS</strong> (e.g. from /etc/os-release):</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li>
<li><strong>Install tools</strong>:</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p>
<p dir="auto"><strong>Anything else do we need to know</strong>:</p> | 0 |
<p dir="auto">I have been unable to get past a certain line in some of the challenges.<br>
It will literally just stop my cursor and cannot go down further.</p>
<p dir="auto">I had to spam refresh for it to work in 3 different browsers and have deleted my browser cache but still problem persists.</p>
<p dir="auto">Windows 10, chrome latest firefox latest and vivaldi latest.</p> | <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-use-a-css-class-to-style-an-element#?solution=%3Cstyle%3E%0A%20%20.red-text%20%7B%20%0A%20%20%20%20color%3A%20red%3B%20%0A%7D%20%0A%3C%2Fstyle%3E%0A%0A%3Ch2%20class%3D%22red-text%22%3ECatPhotoApp%3C%2Fh2%3E%0A%0A%3Cp%3EKitty%20ipsum%20dolor%20sit%20amet%2C%20shed%20everywhere%20shed%20everywhere%20stretching%20attack%20your%20ankles%20chase%20the%20red%20dot%2C%20hairball%20run%20catnip%20eat%20the%20grass%20sniff.%3C%2Fp%3E%0A" rel="nofollow">Waypoint: Use a CSS Class to Style an Element</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-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<style>
.red-text {
color: red;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">style</span><span class="pl-kos">></span>
.<span class="pl-c1">red-text</span> {
<span class="pl-c1">color</span><span class="pl-kos">:</span> red;
}
<span class="pl-kos"></</span><span class="pl-ent">style</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h2</span> <span class="pl-c1">class</span>="<span class="pl-s">red-text</span>"<span class="pl-kos">></span>CatPhotoApp<span class="pl-kos"></</span><span class="pl-ent">h2</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">p</span><span class="pl-kos">></span>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.<span class="pl-kos"></</span><span class="pl-ent">p</span><span class="pl-kos">></span></pre></div> | 0 |
<p dir="auto">Would be nice to, after selecting a package in the settings view, to be able move to the next/previous installed package using the up/down arrow keys.</p>
<p dir="auto">I'm using Atom 136 on Windows 8.1 64 bit installed via chocolatey.</p> | <p dir="auto"><em>(originally reported over at <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="28539350" data-permission-text="Title is private" data-url="https://github.com/atom/atom/issues/1635" data-hovercard-type="issue" data-hovercard-url="/atom/atom/issues/1635/hovercard" href="https://github.com/atom/atom/issues/1635">atom/atom#1635</a>)</em></p>
<p dir="auto">support/f96903ba9fc811e38844f9159f8f1555</p>
<blockquote>
<p dir="auto">Allow navigation of packages in "Settings" (the left pane with the list of packages) via up/down arrows.</p>
<p dir="auto">THE KING OF KEYBOARDS WILL THANK YOU</p>
</blockquote>
<p dir="auto"><g-emoji class="g-emoji" alias="bow" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f647.png">🙇</g-emoji> <g-emoji class="g-emoji" alias="crown" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f451.png">👑</g-emoji> <g-emoji class="g-emoji" alias="1234" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f522.png">🔢</g-emoji></p> | 1 |
<p dir="auto">I am using a modal with the remote option. I'd like to be able to execute some code once the modal-body is loaded.</p>
<p dir="auto">Currently the only events we have available is <code class="notranslate">show</code> and <code class="notranslate">shown</code>. I tried using <code class="notranslate">shown</code> but loading the modal-body occurs after the shown event is fired.</p>
<p dir="auto">How could I achieve this?</p> | <p dir="auto">I think it is a good idea to add 'loaded' callback to modals. Something like that:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" this.options.remote && this.$element.find('.modal-body').load(this.options.remote, $.proxy(function() {
this.$element.trigger('loaded')
}, this))"><pre class="notranslate"> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">options</span><span class="pl-kos">.</span><span class="pl-c1">remote</span> <span class="pl-c1">&&</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">$element</span><span class="pl-kos">.</span><span class="pl-en">find</span><span class="pl-kos">(</span><span class="pl-s">'.modal-body'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">options</span><span class="pl-kos">.</span><span class="pl-c1">remote</span><span class="pl-kos">,</span> <span class="pl-s1">$</span><span class="pl-kos">.</span><span class="pl-en">proxy</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">$element</span><span class="pl-kos">.</span><span class="pl-en">trigger</span><span class="pl-kos">(</span><span class="pl-s">'loaded'</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-kos">)</span></pre></div>
<p dir="auto">Here's complete code <a href="https://gist.github.com/3486192">https://gist.github.com/3486192</a><br>
I can make pull request if this functionality is really needed.</p> | 1 |
<p dir="auto">I want to customize the frameless window, so I need to style the borders, but at the current time, there is no way to do that.</p> | <p dir="auto">Is it possible to set the window background to transparent and then allow the transparency level to be controlled with CSS? Similar to TextMate?</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/82437/3188124/db02aca0-ecb7-11e3-97ae-aa5f3cf6eaec.png"><img src="https://cloud.githubusercontent.com/assets/82437/3188124/db02aca0-ecb7-11e3-97ae-aa5f3cf6eaec.png" alt="screen shot 2014-06-05 at 9 46 46 am" style="max-width: 100%;"></a></p>
<p dir="auto">/cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zcbenz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zcbenz">@zcbenz</a></p> | 1 |
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong><br>
In loose mode, <code class="notranslate">@babel/plugin-proposal-class-properties</code> emits a property assignment for TypeScript definite assignments.</p>
<p dir="auto"><strong>Input Code</strong><br>
<a href="https://babeljs.io/en/repl#?babili=false&browsers=&build=&builtIns=false&spec=false&loose=false&code_lz=PTAEBkEsGsFNQPICMBWsDGAXAdAQwM76QDmAdqEgK6agDukANg6KQPY0FFmgAOATqx6w-mSLHx0AFpHSTQuPvFwNFuACYBPUGtgAzSKVhqAUDvQMF8dK1L4OhEqQAie3JQaZ8ALlCYNQ1l1EVAwcTkdjY3NOUAAxVlZQAG9jUAoFAEIfUkoAWyRhAG5ItOtbTD5KLFY-AApWADdhPkgdb2T0vmy8gr5QAF8ASmTUtPkHMhddNw98WsxpfAAaUEbm1vFB4rT-436gA&debug=false&forceAllTransforms=false&shippedProposals=true&circleciRepo=&evaluate=true&fileSize=false&timeTravel=false&sourceType=module&lineWrap=false&presets=typescript&prettier=false&targets=Node-8.9&version=7.5.5&externalPlugins=%40babel%2Fplugin-syntax-typescript%407.3.3%2C%40babel%2Fplugin-proposal-class-properties%407.5.5%2C%40babel%2Fplugin-transform-typescript%407.5.5" rel="nofollow">REPL</a> (I'm not sure if it's possible to turn turn on loose mode for the plugin)<br>
<a href="https://www.typescriptlang.org/play/index.html#code/PTAEBkEsGsFNQPICMBWsDGAXAdAQwM76QDmAdqEgK6agDukANg6KQPY0FFmgAOATqx6w+mSLHx0AFpHSTQuPvFwNFuACYBPUGtgAzSKVhqAsACgd6BgvjpWpfB0IlSAET25KDTPgBcoTBpCrLqIqBg4nM5mZpacoABirKygAN5moBQKAIR+pJQAtkjCANzRphm29ph8lFisfAAUrABuwnyQOr6pmXy5BUV8oAC+AJSp6RnyTmRuuh5e+A2Y0vgANKAtbR3iI6Xlw2ZDQA" rel="nofollow">TS Playground</a></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Like Object.assign but will not assign properties which are already defined
declare const assignDefaults: typeof Object.assign
class Foo {
bar!: number;
constructor(overrides: { bar: number }) {
assignDefaults(this, overrides);
}
}"><pre class="notranslate"><span class="pl-c">// Like Object.assign but will not assign properties which are already defined</span>
<span class="pl-k">declare</span> <span class="pl-k">const</span> <span class="pl-s1">assignDefaults</span>: <span class="pl-k">typeof</span> <span class="pl-smi">Object</span><span class="pl-kos">.</span><span class="pl-c1">assign</span>
<span class="pl-k">class</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
<span class="pl-c1">bar</span><span class="pl-c1">!</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">overrides</span>: <span class="pl-kos">{</span> <span class="pl-c1">bar</span>: <span class="pl-smi">number</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-en">assignDefaults</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-s1">overrides</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Expected behavior/code</strong><br>
A definite assignment should not emit any JS.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Like Object.assign but will not assign properties which are already defined
class Foo {
constructor(overrides) {
assignDefaults(this, overrides);
}
}"><pre class="notranslate"><span class="pl-c">// Like Object.assign but will not assign properties which are already defined</span>
<span class="pl-k">class</span> <span class="pl-v">Foo</span> <span class="pl-kos">{</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">overrides</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-en">assignDefaults</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-s1">overrides</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>Babel Configuration (.babelrc, package.json, cli command)</strong></p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"presets": ["@babel/preset-typescript"],
"plugins": [["@babel/plugin-proposal-class-properties", { "loose": true }]]
}"><pre class="notranslate">{
<span class="pl-ent">"presets"</span>: [<span class="pl-s"><span class="pl-pds">"</span>@babel/preset-typescript<span class="pl-pds">"</span></span>],
<span class="pl-ent">"plugins"</span>: [[<span class="pl-s"><span class="pl-pds">"</span>@babel/plugin-proposal-class-properties<span class="pl-pds">"</span></span>, { <span class="pl-ent">"loose"</span>: <span class="pl-c1">true</span> }]]
}</pre></div>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): 7.5.5</li>
<li>Node/npm version: Node 12.6 / yarn 1.15.2</li>
<li>OS: macOS 10.14.5</li>
<li>Monorepo: no</li>
<li>How you are using Babel: cli</li>
</ul>
<p dir="auto"><strong>Additional context/Screenshots</strong><br>
This was previously raised in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="325081166" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/7997" data-hovercard-type="issue" data-hovercard-url="/babel/babel/issues/7997/hovercard" href="https://github.com/babel/babel/issues/7997">#7997</a>, but considered expected behavior. It was mentioned that it could be reconsidered for <code class="notranslate">loose</code> mode, however.</p>
<p dir="auto">I do feel like it should be reconsidered one way or another; emitting for these declarations is problematic in the same way emitting for a <code class="notranslate">declare</code> would be. Additionally, this syntax is not valid JS so there the only applicable spec compliance is that of TS.</p> | <h3 dir="auto">Choose one: is this a bug report or feature request?</h3>
<p dir="auto">Bug report.</p>
<h3 dir="auto">Input Code</h3>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Text extends TextRecord implements Types.TextNode {
public readonly firstChild: Types.NestedNode
public readonly nextSibling: Types.NestedNode
public readonly type: Types.NodeType.Text
public readonly uuid: string
public readonly value: string
public constructor(props: Types.TextNode) {
super(props)
}
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Text</span> <span class="pl-k">extends</span> <span class="pl-smi">TextRecord</span> <span class="pl-k">implements</span> <span class="pl-smi">Types</span><span class="pl-kos">.</span><span class="pl-smi">TextNode</span> <span class="pl-kos">{</span>
<span class="pl-k">public</span> <span class="pl-k">readonly</span> <span class="pl-c1">firstChild</span>: <span class="pl-smi">Types</span><span class="pl-kos">.</span><span class="pl-smi">NestedNode</span>
<span class="pl-k">public</span> <span class="pl-k">readonly</span> <span class="pl-c1">nextSibling</span>: <span class="pl-smi">Types</span><span class="pl-kos">.</span><span class="pl-smi">NestedNode</span>
<span class="pl-k">public</span> <span class="pl-k">readonly</span> <span class="pl-c1">type</span>: <span class="pl-smi">Types</span><span class="pl-kos">.</span><span class="pl-smi">NodeType</span><span class="pl-kos">.</span><span class="pl-smi">Text</span>
<span class="pl-k">public</span> <span class="pl-k">readonly</span> <span class="pl-c1">uuid</span>: <span class="pl-smi">string</span>
<span class="pl-k">public</span> <span class="pl-k">readonly</span> <span class="pl-c1">value</span>: <span class="pl-smi">string</span>
<span class="pl-k">public</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">props</span>: <span class="pl-smi">Types</span><span class="pl-kos">.</span><span class="pl-smi">TextNode</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-s1">props</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="module.exports = {
presets: [
['@babel/env', {
exclude: [
'transform-async-to-generator',
'transform-regenerator',
],
targets: {
browsers: ['last 2 versions'],
},
modules: 'commonjs',
loose: true,
useBuiltIns: 'usage',
}],
'@babel/react',
['@babel/stage-0', {
loose: true,
}],
'@babel/typescript',
],
plugins: [
'autobind-class-methods',
['module:fast-async', {
compiler: {
lazyThenables: true,
parser: {
sourceType: 'module',
},
promises: true,
wrapAwait: true,
},
useRuntimeModule: true,
}],
'lodash',
'./src/vendor/babel-plugin-ramda',
'react-loadable/babel',
'reflective-bind/babel',
['styled-components', {
displayName: true,
ssr: true,
}],
'transform-promise-to-bluebird',
['@babel/transform-regenerator', {
async: false,
asyncGenerators: true,
generators: true,
}],
'@babel/transform-runtime',
],
}"><pre class="notranslate"><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-c1">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-c1">exclude</span>: <span class="pl-kos">[</span>
<span class="pl-s">'transform-async-to-generator'</span><span class="pl-kos">,</span>
<span class="pl-s">'transform-regenerator'</span><span class="pl-kos">,</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">targets</span>: <span class="pl-kos">{</span>
<span class="pl-c1">browsers</span>: <span class="pl-kos">[</span><span class="pl-s">'last 2 versions'</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">modules</span>: <span class="pl-s">'commonjs'</span><span class="pl-kos">,</span>
<span class="pl-c1">loose</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-c1">useBuiltIns</span>: <span class="pl-s">'usage'</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-s">'@babel/react'</span><span class="pl-kos">,</span>
<span class="pl-kos">[</span><span class="pl-s">'@babel/stage-0'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-c1">loose</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-s">'@babel/typescript'</span><span class="pl-kos">,</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">plugins</span>: <span class="pl-kos">[</span>
<span class="pl-s">'autobind-class-methods'</span><span class="pl-kos">,</span>
<span class="pl-kos">[</span><span class="pl-s">'module:fast-async'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-c1">compiler</span>: <span class="pl-kos">{</span>
<span class="pl-c1">lazyThenables</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-c1">parser</span>: <span class="pl-kos">{</span>
<span class="pl-c1">sourceType</span>: <span class="pl-s">'module'</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">promises</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-c1">wrapAwait</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">useRuntimeModule</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-s">'lodash'</span><span class="pl-kos">,</span>
<span class="pl-s">'./src/vendor/babel-plugin-ramda'</span><span class="pl-kos">,</span>
<span class="pl-s">'react-loadable/babel'</span><span class="pl-kos">,</span>
<span class="pl-s">'reflective-bind/babel'</span><span class="pl-kos">,</span>
<span class="pl-kos">[</span><span class="pl-s">'styled-components'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-c1">displayName</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-c1">ssr</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-s">'transform-promise-to-bluebird'</span><span class="pl-kos">,</span>
<span class="pl-kos">[</span><span class="pl-s">'@babel/transform-regenerator'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-c1">async</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-c1">asyncGenerators</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-c1">generators</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-s">'@babel/transform-runtime'</span><span class="pl-kos">,</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span></pre></div>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Babel should strip the type annotations from the class altogether, à la TypeScript's transpiled code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var Text = /** @class */ (function (_super) {
__extends(Text, _super);
function Text(props) {
return _super.call(this, props) || this;
}
return Text;
}(TextRecord));"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-v">Text</span> <span class="pl-c1">=</span> <span class="pl-c">/** <span class="pl-k">@class</span> */</span> <span class="pl-kos">(</span><span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">_super</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-en">__extends</span><span class="pl-kos">(</span><span class="pl-v">Text</span><span class="pl-kos">,</span> <span class="pl-s1">_super</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">function</span> <span class="pl-v">Text</span><span class="pl-kos">(</span><span class="pl-s1">props</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-s1">_super</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-s1">props</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-kos">}</span>
<span class="pl-k">return</span> <span class="pl-v">Text</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">(</span><span class="pl-v">TextRecord</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">Babel adds code to the constructor assigning <code class="notranslate">void 0</code> to the annotated class properties:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var Text =
/*#__PURE__*/
function (_TextRecord) {
(0, _inheritsLoose2.default)(Text, _TextRecord);
function Text(props) {
var _this12;
_this12 = _TextRecord.call(this, props) || this;
_this12.firstChild = void 0;
_this12.nextSibling = void 0;
_this12.type = void 0;
_this12.uuid = void 0;
_this12.value = void 0;
return _this12;
}
return Text;
}(TextRecord);"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-v">Text</span> <span class="pl-c1">=</span>
<span class="pl-c">/*#__PURE__*/</span>
<span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">_TextRecord</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-s1">_inheritsLoose2</span><span class="pl-kos">.</span><span class="pl-c1">default</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-v">Text</span><span class="pl-kos">,</span> <span class="pl-s1">_TextRecord</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">function</span> <span class="pl-v">Text</span><span class="pl-kos">(</span><span class="pl-s1">props</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">_this12</span><span class="pl-kos">;</span>
<span class="pl-s1">_this12</span> <span class="pl-c1">=</span> <span class="pl-s1">_TextRecord</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-s1">props</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-s1">_this12</span><span class="pl-kos">.</span><span class="pl-c1">firstChild</span> <span class="pl-c1">=</span> <span class="pl-k">void</span> <span class="pl-c1">0</span><span class="pl-kos">;</span>
<span class="pl-s1">_this12</span><span class="pl-kos">.</span><span class="pl-c1">nextSibling</span> <span class="pl-c1">=</span> <span class="pl-k">void</span> <span class="pl-c1">0</span><span class="pl-kos">;</span>
<span class="pl-s1">_this12</span><span class="pl-kos">.</span><span class="pl-c1">type</span> <span class="pl-c1">=</span> <span class="pl-k">void</span> <span class="pl-c1">0</span><span class="pl-kos">;</span>
<span class="pl-s1">_this12</span><span class="pl-kos">.</span><span class="pl-c1">uuid</span> <span class="pl-c1">=</span> <span class="pl-k">void</span> <span class="pl-c1">0</span><span class="pl-kos">;</span>
<span class="pl-s1">_this12</span><span class="pl-kos">.</span><span class="pl-c1">value</span> <span class="pl-c1">=</span> <span class="pl-k">void</span> <span class="pl-c1">0</span><span class="pl-kos">;</span>
<span class="pl-k">return</span> <span class="pl-s1">_this12</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">return</span> <span class="pl-v">Text</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">(</span><span class="pl-v">TextRecord</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">Possible Solution</h3>
<p dir="auto">It would be great if either the TypeScript transform specifically stripped annotation-only class properties or the class properties transform generally didn't add assignments for properties that aren't defined.</p>
<h3 dir="auto">Context</h3>
<p dir="auto">It's a common pattern when using Immutable.js with TypeScript to thread strong typings through Immutable Records by creating classes that extend the records and add type annotations to their properties. This works with the TypeScript compiler because TypeScript completely strips the type annotations from the class properties; however, it breaks with Babel because after the <code class="notranslate">super</code> call Babel is effectively attempting to set new properties on an Immutable Record, which throws a runtime error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="saga.ts:89 Error: Cannot set on an immutable record.
at invariant (immutable.es.js:1873)
at Text.set (immutable.es.js:5550)
at new Text (records.ts:251)
at Array.postReviver (lib.ts:33)
at fromJSWith (immutable.es.js:5682)
at immutable.es.js:5685
at immutable.es.js:1222
at ArraySeq.__iterate (immutable.es.js:432)
at IndexedCollection.mappedSequence.__iterateUncached (immutable.es.js:1221)
at IndexedCollection.__iterate (immutable.es.js:302)
at IndexedCollection.toArray (immutable.es.js:4575)
at List (immutable.es.js:3064)
at IndexedCollection.toList (immutable.es.js:4633)
at Object.postReviver (lib.ts:39)
at fromJSWith (immutable.es.js:5682)
at immutable.es.js:5685"><pre class="notranslate"><code class="notranslate">saga.ts:89 Error: Cannot set on an immutable record.
at invariant (immutable.es.js:1873)
at Text.set (immutable.es.js:5550)
at new Text (records.ts:251)
at Array.postReviver (lib.ts:33)
at fromJSWith (immutable.es.js:5682)
at immutable.es.js:5685
at immutable.es.js:1222
at ArraySeq.__iterate (immutable.es.js:432)
at IndexedCollection.mappedSequence.__iterateUncached (immutable.es.js:1221)
at IndexedCollection.__iterate (immutable.es.js:302)
at IndexedCollection.toArray (immutable.es.js:4575)
at List (immutable.es.js:3064)
at IndexedCollection.toList (immutable.es.js:4633)
at Object.postReviver (lib.ts:39)
at fromJSWith (immutable.es.js:5682)
at immutable.es.js:5685
</code></pre></div>
<p dir="auto">I know it's a bit of a corner case, but it's making it pretty challenging to enjoy the benefits of TypeScript with Immutable.</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><code class="notranslate">v7.0.0-beta.42</code></td>
</tr>
<tr>
<td>Babylon</td>
<td>N/A</td>
</tr>
<tr>
<td>node</td>
<td><code class="notranslate">v9.8.0</code></td>
</tr>
<tr>
<td>npm</td>
<td><code class="notranslate">v5.7.1</code></td>
</tr>
<tr>
<td>Operating System</td>
<td>macOS 10.13.4</td>
</tr>
</tbody>
</table> | 1 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=rstoya05-aop" rel="nofollow">Rossen Stoyanchev</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9622?redirect=false" rel="nofollow">SPR-9622</a></strong> and commented</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1.2</p>
<p dir="auto">This issue is a backport sub-task of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398117941" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13856" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13856/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13856">#13856</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="398152341" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14302" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14302/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14302">#14302</a> Issue/Problem on redirect after migration project on RequestMappingHandlerMapping/RequestMappingHandlerAdapter (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto">1 votes, 2 watchers</p> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=rstoya05-aop" rel="nofollow">Rossen Stoyanchev</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8474?redirect=false" rel="nofollow">SPR-8474</a></strong> and commented</p>
<p dir="auto">With suffix pattern matching "/users" also matches to "/users.*". This is useful for content type negotiation - e.g. /users.xml, /users.pdf - but can lead to ambiguity when extracting URI template variables.</p>
<p dir="auto">For example given "/users/{user}":</p>
<ol dir="auto">
<li>"/users/1.json" should extract "1"</li>
<li>"/users/john.j.joe" should extract "john.j.joe"</li>
</ol>
<p dir="auto">Currently the above cannot be supported at the same time. You can only turn suffix pattern matching on or off. A simple solution could look for a single "." only but then this would be impossible:</p>
<p dir="auto">"/users/john.j.joe.json" should extract "john.j.joe"</p>
<p dir="auto">Ideally the PatternsRequestCondition should be able to decide if the suffix represents a known file extension (.xml, .json) similar to how the ContentNegotiatingViewResolver is configured today.</p>
<p dir="auto">This should become possible as part of the content negotiation improvements planned for Spring 3.2 (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398112762" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13057" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13057/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13057">#13057</a>).</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1 M2</p>
<p dir="auto">This issue is a sub-task of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398112762" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13057" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13057/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13057">#13057</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="398107985" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12288" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12288/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12288">#12288</a> Allow valid file extension paths for content negotiation to be specified (<em><strong>"duplicates"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398155343" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14694" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14694/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14694">#14694</a> 404 error when working with .htm servlet-mapping</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/4fd7645efd2daf8d23960706180837a61bf9f321/hovercard" href="https://github.com/spring-projects/spring-framework/commit/4fd7645efd2daf8d23960706180837a61bf9f321"><tt>4fd7645</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/9cc4bd892a6bb3aca9fea4b2423369181cebea9a/hovercard" href="https://github.com/spring-projects/spring-framework/commit/9cc4bd892a6bb3aca9fea4b2423369181cebea9a"><tt>9cc4bd8</tt></a></p>
<p dir="auto">2 votes, 3 watchers</p> | 0 |
<p dir="auto">HttpCache stores empty content when saving StreamedResponse because StreamedResponse:getContent returns always false</p> | <p dir="auto">This is my first Symfony bug report! I'm working with v2.3.4, and the relevant code in master branch hasn't changed since that release.</p>
<p dir="auto">Yesterday I was building a Silex controller that generates images, and I hoped to use HttpCache so I could delay generating and storing images the right way in the web root.</p>
<p dir="auto">Using Symfony's built <code class="notranslate">HttpCache\Store</code> class, I found that the method <code class="notranslate">Store::generateContentDigest()</code> and <code class="notranslate">Store::save()</code> were calling <code class="notranslate">BinaryFileResponse::getContent()</code> which returns FALSE. (So does StreamedResponse, so I assume this problem occurs in that case too.)</p>
<p dir="auto">However, the content digest returned still has a value of <code class="notranslate">en</code>, which determines the save location of the cached response. I think the checks in <code class="notranslate">Store::save()</code> all pass because this directory exists if any prior responses have been successfully cached.</p>
<p dir="auto">When the application handles other requests for the same file, it considers it a cache hit even though there is no saved content. I don't know if this is related to the code comments in <code class="notranslate">Store::lookup()</code> about returning null and purging the entry from the metadata store.</p>
<p dir="auto">Ideally, the HttpCache would cache even streaming responses, but this may only have an inelegant solution. Since actual reverse proxy caches like Varnish would be able to cache the streamed response, I don't want to avoid setting appropriate cache headers on the response in my application. I guess HttpCache should refuse to store metadata when <code class="notranslate">Response::getContent()</code> returns false.</p> | 1 |
<p dir="auto">Referring to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="19403811" data-permission-text="Title is private" data-url="https://github.com/twbs/bootstrap/issues/10611" data-hovercard-type="issue" data-hovercard-url="/twbs/bootstrap/issues/10611/hovercard" href="https://github.com/twbs/bootstrap/issues/10611">#10611</a>, my issue just got closed without being solved. One admin just 'assuming' something and then the thread gets closed? Great.</p>
<p dir="auto">So back on this, the issue still remains. My content shifts a little when theres less than 4 thumbnails. Everything moves about 2cm when there's less than 4 thumbnails.</p>
<p dir="auto">I wrapped everything in a container, and we are not talking of a scrollbar. I did try to use a clearfix after every 4 thumbnails (4 x 3col = 12col) and that didn't work either.</p>
<p dir="auto">Please don't just close this like you did last time.</p> | <p dir="auto">On <a href="http://twitter.github.com/bootstrap/javascript.html">this page</a>, click "Launch demo modal", then run this JS in the console:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$("#myModal").modal("hide").modal("show")"><pre class="notranslate"><code class="notranslate">$("#myModal").modal("hide").modal("show")
</code></pre></div>
<p dir="auto">The dialog should hide and show again, which it does, but the background overlay also turns completely black and opaque, which it shouldn't.</p>
<p dir="auto">JsFiddle link: <a href="http://jsfiddle.net/fgVv3/12/" rel="nofollow">http://jsfiddle.net/fgVv3/12/</a></p> | 0 |
<p dir="auto"><code class="notranslate">Deno.readTextFile</code> error is not too descriptive my opinion:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="error: Uncaught NotFound: No such file or directory (os error 2)
..."><pre class="notranslate">error: Uncaught NotFound: No such file or directory (os error 2)
...</pre></div>
<p dir="auto">Maybe it could include a bit more information, like the path it was trying to read?</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="error: Uncaught NotFound: No such file or directory (os error 2): "path/to/file.ts""><pre class="notranslate">error: Uncaught NotFound: No such file or directory (os error 2): <span class="pl-s"><span class="pl-pds">"</span>path/to/file.ts<span class="pl-pds">"</span></span></pre></div> | <p dir="auto">Hey,</p>
<p dir="auto">Thinking about the I/O stuff made me realize that since we don't have <code class="notranslate">defer</code> in JavaScript and we have exceptions so:</p>
<div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="func main() {
f, err := os.Open("/tmp/test.txt")
if err != nil {
return
}
defer f.Close();
n, err := fmt.Fprintln(f, "data")
// skip checking n and `err` for brevity but code should
}"><pre class="notranslate"><span class="pl-k">func</span> <span class="pl-en">main</span>() {
<span class="pl-s1">f</span>, <span class="pl-s1">err</span> <span class="pl-c1">:=</span> <span class="pl-s1">os</span>.<span class="pl-en">Open</span>(<span class="pl-s">"/tmp/test.txt"</span>)
<span class="pl-k">if</span> <span class="pl-s1">err</span> <span class="pl-c1">!=</span> <span class="pl-c1">nil</span> {
<span class="pl-k">return</span>
}
<span class="pl-k">defer</span> <span class="pl-s1">f</span>.<span class="pl-en">Close</span>();
<span class="pl-s1">n</span>, <span class="pl-s1">err</span> <span class="pl-c1">:=</span> <span class="pl-s1">fmt</span>.<span class="pl-en">Fprintln</span>(<span class="pl-s1">f</span>, <span class="pl-s">"data"</span>)
<span class="pl-c">// skip checking n and `err` for brevity but code should</span>
}</pre></div>
<p dir="auto">Could be:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="async function main() {
const f = await createFile('/tmp/test.txt'); // ignore API bikeshed
try {
const n = await f.write(data);
} finally {
f.close();
}
}"><pre class="notranslate"><span class="pl-k">async</span> <span class="pl-k">function</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">const</span> <span class="pl-s1">f</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">createFile</span><span class="pl-kos">(</span><span class="pl-s">'/tmp/test.txt'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// ignore API bikeshed</span>
<span class="pl-k">try</span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">n</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">f</span><span class="pl-kos">.</span><span class="pl-en">write</span><span class="pl-kos">(</span><span class="pl-s1">data</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span> <span class="pl-k">finally</span> <span class="pl-kos">{</span>
<span class="pl-s1">f</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Which unlike <code class="notranslate">defer</code> doesn't really stack up too nicely with multiple files:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="async function main() {
const f = await createFile('/tmp/test.txt');
try {
try {
const f2 = await createFile('/tmp/test2.txt');
await f.write('data');
await f2.write('data'); // or Promise.all and do it concurrently
} finally {
f2.close(); // by the way - is this synchronous?
}
} finally {
f.close();
}
}"><pre class="notranslate"><span class="pl-k">async</span> <span class="pl-k">function</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">const</span> <span class="pl-s1">f</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">createFile</span><span class="pl-kos">(</span><span class="pl-s">'/tmp/test.txt'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">try</span> <span class="pl-kos">{</span>
<span class="pl-k">try</span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">f2</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">createFile</span><span class="pl-kos">(</span><span class="pl-s">'/tmp/test2.txt'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">f</span><span class="pl-kos">.</span><span class="pl-en">write</span><span class="pl-kos">(</span><span class="pl-s">'data'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">f2</span><span class="pl-kos">.</span><span class="pl-en">write</span><span class="pl-kos">(</span><span class="pl-s">'data'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// or Promise.all and do it concurrently</span>
<span class="pl-kos">}</span> <span class="pl-k">finally</span> <span class="pl-kos">{</span>
<span class="pl-s1">f2</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// by the way - is this synchronous?</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span> <span class="pl-k">finally</span> <span class="pl-kos">{</span>
<span class="pl-s1">f</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">This sort of code is very hard to write correctly - especially if resources are acquired concurrently (we don't await before the first createFile finishes to do the second) and some of them fail.</p>
<p dir="auto">We can do other stuff instead for resource management:</p>
<ul dir="auto">
<li>We can expose <a href="https://stackoverflow.com/questions/28915677/what-is-the-promise-disposer-pattern" rel="nofollow">disposers</a> for resource management.</li>
<li>We can expose a <code class="notranslate">using</code> function from deno and have a "real" resource" story.</li>
<li>Something else?</li>
</ul>
<p dir="auto">Here is what the above example looks like with exposing a <code class="notranslate">using</code>:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { using } from 'deno'
async function main() {
await using(createFile('/tmp/test.txt'), createFile('/tmp/test2.txt'), async (test1, test2) => {
// when the promise this returns resolves - both files are closed
}); // can .catch here to handle errors or wrap with try/catch
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">using</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'deno'</span>
<span class="pl-k">async</span> <span class="pl-k">function</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">await</span> <span class="pl-en">using</span><span class="pl-kos">(</span><span class="pl-en">createFile</span><span class="pl-kos">(</span><span class="pl-s">'/tmp/test.txt'</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-en">createFile</span><span class="pl-kos">(</span><span class="pl-s">'/tmp/test2.txt'</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-s1">test1</span><span class="pl-kos">,</span> <span class="pl-s1">test2</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-c">// when the promise this returns resolves - both files are closed</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// can .catch here to handle errors or wrap with try/catch</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">We wrote some prior art in bluebird in <a href="http://bluebirdjs.com/docs/api/promise.using.html" rel="nofollow">here</a> - C# also does this with <code class="notranslate">using</code> (I asked before defining <code class="notranslate">using</code> in bluebird and got <a href="https://stackoverflow.com/a/21123756/1348195" rel="nofollow">an interesting perspective from Eric</a>). Python has <code class="notranslate">with</code> and Java has <code class="notranslate">try with resource</code>.</p>
<p dir="auto">Since this is a problem "browser TypeScript" doesn't really have commonly I suspect it will be a few years before a solution might come from TC39 if at all - issues were opened in TypeScript but it was deemed out of scope. Some CCs to get the discussion started:</p>
<ul dir="auto">
<li><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/spion/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/spion">@spion</a> who worked on <code class="notranslate">defer</code> for bluebird coroutines and <code class="notranslate">using</code> with me.</li>
<li><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/littledan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/littledan">@littledan</a> for a TC39 reference and knowing if there is interest in solving this at a language level.</li>
<li><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/1st1/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/1st1">@1st1</a> who did the work on asynchronous contexts for Python</li>
</ul>
<p dir="auto">We also did some discussion in Node but there is no way I'm aware of for Node to do this nicely that won't be super risky - Deno seems like the perfect candidate for a safer API for resource management.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ry/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ry">@ry</a> if you prefer this as a PR with a concrete proposal for either approach let me know. Alternatively if you prefer the discussion to happen at a later future point let me know.</p> | 0 |
<p dir="auto">One of the our application's users has a problem starting electron executable. It even happens with original executable available to download from releases page without additional modifications on our side.</p>
<p dir="auto">We've tested the following electron versions: 2.0.10, 3.0.5 and all have the same behavior for this specific user.</p>
<ul dir="auto">
<li>Operating System (Platform and Version): Windows 7</li>
</ul>
<p dir="auto"><strong>Actual behavior</strong><br>
electron.exe starts and fails silently not reaching our code.</p>
<p dir="auto"><strong>Additional Information</strong><br>
Here is stack trace from crash dump for version 3.0.5. It was collected using ProcDump (options -ma -e 1 -w electron) and WinDbg (with debug symbols for version 3.0.5).</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0:000> k
# ChildEBP RetAddr
00 002deaa8 7733874f ntdll!NtWaitForSingleObject+0x15
01 002deb2c 7733887d ntdll!RtlReportExceptionEx+0x14b
02 002deb84 77330f09 ntdll!RtlReportException+0x86
03 002deb9c 773110cd ntdll!LdrpInitializeProcessWrapperFilter+0x63
04 002deba8 77304fc4 ntdll!_LdrpInitialize+0xef
05 002debbc 77304e59 ntdll!_EH4_CallFilterFunc+0x12
06 002debe4 772f34c1 ntdll!_except_handler4+0x8e
07 002dec08 772f3493 ntdll!ExecuteHandler2+0x26
08 002dec2c 772f3434 ntdll!ExecuteHandler+0x24
09 002decb8 772a0163 ntdll!RtlDispatchException+0x127
0a 002decb8 7597338d ntdll!KiUserExceptionDispatcher+0xf
0b 002df180 0f7d22fa KERNELBASE!DebugBreak+0x2
0c 002df198 0f7bb7bd node!uv_fatal_error+0x8a [c:\projects\electron-39ng6\vendor\node\deps\uv\src\win\error.c @ 62]
0d 002df5c0 0f7d3413 node!uv_winsock_init+0x1dd [c:\projects\electron-39ng6\vendor\node\deps\uv\src\win\winsock.c @ 138]
0e 002df5e8 0f7c8e2b node!uv_init+0x43 [c:\projects\electron-39ng6\vendor\node\deps\uv\src\win\core.c @ 207]
0f (Inline) -------- node!uv__once_inner+0x32 [c:\projects\electron-39ng6\vendor\node\deps\uv\src\win\thread.c @ 65]
10 002df600 0f7bcb48 node!uv_once+0x4b [c:\projects\electron-39ng6\vendor\node\deps\uv\src\win\thread.c @ 87]
11 (Inline) -------- node!uv__once_init+0xf [c:\projects\electron-39ng6\vendor\node\deps\uv\src\win\core.c @ 296]
12 002df61c 0f6c1155 node!uv_hrtime+0x18 [c:\projects\electron-39ng6\vendor\node\deps\uv\src\win\util.c @ 473]
13 002df620 00509293 node!node::performance::`dynamic initializer for 'timeOrigin''+0x5 [c:\projects\electron-39ng6\vendor\node\src\node_perf.cc @ 36]
14 002df63c 0ff9e6f2 ucrtbase!_initterm+0x43
15 002df67c 0ff9e64b node!dllmain_crt_process_attach+0x8f [f:\dd\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp @ 63]
16 002df68c 0ff9e83d node!dllmain_crt_dispatch+0x3b [f:\dd\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp @ 137]
17 002df6cc 0ff9e92c node!dllmain_dispatch+0x59 [f:\dd\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp @ 194]
18 002df6e0 772c9264 node!_DllMainCRTStartup+0x1c [f:\dd\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp @ 252]
19 002df700 772cfe97 ntdll!LdrpCallInitRoutine+0x14
1a 002df7f4 772db454 ntdll!LdrpRunInitializeRoutines+0x26f
1b 002df974 772d9f11 ntdll!LdrpInitializeProcess+0x1402
1c 002df9c4 772c9789 ntdll!_LdrpInitialize+0x78
1d 002df9d4 00000000 ntdll!LdrInitializeThunk+0x10"><pre class="notranslate"><code class="notranslate">0:000> k
# ChildEBP RetAddr
00 002deaa8 7733874f ntdll!NtWaitForSingleObject+0x15
01 002deb2c 7733887d ntdll!RtlReportExceptionEx+0x14b
02 002deb84 77330f09 ntdll!RtlReportException+0x86
03 002deb9c 773110cd ntdll!LdrpInitializeProcessWrapperFilter+0x63
04 002deba8 77304fc4 ntdll!_LdrpInitialize+0xef
05 002debbc 77304e59 ntdll!_EH4_CallFilterFunc+0x12
06 002debe4 772f34c1 ntdll!_except_handler4+0x8e
07 002dec08 772f3493 ntdll!ExecuteHandler2+0x26
08 002dec2c 772f3434 ntdll!ExecuteHandler+0x24
09 002decb8 772a0163 ntdll!RtlDispatchException+0x127
0a 002decb8 7597338d ntdll!KiUserExceptionDispatcher+0xf
0b 002df180 0f7d22fa KERNELBASE!DebugBreak+0x2
0c 002df198 0f7bb7bd node!uv_fatal_error+0x8a [c:\projects\electron-39ng6\vendor\node\deps\uv\src\win\error.c @ 62]
0d 002df5c0 0f7d3413 node!uv_winsock_init+0x1dd [c:\projects\electron-39ng6\vendor\node\deps\uv\src\win\winsock.c @ 138]
0e 002df5e8 0f7c8e2b node!uv_init+0x43 [c:\projects\electron-39ng6\vendor\node\deps\uv\src\win\core.c @ 207]
0f (Inline) -------- node!uv__once_inner+0x32 [c:\projects\electron-39ng6\vendor\node\deps\uv\src\win\thread.c @ 65]
10 002df600 0f7bcb48 node!uv_once+0x4b [c:\projects\electron-39ng6\vendor\node\deps\uv\src\win\thread.c @ 87]
11 (Inline) -------- node!uv__once_init+0xf [c:\projects\electron-39ng6\vendor\node\deps\uv\src\win\core.c @ 296]
12 002df61c 0f6c1155 node!uv_hrtime+0x18 [c:\projects\electron-39ng6\vendor\node\deps\uv\src\win\util.c @ 473]
13 002df620 00509293 node!node::performance::`dynamic initializer for 'timeOrigin''+0x5 [c:\projects\electron-39ng6\vendor\node\src\node_perf.cc @ 36]
14 002df63c 0ff9e6f2 ucrtbase!_initterm+0x43
15 002df67c 0ff9e64b node!dllmain_crt_process_attach+0x8f [f:\dd\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp @ 63]
16 002df68c 0ff9e83d node!dllmain_crt_dispatch+0x3b [f:\dd\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp @ 137]
17 002df6cc 0ff9e92c node!dllmain_dispatch+0x59 [f:\dd\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp @ 194]
18 002df6e0 772c9264 node!_DllMainCRTStartup+0x1c [f:\dd\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp @ 252]
19 002df700 772cfe97 ntdll!LdrpCallInitRoutine+0x14
1a 002df7f4 772db454 ntdll!LdrpRunInitializeRoutines+0x26f
1b 002df974 772d9f11 ntdll!LdrpInitializeProcess+0x1402
1c 002df9c4 772c9789 ntdll!_LdrpInitialize+0x78
1d 002df9d4 00000000 ntdll!LdrInitializeThunk+0x10
</code></pre></div> | <p dir="auto">I use libuv(version 1.9.0) in my Windows client for networking framework. But i have received some crash reports in uv_winsock_init function. call stack is as bellow, i print error is socket error 10106, and i have received some other stack at winsock.c lineno 121, and socket errorno is 10014, is this a bug?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="STACK_TEXT:
07c3f478 037e879c 00000000 00000560 5a371f5e MainFrame!uv_fatal_error+0x80 [g:\mojo-release\mojo_v3.5.0\src\net\atlas\atlas\platform\win32\libuv\src\win\error.c @ 61]
07c3f8a0 037d38ad 00000560 07c3f8d4 07c3f8d4 MainFrame!uv_winsock_init+0x1fc [g:\mojo-release\mojo_v3.5.0\src\net\atlas\atlas\platform\win32\libuv\src\win\winsock.c @ 148]
07c3f8b4 03d43d44 07c3f8d4 037e83e6 078304e8 MainFrame!uv_init+0x2d [g:\mojo-release\mojo_v3.5.0\src\net\atlas\atlas\platform\win32\libuv\src\win\core.c @ 113]
07c3f8b8 07c3f8d4 037e83e6 078304e8 078305a8 MainFrame!uv_init_guard_+0x4
WARNING: Frame IP not in any known module. Following frames may be wrong.
07c3f8bc 037e83e6 078304e8 078305a8 596ced74 0x7c3f8d4
07c3f8d4 037d393d 078304e8 078305a8 596ced74 MainFrame!uv__once_inner+0x36 [g:\mojo-release\mojo_v3.5.0\src\net\atlas\atlas\platform\win32\libuv\src\win\thread.c @ 67]
07c3f8e4 037bbc57 d19ee234 596ced74 078304e8 MainFrame!uv_loop_init+0x1d [g:\mojo-release\mojo_v3.5.0\src\net\atlas\atlas\platform\win32\libuv\src\win\core.c @ 133]
07c3f9f4 03791318 d19ee18c 596ced74 07830228 MainFrame!wukong::net::EventLoop::EventLoop+0x167 [g:\mojo-release\mojo_v3.5.0\src\net\atlas\atlas\wukong\net\eventloop.cpp @ 153]
07c3fa4c 035cf7a2 d19ee1ac 007c7478 07830228 MainFrame!wukong::lwp::UserAgent::UserAgent+0x98 [g:\mojo-release\mojo_v3.5.0\src\net\atlas\atlas\wukong\lwp\useragent.cpp @ 21]
07c3fa6c 035d7374 d19ee0c4 596cee11 07c3fbb8 MainFrame!wukong::Singleton<wukong::lwp::UserAgent>::init+0x62 [g:\mojo-release\mojo_v3.5.0\src\net\atlas\atlas\wukong\common\singleton.hpp @ 23]
07c3fb04 035bd5fc 07c3fb30 07c3fb48 d19ee0d8 MainFrame!mj::AppSettings::Init+0xdd4 [g:\mojo-release\mojo_v3.5.0\src\apps\app_settings.cpp @ 240]
07c3fb6c 03b2c3fd 07c3fbe0 0397c593 07c3fbb8 MainFrame!mj::LaunchRemotePlatformApp+0x16c [g:\mojo-release\mojo_v3.5.0\src\apps\launcher.cpp @ 65]
07c3fb74 0397c593 07c3fbb8 07c3fbb8 07c3fb9c MainFrame!libm_sse2_pow_precise+0x595dd
07c3fbe0 03983a1e d19ee7fc 039839e0 077d1070 MainFrame!CLoginContent::LaunchPlatformApp+0x53 [g:\mojo-release\mojo_v3.5.0\win\source\app\frame\logincontent.cpp @ 223]
07c3fc3c 03985c01 077d1070 00000000 077d4398 MainFrame!CLoginContent::ThreadInit+0x3e [g:\mojo-release\mojo_v3.5.0\win\source\app\frame\logincontent.cpp @ 143]
07c3fc4c 5a37f33c d195a375 00000000 077d4398 MainFrame!std::_LaunchPad<std::_Bind<1,void,void (__cdecl*const)(CLoginContent *),CLoginContent *> >::_Go+0x11 [d:\dev\vs2013\vc\include\thr\xthread @ 187]
07c3fc74 596ec01d 0040e420 d195a3d1 00000000 msvcp120!_Call_func+0x17 [f:\dd\vctools\crt\crtw32\stdcpp\thr\threadcall.cpp @ 28]
07c3fcac 596ec001 00000000 07c3fcc4 7659337a msvcr120!_callthreadstartex+0x1b [f:\dd\vctools\crt\crtw32\startup\threadex.c @ 376]
07c3fcb8 7659337a 077d3fd0 07c3fd04 77979882 msvcr120!_threadstartex+0x7c [f:\dd\vctools\crt\crtw32\startup\threadex.c @ 354]
07c3fcc4 77979882 077d3fd0 7106bde2 00000000 kernel32+0x1337a
07c3fd04 77979855 596ebfb4 077d3fd0 00000000 ntdll+0x39882
07c3fd1c 00000000 596ebfb4 077d3fd0 00000000 ntdll+0x39855"><pre class="notranslate"><code class="notranslate">STACK_TEXT:
07c3f478 037e879c 00000000 00000560 5a371f5e MainFrame!uv_fatal_error+0x80 [g:\mojo-release\mojo_v3.5.0\src\net\atlas\atlas\platform\win32\libuv\src\win\error.c @ 61]
07c3f8a0 037d38ad 00000560 07c3f8d4 07c3f8d4 MainFrame!uv_winsock_init+0x1fc [g:\mojo-release\mojo_v3.5.0\src\net\atlas\atlas\platform\win32\libuv\src\win\winsock.c @ 148]
07c3f8b4 03d43d44 07c3f8d4 037e83e6 078304e8 MainFrame!uv_init+0x2d [g:\mojo-release\mojo_v3.5.0\src\net\atlas\atlas\platform\win32\libuv\src\win\core.c @ 113]
07c3f8b8 07c3f8d4 037e83e6 078304e8 078305a8 MainFrame!uv_init_guard_+0x4
WARNING: Frame IP not in any known module. Following frames may be wrong.
07c3f8bc 037e83e6 078304e8 078305a8 596ced74 0x7c3f8d4
07c3f8d4 037d393d 078304e8 078305a8 596ced74 MainFrame!uv__once_inner+0x36 [g:\mojo-release\mojo_v3.5.0\src\net\atlas\atlas\platform\win32\libuv\src\win\thread.c @ 67]
07c3f8e4 037bbc57 d19ee234 596ced74 078304e8 MainFrame!uv_loop_init+0x1d [g:\mojo-release\mojo_v3.5.0\src\net\atlas\atlas\platform\win32\libuv\src\win\core.c @ 133]
07c3f9f4 03791318 d19ee18c 596ced74 07830228 MainFrame!wukong::net::EventLoop::EventLoop+0x167 [g:\mojo-release\mojo_v3.5.0\src\net\atlas\atlas\wukong\net\eventloop.cpp @ 153]
07c3fa4c 035cf7a2 d19ee1ac 007c7478 07830228 MainFrame!wukong::lwp::UserAgent::UserAgent+0x98 [g:\mojo-release\mojo_v3.5.0\src\net\atlas\atlas\wukong\lwp\useragent.cpp @ 21]
07c3fa6c 035d7374 d19ee0c4 596cee11 07c3fbb8 MainFrame!wukong::Singleton<wukong::lwp::UserAgent>::init+0x62 [g:\mojo-release\mojo_v3.5.0\src\net\atlas\atlas\wukong\common\singleton.hpp @ 23]
07c3fb04 035bd5fc 07c3fb30 07c3fb48 d19ee0d8 MainFrame!mj::AppSettings::Init+0xdd4 [g:\mojo-release\mojo_v3.5.0\src\apps\app_settings.cpp @ 240]
07c3fb6c 03b2c3fd 07c3fbe0 0397c593 07c3fbb8 MainFrame!mj::LaunchRemotePlatformApp+0x16c [g:\mojo-release\mojo_v3.5.0\src\apps\launcher.cpp @ 65]
07c3fb74 0397c593 07c3fbb8 07c3fbb8 07c3fb9c MainFrame!libm_sse2_pow_precise+0x595dd
07c3fbe0 03983a1e d19ee7fc 039839e0 077d1070 MainFrame!CLoginContent::LaunchPlatformApp+0x53 [g:\mojo-release\mojo_v3.5.0\win\source\app\frame\logincontent.cpp @ 223]
07c3fc3c 03985c01 077d1070 00000000 077d4398 MainFrame!CLoginContent::ThreadInit+0x3e [g:\mojo-release\mojo_v3.5.0\win\source\app\frame\logincontent.cpp @ 143]
07c3fc4c 5a37f33c d195a375 00000000 077d4398 MainFrame!std::_LaunchPad<std::_Bind<1,void,void (__cdecl*const)(CLoginContent *),CLoginContent *> >::_Go+0x11 [d:\dev\vs2013\vc\include\thr\xthread @ 187]
07c3fc74 596ec01d 0040e420 d195a3d1 00000000 msvcp120!_Call_func+0x17 [f:\dd\vctools\crt\crtw32\stdcpp\thr\threadcall.cpp @ 28]
07c3fcac 596ec001 00000000 07c3fcc4 7659337a msvcr120!_callthreadstartex+0x1b [f:\dd\vctools\crt\crtw32\startup\threadex.c @ 376]
07c3fcb8 7659337a 077d3fd0 07c3fd04 77979882 msvcr120!_threadstartex+0x7c [f:\dd\vctools\crt\crtw32\startup\threadex.c @ 354]
07c3fcc4 77979882 077d3fd0 7106bde2 00000000 kernel32+0x1337a
07c3fd04 77979855 596ebfb4 077d3fd0 00000000 ntdll+0x39882
07c3fd1c 00000000 596ebfb4 077d3fd0 00000000 ntdll+0x39855
</code></pre></div> | 1 |
<p dir="auto">I use examples/pytorch/translation/run_translation.py fine-tune mbart-large-cc25 on my datasets, it automatically runs on CPU. I have 2 GPU, but only one is Nvidia.It is RTX 2080super.</p>
<p dir="auto">python main.py <br>
--model_name_or_path facebook/mbart-large-cc25 <br>
--do_train <br>
--do_eval <br>
--source_lang en_XX <br>
--target_lang zh_CN <br>
--train_file /data/2WangHongyu/bioNMT_WHY/train.json <br>
--validation_file /data/2WangHongyu/bioNMT_WHY/dev.json <br>
--output_dir /output <br>
--per_device_train_batch_size=4 <br>
--per_device_eval_batch_size=4 <br>
--overwrite_output_dir <br>
--predict_with_generate <br>
--cache_dir /model/2WangHongyu/mbart-large</p> | <p dir="auto">-<code class="notranslate">transformers</code> version: 4.5.0</p>
<ul dir="auto">
<li>Platform: linux</li>
<li>Python version: 3.8</li>
<li>PyTorch version (GPU?): 1.7.1</li>
<li>Tensorflow version (GPU?):</li>
<li>Using GPU in script?: yes</li>
<li>Using distributed or parallel set-up in script?:yes</li>
</ul>
<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>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/patil-suraj/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/patil-suraj">@patil-suraj</a><br>
Models: mbart-large-50</p> | 1 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=cltam96" rel="nofollow">chris tam</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3250?redirect=false" rel="nofollow">SPR-3250</a></strong> and commented</p>
<p dir="auto">The problem is reported by Mark Menard in <a href="http://forum.springframework.org/showthread.php?t=35956" rel="nofollow">Spring support forum</a>. I have checked the source code and find out the problem come from LangNamespaceHandler "init" method. Currently the "init" method contains the following code:<br>
...<br>
public void init() {<br>
registerScriptBeanDefinitionParser("groovy", GroovyScriptFactory.class);<br>
registerScriptBeanDefinitionParser("jruby", JRubyScriptFactory.class);<br>
registerScriptBeanDefinitionParser("bsh", BshScriptFactory.class);<br>
}<br>
...<br>
The above code will throw ClassNotFoundException when either groovy, beanshell or jruby library is not found in the classpath. The DefaultNamespaceHandlerResolver will not register the "lang" namespace when "init" method throws the ClassNotFoundException. The lang namespace requires that both groovy, beanshell and jruby library must be in the classpath. Is it possible to add some checking to the init method of LangNamespaceHandler to avoid the above dependency. For example:<br>
...<br>
public void init() {<br>
if (checkGroovyExists()) {<br>
registerScriptBeanDefinitionParser("groovy", GroovyScriptFactory.class);<br>
}<br>
if (checkJRubyExists()) {<br>
registerScriptBeanDefinitionParser("jruby", JRubyScriptFactory.class);<br>
}<br>
if (checkBshExists()) {<br>
registerScriptBeanDefinitionParser("bsh", BshScriptFactory.class);<br>
}</p>
<p dir="auto">// what to do if all the above jars are not found???</p>
<p dir="auto">}</p>
<p dir="auto">private boolean checkGroovyExists() {<br>
try {<br>
Class.forName("groovy.lang.GroovyObject") ;<br>
return true ;<br>
} catch(Exception e) {<br>
return false ;<br>
}<br>
}</p>
<p dir="auto">private boolean checkBshExists() {<br>
try {<br>
Class.forName("bsh.Interpreter") ;<br>
return true ;<br>
} catch(Exception e) {<br>
return false ;<br>
}<br>
}</p>
<p dir="auto">private boolean checkJRubyExists() {<br>
try {<br>
Class.forName("org.jruby.runtime.builtin.IRubyObject") ;<br>
return true ;<br>
} catch(Exception e) {<br>
return false ;<br>
}<br>
}<br>
...<br>
Thanks for all the help from spring team.</p>
<p dir="auto">cheers<br>
chris tam<br>
xenium</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0.3</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398076226" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7942" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7942/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7942">#7942</a> Cannot find "lang" namespace handler unless all library jars are present (<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="398076341" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7958" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7958/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7958">#7958</a> NoClassDefFoundError when groovy isn't on classpath (<em><strong>"is duplicated by"</strong></em>)</li>
</ul> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=ojs" rel="nofollow">Oliver Siegmar</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9067?redirect=false" rel="nofollow">SPR-9067</a></strong> and commented</p>
<p dir="auto">Consider this configuration:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<mvc:resources mapping="/static/**" location="/WEB-INF/resources/immutable/"/>"><pre class="notranslate"><code class="notranslate"><mvc:resources mapping="/static/**" location="/WEB-INF/resources/immutable/"/>
</code></pre></div>
<p dir="auto">The resource directory /WEB-INF/resources/immutable/ contains several files and subdirectories. One subdirectory is called images.</p>
<p dir="auto">A browser request to /static/nonexistingfile.png results in a 404 HTTP error. But a request to /static/images (existing directory, without a file name specified) results in a FileNotFoundException:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/resources/immutable/images]
at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:118) ~[spring-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.servlet.resource.ResourceHttpRequestHandler.writeContent(ResourceHttpRequestHandler.java:240) ~[spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.servlet.resource.ResourceHttpRequestHandler.handleRequest(ResourceHttpRequestHandler.java:141) ~[spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:49) ~[spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900) ~[spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827) ~[spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) ~[spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) ~[spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) ~[servlet-api.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) ~[servlet-api.jar:na]"><pre class="notranslate"><code class="notranslate">java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/resources/immutable/images]
at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:118) ~[spring-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.servlet.resource.ResourceHttpRequestHandler.writeContent(ResourceHttpRequestHandler.java:240) ~[spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.servlet.resource.ResourceHttpRequestHandler.handleRequest(ResourceHttpRequestHandler.java:141) ~[spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:49) ~[spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900) ~[spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827) ~[spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) ~[spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) ~[spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) ~[servlet-api.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) ~[servlet-api.jar:na]
</code></pre></div>
<p dir="auto">I think the getResource(HttpServletRequest) method in ResourceHttpRequestHandler should also check if the requested resources is a File.</p>
<p dir="auto">On a high volume website this can cause tons of FileNotFoundExceptions due to robot visits. This is why I classified this issue with major priority.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1 GA</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="398116957" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13712" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13712/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13712">#13712</a> Spring MVC resources handler generates a 500 internal error when accessing a directory resource (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/f8238f52433432d78a6f6d0a9352f5b1efa1cb02/hovercard" href="https://github.com/spring-projects/spring-framework/commit/f8238f52433432d78a6f6d0a9352f5b1efa1cb02"><tt>f8238f5</tt></a></p> | 0 |
<div class="highlight highlight-source-httpspec notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="PUT _template/test
{
"template": "i*",
"settings": {
"analysis": {
"analyzer": {
"custom": {
"type": "custom",
"tokenizer": "keyword"
}
}
}
}
}
PUT /_template/test1
{
"template": "index*",
"mappings": {
"type": {
"properties": {
"message": {
"type": "text",
"analyzer": "custom"
}
}
}
}
}"><pre class="notranslate"><span class="pl-k">PUT</span> <span class="pl-ii">_template/test</span>
{
<span class="pl-ent">"template"</span>: <span class="pl-s"><span class="pl-pds">"</span>i*<span class="pl-pds">"</span></span>,
<span class="pl-ent">"settings"</span>: {
<span class="pl-ent">"analysis"</span>: {
<span class="pl-ent">"analyzer"</span>: {
<span class="pl-ent">"custom"</span>: {
<span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>custom<span class="pl-pds">"</span></span>,
<span class="pl-ent">"tokenizer"</span>: <span class="pl-s"><span class="pl-pds">"</span>keyword<span class="pl-pds">"</span></span>
}
}
}
}
}
<span class="pl-k">PUT</span><span class="pl-c1"> /_template/test1</span>
{
<span class="pl-ent">"template"</span>: <span class="pl-s"><span class="pl-pds">"</span>index*<span class="pl-pds">"</span></span>,
<span class="pl-ent">"mappings"</span>: {
<span class="pl-ent">"type"</span>: {
<span class="pl-ent">"properties"</span>: {
<span class="pl-ent">"message"</span>: {
<span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>text<span class="pl-pds">"</span></span>,
<span class="pl-ent">"analyzer"</span>: <span class="pl-s"><span class="pl-pds">"</span>custom<span class="pl-pds">"</span></span>
}
}
}
}
}</pre></div>
<p dir="auto">The first template, which can be thought of as the parent template, defines something that is used by the second template: a custom analyzer. The template validator appears to only consider the template as a standalone one, which means that the analyzer does not exist, thus returning:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "analyzer [custom] not found for field [message]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [type]: analyzer [custom] not found for field [message]",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "analyzer [custom] not found for field [message]"
}
},
"status": 400
}"><pre class="notranslate">{
<span class="pl-ent">"error"</span>: {
<span class="pl-ent">"root_cause"</span>: [
{
<span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>mapper_parsing_exception<span class="pl-pds">"</span></span>,
<span class="pl-ent">"reason"</span>: <span class="pl-s"><span class="pl-pds">"</span>analyzer [custom] not found for field [message]<span class="pl-pds">"</span></span>
}
],
<span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>mapper_parsing_exception<span class="pl-pds">"</span></span>,
<span class="pl-ent">"reason"</span>: <span class="pl-s"><span class="pl-pds">"</span>Failed to parse mapping [type]: analyzer [custom] not found for field [message]<span class="pl-pds">"</span></span>,
<span class="pl-ent">"caused_by"</span>: {
<span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>mapper_parsing_exception<span class="pl-pds">"</span></span>,
<span class="pl-ent">"reason"</span>: <span class="pl-s"><span class="pl-pds">"</span>analyzer [custom] not found for field [message]<span class="pl-pds">"</span></span>
}
},
<span class="pl-ent">"status"</span>: <span class="pl-c1">400</span>
}</pre></div>
<p dir="auto">The template validation should combine matching templates like normal index creation works, which would to ensure that the <em>entire</em> chain is valid or invalid.</p>
<p dir="auto"><strong>Workaround</strong></p>
<p dir="auto">There is a workaround, which is to manually apply necessary pieces to the sub-template (e.g., duplicating the analyzer in it, which will be only appear once in the resulting index).</p> | <p dir="auto">Given the following document</p>
<p dir="auto"><code class="notranslate">{ ... "input" : ["foobar", "barfoo", "foo"] ... }</code></p>
<p dir="auto">and the query <code class="notranslate">foo</code>, the document will show up twice in the result set when using completion suggester. I'm currently using a custom method to clean my input data to make sure the same prefix is not being used twice for a given document but it somehow feels wrong. With a regular search a document will also not show multiple times if a keyword is contained more than once in the document, is the completion suggester working this way by design?</p> | 0 |
<ul dir="auto">
<li>[√] 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>[√] 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.6-2.7.8</li>
<li>Operating System version: Centos 3.10.0-862.el7.x86_64</li>
<li>Java version: 1.8.0</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>设置虚IP<br>
有一台机器因为某些原因,在eth0上设置了虚IP(10.19.15.115,真实IP是10.19.15.111)。</li>
</ol>
<ul dir="auto">
<li>执行 ip a输出如下:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="...
eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether xx:xx:xx:xx:dc:cc brd ff:ff:ff:ff:ff:ff
inet 10.19.15.111/22 brd 10.19.15.255 scope global eth0
valid_lft forever preferred_lft forever
inet 10.19.15.115/32 scope global eth0
valid_lft forever preferred_lft forever
...
"><pre class="notranslate"><code class="notranslate">...
eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether xx:xx:xx:xx:dc:cc brd ff:ff:ff:ff:ff:ff
inet 10.19.15.111/22 brd 10.19.15.255 scope global eth0
valid_lft forever preferred_lft forever
inet 10.19.15.115/32 scope global eth0
valid_lft forever preferred_lft forever
...
</code></pre></div>
<ul dir="auto">
<li>执行 ifconfig 输出如下:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.19.15.111 netmask 255.255.252.0 broadcast 10.19.15.255
ether xx:xx:xx:xx:dc:cc txqueuelen 1000 (Ethernet)"><pre class="notranslate"><code class="notranslate">eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.19.15.111 netmask 255.255.252.0 broadcast 10.19.15.255
ether xx:xx:xx:xx:dc:cc txqueuelen 1000 (Ethernet)
</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="public static void main(String[] args) {
InetAddress localAddress = NetUtils.getLocalAddress();
System.out.println(localAddress);
}"><pre class="notranslate"><code class="notranslate">public static void main(String[] args) {
InetAddress localAddress = NetUtils.getLocalAddress();
System.out.println(localAddress);
}
</code></pre></div>
<ol start="3" dir="auto">
<li>运行程序</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto"><code class="notranslate">/10.19.15.111</code></p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto"><code class="notranslate">/10.19.15.115</code></p>
<p dir="auto">此问题在2.7.5以及之前是能够获取期望的正确的IP的。<br>
因此我认为 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="570438009" data-permission-text="Title is private" data-url="https://github.com/apache/dubbo/issues/5795" data-hovercard-type="issue" data-hovercard-url="/apache/dubbo/issues/5795/hovercard" href="https://github.com/apache/dubbo/issues/5795">#5795</a> 引入了一个 Breakable change:让Netutils没有机会调用<code class="notranslate">java.net.InetAddress#getLocalHost()</code>从hostname获取对应的IP地址:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Returns the address of the local host. This is achieved by retrieving
* the name of the host from the system, then resolving that name into
* an {@code InetAddress}.
java.net.InetAddress#getLocalHost()"><pre class="notranslate"><code class="notranslate">Returns the address of the local host. This is achieved by retrieving
* the name of the host from the system, then resolving that name into
* an {@code InetAddress}.
java.net.InetAddress#getLocalHost()
</code></pre></div>
<p dir="auto">例如改成如下方式?(2.7.5以及以前是先调用<code class="notranslate">InetAddress.getLocalHost()</code>的)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" private static InetAddress getLocalAddress0() {
InetAddress localAddress = null;
//to provide a chance to retrieve ip from hostname. maybe add an system property like 'dubbo.network.hostname.first'
if ("true".equals(System.getProperty("dubbo.network.hostname.first"))) {
try {
localAddress = InetAddress.getLocalHost();
Optional<InetAddress> addressOp = toValidAddress(localAddress);
if (addressOp.isPresent()) {
return addressOp.get();
}
} catch (Throwable e) {
logger.warn(e);
}
}
//以上代码放在后面可能没有机会执行了。
// @since 2.7.6, choose the {@link NetworkInterface} first
try {
NetworkInterface networkInterface = findNetworkInterface();
Enumeration<InetAddress> addresses = networkInterface.getInetAddresses();
while (addresses.hasMoreElements()) {
Optional<InetAddress> addressOp = toValidAddress(addresses.nextElement());
if (addressOp.isPresent()) {
try {
if (addressOp.get().isReachable(100)) {
return addressOp.get();
}
} catch (IOException e) {
// ignore
}
}
}
} catch (Throwable e) {
logger.warn(e);
}
return localAddress;
}"><pre class="notranslate"><code class="notranslate"> private static InetAddress getLocalAddress0() {
InetAddress localAddress = null;
//to provide a chance to retrieve ip from hostname. maybe add an system property like 'dubbo.network.hostname.first'
if ("true".equals(System.getProperty("dubbo.network.hostname.first"))) {
try {
localAddress = InetAddress.getLocalHost();
Optional<InetAddress> addressOp = toValidAddress(localAddress);
if (addressOp.isPresent()) {
return addressOp.get();
}
} catch (Throwable e) {
logger.warn(e);
}
}
//以上代码放在后面可能没有机会执行了。
// @since 2.7.6, choose the {@link NetworkInterface} first
try {
NetworkInterface networkInterface = findNetworkInterface();
Enumeration<InetAddress> addresses = networkInterface.getInetAddresses();
while (addresses.hasMoreElements()) {
Optional<InetAddress> addressOp = toValidAddress(addresses.nextElement());
if (addressOp.isPresent()) {
try {
if (addressOp.get().isReachable(100)) {
return addressOp.get();
}
} catch (IOException e) {
// ignore
}
}
}
} catch (Throwable e) {
logger.warn(e);
}
return localAddress;
}
</code></pre></div> | <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/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/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.6-SNAPSHOT(aliyun maven镜像,也用源码的 2.7.6.release分支测试过)</li>
<li>Operating System version: win10</li>
<li>Java version: 1.8.0_171</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">测试代码:<a href="https://github.com/apache/dubbo-samples/tree/master/java/dubbo-samples-nacos/dubbo-samples-nacos-registry">https://github.com/apache/dubbo-samples/tree/master/java/dubbo-samples-nacos/dubbo-samples-nacos-registry</a></p>
<p dir="auto">dubbo版本修改为"2.7.6.SNAPSHOT"</p>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">(IP地址手动改成了 127.0.0.1)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'annotatedConsumer': Injection of @Reference dependencies is failed; nested exception is java.lang.IllegalStateException: Failed to check the status of the service org.apache.dubbo.samples.api.GreetingService. No provider available for the service org.apache.dubbo.samples.api.GreetingService:1.0.0 from the url nacos://localhost:8848/org.apache.dubbo.registry.RegistryService?application=nacos-registry-demo-consumer&dubbo=2.0.2&init=false&interface=org.apache.dubbo.samples.api.GreetingService&methods=sayHello&pid=19028&register.ip=127.0.0.1&release=2.7.6-SNAPSHOT&revision=1.0.0&side=consumer&sticky=false&timeout=3000&timestamp=1584584637337&version=1.0.0 to the consumer 127.0.0.1 use dubbo version 2.7.6-SNAPSHOT
at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:146)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1268)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:84)
at org.apache.dubbo.samples.ConsumerBootstrap.main(ConsumerBootstrap.java:32)
Caused by: java.lang.IllegalStateException: Failed to check the status of the service org.apache.dubbo.samples.api.GreetingService. No provider available for the service org.apache.dubbo.samples.api.GreetingService:1.0.0 from the url nacos://localhost:8848/org.apache.dubbo.registry.RegistryService?application=nacos-registry-demo-consumer&dubbo=2.0.2&init=false&interface=org.apache.dubbo.samples.api.GreetingService&methods=sayHello&pid=19028&register.ip=127.0.0.1&release=2.7.6-SNAPSHOT&revision=1.0.0&side=consumer&sticky=false&timeout=3000&timestamp=1584584637337&version=1.0.0 to the consumer 127.0.0.1 use dubbo version 2.7.6-SNAPSHOT
at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:349)
at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:258)
at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:158)
at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.getOrCreateProxy(ReferenceAnnotationBeanPostProcessor.java:274)
at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.doGetInjectedBean(ReferenceAnnotationBeanPostProcessor.java:143)
at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.getInjectedObject(AbstractAnnotationBeanPostProcessor.java:359)
at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor$AnnotatedFieldElement.inject(AbstractAnnotationBeanPostProcessor.java:539)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:142)
... 12 more"><pre class="notranslate"><code class="notranslate">Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'annotatedConsumer': Injection of @Reference dependencies is failed; nested exception is java.lang.IllegalStateException: Failed to check the status of the service org.apache.dubbo.samples.api.GreetingService. No provider available for the service org.apache.dubbo.samples.api.GreetingService:1.0.0 from the url nacos://localhost:8848/org.apache.dubbo.registry.RegistryService?application=nacos-registry-demo-consumer&dubbo=2.0.2&init=false&interface=org.apache.dubbo.samples.api.GreetingService&methods=sayHello&pid=19028&register.ip=127.0.0.1&release=2.7.6-SNAPSHOT&revision=1.0.0&side=consumer&sticky=false&timeout=3000&timestamp=1584584637337&version=1.0.0 to the consumer 127.0.0.1 use dubbo version 2.7.6-SNAPSHOT
at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:146)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1268)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:84)
at org.apache.dubbo.samples.ConsumerBootstrap.main(ConsumerBootstrap.java:32)
Caused by: java.lang.IllegalStateException: Failed to check the status of the service org.apache.dubbo.samples.api.GreetingService. No provider available for the service org.apache.dubbo.samples.api.GreetingService:1.0.0 from the url nacos://localhost:8848/org.apache.dubbo.registry.RegistryService?application=nacos-registry-demo-consumer&dubbo=2.0.2&init=false&interface=org.apache.dubbo.samples.api.GreetingService&methods=sayHello&pid=19028&register.ip=127.0.0.1&release=2.7.6-SNAPSHOT&revision=1.0.0&side=consumer&sticky=false&timeout=3000&timestamp=1584584637337&version=1.0.0 to the consumer 127.0.0.1 use dubbo version 2.7.6-SNAPSHOT
at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:349)
at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:258)
at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:158)
at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.getOrCreateProxy(ReferenceAnnotationBeanPostProcessor.java:274)
at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.doGetInjectedBean(ReferenceAnnotationBeanPostProcessor.java:143)
at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.getInjectedObject(AbstractAnnotationBeanPostProcessor.java:359)
at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor$AnnotatedFieldElement.inject(AbstractAnnotationBeanPostProcessor.java:539)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:142)
... 12 more
</code></pre></div>
<h3 dir="auto">备注</h3>
<ol dir="auto">
<li>
<p dir="auto">nacos中已存在 provider注册的服务 serviceName = "providers:org.apache.dubbo.samples.api.GreetingService:1.0.0:"</p>
</li>
<li>
<p dir="auto">启动consumer时,<code class="notranslate">NacosRegistry#doSubscribe(...)</code>为了兼容会创建2个 serviceNames</p>
</li>
</ol>
<ul dir="auto">
<li>providers:org.apache.dubbo.samples.api.GreetingService:1.0.0:</li>
<li>providers:org.apache.dubbo.samples.api.GreetingService:1.0.0</li>
</ul>
<p dir="auto">并且进行了 <code class="notranslate">NacosRegistry#subscribeEventListener(...)</code> 监听和订阅 nacos。</p>
<p dir="auto">但是因为 provider 其实并不存在 <code class="notranslate">providers:org.apache.dubbo.samples.api.GreetingService:1.0.0</code>,<br>
所以(nacos 回调的 instances = 0)<code class="notranslate">NacosRegistry#notifySubscriber(URL , NotifyListener , Collection<Instance> )</code>中会创建一个 empty 的 protocol。<br>
又因为只有1个provider,所以<code class="notranslate">RegistryDirectory#refreshInvoker()</code>中满足了 forbidden 的条件,所以invokers被destroy....</p> | 0 |
<p dir="auto">Thank you for the amazing work.</p>
<p dir="auto">I am using Tensorboard to visualize my training, and it works just fine.</p>
<p dir="auto">But when I need to change the frequency of loss scalers, I can't find api to do this. I want to more scalers log, maybe log end of every batch. Now I can only get one log during an epoch. Thanks a lot.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tensorboard_callback = TensorBoard(log_dir = log_dir,
histogram_freq = 1,
write_graph = True,
write_images = False,
embeddings_freq = embeddings_freq,
embeddings_layer_names = None,
embeddings_metadata = "w2v_metadata.tsv")"><pre class="notranslate"><code class="notranslate">tensorboard_callback = TensorBoard(log_dir = log_dir,
histogram_freq = 1,
write_graph = True,
write_images = False,
embeddings_freq = embeddings_freq,
embeddings_layer_names = None,
embeddings_metadata = "w2v_metadata.tsv")
</code></pre></div>
<ul class="contains-task-list">
<li>
<p dir="auto">[x ] Check that you are up-to-date with the master branch of Keras. You can update with:<br>
pip install git+git://github.com/fchollet/keras.git --upgrade --no-deps</p>
</li>
<li>
<p dir="auto">[x ] If running on TensorFlow, check that you are up-to-date with the latest version. The installation instructions can be found <a href="https://www.tensorflow.org/get_started/os_setup" rel="nofollow">here</a>.</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:<br>
pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).</p>
</li>
</ul> | <p dir="auto">Please make sure that the boxes below are checked before you submit your issue. If your issue is an implementation question, please ask your question on <a href="http://stackoverflow.com/questions/tagged/keras" rel="nofollow">StackOverflow</a> or <a href="https://keras-slack-autojoin.herokuapp.com/" rel="nofollow">join the Keras Slack channel</a> and ask there instead of filing a GitHub issue.</p>
<p dir="auto">Thank you!</p>
<ul class="contains-task-list">
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Check that you are up-to-date with the master branch of Keras. You can update with:<br>
pip install git+git://github.com/fchollet/keras.git --upgrade --no-deps</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:<br>
pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).</p>
</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from keras.layers.wrappers import Bidirectional
from keras.layers import LSTM, Dense, Input
from keras.models import Model
import numpy as np
data=np.random.rand(1,5,10)
label=np.asarray([[1,0,0]])
inp = Input(shape=data.shape[1:])
x = Bidirectional(LSTM(units=32,recurrent_dropout=0.5))(inp)
x = Dense(3,activation='softmax')(x)
model = Model(input=inp, output=x)
model.compile(loss='binary_crossentropy',
optimizer='adam',
metrics=['accuracy'])
model.fit(data, label, epochs=1)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">keras</span>.<span class="pl-s1">layers</span>.<span class="pl-s1">wrappers</span> <span class="pl-k">import</span> <span class="pl-v">Bidirectional</span>
<span class="pl-k">from</span> <span class="pl-s1">keras</span>.<span class="pl-s1">layers</span> <span class="pl-k">import</span> <span class="pl-v">LSTM</span>, <span class="pl-v">Dense</span>, <span class="pl-v">Input</span>
<span class="pl-k">from</span> <span class="pl-s1">keras</span>.<span class="pl-s1">models</span> <span class="pl-k">import</span> <span class="pl-v">Model</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-s1">data</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">rand</span>(<span class="pl-c1">1</span>,<span class="pl-c1">5</span>,<span class="pl-c1">10</span>)
<span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-en">asarray</span>([[<span class="pl-c1">1</span>,<span class="pl-c1">0</span>,<span class="pl-c1">0</span>]])
<span class="pl-s1">inp</span> <span class="pl-c1">=</span> <span class="pl-v">Input</span>(<span class="pl-s1">shape</span><span class="pl-c1">=</span><span class="pl-s1">data</span>.<span class="pl-s1">shape</span>[<span class="pl-c1">1</span>:])
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-v">Bidirectional</span>(<span class="pl-v">LSTM</span>(<span class="pl-s1">units</span><span class="pl-c1">=</span><span class="pl-c1">32</span>,<span class="pl-s1">recurrent_dropout</span><span class="pl-c1">=</span><span class="pl-c1">0.5</span>))(<span class="pl-s1">inp</span>)
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-v">Dense</span>(<span class="pl-c1">3</span>,<span class="pl-s1">activation</span><span class="pl-c1">=</span><span class="pl-s">'softmax'</span>)(<span class="pl-s1">x</span>)
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-v">Model</span>(<span class="pl-s1">input</span><span class="pl-c1">=</span><span class="pl-s1">inp</span>, <span class="pl-s1">output</span><span class="pl-c1">=</span><span class="pl-s1">x</span>)
<span class="pl-s1">model</span>.<span class="pl-en">compile</span>(<span class="pl-s1">loss</span><span class="pl-c1">=</span><span class="pl-s">'binary_crossentropy'</span>,
<span class="pl-s1">optimizer</span><span class="pl-c1">=</span><span class="pl-s">'adam'</span>,
<span class="pl-s1">metrics</span><span class="pl-c1">=</span>[<span class="pl-s">'accuracy'</span>])
<span class="pl-s1">model</span>.<span class="pl-en">fit</span>(<span class="pl-s1">data</span>, <span class="pl-s1">label</span>, <span class="pl-s1">epochs</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)</pre></div>
<p dir="auto">Above code gives the following error, If I remove <code class="notranslate">recurrent_dropout=0.5</code> it trains without error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MissingInputError: Input 0 of the graph (indices start from 0), used to compute if{}(keras_learning_phase, Elemwise{true_div,no_inplace}.0, Reshape{2}.0), was not provided and not given a value. Use the Theano flag exception_verbosity='high', for more information on this error.
Backtrace when that variable is created:
File "<ipython-input-1-aa27b7e1da0a>", line 1, in <module>
runfile('/home/bozkurt.a/DEJ/train_lstm_seq.py', wdir='/home/bozkurt.a/DEJ')
File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile
execfile(filename, namespace)
File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile
builtins.execfile(filename, *where)
File "/home/bozkurt.a/DEJ/train_lstm_seq.py", line 11, in <module>
from keras.models import Model
File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/__init__.py", line 3, in <module>
from . import activations
File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/activations.py", line 3, in <module>
from . import backend as K
File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/backend/__init__.py", line 61, in <module>
from .theano_backend import *
File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/backend/theano_backend.py", line 28, in <module>
_LEARNING_PHASE = T.scalar(dtype='uint8', name='keras_learning_phase') # 0 = test, 1 = train"><pre class="notranslate"><code class="notranslate">MissingInputError: Input 0 of the graph (indices start from 0), used to compute if{}(keras_learning_phase, Elemwise{true_div,no_inplace}.0, Reshape{2}.0), was not provided and not given a value. Use the Theano flag exception_verbosity='high', for more information on this error.
Backtrace when that variable is created:
File "<ipython-input-1-aa27b7e1da0a>", line 1, in <module>
runfile('/home/bozkurt.a/DEJ/train_lstm_seq.py', wdir='/home/bozkurt.a/DEJ')
File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile
execfile(filename, namespace)
File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile
builtins.execfile(filename, *where)
File "/home/bozkurt.a/DEJ/train_lstm_seq.py", line 11, in <module>
from keras.models import Model
File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/__init__.py", line 3, in <module>
from . import activations
File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/activations.py", line 3, in <module>
from . import backend as K
File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/backend/__init__.py", line 61, in <module>
from .theano_backend import *
File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/backend/theano_backend.py", line 28, in <module>
_LEARNING_PHASE = T.scalar(dtype='uint8', name='keras_learning_phase') # 0 = test, 1 = train
</code></pre></div> | 0 |
<p dir="auto">It parses <code class="notranslate">&bull;</code> in html as <code class="notranslate">ÔÇó</code>:</p>
<p dir="auto">The following is from the output of a test that should pass:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'phpBB ÔÇó Free and Open Source Forum Software'
+'phpBB &bull; Free and Open Source Forum Software'"><pre class="notranslate"><code class="notranslate">Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'phpBB ÔÇó Free and Open Source Forum Software'
+'phpBB &bull; Free and Open Source Forum Software'
</code></pre></div> | <p dir="auto">Currently, adders and removers must be prefixed with "add" and "remove". When applying DDD, this sometimes doesn't make sense, for example:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Contact
{
public function addGroup(ContactGroup $group) { }
public function removeGroup(ContactGroup $group) { }
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Contact</span>
{
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">addGroup</span>(<span class="pl-smi"><span class="pl-smi">ContactGroup</span></span> <span class="pl-s1"><span class="pl-c1">$</span>group</span>) { }
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">removeGroup</span>(<span class="pl-smi"><span class="pl-smi">ContactGroup</span></span> <span class="pl-s1"><span class="pl-c1">$</span>group</span>) { }
}</pre></div>
<p dir="auto">Here it would make much more sense to prefix the methods with "join" and "leave":</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Contact
{
public function joinGroup(ContactGroup $group) { }
public function leaveGroup(ContactGroup $group) { }
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Contact</span>
{
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">joinGroup</span>(<span class="pl-smi"><span class="pl-smi">ContactGroup</span></span> <span class="pl-s1"><span class="pl-c1">$</span>group</span>) { }
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">leaveGroup</span>(<span class="pl-smi"><span class="pl-smi">ContactGroup</span></span> <span class="pl-s1"><span class="pl-c1">$</span>group</span>) { }
}</pre></div>
<p dir="auto">The PropertyAccessor should provide a way to use these methods.</p> | 0 |
<p dir="auto">I am getting error</p>
<blockquote>
<p dir="auto">Could not find "store" in either the context or props of "Connect(Base)". Either wrap the root component in a , or explicitly pass "store" as a prop to "Connect(Base)".</p>
</blockquote>
<p dir="auto">while connecting template component with redux. This seems like it worked in previous version.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">Template component connects to Redux successfully.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Getting error: <code class="notranslate">Could not find "store" in either the context or props of "Connect(Base)". Either wrap the root component in a <Provider>, or explicitly pass "store" as a prop to "Connect(Base)".</code></p>
<p dir="auto">If I wrap root component with <code class="notranslate"><Provider></code> from 'react-redux`, it throws error that it expects object, not a function.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">store.js</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const initStore = (initialState = {}) => {
createStore(
combineReducers({ someReducer, otherReducer }),
initialState,
composeWithDevTools(
applyMiddleware(thunkMiddleware),
))
}"><pre class="notranslate"><code class="notranslate">const initStore = (initialState = {}) => {
createStore(
combineReducers({ someReducer, otherReducer }),
initialState,
composeWithDevTools(
applyMiddleware(thunkMiddleware),
))
}
</code></pre></div>
<p dir="auto">template.js</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class Base extends React.Component {
...
render(){
return (
<div>
{this.props.children}
</div>
)
}
}
...
export default withRedux(Store, mapStateToProps, mapDispatchToProps)(Base)"><pre class="notranslate"><code class="notranslate">class Base extends React.Component {
...
render(){
return (
<div>
{this.props.children}
</div>
)
}
}
...
export default withRedux(Store, mapStateToProps, mapDispatchToProps)(Base)
</code></pre></div>
<p dir="auto">./pages/index.js</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import Template from 'Templates/Base'
export default class Index extends React.Component {
render(){
return (
<Template>
{'index'}
</Template>
)
}
}"><pre class="notranslate"><code class="notranslate">import Template from 'Templates/Base'
export default class Index extends React.Component {
render(){
return (
<Template>
{'index'}
</Template>
)
}
}
</code></pre></div>
<h2 dir="auto">Context</h2>
<p dir="auto">I am wrapping all pages in template component which includes methods and components that are reused among all pages.</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>"^3.0.1-beta.20"</td>
</tr>
<tr>
<td>node</td>
<td>6.10.2</td>
</tr>
<tr>
<td>OS</td>
<td>Ubuntu/Linux</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome 60</td>
</tr>
</tbody>
</table> | <p dir="auto">Regrading webpack allow array of config as input, this <code class="notranslate">next.config.js</code> crashes <code class="notranslate">yarn dev</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="module.exports = {
webpack: (config, { dev }) => {
return [config];
},
};"><pre class="notranslate"><code class="notranslate">module.exports = {
webpack: (config, { dev }) => {
return [config];
},
};
</code></pre></div>
<p dir="auto">Console output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" DONE Compiled successfully in 3232ms 12:18:49
(node:4702) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'chunks' of undefined
(node:4702) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:4702) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'chunks' of undefined"><pre class="notranslate"><code class="notranslate"> DONE Compiled successfully in 3232ms 12:18:49
(node:4702) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'chunks' of undefined
(node:4702) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:4702) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'chunks' of undefined
</code></pre></div>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">Should work as normal</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Throw an UnhandledPromiseRejectionWarning, the app doesn't work.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Create a new next app.</li>
<li>Add <code class="notranslate">next.config.js</code> with following content:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="module.exports = {
webpack: (config, { dev }) => {
return [config];
},
};"><pre class="notranslate"><code class="notranslate">module.exports = {
webpack: (config, { dev }) => {
return [config];
},
};
</code></pre></div>
<ol start="3" dir="auto">
<li>Run <code class="notranslate">yarn dev</code></li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">I was trying to transpile custom server code using next's webpack config.</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>3.0.3</td>
</tr>
<tr>
<td>node</td>
<td>v8.1.0</td>
</tr>
<tr>
<td>OS</td>
<td>macOS Sierra 10.12.6 (16G29)</td>
</tr>
</tbody>
</table> | 0 |
<h3 dir="auto">Model description</h3>
<p dir="auto">LayoutLMv3 is a pre-trained multimodal Transformer for Document AI with unified text and image masking. The simple unified architecture and training objectives make LayoutLMv3 a general-purpose pre-trained model. For example, LayoutLMv3 can be fine-tuned for both text-centric tasks, including form understanding, receipt understanding, and document visual question answering, and image-centric tasks such as document image classification and document layout analysis.</p>
<p dir="auto">LayoutLMv3 greatly simplifies training and reduces the number of parameters compared to v3, making it an important milestone in document understanding.</p>
<p dir="auto"><a href="https://arxiv.org/abs/2204.08387" rel="nofollow">LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking</a> Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, Furu Wei, Preprint 2022.</p>
<h3 dir="auto">Open source status</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> The model implementation is available</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> The model weights are available</li>
</ul>
<h3 dir="auto">Provide useful links for the implementation</h3>
<p dir="auto"><a href="https://huggingface.co/microsoft/layoutlmv3-base" rel="nofollow">Huggingface Pretrained Download</a></p> | <h2 dir="auto">❓ Questions & Help</h2>
<p dir="auto">The BertForQuestionAnswering sample code creates duplicate [CLS] tokens. Wondering why:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
model = BertForQuestionAnswering.from_pretrained('bert-large-uncased-whole-word-masking-finetuned-squad')
question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"
input_text = "[CLS] " + question + " [SEP] " + text + " [SEP]"
input_ids = tokenizer.encode(input_text)
token_type_ids = [0 if i <= input_ids.index(102) else 1 for i in range(len(input_ids))]
start_scores, end_scores = model(torch.tensor([input_ids]), token_type_ids=torch.tensor([token_type_ids]))
all_tokens = tokenizer.convert_ids_to_tokens(input_ids)
print(' '.join(all_tokens[torch.argmax(start_scores) : torch.argmax(end_scores)+1]))
# a nice puppet
tokenizer.decode(input_ids)
#'[CLS] [CLS] who was jim henson? [SEP] jim henson was a nice puppet [SEP] [SEP]' "><pre class="notranslate"><code class="notranslate">tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
model = BertForQuestionAnswering.from_pretrained('bert-large-uncased-whole-word-masking-finetuned-squad')
question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"
input_text = "[CLS] " + question + " [SEP] " + text + " [SEP]"
input_ids = tokenizer.encode(input_text)
token_type_ids = [0 if i <= input_ids.index(102) else 1 for i in range(len(input_ids))]
start_scores, end_scores = model(torch.tensor([input_ids]), token_type_ids=torch.tensor([token_type_ids]))
all_tokens = tokenizer.convert_ids_to_tokens(input_ids)
print(' '.join(all_tokens[torch.argmax(start_scores) : torch.argmax(end_scores)+1]))
# a nice puppet
tokenizer.decode(input_ids)
#'[CLS] [CLS] who was jim henson? [SEP] jim henson was a nice puppet [SEP] [SEP]'
</code></pre></div>
<p dir="auto">If I remove the extra [CLS], the extraction doesn't work. It's exactly two tokens off:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="input_ids = tokenizer.encode(input_text, add_special_tokens=False)
...rerun same code as above...
print(' '.join(all_tokens[torch.argmax(start_scores) : torch.argmax(end_scores)+1]))
# was a"><pre class="notranslate"><code class="notranslate">input_ids = tokenizer.encode(input_text, add_special_tokens=False)
...rerun same code as above...
print(' '.join(all_tokens[torch.argmax(start_scores) : torch.argmax(end_scores)+1]))
# was a
</code></pre></div>
<p dir="auto">What am I doing wrong? How can I get the extraction working without duplicate [CLS] tokens? (and duplicate final [SEP] tokens BTW).</p>
<p dir="auto">The sample code comes right from the docs: <a href="https://huggingface.co/transformers/model_doc/bert.html#bertforquestionanswering" rel="nofollow">https://huggingface.co/transformers/model_doc/bert.html#bertforquestionanswering</a></p> | 0 |
<p dir="auto">Using a session object and setting the proxies dictionary does not affect the proxies used during a request.</p>
<p dir="auto">ex: Still tries to use system proxy.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="s = requests.Session()
s.proxies = {'http': None, 'https': None}
s.post(url='http://10.0.1.1', json={'test': 'data'})"><pre class="notranslate"><code class="notranslate">s = requests.Session()
s.proxies = {'http': None, 'https': None}
s.post(url='http://10.0.1.1', json={'test': 'data'})
</code></pre></div>
<p dir="auto">Using proxies during each request works, but it would be great to set them at the session level. Specifically if you potentially have dozens or ".post()" or ".get()" calls throughout your script.</p>
<p dir="auto">Any thoughts?</p> | <p dir="auto"><code class="notranslate">Session.trust_env = False</code> turns off the checking of environment variables for options including proxy settings (<code class="notranslate">*_proxy</code>). But <code class="notranslate">urllib</code> picks up and uses these environment proxy settings anyway. <code class="notranslate">requests</code> should pass the <code class="notranslate">trust_env</code> setting on to <code class="notranslate">urllib</code>. (Although I'm not sure if <code class="notranslate">urllib</code> has a similar override.)</p>
<p dir="auto">(Proxy setting precedence should be sorted out here as well. They way it is now, environment proxy settings will interfere with (rather than be over-ridden by) the <code class="notranslate">proxies</code> argument in <code class="notranslate">Session.request</code> or <code class="notranslate">requests.request</code> calls and the <code class="notranslate">Session.proxies</code> config regardless of <code class="notranslate">trust_env</code> settings.)</p> | 1 |
<p dir="auto">Unzip the arm prebuilt on arm linux system. Ran all Math functions and the results are shown here. The functions in red return incorrect results. We've noticed this issue all the way back to 0.32.x. 0.29.2 does not have these issues.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1995486/12953782/e784561a-cfe9-11e5-9a3a-ad0e98a8020d.png"><img src="https://cloud.githubusercontent.com/assets/1995486/12953782/e784561a-cfe9-11e5-9a3a-ad0e98a8020d.png" alt="image" style="max-width: 100%;"></a></p> | <p dir="auto">I'm using this electron: <a href="https://github.com/atom/electron/releases/download/v0.35.4/electron-v0.35.4-linux-arm.zip">https://github.com/atom/electron/releases/download/v0.35.4/electron-v0.35.4-linux-arm.zip</a></p>
<p dir="auto"><a href="https://github.com/dcodeIO/long.js">Long.js</a> library returns different result on Raspberry Pi 2 for the following <a href="https://github.com/bartekn/electron-long-bug/blob/master/resources/app/index.html#L10">js code</a>:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Long.fromString("13370000000").toString()"><pre class="notranslate"><span class="pl-v">Long</span><span class="pl-kos">.</span><span class="pl-en">fromString</span><span class="pl-kos">(</span><span class="pl-s">"13370000000"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toString</span><span class="pl-kos">(</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">I've created proof-of-concept repo here: <a href="https://github.com/bartekn/electron-long-bug">https://github.com/bartekn/electron-long-bug</a>.</p>
<p dir="auto">The problem seems to be connected with <a href="https://github.com/bartekn/electron-long-bug/blob/master/resources/app/node_modules/long/dist/Long.js#L178">this line</a> in Long.js:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="return new Long((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);"><pre class="notranslate"><code class="notranslate">return new Long((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);
</code></pre></div>
<p dir="auto">When value of <code class="notranslate">value</code> variable is equal <code class="notranslate">13370000000</code>, the first value passed to <code class="notranslate">Long</code> constructor (<code class="notranslate">(value % TWO_PWR_32_DBL) | 0</code>) is equal <code class="notranslate">0</code> on Raspberry Pi, while it's equal <code class="notranslate">485098112</code> on Mac OS (the correct value).</p>
<p dir="auto">When trying to calculate <code class="notranslate">13370000000%4294967296</code> (<code class="notranslate">TWO_PWR_32_DBL</code>=4294967296) in the chrome dev tools console on Raspberry Pi 2 it returns correct result (<code class="notranslate">485098112</code>).</p>
<p dir="auto">I'm not sure if it's a problem of electron or libchromiumcontent, sorry.</p> | 1 |
<p dir="auto">Piping ReadableStream through TextDecoderStream leaks resource as demonstrated with following test:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Deno.test("leaks", async () => {
const res = await fetch(
"https://deno.land/std@0.186.0/json/testdata/test.jsonl"
)
const textStream = new TextDecoderStream()
const reader = res.body!.pipeThrough(textStream).getReader()
const t = await reader.read()
await reader!.cancel()
})"><pre class="notranslate"><span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">"leaks"</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">=></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-en">fetch</span><span class="pl-kos">(</span>
<span class="pl-s">"https://deno.land/std@0.186.0/json/testdata/test.jsonl"</span>
<span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">textStream</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">TextDecoderStream</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">reader</span> <span class="pl-c1">=</span> <span class="pl-s1">res</span><span class="pl-kos">.</span><span class="pl-c1">body</span><span class="pl-c1">!</span><span class="pl-kos">.</span><span class="pl-en">pipeThrough</span><span class="pl-kos">(</span><span class="pl-s1">textStream</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">getReader</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">t</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">reader</span><span class="pl-kos">.</span><span class="pl-en">read</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-k">await</span> <span class="pl-s1">reader</span><span class="pl-c1">!</span><span class="pl-kos">.</span><span class="pl-en">cancel</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">Run <code class="notranslate">deno test stream-test.ts</code> and you will get:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: Leaking resources:
- A text decoder (rid 6) was created during the test, but not finished during the test. Close the text decoder by calling `textDecoder.decode('')` or `await textDecoderStream.readable.cancel()`."><pre class="notranslate"><code class="notranslate">error: Leaking resources:
- A text decoder (rid 6) was created during the test, but not finished during the test. Close the text decoder by calling `textDecoder.decode('')` or `await textDecoderStream.readable.cancel()`.
</code></pre></div>
<p dir="auto">Adding <code class="notranslate">await t.readable.cancel()</code> as error message suggested does not help.</p>
<p dir="auto">A following solution with manual decoding works properly:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Deno.test("working alternative", async () => {
const res = await fetch(
"https://deno.land/std@0.186.0/json/testdata/test.jsonl"
)
const textDecoder = new TextDecoder()
const reader = res.body!.getReader()
const b = await reader.read()
const t = await textDecoder.decode(b.value!)
await reader.cancel()
})"><pre class="notranslate"><span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">"working alternative"</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">=></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-en">fetch</span><span class="pl-kos">(</span>
<span class="pl-s">"https://deno.land/std@0.186.0/json/testdata/test.jsonl"</span>
<span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">textDecoder</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">TextDecoder</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">reader</span> <span class="pl-c1">=</span> <span class="pl-s1">res</span><span class="pl-kos">.</span><span class="pl-c1">body</span><span class="pl-c1">!</span><span class="pl-kos">.</span><span class="pl-en">getReader</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">reader</span><span class="pl-kos">.</span><span class="pl-en">read</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">t</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">textDecoder</span><span class="pl-kos">.</span><span class="pl-en">decode</span><span class="pl-kos">(</span><span class="pl-s1">b</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-c1">!</span><span class="pl-kos">)</span>
<span class="pl-k">await</span> <span class="pl-s1">reader</span><span class="pl-kos">.</span><span class="pl-en">cancel</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">I spent whole evening last night to make it work and ended up with latter piece. Shouldn't closing initial stream also close all subsequent ones? Either way, closing readable TextDecoderStream doesn't work too.</p>
<p dir="auto">Deno version: 1.33.2 and 1.33.1</p> | <p dir="auto">When configuring a server with a cloudflare origin server certificate, it works perfectly when you visit the site using the url with https:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17011087/82387270-31879980-99fc-11ea-8ab7-f76f8054b7ae.png"><img src="https://user-images.githubusercontent.com/17011087/82387270-31879980-99fc-11ea-8ab7-f76f8054b7ae.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">But when directly visiting the server IP using https the process stops on the server with the following error:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17011087/82387291-3c422e80-99fc-11ea-9b27-3fe221234b78.png"><img src="https://user-images.githubusercontent.com/17011087/82387291-3c422e80-99fc-11ea-9b27-3fe221234b78.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Would it be possible to ignore that error so that the server continues to run?<br>
The connection may close or return an error message, but the server should continue to listen to other requests.</p>
<p dir="auto">I hope you have a solution! regards</p> | 0 |
<h2 dir="auto">Environment info</h2>
<ul dir="auto">
<li><code class="notranslate">transformers</code> version: 4.2.2</li>
<li>Platform: Linux-4.15.0-45-generic-x86_64-with-glibc2.10</li>
<li>Python version: 3.8.3</li>
<li>PyTorch version (GPU?): 1.6.0 (True)</li>
<li>Tensorflow version (GPU?): not installed (NA)</li>
<li>Using GPU in script?: No</li>
<li>Using distributed or parallel set-up in script?: No</li>
</ul>
<h3 dir="auto">Who can help</h3>
<h2 dir="auto">Information</h2>
<p dir="auto">Model I am using (Bert, XLNet ...):</p>
<p dir="auto">The problem arises when using:</p>
<ul dir="auto">
<li>my own modified scripts: (give details below)</li>
</ul>
<p dir="auto">The tasks I am working on is:</p>
<ul dir="auto">
<li>my own task or dataset: (give details below)</li>
</ul>
<h2 dir="auto">To reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<ol dir="auto">
<li>The code
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
words = ['(cid:3)', '하셨습니까', '하다']
tokenizer.batch_encode_plus(
[words],
max_length=512,
truncation=True,
padding=True,
is_split_into_words=True,
return_offsets_mapping=True,
return_special_tokens_mask=True,
return_tensors="pt",
)"><pre class="notranslate"><code class="notranslate">from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
words = ['(cid:3)', '하셨습니까', '하다']
tokenizer.batch_encode_plus(
[words],
max_length=512,
truncation=True,
padding=True,
is_split_into_words=True,
return_offsets_mapping=True,
return_special_tokens_mask=True,
return_tensors="pt",
)
</code></pre></div>
</li>
<li>The <code class="notranslate">offset_mapping</code> in the output is
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="tensor([[[0, 0], # [CLS]
[0, 1], # for '('
[1, 4], # for 'cid'
[4, 5], # for ':'
[5, 6], # for '3'
[6, 7], # for ')'
[0, 5], # for '하셨습니까'
[0, 1], # for '하'
[0, 1], # for '하'
[1, 2], # for '다'
[1, 2], # for '다'
[0, 0]]])"><pre class="notranslate"><span class="pl-en">tensor</span>([[[<span class="pl-c1">0</span>, <span class="pl-c1">0</span>], <span class="pl-c"># [CLS]</span>
[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>], <span class="pl-c"># for '('</span>
[<span class="pl-c1">1</span>, <span class="pl-c1">4</span>], <span class="pl-c"># for 'cid'</span>
[<span class="pl-c1">4</span>, <span class="pl-c1">5</span>], <span class="pl-c"># for ':'</span>
[<span class="pl-c1">5</span>, <span class="pl-c1">6</span>], <span class="pl-c"># for '3'</span>
[<span class="pl-c1">6</span>, <span class="pl-c1">7</span>], <span class="pl-c"># for ')'</span>
[<span class="pl-c1">0</span>, <span class="pl-c1">5</span>], <span class="pl-c"># for '하셨습니까'</span>
[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>], <span class="pl-c"># for '하'</span>
[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>], <span class="pl-c"># for '하'</span>
[<span class="pl-c1">1</span>, <span class="pl-c1">2</span>], <span class="pl-c"># for '다'</span>
[<span class="pl-c1">1</span>, <span class="pl-c1">2</span>], <span class="pl-c"># for '다'</span>
[<span class="pl-c1">0</span>, <span class="pl-c1">0</span>]]])</pre></div>
</li>
<li>As you could find, it generates four tokens for <code class="notranslate">하다</code>. The output is correct according to Byte pair encoding. However, it generates duplicated <code class="notranslate">[0,1]</code> and <code class="notranslate">[1,2]</code>s, which changes the structure of the outputs (for regular tokens, it can only have one <code class="notranslate">[0,x]</code>, which can be used to project the encoded tokens back to their original positions). Therefore, we need extra indicators for positions where Byte-pair encoding is used.</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<ol dir="auto">
<li>An additional output showing the mapping for input_ids -> original_token_ids . In this case, it should be something like:
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[0, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3 0]"><pre class="notranslate"><code class="notranslate">[0, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3 0]
</code></pre></div>
</li>
</ol>
<p dir="auto">Therefore, we could use this map to figure out byte code embedding is used for the 3rd token.</p>
<p dir="auto">Updated - <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/n1t0/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/n1t0">@n1t0</a></p> | <h2 dir="auto">Environment info</h2>
<ul dir="auto">
<li><code class="notranslate">transformers</code> version: 4.12.2</li>
<li>Platform: Linux-5.4.0-87-generic-x86_64-with-glibc2.10</li>
<li>Python version: 3.8.8</li>
<li>PyTorch version (GPU?): 1.9.1+cu111 (True)</li>
<li>Tensorflow version (GPU?): not installed (NA)</li>
<li>Flax version (CPU?/GPU?/TPU?): not installed (NA)</li>
<li>Jax version: not installed</li>
<li>JaxLib version: not installed</li>
<li>Using GPU in script?: Yes</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>
<h2 dir="auto">Information</h2>
<p dir="auto">Model I am using (Bert, XLNet ...): BertLMHeadModel</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">Steps to reproduce the behavior:</p>
<ol dir="auto">
<li>Instantiate a BertLMHeadModel. The model contains, among others, a linear layer under the path <code class="notranslate">cls.predictions.decoder </code>. Specifically, it contains 2 parameters: <code class="notranslate">cls.predictions.decoder.weight</code> and <code class="notranslate">cls.predictions.decoder.bias</code>.</li>
</ol>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("bert-base-uncased", is_decoder=True)
print(model.cls.predictions.decoder)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">transformers</span> <span class="pl-k">import</span> <span class="pl-v">AutoModelForCausalLM</span>
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-v">AutoModelForCausalLM</span>.<span class="pl-en">from_pretrained</span>(<span class="pl-s">"bert-base-uncased"</span>, <span class="pl-s1">is_decoder</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-en">print</span>(<span class="pl-s1">model</span>.<span class="pl-s1">cls</span>.<span class="pl-s1">predictions</span>.<span class="pl-s1">decoder</span>)</pre></div>
<ol start="2" dir="auto">
<li>Get a list of model parameters.</li>
</ol>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="parameter_keys = list(dict(model.named_parameters()).keys())"><pre class="notranslate"><span class="pl-s1">parameter_keys</span> <span class="pl-c1">=</span> <span class="pl-en">list</span>(<span class="pl-en">dict</span>(<span class="pl-s1">model</span>.<span class="pl-en">named_parameters</span>()).<span class="pl-en">keys</span>())</pre></div>
<ol start="3" dir="auto">
<li>The decoder parameters are missing.</li>
</ol>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="print("cls.predictions.decoder.weight" in parameter_keys)
print("cls.predictions.decoder.bias" in parameter_keys)"><pre class="notranslate"><span class="pl-en">print</span>(<span class="pl-s">"cls.predictions.decoder.weight"</span> <span class="pl-c1">in</span> <span class="pl-s1">parameter_keys</span>)
<span class="pl-en">print</span>(<span class="pl-s">"cls.predictions.decoder.bias"</span> <span class="pl-c1">in</span> <span class="pl-s1">parameter_keys</span>)</pre></div>
<ol start="4" dir="auto">
<li>Note that the parameters appear under the cls module:</li>
</ol>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="print(list(dict(model.cls.named_parameters()).keys()))"><pre class="notranslate"><span class="pl-en">print</span>(<span class="pl-en">list</span>(<span class="pl-en">dict</span>(<span class="pl-s1">model</span>.<span class="pl-s1">cls</span>.<span class="pl-en">named_parameters</span>()).<span class="pl-en">keys</span>()))</pre></div>
<ol start="5" dir="auto">
<li>Note that the <code class="notranslate">cls.decoder</code> module appears to be registerred.</li>
</ol>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="print(list(dict(model.named_modules()).keys()))"><pre class="notranslate"><span class="pl-en">print</span>(<span class="pl-en">list</span>(<span class="pl-en">dict</span>(<span class="pl-s1">model</span>.<span class="pl-en">named_modules</span>()).<span class="pl-en">keys</span>()))</pre></div>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Decoder parameters should be incldued in the model parameters.</p> | 0 |
<h1 dir="auto">Summary of the new feature</h1>
<p dir="auto">I would like to customize PowerToys Run's shell (used for launching commands starting with <code class="notranslate">> </code>).</p>
<p dir="auto">For example I would like to use Power Shell Core instead of cmd. Here's many more options might be available.</p>
<ul dir="auto">
<li>cmd</li>
<li>PowerShell</li>
<li>PowerShell Core</li>
<li>WSL</li>
<li>Custom shell (eg.: git, zsh, ...)</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="C:\Program Files(x86)\Myshell\customshell.exe --interactive --command "{0}""><pre class="notranslate"><code class="notranslate">C:\Program Files(x86)\Myshell\customshell.exe --interactive --command "{0}"
</code></pre></div>
<blockquote>
<p dir="auto"><code class="notranslate">{0}</code> might be used for shell command.</p>
</blockquote> | <p dir="auto">PowerToys Run is a convinient tool.<br>
But it would be even better, if it would be possible to configure which program executes <code class="notranslate">> </code> commands.<br>
Right now <code class="notranslate">> ping github.com</code> starts in a cmd window, but I, for example, would prefer to use Terminal.<br>
Is it possible?</p> | 1 |
<p dir="auto"><strong>Symfony version(s) affected</strong>: all</p>
<p dir="auto"><strong>Description</strong></p>
<p dir="auto">When a form field is disabled but a value is submitted to it regardless, the value is silently ignored. This can be confusing to the user - when he opened the form the field was not disabled but something changed in the system while he was filling it so the field is disabled now. The value is then silently ignored but the user gets no notification about the problem.</p>
<p dir="auto"><strong>How to reproduce</strong></p>
<p dir="auto">Create a form field that has the <code class="notranslate">'disabled'</code> option active conditionally. Open the form in one window while the field is enabled, then do something in another window causing it to be disabled and then submit the form in the first window.</p>
<p dir="auto"><strong>Possible Solution</strong></p>
<p dir="auto">Submitting a value into a disabled field should cause a validation error on the form field in question so that the user knows about the change.</p> | <p dir="auto">The validation of an image I have:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" photo:
- Image: { maxSize: 2M, maxSizeMessage: "the size is bigger than {{ limit }}, please change the photo file." }
- NotBlank: { groups: [registration], message: "Please select an photo." }"><pre class="notranslate"> <span class="pl-ent">photo</span>:
- <span class="pl-ent">Image</span>: <span class="pl-s">{ maxSize: 2M, maxSizeMessage: "the size is bigger than {{ limit }}, please change the photo file." }</span>
- <span class="pl-ent">NotBlank</span>: <span class="pl-s">{ groups: [registration], message: "Please select an photo." }</span></pre></div>
<p dir="auto">everything works great except that the maxSizeMessage don't show, only appear the default symfony photo.<br>
I've removed the {{ limit }} to test and still it persists</p> | 0 |
<p dir="auto">Process for bringing up an etcd cluster in a PetSet (minimal requirements). Some discussion of races and inconsistencies.</p>
<ul dir="auto">
<li><a href="https://coreos.com/etcd/docs/latest/clustering.html" rel="nofollow">https://coreos.com/etcd/docs/latest/clustering.html</a></li>
<li><a href="https://coreos.com/etcd/docs/latest/runtime-configuration.html" rel="nofollow">https://coreos.com/etcd/docs/latest/runtime-configuration.html</a></li>
</ul>
<h4 dir="auto">Initialization (option1)</h4>
<ol dir="auto">
<li>Decide on a unique <code class="notranslate">--initial-cluster-token</code> and ensure that will be every pod as an ENV var (could be the petset UID or a simple parameter value)</li>
<li>Create all pods and unique PVs for each</li>
<li>Wait for all endpoints to be reachable to reflect all pods (requires we either know the quorum size, or know that the pet set has reached desired size). Pods won't be ready, so we need to wait for ready+unready endpoints to == quorum size</li>
<li>etcd process starts with the initial bootstrap args (knowing what other members are in the set)</li>
</ol>
<p dir="auto">After this, no dynamic reconfiguration is allowed.</p>
<h4 dir="auto">Initialization (option2)</h4>
<ol dir="auto">
<li>Decide on a unique <code class="notranslate">--initial-cluster-token</code> and ensure that will be every pod as an ENV var (could be the petset UID or a simple parameter value)</li>
<li>Have the pod that gets identity "1" (or "master", or "first") create a new cluster</li>
<li>Have a control loop (babysitter / etc) running with pod identity 1 that tries to keep the cluster membership up to date with the endpoints list in etcd.</li>
</ol>
<p dir="auto">This allows dynamic reconfiguration, but is subject to duplicate instances of the babysitter running (discussed below). It is possible to write the babysitter so that cluster membership always moves forward, but not possible to guarantee that two babysitters aren't running at the same time.</p>
<h4 dir="auto">Dealing with duplicate members without PV to act as a lock</h4>
<p dir="auto">It is possible that a kubelet becomes isolated from the cluster while running member 1 of a 3 pod set, and etcd is not configured to use PV (which acts as a form of lock in some cases). The node controller detects that the kubelet is dead and triggers deletion of those pods. After graceful deletion elapses, a new pod with member 3 will be created. At this point, there are potentially two member-1's running.</p>
<p dir="auto">In option2 above, there could be two control loops running at the same time, and different pods could also see different endpoint versions (so the separated pod could see the older endpoint list).</p>
<p dir="auto">In option1 above, the kubelet could get isolated during initialization, and two instances of member-1 could be started. Both would initialize, and the control loops in each would try to acquire members. If sufficiently large numbers of nodes experienced partition, both sides could think they had a quorum.</p>
<p dir="auto">The resolution is to require the babysitters to make a write to the master API in a way that collapses one side or the other (such as writing to the endpoints).</p>
<h4 dir="auto">Upgrade (normal)</h4>
<ol dir="auto">
<li>Are all members healthy with a quorum?</li>
<li>Backup each member PV</li>
<li>Ensure clean shutdown of members on old version up to <code class="notranslate">floor(N / 2)</code>, to leave a quorum running</li>
<li>Start a new pod with the same PV as the old pod</li>
</ol>
<p dir="auto">During upgrade the same membership problems become possible as during initialization. As long as the set has a quorum, it can police it's own membership, but a disruptive event during upgrade that disables quorum means that the babysitters would have to write to the master API in a similar way as during initialization.</p>
<h4 dir="auto">Upgrade (disaster)</h4>
<p dir="auto">In a disaster scenario, a majority of the PVs in the etcd cluster are lost. No quorum is possible, but again a babysitter can rely on the external master API to resolve leadership for a period of time and reestablish quorum and ensure that the new members join the appropriate quorum.</p>
<h4 dir="auto">Thoughts</h4>
<p dir="auto">Even though etcd has its own consistent mechanism for managing membership, that requires a quorum. Since the babysitter is itself potentially distributed, it must obtain a lease / lock to change membership in a strongly consistent fashion. Only membership changes (pod creation / deletion, endpoint changes) require the babysitter to act in this fashion. The remainder of the time, etcd can manage its own quorum state.</p>
<p dir="auto">If membership changes are relatively rare, there could be advantages to viewing the babysitter as a "cluster change hook". The babysitter could be a run-once pod with a long duration grace period (lease, effectively) that is invoked on cluster membership changes, and the name of the pod could act as the lease (since writes to the master API are strongly consistent). If the node running the babysitter goes down, it's possible to break the lock by deleting the pod forcefully with the corresponding lack of control over the outcome of any code still running in the pod.</p>
<p dir="auto">A one shot pod on membership changes has some advantages - limited resource consumption for the stability of the pod, easier potentially to reason about.</p> | <p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):</p>
<p dir="auto">No</p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):</p>
<p dir="auto">dnsmasq log</p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):<br>
FEATURE REQUEST</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p>
<p dir="auto">1.3.4</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: bare-metal</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): CoreOS 1068.8.0</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): Linux $REDACTED 4.6.3-coreos <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35192602" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/2" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/2/hovercard" href="https://github.com/kubernetes/kubernetes/issues/2">#2</a> SMP Mon Jul 18 06:10:39 UTC 2016 x86_64 Intel(R) Xeon(R) CPU E5530 @ 2.40GHz GenuineIntel GNU/Linux</li>
<li><strong>Install tools</strong>: bootcfg and ignition</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<ol dir="auto">
<li>I started kube-dns according to this example: <a href="https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/dns/skydns-rc.yaml.base">https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/dns/skydns-rc.yaml.base</a></li>
<li><code class="notranslate">kubectl logs --tail=100 -f kube-dns-v19-????? dnsmasq</code> did not show anything.</li>
</ol>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto"><code class="notranslate">kubectl logs --tail=100 -f kube-dns-v19-????? dnsmasq</code> should have shown log messages. There should have been at least a start-up message and it should possibly also log DNS requests, as does the <code class="notranslate">kubedns</code> container.</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p>
<p dir="auto">Take the example <code class="notranslate">kube-dns-rc.yaml</code> and create a resource controller from it.</p>
<p dir="auto"><strong>Anything else do we need to know</strong>:</p>
<p dir="auto">For my DHCP/TFTP dnsmasq pod these command line switches have the desired effect: <code class="notranslate">--keep-in-foreground --log-facility=-</code></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/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<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>Material-UI</td>
<td>1.0.0-beta12</td>
</tr>
<tr>
<td>React</td>
<td>16</td>
</tr>
<tr>
<td>browser</td>
<td>Electron</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | <h3 dir="auto">For Fixing table Head in material 1.0.0 11 alpha</h3>
<p dir="auto">I have a table with scrolling rows but I am not able to fix the header.<br>
Is there a property to do so as fixedHeader was in material 0.15 and up but there doesnt seem to be something similar in 1.0.0 version</p>
<h3 dir="auto">Versions</h3>
<ul dir="auto">
<li>Material-UI: 1.0.0-alpha 11</li>
<li>React: 15.4.2</li>
</ul> | 0 |
<h2 dir="auto">Bug Report</h2>
<p dir="auto">The following code cannot be compiled when using <code class="notranslate">@babel/plugin-proposal-private-methods</code>.<br>
Output: <code class="notranslate">Duplicate declaration "i"</code>.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class A {
#a() {
const i = 9
}
#b() {
const i = 8
}
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">A</span> <span class="pl-kos">{</span>
#<span class="pl-en">a</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">i</span> <span class="pl-c1">=</span> <span class="pl-c1">9</span>
<span class="pl-kos">}</span>
#<span class="pl-en">b</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">i</span> <span class="pl-c1">=</span> <span class="pl-c1">8</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div> | <h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current behavior</strong><br>
Switch statements containing closures are generating broken code causing adjacent cases to run. See this minimal reproduction with the default settings:</p>
<p dir="auto"><a href="https://babeljs.io/en/repl#?browsers=defaults&build=&builtIns=false&spec=false&loose=false&code_lz=GYewTgBAFAxiB2BnALhAhhEwIG0CMAugJQQDeAUBBIgO4CWyMAFtMmAK4CmJFVVMaRJwhsuALjKU-_BCggAjCAF4IeANxTpUEkoB8CjdKp1sUUdwVhOaANaGjceMjrwu9qgF9NEAUIjA0ABshCV4jZCYwEBoIeE4YgFEwKLAoACJ2eCs0ZjR5QM40oncIL09yLyA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=env%2Creact%2Cstage-2%2Cenv&prettier=false&targets=&version=7.10.4&externalPlugins=" rel="nofollow">https://babeljs.io/en/repl#?browsers=defaults&build=&builtIns=false&spec=false&loose=false&code_lz=GYewTgBAFAxiB2BnALhAhhEwIG0CMAugJQQDeAUBBIgO4CWyMAFtMmAK4CmJFVVMaRJwhsuALjKU-_BCggAjCAF4IeANxTpUEkoB8CjdKp1sUUdwVhOaANaGjceMjrwu9qgF9NEAUIjA0ABshCV4jZCYwEBoIeE4YgFEwKLAoACJ2eCs0ZjR5QM40oncIL09yLyA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=env%2Creact%2Cstage-2%2Cenv&prettier=false&targets=&version=7.10.4&externalPlugins=</a></p>
<p dir="auto"><strong>Input Code</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="for (const a of [1]) {
switch (true) {
case true: {
const b = 1;
() => b;
if (true) break;
continue;
}
case false: {
throw new Error("unreachable");
}
}
}"><pre class="notranslate"><span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">const</span> <span class="pl-s1">a</span> <span class="pl-k">of</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-c1">true</span>: <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span><span class="pl-kos">;</span>
<span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-s1">b</span><span class="pl-kos">;</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-k">break</span><span class="pl-kos">;</span>
<span class="pl-k">continue</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">case</span> <span class="pl-c1">false</span>: <span class="pl-kos">{</span>
<span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">Error</span><span class="pl-kos">(</span><span class="pl-s">"unreachable"</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>Output Code</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="for (var _i = 0, _arr = [1]; _i < _arr.length; _i++) {
var a = _arr[_i];
switch (true) {
case true:
{
var _ret = function () {
var b = 1;
(function () {
return b;
});
if (true) return "break";
return "continue";
}();
switch (_ret) {
case "break":
break;
case "continue":
continue;
}
}
case false:
{
throw new Error("unreachable");
}
}
}"><pre class="notranslate"><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">_arr</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-kos">;</span> <span class="pl-s1">_i</span> <span class="pl-c1"><</span> <span class="pl-s1">_arr</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-k">var</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">_arr</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-k">switch</span> <span class="pl-kos">(</span><span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-c1">true</span>:
<span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">_ret</span> <span class="pl-c1">=</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">var</span> <span class="pl-s1">b</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">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-s1">b</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">if</span> <span class="pl-kos">(</span><span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-k">return</span> <span class="pl-s">"break"</span><span class="pl-kos">;</span>
<span class="pl-k">return</span> <span class="pl-s">"continue"</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">switch</span> <span class="pl-kos">(</span><span class="pl-s1">_ret</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-s">"break"</span>:
<span class="pl-k">break</span><span class="pl-kos">;</span>
<span class="pl-k">case</span> <span class="pl-s">"continue"</span>:
<span class="pl-k">continue</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">case</span> <span class="pl-c1">false</span>:
<span class="pl-kos">{</span>
<span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">Error</span><span class="pl-kos">(</span><span class="pl-s">"unreachable"</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>Expected behavior</strong><br>
No error is thrown (the break statement functions as intended, and the false case does not run).</p>
<p dir="auto"><strong>Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)</strong><br>
Defaults. See the REPL.</p>
<p dir="auto"><strong>Environment</strong><br>
Defaults. See the REPL.</p>
<p dir="auto"><strong>Possible Solution</strong><br>
If you want to use a <code class="notranslate">break</code> statement here, it needs to be a labeled break to break the outer loop.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="switch (_ret) {
case "break":
break outer;
case "continue":
continue;
}"><pre class="notranslate"><span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-s1">_ret</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-s">"break"</span>:
<span class="pl-k">break</span> outer<span class="pl-kos">;</span>
<span class="pl-k">case</span> <span class="pl-s">"continue"</span>:
<span class="pl-k">continue</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Alternatively, use an if instead of a nested switch.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if (_ret === "break") break;
if (_ret === "continue") continue;"><pre class="notranslate"><span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">_ret</span> <span class="pl-c1">===</span> <span class="pl-s">"break"</span><span class="pl-kos">)</span> <span class="pl-k">break</span><span class="pl-kos">;</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">_ret</span> <span class="pl-c1">===</span> <span class="pl-s">"continue"</span><span class="pl-kos">)</span> <span class="pl-k">continue</span><span class="pl-kos">;</span></pre></div> | 0 |
<h3 dir="auto">Is there an existing issue for this?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">I run <code class="notranslate">npm version</code> and no commit or tag is created. I am not using <code class="notranslate">--no-git-tag-version</code>. F.e. just <code class="notranslate">npm version major -m "..."</code>.</p>
<p dir="auto">Under what conditions does <code class="notranslate">npm version</code> avoid creating a commit and tag?</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Always commit and tag unless I specify not to.</p>
<h3 dir="auto">Steps To Reproduce</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="git clone https://github.com/lume/lume.git
cd lume/packages/lume
npm version major -m "v%s" --ignore-scripts"><pre class="notranslate"><span class="pl-s1">git</span> <span class="pl-s1">clone</span> https:<span class="pl-c">//github.com/lume/lume.git</span>
<span class="pl-s1">cd</span> <span class="pl-s1">lume</span><span class="pl-c1">/</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">lume</span>
<span class="pl-s1">npm</span> <span class="pl-s1">version</span> <span class="pl-s1">major</span> <span class="pl-c1">-</span><span class="pl-s1">m</span> <span class="pl-s">"v%s"</span> <span class="pl-c1">--</span><span class="pl-s1">ignore</span><span class="pl-c1">-</span><span class="pl-s1">scripts</span></pre></div>
<p dir="auto">After this, you will see that <code class="notranslate">package.json</code> was updated, but no commit or tag was created.</p>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>OS: Linux</li>
<li>Node: 14.16</li>
<li>npm: 7.10</li>
</ul> | <h3 dir="auto">Current Behavior:</h3>
<p dir="auto"><code class="notranslate">npm version <version></code> is not committing the modified package.json or package-lock.json; nor git-tagging.</p>
<p dir="auto">We were using <code class="notranslate">npm version {major|minor|patch}</code> extensively (and successfully). It stopped working once the package was moved out of the root of the repo and into a subdirectory.</p>
<h3 dir="auto">Expected Behavior:</h3>
<p dir="auto"><code class="notranslate">npm version <version></code> should continue to create a git-commit and git-tag as indicated in the <a href="https://docs.npmjs.com/cli-commands/version.html" rel="nofollow">docs</a>:</p>
<blockquote>
<p dir="auto">If run in a git repo, it will also create a version commit and tag. This behavior is controlled by git-tag-version (see below), and can be disabled on the command line by running npm --no-git-tag-version version. It will fail if the working directory is not clean, unless the -f or --force flag is set.</p>
</blockquote>
<h3 dir="auto">Steps To Reproduce:</h3>
<ol dir="auto">
<li>initialize an npm package in the root of an initialized git repo</li>
<li><code class="notranslate">npm version minor</code> successfully bumps the version, commits and tags</li>
<li>move the npm package into a subdirectory of the repo</li>
<li><code class="notranslate">npm version minor</code> still bumps the version in package.json and package-lock.json, but git is not committed nor tagged.</li>
</ol>
<h3 dir="auto">Environment:</h3>
<ul dir="auto">
<li>macOS 10.15.7</li>
<li>node: v14.13.1</li>
<li>npm: 6.14.8</li>
<li>git: git version 2.28.0</li>
</ul>
<p dir="auto">This is apparently an existing bug going as far back as npm v3: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="264697877" data-permission-text="Title is private" data-url="https://github.com/npm/npm/issues/18795" data-hovercard-type="issue" data-hovercard-url="/npm/npm/issues/18795/hovercard" href="https://github.com/npm/npm/issues/18795">npm/npm#18795</a></p> | 1 |
<p dir="auto">From version 0.9.0 to version 0.11.0 the "diagonal" on non quadratic pairplots is empty.</p>
<p dir="auto">Sample Code:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import seaborn as sns
import pandas as pd
from matplotlib import pyplot as plt
test_df = pd.DataFrame({"a": [1,2,3,4], "b": [3,4,5,6], "c": [5,3,6,1]})
sns.pairplot(test_df, x_vars=["a"], y_vars=["b", "c"])
plt.show()"><pre class="notranslate"><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-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</span> <span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-s1">test_df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">"a"</span>: [<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>,<span class="pl-c1">4</span>], <span class="pl-s">"b"</span>: [<span class="pl-c1">3</span>,<span class="pl-c1">4</span>,<span class="pl-c1">5</span>,<span class="pl-c1">6</span>], <span class="pl-s">"c"</span>: [<span class="pl-c1">5</span>,<span class="pl-c1">3</span>,<span class="pl-c1">6</span>,<span class="pl-c1">1</span>]})
<span class="pl-s1">sns</span>.<span class="pl-en">pairplot</span>(<span class="pl-s1">test_df</span>, <span class="pl-s1">x_vars</span><span class="pl-c1">=</span>[<span class="pl-s">"a"</span>], <span class="pl-s1">y_vars</span><span class="pl-c1">=</span>[<span class="pl-s">"b"</span>, <span class="pl-s">"c"</span>])
<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div>
<p dir="auto">The top graph is empty although a scatter plot should be shown in place as the two columns have matching indices.</p> | <p dir="auto">Just updated to seaborn 0.11.0 and matplotlib 3.3.1.</p>
<p dir="auto">Run this code:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="iris = sns.load_dataset("iris")
sns.pairplot(data=iris, hue="species", y_vars='sepal_width');
sns.pairplot(data=iris, hue="species", y_vars='sepal_width', x_vars=['sepal_length', 'petal_length']);"><pre class="notranslate"><span class="pl-s1">iris</span> <span class="pl-c1">=</span> <span class="pl-s1">sns</span>.<span class="pl-en">load_dataset</span>(<span class="pl-s">"iris"</span>)
<span class="pl-s1">sns</span>.<span class="pl-en">pairplot</span>(<span class="pl-s1">data</span><span class="pl-c1">=</span><span class="pl-s1">iris</span>, <span class="pl-s1">hue</span><span class="pl-c1">=</span><span class="pl-s">"species"</span>, <span class="pl-s1">y_vars</span><span class="pl-c1">=</span><span class="pl-s">'sepal_width'</span>);
<span class="pl-s1">sns</span>.<span class="pl-en">pairplot</span>(<span class="pl-s1">data</span><span class="pl-c1">=</span><span class="pl-s1">iris</span>, <span class="pl-s1">hue</span><span class="pl-c1">=</span><span class="pl-s">"species"</span>, <span class="pl-s1">y_vars</span><span class="pl-c1">=</span><span class="pl-s">'sepal_width'</span>, <span class="pl-s1">x_vars</span><span class="pl-c1">=</span>[<span class="pl-s">'sepal_length'</span>, <span class="pl-s">'petal_length'</span>]);</pre></div>
<p dir="auto">And saw it:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/24957288/92593736-438e9000-f2aa-11ea-93ac-3fb7b2c94a68.PNG"><img src="https://user-images.githubusercontent.com/24957288/92593736-438e9000-f2aa-11ea-93ac-3fb7b2c94a68.PNG" alt="screen" style="max-width: 100%;"></a></p>
<p dir="auto">And this problem appeared in all previously created pairplots, that have parameter y_vars</p> | 1 |
<p dir="auto">Hello,<br>
I tried to use the clip function on a basic Panel but it seems that the axis management is not working as expected. I believe this is an update to issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="43344682" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/8344" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/8344/hovercard" href="https://github.com/pandas-dev/pandas/issues/8344">#8344</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np
import pandas as pd
data = np.random.randn(3, 4, 5)
panel = pd.Panel(data)
panel.clip(0, 1)"><pre class="notranslate"><code class="notranslate">import numpy as np
import pandas as pd
data = np.random.randn(3, 4, 5)
panel = pd.Panel(data)
panel.clip(0, 1)
</code></pre></div>
<p dir="auto">If I run the script with pandas 0.16.2 on python 2.7.10 and 3.4.3, I'm getting the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=".../pandas/core/generic.pyc in clip(self, lower, upper, out, axis)
3052 result = self
3053 if lower is not None:
-> 3054 result = result.clip_lower(lower, axis)
3055 if upper is not None:
3056 result = result.clip_upper(upper, axis)
.../pandas/core/generic.pyc in clip_lower(self, threshold, axis)
3103 raise ValueError("Cannot use an NA value as a clip threshold")
3104
-> 3105 subset = self.ge(threshold, axis=axis) | isnull(self)
3106 return self.where(subset, threshold, axis=axis)
3107
TypeError: f() got an unexpected keyword argument 'axis'"><pre class="notranslate"><code class="notranslate">.../pandas/core/generic.pyc in clip(self, lower, upper, out, axis)
3052 result = self
3053 if lower is not None:
-> 3054 result = result.clip_lower(lower, axis)
3055 if upper is not None:
3056 result = result.clip_upper(upper, axis)
.../pandas/core/generic.pyc in clip_lower(self, threshold, axis)
3103 raise ValueError("Cannot use an NA value as a clip threshold")
3104
-> 3105 subset = self.ge(threshold, axis=axis) | isnull(self)
3106 return self.where(subset, threshold, axis=axis)
3107
TypeError: f() got an unexpected keyword argument 'axis'
</code></pre></div>
<p dir="auto"><strong>Thanks a lot for all your efforts!</strong></p> | <p dir="auto">Let's take the following example:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="d = {'Item1' : pandas.DataFrame(numpy.random.randn(4, 3)),
'Item2' : pandas.DataFrame(numpy.random.randn(4, 2))}
p = pandas.Panel(d)
p.clip(0,1)"><pre class="notranslate"><span class="pl-s1">d</span> <span class="pl-c1">=</span> {<span class="pl-s">'Item1'</span> : <span class="pl-s1">pandas</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">numpy</span>.<span class="pl-s1">random</span>.<span class="pl-en">randn</span>(<span class="pl-c1">4</span>, <span class="pl-c1">3</span>)),
<span class="pl-s">'Item2'</span> : <span class="pl-s1">pandas</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">numpy</span>.<span class="pl-s1">random</span>.<span class="pl-en">randn</span>(<span class="pl-c1">4</span>, <span class="pl-c1">2</span>))}
<span class="pl-s1">p</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-v">Panel</span>(<span class="pl-s1">d</span>)
<span class="pl-s1">p</span>.<span class="pl-en">clip</span>(<span class="pl-c1">0</span>,<span class="pl-c1">1</span>)</pre></div>
<p dir="auto">If I run the script with pandas 0.14.1 on both python 2.7.8 and 3.4.1 I'm getting the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "Untitled.py", line 11, in <module>
p.clip(0,1)
File "/usr/local/lib/python2.7/site-packages/pandas/core/generic.py", line 2684, in clip
result = result.clip_lower(lower)
File "/usr/local/lib/python2.7/site-packages/pandas/core/generic.py", line 2722, in clip_lower
return self.where((self >= threshold) | isnull(self), threshold)
File "/usr/local/lib/python2.7/site-packages/pandas/core/ops.py", line 934, in f
self._constructor.__name__)
ValueError: Simple arithmetic with Panel can only be done with scalar values"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
File "Untitled.py", line 11, in <module>
p.clip(0,1)
File "/usr/local/lib/python2.7/site-packages/pandas/core/generic.py", line 2684, in clip
result = result.clip_lower(lower)
File "/usr/local/lib/python2.7/site-packages/pandas/core/generic.py", line 2722, in clip_lower
return self.where((self >= threshold) | isnull(self), threshold)
File "/usr/local/lib/python2.7/site-packages/pandas/core/ops.py", line 934, in f
self._constructor.__name__)
ValueError: Simple arithmetic with Panel can only be done with scalar values
</code></pre></div>
<p dir="auto">Digging a little bit deeper showed that the following line (the | operator to be precise) raises the error:<br>
<a href="https://github.com/pydata/pandas/blob/1d65bc89d64c71f8d36f3ca92dd57db2efad7fdb/pandas/core/generic.py#L2796">https://github.com/pydata/pandas/blob/1d65bc89d64c71f8d36f3ca92dd57db2efad7fdb/pandas/core/generic.py#L2796</a></p> | 1 |
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: NO</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Windows 10 Build 16299.192 and Windows 7</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: binary</li>
<li><strong>TensorFlow version (use command below)</strong>: 1.5.0rc1 and tf-nightly 1.6.0.dev20180124</li>
<li><strong>Python version</strong>: 3.6.2 and 3.5.2</li>
<li><strong>Bazel version (if compiling from source)</strong>:</li>
<li><strong>GCC/Compiler version (if compiling from source)</strong>:</li>
<li><strong>CUDA/cuDNN version</strong>: 8.0</li>
<li><strong>GPU model and memory</strong>: Nvidia GT 740M 2GB</li>
<li><strong>Exact command to reproduce</strong>: toco --help</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">I am trying to run the codelab tutorial of tensorflow lite. After installing tf-nightly, when I try to run the command "toco --help", I get the error ModuleNotFoundError: No module named 'tensorflow.contrib.lite.toco.python'.</p>
<p dir="auto">I have tried this on 3 computers( all Windows) and the same problem persists.</p>
<h3 dir="auto">Source code / logs</h3>
<p dir="auto">C:\Users\HP\Downloads>toco --help<br>
Traceback (most recent call last):<br>
File "c:\programdata\anaconda3\lib\runpy.py", line 193, in _run_module_as_main<br>
"<strong>main</strong>", mod_spec)<br>
File "c:\programdata\anaconda3\lib\runpy.py", line 85, in <em>run_code<br>
exec(code, run_globals)<br>
File "C:\ProgramData\Anaconda3\Scripts\toco.exe_<em>main</em></em>.py", line 5, in <br>
ModuleNotFoundError: No module named 'tensorflow.contrib.lite.toco.python'</p> | <h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: No</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Windows 10</li>
<li><strong>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device</strong>: n/a</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: source, pip install --upgrade tf-nightly</li>
<li><strong>TensorFlow version (use command below)</strong>: GIT: 'v1.9.0-rc2-798-gc818bf016d', VERSION: '1.10.0-dev20180719'</li>
<li><strong>Python version</strong>: 3.6.6</li>
<li><strong>Bazel version (if compiling from source)</strong>:</li>
<li><strong>GCC/Compiler version (if compiling from source)</strong>:</li>
<li><strong>CUDA/cuDNN version</strong>:</li>
<li><strong>GPU model and memory</strong>:</li>
<li><strong>Exact command to reproduce</strong>:</li>
</ul>
<h3 dir="auto">Python API</h3>
<p dir="auto">`import tensorflow as tf</p>
<p dir="auto">converter = tf.contrib.lite.TocoConverter.from_keras_model_file("model.h5")<br>
tflite_model = converter.convert()<br>
open("model.tflite", "wb").write(tflite_model)`<br>
and</p>
<h3 dir="auto">Command-line</h3>
<p dir="auto"><code class="notranslate">toco</code></p>
<p dir="auto">You can collect some of this information using our environment capture script:</p>
<p dir="auto"><a href="https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh">https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh</a></p>
<p dir="auto">You can obtain the TensorFlow version with</p>
<p dir="auto">python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"</p>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">I'm trying to convert a keras model to the tflite format, but the sample code provided on the website doesn't seem to work. As advised in my <a href="https://github.com/tensorflow/tensorflow/issues/20826" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/20826/hovercard">other issue</a>, I installed tf-nightly. I used a venv to get a clean environment but for some reason, other issues have arisen. In the case of the Python API, 'lite' seems to be missing from 'tensorflow.contrib' whereas when I run 'toco' from the command line, it raises a ModuleNotFoundError as shown below. Any help would be greatly appreciated.</p>
<h3 dir="auto">Source code / logs</h3>
<h3 dir="auto">Python API</h3>
<p dir="auto"><code class="notranslate">Traceback (most recent call last): File "sandbox/run.py", line 3, in <module> converter = tf.contrib.lite.TocoConverter.from_keras_model_file("model.h5") File "C:\beta\lib\site-packages\tensorflow\python\util\lazy_loader.py", line 54, in __getattr__ return getattr(module, item) AttributeError: module 'tensorflow.contrib' has no attribute 'lite'</code></p>
<h3 dir="auto">Command-line (running toco)</h3>
<p dir="auto"><code class="notranslate">Traceback (most recent call last): File "c:\users\user\appdata\local\programs\python\python36\Lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\user\appdata\local\programs\python\python36\Lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\beta\Scripts\toco.exe\__main__.py", line 5, in <module> ModuleNotFoundError: No module named 'tensorflow.contrib.lite.python.tflite_convert'</code></p> | 1 |
<p dir="auto">pip install -U git+<a href="https://github.com/pydata/pandas.git">https://github.com/pydata/pandas.git</a></p>
<p dir="auto">gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/local/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c pandas/src/generated.c -o build/temp.linux-i686-2.7/pandas/src/generated.o</p>
<p dir="auto">gcc: error: pandas/src/generated.c: No such file or directory</p> | <p dir="auto"><code class="notranslate">pip install git+https://github.com/pydata/pandas.git</code></p>
<p dir="auto">does currently not work because the .pyx files are not being cythonized (not sure why). An easy fix is to include .c files in the git repo which should make it easier for people to deploy.</p>
<p dir="auto">I used a simple try: import cython in setup.py that cythonizes if cython is installed and uses the .c files otherwise:</p>
<p dir="auto"><a href="https://github.com/hddm-devs/hddm/blob/develop/setup.py#L4">https://github.com/hddm-devs/hddm/blob/develop/setup.py#L4</a></p> | 1 |
<p dir="auto">Continuing from this discussion: <a href="https://discuss.atom.io/t/double-icon-when-pinned/17320/24" rel="nofollow">https://discuss.atom.io/t/double-icon-when-pinned/17320/24</a></p>
<p dir="auto">I've got Atom installed on Windows 10. I open the application, then right click the icon in the taskbar, then click Pin to Taskbar. This creates a duplicate (second) icon on the taskbar. The first icon is the actual instance of the app running, and it goes away when the app is closed. The second icon stays permanently. If I click the second icon while Atom is closed, it adds the first icon back to my taskbar.</p>
<p dir="auto">Any ideas as to what I can do to fix this?</p> | <ul dir="auto">
<li>run latest Windows 10</li>
<li>pin either electron or atom to the taskbar</li>
<li>click it to open the app</li>
</ul>
<p dir="auto">=> you end up having 2 icons<br>
=> somehow the app when started does not get associated to the pinned entry in the taskbar<br>
=> it does not reproduce on Windows 8.x</p>
<p dir="auto">I wonder if your change in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/electron/electron/commit/fb6c80d12ecbb99a481e1018a0d1d56c3fc4dce3/hovercard" href="https://github.com/electron/electron/commit/fb6c80d12ecbb99a481e1018a0d1d56c3fc4dce3"><tt>fb6c80d</tt></a> could have an impact here. Imho it is used to find out if an application belongs to the same process group or not: <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dd378422(v=vs.85).aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/windows/desktop/dd378422(v=vs.85).aspx</a></p> | 1 |
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p>
<p dir="auto">Not sure tbh.</p>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<p dir="auto">I have global handler for unhandled errors:<br>
window.addEventListener('error', (evt) => ...)</p>
<p dir="auto">Now when I use the componentDidCatch function it gets called correctly when render throws an exception but that global error event is also triggered - and before the componentDidCatch call.</p>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">Since componentDidCatch handles the error I'd prefer if the global event wasn't triggered, same as with a usual try-catch block.</p>
<p dir="auto">Or is there at least some way to figure out from the evt object in the event handler that the exception is caught by react?</p>
<p dir="auto">I hope this made sense...</p> | <p dir="auto">I'm trying to make use of componentDidCatch in the React 16 beta. I already had a global window error handler which was working fine, but it unexpectedly catches errors that I would expect componentDidCatch to have handled. That is, component-local errors are being treated as window-global errors in dev builds.</p>
<p dir="auto">The problem seems to stem from <code class="notranslate">invokeGuardedCallbackDev</code> in <code class="notranslate">ReactErrorUtils.js</code>. I think that this entire <code class="notranslate">__DEV__</code> block of code is problematic. The stated rational is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" // In DEV mode, we swap out invokeGuardedCallback for a special version
// that plays more nicely with the browser's DevTools. The idea is to preserve
// "Pause on exceptions" behavior. Because React wraps all user-provided
// functions in invokeGuardedCallback, and the production version of
// invokeGuardedCallback uses a try-catch, all user exceptions are treated
// like caught exceptions, and the DevTools won't pause unless the developer
// takes the extra step of enabling pause on caught exceptions. This is
// untintuitive, though, because even though React has caught the error, from
// the developer's perspective, the error is uncaught."><pre class="notranslate"><code class="notranslate"> // In DEV mode, we swap out invokeGuardedCallback for a special version
// that plays more nicely with the browser's DevTools. The idea is to preserve
// "Pause on exceptions" behavior. Because React wraps all user-provided
// functions in invokeGuardedCallback, and the production version of
// invokeGuardedCallback uses a try-catch, all user exceptions are treated
// like caught exceptions, and the DevTools won't pause unless the developer
// takes the extra step of enabling pause on caught exceptions. This is
// untintuitive, though, because even though React has caught the error, from
// the developer's perspective, the error is uncaught.
</code></pre></div>
<p dir="auto">This is misguided because it's not about pausing on exceptions, it's about "pause on <em>uncaught</em> exceptions." However, <code class="notranslate">componentDidCatch</code> makes exceptions <em>caught</em>!</p>
<p dir="auto">Rather than switching on prod vs dev and using try/catch in prod and window's error handler in dev, React should always use try/catch, but rethrow if you reach the root without hitting a componentDidCatch handler. This would preserve the correct "pause on uncaught exceptions" behavior without messing with global error handlers.</p> | 1 |
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/AlecBoutin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/AlecBoutin">@AlecBoutin</a> on May 18, 2016 19:55</em></p>
<ul dir="auto">
<li>VSCode Version: 1.1</li>
</ul>
<p dir="auto">The .tsx/.jsx auto-formatter adds an unnecessary space on the end of certain dynamic attributes.</p>
<p dir="auto">E.g. <code class="notranslate"><button id={fn()} /></code> becomes <code class="notranslate"><button id={fn() } /></code> after the file is auto-formatted. A space is inserted after the closing parenthesis of the fn() call.</p>
<p dir="auto">The problem appears to be related to having parenthesis in the attribute.</p>
<p dir="auto">E.g. <button id={""} /> is left unchanged by auto-format. <code class="notranslate"><button id={("")} /></code> becomes <code class="notranslate"><button id={("") } /></code> (the space is inserted)</p>
<p dir="auto">I have also observed the auto-formatter preserves the spaces in the id attribute of <code class="notranslate"><button id={ ("") } /></code></p>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="155587462" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/6498" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/6498/hovercard" href="https://github.com/microsoft/vscode/issues/6498">microsoft/vscode#6498</a></em></p> | <p dir="auto">When I format document a space is added before closing parenthesis.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/858180/12673144/383f4664-c67b-11e5-9307-c5343a1f1635.png"><img src="https://cloud.githubusercontent.com/assets/858180/12673144/383f4664-c67b-11e5-9307-c5343a1f1635.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">It should not be added.</p> | 1 |
<p dir="auto">See the example below</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> double = np.array([0.0], dtype=np.float64)[0]
>>> float = 0.0
>>> a = Variable(torch.FloatTensor(1))
>>> a + float
Variable containing:
1.00000e-34 *
1.3192
[torch.FloatTensor of size 1]
>>> float + a
Variable containing:
1.00000e-34 *
1.3192
[torch.FloatTensor of size 1]
>>> a + double
Variable containing:
1.00000e-34 *
1.3192
[torch.FloatTensor of size 1]
>>> double + a
array([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[Variable containing:
1.00000e-34 *
1.3192
[torch.FloatTensor of size 1]
]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]], dtype=object)"><pre class="notranslate"><code class="notranslate">>>> double = np.array([0.0], dtype=np.float64)[0]
>>> float = 0.0
>>> a = Variable(torch.FloatTensor(1))
>>> a + float
Variable containing:
1.00000e-34 *
1.3192
[torch.FloatTensor of size 1]
>>> float + a
Variable containing:
1.00000e-34 *
1.3192
[torch.FloatTensor of size 1]
>>> a + double
Variable containing:
1.00000e-34 *
1.3192
[torch.FloatTensor of size 1]
>>> double + a
array([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[Variable containing:
1.00000e-34 *
1.3192
[torch.FloatTensor of size 1]
]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]], dtype=object)
</code></pre></div> | <p dir="auto">Pytorch shows the following inconsistent behaviour.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
import torch
from torch.autograd import Variable
1.0 + Variable(torch.ones(1))
# returns as expected
# Variable containing:
# 2
# [torch.FloatTensor of size 1]
np.sum(1.0) + Variable(torch.ones(1))
# returns an unexpected (depth of array is 32)
# array([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[Variable containing:
# 2
# [torch.FloatTensor of size 1]
# ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]], dtype=object)
# Switching their order
Variable(torch.ones(1)) + np.sum(1.0)
# returns the expected
# Variable containing:
# 2
# [torch.FloatTensor of size 1]"><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">torch</span>
<span class="pl-k">from</span> <span class="pl-s1">torch</span>.<span class="pl-s1">autograd</span> <span class="pl-k">import</span> <span class="pl-v">Variable</span>
<span class="pl-c1">1.0</span> <span class="pl-c1">+</span> <span class="pl-v">Variable</span>(<span class="pl-s1">torch</span>.<span class="pl-en">ones</span>(<span class="pl-c1">1</span>))
<span class="pl-c"># returns as expected</span>
<span class="pl-c"># Variable containing:</span>
<span class="pl-c"># 2</span>
<span class="pl-c"># [torch.FloatTensor of size 1]</span>
<span class="pl-s1">np</span>.<span class="pl-en">sum</span>(<span class="pl-c1">1.0</span>) <span class="pl-c1">+</span> <span class="pl-v">Variable</span>(<span class="pl-s1">torch</span>.<span class="pl-en">ones</span>(<span class="pl-c1">1</span>))
<span class="pl-c"># returns an unexpected (depth of array is 32)</span>
<span class="pl-c"># array([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[Variable containing:</span>
<span class="pl-c"># 2</span>
<span class="pl-c"># [torch.FloatTensor of size 1]</span>
<span class="pl-c"># ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]], dtype=object)</span>
<span class="pl-c"># Switching their order </span>
<span class="pl-v">Variable</span>(<span class="pl-s1">torch</span>.<span class="pl-en">ones</span>(<span class="pl-c1">1</span>)) <span class="pl-c1">+</span> <span class="pl-s1">np</span>.<span class="pl-en">sum</span>(<span class="pl-c1">1.0</span>)
<span class="pl-c"># returns the expected</span>
<span class="pl-c"># Variable containing:</span>
<span class="pl-c"># 2</span>
<span class="pl-c"># [torch.FloatTensor of size 1]</span></pre></div> | 1 |
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong><br>
I am using</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="require("@babel/register")({
babelrc: false, // Tell babel-register to ignore the .babelrc file
presets: ["babel-preset-env", "babel-preset-react"],
plugins: [
"babel-plugin-transform-class-properties",
"babel-plugin-transform-object-rest-spread",
[
"babel-plugin-transform-runtime",
{
helpers: false,
polyfill: false,
regenerator: true
}
]
]
});"><pre class="notranslate"><code class="notranslate">require("@babel/register")({
babelrc: false, // Tell babel-register to ignore the .babelrc file
presets: ["babel-preset-env", "babel-preset-react"],
plugins: [
"babel-plugin-transform-class-properties",
"babel-plugin-transform-object-rest-spread",
[
"babel-plugin-transform-runtime",
{
helpers: false,
polyfill: false,
regenerator: true
}
]
]
});
</code></pre></div>
<p dir="auto">and all I get is an error when requiring the next file which says:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ReferenceError: Unknown option: .caller. Check out http://babeljs.io/docs/usage/options/ for more information about options.
at buildUnknownError (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/validation/options.js:98:11)
at /Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/validation/options.js:84:57
at Array.forEach (<anonymous>)
at validate (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/validation/options.js:62:21)
at loadPrivatePartialConfig (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/partial.js:28:48)
at loadFullConfig (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/full.js:33:37)
at loadOptions (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/index.js:18:34)
at OptionManager.init (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/index.js:28:12)
at compile (/Users/andy/Development/oa-content/app/node_modules/@babel/register/lib/node.js:61:42)
at compileHook (/Users/andy/Development/oa-content/app/node_modules/@babel/register/lib/node.js:102:12)"><pre class="notranslate"><code class="notranslate">ReferenceError: Unknown option: .caller. Check out http://babeljs.io/docs/usage/options/ for more information about options.
at buildUnknownError (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/validation/options.js:98:11)
at /Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/validation/options.js:84:57
at Array.forEach (<anonymous>)
at validate (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/validation/options.js:62:21)
at loadPrivatePartialConfig (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/partial.js:28:48)
at loadFullConfig (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/full.js:33:37)
at loadOptions (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/index.js:18:34)
at OptionManager.init (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/index.js:28:12)
at compile (/Users/andy/Development/oa-content/app/node_modules/@babel/register/lib/node.js:61:42)
at compileHook (/Users/andy/Development/oa-content/app/node_modules/@babel/register/lib/node.js:102:12)
</code></pre></div>
<p dir="auto">I checked through the code and <code class="notranslate">@babel/register</code> adds the "caller" to the transformOpts which is then passed to the transform function so I really don't know what's going on here. For some reason I just can't get it to work and it's not making a lot of sense.</p>
<p dir="auto"><strong>Expected behavior/code</strong><br>
The next require statement should just work.</p>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): ```<br>
├─ @babel/cli@7.0.0-rc.3<br>
├─ @babel/code-frame@7.0.0-beta.42<br>
├─ @babel/core@7.0.0-beta.42<br>
├─ @babel/generator@7.0.0-beta.42<br>
├─ @babel/helper-annotate-as-pure@7.0.0-beta.42<br>
├─ @babel/helper-builder-binary-assignment-operator-visitor@7.0.0-beta.42<br>
├─ @babel/helper-builder-react-jsx@7.0.0-beta.42<br>
├─ @babel/helper-call-delegate@7.0.0-beta.42<br>
├─ @babel/helper-define-map@7.0.0-beta.42<br>
├─ @babel/helper-explode-assignable-expression@7.0.0-beta.42<br>
├─ @babel/helper-function-name@7.0.0-beta.42<br>
├─ @babel/helper-get-function-arity@7.0.0-beta.42<br>
├─ @babel/helper-hoist-variables@7.0.0-beta.42<br>
├─ @babel/helper-module-imports@7.0.0-beta.42<br>
├─ @babel/helper-module-transforms@7.0.0-beta.42<br>
├─ @babel/helper-optimise-call-expression@7.0.0-beta.42<br>
├─ @babel/helper-plugin-utils@7.0.0-beta.42<br>
├─ @babel/helper-regex@7.0.0-beta.42<br>
├─ @babel/helper-remap-async-to-generator@7.0.0-beta.42<br>
├─ @babel/helper-replace-supers@7.0.0-beta.42<br>
├─ @babel/helper-simple-access@7.0.0-beta.42<br>
├─ @babel/helper-split-export-declaration@7.0.0-beta.42<br>
├─ @babel/helper-wrap-function@7.0.0-beta.42<br>
├─ @babel/helpers@7.0.0-beta.42<br>
├─ @babel/highlight@7.0.0-beta.42<br>
├─ @babel/node@7.0.0-rc.3<br>
├─ @babel/plugin-proposal-async-generator-functions@7.0.0-beta.42<br>
├─ @babel/plugin-proposal-class-properties@7.0.0-beta.42<br>
├─ @babel/plugin-proposal-object-rest-spread@7.0.0-beta.42<br>
├─ @babel/plugin-proposal-optional-catch-binding@7.0.0-beta.42<br>
├─ @babel/plugin-proposal-unicode-property-regex@7.0.0-beta.42<br>
├─ @babel/plugin-syntax-async-generators@7.0.0-beta.42<br>
├─ @babel/plugin-syntax-class-properties@7.0.0-beta.42<br>
├─ @babel/plugin-syntax-dynamic-import@7.0.0-beta.42<br>
├─ @babel/plugin-syntax-jsx@7.0.0-beta.42<br>
├─ @babel/plugin-syntax-object-rest-spread@7.0.0-beta.42<br>
├─ @babel/plugin-syntax-optional-catch-binding@7.0.0-beta.42<br>
├─ @babel/plugin-transform-arrow-functions@7.0.0-beta.42<br>
├─ @babel/plugin-transform-async-to-generator@7.0.0-beta.42<br>
├─ @babel/plugin-transform-block-scoped-functions@7.0.0-beta.42<br>
├─ @babel/plugin-transform-block-scoping@7.0.0-beta.42<br>
├─ @babel/plugin-transform-classes@7.0.0-beta.42<br>
├─ @babel/plugin-transform-computed-properties@7.0.0-beta.42<br>
├─ @babel/plugin-transform-destructuring@7.0.0-beta.42<br>
├─ @babel/plugin-transform-dotall-regex@7.0.0-beta.42<br>
├─ @babel/plugin-transform-duplicate-keys@7.0.0-beta.42<br>
├─ @babel/plugin-transform-exponentiation-operator@7.0.0-beta.42<br>
├─ @babel/plugin-transform-for-of@7.0.0-beta.42<br>
├─ @babel/plugin-transform-function-name@7.0.0-beta.42<br>
├─ @babel/plugin-transform-literals@7.0.0-beta.42<br>
├─ @babel/plugin-transform-modules-amd@7.0.0-beta.42<br>
├─ @babel/plugin-transform-modules-commonjs@7.0.0-beta.42<br>
├─ @babel/plugin-transform-modules-systemjs@7.0.0-beta.42<br>
├─ @babel/plugin-transform-modules-umd@7.0.0-beta.42<br>
├─ @babel/plugin-transform-new-target@7.0.0-beta.42<br>
├─ @babel/plugin-transform-object-super@7.0.0-beta.42<br>
├─ @babel/plugin-transform-parameters@7.0.0-beta.42<br>
├─ @babel/plugin-transform-react-display-name@7.0.0-beta.42<br>
├─ @babel/plugin-transform-react-jsx-self@7.0.0-beta.42<br>
├─ @babel/plugin-transform-react-jsx-source@7.0.0-beta.42<br>
├─ @babel/plugin-transform-react-jsx@7.0.0-beta.42<br>
├─ @babel/plugin-transform-regenerator@7.0.0-beta.42<br>
├─ @babel/plugin-transform-runtime@7.0.0-beta.42<br>
├─ @babel/plugin-transform-shorthand-properties@7.0.0-beta.42<br>
├─ @babel/plugin-transform-spread@7.0.0-beta.42<br>
├─ @babel/plugin-transform-sticky-regex@7.0.0-beta.42<br>
├─ @babel/plugin-transform-template-literals@7.0.0-beta.42<br>
├─ @babel/plugin-transform-typeof-symbol@7.0.0-beta.42<br>
├─ @babel/plugin-transform-unicode-regex@7.0.0-beta.42<br>
├─ @babel/polyfill@7.0.0-rc.3<br>
├─ @babel/preset-env@7.0.0-beta.42<br>
├─ @babel/preset-react@7.0.0-beta.42<br>
├─ @babel/register@7.0.0-rc.3<br>
├─ @babel/runtime@7.0.0-beta.42<br>
├─ @babel/template@7.0.0-beta.42<br>
├─ @babel/traverse@7.0.0-beta.42<br>
├─ @babel/types@7.0.0-beta.42<br>
└─ babel-eslint@8.2.5<br>
├─ @babel/code-frame@7.0.0-beta.44<br>
├─ @babel/generator@7.0.0-beta.44<br>
├─ @babel/helper-function-name@7.0.0-beta.44<br>
├─ @babel/helper-get-function-arity@7.0.0-beta.44<br>
├─ @babel/helper-split-export-declaration@7.0.0-beta.44<br>
├─ @babel/highlight@7.0.0-beta.44<br>
├─ @babel/template@7.0.0-beta.44<br>
├─ @babel/traverse@7.0.0-beta.44<br>
└─ @babel/types@7.0.0-beta.44</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="and"><pre class="notranslate"><code class="notranslate">and
</code></pre></div>
<p dir="auto">├─ babel-code-frame@6.26.0<br>
├─ babel-core@7.0.0-bridge.0<br>
├─ babel-eslint@8.2.5<br>
├─ babel-generator@6.26.1<br>
├─ babel-helper-builder-binary-assignment-operator-visitor@6.24.1<br>
├─ babel-helper-builder-react-jsx@6.26.0<br>
├─ babel-helper-call-delegate@6.24.1<br>
├─ babel-helper-define-map@6.26.0<br>
├─ babel-helper-explode-assignable-expression@6.24.1<br>
├─ babel-helper-function-name@6.24.1<br>
├─ babel-helper-get-function-arity@6.24.1<br>
├─ babel-helper-hoist-variables@6.24.1<br>
├─ babel-helper-optimise-call-expression@6.24.1<br>
├─ babel-helper-regex@6.26.0<br>
├─ babel-helper-remap-async-to-generator@6.24.1<br>
├─ babel-helper-replace-supers@6.24.1<br>
├─ babel-helpers@6.24.1<br>
├─ babel-loader@8.0.0-beta.3<br>
├─ babel-messages@6.23.0<br>
├─ babel-plugin-check-es2015-constants@6.22.0<br>
├─ babel-plugin-react-require@3.0.0<br>
├─ babel-plugin-syntax-async-functions@6.13.0<br>
├─ babel-plugin-syntax-class-properties@6.13.0<br>
├─ babel-plugin-syntax-exponentiation-operator@6.13.0<br>
├─ babel-plugin-syntax-flow@6.18.0<br>
├─ babel-plugin-syntax-jsx@6.18.0<br>
├─ babel-plugin-syntax-object-rest-spread@7.0.0-beta.3<br>
├─ babel-plugin-syntax-trailing-function-commas@6.22.0<br>
├─ babel-plugin-transform-async-to-generator@6.24.1<br>
├─ babel-plugin-transform-class-properties@6.24.1<br>
├─ babel-plugin-transform-es2015-arrow-functions@6.22.0<br>
├─ babel-plugin-transform-es2015-block-scoped-functions@6.22.0<br>
├─ babel-plugin-transform-es2015-block-scoping@6.26.0<br>
├─ babel-plugin-transform-es2015-classes@6.24.1<br>
├─ babel-plugin-transform-es2015-computed-properties@6.24.1<br>
├─ babel-plugin-transform-es2015-destructuring@6.23.0<br>
├─ babel-plugin-transform-es2015-duplicate-keys@6.24.1<br>
├─ babel-plugin-transform-es2015-for-of@6.23.0<br>
├─ babel-plugin-transform-es2015-function-name@6.24.1<br>
├─ babel-plugin-transform-es2015-literals@6.22.0<br>
├─ babel-plugin-transform-es2015-modules-amd@6.24.1<br>
├─ babel-plugin-transform-es2015-modules-commonjs@6.26.2<br>
├─ babel-plugin-transform-es2015-modules-systemjs@6.24.1<br>
├─ babel-plugin-transform-es2015-modules-umd@6.24.1<br>
├─ babel-plugin-transform-es2015-object-super@6.24.1<br>
├─ babel-plugin-transform-es2015-parameters@6.24.1<br>
├─ babel-plugin-transform-es2015-shorthand-properties@6.24.1<br>
├─ babel-plugin-transform-es2015-spread@6.22.0<br>
├─ babel-plugin-transform-es2015-sticky-regex@6.24.1<br>
├─ babel-plugin-transform-es2015-template-literals@6.22.0<br>
├─ babel-plugin-transform-es2015-typeof-symbol@6.23.0<br>
├─ babel-plugin-transform-es2015-unicode-regex@6.24.1<br>
├─ babel-plugin-transform-exponentiation-operator@6.24.1<br>
├─ babel-plugin-transform-flow-strip-types@6.22.0<br>
├─ babel-plugin-transform-object-assign@6.22.0<br>
├─ babel-plugin-transform-object-rest-spread@7.0.0-beta.3<br>
├─ babel-plugin-transform-react-display-name@6.25.0<br>
├─ babel-plugin-transform-react-jsx-self@6.22.0<br>
├─ babel-plugin-transform-react-jsx-source@6.22.0<br>
├─ babel-plugin-transform-react-jsx@6.24.1<br>
├─ babel-plugin-transform-react-remove-prop-types@0.4.13<br>
├─ babel-plugin-transform-regenerator@6.26.0<br>
├─ babel-plugin-transform-strict-mode@6.24.1<br>
├─ babel-preset-env@1.7.0<br>
├─ babel-preset-flow@6.23.0<br>
├─ babel-preset-react@6.24.1<br>
├─ babel-register@6.26.0<br>
│ └─ babel-core@6.26.3<br>
├─ babel-runtime@6.26.0<br>
├─ babel-template@6.26.0<br>
├─ babel-traverse@6.26.0<br>
├─ babel-types@6.26.0<br>
└─ netlify-lambda@0.4.0<br>
├─ babel-core@6.26.3<br>
└─ babel-loader@7.1.4</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Parts of my project use ```@babel/*``` and parts of is use ```babel-*```
- Node/npm version: 9.11.1
- OS: Mac OS X 10.13.6 (17G65)
- Monorepo no
- How you are using Babel: register
**Possible Solution**
I guess it should internally ignore "caller" since it adds it internally."><pre class="notranslate"><code class="notranslate">Parts of my project use ```@babel/*``` and parts of is use ```babel-*```
- Node/npm version: 9.11.1
- OS: Mac OS X 10.13.6 (17G65)
- Monorepo no
- How you are using Babel: register
**Possible Solution**
I guess it should internally ignore "caller" since it adds it internally.
</code></pre></div> | <h2 dir="auto">Bug Report</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I would like to work on a fix!</li>
</ul>
<p dir="auto"><strong>Current behavior</strong></p>
<p dir="auto">Code</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="declare global { namespace globalThis { var i18n: any; } }
export class i18n {}"><pre class="notranslate"><span class="pl-k">declare</span> global <span class="pl-kos">{</span> <span class="pl-k">namespace</span> <span class="pl-s1">globalThis</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">i18n</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span>
<span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">i18n</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto">trigger an scope error:</p>
<div class="highlight highlight-text-adblock notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" TypeError: Duplicate declaration "i18n"
1 | declare global { namespace globalThis { var i18n: any; } }
2 |
> 3 | export class i18n {}
| ^^^^
249 | }
250 |
> 251 | return new Error(msg);
| ^
252 | }
253 |
254 | }
at File.buildCodeFrameError (packages/babel-core/lib/transformation/file/file.js:251:12)
at Scope.checkBlockScopedCollisions (packages/babel-traverse/lib/scope/index.js:422:22)
at Scope.registerBinding (packages/babel-traverse/lib/scope/index.js:582:16)
at Scope.registerDeclaration (packages/babel-traverse/lib/scope/index.js:527:12)
at Object.BlockScoped (packages/babel-traverse/lib/scope/index.js:250:12)
at Object.newFn (packages/babel-traverse/lib/visitors.js:216:17)
at NodePath._call (packages/babel-traverse/lib/path/context.js:55:20)
at NodePath.call (packages/babel-traverse/lib/path/context.js:38:14)
at NodePath.visit (packages/babel-traverse/lib/path/context.js:90:31)
at TraversalContext.visitQueue (packages/babel-traverse/lib/context.js:116:16)"><pre class="notranslate"> TypeError: Duplicate declaration "i18n"
1 | declare global { namespace globalThis { var i18n: any; } }
2 <span class="pl-k">|</span>
> 3 | export class i18n {}
| <span class="pl-k">^^^^</span>
249 | }
250 |
> 251 | return new Error(msg);
| <span class="pl-k">^</span>
252 | }
253 |
254 | }
at File.buildCodeFrameError (packages/babel-core/lib/transformation/file/file.js:251:12)
at Scope.checkBlockScopedCollisions (packages/babel-traverse/lib/scope/index.js:422:22)
at Scope.registerBinding (packages/babel-traverse/lib/scope/index.js:582:16)
at Scope.registerDeclaration (packages/babel-traverse/lib/scope/index.js:527:12)
at Object.BlockScoped (packages/babel-traverse/lib/scope/index.js:250:12)
at Object.newFn (packages/babel-traverse/lib/visitors.js:216:17)
at NodePath._call (packages/babel-traverse/lib/path/context.js:55:20)
at NodePath.call (packages/babel-traverse/lib/path/context.js:38:14)
at NodePath.visit (packages/babel-traverse/lib/path/context.js:90:31)
at TraversalContext.visitQueue (packages/babel-traverse/lib/context.js:116:16)</pre></div>
<ul dir="auto">
<li><a href="https://babeljs.io/repl#?browsers=&build=&builtIns=false&spec=false&loose=false&code_lz=CYUwxgNghgTiAEBzCB7ARlC8De8B2UAtiAM4AOUYCy6mAKgBYCWJO8AbrPEwIwAceAFzwoeAJ4BueAF8ZAKDkgAHmRQwALvEhQSrXgJzSgA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=env%2Ctypescript&prettier=false&targets=&version=7.13.14&externalPlugins=%40babel%2Fplugin-transform-modules-systemjs%407.13.8%2C%40babel%2Fplugin-syntax-top-level-await%407.12.13" rel="nofollow">REPL</a></li>
</ul>
<p dir="auto"><strong>Input Code</strong></p>
<p dir="auto">As described above.</p>
<p dir="auto"><strong>Expected behavior</strong></p>
<p dir="auto">This piece of code is <a href="https://www.typescriptlang.org/play?ssl=3&ssc=21&pln=1&pc=1#code/CYUwxgNghgTiAEBzCB7ARlC8De8B2UAtiAM4AOUYCy6mAKgBYCWJO8AbrPEwIwAceAFzwoeAJ4BueAF8ZAKDkgAHmRQwALvEhQSrXgJzSgA" rel="nofollow">valid</a> in TypeScript.</p>
<p dir="auto"><strong>Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)</strong></p>
<ul dir="auto">
<li>Filename: <code class="notranslate">babel.config.js</code></li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"presets": ["@babel/preset-typescript"]
}"><pre class="notranslate"><span class="pl-kos">{</span>
<span class="pl-s">"presets"</span>: <span class="pl-kos">[</span><span class="pl-s">"@babel/preset-typescript"</span><span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): [e.g. v7.12.0]</li>
<li>Node/npm version: [e.g. Node 12/npm 7]</li>
<li>OS: [e.g. macOS 10.15.4, Windows 10]</li>
<li>Monorepo: [e.g. yes/no/Lerna]</li>
<li>How you are using Babel: [e.g. <code class="notranslate">webpack</code>, <code class="notranslate">rollup</code>, <code class="notranslate">parcel</code>, <code class="notranslate">babel-register</code>]</li>
</ul>
<p dir="auto"><strong>Possible Solution</strong></p>
<p dir="auto"><strong>Additional context</strong></p> | 0 |
<p dir="auto">Describe what you were doing when the bug occurred:</p>
<ol dir="auto">
<li>Opened profiler</li>
<li>Recorded</li>
<li>Switched to waterfall</li>
</ol>
<hr>
<h2 dir="auto">Please do not remove the text below this line</h2>
<p dir="auto">DevTools version: 4.0.6-a39d9c3</p>
<p dir="auto">Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11442<br>
at Map.forEach ()<br>
at commitIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11388)<br>
at e.getRankedChartData (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11921)<br>
at xi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:56:277807)<br>
at Ha (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:55891)<br>
at Xl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:98281)<br>
at Hl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:84256)<br>
at Fl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:81286)<br>
at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:25364</p>
<p dir="auto">Component stack: in xi<br>
in div<br>
in div<br>
in div<br>
in Ir<br>
in Unknown<br>
in n<br>
in Unknown<br>
in div<br>
in div<br>
in Wa<br>
in ce<br>
in be<br>
in So<br>
in Vl</p> | <p dir="auto">PLEASE INCLUDE REPRO INSTRUCTIONS AND EXAMPLE CODE</p>
<p dir="auto">I got this error when I click 'Ranked'.</p>
<hr>
<h2 dir="auto">Please do not remove the text below this line</h2>
<p dir="auto">DevTools version: 4.0.4-3c6a219</p>
<p dir="auto">Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11441<br>
at Map.forEach ()<br>
at commitIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11387)<br>
at e.getRankedChartData (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11920)<br>
at _i (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:56:277123)<br>
at Ha (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:55890)<br>
at Xl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:98280)<br>
at Hl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:84255)<br>
at Fl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:81285)<br>
at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:25363</p>
<p dir="auto">Component stack: in _i<br>
in div<br>
in div<br>
in div<br>
in Or<br>
in Unknown<br>
in n<br>
in Unknown<br>
in div<br>
in div<br>
in Ha<br>
in le<br>
in ve<br>
in ko<br>
in Ul</p> | 1 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""name": "doctrine/orm",
"version": "v2.4.8",
"source": {
"type": "git",
"url": "https://github.com/doctrine/doctrine2.git",
"reference": "464b5fdbfbbeb4a65465ac173c4c5d90960f41ff"
}"><pre class="notranslate"><code class="notranslate">"name": "doctrine/orm",
"version": "v2.4.8",
"source": {
"type": "git",
"url": "https://github.com/doctrine/doctrine2.git",
"reference": "464b5fdbfbbeb4a65465ac173c4c5d90960f41ff"
}
</code></pre></div>
<p dir="auto">When the doctrine/ORM bundle is downloaded by composer (URL: <a href="https://api.github.com/repos/doctrine/doctrine2/zipball/464b5fdbfbbeb4a65465ac173c4c5d90960f41ff">https://api.github.com/repos/doctrine/doctrine2/zipball/464b5fdbfbbeb4a65465ac173c4c5d90960f41ff</a>) always the default=last version is returned. I don't know if other references are faulty, too.</p> | <table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
</tbody>
</table>
<p dir="auto">Hello the community,</p>
<p dir="auto">A hunter from our Bug Bounty Program reported that when an input is manually changed from text to an array on the form payload, he receives a 500 instead of a proper violation.</p>
<p dir="auto">For example, if <code class="notranslate">email=bob@lamouche.com</code> is changed to <code class="notranslate">email[]=bob@lamouche.com</code> on an email field having an EmailValidator, we end up with <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Constraints/EmailValidator.php#L50">this exception thrown</a>:</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/symfony/symfony/blob/3e4f97852ddb17b740daaefa6b6df33d462ade59/src/Symfony/Component/Validator/Constraints/EmailValidator.php#L49-L51">symfony/src/Symfony/Component/Validator/Constraints/EmailValidator.php</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 49 to 51
in
<a data-pjax="true" class="commit-tease-sha" href="/symfony/symfony/commit/3e4f97852ddb17b740daaefa6b6df33d462ade59">3e4f978</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L49" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="49"></td>
<td id="LC49" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> (!is_scalar(<span class="pl-s1"><span class="pl-c1">$</span>value</span>) && !(is_object(<span class="pl-s1"><span class="pl-c1">$</span>value</span>) && method_exists(<span class="pl-s1"><span class="pl-c1">$</span>value</span>, <span class="pl-s">'__toString'</span>))) { </td>
</tr>
<tr class="border-0">
<td id="L50" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="50"></td>
<td id="LC50" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">UnexpectedTypeException</span>(<span class="pl-s1"><span class="pl-c1">$</span>value</span>, <span class="pl-s">'string'</span>); </td>
</tr>
<tr class="border-0">
<td id="L51" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="51"></td>
<td id="LC51" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<p dir="auto">This is obvious, and not really an issue as field was manually changed, but this might create false positives on error logs / monitoring if abused. Wouldn't it be cleaner to add a violation to the field, simply telling that the value is not an email?</p> | 0 |
<p dir="auto">I am upgrading Pandas from 0.8.1 to 0.10.1.dev-f7f7e13 . My environment is Window XP with below: Python: 2.7.3 Numpy: 1.6.2 MPL: 1.1.1 Pandas: 0.10.1.dev-f7f7e13.</p>
<p dir="auto">Then OK application on 0.8.1 now meets errors. I trace the root cause to filtering the duplicated index of Series. Detail in : <a href="http://stackoverflow.com/questions/14395678/how-to-drop-extra-copy-of-duplicate-index-of-pandas-series" rel="nofollow">http://stackoverflow.com/questions/14395678/how-to-drop-extra-copy-of-duplicate-index-of-pandas-series</a></p>
<p dir="auto">simply put: below snippet has two issues :</p>
<p dir="auto">import pandas as pd<br>
idx_tp = [('600809', '20061231'), ('600809', '20070331'), ('600809', '20070630'), ('600809', '20070331')]<br>
dt = ['demo','demo','demo','demo']<br>
idx = pd.MultiIndex.from_tuples(idx_tp,names = ['STK_ID','RPT_Date'])<br>
s = pd.Series(dt,index=idx)</p>
<h1 dir="auto">Issue 1: s[s.index.unique()] works well on 0.8.1 but not 0.10.1</h1>
<h1 dir="auto">Issue 2: s.groupby(s.index).first() will crash on my machine</h1> | <h4 dir="auto">Code:</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32
>>> pd.__version__
'0.20.1'
>>> import platform
>>> platform.platform()
'Windows-7-6.1.7601-SP1'
>>> import pandas as pd
>>> df = pd.read_csv(r'c:\tmp\中文.csv')
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2881, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-6-0cd6317422e5>", line 1, in <module>
df = pd.read_csv(r'c:\tmp\中文.csv')
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 655, in parser_f
return _read(filepath_or_buffer, kwds)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 405, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 762, in __init__
self._make_engine(self.engine)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 966, in _make_engine
self._engine = CParserWrapper(self.f, **self.options)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 1582, in __init__
self._reader = parsers.TextReader(src, **kwds)
File "pandas\_libs\parsers.pyx", line 394, in pandas._libs.parsers.TextReader.__cinit__ (pandas\_libs\parsers.c:4209)
File "pandas\_libs\parsers.pyx", line 712, in pandas._libs.parsers.TextReader._setup_parser_source (pandas\_libs\parsers.c:8895)
OSError: Initializing from file failed"><pre class="notranslate"><span class="pl-v">Python</span> <span class="pl-c1">3.6</span><span class="pl-c1">.0</span> <span class="pl-c1">|</span><span class="pl-v">Anaconda</span> <span class="pl-c1">4.3</span><span class="pl-c1">.1</span> (<span class="pl-c1">64</span><span class="pl-c1">-</span><span class="pl-s1">bit</span>)<span class="pl-c1">|</span> (<span class="pl-s1">default</span>, <span class="pl-v">Dec</span> <span class="pl-c1">23</span> <span class="pl-c1">2016</span>, <span class="pl-c1">11</span>:<span class="pl-c1">57</span>:<span class="pl-c1">41</span>) [<span class="pl-v">MSC</span> <span class="pl-s1">v</span><span class="pl-c1">.1900</span> <span class="pl-c1">64</span> <span class="pl-en">bit</span> (<span class="pl-v">AMD64</span>)] <span class="pl-s1">on</span> <span class="pl-s1">win32</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">pd</span>.<span class="pl-s1">__version__</span>
<span class="pl-s">'0.20.1'</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-k">import</span> <span class="pl-s1">platform</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">platform</span>.<span class="pl-en">platform</span>()
<span class="pl-s">'Windows-7-6.1.7601-SP1'</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">read_csv</span>(<span class="pl-s">r'c:\tmp\中文.csv'</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-v">File</span> <span class="pl-s">"C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">2881</span>, <span class="pl-s1">in</span> <span class="pl-s1">run_code</span>
<span class="pl-en">exec</span>(<span class="pl-s1">code_obj</span>, <span class="pl-s1">self</span>.<span class="pl-s1">user_global_ns</span>, <span class="pl-s1">self</span>.<span class="pl-s1">user_ns</span>)
<span class="pl-v">File</span> <span class="pl-s">"<ipython-input-6-0cd6317422e5>"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1</span>, <span class="pl-s1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>
<span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">read_csv</span>(<span class="pl-s">r'c:\tmp\中文.csv'</span>)
<span class="pl-v">File</span> <span class="pl-s">"C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">655</span>, <span class="pl-s1">in</span> <span class="pl-s1">parser_f</span>
<span class="pl-k">return</span> <span class="pl-en">_read</span>(<span class="pl-s1">filepath_or_buffer</span>, <span class="pl-s1">kwds</span>)
<span class="pl-v">File</span> <span class="pl-s">"C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">405</span>, <span class="pl-s1">in</span> <span class="pl-s1">_read</span>
<span class="pl-s1">parser</span> <span class="pl-c1">=</span> <span class="pl-v">TextFileReader</span>(<span class="pl-s1">filepath_or_buffer</span>, <span class="pl-c1">**</span><span class="pl-s1">kwds</span>)
<span class="pl-v">File</span> <span class="pl-s">"C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">762</span>, <span class="pl-s1">in</span> <span class="pl-s1">__init__</span>
<span class="pl-s1">self</span>.<span class="pl-en">_make_engine</span>(<span class="pl-s1">self</span>.<span class="pl-s1">engine</span>)
<span class="pl-v">File</span> <span class="pl-s">"C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">966</span>, <span class="pl-s1">in</span> <span class="pl-s1">_make_engine</span>
<span class="pl-s1">self</span>.<span class="pl-s1">_engine</span> <span class="pl-c1">=</span> <span class="pl-v">CParserWrapper</span>(<span class="pl-s1">self</span>.<span class="pl-s1">f</span>, <span class="pl-c1">**</span><span class="pl-s1">self</span>.<span class="pl-s1">options</span>)
<span class="pl-v">File</span> <span class="pl-s">"C:\ProgramData\Anaconda3\lib\site-packages\pandas\io\parsers.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1582</span>, <span class="pl-s1">in</span> <span class="pl-s1">__init__</span>
<span class="pl-s1">self</span>.<span class="pl-s1">_reader</span> <span class="pl-c1">=</span> <span class="pl-s1">parsers</span>.<span class="pl-v">TextReader</span>(<span class="pl-s1">src</span>, <span class="pl-c1">**</span><span class="pl-s1">kwds</span>)
<span class="pl-v">File</span> <span class="pl-s">"pandas\_libs\parsers.pyx"</span>, <span class="pl-s1">line</span> <span class="pl-c1">394</span>, <span class="pl-s1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">_libs</span>.<span class="pl-s1">parsers</span>.<span class="pl-v">TextReader</span>.<span class="pl-en">__cinit__</span> (<span class="pl-s1">pandas</span>\_<span class="pl-s1">libs</span>\p<span class="pl-s1">arsers</span>.<span class="pl-s1">c</span>:<span class="pl-c1">4209</span>)
<span class="pl-v">File</span> <span class="pl-s">"pandas\_libs\parsers.pyx"</span>, <span class="pl-s1">line</span> <span class="pl-c1">712</span>, <span class="pl-s1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">_libs</span>.<span class="pl-s1">parsers</span>.<span class="pl-v">TextReader</span>.<span class="pl-en">_setup_parser_source</span> (<span class="pl-s1">pandas</span>\_<span class="pl-s1">libs</span>\p<span class="pl-s1">arsers</span>.<span class="pl-s1">c</span>:<span class="pl-c1">8895</span>)
<span class="pl-v">OSError</span>: <span class="pl-v">Initializing</span> <span class="pl-k">from</span> <span class="pl-s1">file</span> <span class="pl-s1">failed</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">python 3.6 changed sys.getfilesystemencoding() to return "utf-8" instead of "mbcs"<br>
see <a href="https://www.python.org/dev/peps/pep-0529/" rel="nofollow">PEP 529</a>.</p>
<h3 dir="auto">How to fix</h3>
<p dir="auto">Here is the problem: <a href="https://github.com/pandas-dev/pandas/blob/master/pandas/_libs/parsers.pyx#L689">parsers.pyx</a></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if isinstance(source, basestring):
if not isinstance(source, bytes):
source = source.encode(sys.getfilesystemencoding() or 'utf-8')"><pre class="notranslate"><span class="pl-k">if</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">source</span>, <span class="pl-s1">basestring</span>):
<span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">source</span>, <span class="pl-s1">bytes</span>):
<span class="pl-s1">source</span> <span class="pl-c1">=</span> <span class="pl-s1">source</span>.<span class="pl-en">encode</span>(<span class="pl-s1">sys</span>.<span class="pl-en">getfilesystemencoding</span>() <span class="pl-c1">or</span> <span class="pl-s">'utf-8'</span>)</pre></div>
<p dir="auto">the source parameter is our filename, and will be encoded to 'utf-8', not legacy 'mbcs' in python 3.6<br>
and finally passed to open() in <a href="https://github.com/pandas-dev/pandas/blob/master/pandas/_libs/src/parser/io.c#L26">io.c:new_file_source</a><br>
thus interpreted as a mbcs string, so, the "File not found" exception is not suprised<br>
maybe this should be the responsiblity of cython for python 3.6 to handle these things by using unicode version of windows API,<br>
but for now, we just replace sys.getfilesystemencoding() to "mbcs"</p> | 0 |
<p dir="auto">For example:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var geometry = new THREE.BoxBufferGeometry( 1, 1, 1 );
var material = new THREE.MeshNormalMaterial();
var mesh = new THREE.Mesh( geometry, material );
var m = new THREE.Mesh().copy( mesh );
console.log( m.geometry ); // BufferGeometry with no attributes
console.log( m.material ); // MeshBasicMaterial"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">geometry</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">BoxBufferGeometry</span><span class="pl-kos">(</span> <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">1</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">material</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">MeshNormalMaterial</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">mesh</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">Mesh</span><span class="pl-kos">(</span> <span class="pl-s1">geometry</span><span class="pl-kos">,</span> <span class="pl-s1">material</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">m</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">Mesh</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">copy</span><span class="pl-kos">(</span> <span class="pl-s1">mesh</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">m</span><span class="pl-kos">.</span><span class="pl-c1">geometry</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// BufferGeometry with no attributes</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">m</span><span class="pl-kos">.</span><span class="pl-c1">material</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// MeshBasicMaterial</span></pre></div>
<p dir="auto">Likewise for <code class="notranslate">Line</code>, <code class="notranslate">LineSegments</code>, and <code class="notranslate">Point</code>.</p>
<p dir="auto"><code class="notranslate">Sprite</code>, does not copy the material.</p> | <p dir="auto">Hi Friends!</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SpriteMaterial.sizeAttenuation = false"><pre class="notranslate"><code class="notranslate">SpriteMaterial.sizeAttenuation = false
</code></pre></div>
<p dir="auto">seems not working as expected with <code class="notranslate">rayCaster</code>.<br>
I doubt the sprite size(dimension) estimation may be a little bit off, ray is very hard to hit them after apply <code class="notranslate">scale()</code>, especially scale down.<br>
I can upload a simplified code that regenerate this problem a bit later.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r96</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
</ul>
<p dir="auto">Thanks!</p> | 0 |
<h1 dir="auto">I encountered an animation error</h1>
<p dir="auto">This is the case, I exported a gltf model with animation through the 3dmax export plugin provided by babylon.js. It plays normally in the 3d viewer that comes with windows, and it plays normally in the online gltf viewer provided by babylon.js, but when I use three.js, it plays incorrectly. Looks like a matrix transformation error. I really try to fix it. I don’t know if any friends have encountered similar problems. . .</p>
<h2 dir="auto">In the three.js</h2>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/45628282/92949210-49909680-f48d-11ea-99b1-a8064de7bc5a.png"><img src="https://user-images.githubusercontent.com/45628282/92949210-49909680-f48d-11ea-99b1-a8064de7bc5a.png" alt="304a47830036cec5157908b893ad7a0" style="max-width: 100%;"></a></p>
<h2 dir="auto">In the windows 3D viewer</h2>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/45628282/92949174-38478a00-f48d-11ea-9768-1c3e3ca05029.png"><img src="https://user-images.githubusercontent.com/45628282/92949174-38478a00-f48d-11ea-9768-1c3e3ca05029.png" alt="5fd0b72089e585132194626dda89bfb" style="max-width: 100%;"></a></p>
<h2 dir="auto">In the babylon.js sandbox</h2>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/45628282/92949342-852b6080-f48d-11ea-9f11-f907cb7a0f72.png"><img src="https://user-images.githubusercontent.com/45628282/92949342-852b6080-f48d-11ea-9f11-f907cb7a0f72.png" alt="7d57625e88fadfe90ba0955d6d8a545" style="max-width: 100%;"></a></p> | <h5 dir="auto">Description of the problem</h5>
<p dir="auto">i want to highlight the corner of my OBJ .and i used this url <a href="https://threejs.org/examples/webgl_postprocessing_outline.html" rel="nofollow">https://threejs.org/examples/webgl_postprocessing_outline.html</a> for my code<br>
but now the problem is:<br>
i need the background transparent....<br>
but transparency will be lost when the outline effect is working<br>
before outline effect the background is transparent and i can see the red body background<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/33297591/57973136-4f16c300-79a4-11e9-8b2a-1a3618213012.png"><img src="https://user-images.githubusercontent.com/33297591/57973136-4f16c300-79a4-11e9-8b2a-1a3618213012.png" alt="grafik" style="max-width: 100%;"></a><br>
after outline effect<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/33297591/57973159-a2891100-79a4-11e9-9324-ad03833f0f80.png"><img src="https://user-images.githubusercontent.com/33297591/57973159-a2891100-79a4-11e9-9324-ad03833f0f80.png" alt="grafik" style="max-width: 100%;"></a></p>
<h5 dir="auto">Three.js version</h5> | 0 |
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: not relevant
PowerToys version: not relevant
PowerToy module for which you are reporting the bug (if applicable): not relevant"><pre class="notranslate"><code class="notranslate">Windows build number: not relevant
PowerToys version: not relevant
PowerToy module for which you are reporting the bug (if applicable): not relevant
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Checkout PowerToys repo into the folder where you have nuget.config file (or any parent of this folder contains that file).<br>
Nuget.config file contains:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<config>
<add key="repositorypath" value="c:\CxCache" />
</config>"><pre class="notranslate"><code class="notranslate"><config>
<add key="repositorypath" value="c:\CxCache" />
</config>
</code></pre></div>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Nuget packages are resolved correctly and the build succeeds.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Packages are restored incorrectly and the build fails.<br>
Nuget restore tries to use defined cache for packages and will add duplicate references into every project file<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11967522/86092834-5c124b00-baae-11ea-8e04-0b1a27fd6fba.png"><img src="https://user-images.githubusercontent.com/11967522/86092834-5c124b00-baae-11ea-8e04-0b1a27fd6fba.png" alt="nugetRestoreIssue" style="max-width: 100%;"></a></p>
<p dir="auto">Build will then complain that packages are missing<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11967522/86092914-79471980-baae-11ea-8059-d0a87cf706c8.png"><img src="https://user-images.githubusercontent.com/11967522/86092914-79471980-baae-11ea-8059-d0a87cf706c8.png" alt="buildIssue" style="max-width: 100%;"></a></p>
<h1 dir="auto">Screenshots</h1> | <p dir="auto">Hi,</p>
<p dir="auto">Wanted to be able to save split window formations or even custom positions for windows . So after computer restart all those windows can be opened all together if the configurations for few windows are saved.</p>
<p dir="auto">There should be a possibility to retrieve both a long term version of these windows in user specified files and also retrieve the previous positions used (the last time they were used together).and obviously long term versions could be deleted if user wants.</p>
<p dir="auto">IF these could be accessed with some neat shortcuts it would be great.And if a user wants to just open a singular window independently without using the saved framework they should open as they already do (like full screen )</p>
<p dir="auto">Thanks<br>
P.S. Dont know if this already is possible somehow</p> | 0 |
<h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">I would like to be able to maximize windows to span across multiple monitors and not just carve up each monitor with its own zones.</p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">Ideally it would be great if I get just click the maximize button and have the window maximize to more than 1 screen,<br>
For me I have 3 screens but I only want to have 2 screens linked to be 1 virtual big screen.</p>
<p dir="auto">It would be great if we could create a virtual screen linking more than one monitor and then be able to carve that up into zones.</p> | <h1 dir="auto">Support zones which span several monitors</h1>
<p dir="auto">Could you please add the capability to define zones across several monitors? For instance I would like to define one single zone spanning two monitors (this is my current setup with ultramon for instance).<br>
Thanks very much</p> | 1 |
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6134295/13566431/8c8fb676-e490-11e5-8546-4d5a68ae34db.png"><img src="https://cloud.githubusercontent.com/assets/6134295/13566431/8c8fb676-e490-11e5-8546-4d5a68ae34db.png" alt="image" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6134295/13566470/ba8e910a-e490-11e5-90b2-9cca9c76e372.png"><img src="https://cloud.githubusercontent.com/assets/6134295/13566470/ba8e910a-e490-11e5-90b2-9cca9c76e372.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I have only added a space before the <code class="notranslate"><</code> on line 5.<br>
Is it incorrect highlight ? I have remove all extensions and reinstall VSCode and set <code class="notranslate">javascript.validate.enable</code> to false, it didn't work.</p>
<p dir="auto">Besides, I had used <code class="notranslate">npm</code> install <code class="notranslate">jshint</code> and <code class="notranslate">eslint</code> in global but the highlight didn't change after I removed all of them.</p>
<p dir="auto">VSCode version :<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6134295/13567557/e52abeec-e496-11e5-885e-eabb2feddd33.png"><img src="https://cloud.githubusercontent.com/assets/6134295/13567557/e52abeec-e496-11e5-885e-eabb2feddd33.png" alt="image" style="max-width: 100%;"></a></p> | <p dir="auto">Ported from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="94376232" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript-Sublime-Plugin/issues/285" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript-Sublime-Plugin/issues/285/hovercard" href="https://github.com/microsoft/TypeScript-Sublime-Plugin/issues/285">microsoft/TypeScript-Sublime-Plugin#285</a></p>
<p dir="auto">Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="91870539" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript-Sublime-Plugin/issues/265" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript-Sublime-Plugin/issues/265/hovercard" href="https://github.com/microsoft/TypeScript-Sublime-Plugin/issues/265">microsoft/TypeScript-Sublime-Plugin#265</a>.</p>
<p dir="auto">Issue:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1707813/8627292/da8f8be4-26fe-11e5-97ce-2b2a8b257afa.png"><img src="https://cloud.githubusercontent.com/assets/1707813/8627292/da8f8be4-26fe-11e5-97ce-2b2a8b257afa.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Correct:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1707813/8627340/3e27dbf2-26ff-11e5-8751-7e8576cbd230.png"><img src="https://cloud.githubusercontent.com/assets/1707813/8627340/3e27dbf2-26ff-11e5-8751-7e8576cbd230.png" alt="image" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">I'm doing some work in filtering and having a bit of a rough time. I went looking for some examples and I found this:</p>
<p dir="auto"><a href="http://azitech.wordpress.com/2011/03/15/designing-a-butterworth-low-pass-filter-with-scipy/" rel="nofollow">http://azitech.wordpress.com/2011/03/15/designing-a-butterworth-low-pass-filter-with-scipy/</a></p>
<p dir="auto">It looks to me like a perfectly valid set of examples, and he's even generated some example output. It looks reasonable.</p>
<p dir="auto">So I download the code and try running it on my machine. I see this error:<br>
/usr/lib/python2.7/dist-packages/scipy/signal/filter_design.py:288: BadCoefficients: Badly conditioned filter coefficients (numerator): the results may be meaningless<br>
"results may be meaningless", BadCoefficients)<br>
b=[ 1.50249921e-18], a=[ 1. -9.78671066 43.10310124 -112.50164481 192.7084543<br>
-226.36430741 184.66074807 -103.30140929 37.92528936 -8.25143211<br>
0.80791132]</p>
<p dir="auto">And then the graph looks substantially different:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/e5d68ccb67641b636b0981590803add906e215f04c7d285efb791c653118f4eb/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3130343532302f313331383437352f30316630383735322d333262642d313165332d383333362d6361636463306362616334302e706e67"><img src="https://camo.githubusercontent.com/e5d68ccb67641b636b0981590803add906e215f04c7d285efb791c653118f4eb/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3130343532302f313331383437352f30316630383735322d333262642d313165332d383333362d6361636463306362616334302e706e67" alt="output" data-canonical-src="https://f.cloud.github.com/assets/104520/1318475/01f08752-32bd-11e3-8336-cacdc0cbac40.png" style="max-width: 100%;"></a></p>
<p dir="auto">The thing that strikes me is that in the filter passbands are HUGELY different. The example output he shows has a passband gain of 1. My passband gain is 10^-5 so it's all attenuation.</p>
<p dir="auto">I found this ticket <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="13652418" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/2140" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/2140/hovercard" href="https://github.com/scipy/scipy/issues/2140">#2140</a> and it mentioned problems with the "small enough to zero out" number. I'm running a newer version of scipy which already has the 1e-14 threshold so that doesn't seem to be the problem.</p>
<p dir="auto">This is really puzzling me.</p> | <p dir="auto">The <a href="https://github.com/scipy/scipy/blob/master/scipy/signal/filter_design.py#L593"><code class="notranslate">iirfilter()</code></a> function internally generates filter prototypes in zpk format, transforms them to tf format, and then back to zpk format:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="z, p, k = typefunc(N)
b, a = zpk2tf(z, p, k)
b, a = lp2lp(b, a, wo=warped)
b, a = bilinear(b, a, fs=fs)
return tf2zpk(b, a)"><pre class="notranslate"><code class="notranslate">z, p, k = typefunc(N)
b, a = zpk2tf(z, p, k)
b, a = lp2lp(b, a, wo=warped)
b, a = bilinear(b, a, fs=fs)
return tf2zpk(b, a)
</code></pre></div>
<p dir="auto">But conversion to tf format introduces numerical errors, causing higher-order filters to fail, even though the higher-order prototypes work fine. It should use zpk format (or state-space format?) throughout, and these functions should be changed to accept zpk format or be replaced by ones that do.</p>
<p dir="auto">I started to implement this, but then realized it involves lots of changes to lots of functions, some of which I'm not sure the best way to do, so registering this issue in case others want to work on it, too.</p>
<p dir="auto">For instance, <a href="http://www.mathworks.com/help/signal/ref/bilinear.html" rel="nofollow">matlab's bilinear function</a> accepts tf, zpk, and ss formats, by varying the number of input parameters, which I don't think is "Pythonic" (though <code class="notranslate">lti()</code> does it). <a href="http://docs.scipy.org/doc/scipy-dev/reference/generated/scipy.signal.bilinear.html" rel="nofollow">SciPy's bilinear function</a> accepts <code class="notranslate">b</code> and <code class="notranslate">a</code> as separate parameters, and then <code class="notranslate">fs</code>, so it can't be modified to use variable number of input variables anyway, without breaking compatibility. A new function could be created that takes zpk, or the existing function could take a list as its first parameter instead, which could be zpk, tf, or ss, or something else.</p>
<p dir="auto">For comparison, Octave uses <a href="http://octave.sourceforge.net/signal/function/sftrans.html" rel="nofollow">sftrans</a> instead of lp2lp, and only accepts zpk format.</p> | 1 |
<p dir="auto">I'm behind a proxy at work, and I'm having issues getting requests to use the proxy. urllib2 is able to use it just fine, but requests fails. I've tried both setting an environment variable (both HTTPS_PROXY and https_proxy) and passing in a dict, but neither work.</p>
<p dir="auto">I'm on OSX 10.7.5 using Python 2.7.3 and requests 1.1.0 installed in a virtualenv via pip.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(osx)gfairchild@stueyemac ~> set | grep -i proxy
HTTPS_PROXY=https://proxy.com:8080
https_proxy=https://proxy.com:8080
(osx)gfairchild@stueyemac ~> python
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> r = urllib2.urlopen('https://google.com')
>>> print r.read()
<!doctype html><html itemscope="itemscope" itemtype="http://schema.org/WebPage"><head><meta content="Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for." name="description"><meta content="noodp" name="robots"><meta itemprop="image" content="/images/google_favicon_128.png"><title>Google</title><script>(function(){
window.google={kEI:"I-gsUdvaLMn-0gHWhIHIAg",getEI:function(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||google.kEI},https:function(){return"https:"==window.location.protocol},kEXPI:"17259,18168,39523,4000116,4001569,4001948,4001959,4001975,4002001,4002159,4002562,4002734,4002855,4002858,4003372,4003374,4003387,4003514,4003575,4003638,4003917,4003944,4003982,4004015,4004064,4004074,4004083,4004152,4004181,4004214,4004241,4004276,4004298",kCSI:{e:"17259,18168,39523,4000116,4001569,4001948,4001959,4001975,4002001,4002159,4002562,4002734,4002855,4002858,4003372,4003374,4003387,4003514,4003575,4003638,4003917,4003944,4003982,4004015,4004064,4004074,4004083,4004152,4004181,4004214,4004241,4004276,4004298",ei:"I-gsUdvaLMn-0gHWhIHIAg"},authuser:0,ml:function(){},kHL:"en",time:function(){return(new Date).getTime()},log:function(a,
b,c,k){var d=new Image,f=google.lc,e=google.li,g="";d.onerror=d.onload=d.onabort=function(){delete f[e]};f[e]=d;!c&&-1==b.search("&ei=")&&(g="&ei="+google.getEI(k));c=c||"/gen_204?atyp=i&ct="+a+"&cad="+b+g+"&zx="+google.time();a=/^http:/i;a.test(c)&&google.https()?(google.ml(Error("GLMM"),!1,{src:c}),delete f[e]):(d.src=c,google.li=e+1)},lc:[],li:0,Toolbelt:{},y:{},x:function(a,b){google.y[a.id]=[a,b];return!1},load:function(a,b){google.x({id:"l"+a},function(){google.load(a,b)})}};
})();
(function(){var d=!1;google.sn="webhp";google.timers={};google.startTick=function(a,b){google.timers[a]={t:{start:google.time()},bfr:!!b}};google.tick=function(a,b,h){google.timers[a]||google.startTick(a);google.timers[a].t[b]=h||google.time()};google.startTick("load",!0);
try{}catch(e){}})();
var _gjwl=location;function _gjuc(){var a=_gjwl.href.indexOf("#");if(0<=a&&(a=_gjwl.href.substring(a),0<a.indexOf("&q=")||0<=a.indexOf("#q=")))if(a=a.substring(1),-1==a.indexOf("#")){for(var d=0;d<a.length;){var b=d;"&"==a.charAt(b)&&++b;var c=a.indexOf("&",b);-1==c&&(c=a.length);b=a.substring(b,c);if(0==b.indexOf("fp="))a=a.substring(0,d)+a.substring(c,a.length),c=d;else if("cad=h"==b)return 0;d=c}_gjwl.href="/search?"+a+"&cad=h";return 1}return 0}
function _gjp(){(!window._gjwl.hash||!window._gjuc())&&setTimeout(_gjp,500)};
window._gjp&&_gjp();</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}</style><style>.h{font-family:arial,sans-serif}body{font-family:arial,sans-serif}td{font-family:arial,sans-serif}a{font-family:arial,sans-serif}p{font-family:arial,sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}.h{color:#36c}.q{color:#00c}.ts{border-collapse:collapse}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.ts td{padding:0}em{font-weight:bold;font-style:normal}.lst{height:25px;width:496px;font:18px arial,sans-serif}.gsfi{font:18px arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{display:inline-box;display: inline-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}body{background:#fff;color:black}a.gb1{color:#11c !important}a.gb2{color:#11c !important}a.gb3{color:#11c !important}a.gb4{color:#11c !important}.sblc{padding-top:5px}.lsbb{background:#eee;border:solid 1px;border-color:#ccc #999 #999 #ccc;height:30px}a{color:#11c;text-decoration:none}a:hover{text-decoration:underline}a:active{text-decoration:underline}.fl a{color:#36c}a:visited{color:#551a8b}a.gb1{text-decoration:underline}a.gb4{text-decoration:underline}a.gb3:hover{text-decoration:none}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px}#ghead a.gb2:hover{color:#fff !important}.lsbb{display:block}.ftl{display:inline-block;margin:0 12px}.lsb{background:url(/images/srpr/nav_logo80.png) 0 -258px repeat-x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top}#fll a{display:inline-block;margin:0 12px}.lsb:active{background:#ccc}.lst:focus{outline:none}#addlang a{padding:0 3px}</style><script></script> </head><body dir="ltr" bgcolor="#fff"><script>(function(){var src='/images/srpr/nav_logo80.png';var iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new Image().src=src;}
if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}
}
})();</script><textarea id="csi" style="display:none"></textarea><div id="mngb"><div id=gbar><nobr><b class=gb1>Search</b> <a class=gb1 href="https://www.google.com/imghp?hl=en&tab=wi">Images</a> <a class=gb1 href="https://maps.google.com/maps?hl=en&tab=wl">Maps</a> <a class=gb1 href="https://play.google.com/?hl=en&tab=w8">Play</a> <a class=gb1 href="https://www.youtube.com/?tab=w1">YouTube</a> <a class=gb1 href="https://news.google.com/nwshp?hl=en&tab=wn">News</a> <a class=gb1 href="https://mail.google.com/mail/?tab=wm">Gmail</a> <a class=gb1 href="https://drive.google.com/?tab=wo">Drive</a> <a class=gb1 style="text-decoration:none" href="http://www.google.com/intl/en/options/"><u>More</u> &raquo;</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a href="http://www.google.com/history/optout?hl=en" class=gb4>Web History</a> | <a href="/preferences?hl=en" class=gb4>Settings</a> | <a target=_top id=gb_70 href="https://accounts.google.com/ServiceLogin?hl=en&continue=https://www.google.com/" class=gb4>Sign in</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div></div><iframe name="wgjf" style="display:none"></iframe><center><br clear="all" id="lgpd"><div id="lga"><img alt="Google" height="95" src="/intl/en_ALL/images/srpr/logo1w.png" width="275" id="hplogo" onload="window.lol&&lol()" style="padding:28px 0 14px"><br><br></div><form action="/search" name="f"><table cellpadding="0" cellspacing="0"><tr valign="top"><td width="25%">&nbsp;</td><td align="center" nowrap="nowrap"><input name="ie" value="ISO-8859-1" type="hidden"><input value="en" name="hl" type="hidden"><input name="source" type="hidden" value="hp"><div class="ds" style="height:32px;margin:4px 0"><input autocomplete="off" class="lst" value="" title="Google Search" maxlength="2048" name="q" size="57" style="color:#000;margin:0;padding:5px 8px 0 6px;vertical-align:top"></div><br style="line-height:0"><span class="ds"><span class="lsbb"><input class="lsb" value="Google Search" name="btnG" type="submit"></span></span><span class="ds"><span class="lsbb"><input class="lsb" value="I'm Feeling Lucky" name="btnI" type="submit" onclick="if(this.form.q.value)this.checked=1; else top.location='/doodles/'"></span></span></td><td class="fl sblc" align="left" nowrap="nowrap" width="25%"><a href="/advanced_search?hl=en&amp;authuser=0">Advanced search</a><a href="/language_tools?hl=en&amp;authuser=0">Language tools</a></td></tr></table><input type="hidden" id="gbv" name="gbv" value="1"></form><div id="gac_scont"></div><div style="font-size:83%;min-height:3.5em"><br></div><span id="footer"><div style="font-size:10pt"><div id="fll" style="margin:19px auto;text-align:center"><a href="/intl/en/ads/">Advertising&nbsp;Programs</a><a href="/services/">Business Solutions</a><a href="https://plus.google.com/116899029375914044550" rel="publisher">+Google</a><a href="/intl/en/about.html">About Google</a></div></div><p style="color:#767676;font-size:8pt">&copy; 2012 - <a href="/intl/en/policies/">Privacy & Terms</a></p></span></center><div id=xjsd></div><div id=xjsi><script>if(google.y)google.y.first=[];(function(){var b;function c(a){window.setTimeout(function(){var d=document.createElement("script");d.src=a;document.getElementById("xjsd").appendChild(d)},0)}google.dljp=function(a){b=a;google.xjsi||(google.xjsu=a,c(b))};google.dlj=c;})();
if(!google.xjs){google.dstr=[];google.rein=[];window._=window._||{};window._._DumpException=function(e){throw e};if(google.timers&&google.timers.load.t){google.timers.load.t.xjsls=new Date().getTime();}google.dljp('/xjs/_/js/hp/sb_he,pcc/rt\x3dj/ver\x3ddUr8sRKOHrQ.en_US./d\x3d1/sv\x3d1/rs\x3dAItRSTMOuVd64TXf59sLZpeyfeaOnqHKgQ');google.xjs=1;}google.pmc={sb:{"agen":false,"cgen":true,"client":"heirloom-hp","dh":true,"ds":"","eqch":true,"fl":true,"host":"google.com","jsonp":true,"msgs":{"lcky":"I\u0026#39;m Feeling Lucky","lml":"Learn more","oskt":"Input tools","psrc":"This search was removed from your \u003Ca href=\"/history\"\u003EWeb History\u003C/a\u003E","psrl":"Remove","sbit":"Search by image","srch":"Google Search"},"ovr":{"l":1,"ms":1},"pq":"","qcpw":false,"scd":10,"sce":5,"stok":"2TLNAUa1t9yVii-aHCy9IeO1J4M"},hp:{},pcc:{}};google.y.first.push(function(){if(google.med){google.med('init');google.initHistory();google.med('history');}google.History&&google.History.initialize('/');google.hs&&google.hs.init&&google.hs.init()});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);}</script></div><script>(function(){var b,c,d,e;function g(a,f){a.removeEventListener?(a.removeEventListener("load",f,!1),a.removeEventListener("error",f,!1)):(a.detachEvent("onload",f),a.detachEvent("onerror",f))}function h(a){e=(new Date).getTime();++c;a=a||window.event;a=a.target||a.srcElement;g(a,h)}var k=document.getElementsByTagName("img");b=k.length;
for(var l=c=0,m;l<b;++l)m=k[l],m.complete||"string"!=typeof m.src||!m.src?++c:m.addEventListener?(m.addEventListener("load",h,!1),m.addEventListener("error",h,!1)):(m.attachEvent("onload",h),m.attachEvent("onerror",h));d=b-c;
function n(){if(google.timers.load.t){google.timers.load.t.ol=(new Date).getTime();google.timers.load.t.iml=e;google.kCSI.imc=c;google.kCSI.imn=b;google.kCSI.imp=d;void 0!==google.stt&&(google.kCSI.stt=google.stt);google.csiReport&&google.csiReport()}}window.addEventListener?window.addEventListener("load",n,!1):window.attachEvent&&window.attachEvent("onload",n);google.timers.load.t.prt=e=(new Date).getTime();})();
</script></body></html>
>>> import requests
>>> r = requests.get('https://google.com')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/api.py", line 55, in get
return request('get', url, **kwargs)
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/sessions.py", line 279, in request
resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/sessions.py", line 374, in send
r = adapter.send(request, **kwargs)
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/adapters.py", line 209, in send
raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='proxy.com', port=8080): Max retries exceeded with url: https://google.com/ (Caused by <class 'socket.error'>: [Errno 54] Connection reset by peer)
>>> p = {'https': 'https://proxy.com:8080',}
>>> r = requests.get('https://google.com', proxies=p)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/api.py", line 55, in get
return request('get', url, **kwargs)
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/sessions.py", line 279, in request
resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/sessions.py", line 374, in send
r = adapter.send(request, **kwargs)
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/adapters.py", line 209, in send
raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='proxy.com', port=8080): Max retries exceeded with url: https://google.com/ (Caused by <class 'socket.error'>: [Errno 54] Connection reset by peer)"><pre class="notranslate"><code class="notranslate">(osx)gfairchild@stueyemac ~> set | grep -i proxy
HTTPS_PROXY=https://proxy.com:8080
https_proxy=https://proxy.com:8080
(osx)gfairchild@stueyemac ~> python
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> r = urllib2.urlopen('https://google.com')
>>> print r.read()
<!doctype html><html itemscope="itemscope" itemtype="http://schema.org/WebPage"><head><meta content="Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for." name="description"><meta content="noodp" name="robots"><meta itemprop="image" content="/images/google_favicon_128.png"><title>Google</title><script>(function(){
window.google={kEI:"I-gsUdvaLMn-0gHWhIHIAg",getEI:function(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||google.kEI},https:function(){return"https:"==window.location.protocol},kEXPI:"17259,18168,39523,4000116,4001569,4001948,4001959,4001975,4002001,4002159,4002562,4002734,4002855,4002858,4003372,4003374,4003387,4003514,4003575,4003638,4003917,4003944,4003982,4004015,4004064,4004074,4004083,4004152,4004181,4004214,4004241,4004276,4004298",kCSI:{e:"17259,18168,39523,4000116,4001569,4001948,4001959,4001975,4002001,4002159,4002562,4002734,4002855,4002858,4003372,4003374,4003387,4003514,4003575,4003638,4003917,4003944,4003982,4004015,4004064,4004074,4004083,4004152,4004181,4004214,4004241,4004276,4004298",ei:"I-gsUdvaLMn-0gHWhIHIAg"},authuser:0,ml:function(){},kHL:"en",time:function(){return(new Date).getTime()},log:function(a,
b,c,k){var d=new Image,f=google.lc,e=google.li,g="";d.onerror=d.onload=d.onabort=function(){delete f[e]};f[e]=d;!c&&-1==b.search("&ei=")&&(g="&ei="+google.getEI(k));c=c||"/gen_204?atyp=i&ct="+a+"&cad="+b+g+"&zx="+google.time();a=/^http:/i;a.test(c)&&google.https()?(google.ml(Error("GLMM"),!1,{src:c}),delete f[e]):(d.src=c,google.li=e+1)},lc:[],li:0,Toolbelt:{},y:{},x:function(a,b){google.y[a.id]=[a,b];return!1},load:function(a,b){google.x({id:"l"+a},function(){google.load(a,b)})}};
})();
(function(){var d=!1;google.sn="webhp";google.timers={};google.startTick=function(a,b){google.timers[a]={t:{start:google.time()},bfr:!!b}};google.tick=function(a,b,h){google.timers[a]||google.startTick(a);google.timers[a].t[b]=h||google.time()};google.startTick("load",!0);
try{}catch(e){}})();
var _gjwl=location;function _gjuc(){var a=_gjwl.href.indexOf("#");if(0<=a&&(a=_gjwl.href.substring(a),0<a.indexOf("&q=")||0<=a.indexOf("#q=")))if(a=a.substring(1),-1==a.indexOf("#")){for(var d=0;d<a.length;){var b=d;"&"==a.charAt(b)&&++b;var c=a.indexOf("&",b);-1==c&&(c=a.length);b=a.substring(b,c);if(0==b.indexOf("fp="))a=a.substring(0,d)+a.substring(c,a.length),c=d;else if("cad=h"==b)return 0;d=c}_gjwl.href="/search?"+a+"&cad=h";return 1}return 0}
function _gjp(){(!window._gjwl.hash||!window._gjuc())&&setTimeout(_gjp,500)};
window._gjp&&_gjp();</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}</style><style>.h{font-family:arial,sans-serif}body{font-family:arial,sans-serif}td{font-family:arial,sans-serif}a{font-family:arial,sans-serif}p{font-family:arial,sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}.h{color:#36c}.q{color:#00c}.ts{border-collapse:collapse}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.ts td{padding:0}em{font-weight:bold;font-style:normal}.lst{height:25px;width:496px;font:18px arial,sans-serif}.gsfi{font:18px arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{display:inline-box;display: inline-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}body{background:#fff;color:black}a.gb1{color:#11c !important}a.gb2{color:#11c !important}a.gb3{color:#11c !important}a.gb4{color:#11c !important}.sblc{padding-top:5px}.lsbb{background:#eee;border:solid 1px;border-color:#ccc #999 #999 #ccc;height:30px}a{color:#11c;text-decoration:none}a:hover{text-decoration:underline}a:active{text-decoration:underline}.fl a{color:#36c}a:visited{color:#551a8b}a.gb1{text-decoration:underline}a.gb4{text-decoration:underline}a.gb3:hover{text-decoration:none}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px}#ghead a.gb2:hover{color:#fff !important}.lsbb{display:block}.ftl{display:inline-block;margin:0 12px}.lsb{background:url(/images/srpr/nav_logo80.png) 0 -258px repeat-x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top}#fll a{display:inline-block;margin:0 12px}.lsb:active{background:#ccc}.lst:focus{outline:none}#addlang a{padding:0 3px}</style><script></script> </head><body dir="ltr" bgcolor="#fff"><script>(function(){var src='/images/srpr/nav_logo80.png';var iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new Image().src=src;}
if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}
}
})();</script><textarea id="csi" style="display:none"></textarea><div id="mngb"><div id=gbar><nobr><b class=gb1>Search</b> <a class=gb1 href="https://www.google.com/imghp?hl=en&tab=wi">Images</a> <a class=gb1 href="https://maps.google.com/maps?hl=en&tab=wl">Maps</a> <a class=gb1 href="https://play.google.com/?hl=en&tab=w8">Play</a> <a class=gb1 href="https://www.youtube.com/?tab=w1">YouTube</a> <a class=gb1 href="https://news.google.com/nwshp?hl=en&tab=wn">News</a> <a class=gb1 href="https://mail.google.com/mail/?tab=wm">Gmail</a> <a class=gb1 href="https://drive.google.com/?tab=wo">Drive</a> <a class=gb1 style="text-decoration:none" href="http://www.google.com/intl/en/options/"><u>More</u> &raquo;</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a href="http://www.google.com/history/optout?hl=en" class=gb4>Web History</a> | <a href="/preferences?hl=en" class=gb4>Settings</a> | <a target=_top id=gb_70 href="https://accounts.google.com/ServiceLogin?hl=en&continue=https://www.google.com/" class=gb4>Sign in</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div></div><iframe name="wgjf" style="display:none"></iframe><center><br clear="all" id="lgpd"><div id="lga"><img alt="Google" height="95" src="/intl/en_ALL/images/srpr/logo1w.png" width="275" id="hplogo" onload="window.lol&&lol()" style="padding:28px 0 14px"><br><br></div><form action="/search" name="f"><table cellpadding="0" cellspacing="0"><tr valign="top"><td width="25%">&nbsp;</td><td align="center" nowrap="nowrap"><input name="ie" value="ISO-8859-1" type="hidden"><input value="en" name="hl" type="hidden"><input name="source" type="hidden" value="hp"><div class="ds" style="height:32px;margin:4px 0"><input autocomplete="off" class="lst" value="" title="Google Search" maxlength="2048" name="q" size="57" style="color:#000;margin:0;padding:5px 8px 0 6px;vertical-align:top"></div><br style="line-height:0"><span class="ds"><span class="lsbb"><input class="lsb" value="Google Search" name="btnG" type="submit"></span></span><span class="ds"><span class="lsbb"><input class="lsb" value="I'm Feeling Lucky" name="btnI" type="submit" onclick="if(this.form.q.value)this.checked=1; else top.location='/doodles/'"></span></span></td><td class="fl sblc" align="left" nowrap="nowrap" width="25%"><a href="/advanced_search?hl=en&amp;authuser=0">Advanced search</a><a href="/language_tools?hl=en&amp;authuser=0">Language tools</a></td></tr></table><input type="hidden" id="gbv" name="gbv" value="1"></form><div id="gac_scont"></div><div style="font-size:83%;min-height:3.5em"><br></div><span id="footer"><div style="font-size:10pt"><div id="fll" style="margin:19px auto;text-align:center"><a href="/intl/en/ads/">Advertising&nbsp;Programs</a><a href="/services/">Business Solutions</a><a href="https://plus.google.com/116899029375914044550" rel="publisher">+Google</a><a href="/intl/en/about.html">About Google</a></div></div><p style="color:#767676;font-size:8pt">&copy; 2012 - <a href="/intl/en/policies/">Privacy & Terms</a></p></span></center><div id=xjsd></div><div id=xjsi><script>if(google.y)google.y.first=[];(function(){var b;function c(a){window.setTimeout(function(){var d=document.createElement("script");d.src=a;document.getElementById("xjsd").appendChild(d)},0)}google.dljp=function(a){b=a;google.xjsi||(google.xjsu=a,c(b))};google.dlj=c;})();
if(!google.xjs){google.dstr=[];google.rein=[];window._=window._||{};window._._DumpException=function(e){throw e};if(google.timers&&google.timers.load.t){google.timers.load.t.xjsls=new Date().getTime();}google.dljp('/xjs/_/js/hp/sb_he,pcc/rt\x3dj/ver\x3ddUr8sRKOHrQ.en_US./d\x3d1/sv\x3d1/rs\x3dAItRSTMOuVd64TXf59sLZpeyfeaOnqHKgQ');google.xjs=1;}google.pmc={sb:{"agen":false,"cgen":true,"client":"heirloom-hp","dh":true,"ds":"","eqch":true,"fl":true,"host":"google.com","jsonp":true,"msgs":{"lcky":"I\u0026#39;m Feeling Lucky","lml":"Learn more","oskt":"Input tools","psrc":"This search was removed from your \u003Ca href=\"/history\"\u003EWeb History\u003C/a\u003E","psrl":"Remove","sbit":"Search by image","srch":"Google Search"},"ovr":{"l":1,"ms":1},"pq":"","qcpw":false,"scd":10,"sce":5,"stok":"2TLNAUa1t9yVii-aHCy9IeO1J4M"},hp:{},pcc:{}};google.y.first.push(function(){if(google.med){google.med('init');google.initHistory();google.med('history');}google.History&&google.History.initialize('/');google.hs&&google.hs.init&&google.hs.init()});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);}</script></div><script>(function(){var b,c,d,e;function g(a,f){a.removeEventListener?(a.removeEventListener("load",f,!1),a.removeEventListener("error",f,!1)):(a.detachEvent("onload",f),a.detachEvent("onerror",f))}function h(a){e=(new Date).getTime();++c;a=a||window.event;a=a.target||a.srcElement;g(a,h)}var k=document.getElementsByTagName("img");b=k.length;
for(var l=c=0,m;l<b;++l)m=k[l],m.complete||"string"!=typeof m.src||!m.src?++c:m.addEventListener?(m.addEventListener("load",h,!1),m.addEventListener("error",h,!1)):(m.attachEvent("onload",h),m.attachEvent("onerror",h));d=b-c;
function n(){if(google.timers.load.t){google.timers.load.t.ol=(new Date).getTime();google.timers.load.t.iml=e;google.kCSI.imc=c;google.kCSI.imn=b;google.kCSI.imp=d;void 0!==google.stt&&(google.kCSI.stt=google.stt);google.csiReport&&google.csiReport()}}window.addEventListener?window.addEventListener("load",n,!1):window.attachEvent&&window.attachEvent("onload",n);google.timers.load.t.prt=e=(new Date).getTime();})();
</script></body></html>
>>> import requests
>>> r = requests.get('https://google.com')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/api.py", line 55, in get
return request('get', url, **kwargs)
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/sessions.py", line 279, in request
resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/sessions.py", line 374, in send
r = adapter.send(request, **kwargs)
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/adapters.py", line 209, in send
raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='proxy.com', port=8080): Max retries exceeded with url: https://google.com/ (Caused by <class 'socket.error'>: [Errno 54] Connection reset by peer)
>>> p = {'https': 'https://proxy.com:8080',}
>>> r = requests.get('https://google.com', proxies=p)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/api.py", line 55, in get
return request('get', url, **kwargs)
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/sessions.py", line 279, in request
resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/sessions.py", line 374, in send
r = adapter.send(request, **kwargs)
File "/Users/gfairchild/Documents/work/compepi/Twitter/lib/osx/lib/python2.7/site-packages/requests/adapters.py", line 209, in send
raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='proxy.com', port=8080): Max retries exceeded with url: https://google.com/ (Caused by <class 'socket.error'>: [Errno 54] Connection reset by peer)
</code></pre></div> | <p dir="auto">Sending a POST request with an empty body read from an empty file and a <code class="notranslate">Content-Length: 0</code> header times out after a long time instead of doing normal processing.</p>
<h2 dir="auto">Expected Result</h2>
<p dir="auto">Sending an empty body from a file with <code class="notranslate">Content-Length: 0</code> should send the request and return a result in a similar amount of time as a non-empty request, or a request without <code class="notranslate">Content-Length: 0</code>, or an empty body provided as a string.</p>
<p dir="auto">For example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cat repro2.py
import requests, tempfile
with tempfile.NamedTemporaryFile() as tf:
print requests.Session().send(requests.Request('POST', 'https://www.google.com', data=open(tf.name)).prepare())
$ python repro2.py
<Response [405]>"><pre class="notranslate"><code class="notranslate">$ cat repro2.py
import requests, tempfile
with tempfile.NamedTemporaryFile() as tf:
print requests.Session().send(requests.Request('POST', 'https://www.google.com', data=open(tf.name)).prepare())
$ python repro2.py
<Response [405]>
</code></pre></div>
<p dir="auto">Or using a string body:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cat repro3.py
import requests, tempfile
print requests.Session().send(requests.Request('POST', 'https://www.google.com', headers={'Content-Length': u'0'}, data='').prepare())
$ python repro3.py
<Response [405]>"><pre class="notranslate"><code class="notranslate">$ cat repro3.py
import requests, tempfile
print requests.Session().send(requests.Request('POST', 'https://www.google.com', headers={'Content-Length': u'0'}, data='').prepare())
$ python repro3.py
<Response [405]>
</code></pre></div>
<p dir="auto">Or a non-empty file:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cat repro5.py
import requests, tempfile
with tempfile.NamedTemporaryFile() as tf:
tf.write('x')
tf.flush()
print requests.post('https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name))
$ python repro5.py
<Response [405]>"><pre class="notranslate"><code class="notranslate">$ cat repro5.py
import requests, tempfile
with tempfile.NamedTemporaryFile() as tf:
tf.write('x')
tf.flush()
print requests.post('https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name))
$ python repro5.py
<Response [405]>
</code></pre></div>
<h2 dir="auto">Actual Result</h2>
<p dir="auto">However, with the specific combination of a <code class="notranslate">Content-Length: 0</code> header and an empty open file descriptor, the request times out after 4 minutes with an error.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ pip freeze | grep requests
requests==2.18.2
$ cat repro1.py
import requests, tempfile
with tempfile.NamedTemporaryFile() as tf:
requests.Session().send(requests.Request('POST', 'https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name)).prepare())
$ time python repro1.py
Traceback (most recent call last):
File "repro1.py", line 4, in <module>
requests.Session().send(requests.Request('POST', 'https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name)).prepare())
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/sessions.py", line 612, in send
r = adapter.send(request, **kwargs)
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/adapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
real 4m0.480s
user 0m0.296s
sys 0m0.040s
$ cat repro4.py
import requests, tempfile
with tempfile.NamedTemporaryFile() as tf:
print requests.post('https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name))
$ time python repro4.py
Traceback (most recent call last):
File "repro4.py", line 4, in <module>
print requests.post('https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name))
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/sessions.py", line 502, in request
resp = self.send(prep, **send_kwargs)
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/sessions.py", line 612, in send
r = adapter.send(request, **kwargs)
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/adapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
real 4m5.474s
user 0m0.288s
sys 0m0.036s
"><pre class="notranslate"><code class="notranslate">$ pip freeze | grep requests
requests==2.18.2
$ cat repro1.py
import requests, tempfile
with tempfile.NamedTemporaryFile() as tf:
requests.Session().send(requests.Request('POST', 'https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name)).prepare())
$ time python repro1.py
Traceback (most recent call last):
File "repro1.py", line 4, in <module>
requests.Session().send(requests.Request('POST', 'https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name)).prepare())
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/sessions.py", line 612, in send
r = adapter.send(request, **kwargs)
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/adapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
real 4m0.480s
user 0m0.296s
sys 0m0.040s
$ cat repro4.py
import requests, tempfile
with tempfile.NamedTemporaryFile() as tf:
print requests.post('https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name))
$ time python repro4.py
Traceback (most recent call last):
File "repro4.py", line 4, in <module>
print requests.post('https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name))
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/sessions.py", line 502, in request
resp = self.send(prep, **send_kwargs)
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/sessions.py", line 612, in send
r = adapter.send(request, **kwargs)
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/adapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
real 4m5.474s
user 0m0.288s
sys 0m0.036s
</code></pre></div>
<h2 dir="auto">Reproduction Steps</h2>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import requests, tempfile
with tempfile.NamedTemporaryFile() as tf:
print requests.post('https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">requests</span>, <span class="pl-s1">tempfile</span>
<span class="pl-k">with</span> <span class="pl-s1">tempfile</span>.<span class="pl-v">NamedTemporaryFile</span>() <span class="pl-k">as</span> <span class="pl-s1">tf</span>:
<span class="pl-k">print</span> <span class="pl-s1">requests</span>.<span class="pl-en">post</span>(<span class="pl-s">'https://www.google.com'</span>, <span class="pl-s1">headers</span><span class="pl-c1">=</span>{<span class="pl-s">'Content-Length'</span>: <span class="pl-s">u'0'</span>}, <span class="pl-s1">data</span><span class="pl-c1">=</span><span class="pl-en">open</span>(<span class="pl-s1">tf</span>.<span class="pl-s1">name</span>))</pre></div>
<h2 dir="auto">System Information</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python -m requests.help"><pre class="notranslate"><code class="notranslate">$ python -m requests.help
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.5.2"
},
"implementation": {
"name": "CPython",
"version": "2.7.13"
},
"platform": {
"release": "4.4.0-78-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1000207f",
"version": "16.1.0"
},
"requests": {
"version": "2.18.2"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}"><pre class="notranslate"><code class="notranslate">{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.5.2"
},
"implementation": {
"name": "CPython",
"version": "2.7.13"
},
"platform": {
"release": "4.4.0-78-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1000207f",
"version": "16.1.0"
},
"requests": {
"version": "2.18.2"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
</code></pre></div>
<h2 dir="auto">Workaround</h2>
<p dir="auto">Check if the file is empty before sending and, if it is, substitute the file descriptor for an empty string.</p> | 0 |
<p dir="auto">Clicking the button "close map aside" does not collapse the map on the screen's side, overlapping all other pages.</p> | <h4 dir="auto">Issue Description</h4>
<p dir="auto">When a user uses email and GitHub alternately the activity and successful challenges are not linked for both although the user is same.</p> | 0 |
<h5 dir="auto">Issue Type:</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">ansible 1.9.2<br>
configured module search path = None</p>
<h5 dir="auto">Ansible Configuration:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# inventory
127.0.0.1 "><pre class="notranslate"><code class="notranslate"># inventory
127.0.0.1
</code></pre></div>
<h5 dir="auto">Environment:</h5>
<p dir="auto">CentOS 6.6</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">this issue is similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="96566374" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/11695" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/11695/hovercard" href="https://github.com/ansible/ansible/issues/11695">#11695</a></p>
<p dir="auto">I have the case, that ansible want use ssh connection, if i run ansible-playbook with argument <code class="notranslate">"--connection=local"</code> or <code class="notranslate">"-c local"</code>.<br>
If I set in playbook file <code class="notranslate">"connection: local"</code> we have this problem, too.</p>
<p dir="auto">The only way, how it works is, if we set in inventory file <code class="notranslate">"ansible_connection=local"</code> or if we give an extra argument to ansible-playbook command: <code class="notranslate">"-e ansible_connection=local"</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: Test ping on localhost
hosts: localhost
connection: local
tasks:
- name: Ping!
ping:"><pre class="notranslate"><code class="notranslate">
---
- name: Test ping on localhost
hosts: localhost
connection: local
tasks:
- name: Ping!
ping:
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="run: `ansible-playbook -v test.yml`
Remove the line connection: `local from test.yml`
run: `ansible-playbook -v test.yml --connection=local`"><pre class="notranslate"><code class="notranslate">run: `ansible-playbook -v test.yml`
Remove the line connection: `local from test.yml`
run: `ansible-playbook -v test.yml --connection=local`
</code></pre></div>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">Ansible being able to run locally without the need to have ssh installed.</p>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">Ansible doesn't require ssh when ansible_connection=local is defined in the hosts file.<br>
Ansible requires ssh for a playbook when run with flag --connection=local.<br>
Ansible requires ssh for a playbook when declared connection: local in the playbook.</p> | <h5 dir="auto">Issue Type:</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">ansible 1.9.2<br>
configured module search path = None</p>
<h5 dir="auto">Ansible Configuration:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# /etc/ansible/hosts
localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python2"><pre class="notranslate"><code class="notranslate"># /etc/ansible/hosts
localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python2
</code></pre></div>
<h5 dir="auto">Environment:</h5>
<p dir="auto">Archlinux (running ansible locally)</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">Ansible can't run playbooks locally without ssh if <code class="notranslate">ansible_connection=local</code> is defined in the hosts file, although it can run playbooks locally without ssh with <code class="notranslate">connection: local</code> in the playbook or with flag <code class="notranslate">--connection=local</code>.</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<ul dir="auto">
<li>Create <code class="notranslate">test.yml</code>:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
---
- name: Test ping on localhost
hosts: localhost
connection: local
tasks:
- name: Ping!
ping:"><pre class="notranslate"><code class="notranslate">
---
- name: Test ping on localhost
hosts: localhost
connection: local
tasks:
- name: Ping!
ping:
</code></pre></div>
<ul dir="auto">
<li>run: <code class="notranslate">ansible-playbook -v test.yml</code></li>
<li>Remove the line <code class="notranslate">connection: local</code> from <code class="notranslate">test.yml</code></li>
<li>run: <code class="notranslate">ansible-playbook -v test.yml --connection=local</code></li>
</ul>
<p dir="auto">Notice that until now it works perfectly fine.</p>
<ul dir="auto">
<li>Run <code class="notranslate">ansible-playbook -v test.yml</code> and notice output:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "/usr/bin/ansible", line 197, in <module>
(runner, results) = cli.run(options, args)
File "/usr/bin/ansible", line 163, in run
extra_vars=extra_vars,
File "/usr/lib/python2.7/site-packages/ansible/runner/__init__.py", line 233, in __init__
cmd = subprocess.Popen(['ssh','-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
File "/usr/bin/ansible", line 197, in <module>
(runner, results) = cli.run(options, args)
File "/usr/bin/ansible", line 163, in run
extra_vars=extra_vars,
File "/usr/lib/python2.7/site-packages/ansible/runner/__init__.py", line 233, in __init__
cmd = subprocess.Popen(['ssh','-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
</code></pre></div>
<ul dir="auto">
<li>Install <code class="notranslate">ssh</code> (e.g. on archlinux: <code class="notranslate">pacman -S openssh</code>) and run again the command <code class="notranslate">ansible-playbook -v test.yml</code>. Notice it works again.</li>
</ul>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">Ansible being able to run locally without the need to have ssh installed.</p>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">Ansible <strong>requires ssh</strong> when <code class="notranslate">ansible_connection=local</code> is defined in the hosts file.<br>
Ansible <strong>doesn't require ssh</strong> for a playbook when run with flag <code class="notranslate">--connection=local</code>.<br>
Ansible <strong>doesn't require ssh</strong> for a playbook when declared <code class="notranslate">connection: local</code> in the playbook.</p> | 1 |
<p dir="auto">Not sure if this is supposed to be like this.</p>
<p dir="auto">original issue here: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="34931590" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/7332" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/7332/hovercard" href="https://github.com/pandas-dev/pandas/issues/7332">pandas-dev/pandas#7332</a><br>
cross post to numexpr here: <a href="https://code.google.com/p/numexpr/issues/detail?id=126" rel="nofollow">https://code.google.com/p/numexpr/issues/detail?id=126</a></p>
<p dir="auto">essentially in pandas were looking up a <code class="notranslate">dtype,type</code> in a cython dictionary</p>
<p dir="auto">turns out that for <code class="notranslate">int64</code> (and <code class="notranslate">int32</code> but NOT <code class="notranslate">int64</code> on 32-bit platforms), the hashes are DIFFERENT, but same for other dtypes (including <code class="notranslate">float64</code>).</p>
<p dir="auto">Is this maybe an implementation detail on <code class="notranslate">numexpr</code> and/or incorrect usage of <code class="notranslate">dtype.type</code> and/or invalid guarantees on this object?</p>
<p dir="auto">FYI, we switched to using <code class="notranslate">dtype.name</code> for the lookup and no issues.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [20]: import numexpr as ne
In [21]: import numpy as np
In [22]: ne.__version__
Out[22]: '2.4'
In [23]: np.__version__
Out[23]: '1.8.1'
In [24]: a = np.arange(10,dtype='int64')
In [25]: b = np.arange(10,dtype='int64')
In [26]: result_ne = ne.evaluate('a+b')
In [27]: result_numpy = a+b
In [28]: (result_ne == result_numpy).all()
Out[28]: True
In [29]: result_ne.dtype.type
Out[29]: numpy.int64
In [30]: result_numpy.dtype.type
Out[30]: numpy.int64
In [31]: hash(result_ne.dtype.type)
Out[31]: 8768103730016
In [32]: hash(result_numpy.dtype.type)
Out[32]: 8768103729990"><pre class="notranslate"><code class="notranslate">In [20]: import numexpr as ne
In [21]: import numpy as np
In [22]: ne.__version__
Out[22]: '2.4'
In [23]: np.__version__
Out[23]: '1.8.1'
In [24]: a = np.arange(10,dtype='int64')
In [25]: b = np.arange(10,dtype='int64')
In [26]: result_ne = ne.evaluate('a+b')
In [27]: result_numpy = a+b
In [28]: (result_ne == result_numpy).all()
Out[28]: True
In [29]: result_ne.dtype.type
Out[29]: numpy.int64
In [30]: result_numpy.dtype.type
Out[30]: numpy.int64
In [31]: hash(result_ne.dtype.type)
Out[31]: 8768103730016
In [32]: hash(result_numpy.dtype.type)
Out[32]: 8768103729990
</code></pre></div>
<p dir="auto">For the floats the same though</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [1]: a = np.arange(10.)
In [2]: b = np.arange(10.)
n [4]: hash(ne.evaluate('a+b').dtype.type)
Out[4]: 8751212391216
In [5]: hash((a+b).dtype.type)
Out[5]: 8751212391216"><pre class="notranslate"><code class="notranslate">In [1]: a = np.arange(10.)
In [2]: b = np.arange(10.)
n [4]: hash(ne.evaluate('a+b').dtype.type)
Out[4]: 8751212391216
In [5]: hash((a+b).dtype.type)
Out[5]: 8751212391216
</code></pre></div> | <p dir="auto">The current documentation of <a href="https://docs.scipy.org/doc/numpy-dev/reference/c-api.dtype.html" rel="nofollow">enumerated types</a> makes me think there are 8 values possible for integers ((signed, unsigned) * (8, 16, 32, 64) bits).</p>
<p dir="auto">However, if I dump the values of the enumeration I have results that are not consistent with the documentation:</p>
<p dir="auto">Windows x64 (with <code class="notranslate">sizeof(long) = 4</code>)</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="NPY_BYTE = 1
NPY_UBYTE = 2
NPY_INT8 = 1
NPY_UINT8 = 2
NPY_SHORT = 3
NPY_USHORT = 4
NPY_INT16 = 3
NPY_UINT16 = 4
NPY_INT = 5
NPY_UINT = 6
NPY_INT32 = 7
NPY_UINT32 = 8
NPY_LONG = 7
NPY_ULONG = 8
NPY_INT64 = 9
NPY_UINT64 = 10
NPY_LONGLONG = 9
NPY_ULONGLONG = 10"><pre class="notranslate">NPY_BYTE = 1
NPY_UBYTE = 2
NPY_INT8 = 1
NPY_UINT8 = 2
NPY_SHORT = 3
NPY_USHORT = 4
NPY_INT16 = 3
NPY_UINT16 = 4
NPY_INT = 5
NPY_UINT = 6
NPY_INT32 = 7
NPY_UINT32 = 8
NPY_LONG = 7
NPY_ULONG = 8
NPY_INT64 = 9
NPY_UINT64 = 10
NPY_LONGLONG = 9
NPY_ULONGLONG = 10</pre></div>
<p dir="auto"><code class="notranslate">NPY_INT</code> and <code class="notranslate">NPY_INT32</code> differ (the same for <code class="notranslate">NPY_UINT</code> and <code class="notranslate">NPY_UIN32</code>).</p>
<p dir="auto">Linux x64 (with <code class="notranslate">sizeof(long) = 8</code>)</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="NPY_BYTE = 1
NPY_UBYTE = 2
NPY_INT8 = 1
NPY_UINT8 = 2
NPY_SHORT = 3
NPY_USHORT = 4
NPY_INT16 = 3
NPY_UINT16 = 4
NPY_INT = 5
NPY_UINT = 6
NPY_INT32 = 5
NPY_UINT32 = 6
NPY_LONG = 7
NPY_ULONG = 8
NPY_INT64 = 7
NPY_UINT64 = 8
NPY_LONGLONG = 9
NPY_ULONGLONG = 10"><pre class="notranslate">NPY_BYTE = 1
NPY_UBYTE = 2
NPY_INT8 = 1
NPY_UINT8 = 2
NPY_SHORT = 3
NPY_USHORT = 4
NPY_INT16 = 3
NPY_UINT16 = 4
NPY_INT = 5
NPY_UINT = 6
NPY_INT32 = 5
NPY_UINT32 = 6
NPY_LONG = 7
NPY_ULONG = 8
NPY_INT64 = 7
NPY_UINT64 = 8
NPY_LONGLONG = 9
NPY_ULONGLONG = 10</pre></div>
<p dir="auto">Here, <code class="notranslate">NPY_INT64</code> and <code class="notranslate">NPY_LONGLONG</code> differ (the same for <code class="notranslate">NPY_UIN64</code> and <code class="notranslate">NPY_ULONGLONG</code>)<br>
In both cases (Windows and Linux) we have 10 values for integer instead of 8.</p>
<p dir="auto">Is that expected ? I'm using numpy v1.13.3.</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/wolfv/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/wolfv">@wolfv</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/SylvainCorlay/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/SylvainCorlay">@SylvainCorlay</a></p> | 1 |
<p dir="auto">Hey,</p>
<p dir="auto">had to describe the issue in one line, here is the possibiltiy to reproduce</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="DELETE campaigns
PUT campaigns
{
"mappings" : {
"campaign" : {
"properties" : {
"location" : {
"type": "geo_shape",
"tree": "quadtree"
}
}
}
}
}
POST /campaigns/campaign/1
{
"location" : {
"type" : "circle",
"coordinates" : [45.01, 2.26],
"radius" : "9000m"
}
}
POST campaigns/campaign/
{
"_id": { "c_id": "1891"},
"location" : {
"type" : "circle",
"coordinates" : [45.01, 2.26],
"radius" : "9000m"
}
}
GET campaigns/campaign/_search
GET campaigns/campaign/_search
{
"query":{
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geo_shape": {
"location": {
"relation": "intersects",
"shape": {
"type": "circle",
"coordinates" : [45.01001, 2.26],
"radius":"1m"
}
}
}
}
}
}
}"><pre class="notranslate"><code class="notranslate">DELETE campaigns
PUT campaigns
{
"mappings" : {
"campaign" : {
"properties" : {
"location" : {
"type": "geo_shape",
"tree": "quadtree"
}
}
}
}
}
POST /campaigns/campaign/1
{
"location" : {
"type" : "circle",
"coordinates" : [45.01, 2.26],
"radius" : "9000m"
}
}
POST campaigns/campaign/
{
"_id": { "c_id": "1891"},
"location" : {
"type" : "circle",
"coordinates" : [45.01, 2.26],
"radius" : "9000m"
}
}
GET campaigns/campaign/_search
GET campaigns/campaign/_search
{
"query":{
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geo_shape": {
"location": {
"relation": "intersects",
"shape": {
"type": "circle",
"coordinates" : [45.01001, 2.26],
"radius":"1m"
}
}
}
}
}
}
}
</code></pre></div>
<p dir="auto">You can see the difference between match all and the geo shape query, even though the points are the same. If you remove the <code class="notranslate">_id</code> field from the document, everything works, so maybe the IdFieldMapper throws an Exception (rightfully, as an id cannot be an object) and then the rest of the document is not indexed.</p>
<p dir="auto">If you replace the <code class="notranslate">_id</code> object with a string, you get an exception, that the id values dont match as one ID is autogenerated. Not sure, if this is the desired behaviour.</p> | <p dir="auto">Currently routing and ID values can be passed in the query string and url respectively, but they can also be extracted from fields within the document.</p>
<p dir="auto">This has a significant performance impact because each doc needs to be parsed on the node which receives the index/get/update/delete request in order to know which node should handle the request.</p>
<p dir="auto">On top of that, there are clashes between (eg) routing values set in fields and parent settings.</p>
<p dir="auto">We should deprecate the functionality to extract these values from fields, and make it the responsibility of the client code instead.</p>
<p dir="auto">It should still be possible to set <code class="notranslate">_routing</code> to required. Perhaps we should set this automatically if the user ever passes in a routing or parent value at index time?</p>
<p dir="auto">Relates to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="51553271" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/8870" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/8870/hovercard" href="https://github.com/elastic/elasticsearch/issues/8870">#8870</a></p> | 1 |
<p dir="auto">EDIT: Summary: <code class="notranslate">B = A; (t->B()).(spzeros(10))</code> constructs a sparse vector of type <code class="notranslate">Any</code>, while <code class="notranslate">(t->A()).(spzeros(10))</code> constructs correctly a sparse array of type <code class="notranslate">A</code></p>
<p dir="auto">I hope this is not a duplicate.</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> struct A end
julia> function test(x)
B = A
(t->B()).(x)
end
julia> test(zeros(1))
1-element Array{A,1}:
A()"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-k">struct</span> A <span class="pl-k">end</span>
julia<span class="pl-k">></span> <span class="pl-k">function</span> <span class="pl-en">test</span>(x)
B <span class="pl-k">=</span> A
(t<span class="pl-k">-></span><span class="pl-c1">B</span>())<span class="pl-k">.</span>(x)
<span class="pl-k">end</span>
julia<span class="pl-k">></span> <span class="pl-c1">test</span>(<span class="pl-c1">zeros</span>(<span class="pl-c1">1</span>))
<span class="pl-c1">1</span><span class="pl-k">-</span>element Array{A,<span class="pl-c1">1</span>}<span class="pl-k">:</span>
<span class="pl-c1">A</span>()</pre></div>
<p dir="auto">all seems ok. However,</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> using SparseArrays
julia> test(spzeros(1))
1-element SparseVector{Any,Int64} with 1 stored entry:
[1] = A()"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-k">using</span> SparseArrays
julia<span class="pl-k">></span> <span class="pl-c1">test</span>(<span class="pl-c1">spzeros</span>(<span class="pl-c1">1</span>))
<span class="pl-c1">1</span><span class="pl-k">-</span>element SparseVector{Any,Int64} with <span class="pl-c1">1</span> stored entry<span class="pl-k">:</span>
[<span class="pl-c1">1</span>] <span class="pl-k">=</span> <span class="pl-c1">A</span>()</pre></div>
<p dir="auto">So the eltype could not be infered. Note that</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> (t->A()).(spzeros(1))
1-element SparseVector{A,Int64} with 1 stored entry:
[1] = A()"><pre class="notranslate">julia<span class="pl-k">></span> (t<span class="pl-k">-></span><span class="pl-c1">A</span>())<span class="pl-k">.</span>(<span class="pl-c1">spzeros</span>(<span class="pl-c1">1</span>))
<span class="pl-c1">1</span><span class="pl-k">-</span>element SparseVector{A,Int64} with <span class="pl-c1">1</span> stored entry<span class="pl-k">:</span>
[<span class="pl-c1">1</span>] <span class="pl-k">=</span> <span class="pl-c1">A</span>()</pre></div>
<p dir="auto">has no problem whatsoever</p> | <p dir="auto">I could produce the following segfault with fresh Julia 1.7.0 installs on two different HPC clusters (redhat enterprise) and a regular desktop machine (ubuntu). Note that while on one machine it would already segfault for <code class="notranslate">N=5</code> on a different machine I had to set <code class="notranslate">N>20</code>. So try varying this if you can't reproduce.</p>
<p dir="auto">(Julia started with multiple threads, e.g. <code class="notranslate">julia -t 8</code>)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> n = 1000;
julia> N = 20;
julia> Threads.@threads for i in 1:N
A = randn(Float64, n, n); inv(A);
end
signal (11): Segmentation fault
in expression starting at REPL[2]:1
dgetrf_parallel at /cm/shared/apps/pc2/EB-SW/software/Julia/1.7.0-linux-x86_64/bin/../lib/julia/libopenblas64_.so (unknown line)
dgetrf_parallel at /cm/shared/apps/pc2/EB-SW/software/Julia/1.7.0-linux-x86_64/bin/../lib/julia/libopenblas64_.so (unknown line)
dgetrf_parallel at /cm/shared/apps/pc2/EB-SW/software/Julia/1.7.0-linux-x86_64/bin/../lib/julia/libopenblas64_.so (unknown line)
dgetrf_parallel at /cm/shared/apps/pc2/EB-SW/software/Julia/1.7.0-linux-x86_64/bin/../lib/julia/libopenblas64_.so (unknown line)
dgetrf_parallel at /cm/shared/apps/pc2/EB-SW/software/Julia/1.7.0-linux-x86_64/bin/../lib/julia/libopenblas64_.so (unknown line)
dgetrf_64_ at /cm/shared/apps/pc2/EB-SW/software/Julia/1.7.0-linux-x86_64/bin/../lib/julia/libopenblas64_.so (unknown line)
getrf! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/lapack.jl:575
#lu!#146 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/lu.jl:81 [inlined]
lu!##kw at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/lu.jl:81 [inlined]
#lu#153 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/lu.jl:279 [inlined]
lu at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/lu.jl:278 [inlined]
lu at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/lu.jl:278 [inlined]
inv at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/dense.jl:876
macro expansion at ./REPL[2]:2 [inlined]
#40#threadsfor_fun at ./threadingconstructs.jl:85
#40#threadsfor_fun at ./threadingconstructs.jl:52
unknown function (ip: 0x1554f0112d5f)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2247 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2429
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1788 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:877
Allocations: 4321396 (Pool: 4319432; Big: 1964); GC: 5
Segmentation fault (core dumped)"><pre class="notranslate"><code class="notranslate">julia> n = 1000;
julia> N = 20;
julia> Threads.@threads for i in 1:N
A = randn(Float64, n, n); inv(A);
end
signal (11): Segmentation fault
in expression starting at REPL[2]:1
dgetrf_parallel at /cm/shared/apps/pc2/EB-SW/software/Julia/1.7.0-linux-x86_64/bin/../lib/julia/libopenblas64_.so (unknown line)
dgetrf_parallel at /cm/shared/apps/pc2/EB-SW/software/Julia/1.7.0-linux-x86_64/bin/../lib/julia/libopenblas64_.so (unknown line)
dgetrf_parallel at /cm/shared/apps/pc2/EB-SW/software/Julia/1.7.0-linux-x86_64/bin/../lib/julia/libopenblas64_.so (unknown line)
dgetrf_parallel at /cm/shared/apps/pc2/EB-SW/software/Julia/1.7.0-linux-x86_64/bin/../lib/julia/libopenblas64_.so (unknown line)
dgetrf_parallel at /cm/shared/apps/pc2/EB-SW/software/Julia/1.7.0-linux-x86_64/bin/../lib/julia/libopenblas64_.so (unknown line)
dgetrf_64_ at /cm/shared/apps/pc2/EB-SW/software/Julia/1.7.0-linux-x86_64/bin/../lib/julia/libopenblas64_.so (unknown line)
getrf! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/lapack.jl:575
#lu!#146 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/lu.jl:81 [inlined]
lu!##kw at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/lu.jl:81 [inlined]
#lu#153 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/lu.jl:279 [inlined]
lu at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/lu.jl:278 [inlined]
lu at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/lu.jl:278 [inlined]
inv at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/dense.jl:876
macro expansion at ./REPL[2]:2 [inlined]
#40#threadsfor_fun at ./threadingconstructs.jl:85
#40#threadsfor_fun at ./threadingconstructs.jl:52
unknown function (ip: 0x1554f0112d5f)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2247 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2429
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1788 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:877
Allocations: 4321396 (Pool: 4319432; Big: 1964); GC: 5
Segmentation fault (core dumped)
</code></pre></div>
<p dir="auto">The segfault disappears when one sets <code class="notranslate">BLAS.set_num_threads(1)</code>.</p>
<p dir="auto">Likely related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1069687332" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/43301" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/43301/hovercard" href="https://github.com/JuliaLang/julia/issues/43301">#43301</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1048000796" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/43008" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/43008/hovercard" href="https://github.com/JuliaLang/julia/issues/43008">#43008</a> (caused by the same issue?). However, not really a duplicate because these issues are all about macOS and also <code class="notranslate">Float64</code> seems to be fine there.</p>
<p dir="auto">(Let me note that this is the result of me trying to create a MWE. Originally I encountered this segfault and <code class="notranslate">StackOverflowError</code>s (as in the issues linked above) as part of CI testing a private package with 1.6.4 and 1.7.0. See <a href="https://discourse.julialang.org/t/inv-causes-stack-overflow-on-julia-1-7-0-and-mac-os/72411/10" rel="nofollow">https://discourse.julialang.org/t/inv-causes-stack-overflow-on-julia-1-7-0-and-mac-os/72411/10</a>). When switching back to 1.6.3 or 1.7.0-rc1 the issues went away.)</p> | 0 |
<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.7.5 / 1.8.0-beta / nightly (1.9.0-dev.20160217)</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="// A self-contained demonstration of the problem follows...
switch (true) {
case true:
let foo = true;
}
switch (true) {
case true:
let foo = false;
}
console.log(foo);
// Static type checking correctly says, "Cannot find name 'foo'"
// but compiler transforms it anyway and does not perform hygiene
// on each foo variable.
// Should be Uncaught ReferenceError: foo is not defined
"><pre class="notranslate"><span class="pl-c">// A self-contained demonstration of the problem follows...</span>
<span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-c1">true</span>:
<span class="pl-k">let</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-c1">true</span>:
<span class="pl-k">let</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-c1">false</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">foo</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// Static type checking correctly says, "Cannot find name 'foo'"</span>
<span class="pl-c">// but compiler transforms it anyway and does not perform hygiene</span>
<span class="pl-c">// on each foo variable.</span>
<span class="pl-c">// Should be Uncaught ReferenceError: foo is not defined</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
Identifier hygiene is performed on each lexically bound <code class="notranslate">let foo</code> to their parent <code class="notranslate">SwitchBlock</code>.</p>
<p dir="auto">Output example of expected:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="switch (true) {
case true:
var foo_1 = true;
}
switch (true) {
case true:
var foo_2 = false;
}
console.log(foo);
// Uncaught ReferenceError: foo is not defined"><pre class="notranslate"><span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-c1">true</span>:
<span class="pl-k">var</span> <span class="pl-s1">foo_1</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-c1">true</span>:
<span class="pl-k">var</span> <span class="pl-s1">foo_2</span> <span class="pl-c1">=</span> <span class="pl-c1">false</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">foo</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// Uncaught ReferenceError: foo is not defined</span></pre></div>
<p dir="auto"><strong>Actual behavior:</strong><br>
Static type checker sees issue, but transform does not perform hygiene so no <code class="notranslate">ReferenceError</code> happens and instead <code class="notranslate">console.log(foo) === false</code>.</p>
<p dir="auto">The same problem also applies even if you provide explicit blocks inside each <code class="notranslate">CaseClause|DefaultClause</code>, which is even more unexpected:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="switch (true) {
case true: {
let foo = true;
}
}
switch (true) {
case true: {
let foo = false;
}
}
console.log(foo);
// false but should be Uncaught ReferenceError: foo is not defined"><pre class="notranslate"><span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-c1">true</span>: <span class="pl-kos">{</span>
<span class="pl-k">let</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-c1">true</span>: <span class="pl-kos">{</span>
<span class="pl-k">let</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">foo</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// false but should be Uncaught ReferenceError: foo is not defined</span></pre></div>
<p dir="auto">One thing to note is that if the variable declaration inside the <code class="notranslate">SwitchBlock</code> shadows, then it <em>will</em> correctly perform hygiene:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let foo = 'this works correctly';
switch (true) {
case true:
let foo = true;
}
switch (true) {
case true:
let foo = false;
}
console.log(foo);
// "this works correctly""><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-s">'this works correctly'</span><span class="pl-kos">;</span>
<span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-c1">true</span>:
<span class="pl-k">let</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-c1">true</span>:
<span class="pl-k">let</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-c1">false</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">foo</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// "this works correctly"</span></pre></div> | <p dir="auto"><strong>TypeScript Version:</strong><br>
1.8.7</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// A self-contained demonstration of the problem follows...
class A {
public propA; any = {};
private propB: number = 1;
}
class B implements A {
public propA: any;
private propB: number; // here
}
applyMixin(A, [B]);"><pre class="notranslate"><span class="pl-c">// A self-contained demonstration of the problem follows...</span>
<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">propA</span><span class="pl-kos">;</span> <span class="pl-c1">any</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">private</span> <span class="pl-c1">propB</span>: <span class="pl-smi">number</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">class</span> <span class="pl-smi">B</span> <span class="pl-k">implements</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span>
<span class="pl-k">public</span> <span class="pl-c1">propA</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span>
<span class="pl-k">private</span> <span class="pl-c1">propB</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-c">// here</span>
<span class="pl-kos">}</span>
<span class="pl-en">applyMixin</span><span class="pl-kos">(</span><span class="pl-smi">A</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-smi">B</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
Compile success</p>
<p dir="auto"><strong>Actual behavior:</strong><br>
Compile failed.<br>
When <code class="notranslate">private propB: number;</code> exists, <code class="notranslate">tsc</code> failed with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error TS2420: Class 'A' incorrectly implements interface 'B'.
Types have separate declarations of a private property 'propB'.`"><pre class="notranslate"><code class="notranslate">error TS2420: Class 'A' incorrectly implements interface 'B'.
Types have separate declarations of a private property 'propB'.`
</code></pre></div>
<p dir="auto">When <code class="notranslate">private propB: number;</code> is removed, <code class="notranslate">tsc</code> failed with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error TS2420: Class 'A' incorrectly implements interface 'B'.
Property 'propB' is missing in Type 'A'."><pre class="notranslate"><code class="notranslate">error TS2420: Class 'A' incorrectly implements interface 'B'.
Property 'propB' is missing in Type 'A'.
</code></pre></div> | 0 |
<h2 dir="auto">Steps to Reproduce</h2>
<ol dir="auto">
<li>Create new Android Studio Flutter project</li>
<li>Run it in simulator to check that it's fine.</li>
<li>Create a duplicate of <code class="notranslate">lib/main.dart</code>. Let's call it <code class="notranslate">lib/main_alternate.dart</code>.</li>
<li>Create a new Run/Debug configuration in IntelliJ<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/919717/39079245-7d3ac5f6-44cb-11e8-9283-392cdabf4e6d.png"><img src="https://user-images.githubusercontent.com/919717/39079245-7d3ac5f6-44cb-11e8-9283-392cdabf4e6d.png" alt="screen shot 2018-04-20 at 18 48 50" style="max-width: 100%;"></a></li>
<li>Run <code class="notranslate">main_alternate.dart</code></li>
</ol>
<p dir="auto">You'll see that this confuses Flutter. I've had instances when this worked well, but other instances when <code class="notranslate">main.dart</code> was clearly running instead of <code class="notranslate">main_alternate.dart</code>. For example, breakpoints in <code class="notranslate">main_alternate.dart</code> weren't hit while breakpoints in <code class="notranslate">main.dart</code> were. Despite this, Flutter console said <code class="notranslate">Launching lib/main_alternate.dart</code>.</p>
<h2 dir="auto">Flutter Doctor</h2>
<p dir="auto">Paste the output of running <code class="notranslate">flutter doctor -v</code> here.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ flutter doctor -v
[✓] Flutter (Channel master, v0.3.3-pre.8, on Mac OS X 10.13.3 17D102, locale en-US)
• Flutter version 0.3.3-pre.8 at /Users/filiph/dev/flutter
• Framework revision 36cf1158ec (2 hours ago), 2018-04-20 17:39:32 -0700
• Engine revision 232060828a
• Dart version 2.0.0-dev.48.0.flutter-fe606f890b
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.2)
• Android SDK at /Users/filiph/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.2, Build version 9C40b
• ios-deploy 1.9.2
• CocoaPods version 1.4.0
[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 23.2.2
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] IntelliJ IDEA Community Edition (version 2017.3.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 20.0.3
• Dart plugin version 173.4127.31
[✓] VS Code (version 1.22.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Dart Code extension version 2.9.2
[✓] Connected devices (1 available)
• iPhone X • 9072CF25-2137-4EB4-984F-EB3DC9A3F418 • ios • iOS 11.2 (simulator)
• No issues found!"><pre class="notranslate"><code class="notranslate">$ flutter doctor -v
[✓] Flutter (Channel master, v0.3.3-pre.8, on Mac OS X 10.13.3 17D102, locale en-US)
• Flutter version 0.3.3-pre.8 at /Users/filiph/dev/flutter
• Framework revision 36cf1158ec (2 hours ago), 2018-04-20 17:39:32 -0700
• Engine revision 232060828a
• Dart version 2.0.0-dev.48.0.flutter-fe606f890b
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.2)
• Android SDK at /Users/filiph/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.2, Build version 9C40b
• ios-deploy 1.9.2
• CocoaPods version 1.4.0
[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 23.2.2
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] IntelliJ IDEA Community Edition (version 2017.3.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 20.0.3
• Dart plugin version 173.4127.31
[✓] VS Code (version 1.22.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Dart Code extension version 2.9.2
[✓] Connected devices (1 available)
• iPhone X • 9072CF25-2137-4EB4-984F-EB3DC9A3F418 • ios • iOS 11.2 (simulator)
• No issues found!
</code></pre></div> | <p dir="auto">Well, I think that's not my last issue here, but I have one more <g-emoji class="g-emoji" alias="sweat_smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f605.png">😅</g-emoji><br>
The problem is that I can not normally use Firebase Auth. When I touch the button in my ui with event to choose Google account, I get error.<br>
<strong>Before All, I have two different methods to sign in with Google. One I got from here <a href="https://pub.dartlang.org/packages/firebase_auth" rel="nofollow">firebase_auth at dart site</a> and another from example</strong>## My Code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import 'package:flutter/material.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:google_sign_in/google_sign_in.dart';
import 'dart:async';
final FirebaseAuth _auth = FirebaseAuth.instance;
final GoogleSignIn _googleSignIn = new GoogleSignIn();
Future<FirebaseUser> _handleSignIn() async {
GoogleSignInAccount googleUser = await _googleSignIn.signIn();
GoogleSignInAuthentication googleAuth = await googleUser.authentication;
FirebaseUser user = await _auth.signInWithGoogle(
accessToken: googleAuth.accessToken,
idToken: googleAuth.idToken,
);
print("signed in " + user.displayName);
return user;
}
Future<String> _signInWithGoogle() async {
final GoogleSignInAccount googleUser = await _googleSignIn.signIn();
final GoogleSignInAuthentication googleAuth =
await googleUser.authentication;
final FirebaseUser user = await _auth.signInWithGoogle(
accessToken: googleAuth.accessToken,
idToken: googleAuth.idToken,
);
assert(user.email != null);
assert(user.displayName != null);
assert(!user.isAnonymous);
assert(await user.getIdToken() != null);
final FirebaseUser currentUser = await _auth.currentUser();
assert(user.uid == currentUser.uid);
return 'signInWithGoogle succeeded: $user';
}
class _LoginPageState extends State<LoginPage> {
Future<String> _message = new Future<String>.value('');
@override
Widget build(BuildContext context) {
return new Scaffold(
body: RaisedButton(
child: Text('NEXT'),
textColor: Colors.white,
onPressed: () {
setState(() {
_message = _signInWithGoogle();
});
if (_auth.currentUser() != null) { Navigator.pop(context); }
}
)
);
}
}
class LoginPage extends StatefulWidget {
@override
_LoginPageState createState() => new _LoginPageState();
}
"><pre class="notranslate"><code class="notranslate">import 'package:flutter/material.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:google_sign_in/google_sign_in.dart';
import 'dart:async';
final FirebaseAuth _auth = FirebaseAuth.instance;
final GoogleSignIn _googleSignIn = new GoogleSignIn();
Future<FirebaseUser> _handleSignIn() async {
GoogleSignInAccount googleUser = await _googleSignIn.signIn();
GoogleSignInAuthentication googleAuth = await googleUser.authentication;
FirebaseUser user = await _auth.signInWithGoogle(
accessToken: googleAuth.accessToken,
idToken: googleAuth.idToken,
);
print("signed in " + user.displayName);
return user;
}
Future<String> _signInWithGoogle() async {
final GoogleSignInAccount googleUser = await _googleSignIn.signIn();
final GoogleSignInAuthentication googleAuth =
await googleUser.authentication;
final FirebaseUser user = await _auth.signInWithGoogle(
accessToken: googleAuth.accessToken,
idToken: googleAuth.idToken,
);
assert(user.email != null);
assert(user.displayName != null);
assert(!user.isAnonymous);
assert(await user.getIdToken() != null);
final FirebaseUser currentUser = await _auth.currentUser();
assert(user.uid == currentUser.uid);
return 'signInWithGoogle succeeded: $user';
}
class _LoginPageState extends State<LoginPage> {
Future<String> _message = new Future<String>.value('');
@override
Widget build(BuildContext context) {
return new Scaffold(
body: RaisedButton(
child: Text('NEXT'),
textColor: Colors.white,
onPressed: () {
setState(() {
_message = _signInWithGoogle();
});
if (_auth.currentUser() != null) { Navigator.pop(context); }
}
)
);
}
}
class LoginPage extends StatefulWidget {
@override
_LoginPageState createState() => new _LoginPageState();
}
</code></pre></div>
<h2 dir="auto">Log</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[{"event":"app.progress","params":{"appId":"something tells me that i shouldn't paste it here","id":"6","progressId":"hot.restart","message":"Performing hot restart..."}}]Performing hot restart...
E/flutter (28769): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter (28769): PlatformException(sign_in_failed, Status{statusCode=DEVELOPER_ERROR, resolution=null}, null)
E/flutter (28769): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:547:7)
E/flutter (28769): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:279:18)
E/flutter (28769): <asynchronous suspension>
E/flutter (28769): #2 GoogleSignIn._callMethod (package:google_sign_in/google_sign_in.dart:185:58)
E/flutter (28769): <asynchronous suspension>
E/flutter (28769): #3 GoogleSignIn._addMethodCall (package:google_sign_in/google_sign_in.dart:224:20)
E/flutter (28769): #4 GoogleSignIn.signIn (package:google_sign_in/google_sign_in.dart:295:48)
E/flutter (28769): #5 _handleSignIn (file:///C:/Users/Arsen/AndroidStudioProjects/travel_met/lib/login.dart:15:56)
E/flutter (28769): <asynchronous suspension>
E/flutter (28769): #6 _LoginPageState.build.<anonymous closure> (file:///C:/Users/Arsen/AndroidStudioProjects/travel_met/lib/login.dart:97:21)
E/flutter (28769): #7 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:494:14)
E/flutter (28769): #8 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:549:30)
E/flutter (28769): #9 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:102:24)
E/flutter (28769): #10 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:161:9)
E/flutter (28769): #11 TapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:123:7)
E/flutter (28769): #12 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
E/flutter (28769): #13 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:147:20)
E/flutter (28769): #14 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:121:22)
E/flutter (28769): #15 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:101:7)
E/flutter (28769): #16 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:64:7)
E/flutter (28769): #17 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:48:7)
E/flutter (28769): #18 _invoke1 (dart:ui/hooks.dart:134:13)
E/flutter (28769): #19 _dispatchPointerDataPacket (dart:ui/hooks.dart:91:5)
Restarted app in 4 492ms.
D/ViewRootImpl@7dec195[MainActivity](28769): ViewPostIme pointer 0
D/ViewRootImpl@7dec195[MainActivity](28769): ViewPostIme pointer 1
D/ViewRootImpl@7dec195[MainActivity](28769): MSG_WINDOW_FOCUS_CHANGED 0
D/ViewRootImpl@48809d0[SignInHubActivity](28769): setView = DecorView@7c9bdc9[SignInHubActivity] TM=true MM=false
D/ViewRootImpl@48809d0[SignInHubActivity](28769): dispatchAttachedToWindow
V/Surface (28769): sf_framedrop debug : 0x4f4c, game : false, logging : 0
D/ViewRootImpl@48809d0[SignInHubActivity](28769): Relayout returned: old=[0,0][0,0] new=[0,0][1080,1920] result=0x7 surface={valid=true 484893175808} changed=true
D/mali_winsys(28769): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1080x1920]-format:1
D/OpenGLRenderer(28769): eglCreateWindowSurface = 0x70e8d08440
D/ViewRootImpl@48809d0[SignInHubActivity](28769): MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1080, 1920) ci=Rect(0, 72 - 0, 0) vi=Rect(0, 72 - 0, 0) or=1
D/ViewRootImpl@48809d0[SignInHubActivity](28769): MSG_WINDOW_FOCUS_CHANGED 1
V/InputMethodManager(28769): Starting input: tba=android.view.inputmethod.EditorInfo@bc342e8 nm : com.arsnyan.some ic=null
I/InputMethodManager(28769): startInputInner - mService.startInputOrWindowGainedFocus
D/ViewRootImpl@48809d0[SignInHubActivity](28769): MSG_WINDOW_FOCUS_CHANGED 0
D/ViewRootImpl@7dec195[MainActivity](28769): MSG_WINDOW_FOCUS_CHANGED 1
V/InputMethodManager(28769): Starting input: tba=android.view.inputmethod.EditorInfo@7f65d01 nm : com.arsnyan.some ic=null
I/InputMethodManager(28769): startInputInner - mService.startInputOrWindowGainedFocus
I/FlutterActivityDelegate(28769): onResume setting current activity to this
D/OpenGLRenderer(28769): eglDestroySurface = 0x70e8d08440
D/ViewRootImpl@48809d0[SignInHubActivity](28769): Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x5 surface={valid=false 0} changed=true
D/ViewRootImpl@48809d0[SignInHubActivity](28769): dispatchDetachedFromWindow
D/InputEventReceiver(28769): channel '5d77edb com.arsnyan.some/com.google.android.gms.auth.api.signin.internal.SignInHubActivity (client)' ~ Disposing input event receiver.
D/InputEventReceiver(28769): channel '5d77edb com.arsnyan.some/com.google.android.gms.auth.api.signin.internal.SignInHubActivity (client)' ~NativeInputEventReceiver.
"><pre class="notranslate"><code class="notranslate">[{"event":"app.progress","params":{"appId":"something tells me that i shouldn't paste it here","id":"6","progressId":"hot.restart","message":"Performing hot restart..."}}]Performing hot restart...
E/flutter (28769): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter (28769): PlatformException(sign_in_failed, Status{statusCode=DEVELOPER_ERROR, resolution=null}, null)
E/flutter (28769): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:547:7)
E/flutter (28769): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:279:18)
E/flutter (28769): <asynchronous suspension>
E/flutter (28769): #2 GoogleSignIn._callMethod (package:google_sign_in/google_sign_in.dart:185:58)
E/flutter (28769): <asynchronous suspension>
E/flutter (28769): #3 GoogleSignIn._addMethodCall (package:google_sign_in/google_sign_in.dart:224:20)
E/flutter (28769): #4 GoogleSignIn.signIn (package:google_sign_in/google_sign_in.dart:295:48)
E/flutter (28769): #5 _handleSignIn (file:///C:/Users/Arsen/AndroidStudioProjects/travel_met/lib/login.dart:15:56)
E/flutter (28769): <asynchronous suspension>
E/flutter (28769): #6 _LoginPageState.build.<anonymous closure> (file:///C:/Users/Arsen/AndroidStudioProjects/travel_met/lib/login.dart:97:21)
E/flutter (28769): #7 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:494:14)
E/flutter (28769): #8 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:549:30)
E/flutter (28769): #9 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:102:24)
E/flutter (28769): #10 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:161:9)
E/flutter (28769): #11 TapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:123:7)
E/flutter (28769): #12 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
E/flutter (28769): #13 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:147:20)
E/flutter (28769): #14 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:121:22)
E/flutter (28769): #15 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:101:7)
E/flutter (28769): #16 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:64:7)
E/flutter (28769): #17 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:48:7)
E/flutter (28769): #18 _invoke1 (dart:ui/hooks.dart:134:13)
E/flutter (28769): #19 _dispatchPointerDataPacket (dart:ui/hooks.dart:91:5)
Restarted app in 4 492ms.
D/ViewRootImpl@7dec195[MainActivity](28769): ViewPostIme pointer 0
D/ViewRootImpl@7dec195[MainActivity](28769): ViewPostIme pointer 1
D/ViewRootImpl@7dec195[MainActivity](28769): MSG_WINDOW_FOCUS_CHANGED 0
D/ViewRootImpl@48809d0[SignInHubActivity](28769): setView = DecorView@7c9bdc9[SignInHubActivity] TM=true MM=false
D/ViewRootImpl@48809d0[SignInHubActivity](28769): dispatchAttachedToWindow
V/Surface (28769): sf_framedrop debug : 0x4f4c, game : false, logging : 0
D/ViewRootImpl@48809d0[SignInHubActivity](28769): Relayout returned: old=[0,0][0,0] new=[0,0][1080,1920] result=0x7 surface={valid=true 484893175808} changed=true
D/mali_winsys(28769): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1080x1920]-format:1
D/OpenGLRenderer(28769): eglCreateWindowSurface = 0x70e8d08440
D/ViewRootImpl@48809d0[SignInHubActivity](28769): MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1080, 1920) ci=Rect(0, 72 - 0, 0) vi=Rect(0, 72 - 0, 0) or=1
D/ViewRootImpl@48809d0[SignInHubActivity](28769): MSG_WINDOW_FOCUS_CHANGED 1
V/InputMethodManager(28769): Starting input: tba=android.view.inputmethod.EditorInfo@bc342e8 nm : com.arsnyan.some ic=null
I/InputMethodManager(28769): startInputInner - mService.startInputOrWindowGainedFocus
D/ViewRootImpl@48809d0[SignInHubActivity](28769): MSG_WINDOW_FOCUS_CHANGED 0
D/ViewRootImpl@7dec195[MainActivity](28769): MSG_WINDOW_FOCUS_CHANGED 1
V/InputMethodManager(28769): Starting input: tba=android.view.inputmethod.EditorInfo@7f65d01 nm : com.arsnyan.some ic=null
I/InputMethodManager(28769): startInputInner - mService.startInputOrWindowGainedFocus
I/FlutterActivityDelegate(28769): onResume setting current activity to this
D/OpenGLRenderer(28769): eglDestroySurface = 0x70e8d08440
D/ViewRootImpl@48809d0[SignInHubActivity](28769): Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x5 surface={valid=false 0} changed=true
D/ViewRootImpl@48809d0[SignInHubActivity](28769): dispatchDetachedFromWindow
D/InputEventReceiver(28769): channel '5d77edb com.arsnyan.some/com.google.android.gms.auth.api.signin.internal.SignInHubActivity (client)' ~ Disposing input event receiver.
D/InputEventReceiver(28769): channel '5d77edb com.arsnyan.some/com.google.android.gms.auth.api.signin.internal.SignInHubActivity (client)' ~NativeInputEventReceiver.
</code></pre></div>
<h2 dir="auto">Debugger says:</h2>
<p dir="auto"><a href="https://i.imgur.com/9ZcaLZn.png" rel="nofollow">Picture 1</a><br>
<a href="https://i.imgur.com/RkE1lNo.png" rel="nofollow">Picture 2</a></p>
<p dir="auto">##Even when I changed something and used another method, I got the same log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" RaisedButton(
child: Text('NEXT'),
textColor: Colors.white,
onPressed: () {
_handleSignIn()
.then((FirebaseUser user) {
if (user.displayName != null) { Navigator.pop(context); }
})
.catchError((e) => print(e));
},
),"><pre class="notranslate"><code class="notranslate"> RaisedButton(
child: Text('NEXT'),
textColor: Colors.white,
onPressed: () {
_handleSignIn()
.then((FirebaseUser user) {
if (user.displayName != null) { Navigator.pop(context); }
})
.catchError((e) => print(e));
},
),
</code></pre></div>
<p dir="auto">Thanks in advance.</p> | 0 |
<p dir="auto">One thing that always bugs me when using <code class="notranslate">var_dump</code> (and now, with the great VarDumper component <code class="notranslate">dump()</code>) is removing all calls after debugging. I always have a hard time to find these and end up doing <code class="notranslate">grep var_dump</code>, which isn't very quick on a windows PC and in a project with many vendor files.</p>
<p dir="auto">It would be very awesome if we can show the location of the dump call, somewhere small in the top right corner of the dump box. I don't know if this is possible, it's just something I would like to see.</p> | <p dir="auto">Hi,</p>
<p dir="auto">What about adding a stack trace information when dumping?</p>
<p dir="auto">I think it may help to see which were the steps to get there.</p> | 1 |
<p dir="auto">After install the last update:<br>
Version 0.10.1<br>
Commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/df352367df2efcfa9d602d471e4e2f42140a0f05/hovercard" href="https://github.com/microsoft/vscode/commit/df352367df2efcfa9d602d471e4e2f42140a0f05"><tt>df35236</tt></a><br>
Shell 0.34.1<br>
Render 45.0.2454.85<br>
Node 4.1.1<br>
With only paste a text in a new file the entire screen freezes, only the menu bar response but don't work.<br>
Operating system windows 8.1.</p> | <p dir="auto">Sometimes editor just freeze. Kill task helps only. Have this problem at work and home.<br>
I noticed that this started after latest update (0.10.1).</p>
<p dir="auto">Working in PHP files.</p>
<p dir="auto">Windows 10 64.</p> | 1 |
<p dir="auto">It would be nice if you could select i.e. a different font for comments in comparison to code just for better reading. It's not a pressing matter but nice to have :)</p> | <p dir="auto">I have a problem matcher that works on the output of the Delphi compller. Sometimes it gives relative and absolute file names at the same time. When I set <code class="notranslate">"fileLocation": ["absolute"]</code> the messages having relative paths can't be opened. When I set <code class="notranslate">"fileLocation": ["relative", "${workspaceRoot}"]</code> the messages having absolute paths can't be opened anymore.</p>
<p dir="auto">Is it possible to define a a problem matcher that uses relative paths as long as the mentioned file exists and uses absolute paths as a fallback mode?</p> | 0 |
<p dir="auto">I have an next/js app behind nginx with custom server node/express .<br>
I launch it to port 3000. Nginx redirect the request myserver.com/mynextapp/ to port 3000 , but this is not working.<br>
I can see the page server rendered, but the js doesn't working . In browser tool network i got 404 response for app.js and page/, because the request is myserver.com/_next/228ef92e59d376f055fc2c6d01c93b82/app.js instead of myserver.com/mynextapp/_next/228ef92e59d376f055fc2c6d01c93b82/app.js<br>
It worked well when i simply opened the port 3000 in myserver.com but i try to avoid that.<br>
Any idea ?<br>
Thanks</p> | <p dir="auto">Next uses routes like <code class="notranslate">/_next</code> and <code class="notranslate">/static</code> by default. If you wanted to run multiple different Next apps on the same domain, they would collide with each other. Can these paths be made configurable?</p> | 1 |
<p dir="auto">From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alextricity25/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alextricity25">@alextricity25</a> on 2016-04-08T15:37:25Z</p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Feature Idea</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">os_router</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.0.1.0
config file = /root/setup-infra/ansible.cfg
configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.0.1.0
config file = /root/setup-infra/ansible.cfg
configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">No changes made to ansible.cfg</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">I'm running Ubuntu 14.04, but this module is not platform-specific I don't think.</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">os_router can't take in a port ID as an internal interface, only a subnet. See:<br>
<a href="https://github.com/ansible/ansible-modules-core/blob/devel/cloud/openstack/os_router.py#L321">https://github.com/ansible/ansible-modules-core/blob/devel/cloud/openstack/os_router.py#L321</a></p>
<p dir="auto">The neutron CLI allows you to specify a port ID as an interface, and therefore allow you to specify an arbitrary IP for that interface. It would be nice if the Ansible os_router module would allow you to do that.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">This added feature would allow you to do something like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Create port for my_net
os_port:
state: present
name: "my_net_port"
network: "my_net"
fixed_ips:
- ip_address: "192.168.100.50"
register: my_net_port_results
- name: Create my router
os_router:
name: my_router
state: present
network: "ext-net"
interfaces:
- port: "{{ my_net_port_results.id }}"
- "some_other_priv_subnet""><pre class="notranslate"><code class="notranslate">- name: Create port for my_net
os_port:
state: present
name: "my_net_port"
network: "my_net"
fixed_ips:
- ip_address: "192.168.100.50"
register: my_net_port_results
- name: Create my router
os_router:
name: my_router
state: present
network: "ext-net"
interfaces:
- port: "{{ my_net_port_results.id }}"
- "some_other_priv_subnet"
</code></pre></div>
<p dir="auto">This would allow the user to specify either a subnet or a port for a router internal interface.</p>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">The router would have two interfaces with the example playbook shown above. It would have the default gateway of "some_other_priv_subnet", and it would have the ip assigned to "my_net_port".<br>
This would allow subnets to be attached to multiple routers, which currently isn't do-able through the os_router module.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">TBD</p>
<p dir="auto">Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="146962583" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/3390" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/3390/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/3390">ansible/ansible-modules-core#3390</a></p> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Feature Idea</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">ansible-galaxy</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<p dir="auto">Future</p>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Local roles may depend on galaxy roles defined in <code class="notranslate">meta/main.yml</code>. <code class="notranslate">ansible-galaxy install -r</code> does not support this file format, although the value of the <code class="notranslate">dependencies</code> key appears to match that in a <code class="notranslate">requirements.yml</code> file</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cat meta/main.yml
galaxy_info:
author: ome-devel@lists.openmicroscopy.org.uk
dependencies:
- role: openmicroscopy.basedeps"><pre class="notranslate"><code class="notranslate">$ cat meta/main.yml
galaxy_info:
author: ome-devel@lists.openmicroscopy.org.uk
dependencies:
- role: openmicroscopy.basedeps
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible-galaxy install -r meta/main.yml`
- downloading role 'dependencies', owned by
[WARNING]: - dependencies was NOT installed successfully: Role has no field
named u'owner'
ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list."><pre class="notranslate"><code class="notranslate">$ ansible-galaxy install -r meta/main.yml`
- downloading role 'dependencies', owned by
[WARNING]: - dependencies was NOT installed successfully: Role has no field
named u'owner'
ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.
</code></pre></div>
<p dir="auto">Proposed behaviour: Install all roles listed in the <code class="notranslate">dependencies</code> section of <code class="notranslate">meta/main.yml</code>, in this case <code class="notranslate">openmicroscopy.basedeps</code></p>
<h5 dir="auto">BACKGROUND</h5>
<ul dir="auto">
<li><a href="https://github.com/metacloud/molecule/pull/717#issuecomment-273455237" data-hovercard-type="pull_request" data-hovercard-url="/ansible-community/molecule/pull/717/hovercard">Galaxy dependencies file can be the role meta file</a><br>
This is the original motivation for this feature suggestion. When using <a href="https://github.com/metacloud/molecule">molecule</a> for testing Ansible roles dependencies need to be in a requirements file. If this is a deliberate design decision it would be useful if the docs could be updated with an official description of the <code class="notranslate">meta/main.yml</code> file.</li>
<li><a href="https://github.com/ansible/ansible/issues/12927" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/12927/hovercard">Add ability to automatically download roles when running play</a><br>
This is a closely related feature request.</li>
</ul> | 0 |
<p dir="auto">Hello Everone</p>
<p dir="auto">How do i install Bootstrap 3.1.1 please tell me i tried this<br>
<a href="https://github.com/KKBOX/FireApp/wiki/Use-compass-extensions#windows">https://github.com/KKBOX/FireApp/wiki/Use-compass-extensions#windows</a> but was not able to make it work please guide me!!</p>
<p dir="auto">thanks!!</p> | <p dir="auto">Hello Everone</p>
<p dir="auto">How do i install Bootstrap 3.1.1 please tell me i tried this<br>
<a href="https://github.com/KKBOX/FireApp/wiki/Use-compass-extensions#windows">https://github.com/KKBOX/FireApp/wiki/Use-compass-extensions#windows</a> but was not able to make it work please guide me!!</p>
<p dir="auto">thanks!!</p> | 1 |
<p dir="auto">A minor observation about an otherwise great feature! Using the Insiders build, the following Lua code causes weird folding:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function someFunc()
local longString = [[this is a long
string that spans multiple lines
and has some weird folding]]
print longString
end"><pre class="notranslate"><code class="notranslate">function someFunc()
local longString = [[this is a long
string that spans multiple lines
and has some weird folding]]
print longString
end
</code></pre></div>
<p dir="auto">You'll notice that a + shows up on the same "function someFunc()" line <em>and</em> on the last line of the longString declaration. The first + folds up to the declaration line and the second + folds the rest of the function.</p> | <p dir="auto">The current implementation of folding uses an indentation based folding strategy that is unaware of the language it works on. Knowledge on the underlying language allows us to solve the following requests:</p>
<ul dir="auto">
<li>[folding] Cannot code fold empty functions <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135791496" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/3349" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/3349/hovercard" href="https://github.com/microsoft/vscode/issues/3349">#3349</a></li>
<li>[folding] Collapse ending brace to the same line <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135795757" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/3352" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/3352/hovercard" href="https://github.com/microsoft/vscode/issues/3352">#3352</a></li>
<li>[folding] Folded block comments should show */ <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135792155" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/3350" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/3350/hovercard" href="https://github.com/microsoft/vscode/issues/3350">#3350</a></li>
<li>[folding] should not fold whitespace after function <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135796670" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/3353" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/3353/hovercard" href="https://github.com/microsoft/vscode/issues/3353">#3353</a></li>
<li>[folding] Add code folding for markdown based on heading level <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135790053" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/3347" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/3347/hovercard" href="https://github.com/microsoft/vscode/issues/3347">#3347</a></li>
<li>[folding] [lua] Weird code folding with Lua <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="137648390" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/3602" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/3602/hovercard" href="https://github.com/microsoft/vscode/issues/3602">#3602</a></li>
<li>[folding] Collapse code block ignore comments inside this block <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="139890518" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/3957" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/3957/hovercard" href="https://github.com/microsoft/vscode/issues/3957">#3957</a></li>
<li>[folding] Code Folding: support golang multiline strings <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="151930846" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/5994" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/5994/hovercard" href="https://github.com/microsoft/vscode/issues/5994">#5994</a></li>
<li>[folding] Optionally fold chained method calls <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="157350400" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/6991" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/6991/hovercard" href="https://github.com/microsoft/vscode/issues/6991">#6991</a></li>
</ul> | 1 |
<p dir="auto">Hello, This is a step by step of what I remember happening leading up to the duplication of the file.</p>
<p dir="auto">Opened a Wordpress theme package in Atom, when I was finished I closed that window (I did not close atom).<br>
Selected 'Open...' from the menu and opened a different project.<br>
Opened a few pages and made some edits.<br>
Opened settings and saw that a theme was out of date so I updated it.<br>
Pasted some info from a website into a file and saved it.</p>
<p dir="auto">It was when hitting 'control s' that I noticed a new file appear (page.php):</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/775993/4430240/52a763d8-4625-11e4-9b1a-d94cf6d6feea.png"><img src="https://cloud.githubusercontent.com/assets/775993/4430240/52a763d8-4625-11e4-9b1a-d94cf6d6feea.png" alt="atom-files" style="max-width: 100%;"></a></p>
<p dir="auto">This file was from the previous Wordpress project and it was now in the new project.<br>
I can't recall if I had been editing that file or if it was open when I closed the previous project.</p>
<p dir="auto">I have since upgraded to version 0.132.0 (The request to upgrade was in the menu) So I guess the version was the one before this.<br>
The theme I updated was Monokai (<a href="https://atom.io/packages/monokai" rel="nofollow">https://atom.io/packages/monokai</a>).</p> | <p dir="auto">Halp ticket:</p>
<ul dir="auto">
<li>support/95b88d8ac5d011e388dbf5393005f408</li>
</ul>
<blockquote>
<p dir="auto">Please make Atom ask before downloading an update or make the auto-update configurable.</p>
<p dir="auto">I am working on the road a lot and it ruins my mobile data package.</p>
</blockquote>
<p dir="auto">So, asking before downloading an update or providing an option to turn off auto-updating might be helpful in these cases, I suppose.</p> | 0 |
<p dir="auto"><a href="http://getbootstrap.com/customize/" rel="nofollow">http://getbootstrap.com/customize/</a></p>
<p dir="auto">I have this error while compilating a custom packet</p>
<div class="highlight highlight-source-css notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
Ruh roh! Could not parse less files.
.btn-group-xs > .btn { .btn-xs(); }
.btn-group-sm > .btn { .btn-sm(); }"><pre class="notranslate"><span class="pl-ent">Ruh</span> <span class="pl-ent">roh</span>! <span class="pl-ent">Could</span> <span class="pl-ent">not</span> <span class="pl-ent">parse</span> <span class="pl-ent">less</span> <span class="pl-ent">files</span>.<span class="pl-c1"></span>
.<span class="pl-c1">btn-group-xs</span> <span class="pl-c1">></span> .<span class="pl-c1">btn</span> { .<span class="pl-c1">btn-xs</span>(); }
.<span class="pl-c1">btn-group-sm</span> <span class="pl-c1">></span> .<span class="pl-c1">btn</span> { .<span class="pl-c1">btn-sm</span>(); }</pre></div>
<p dir="auto">I try to create packet with only:</p>
<blockquote>
<p dir="auto">Grid system, Forms, Button groups, Input groups, Labels, Alerts</p>
</blockquote> | <p dir="auto">Could not parse less files.<br>
.btn-group-xs > .btn { .btn-xs(); }<br>
.btn-group-sm > .btn { .btn-sm(); }</p> | 1 |