Controllers in dynamic assembly

Reposting from https://forums.asp.net/t/2106790.aspx?Controllers+in+dynamic+assembly
Hi. I am trying to create some dynamic convention based API controllers like so:
// Create some controllers via Reflection.Emit inside dynamic assembly
var assembly = DynamicControllers.CreateAssembly(dynamicControllerConfig);
var builder = services.AddMvc().AddApplicationPart(assembly);

That works well as long as there are no views involved. When I try to access a controller with a view from my main assembly...
public class HelpController : Controller {
    // ..
    public IActionResult Index() => View();
    // ..
}

...I get this exception:
System.NotSupportedException: The invoked member is not supported in a dynamic assembly.
   at System.Reflection.Emit.InternalAssemblyBuilder.GetManifestResourceStream(String name)
   at Microsoft.Extensions.DependencyModel.DependencyContextLoader.GetResourceStream(Assembly assembly, String name)
   at Microsoft.Extensions.DependencyModel.DependencyContextLoader.LoadAssemblyContext(Assembly assembly, IDependencyContextReader reader)
   at Microsoft.Extensions.DependencyModel.DependencyContextLoader.Load(Assembly assembly)
   at Microsoft.Extensions.DependencyModel.DependencyContext.Load(Assembly assembly)
   at Microsoft.AspNetCore.Mvc.ApplicationParts.AssemblyPart.GetReferencePaths()
   at Microsoft.AspNetCore.Mvc.Razor.Compilation.MetadataReferenceFeatureProvider.PopulateFeature(IEnumerable`1 parts, MetadataReferenceFeature feature)
   at Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager.PopulateFeature[TFeature](TFeature feature)
   at Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRoslynCompilationService.GetCompilationReferences()
   at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory)
   at Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRoslynCompilationService.get_CompilationReferences()
   at Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRoslynCompilationService.Compile(RelativeFileInfo fileInfo, String compilationContent)
   at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorCompilationService.Compile(RelativeFileInfo file)
   at Microsoft.AspNetCore.Mvc.Razor.Internal.CompilerCache.CreateCacheEntry(String relativePath, String normalizedPath, Func`2 compile)
--- End of stack trace from previous location where exception was thrown ---
   ...
   at Microsoft.AspNetCore.Mvc.Razor.Internal.CompilerCache.GetOrAdd(String relativePath, Func`2 compile)
   at Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRazorPageFactoryProvider.CreateFactory(String relativePath)
   at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.CreateCacheResult(HashSet`1 expirationTokens, String relativePath, Boolean isMainPage)
   at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.OnCacheMiss(ViewLocationExpanderContext expanderContext, ViewLocationCacheKey cacheKey)
   at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.LocatePageFromViewLocations(ActionContext actionContext, String pageName, Boolean isMainPage)
   at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.FindView(ActionContext context, String viewName, Boolean isMainPage)
   at Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine.FindView(ActionContext context, String viewName, Boolean isMainPage)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor.FindView(ActionContext actionContext, ViewResult viewResult)
   at Microsoft.AspNetCore.Mvc.ViewResult.<ExecuteResultAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   ...
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeResultAsync>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   ...
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeResultFilterAsync>d__31.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeAllResultFiltersAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   ...
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeResourceFilterAsync>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeAsync>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   ...
   at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   ...
   at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.<Invoke>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   ...
   at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.<Invoke>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   ...
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Frame`1.<RequestProcessingAsync>d__2.MoveNext()

Apparently RazorViewEngine tries to search the path of the dynamic assembly for view files which must obviously fail as that assembly has no path. How can I configure MVC to exclude that assembly from possible candidates for view file lookups?

Dup of https://github.com/aspnet/Mvc/issues/5487 which was fixed in https://github.com/aspnet/Mvc/commit/24d5dfb5527d46da097b56b7cfc3b28ec8f8ad3e. Is updating the application to 1.1.0 a potential solution for you?


Upgrade to Python 3.10 & Django 4

Description
Pretty minor stuff despite the big version changes. The biggest change is that we no longer need django-redis because Django has built-in support for Redis caching now. Will leave more details inline with the code.
Steps to test/reproduce
The test suite is passing and I also manually tested:

DRF API views
Admin
Project list
Refreshing projects for a user
Refreshing collaborators on a project
Creating a scratch org (failing due to config problems, doesn't seem to be code-related)

I think we should merge this and give it a shot on staging for a bit
Show me
Provide screenshots/animated gifs/videos if necessary.

 Upgrade to Django 4 & Python 3.10


When creating an app, instead of drop-down show templates as a grid

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Summary 💡
Current UI:

Making the layout grid-like shall make templates more discoverable.
Note: In future there will be 4-6 more templates that will come here, we need to keep that in mind while designing.
Examples 🌈

Motivation 🔦
To help users visually differentiate between each template and help them choose the right one for their use-case.

I tried two different options here. While the ask was to simply change the layout, there are a few considerations:

Add a description (all of these could use better copy, but I tried to be a little more informative than our current content)
Is it valuable to include the Connection type? I added it based on Retool & Appsmith including it, but lmk if it doesn't make sense here.
Adding categories; this helps people envision the application of the template and could help get buy in from other team members.
Some kind of preview:

Ideally, the preview image would be of the app itself. That way the user does not feel disoriented between the preview and the actual template. They can make better decisions about which template works best for their needs.
Right now, our templates are not sophisticated or relevant enough for someone to actually use them. @prakhargupta1  perhaps we should replace these with the examples you've been sending people instead? Or, dedicate some time to create really stellar templates that solve very specific and common use cases?
For now, I am going with an illustrated preview style (similar to what is on our landing page for consistency).

NOTE: Trying out a quick Loom walkthrough of these options. Everyone at MUI should have access if you log in through your google account. Please watch that first, then review the presentation link if you would like more time with it, and finally, feedback can be here or in Figma for any specific contextual feedback.
The feedback I'm looking for on this draft is:

which version makes the most sense given our current standing with Direction 13?
do the above added sections, categories, description, connection type, and preview choices make sense?

this is more about the hierarchy and not the styling or copy itself

how can we get better templates? what's the difference between what would be considered a template vs. example app to show use cases?

Version 1 Loom walkthrough
Version 1 Presentation based on our current implementation and templates.
Version 1 frame for comments.
Version 2 Loom walkthrough
Version 2 Presentation with a different Create New menu approach and template gallery with filters.
Version 2  frame for comments.

Great work Gerda! Both of the options look good. I'll discuss the questions in tomorrow's team call and get back here with the detailed feedback.

It isn't applicable since: https://github.com/mui/mui-toolpad/discussions/1748. Closing the issue.


bug: new OCR import sorting order causes bug

https://github.com/Konano/arknights-mower/blob/27b76f50b6ad2ae18afcc6409e72b0558f7ee131/arknights_mower/ocr/__init__.py#L2
The bug was fixed after moving from ..utils import config to the bottom.
Please check it.

sorry qwq


Connection Lost + Slow IMAP Connection

On my EC2 server, Rust IMAP takes about 3 minutes to initially connect to imap.gmail.com, but the SMTP connection happens instantly. Also, it frequently drops connection after maybe 5-10 more minutes with "Connection Lost". Any idea what might be causing this?
It stalls on the second line with port 993.
let tls = native_tls::TlsConnector::builder().build()?;
let client = imap::connect((domain_name, port), domain_name, &tls)?;

The specific library line it hangs on is
match TcpStream::connect(addr) {

That's truly bizarre — that's just a normal TCP connect with nothing special about it. This feels like some kind of configuration error for your network or firewall. Maybe DNS lookup is slow? Does it work if you try to connect using the IP directly?

Hmm yeah I'm not sure.
-----END CERTIFICATE-----
subject=CN = imap.gmail.com
issuer=C = US, O = Google Trust Services LLC, CN = GTS CA 1C3
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: ECDSA
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 4292 bytes and written 396 bytes
Verification: OK
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 256 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
    Protocol  : TLSv1.3
    Cipher    : TLS_AES_256_GCM_SHA384
    Session-ID: 9E7EBDE7DCBE92D7A995E3B619F512260FA6D66CE57986E3837B55F6633A6792
    Session-ID-ctx:
    Resumption PSK: A1B98CB7AB0649AF38AAD9F17405E895BB29DF1A116383AF6F575514179904EE80882DEC4FBDF19401C181DFCF2DFC5A
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    TLS session ticket lifetime hint: 172800 (seconds)
    TLS session ticket:
    0000 - 02 56 7e 61 b9 5a
...
    Start Time:<PHONE_NUMBER>
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
    Extended master secret: no
    Max Early Data: 0
---
read R BLOCK
* OK Gimap ready for requests from <IP_ADDRESS> z5mb35023069oct

The fact that openssl s_client also hangs suggests this isn't actually a problem with the imap crate. Unfortunately I also don't have much of an idea of what else it can be, sorry!


Can't run local deployment

I've followed the instructions for local deployment, however, when running npm run create I get this error:
><EMAIL_ADDRESS>create
> node ./cli/magic.js create

node:internal/modules/cjs/loader:1078
  throw err;
  ^

Error: Cannot find module '/Users/XXX/projects/aws-genai-llm-chatbot/cli/magic.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
Node.js v18.16.0

Sure enough, there is no magic.js, so I updated package.json to point to magic.ts instead of magic.js:
"create": "node ./cli/magic.ts create",

However, now I get this error:
><EMAIL_ADDRESS>create
> node ./cli/magic.ts create

(node:17623) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/Users/XXX/projects/aws-genai-llm-chatbot/cli/magic.ts:4
import {  Command } from 'commander';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1176:20)
    at Module._compile (node:internal/modules/cjs/loader:1218:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.16.0

Hi @rambunctiousmonk
at first glance, it seems you haven't run npm run build after npm install the first time, hence the missing magic.js.
Can you double check if that's the case? (Make sure "create" points back to magic.js too and not to magic.ts)


Update specs paths

Update ReadMe Path to match with updated Repo Structure

Automation for azure-sdk-for-python

Automation for azure-sdk-for-js

Automation for azure-sdk-for-ruby

Automation for azure-sdk-for-go

Can one of the admins verify this patch?

Automation for azure-sdk-for-java


add button to disable fast startup

It's a biased opinion but I like my PC to actually shut down when I tell it to shut down :)

Edited out a lot of stuff which suit me personally, but you can re-use the "disable fast startup" code in your scripts.


Bind to object eclosed in if template broken in polymer expressions 0.10.0-pre.2

 Issue by tomaszkubacki
Originally opened as dart-lang/sdk#18792

When you press select currency button in 0.10.0-pre.1 correct currency will be selected (PLN) but in  0.10.0-pre.2 after press USD will be shown.
Full project in attachment
<polymer-element name="binding-selector-issue">
  <template>
<template if="{{showSelector}}">
  <select  value="{{document.currencyId | asInteger}}">
     <option template repeat="{{currency in model.currencies}}" value="{{currency.id}}">{{currency.name}}</option>
  </select>
</template>
<button on-click="{{selectCurrency}}">select currency</button>

  </template>

</polymer-element>

 Comment by floitschG

Added Area-Polymer, Triaged labels.

 Comment by sigmundch

Looking more closely, the fixes we did in polymer-expressions made it match much closer to the original binding delegate, so I'm not a fan of reverting the old fix either. I opened issue dart-lang/sdk#19105 to separately investigate the two-way binding problem in the default syntax.
I discovered today that if you use PolymerExpressions with the default delegate syntax, you can work around this bug. For example, replace:
'<option template repeat="{{i in y}}" value="{{i}}">item {{i}}'
with:
'<option template repeat="{{y}}" value="{{}}">item {{}}'
and the problem will be avoided.
The issue is that polymer-expressions is creating scope objects multiple times for the "x in y" comprehension. These objects are not comparable, so the system thinks it needs to notify about it as if it was a change. The earlier fix that eliminated the second notification on two-way bindings exposed this problem because it removed an extra notification that hid this underlying problem (2 wrongs make it right?).
Here is a proposed fix for the issue with comprehensions: https://codereview.chromium.org/304223004/

 Comment by sigmundch

Ok, got more progress on this. It seems that my "fix" in dart-lang/sdk@81b1a5506a0586751c2b9669675ba739b3b933f1 for losing the cursor position in two-way bindings, created this issue.
Here is a smaller repro without using transformers or observable lists:
    <link rel=import href="packages/polymer/polymer.html">

    <polymer-element name="binding-selector-issue">
      <template>
        <select value="{{x}}">
        <option template repeat="{{item in items}}" value="{{item}}">{{item}}</option>
        </select>
      </template>
    </polymer-element>

    <binding-selector-issue></binding-selector-issue>
And here is another repro that uses only polymer_expressions, but doesn't use polymer elements:

 Comment by jmesserly

Removed Area-Polymer label.
Added Pkg-Polymer, Area-Pkg labels.

 Comment by sigmundch

I've been looking more into it and I am more inclined to believe that my fixes in polymer-expressions were wrong. In fact, I can reproduce the 2-way binding bug if I replicate the same test, but use the default delegate based on path observers.
It might be a good idea to revert the previous fix to bring things back to a consistent state between the two kind of delegates for the time being.

Added Started label.

 Comment by sigmundch

fixed in dart-lang/sdk@403e2478f8ea2324e84a40a6f5da53cc03fb6a5e

Added Fixed label.


Los Angeles county on 03/12 incorrect

# A tibble: 8 x 6
  adm0_name adm1_name  adm2_name          adm3_name date       cum_confirmed_cases
  <chr>     <chr>      <chr>              <chr>     <date>                   <dbl>
1 USA       California Los Angeles County NA        2020-03-08                  14
2 USA       California Los Angeles County NA        2020-03-09                  14
3 USA       California Los Angeles County NA        2020-03-10                  20
4 USA       California Los Angeles County NA        2020-03-11                  27
5 USA       California Los Angeles County NA        2020-03-12                   0
6 USA       California Los Angeles County NA        2020-03-13                  40
7 USA       California Los Angeles County NA        2020-03-14                  53
8 USA       California Los Angeles County NA        2020-03-15                  69

Situations like this should really be in there as missing right?

@kendonB lots of stuff is missing on 3-12 -- that was the day after JHU stopped providing county level data, and the day before I this project started to exist. We'll back-fill the data some day.

Wondering if this is related to #374 ...

@lazd, this scraper calls parse.number: cases: parse.number($('.counter').first().text() and parse.number says   if (string === '') return 0;.
This method is used extensively in the code: find . -name '*.js' -print0 | xargs -0 grep -i 'parse.number' | wc -l => 438.  Perhaps we should change the method to let callers specify the default return value for empty strings (either null or 0).

Re-opened as https://github.com/covidatlas/coronadatascraper/issues/807, "parse.number('') should return null, not 0".  Closing this.


Page always reloads on route change

I have a simple routing set up with below:
Change path with:

And routes set up.
When path changes, initially the relevant component shows properly for 2-3 secs but then page reloads. Using it with lit-element

Hi @mittalvaibhav! The description you've provided makes it difficult to identify the issue. It is missing the steps to reproduce your setup, which seems to be essential to finding the root cause.
Could you please create a minimal demo project that shows the issue? One way of doing that would be with an online tool like glitch.com, using this Vaadin Router demo as a starting point.


[kops] Upgrade to 1.11.1

Bump the version of KOPS from 1.10.0 to 1.11.1
Signed-off-by: Guillaume Perrin<EMAIL_ADDRESS>

@osterman can you review this PR please


fix: Removed hard coded 4 seconds timeout for action execution in MySQL

Description
We seem to have introduced a hard coded 4 seconds execution timeout in the MySQL plugin that was. causing the more complicated queries to throw a stale connection exception. This PR reverts that change to allow queries to run completely.
Fixes #17324
Type of change

Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Manual
JUnit

Test Plan
Please use this document to verify all scenarios where we were seeing a stale connection exception.
Issues raised during DP testing

Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR)

Checklist:
Dev activity

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] PR is being merged under a feature flag

QA activity:

[ ] Test plan has been approved by relevant developers
[ ] Test plan has been peer reviewed by QA
[ ] Cypress test cases have been added and approved by either SDET or manual QA
[ ] Organized project review call with relevant stakeholders after Round 1/2 of QA
[ ] Added Test Plan Approved label after reveiwing all Cypress test

/ok-to-test sha=e42633b

/build-deploy-preview skip-tests=true


fixed small  typo afew to a few

I also gave more up to date versions for example of  nvm install and nvm which as well as your pointer section
I love your project by the way.
I hope you like my minor suggestions.  I thought it could be confusing to new people of node if we refer to such old versions that no one uses anymore.

thanks for doing this, I'll delete the branch now


Just cannot get it installed

I know little to nothing about programming and I am trying to install this plugin.  I have downloaded the plugin and am at the Configuration screen.  I access the terminal screen, but when I try to paste the first command (sudo npm install -g dorita980) I get a reminder to "be respectful and that great power comes with great responsibility." The terminal then asks for a password but will not accept any typing. I did hit enter after pasting the first commend. Am I doing something wrong here? I have installed a couple other bridges successfully but never had to mess with the terminal screen.  Here is a screen shot:

@tonykerns which instructions are you following to install the plugin? Please check the instructions at https://github.com/homebridge-plugins/homebridge-roomba2/

I will try these instructions. I am traveling for work, so I should have a reply in a couple weeks. Thank you. On Apr 22, 2023, at 9:37 PM, Karl von Randow @.***> wrote:
@tonykerns which instructions are you following to install the plugin? Please check the instructions at https://github.com/homebridge-plugins/homebridge-roomba2/
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

I am still having issues with this installing.  I am very new with Homebridge and not a programmer. A step-by-step would be great (with screen shots). If not, I understand and will just not use it in HomeKit. On Apr 22, 2023, at 9:37 PM, Karl von Randow @.***> wrote:
@tonykerns which instructions are you following to install the plugin? Please check the instructions at https://github.com/homebridge-plugins/homebridge-roomba2/
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

@tonykerns let's give it a go getting you going in this issue and then we'll see what changes we might make to the README. Have you done step one from the "Installation" heading? Then on to step two—Setup.
Let me know which steps you've done and what the output was from them. Perhaps take some screenshots and post them here as well... that will help us work out where the tricks are!


Generated client: embed generated methods into VMIP interface

What this PR does
Before this PR:
We have our custom virtualMachineInstancePresetInterface interface with the common Get, Delete, etc...
From https://github.com/kubevirt/kubevirt/pull/11297 the common methods implementation works as a wrapper with different signatures for the generated ones, redirecting the requests to them.
After this PR:
Convert using the generated client signatures instead of the custom one. The generated virtualMachineInstancePreset  is embedded into our custom one, also providing new DeleteCollection and Watch methods.
The changes inherited are:

Patch now uses metav1.PatchOptions{} instead of *metav1.PatchOptions{}.
List now uses metav1.ListOptions{} instead of *metav1.ListOptions{}.
Get now uses metav1.GetOptions{} instead of *metav1.GetOptions{}.
Delete now uses metav1.DeleteOptions{} instead of *metav1.DeleteOptions{}.
Create now receives metav1.CreateOptions{} too.
Update now receives metav1.UpdateOptions{} too.
Added DeleteCollection, Watch methods.
All the methods above take a  Context as first paramether.

Fixes #
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Special notes for your reviewer
For an easier review process the commits was splitted in the following manner:

Align our custom common methods' signature to the generated one in the following order:

Create - introduced CreateOptions and introduced a Context
Get - used GetOptions instead of the pointer and introduced a Context
List - used ListOptions instead of the pointer and introduced a Context
Update - introduced UpdateOptions and introduced a Context
Delete - used DeleteOptions instead of the pointer and introduced a Context
Patch - used PatchOptions instead of the pointer and introduced a Context

Embed the generated virtualMachineInstancePreset into the custom one.

Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

[ ] ~Design: A design document was considered and is present (link) or not required~
[x] PR: The PR description is expressive enough and will help future contributors
[x] Code: Write code that humans can understand and Keep it simple
[x] Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
[x] Upgrade: Impact of this change on upgrade flows was considered and addressed if required
[ ] ~Testing: New code requires new unit tests. New features and bug fixes require at least on e2e test~
[ ] ~Documentation: A user-guide update was considered and is present (link) or not required. You want a user-guide update if it's a user facing feature / API change.~
[ ] ~Community: Announcement to kubevirt-dev was considered~

Release note

NONE

/cc @xpivarc @orelmisan

@orelmisan Thanks for the review! I addressed your comments. PTAL


Start Screen should Display actual game info

Right now the numbers are random, but we should log our player progress and things!

Created a save file system, so that we can grab player info, and display it whever we'd like (Like the start screen), finished via commit f941bfd760f6b3bcc1b2062bfc7f7965a6e4811c


Matmul: 2D Tiling

Add the example of matmul with 2D tiling.

Thanks! As a follow-up we can tinker with the tile sizes to see if that improves the perf numbers. And as a more medium-term goal i might add a few functions under experimental to automate the performance tuning.


Nz Time Picker nzDefaultOpenValue Error

Reproduction link
https://ng-zorro-antd-start-zsmup7.stackblitz.io
Steps to reproduce
Apply nzDefaultOpenValue to the nz=time-picker, for me i used: nzDefaultOpenValue="2019-04-01T09:00:00". Full code: . Now click onto the timepicker, it errors out and gives a console error stating something along: ERROR TypeError: "this._defaultOpenValue.getHours is not a function"
What is expected?
When you click onto the timepicker, my date / time should be pre-selected. Even if i just use something like: 'nzDefaultOpenValue="09:00"'
What is actually happening?
Timepicker errors out and displays error in console.

Environment
Info

ng-zorro-antd
7.2.0

Browser
66.0.2 (64-bit) Firefox Quantum

Reading through the docs at: https://ng.ant.design/components/time-picker/en
You can see that using format: new Date(0, 0, 0, 9, 0, 0) i can get this to work.


test: Reproduce #9372

Seems like it is caused by nested create. createMany works normally for the same amount of data.

Superseded by #15279


PersistentEntity must not be null

I have code that is working expect that if any data is returned from dynamodb then I get "PersistentEntity must not be null". If the table is empty then I don't get any error. I have tried a few solutions but have not figured out what the problem is.
I see that the gemfire project had the same problem last year (https://github.com/spring-guides/gs-accessing-gemfire-data-rest/issues/1).
Here is the important part of my POM.
		<dependency> 			<groupId>org.springframework.boot</groupId> 			<artifactId>spring-boot-starter-data-rest</artifactId> 		</dependency> 		<dependency> 			<groupId>com.github.derjust</groupId> 			<artifactId>spring-data-dynamodb</artifactId> 			<version>${springdata.dynamodb.version}</version> 		</dependency>

It looks like this is related to https://github.com/derjust/spring-data-dynamodb/issues/15


Complete translation

https://tour.dlang.org/tour/ja/welcome/welcome-to-d
The tour is not completed.

@keito940 please have a look here:
https://github.com/dlang-tour/japanese/pulls
We are very happy to give you merge rights, so that you could help to move this work forward :)

Closing this as the Japanese translation is an active WIP project
If you want to help this project you could:

review & approve open PRs
do page translations yourself
get in touch with @kotet who is working very hard on the Japanese translation


initial_purification parameter should be # of rounds

initial_purification is a number; its semantics are a little obscure, and depend on the chosen purification scheme.  For some schemes, if it is greater than zero, a single round of purification will be performed. For others, it is the number of rounds of purification to be performed.
Or, better yet, the parameter should be renamed to be link_purification_rounds or something a little closer to that meaning, but if you do that, make sure fix all of the .ned / .ini files!

The code that uses this, and the surrounding comments, are confusing, but it might actually be okay, in which case this can be closed when #104 and #105 are.


Feature/57 16ukerk hidden command

bot.load_extension("nerdlandbot.commands.kerk")

Probably overengineering this feature, however that's part of the fun of this project? right?

It had been approved previously so would be nice if we could add like this and have an issue for the further improvements. It's a hidden silly easter egg in the end.

Probably overengineering this feature, however that's part of the fun of this project? right?

It had been approved previously so would be nice if we could add like this and have an issue for the further improvements. It's a hidden silly easter egg in the end.


Aimbot and Triggerbot activated by 2 selectable keys

You can now activate aimbot with key A or B
Same with the Triggerbot

Found some bugs, will push an update soon

'So usefull'

@thomas0aotian I needed this for personal use but still wanted to make the community profit from it if they find it useful.

'So usefull'

magnet trigger bot paste very useful as well

lmao yikes imagine using pastes


Implement RSpec/IteratedExpectation cop. Fixes #278

@backus
Please look at the examples and let me know if you can think of other examples that we can detect, or some possible false positives.
TODO:

[ ] Implement autocorrect
[x] Multiple expectations can also be converted to all with an and

PR updated

Looks great! Thanks @Darhazer


BUG: Handling of guess_bounds for circular coords

(1). Fixes: Coord.guess_bounds, for correctly handling wraparound.
Found the bug while performing an intersection (raised exception within Cube._intersect_modulus):
ValueError: coordinate's range greater than coordinate's unit's modulus

(2). Fixes Coord.nearest_neighbour_index for coords with descending bounds.

Note:
This PR contains two fixes, as the existing 'integration' tests for nearest_neighbour_index draw on the bugged behaviour of the guess_bounds fixed in pnt1 above.  These tests have now been removed and new unit tests coded to replace them.

Thanks @rhattersley, all ready, if your happy, I'll squash it.

if your happy, I'll squash it.

Please do. Thanks.

Squashed, cheers

I want to check a couple of things before this goes in to be on the safe side (checking certain conditions are met when this branch is merged into master)

Scratch the above comment, I should do that after this has been merged into 1.7.x
Ready

Done, cheers @esc24 (and squashed).
Applogies for the PR journey, I'll take a more detailled comb before submitting in future.
Thanks both


UPDATE-Minimal told required in a repair cafe .md

What first aid can be given to someone who has accidentally burnt him self during soldering

@maliarich I forgot to add the power source aspect, maybe you can add this to the /README.md ?

@maliarich I forgot to add the power source aspect, maybe you can add this to the /README.md ?


feat(public URL): Add a public URL field and use it for the status page

⚠⚠⚠ Since we do not accept all types of pull requests and do not want to waste your time. Please be sure that you have read pull request rules:
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:

[x] I have read and understand the pull request rules.

Description
Fixes #2507
Type of change
Please delete any options that are not relevant.

User interface (UI)
New feature (non-breaking change which adds functionality)
This change requires a documentation update

Checklist

[x] My code follows the style guidelines of this project
[x] I ran ESLint and other linters for modified files
[x] I have performed a self-review of my own code and tested it
[x] I have commented my code, particularly in hard-to-understand areas (including JSDoc for methods)
[x] My changes generates no new warnings
[x] My code needed automated testing. I have added them (this is optional task)

Screenshots (if any)

The E2E test timeout error is strange, and I have the same on my machine. I tried to push to see if GH Actions solves the issue, but it doesn't seems to. If anyone know why, I take.


issue_2147

@RocketChat/android

Closes #2147
Screenshots or GIF for the change:

@AuraOfDivinity As pointed out by other users on your issue (#2147) and like the current web app does it is expected to make the users send messages to themselves.


Convert SSH raise to a warning

@jsingle This was making it impossible to run tests :cry:

OK this should be fine too


Response messages sometimes being null

Need a way to log and trace the operations from rust side because sometimes I get a null return value in
final responseMessage = RinfInterface.ReadResponse.fromBuffer(
      rustResponse.message!,
);

My operations are asynchronous and need to wait a bit before returning data to Flutter. I'm assuming rinf doesn't have a timeout between open connections right? I might be wrong. The documentation doesn't help me too much either.

Hi, @kaimatzu , thanks for the report :)
Did you check this section in the docs? If it's insufficient, please tell me more about your concerns.

https://rinf-docs.cunarist.com/writing-code/#response-timeout

Thank you so much! I probably skimmed through that section due to me being in a rush lol. Although, is there a way to set the response timeout to unlimited? Some of my functions really do need to wait for a response however long that may take.

Oh, that was your concern. For now, you can set it to a really long time(maybe a week?), though providing an unlimited response timeout would be nice too. Thanks for the idea! I'll keep this open until we implement that feature.

On a side note, will there be a plan for adding a logging functiinality for rust to the flutter side? It seems like it might be possible to send logs to the vm without closing the connection.

Do you mean something like this?

https://rinf-docs.cunarist.com/writing-code/#printing-for-debugging

Or, possibly something more?

Thank a lot! I'll wait until till you guys implement the no timeout feature. I'll keep posted for the next few updates.


[New Feature]: Add geofilter option for CSLC historical processing

Checked for duplicates
Yes - I've already checked
Alternatives considered
No - I haven't considered
Related problems
No response
Describe the feature request
OPERA SDS wants to have a capability to process a specific region first with CSLC historical processing.
example:

2021 and CALIFORNIA region
2021 and NOT including CALIFORNIA region

Delivered for PCM 2.1.0 release and tested on dev cluster.


command expression failed to be recognized due to the ambiguities

book meeting room 'Honolulu' between 9.am and 12.am to 'B2'

expected
this.book(meeting).room('Honolulu').between(9.am).and(12.am).to('B2')

actual:
this.book(this.meeting(this.room(this.Honolulu(this.between(9))))).am(this.and(12.am)).to('B2')

it is actually book(meeting).room('Honolulu').between(9.am).and(12.am).to('B2')

Fixed by https://github.com/jespersm/groovy/commit/637b850c5bc3233f6dc3df52c1d0a8d3fbb19474


Strip leading spaces from preformatted text and type definitions

A couple of commits that remove unnecessary whitespace from generated wiki markup.

Trims leading whitespace in type tags.
Indents preformatted text by one space, rather than four.

For example, these:
<procedure> (foo a b c)</procedure>

    verbatim text indented by four spaces

Turn into these:
<procedure>(foo a b c)</procedure>

 verbatim text indented by one space

Commit messages provide details. Any questions, just let me know!

Looks good @evhan. Can I give you push access to this repo to bump and tag a new release? I have not been following the changes to Chicken 5.

Sure @AlexCharlton, that's fine with me. Thanks for having a look!


Updating Greece VAT rate from 23% to 24% as of 2016-06-01.

References:

http://www.vatlive.com/vat-rates/european-vat-rates/eu-vat-rates/
http://www.vatlive.com/european-news/greece-raises-vat-rate-to-24-2017/
https://en.wikipedia.org/wiki/Taxation_in_Greece#VAT

Big thanks!
The previous rate needs an end date as well.

I'll add it manually.


tests: Move to Github Actions from Travis CI

In Travis CI, the test of the build with gnu89 format was impossible, so we modify it.

these changes are now included in the PG12 updates.


Create Git tutorial for non-technical staff at GIX

Should include navigating directories from the terminal/command prompt, installing Git (with links), basic add/commit/push workflow, links to markdown basics, and a section for advanced topics like branches and merges.

There is a branch under crewresources that has the bare bones of the tutorial guide.


NetworkHash128 should implement IEquatable

Per Microsoft guidelines, structs should implement IEquatable.
The reflexion based Equals and GetHashCode have some serious performance issues when used in a Dictionary,
Microsoft and Static Analysis always recommend to provide these methods.   See here for details:
https://blogs.msdn.microsoft.com/seteplia/2018/07/17/performance-implications-of-default-struct-equality-in-c/

Codecov Report

Merging #77 into mirror will decrease coverage by 0.02%.
The diff coverage is 0%.

@@            Coverage Diff            @@
##           mirror     #77      +/-   ##
=========================================
- Coverage    6.57%   6.54%   -0.03%
=========================================
  Files          31      31
  Lines        6376    6403      +27
  Branches      992     993       +1
=========================================
  Hits          419     419
- Misses       5942    5969      +27
  Partials       15      15

Impacted Files
Coverage Δ

Mirror/Runtime/NetworkHash128.cs
40.35% <0%> (-36.32%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27e8d38...aba5241. Read the comment docs.

Not sure about this yet. For one, this seems overly complicated and the more elegant solution would be to transition to Guid at some point maybe.
Furthermore I think we should worry about this only if we can't reach 500-1000 CCU. We did so many optimizations lately that we might be there already, and I'd rather have simple code after that point, if that makes sense.


Passing location of MKL binary

The manual currently states that if the MKL location is added to the global OS dynamic library paths OSQP detects it manually. How can we pass directly the location of the dynamic libraries?
For reference, in Julia, we can add to the binaries the MKL binaries as well and it will be useful to be able to specify the MKL library from MKL_jll to be used directly in the solver.
See discussion here https://github.com/JuliaPackaging/Yggdrasil/pull/846

This is interesting.
If you install OSQP under MATLAB, does it use the MKL which is provided by MATLAB?

As of v1.0 beta (on master branch currently), finding the appropriate MKL library is now handled by the linker at compile time and is no longer dlopen'd. Closing this issue.


Add Windows builds

CI is free and people do use Windows, even if I can't provide excellent support for the platform.
I anticipate many builds will not work well.

Man... bun install takes about 5s on macos/linux and two and a half minutes on Windows. That's painful. I'd almost rather just set up an action that's a one-off run, or requires a comment on a PR or something. I'm certainly not going to wait a 15 minute build to complete when the other two builds take 6-7 minutes.


Bonjour/avahi not initliazing properly

OS:
Ubuntu 16.04
Issue Descriptions:
Issue with avahi/bonjour/gpmdp remote
Steps to Reproduce:
Launching the app open it but gives me this error in the linux terminal and it doesnt show up in the gpmdp remote app for my phone. The packages that has to do with avahi that i installed are the avahi-daemon, avahi-utils and libavahi-compat-libdnssd1
Here's the output when launching gpmdp

$ google-play-music-desktop-player

Gtk-Message: Failed to load module "canberra-gtk-module"

Starting Sentry

*** WARNING *** The program 'Google Play Music Desktop Player' uses the Apple Bonjour compatibility layer of Avahi.

*** WARNING *** Please fix your application to use the native API of Avahi!

*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=Google Play Music Desktop Player>

*** WARNING *** The program 'Google Play Music Desktop Player' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.

*** WARNING *** Please fix your application to use the native API of Avahi!

*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=Google Play Music Desktop Player&f=DNSServiceRegister>

error: Could not initialize bonjour service with error: {"errorCode":-65537}

*** WARNING *** The program 'Google Play Music Desktop Player' uses the Apple Bonjour compatibility layer of Avahi.

*** WARNING *** Please fix your application to use the native API of Avahi!

*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=Google Play Music Desktop Player>

*** WARNING *** The program 'Google Play Music Desktop Player' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.

*** WARNING *** Please fix your application to use the native API of Avahi!

*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=Google Play Music Desktop Player&f=DNSServiceRegister>

That is entirely normal and completely unrelated to why GPMDP remote may not be working. Check your firewall and make sure it's allowing mDNS (udp port 5353) through.

As @jostrander those are warnings about the usage of the MDNS compat layer and are expected.
Just check your firewall and if required type you IP in manually.
Also issues for the remote in the future should be raised on the remote repo


[Enhancement Proposal] Logarithmic Filter

Hey,
For a project, I used a logarithmic filter. I though others might find that useful as well.
Code:
class Logarithmic(Codec):

    codec_id="logarithmic"

    def __init__(self, dtype, astype=None):
        self.dtype = np.dtype(dtype)
        if astype is None:
            self.astype = self.dtype
        else:
            self.astype = np.dtype(astype)

        if self.astype.kind != 'f':
            raise ValueError('only floating point data types are supported for astype')

    def encode(self, buf):
        # log10(0) = -inf
        buf[buf==0] += 0.01

        return np.log10(buf, dtype=self.astype)

    def decode(self, buf):
        return (10**buf).astype(self.dtype)

    def get_config(self):
        return dict(
        id=self.codec_id,
        dtype=self.dtype.str,
        astype=self.astype.str
        )

    def __repr__(self):
        r = f"{type(self).__name__}(dtype={self.dtype.str}"
        if self.astype != self.dtype:
            r += f', astype={self.astype.str}'
        r += ')'
        return r

Documentation would follow, if you would accept that proposal
Example:
>>> x = np.linspace(0.1, 100, 15)
>>> x
array([  0.1       ,   7.23571429,  14.37142857,  21.50714286,
        28.64285714,  35.77857143,  42.91428571,  50.05      ,
        57.18571429,  64.32142857,  71.45714286,  78.59285714,
        85.72857143,  92.86428571, 100.        ])
>>> codec = Logarithmic(np.float32)
>>> y = codec.encode(x)
>>> y
array([-1.       ,  0.8594814,  1.1574999,  1.3325827,  1.4570163,
        1.553623 ,  1.6326019,  1.6994041,  1.7572875,  1.8083557,
        1.8540456,  1.8953831,  1.9331256,  1.9678488,  2.       ],
      dtype=float32)
>>> z = codec.decode(y)
>>> z
array([  0.1     ,   7.235714,  14.371428,  21.507143,  28.642859,
        35.77857 ,  42.914284,  50.050003,  57.185707,  64.32143 ,
        71.45714 ,  78.592865,  85.72858 ,  92.864296, 100.      ],
      dtype=float32)

If you want that filter in your module, I can implement it according to you standards :)

Thanks @GibbonJojo, very interesting.
I'd love to know more about how this filter can be useful. Did you use it to improve compression ratio, or for some other purpose?

I mainly needed the decode function, since I had data on a logarithmic scale after decoding the data with another filter. And due to the project structure, it was better to chain these filters together.
Granted, I dont think it improves compression ratio, since using another dtype would result in a precision loss. But I thought, there could be use cases for other people as well; you probably know that better than me


WindiCSS - Buttons missing hover styles

This problem is present in the windi-cli example.  Hovering over the primary/secondary buttons do not change the background to the appropriate color.  It just uses just the default button hover background color.  Upon inspecting the generated output.css, it appears the classes .btn-primary.btn-active,.btn-primary:hover are not being generated.
Buttons were the first and only thing I tested, so there could be other instances of classes not being generated in other components.

I think that's a bug on Windi CSS and I'm afraid I can't do anything about it on my side.
https://github.com/windicss/windicss/issues/345
If you're to using Windi CSS, you can add hover: classes to rewrite the colors until there is a fix for that.
<button class="btn btn-primary hover:bg-primary-focus hover:border-primary-focus">button</button>
<button class="btn btn-secondary hover:bg-secondary-focus hover:border-secondary-focus">button</button>
<button class="btn btn-accent hover:bg-accent-focus hover:border-accent-focus">button</button>

I'm closing this issue because it's not a bug on daisyUI. Please follow the linked issue to get notified when it's fixed.


Update NextLinkOperationImplementation to support LRO rehydration

Fix https://github.com/Azure/autorest.csharp/issues/2158
Description
This PR is to support the prototype in https://github.com/Azure/azure-sdk-for-net/pull/32364
Checklist
To ensure a quick review and merge, please ensure:

[ ] The PR has a understandable title and description explaining the why and what.
[ ] The PR is opened in draft if not ready for review yet.

If opened in draft, please allocate sufficient time (24 hours) after moving out of draft for review

[ ] The branch is recent enough to not have merge conflicts upon creation.

Ready to Land?

[ ] Build is completely green

Submissions with test failures require tracking issue and approval of a CODEOWNER

[ ] At least one +1 review by a CODEOWNER
[ ] All -1 reviews are confirmed resolved by the reviewer

Override/Marking reviews stale must be discussed with CODEOWNERS first

Follow-up in #3301


get the centroid and the bounding box of each aggregation bucket

In gitlab by @MohamedHamouGisaia on Jul 7, 2017, 11:43

add the geo centroid and geo bbox to the aggregation metrics
also, must be available in the geoaggregation with:

withGeoCentroid
withGeoBBOX

If withGeoCentroid or withGeoBBOX is specified, the returned geometry must be the one used in the geojson. withGeoBBOX wins over withGeoCentroid.

In gitlab by @MohamedHamouGisaia on Jul 7, 2017, 11:43
added ~1918908 label

In gitlab by @sylvaingaudan on Jul 17, 2017, 15:05
added ~2291853 label

In gitlab by @sylvaingaudan on Jul 17, 2017, 15:27
added ~2329926 label

In gitlab by @sylvaingaudan on Jul 18, 2017, 10:02
changed the description

In gitlab by @sylvaingaudan on Jul 18, 2017, 10:03
changed the description

In gitlab by @sfalquier on Jul 20, 2017, 09:17
removed milestone

In gitlab by @sylvaingaudan on Jul 20, 2017, 10:25
removed ~1918908 label

In gitlab by @sylvaingaudan on Jul 21, 2017, 12:13
changed milestone to %6

In gitlab by @sfalquier on Jul 28, 2017, 10:27
added ~2377174 label

In gitlab by @sylvaingaudan on Aug 4, 2017, 09:31
changed milestone to %10

In gitlab by @sylvaingaudan on Aug 4, 2017, 09:53
removed ~2424198 label

In gitlab by @sylvaingaudan on Aug 10, 2017, 08:29
changed milestone to %11

In gitlab by @sylvaingaudan on Sep 8, 2017, 16:01
changed milestone to %12

In gitlab by @sfalquier on Aug 25, 2017, 13:46
added ~2424198 label

In gitlab by @MohamedHamouGisaia on Sep 11, 2017, 08:48
added ~2424199 and removed ~2424198 labels

In gitlab by @MohamedHamouGisaia on Sep 11, 2017, 18:16
mentioned in merge request !93

In gitlab by @sylvaingaudan on Sep 11, 2017, 11:48
changed milestone to %13

In gitlab by @sfalquier on Sep 15, 2017, 10:59
removed ~2416396 label

In gitlab by @sfalquier on Sep 15, 2017, 10:59
changed milestone to %14

In gitlab by @sylvaingaudan on Sep 18, 2017, 13:25
closed via merge request !93

In gitlab by @sylvaingaudan on Sep 18, 2017, 14:42
mentioned in commit 283196abb226b96a13f0a284b078a3c7c722bdd5


Uncouple QueryBuilder

At present almost all functionality is done by the QueryBuilderHandler and WPDBAdapter.
More of the logic behind, where, sort, select should be abstracted into self contained handlers. This would allow for the statement composing to be handled cleaner.

[ ] Create JSON Handler
[ ] Where Condition Handler
[ ] Table Conditon Handler
[ ] Select Conditon Handler
[ ] Join Conditon Handler

Main goal is mostly to have no logic in the builder, just the methods and have additional services and containers/handlers just pass the data over the adaptor.
Currently data is passed as arrays around the builder, these are unpacked and compact'd when passed around.


Move setup_cache and reset_cache to the layer and attention module

Context
What is the purpose of this PR? Is it to

[x] add a new feature
[ ] fix a bug
[ ] update tests and/or documentation
[ ] other (please add here)

In order to support kv_cache for heterogenous layer types see here, we can't naively add kv_cache the same way inside of TransformerDecoder. This is currently done with
for layer in self.layers:
            layer.attn.kv_cache = KVCache(
                batch_size=batch_size,
                max_seq_len=self.max_seq_len,
                num_heads=self.num_heads,
                head_dim=self.head_dim,
                dtype=dtype,
            )

which both assumes that the kv_cache is the same for every layer and that every layer has the format layer.attn.kv_cache. Neither of these assumptions hold true for MM models. For CrossAttentionLayers, the max_seq_len=encoder_max_seq_len. Also, more generally, having kv_cache defined in the attention module and layer gives much more flexibility for future layers. This is a problem when fusing two layers together (regular and adapter layer) and you need custom logic on how kv_cache is applied to the fused layer.
Related to this, input_pos, is not the same for every layer type during inference as you're dealing with multiple sequences; decoder sequence and encoder sequence. Since the input_pos information is already contained within kv_cache, this PR also automatically computes input_pos if not provided.
Changelog
Add create_cache, cache_enabled, and reset_cache to TransformerDecoderLayer. Also add create_cache and enable_cache to attention module. The kv_cache creation logic is within the attention module and TransformerDecoderLayer simply passes it through. TransformerDecoder then calls each layers create_cache/reset_cache.
In TransformerDecoderLayer, if kv_cache is set and input_pos is not provided, input_pos is created given the cache size.
Test plan
Please make sure to do each of the following if applicable to your PR. (If you're not sure about any one of these just ask and we will happily help. We also have a contributing page for some guidance on contributing.)

[ ] run pre-commit hooks and linters (make sure you've first installed via pre-commit install)
[ ] add unit tests for any new functionality
[ ] update docstrings for any new or updated methods or classes
[ ] run unit tests via pytest tests
[ ] run recipe tests via pytest tests -m integration_test
[ ] manually run any new or modified recipes with sufficient proof of correctness
[ ] include relevant commands and any other artifacts in this summary (pastes of loss curves, eval results, etc.)

@pbontrager Does this need to land before #1283


Error running link command, OpenCV 3.0.0 with ICC (libopencv_hal.a)

I'm getting the following error while trying to cross-compile OpenCV for ICC, using these instructions: https://software.intel.com/en-us/comment/1850421#comment-1850421
[user@alfa00 opencv-3.0.0]$ make
Scanning dependencies of target opencv_hal
[  0%] Building CXX object modules/hal/CMakeFiles/opencv_hal.dir/src/filter.cpp.o
[  0%] Building CXX object modules/hal/CMakeFiles/opencv_hal.dir/src/stat.cpp.o
[  0%] Building CXX object modules/hal/CMakeFiles/opencv_hal.dir/src/resize.cpp.o
[  0%] Building CXX object modules/hal/CMakeFiles/opencv_hal.dir/src/warp.cpp.o
[  0%] Building CXX object modules/hal/CMakeFiles/opencv_hal.dir/src/matrix.cpp.o
[  0%] Building CXX object modules/hal/CMakeFiles/opencv_hal.dir/src/color.cpp.o
[  0%] Building CXX object modules/hal/CMakeFiles/opencv_hal.dir/src/mathfuncs.cpp.o
[  1%] Building CXX object modules/hal/CMakeFiles/opencv_hal.dir/src/arithm.cpp.o
Linking CXX static library ../../lib/libopencv_hal.a
Error running link command: No such file or directory
make[2]: *** [lib/libopencv_hal.a] Error 2
make[1]: *** [modules/hal/CMakeFiles/opencv_hal.dir/all] Error 2
make: *** [all] Error 2

Can anyone help me resolve this issue?
Environment
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                12
On-line CPU(s) list:   0-11
Thread(s) per core:    2
Core(s) per socket:    6
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 63
Model name:            Intel(R) Core(TM) i7-5930K CPU @ 3.50GHz
Stepping:              2
CPU MHz:               1200.253
BogoMIPS:              6996.42
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              15360K
NUMA node0 CPU(s):     0-11

LSB Version:	:core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID:	CentOS
Description:	CentOS Linux release 7.1.1503 (Core)
Release:	7.1.1503
Codename:	Core

cmake version 2.8.11

I have the same problem while compiling OpenCV for ICC, does anyone has any clue what might be the issue?

Add output of make VERBOSE=1

[mninicfe@alfa00 opencv-3.0.0]$ make VERBOSE=1
/usr/bin/cmake -H/home/mninicfe/OpenCV_intel/opencv-3.0.0 -B/home/mninicfe/OpenCV_intel/opencv-3.0.0 --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/mninicfe/OpenCV_intel/opencv-3.0.0/CMakeFiles /home/mninicfe/OpenCV_intel/opencv-3.0.0/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory /home/mninicfe/OpenCV_intel/opencv-3.0.0' make -f modules/hal/CMakeFiles/opencv_hal.dir/build.make modules/hal/CMakeFiles/opencv_hal.dir/depend make[2]: Entering directory /home/mninicfe/OpenCV_intel/opencv-3.0.0'
cd /home/mninicfe/OpenCV_intel/opencv-3.0.0 && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/mninicfe/OpenCV_intel/opencv-3.0.0 /home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/hal /home/mninicfe/OpenCV_intel/opencv-3.0.0 /home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/hal /home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/hal/CMakeFiles/opencv_hal.dir/DependInfo.cmake --color=
make[2]: Leaving directory /home/mninicfe/OpenCV_intel/opencv-3.0.0' make -f modules/hal/CMakeFiles/opencv_hal.dir/build.make modules/hal/CMakeFiles/opencv_hal.dir/build make[2]: Entering directory /home/mninicfe/OpenCV_intel/opencv-3.0.0'
Linking CXX static library ../../lib/libopencv_hal.a
cd /home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/hal && /usr/bin/cmake -P CMakeFiles/opencv_hal.dir/cmake_clean_target.cmake
cd /home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/hal && /usr/bin/cmake -E cmake_link_script CMakeFiles/opencv_hal.dir/link.txt --verbose=1
CMAKE_AR-NOTFOUND cr ../../lib/libopencv_hal.a  CMakeFiles/opencv_hal.dir/src/filter.cpp.o CMakeFiles/opencv_hal.dir/src/stat.cpp.o CMakeFiles/opencv_hal.dir/src/resize.cpp.o CMakeFiles/opencv_hal.dir/src/warp.cpp.o CMakeFiles/opencv_hal.dir/src/matrix.cpp.o CMakeFiles/opencv_hal.dir/src/color.cpp.o CMakeFiles/opencv_hal.dir/src/mathfuncs.cpp.o CMakeFiles/opencv_hal.dir/src/arithm.cpp.o
Error running link command: No such file or directory
make[2]: *** [lib/libopencv_hal.a] Error 2
make[2]: Leaving directory /home/mninicfe/OpenCV_intel/opencv-3.0.0' make[1]: *** [modules/hal/CMakeFiles/opencv_hal.dir/all] Error 2 make[1]: Leaving directory /home/mninicfe/OpenCV_intel/opencv-3.0.0'
make: *** [all] Error 2

CMAKE_AR-NOTFOUND

There is a problem with your build environment setup.
Did you try to build any other project with CMake and ICC (with static/shared libraries)?

I didn't try to build any other projects with CMake and ICC, can you recommend any test projects that I could try to build?
How should I set CMAKE_AR? I think I should maybe put a path to xiar but I can't find it.

Try something from here: http://public.kitware.com/cgi-bin/viewcvs.cgi/CMake/Tests/Tutorial/
Tutorial for this code: https://cmake.org/cmake-tutorial/
I believe "Step 2" is enough.
Also, try to use -DBUILD_SHARED_LIBS=OFF to build static (.a) libs instead of shared (.so) libs.

I used this line to cmake my project:
[mninicfe@alfa00 step2]$ cmake -DCMAKE_TOOLCHAIN_FILE=/home/mninicfe/OpenCV_intel/opencv-3.0.0/cmake_template.cmake -i
After that I got the similar error like before when trying to cmake OpenCV:
[mninicfe@alfa00 step2]$ make
Scanning dependencies of target MathFunctions
[ 50%] Building CXX object MathFunctions/CMakeFiles/MathFunctions.dir/mysqrt.cxx.o
Linking CXX static library libMathFunctions.a
Error running link command: No such file or directory
make[2]: *** [MathFunctions/libMathFunctions.a] Error 2
make[1]: *** [MathFunctions/CMakeFiles/MathFunctions.dir/all] Error 2
make: *** [all] Error 2

My toolchain file looks like this:
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_PROCESSOR k1om)
SET(CMAKE_SYSTEM_VERSION 1)

# specify the cross compiler
SET(CMAKE_C_COMPILER   icc)
SET(CMAKE_CXX_COMPILER icpc)
SET(MPI_C_COMPILER mpiicc)
SET(_CMAKE_TOOLCHAIN_PREFIX  x86_64-k1om-linux-)

# where is the target environment
SET(CMAKE_FIND_ROOT_PATH /opt/mpss/3.5.1)

I also tried this command -DBUILD_SHARED_LIBS=OFF that you recommended and it didn't make any difference.

Look like you still need a valid toolchain (cmake toolchain file like you have and binaries which should include ar or similar utility).
Also you may start to compile OpenCV without cross-compilation, but with Intel compiler by specifying "-DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc"

This toolchain that I am using I got for intels page (https://software.intel.com/en-us/articles/cross-compilation-for-intel-xeon-phi-coprocessor-with-cmake) and if that one is not a valid one where should I get proper one. I tried to complie with "-DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc" but I am getting following error:
[mninicfe@alfa00 opencv-3.0.0]$ cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc

...

CMake Warning at CMakeLists.txt:1178 (message):
  The source directory is the same as binary directory.  "make clean" may
  damage the source tree

-- Configuring done
-- Generating done
-- Build files have been written to: /home/mninicfe/OpenCV_intel/opencv-3.0.0¸

[  0%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o

(592): error: identifier "_InterlockedExchangeAdd" is undefined

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/include/opencv2/core/cvstd.hpp(604): error: identifier "_InterlockedExchangeAdd" is undefined

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/include/opencv2/core/cvstd.hpp(669): error: identifier "_InterlockedExchangeAdd" is undefined

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/include/opencv2/core/ptr.inl.hpp(67): error: identifier "_InterlockedExchangeAdd" is undefined

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/include/opencv2/core/ptr.inl.hpp(72): error: identifier "_InterlockedExchangeAdd" is undefined

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/include/opencv2/core/mat.inl.hpp(381): error: identifier "_InterlockedExchangeAdd" is undefined

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/include/opencv2/core/mat.inl.hpp(565): error: identifier "_InterlockedExchangeAdd" is undefined

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/include/opencv2/core/mat.inl.hpp(661): error: identifier "_InterlockedExchangeAdd" is undefined

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/include/opencv2/core/mat.inl.hpp(666): error: identifier "_InterlockedExchangeAdd" is undefined

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/include/opencv2/core/mat.inl.hpp(1668): error: identifier "_InterlockedExchangeAdd" is undefined

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/include/opencv2/core/mat.inl.hpp(1703): error: identifier "_InterlockedExchangeAdd" is undefined

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/include/opencv2/core/mat.inl.hpp(1709): error: identifier "_InterlockedExchangeAdd" is undefined

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/include/opencv2/core/mat.inl.hpp(3304): error: identifier "_InterlockedExchangeAdd" is undefined

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/include/opencv2/core/mat.inl.hpp(3309): error: identifier "_InterlockedExchangeAdd" is undefined

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/include/opencv2/core/cuda.inl.hpp(105): error: identifier "_InterlockedExchangeAdd" is undefined

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/include/opencv2/core/cuda.inl.hpp(395): error: identifier "_InterlockedExchangeAdd" is undefined

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/src/cuda/gpu_mat.cu(160): error: identifier "_InterlockedExchangeAdd" is undefined

17 errors detected in the compilation of "/tmp/mninicfe/tmpxft_00004faf_00000000-13_gpu_mat.compute_35.cpp1.ii".
-- Removing /home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
/usr/bin/cmake -E remove /home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:264 (message):
  Error generating file
  /home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o

make[2]: *** [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o] Error 1
make[2]: Leaving directory `/home/mninicfe/OpenCV_intel/opencv-3.0.0'
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make[1]: Leaving directory `/home/mninicfe/OpenCV_intel/opencv-3.0.0'
make: *** [all] Error 2

Every time then you change CMake parameters significantly cleanup you "build" folder.
Use out of source build (make separate "build" directory). You receive warning about this from CMake.
Cuda must be disabled "cmake -DWITH_CUDA=OFF ..."

First of all I would like to thank you for responding so promptly and trying to help me every time I post something here.
I listened to all your advices and tried to build it in separate directory (out of source build) and I set WITH_CUDA to OFF but I still can't manage to make it work and I'm getting the following error now:
[mninicfe@alfa00 IntelBuild]$ make
[  1%] Built target opencv_hal
[  9%] Built target opencv_core
[ 18%] Built target opencv_imgproc
[ 21%] Built target opencv_imgcodecs
[ 22%] Built target opencv_videoio
[ 22%] Built target opencv_highgui
[ 25%] Built target opencv_ts
Linking CXX executable ../../bin/opencv_perf_core
../../lib/libopencv_core.so.3.0.0: undefined reference to `parallel_pthreads_set_threads_num(int)'
../../lib/libopencv_core.so.3.0.0: undefined reference to `parallel_pthreads_get_threads_num()'
../../lib/libopencv_core.so.3.0.0: undefined reference to `parallel_for_pthreads(cv::Range const&, cv::ParallelLoopBody const&, double)'
make[2]: *** [bin/opencv_perf_core] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2
make: *** [all] Error 2

When I encountered this error I searched a bit online and found that people resolved the problem by adding -DWITH_IPP=OFF or adding gstreamer package (ippicv) to the OpenCV folder, but neither helped. I followed the instructions posted here: http://stackoverflow.com/questions/25726768/opencv-3-0-trouble-with-installation

This error is very strange. Try to disable pthreads support: -DWITH_PTHREADS_PF=OFF to workaround it.

I manually downloaded ippicv and added it to a folder:
[mninicfe@alfa00 linux-8b449a536a2157bcad08a2b9f266828b]$ ls
ippicv_linux_20141027.tgz  ippicv_lnx

but it still doesn't find gstream:
 -- Looking for /usr/include/libpng/png.h
-- Looking for /usr/include/libpng/png.h - not found
-- Found OpenEXR: /lib64/libIlmImf.so
-- checking for module 'gtk+-3.0'
--   package 'gtk+-3.0' not found
-- checking for module 'gtk+-2.0'
--   found gtk+-2.0, version 2.24.22
-- checking for module 'gthread-2.0'
--   found gthread-2.0, version 2.40.0
-- checking for module 'gstreamer-base-1.0'
--   package 'gstreamer-base-1.0' not found
-- checking for module 'gstreamer-video-1.0'
--   package 'gstreamer-video-1.0' not found
-- checking for module 'gstreamer-app-1.0'
--   package 'gstreamer-app-1.0' not found
-- checking for module 'gstreamer-riff-1.0'
--   package 'gstreamer-riff-1.0' not found
-- checking for module 'gstreamer-pbutils-1.0'
--   package 'gstreamer-pbutils-1.0' not found
-- checking for module 'gstreamer-base-0.10'
--   found gstreamer-base-0.10, version 0.10.36

I also tried set PTHREADS_PF to OFF but I get the same error.

but it still doesn't find gstream

How does problem of missing gstreamer (optional video encoder/decoder/camera backend) related to the topic of this issue?
IPPICV (optional optimization backend) and gstreamer are totally different things. Also we don't check IPPICV on Xeon Phi, so just disable it and at first make sure that all works fine without it.
So plan is to move step by step:

Build OpenCV with default compiler (use well tested GCC). Problems on this step is out of scope of this issue.
Get working settings from (1) and try to build with the same parameters but with Intel compiler (separate build folder). Detect changes/problems and try to resolve them.
Same as above, but try cross-compilation for Xeon Phi target.

Also this is always actual:

Every time when you change CMake parameters significantly, cleanup you "build" folder.

I already built OpenCV with default compiler (GCC), sorry that I forgot to mention it, now I tried it again and it works fine but when I try to build it with ICC I get this error as I mentioned above:
[mninicfe@alfa00 IntelBuild]$ make
[  1%] Built target opencv_hal
[  9%] Built target opencv_core
[ 18%] Built target opencv_imgproc
[ 21%] Built target opencv_imgcodecs
[ 22%] Built target opencv_videoio
[ 22%] Built target opencv_highgui
[ 25%] Built target opencv_ts
Linking CXX executable ../../bin/opencv_perf_core
../../lib/libopencv_core.so.3.0.0: undefined reference to `parallel_pthreads_set_threads_num(int)'
../../lib/libopencv_core.so.3.0.0: undefined reference to `parallel_pthreads_get_threads_num()'
../../lib/libopencv_core.so.3.0.0: undefined reference to `parallel_for_pthreads(cv::Range const&, cv::ParallelLoopBody const&, double)'
make[2]: *** [bin/opencv_perf_core] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2
make: *** [all] Error 2

nm ./lib/libopencv_core.so | grep parallel_pthreads_set_threads_num
objdump -tT ./lib/libopencv_core.so | grep parallel_pthreads_set_threads_num
nm ./modules/core/CMakeFiles/opencv_core.dir/src/parallel.cpp.o
nm ./modules/core/CMakeFiles/opencv_core.dir/src/parallel_pthreads.cpp.o

touch <opencv_path>/modules/core/src/parallel.cpp
touch <opencv_path>/modules/core/src/parallel_pthreads.cpp
make VERBOSE=1 opencv_perf_core
or workaround this problem this by cmake -DWITH_PTHREADS_PF=OFF ... and move forward.

I already tried to workaround the problem with cmake -DWITH_PTHREADS_PF=OFF as you said but it didn't help, same error appeared. I also now tried this steps that you wrote last and it gets me this:

This didn't work in the ICC build because there is no libopencv_core.so yet. Did you want me to run it in the GCC build?

I ran the following commands

touch <opencv_path>/modules/core/src/parallel.cpp
touch <opencv_path>/modules/core/src/parallel_pthreads.cpp
cmake .. -DWITH_CUDA=OFF -DWITH_IPP=OFF -DCMAKE_C_COMPILER=icc -CMAKE_CXX_COMPILER=icpc -DWITH_PTHREADS_PF=OFF

make VERBOSE=1 opencv_perf_core

And got the same error once again, but now on 100%:
Linking CXX executable ../../bin/opencv_perf_core
cd /home/mninicfe/OpenCV_intel/opencv-3.0.0/IntelBuild/modules/core && /usr/bin/cmake -E cmake_link_script CMakeFiles/opencv_perf_core.dir/link.txt --verbose=1
/opt/intel/composer_xe_2015.3.187/bin/intel64/icpc      -fsigned-char -O3 -DNDEBUG        CMakeFiles/opencv_perf_core.dir/perf/perf_compare.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_dot.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_math.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_main.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_dft.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_stat.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_addWeighted.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_convertTo.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_abs.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_cvround.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_merge.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_arithm.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_norm.cpp.o CMakeFiles/opencv_perf_core.dir/perf/opencl/perf_dxt.cpp.o CMakeFiles/opencv_perf_core.dir/perf/opencl/perf_channels.cpp.o CMakeFiles/opencv_perf_core.dir/perf/opencl/perf_arithm.cpp.o CMakeFiles/opencv_perf_core.dir/perf/opencl/perf_usage_flags.cpp.o CMakeFiles/opencv_perf_core.dir/perf/opencl/perf_gemm.cpp.o CMakeFiles/opencv_perf_core.dir/perf/opencl/perf_bufferpool.cpp.o CMakeFiles/opencv_perf_core.dir/perf/opencl/perf_matop.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_mat.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_split.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_minmaxloc.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_reduce.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_sort.cpp.o CMakeFiles/opencv_perf_core.dir/perf/cuda/perf_gpumat.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_inRange.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_bitwise.cpp.o  -o ../../bin/opencv_perf_core -rdynamic ../../lib/libopencv_ts.a ../../lib/libopencv_core.so.3.0.0 ../../lib/libopencv_imgcodecs.so.3.0.0 ../../lib/libopencv_hal.a ../../lib/libopencv_hal.a ../../lib/libopencv_core.so.3.0.0 ../../lib/libopencv_imgproc.so.3.0.0 ../../lib/libopencv_imgcodecs.so.3.0.0 ../../lib/libopencv_videoio.so.3.0.0 ../../lib/libopencv_highgui.so.3.0.0 ../../lib/libopencv_hal.a -ldl -lm -lpthread -lrt ../../lib/libopencv_videoio.so.3.0.0 ../../lib/libopencv_imgcodecs.so.3.0.0 ../../lib/libopencv_imgproc.so.3.0.0 ../../lib/libopencv_core.so.3.0.0 ../../lib/libopencv_hal.a -ldl -lm -lpthread -lrt -Wl,-rpath,/home/mninicfe/OpenCV_intel/opencv-3.0.0/IntelBuild/lib
../../lib/libopencv_core.so.3.0.0: undefined reference to `parallel_pthreads_set_threads_num(int)'
../../lib/libopencv_core.so.3.0.0: undefined reference to `parallel_pthreads_get_threads_num()'
../../lib/libopencv_core.so.3.0.0: undefined reference to `parallel_for_pthreads(cv::Range const&, cv::ParallelLoopBody const&, double)'
make[3]: *** [bin/opencv_perf_core] Error 1
make[3]: Leaving directory `/home/mninicfe/OpenCV_intel/opencv-3.0.0/IntelBuild'
make[2]: *** [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2
make[2]: Leaving directory `/home/mninicfe/OpenCV_intel/opencv-3.0.0/IntelBuild'
make[1]: *** [modules/core/CMakeFiles/opencv_perf_core.dir/rule] Error 2
make[1]: Leaving directory `/home/mninicfe/OpenCV_intel/opencv-3.0.0/IntelBuild'

Really? What is about this path: "./lib/libopencv_core.so.3.0.0"?
Is make opencv_core work?

Please add more lines from this log with command lines about compilation of these 2 .cpp files and linker command line for libopencv_core target.

Hi alalek, I see you closed this topic, probably because of no response for some time and I want to apologize for that, reason is that I was away and wasn't dealing with this for 10 days. I can do this things from your previous post as soon as tomorrow if you are still willing to help.

I also ran make opencv_core and it worked fine:
[ 16%] Built target opencv_hal
Scanning dependencies of target opencv_core
[ 16%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/parallel.cpp.o
Linking CXX shared library ../../lib/libopencv_core.so
[100%] Built target opencv_core

After that I tried to run "make VERBOSE=1" but it didn't gave any additional information about .cpp files and  I again got this result:
[mninicfe@alfa00 IntelBuild]$ make
[  1%] Built target opencv_hal
[  9%] Built target opencv_core
[ 18%] Built target opencv_imgproc
[ 21%] Built target opencv_imgcodecs
[ 22%] Built target opencv_videoio
[ 22%] Built target opencv_highgui
[ 25%] Built target opencv_ts
Linking CXX executable ../../bin/opencv_perf_core
../../lib/libopencv_core.so.3.0.0: undefined reference to `parallel_pthreads_set_threads_num(int)'
../../lib/libopencv_core.so.3.0.0: undefined reference to `parallel_pthreads_get_threads_num()'
../../lib/libopencv_core.so.3.0.0: undefined reference to `parallel_for_pthreads(cv::Range const&, cv::ParallelLoopBody const&, double)'
make[2]: *** [bin/opencv_perf_core] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2
make: *** [all] Error 2

Please run these 3 commands without make opencv_core and provide output (there will command lines of .cpp files compilation):
touch <opencv_path>/modules/core/src/parallel.cpp
touch <opencv_path>/modules/core/src/parallel_pthreads.cpp
make VERBOSE=1 opencv_perf_core

These lines are very strange:
                 U _Z21parallel_for_pthreadsRKN2cv5RangeERKNS_16ParallelLoopBodyEd
                 U _Z33parallel_pthreads_get_threads_numv
                 U _Z33parallel_pthreads_set_threads_numi
...
00000000000007a0 T _ZN2cv21parallel_for_pthreadsERKNS_5RangeERKNS_16ParallelLoopBodyEd
00000000000000e0 r _ZN2cv21parallel_for_pthreadsERKNS_5RangeERKNS_16ParallelLoopBodyEd$$LSDA
0000000000000350 T _ZN2cv33parallel_pthreads_get_threads_numEv
000000000000006c r _ZN2cv33parallel_pthreads_get_threads_numEv$$LSDA
00000000000003f0 T _ZN2cv33parallel_pthreads_set_threads_numEi
0000000000000084 r _ZN2cv33parallel_pthreads_set_threads_numEi$$LSDA

Need to investigate why cv:: namespace was lost.

Could you try to add this line "using namespace cv;" into parallel.cpp after this block:
namespace cv
{
    ParallelLoopBody::~ParallelLoopBody() {}
#ifdef HAVE_PTHREADS_PF
    void parallel_for_pthreads(const cv::Range& range, const cv::ParallelLoopBody& body, double nstripes);
    size_t parallel_pthreads_get_threads_num();
    void parallel_pthreads_set_threads_num(int num);
#endif
}

using namespace cv; // add this line

BTW, We released OpenCV 3.1.0 and libopencv_hal.a has been gone.

After running those three commands I got following result at the end:
Building CXX object modules/core/CMakeFiles/opencv_perf_core.dir/perf/perf_bitwise.cpp.o
cd /home/mninicfe/OpenCV_intel/opencv-3.0.0/IntelBuild/modules/core && /opt/intel/composer_xe_2015.3.187/bin/intel64/icpc   -D__OPENCV_BUILD=1 -fsigned-char -O3 -DNDEBUG  -I/home/mninicfe/OpenCV_intel/opencv-3.0.0/3rdparty/include/opencl/1.2 -I/home/mninicfe/OpenCV_intel/opencv-3.0.0/IntelBuild -I/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/ts/include -I/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/include -I/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/imgcodecs/include -I/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/hal/include -I/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/imgproc/include -I/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/videoio/include -I/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/highgui/include -I/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/perf    -o CMakeFiles/opencv_perf_core.dir/perf/perf_bitwise.cpp.o -c /home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/perf/perf_bitwise.cpp
Linking CXX executable ../../bin/opencv_perf_core
cd /home/mninicfe/OpenCV_intel/opencv-3.0.0/IntelBuild/modules/core && /usr/bin/cmake -E cmake_link_script CMakeFiles/opencv_perf_core.dir/link.txt --verbose=1
/opt/intel/composer_xe_2015.3.187/bin/intel64/icpc      -fsigned-char -O3 -DNDEBUG        CMakeFiles/opencv_perf_core.dir/perf/perf_compare.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_dot.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_math.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_main.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_dft.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_stat.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_addWeighted.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_convertTo.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_abs.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_cvround.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_merge.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_arithm.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_norm.cpp.o CMakeFiles/opencv_perf_core.dir/perf/opencl/perf_dxt.cpp.o CMakeFiles/opencv_perf_core.dir/perf/opencl/perf_channels.cpp.o CMakeFiles/opencv_perf_core.dir/perf/opencl/perf_arithm.cpp.o CMakeFiles/opencv_perf_core.dir/perf/opencl/perf_usage_flags.cpp.o CMakeFiles/opencv_perf_core.dir/perf/opencl/perf_gemm.cpp.o CMakeFiles/opencv_perf_core.dir/perf/opencl/perf_bufferpool.cpp.o CMakeFiles/opencv_perf_core.dir/perf/opencl/perf_matop.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_mat.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_split.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_minmaxloc.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_reduce.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_sort.cpp.o CMakeFiles/opencv_perf_core.dir/perf/cuda/perf_gpumat.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_inRange.cpp.o CMakeFiles/opencv_perf_core.dir/perf/perf_bitwise.cpp.o  -o ../../bin/opencv_perf_core -rdynamic ../../lib/libopencv_ts.a ../../lib/libopencv_core.so.3.0.0 ../../lib/libopencv_imgcodecs.so.3.0.0 ../../lib/libopencv_hal.a ../../lib/libopencv_hal.a ../../lib/libopencv_core.so.3.0.0 ../../lib/libopencv_imgproc.so.3.0.0 ../../lib/libopencv_imgcodecs.so.3.0.0 ../../lib/libopencv_videoio.so.3.0.0 ../../lib/libopencv_highgui.so.3.0.0 ../../lib/libopencv_hal.a -ldl -lm -lpthread -lrt ../../lib/libopencv_videoio.so.3.0.0 ../../lib/libopencv_imgcodecs.so.3.0.0 ../../lib/libopencv_imgproc.so.3.0.0 ../../lib/libopencv_core.so.3.0.0 ../../lib/libopencv_hal.a -ldl -lm -lpthread -lrt -Wl,-rpath,/home/mninicfe/OpenCV_intel/opencv-3.0.0/IntelBuild/lib
../../lib/libopencv_core.so.3.0.0: undefined reference to `parallel_pthreads_set_threads_num(int)'
../../lib/libopencv_core.so.3.0.0: undefined reference to `parallel_pthreads_get_threads_num()'
../../lib/libopencv_core.so.3.0.0: undefined reference to `parallel_for_pthreads(cv::Range const&, cv::ParallelLoopBody const&, double)'
make[3]: *** [bin/opencv_perf_core] Error 1
make[3]: Leaving directory `/home/mninicfe/OpenCV_intel/opencv-3.0.0/IntelBuild'
make[2]: *** [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2
make[2]: Leaving directory `/home/mninicfe/OpenCV_intel/opencv-3.0.0/IntelBuild'
make[1]: *** [modules/core/CMakeFiles/opencv_perf_core.dir/rule] Error 2
make[1]: Leaving directory `/home/mninicfe/OpenCV_intel/opencv-3.0.0/IntelBuild'
make: *** [opencv_perf_core] Error 2

Regarding parallel.cpp file, in my case it looks like this:
namespace cv
{
    ParallelLoopBody::~ParallelLoopBody() {}
}

I don't have that additional lines and when I tried to change anything and then run it I got this error:
CMake Error at cmake/OpenCVUtils.cmake:764 (add_library):
  Cannot find source file:

    /home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/src/.#parallel.cpp

Regarding parallel.cpp file, in my case it looks like this

You always should use the latest code during any problem reporting to prevent wasting time. There is this fix for this problem.

/home/mninicfe/OpenCV_intel/opencv-3.0.0/modules/core/src/.#parallel.cpp

It is a problem of used editor, which creates invalid backup files.

Hi alalek, I finally managed to successfully build OpenCV, this fix from your previous post helped.
Now I am trying to run a test program in Eclipse, I already ran the same program with GCC and it worked fine but now when I am building it with ICC and ICC built OpenCV libraries I get the following error:
**** Incremental Build of configuration Debug for project DisplayImage_Intel ****
make all
Building target: libDisplayImage_Intel.so
Invoking: Intel C++ Linker
icpc -L/home/mninicfe/OpenCV_intel/opencv-3.0.0/IntelBuild/install/lib/ -shared -o "libDisplayImage_Intel.so"  ./src/DisplayImage_Intel.o   -lopencv_core -lopencv_imgcodecs -lopencv_imgproc -lopencv_highgui
ld: ./src/DisplayImage_Intel.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
./src/DisplayImage_Intel.o: could not read symbols: Bad value
make: *** [libDisplayImage_Intel.so] Error 1

My program code looks like this:
//#include <cv.h>
//#include <highgui.h>

#include <opencv2/opencv.hpp>
#include <stdio.h>

using namespace cv;

int main( int argc, char** argv )
{
  Mat image;
  image = imread( argv[1], 1 );

  if( argc != 2 || !image.data )
    {
      printf( "No image data \n" );
      return -1;
    }

  namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
  imshow( "Display Image", image );

  waitKey(0);

  return 0;
}

I tried to solve this problem by adding these flags and building OpenCV from the beginning but it didn't help:
CXXFLAGS = "$CXXFLAGS -fPIC"
CFLAGS = "$CFLAGS -fPIC"

Do you have any idea what might be the problem because I can't find anything similar on Google?


CIF-915 - Create JS unit tests for Navigation component

added unit test for navigation component
improved clicking experience on down navigation arrow

Related Issue
CIF-915
How Has This Been Tested?
Manually, with unit tests.
Types of changes

[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] I have signed the Adobe Open Source CLA.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[X] I have read the CONTRIBUTING document.
[X] I have added tests to cover my changes and the overall coverage did not decrease.
[X] All unit tests pass on CircleCi.
[X] I ran all tests locally and they pass.

Codecov Report

Merging #157 into master will increase coverage by 0.73%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##             master    #157      +/-   ##
===========================================
+ Coverage     83.47%   84.2%   +0.73%
  Complexity      395     395
===========================================
  Files            50      51       +1
  Lines          1452    1526      +74
  Branches        118     118
===========================================
+ Hits           1212    1285      +73
- Misses          161     162       +1
  Partials         79      79

Flag
Coverage Δ
Complexity Δ

#jest
94.69% <100%> (?)
0 <0> (?)

#karma
94.69% <100%> (+1.03%)
0 <0> (ø)
:arrow_down:

#unittests
80.99% <ø> (ø)
395 <ø> (ø)
:arrow_down:

Impacted Files
Coverage Δ
Complexity Δ

...vigation/v1/navigation/clientlibs/js/navigation.js
98.64% <100%> (ø)
0 <0> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6ca98e1...a74f508. Read the comment docs.

Ping.


Modify get_info.py

Modify the script to add other info in the .json file:

tr
ch_name
Those variables will be available to use in the convert.py script instead of using hard coded values. The ch_name is a list containing the channels name that are found directly in the acq file. The tr is either specified if we don't have access to the fmri data info, or found in the *bold.json file

We might want to modify the get_acq_channels function to make it more generalizable...

In convert.py , thr and pad are still hard coded. Is it worth to be able to specify those values, or are they pretty standard and we could leave them like that ?
I'm still working on the CLI.py script. convert.py won't work as it is without some changes in CLI.py

These changes are looking great. I will go through them again and make a list of the ones that are still pending so that we can check them as we go.

The most recent changes are still a bit messy. I want to figure out a way to make the pipeline a bit cleaner !


Issue for plotting a graph as a python module

Hi,
Could you please help? I am unable to plot a graph as a Python module.
I am constantly getting this issue with dg.DotGraph() function:
File "git_graph/git_functions.py", line 9, in execute_git_command
if not (path / '.git').is_dir():
TypeError: unsupported operand type(s) for /: 'str' and 'str'
To reproduce the issue. You can create a quick git repository and then use your package as a python module as mentioned in the documentation
Thanks for your help!

Hi.
Sorry the documentation to run git-graph as a python module is outdated. The parameter of dg.DotGraph() should definitely be a pathlib.Path and not a string.
You can check existing calls to dg.DotGraph() in cli.py and test_dot_graph.py. You will see that both pass a pathlib.Path as parameter.

Hi,
No problem. Thanks for your answer. I made a pull request to fix this issue.

Hi,
Sorry just re-read your post. This makes sense. Ok so the documentation only requires a fix. Thanks!

Exactly. I'll try to do that as soon as I get a little time.
Thank you for your contribution.


If logged in through multiple devices, a logout results should result in a 401 on other devices.

Description
Fixes #3256
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

[x] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & integration tests). Exceptions may be made if previously agreed upon.
[x] My PR passes Checkstyle validation based on the Code Style Guide.
[x] My PR includes Javadoc for all new (or modified) public methods and classes. It also includes Javadoc for large or complex private methods.
[x] My PR passes all tests and includes new/updated Unit or Integration Tests based on the Code Testing Guide.
[x] If my PR includes new, third-party dependencies (in any pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
[x] If my PR modifies the REST API, I've linked to the REST Contract page (or open PR) related to this change.

@Micheleboychuk : Thanks for the quick updates! Merging as this looks good now


FIX: Better implementation of py36 testing

@Squadrick @tensorflow/sig-addons-maintainers  this should work better. Apologies.
Installing py36 is only safe to do knowing the user is running in a docker container.

We can get this merged as soon as the test suite passes.