WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Hi,

First of all, thank you very much for an awesome library.

I switched from Picasso to Glide, and I like Glide more than Picasso. However,

I've noticed that Glide would load the old image (deleted) instead of the new image.

For example,

I have the following images on my listview:

Image1

Image2

Image3

etc.

I deleted Image1, and renamed Image2 to Image1.

Glide would display the old picture of Image1 which was deleted instead of Image2 picture.

I went online and searched for the solution, they said that I can clear the caches with the following:

public void Clear_GlideCaches() {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Glide.get(MainActivity.this).clearMemory();
}}, 0);

AsyncTask.execute(new Runnable() {
@Override
public void run() {
Glide.get(MainActivity.this).clearDiskCache();
}
});
}

This solution didn't seem to work for my situation as Glide still loads the old deleted images.

Here is my listview adapter:

@Override public View getView(int position, View recycledView, ViewGroup container) {
ViewHolder viewHolder = new ViewHolder();
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
if (recycledView == null) {
recycledView = inflater.inflate(R.layout.listview_layout, container, false);
viewHolder.layout = (RelativeLayout)recycledView.findViewById(R.id.ListViewLayout);
viewHolder.imageView = (ImageView)recycledView.findViewById(R.id.ListViewImage);
recycledView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder)recycledView.getTag();
}

Glide
.with(mContext)
.load(getItem(position).getImageUri())
.centerCrop()
.placeholder(R.color.black)
.crossFade()
.into(viewHolder.imageView);

return recycledView;
}

class ViewHolder {
RelativeLayout layout;
ImageView imageView;
}

On Picasso,

I was able to clear the image cache for specific image without any issues.

Here is the code:

public class ClearPicassoCaches {
public static void clearCache (Picasso p) {
p.cache.clear();
}
}

In ListView Adapter:

public void RefreshPicassoCache(String path) {
Picasso.with(mContext).invalidate("file:///" + path);
}

In MainActivity:

listViewAdapter.RefreshPicassoCache(NewPath); //to refresh the specific image cache.

My questions are:

1)is there a way to refresh (reset) the cache for specific image?

2) is there anyway I can clear the Glide caches, so that it won't display the old deleted images when the deleted and the new images have the same name.?

I am testing my app on Android 5.1.1 (Lollittlepoop), GN4

Glide Version: 3.7.0

I hope someone can help me,

Thank you very much

Issue 2:
Hi,

How can I clear Glide's cache in case.

Clear all cache

Clear cache of an URL.
Issue 1:
These aren't documented anywhere and it's unclear how they're different from torch::save

Issue 2:
These APIs aren't going anywhere as far as I know, but they have no descriptions or usage instructions

They have some documentation here but that's nowhere on the website:

https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/serialization/pickle.h

And some usages are in the tests but aren't very user-discoverable:

https://github.com/pytorch/pytorch/blob/master/test/cpp/api/jit.cpp#L120

https://github.com/pytorch/pytorch/blob/master/test/cpp/jit/test_save_load.cpp#L121

https://github.com/pytorch/pytorch/blob/master/test/cpp/jit/torch_python_test.cpp#L44-L54

Tagging the JIT team to see if there are any plans for these APIs

cc @gmagogsfm
Issue 1:
Giovanni Dall'Oglio Risso opened SPR-8716 and commented

The number comparison can be more accurate with BigDecimals (possibly also BigIntegers) and other number types:

This test fail, becouse the BigDecimal is converted to Integer, truncating the value to zero:

@Test
public void testGT() throws Exception
{

ExpressionParser ep = new SpelExpressionParser();
Expression expression = ep.parseExpression("new java.math.BigDecimal('0.1') > 0");
Boolean value = expression.getValue(Boolean.class);

Assert.assertTrue(value);
}

The responsible is the class org.springframework.expression.spel.ast.OpGT (but all the similar classes has the same imprinting)

@Override
public BooleanTypedValue getValueInternal(ExpressionState state) throws EvaluationException {
Object left = getLeftOperand().getValueInternal(state).getValue();
Object right = getRightOperand().getValueInternal(state).getValue();
if (left instanceof Number && right instanceof Number) {
Number leftNumber = (Number) left;
Number rightNumber = (Number) right;
if (leftNumber instanceof Double || rightNumber instanceof Double) {
return BooleanTypedValue.forValue(leftNumber.doubleValue() > rightNumber.doubleValue());
} else if (leftNumber instanceof Long || rightNumber instanceof Long) {
return BooleanTypedValue.forValue(leftNumber.longValue() > rightNumber.longValue());
} else {
return BooleanTypedValue.forValue(leftNumber.intValue() > rightNumber.intValue());
}
}
return BooleanTypedValue.forValue(state.getTypeComparator().compare(left, right) > 0);
}

In order you:

check if is a Double

check if is a Long

treat it as an Integer

I attach my modest suggestion

Affects: 3.0.5

Attachments:

OpGT.java (3.08 kB)

Issue Links:

#13802 Support BigDecimals with SpEL ("duplicates")

Issue 2:
Oliver Becker opened SPR-9164 and commented

When doing number arithmetic in SpEL the result type is apparently one of double, long or int.

This has the unwanted effect that for example float or BigDecimal values will be changed to int.

new java.math.BigDecimal("12.34")

evaluates to 12.34

-(new java.math.BigDecimal("12.34"))

evaluates to -12

see org.springframework.expression.spel.ast

OpPlus, OpMinus, OpMultiply, OpDivide

Affects: 3.1.1

Reference URL: #80

Attachments:

SpELFloatLiteralTest.java (1.24 kB)

Issue Links:

#13358 Expression language not compare BigDecimals with integers ("is duplicated by")

#13832 SpEL: OpEQ should use equals()

#15943 Downgrade accidental use of Java 1.7 APIs

#14121 Add SpEL support for float literals

#14546 SpEL's arithmetic operations should explicitly detect BigInteger/Short/Byte and fall back to double handling for unknown Number subtypes

1 votes, 7 watchers
Issue 1:
I'm using reactstrap (bootstrap) together with react-responsive for my site's responsive layout.

There is no problem when I'm using reactstrap alone.

However, when I mix react-responsive into the pages to show certain components only at certain screen breakpoints, I'm getting the following error in the browser console:

main.js:4530 Warning: Expected server HTML to contain a matching <div> in <div>.

I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

The error should not be showing up in the browser console.

Current Behavior

An error main.js:4530 Warning: Expected server HTML to contain a matching <div> in <div>. will appear in the console when ever a page is refreshed.

Steps to Reproduce (for bugs)

Use react-responsive to render a component when a smaller screen size is matched.

Refresh page

Error should will show up in console.

The page however appears to still work normally.

Context

I'm using reactstrap (bootstrap) together with react-responsive for my site's responsive layout.

There is no problem when I'm using reactstrap alone.

However, when I mix react-responsive into the pages to show certain components only at certain screen breakpoints, I'm getting the following error in the browser's console:

main.js:4530 Warning: Expected server HTML to contain a matching <div> in <div>.

Removing the responsive component will get rid of this error message too.

Although I'm not certainly sure what's the cause, I'm suspecting this has to do with the server side rendering. The mobile component was probably rendered dynamically on client but not on server side.

Is there anything I can do to fix this error? Any impact if the error is left unresolved?

Your Environment

Tech
Version

next
5.0.0

node
6.9.1

OS
Win 10

browser
Chrome

etc

Issue 2:
Describe the bug

I am having a problem when using packages that have module caching and keep track of internal state in server rendering. An example of such packages is redux-act where module caching is used to keep track of an id used to serialize action types. The bug happens when importing my store.js file with all the actions, reducers and the store in _app, and importing it in other pages as well. This causes my store.js file to be bundled with both _app and any other page I am rendering like index. This causes the createAction to be called twice to the same action which causes the internal redux-act ids to be out of sync and thus the reducer never handles the add action

To Reproduce

this reproduce code is passed on the with-redux-wrapper example.

clone https://github.com/Ilaiwi/next-_app-bug-example

run npm run dev

go to localhost:3000

Expected behavior

the AddCount should be 1 because an add action was dispatched in getInitialProps

System information

OS: [Windows 10 and osx]

Version of Next.js: [e.g. 6.0.3]

Additional context

what I did in the example is I just added redux-act and replaced the actions with redux-act actions and deleted the thunk AddCount action.
Issue 1:
Using Kubernetes 1.1.2 with Vagrant provider, running two pods:

./cluster/kubectl.sh get po
NAME READY STATUS RESTARTS AGE
mysql-pod 1/1 Running 0 21s
wildfly-rc-l2cto 1/1 Running 0 21s

One of the pods was deleted:

./cluster/kubectl.sh delete po wildfly-rc-l2cto
pod "wildfly-rc-l2cto" deleted

Watching the status of pods are shown as:

./cluster/kubectl.sh get -w po
NAME READY STATUS RESTARTS AGE
mysql-pod 1/1 Running 0 1m
wildfly-rc-2o8vd 1/1 Running 0 13s
wildfly-rc-l2cto 1/1 Terminating 0 1m
NAME READY STATUS RESTARTS AGE
wildfly-rc-l2cto 0/1 Terminating 0 1m
wildfly-rc-l2cto 0/1 Terminating 0 1m
wildfly-rc-l2cto 0/1 Terminating 0 1m

Two issues:

Refreshed status shows the only for the changed pod and shows it three times

Even after waiting for 5 minutes, the status does not refresh to Terminated

Just checking the status as kubectl.sh get po shows that the pod has been terminated. But its confusing that with -w the status never updates to Terminated or something intuitive.

Issue 2:
A Replication Controller is started using https://github.com/arun-gupta/kubernetes-java-sample/blob/master/wildfly-rc.yaml and shows:

./cluster/kubectl.sh create -f ~/workspaces/kubernetes-java-sample/wildfly-rc.yaml replicationcontrollers/wildfly-rc

Pods are shown correctly as:

./cluster/kubectl.sh get -w po
NAME READY STATUS RESTARTS AGE
wildfly-rc-k6pk2 1/1 Running 0 47s
wildfly-rc-wez29 1/1 Running 0 47s

Scaled up by 1 (config file has 2) as:

./cluster/kubectl.sh scale --replicas=3 rc wildfly-rc

and the output is updated correctly:

NAME READY STATUS RESTARTS AGE
wildfly-rc-aqaqn 0/1 Pending 0 0s
wildfly-rc-aqaqn 0/1 Pending 0 0s
wildfly-rc-aqaqn 0/1 Pending 0 0s
wildfly-rc-aqaqn 0/1 Running 0 2s
wildfly-rc-aqaqn 1/1 Running 0 11s

Replicas are then reduced to 1:

./cluster/kubectl.sh scale --replicas=1 rc wildfly-rc

and the output shows:

wildfly-rc-wez29 1/1 Running 0 1m
wildfly-rc-aqaqn 1/1 Running 0 36s

Ctrl+C and view the list of pods running shows:

./cluster/kubectl.sh get -w po
NAME READY STATUS RESTARTS AGE
wildfly-rc-k6pk2 1/1 Running 0 2m

Seems like the previous two pods were killed but their status was still updated to Running. This is inconsistent with the current state of Pods running.
Issue 1:
Challenge Use a CSS Class to Style an Element has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<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>

Issue 2:
Challenge Use a CSS Class to Style an Element has an issue.

User Agent is: Mozilla/5.0 (Linux; Android 4.4.2; SM-T231 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.105 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<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>
Issue 1:
Describe what you were doing when the bug occurred:

Using Profiler tab

Clicked on a commit

It threw this error

Please do not remove the text below this line

DevTools version: 4.6.0-6cceaeb67

Call stack: at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:162825)

at N (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:161772)

at e.getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:164582)

at ec (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:339280)

at ci (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59620)

at nl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:69923)

at Ll (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:110996)

at qc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102381)

at Hc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102306)

at Vc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102171)

Component stack: in ec

in div

in div

in div

in So

in Unknown

in n

in Unknown

in div

in div

in rl

in Ze

in fn

in Ga

in _s

Issue 2:
Describe what you were doing when the bug occurred:

Profiling a slow component

In a component that rendered 5000 pre tags with single lines of text in them, that has an unrelated controlled text box is the same component that was typed into while profiling. App hung a while and, when it rendered again the error was in the profiler.

Please do not remove the text below this line

DevTools version: 4.6.0-6cceaeb67

Call stack: at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:162825)

at N (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:161628)

at e.getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:164582)

at ec (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:339280)

at ci (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59620)

at Ll (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:109960)

at qc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102381)

at Hc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102306)

at Vc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102171)

at Tc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:98781)

Component stack: in ec

in div

in div

in div

in So

in Unknown

in n

in Unknown

in div

in div

in rl

in Ze

in fn

in Ga

in _s
Issue 1:
Environment

Windows build number: 10.0.18999.0
Windows Terminal version: 0.5.2762.0

Steps to reproduce

Open a new PowerShell tab. PowerShell version does not matter.

Paste and run the following code in the PowerShell tab:

Register-EngineEvent -SourceIdentifier Powershell.Exiting -Action { Set-Content -Value "Hello there." -Path "$env:TEMP\General Kenobi.txt" }

Close the PowerShell tab by clicking the x button or by the exit command. Or close the Terminal window.

Expected behavior

The PowerShell tab should trigger the Powershell.Exiting event and a file %temp%\General Kenobi.txt should be created.

Actual behavior

The event does not trigger and no file is created.

Note: If you reproduce this in the native PowerShell 5 or 7-preview.3 console (not the Terminal app) you'll find that the event triggers correctly only when using the exit command. Clicking the close button also does not trigger the event. Although I also reported that at PowerShell/PowerShell#8000, I believe that with Terminal it's an independent issue.

Issue 2:
Description of the new feature/enhancement

Sometimes i need to open many panes in a tab with splitHorizontal/splitVertical hotkeys. And then broadcast input to all the panes in current tab, or all tabs.

Is it possible to support broadcast input, like iterm2?
Issue 1:
I think Angular 2 is missing a way to retrieve innerHTML of the original element

<foo>SOME TEXT HERE</foo>

I know I can render the original content with <ng-content>

@Component({
selector: 'foo',
template: '<ng-content></ng-content>'
})

However there is no way I can retrieve the original content in constructor, or anywhere in the code.

The @Input is only able to access attribute, but not inner HTML.

And the ElementRef in constructor is a already modified element.

May I know what is the proper way to get inner HTML of the element?

Issue 2:
Use case:

Angular Material has a directive called md-icon that lets the user embed SVG content via URL:

<md-icon svg-src="../img/puppy.svg">

We need to be able to build a directive in angular 2 that directly embeds content in this way. Using a binding on innerHTML is possible, but susceptible to XSS and would require ugly string manipulation of DOM-like content.
Issue 1:
In the sklearn.metrics.precision_recall_curve documentation,

thresholds : array, shape = [n_thresholds := len(np.unique(probas_pred))]

But as the example below shows,

>>> y_scores = np.array([0.1, 0.4, 0.35, 0.8])
...
>>> thresholds
array([ 0.35, 0.4 , 0.8 ])

the shape of threshold is not len(np.unique(probas_pred)).

Issue 2:
Referencing "The last precision and recall values are 1. and 0. respectively and do not have a corresponding threshold. This ensures that the graph starts on the x axis."

Say you have a tie in your highest predicted probability output from the classifier with some false positives and some true positives, for example:

y_true = [ 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0]
y_pred = [.9, .9, .9, .8, .8, .7, .7, .6, .5, .4, .3]
precision, recall, thresholds = precision_recall_curve(y_true, y_pred)

Yields:

Pricision: [0.400, 0.333, 0.375, 0.428, 0.400, 0.333, 1.000]
Recall: [1.000, 0.750, 0.750, 0.750, 0.500, 0.250, 0.000]

I understand that recall goes to zero in the limit, but precision might not be so clear-cut. A really difficult problem where your top prediction is a false positive would have precision go to zero in the limit I believe. For plotting with this function, this case is probably not a big deal a vertical line from 0 to 1 would be hidden by the y-axis.

But for the drawn top-preds, as seen above, the plot becomes misleading and makes the viewer think that at least their top prediction was true positive. This may seem like a corner case, but I ran into it on a tough classification problem I was working on and was a little baffled by the output until I checked the code out.

A quick fix to preserve the intention of a clean P-R plot might be to draw a horizontal line from the highest threshold to the y-axis, this should not alter the output of most cases like here. Trying to actually calculate where it's going in the limit might be a bit overkill :-)

I would also think that adding a 1 to the end of the thresholds vector would be helpful when plotting both precision and recall against the probabilities.

I'm happy to open a PR if anyone thinks this is worth addressing.
Issue 1:
failures:

---- integration::node_compat_tests::node_compat_tests stdout ----
thread 'integration::node_compat_tests::node_compat_tests' panicked at 'assertion failed: `(left == right)`
left: `Some(0)`,
right: `Some(1)`', cli/tests/integration/node_compat_tests.rs:17:3

https://github.com/denoland/deno/actions/runs/4664060803/jobs/8255956913?pr=18649#step:35:4996

Issue 2:
Node.js compatibility ... Node.js compatibility "parallel/test-child-process-exec-timeout-kill.js" => ./cli/tests/node_compat/test.ts:54:11
error: AssertionError: Failed assertion: error: Uncaught AssertionError: Values are not strictly equal:

[Diff] Actual / Expected

- false
+ true

at new AssertionError (ext:deno_node/assertion_error.ts:411:15)
at toNode (ext:deno_node/assert.ts:43:23)
at Function.strictEqual (ext:deno_node/assert.ts:214:5)
at file:///Users/runner/work/deno/deno/cli/tests/node_compat/test/parallel/test-child-process-exec-timeout-kill.js:42:10
at file:///Users/runner/work/deno/deno/cli/tests/node_compat/test/common/index.js:286:15
at ChildProcess.exithandler (ext:deno_node/child_process.ts:284:9)
at ChildProcess.emit (ext:deno_node/_events.mjs:379:28)
at ext:deno_node/internal/child_process.ts:158:26
at Object.runMicrotasks (ext:core/01_core.js:419:30)
at processTicksAndRejections (ext:deno_node/_next_tick.ts:51:14)

throw new AssertionError(msg);
^
at assert (file:///Users/runner/work/deno/deno/test_util/std/testing/asserts.ts:141:11)
at fail (file:///Users/runner/work/deno/deno/test_util/std/testing/asserts.ts:602:3)
at fn (file:///Users/runner/work/deno/deno/cli/tests/node_compat/test.ts:104:9)
at async testStepSanitizer (ext:cli/40_testing.js:460:5)
at async runTest (ext:cli/40_testing.js:782:20)
at async TestContext.step (ext:cli/40_testing.js:1221:22)
at async runTest (file:///Users/runner/work/deno/deno/cli/tests/node_compat/test.ts:54:3)

FAILURES

Node.js compatibility ... Node.js compatibility "parallel/test-child-process-exec-timeout-kill.js" => ./cli/tests/node_compat/test.ts:54:11

FAILED | 1 passed (522 steps) | 1 failed (1 step) (53s)
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

The drawer should stick to the right side of the screen when set with anchor="right" and type="permanent".

Current Behavior

The drawer sticks to the left.

Steps to Reproduce (for bugs)

<Drawer anchor="right" type="permanent"><div>Hello, world!</div></Drawer>

Your Environment

Tech
Version

Material-UI
beta12

React
15.6.2

browser
Chrome

etc
MacOS

Issue 2:
I've use an SVG for my label prop on the Toggle component, it displays fine. However the Toggle component does not propagate :hover / hoverColor to the label node. If I place an SvgIcon component next to Toggle it receives the hover event fine and changes color, not so when used as the label node for Toggle.

I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I expect the color of my SVG icon to change when hovering over it.

Current Behavior

Hover event not received, no change in SVG style.

Steps to Reproduce (for bugs)

https://codesandbox.io/s/42j70ln7m9

View Code Sandbox example

Mouseover both SVG images, Toggle component doesn't change SVG color on :hover.

Context

UI polish, not essential but would be nice to have it working.

Your Environment

Some details below but issue reproduced in Code Sandbox.

Tech
Version

Material-UI
0.20.0

React
15.6.2

Chrome
63.0.3239.132

Firefox
57.0.4