title,body,link,tags,view_count,is_answered,score,answer_count
Spring Batch Job Regression Testing,"<p>I am new to Spring batch job and test automation. We have implemented spring batch job in our project. Consider there are two applications - Spring batch application and Test automation application.</p>
<p>The Spring batch application, reads a file, do some validations and update values into DB.</p>
<p>Our test application is build with Java,Maven,Cucumber and TestNG. Cucumber is integrated with TestNG framework.</p>
<p>The flow is Cucumber features-&gt;StepDefinition-&gt;Page Object(Java class)-&gt;Access DB.
We have created test scenarios to test the spring batch job. The input file is different for each test scenario.
Test cases are developed to run in local environment.</p>
<p>Currently we execute test cases as follows:</p>
<ul>
<li>First execute Spring Batch application with a input file-the values are updated in DB</li>
<li>Then execute test scenario in test application with same input file, which compares the value in input file with value in DB.(Spring Batch job and test cases are configured to access the same DB). This will validate if the data in input file is updated in DB.</li>
<li>This is repeated for all test cases with different input file each time.</li>
</ul>
<p>Each time the spring batch job is executed manually.</p>
<p>I did some research on spring batch testing and I found almost all the approaches are either based on Unit test or End-to-End test within the same spring batch application, which launches batch job for testing with JobLauncherTestUtils.</p>
<p>Is there a way to execute a spring batch job from another application(here the test application)to test its functionality?</p>
<p>What will be the best approach?</p>
<p>Please provide your inputs.</p>
",https://stackoverflow.com/questions/64921078/spring-batch-job-regression-testing,"['java', 'spring-boot', 'automation', 'automated-tests', 'spring-batch']",463,False,1,0
React visual regression testing options,"<p>What do you use to test visual regression in React? I would like to have some setup which would work in the similar manner as snapshots testing where you could pass component, create reference image and make further comparison based on that reference.</p>
",https://stackoverflow.com/questions/60216726/react-visual-regression-testing-options,"['reactjs', 'testing']",75,False,0,0
What is regression testing and its automation in web-development?,"<p>Let's suppose we're talking about a microservices-based web-application developed by Scrum teams.</p>
<p>What is regression testing in web-development? How does it relate to manual testing? Does it test usability, UI, localization or what? Which automation frameworks are used? How much time does it take? Why is it particulary important to automate regression testing?</p>
",https://stackoverflow.com/questions/65378891/what-is-regression-testing-and-its-automation-in-web-development,"['web-services', 'automation', 'automated-tests']",42,False,1,0
Linear regression - testing for multicolinearity in the presence of heteroskedasticty in Eviews,"<p>My question concerns use of VIF test for multicolinearity diagnostics when the model suffers from heteroskedasticity.</p>

<p>I want to use HAC correction to account for heteroskedasticity in my model. However VIF gives my starkly different results depending if I run it after estimating the model with simple OLS without error correction, compared to when I start with regression with HAC applied and then run VIF. I use Eviews. </p>

<p>For me it was surprising as the test statistic in VIF is just an 1/(1-R^2) where R^2 is calculated for a model in which given x_i variable is regressed against the rest of X variables. This implies that the result should not depend on standard errors of the estimated parameters in our original y against X regression, and thus should not depend on whether I use robust errors or not. </p>

<p>However, in Eviews VIF is calculted differently and estimates of standard errors for parameters are used (<a href=""https://www3.nd.edu/~nmark/FinancialEconometrics/EViews10_Manuals/EViews%2010%20Users%20Guide%20II.pdf"" rel=""nofollow noreferrer"">tutorial</a>, pp. 198 of the pdf). While it is suggested that both approaches are equivalent, clearly is not the case in my example.</p>

<p>In short, in which order should I proceed - first test for multicolinearity with simple OLS model and then move on to model with HAC, or the other way - estimate the model with HAC and then run VIF?
Thanks for all your help!</p>
",https://stackoverflow.com/questions/60604100/linear-regression-testing-for-multicolinearity-in-the-presence-of-heteroskedas,['eviews'],65,False,1,0
Does anyone has &quot;Best Practice&quot; to share for Unit/Integration/Regression testing with Snowflake?,"<p>We are embarking in a project using both Matillion and Snowflake and want to put in place some Unit/Integration/Regression testing.</p>

<p>Automated would be brilliant but manual would be good too.</p>

<p>We could invent something (simple) ourselves... but it would be better to benefit from other people experience.</p>
",https://stackoverflow.com/questions/60153870/does-anyone-has-best-practice-to-share-for-unit-integration-regression-testing,"['snowflake-cloud-data-platform', 'matillion']",1564,True,4,2
What is regression testing and its automation in web-development?,"<p>Let's suppose we're talking about a microservices-based web-application developed by Scrum teams.</p>
<p>What is regression testing in web-development? How does it relate to manual testing? Does it test usability, UI, localization or what? Which automation frameworks are used? How much time does it take? Why is it particulary important to automate regression testing?</p>
",https://stackoverflow.com/questions/65378891/what-is-regression-testing-and-its-automation-in-web-development,"['web-services', 'automation', 'automated-tests']",42,False,1,0
Does anyone has &quot;Best Practice&quot; to share for Unit/Integration/Regression testing with Snowflake?,"<p>We are embarking in a project using both Matillion and Snowflake and want to put in place some Unit/Integration/Regression testing.</p>

<p>Automated would be brilliant but manual would be good too.</p>

<p>We could invent something (simple) ourselves... but it would be better to benefit from other people experience.</p>
",https://stackoverflow.com/questions/60153870/does-anyone-has-best-practice-to-share-for-unit-integration-regression-testing,"['snowflake-cloud-data-platform', 'matillion']",1564,True,4,2
Simulate shell input for regression test,"<p>I'm trying to setup regression testing for an app before refactoring. The function is one long mess, starting with parsing user input and performing numerous operations before giving an output. I want to test expected values given a set of inputs (including defaults), but am not sure how to simulate a user's shell input inside a test module. Here's an example of how input is taken at the start of the file:</p>
<pre><code>def function():
    parser = ArgumentParser()
    parser.add_argument(&quot;-a&quot;, &quot;--term-a&quot;, type=float, default=0.5, help=&quot;a term relevant to output&quot;)
    parser.add_argument(&quot;-b&quot;, &quot;--term-b&quot;, type=float, default=0.05, help=&quot;a term relevant to output&quot;)
    parser.add_argument(&quot;-c&quot;, &quot;--term-c&quot;, type=int, default=2, help=&quot;a term relevant to output&quot;)
    parser.add_argument(&quot;-f&quot;, &quot;--file-a&quot;, type=str, required=True,
                     help=&quot;Input file required for output&quot;)
    args = parser.parse_args()

    ...
</code></pre>
",https://stackoverflow.com/questions/64545996/simulate-shell-input-for-regression-test,"['python', 'pytest']",66,True,0,1
DotNetBrowser Rpc Call Timed Out,"<p>We recently upgraded from the 1.x version of the DotNetBrowser control to 2.1 and during regression testing, we ran into a new exception in our Citrix environment and we are unable to display the browser. We are using a BrowserView and have set the RenderingMode to Offscreen as well as set the UserDataDirectory when creating the engine in an attempt to eliminate potential Citrix specific issues.</p>
<p>Are there any special considerations we should make in a Citrix environment? Just looking for a little nudge in the right direction.</p>
<p>Thanks!</p>
<pre><code>    [] has encountered an unexpected error.
You can continue but it is suggested that you do not save over your
 originally loaded projects to prevent data loss.
Details:
    RPC call timed out.

Stack Trace:
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at DotNetBrowser.Util.TaskExtensions.WaitResult[T](Task`1 task)
   at DotNetBrowser.Engine.EngineRpcService..ctor(IConnection connection, IEngineFactoryCommands factoryCommands, IEngineCommands commands, IRpcCallbacksStub`2 callbacks, ProprietaryFeatures proprietaryFeatures, RenderingMode renderingMode)
   at DotNetBrowser.Engine.EngineRpcService..ctor(EngineFactoryRpcService factoryCommands, ProprietaryFeatures proprietaryFeatures, RenderingMode renderingMode)
   at [].BrowserEngineBuilder.BuildEngine(String licenseKey) in ...
   at [].IntegralOrchestrator.get_BrowserEngine() in ...
   at [].UI.BrowserWindow.InitializeChromiumPlugin() in ...
   at [].UI.BrowserWindow..ctor() in ...
   at [].IntegralOrchestrator.ShowBrowser() in ...
   at [].Services.DockPanelPresentation.UI.MenuItem.MenuButtonClick(Object sender, EventArgs e) in ...
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message&amp; m)
   at System.Windows.Forms.ToolStrip.WndProc(Message&amp; m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message&amp; m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)```
</code></pre>
",https://stackoverflow.com/questions/64026203/dotnetbrowser-rpc-call-timed-out,"['c#', 'dotnetbrowser']",360,True,2,1
ADO.NET: How to bulk copy rows in a DataTable into another,"<p>A legacy application is copying 100K records in one <code>DataTable</code> into another like so:</p>

<pre><code>For index = 0 To dataTable.Rows.Count() - 1
    Dim column1 = CType(dataTable.Rows(index).Item(""column1""), Integer)
    Dim column2 = CType(dataTable.Rows(index).Item(""column2""), Integer)
    Dim column3 = CType(dataTable.Rows(index).Item(""column3""), Integer)

    Dim dataRow = ds.Tables(""MyTable"").NewRow

    dataRow(""column1"") = column1
    dataRow(""column2"") = column2
    dataRow(""column3"") = column3

    ds.Tables(""MyTable"").Rows.Add(dataRow)
Next
</code></pre>

<p>This seems to be very slow as we need to iterate 100K times and add a new row. Are there any .NET APIs to bulk copy rows to decrease the time it takes to copy everything? The source <code>DataTable</code> has a lot more columns whereas the destination is a subset. We could refactor the code to only use the source, but this is a complex app and it will require regression testing since both source and destination tables are global variables and used in many places.</p>
",https://stackoverflow.com/questions/61369734/ado-net-how-to-bulk-copy-rows-in-a-datatable-into-another,"['vb.net', 'datatable', 'ado.net', 'dataset']",76,False,0,2
Wiremock record and stub at the same time,"<p>I have a service(A) that calls another service(B) which i am mocking with a Wiremock. What i want to do is have a test in which:</p>

<ol>
<li>If i am in recording mode record the calls A -> B and put them in a file</li>
<li>If i am in non-recording mode capture the calls A -> B and compare them with the pre-recorded mocks(it's like regression testing)</li>
</ol>

<p>My current structure is 
BMockRule.java</p>

<pre><code>public class BMockRule extendsWireMockClassRule {


    public BMockRule(Options options) {
        super(options);
    }

    @Override
    protected void before() {
        super.before();
        this.stub();
    }

    @Override
    public void stub() {

        this.stubFor(requestMatching(request -&gt;
                MatchResult.of(request.getUrl().contains(""/request"")))
                .willReturn(aResponse().withStatus(200))
        );
    }
}
</code></pre>

<p>And a inside my test it looks like</p>

<pre><code>public class QuoteCachePublisherIntTest {
    @ClassRule
    public static DropwizardAppRule&lt;MicroServiceConfiguration&gt; rule =
            new DropwizardAppRule&lt;&gt;(
                    MicroServiceApplication.class,
                    resourceFilePath(""test_config.yml""));

    private QuoteCachePublisher publisher;

    @ClassRule
    public static BasicWiremockClassRule serviceB =
            new BMockRule(options().port(5100)).withStatus(200);

    @Test
    public void test_Request() {

        if(record) {
            WireMock.startRecording(""http://localhost:5100"");
        } 

        publisher.publish(parameters);

        if(record) {
            SnapshotRecordResult recordedMappings = WireMock.stopRecording()
            &lt;write-stubs-to-file&gt;
        } else {
            SnapshotRecordResult recordedMappings = &lt;read-stubs-from-file&gt;
        }

        // verify statements that compare the actual calls vs the recorded mappings
    }

</code></pre>

<p>The thing is that when i do the recording, the stubbing doesn't work.
Is there a simple way to do achieve this.</p>

<p>Thanks :)</p>
",https://stackoverflow.com/questions/60261404/wiremock-record-and-stub-at-the-same-time,"['java', 'dropwizard', 'wiremock', 'wiremock-record']",511,False,1,0
Jmeter with Selenium runs scenario Sequentially and not paralelly,"<p>We have a Junit Framework where in we have written the methods using Java/Selenium ( which occasionally we use for regression testing as well). Same methods we are mapping it to JMX file and then triggering the Jmeter to test our performance tests. all the methods have @Test annotation for Jmeter to detect.</p>
<p>I am launching Jmeter through command prompt with command</p>
<pre><code>jmeter.bat -n -t c:\dev\test.jmx -Jusers = 3
</code></pre>
<p>Jmeter launches 3 browsers, but operation on Browser will happen only when i bring the browser to focus, that is username will enter in Browser 1 if its in focus , similarly in Browser 2 if its in focus. If not in focus then its failing that method. How can i overcome this problem.</p>
<p>Thanks in advance.</p>
",https://stackoverflow.com/questions/64986826/jmeter-with-selenium-runs-scenario-sequentially-and-not-paralelly,"['selenium', 'jmeter', 'jmeter-5.0']",97,True,0,2
Azure App Service and .Net Framework versions,"<p>I have an Asp.Net Web API set to target .NET 4.6.1 which is published to an Azure App Service.</p>
<p>I received a <a href=""https://github.com/jeffwmartinez/appservicedotnetframework.github.io#net-framework-48-is-coming-to-app-service"" rel=""nofollow noreferrer"">notification</a> from Microsoft about the imminent move to .NET 4.8 for Azure App Service.</p>
<p>The notification recommends I test my applications locally.</p>
<p>I can see that v4.6.1 is an installed version of .NET framework for my Azure App Service:</p>
<p><a href=""https://i.stack.imgur.com/6Phkn.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/6Phkn.png"" alt=""enter image description here"" /></a></p>
<p>Two questions:</p>
<ol>
<li>Given v4.6.1 exists will my Web API continue to use v4.6.1 regardless of the later versions of .NET framework that are present?</li>
<li>What (if any) testing is needed prior to the v4.8 App Service Update? Is it just a case of building it locally using v4.8 to confirm it builds/runs, or is a thorough batch of regression testing warranted?</li>
</ol>
",https://stackoverflow.com/questions/62574165/azure-app-service-and-net-framework-versions,"['.net', 'azure', 'azure-app-service-plans']",1790,True,1,1
How should I write my single run RxJs code so that I can test against subscription leaks?,"<p>with this code:</p>
<pre><code>select(): void {
        this.initialObservable$
            .pipe(
                first(),
                switchMap(() =&gt; this.service.getData())
            ).subscribe(// do stuff);
}
</code></pre>
<p>I just experienced a memory leak bug. the service call emitted again later and I realised that the subscription was never cleaned up because the subscribe content ran again.</p>
<p>Obviously this is my fix:</p>
<pre><code>select(): void {
        this.initialObservable$
            .pipe(
               switchMap(() =&gt; this.service.getData()),
                first()
            ).subscribe(// do stuff);
}
</code></pre>
<p>and that now works fine - moving the <code>first()</code> operator call to the end of the pipe.</p>
<p>I have been looking a little at jasmine marble tests and I believe I would need a reference to the observable stream to test it, which I dont have. So regression testing this will be quite messy and that makes me think what I am doing must be bad practice. What is the correct way to write such code in a unit testable way please? Preferable with marble tests.</p>
",https://stackoverflow.com/questions/63618287/how-should-i-write-my-single-run-rxjs-code-so-that-i-can-test-against-subscripti,"['angular', 'rxjs', 'jasmine-marbles']",41,False,0,1
Kendo-angular-dropdown upgrade causing error,"<p>I recently upgrade my work application from Angular 6 to Angular 7.2.<br />
This included upgrading Kendo-Angular components/modules.<br />
After upgrade, and during regression testing it was noticed that on a kendo-combobox, that uses a template, we are getting the following error:</p>
<pre><code>V2: CustomExceptionHandler Error occurred TypeError: Cannot read property 'scrollToItem' of undefined
    at main.js:89941
    at SafeSubscriber.schedulerFn [as _next] (main.js:14671)
    at SafeSubscriber.__tryOrUnsub (main.js:45229)
    at SafeSubscriber.next (main.js:45167)
    at Subscriber._next (main.js:45113)
    at Subscriber.next (main.js:45090)
    at EventEmitter.Subject.next (main.js:86078)
    at EventEmitter.emit (main.js:14643)
    at PopupComponent.onAnimationEnd (main.js:125483)
    at main.js:125443
</code></pre>
<p>This looks like it is coming from kendo-popup, but I cant seem to fix it.<br />
What I have tried:
upgraded to the most recent version of kendo-angular-dropdowns and kendo-angular-popup
Delete node-modules folder and npm cache clear</p>
<p>Downgrading back to kendo-angular-dropdowns@3.4.0 fixes it, but if I upgrade to 3.5.0 or above the error returns.
I am at a loss on how to get kendo-angular-dropdowns to the most recent version and resolve this error.</p>
<p>Thanks</p>
<p>Dependencies from package.json</p>
<pre><code>&quot;dependencies&quot;: {
    &quot;@angular/animations&quot;: &quot;7.2.16&quot;,
    &quot;@angular/cdk&quot;: &quot;7&quot;,
    &quot;@angular/common&quot;: &quot;7.2.16&quot;,
    &quot;@angular/compiler&quot;: &quot;7.2.16&quot;,
    &quot;@angular/compiler-cli&quot;: &quot;7.2.16&quot;,
    &quot;@angular/core&quot;: &quot;7.2.16&quot;,
    &quot;@angular/forms&quot;: &quot;7.2.16&quot;,
    &quot;@angular/http&quot;: &quot;7.2.16&quot;,
    &quot;@angular/material&quot;: &quot;7&quot;,
    &quot;@angular/platform-browser&quot;: &quot;7.2.16&quot;,
    &quot;@angular/platform-browser-dynamic&quot;: &quot;7.2.16&quot;,
    &quot;@angular/platform-server&quot;: &quot;7.2.16&quot;,
    &quot;@angular/router&quot;: &quot;7.2.16&quot;,
    &quot;@ngrx/effects&quot;: &quot;^7.4.0&quot;,
    &quot;@ngrx/store&quot;: &quot;^7.4.0&quot;,
    &quot;@ngrx/store-devtools&quot;: &quot;^7.4.0&quot;,
    &quot;@ngui/auto-complete&quot;: &quot;0.16.0&quot;,
    &quot;@progress/kendo-angular-buttons&quot;: &quot;5.4.2&quot;,
    &quot;@progress/kendo-angular-charts&quot;: &quot;4.1.4&quot;,
    &quot;@progress/kendo-angular-common&quot;: &quot;1.2.3&quot;,
    &quot;@progress/kendo-angular-dateinputs&quot;: &quot;4.2.2&quot;,
    &quot;@progress/kendo-angular-dialog&quot;: &quot;4.2.0&quot;,
    &quot;@progress/kendo-angular-dropdowns&quot;: &quot;3.4.0&quot;,
    &quot;@progress/kendo-angular-excel-export&quot;: &quot;3.1.3&quot;,
    &quot;@progress/kendo-angular-grid&quot;: &quot;4.7.2&quot;,
    &quot;@progress/kendo-angular-inputs&quot;: &quot;6.6.0&quot;,
    &quot;@progress/kendo-angular-intl&quot;: &quot;2.0.1&quot;,
    &quot;@progress/kendo-angular-l10n&quot;: &quot;2.0.1&quot;,
    &quot;@progress/kendo-angular-layout&quot;: &quot;4.2.1&quot;,
    &quot;@progress/kendo-angular-pdf-export&quot;: &quot;2.0.3&quot;,
    &quot;@progress/kendo-angular-popup&quot;: &quot;3.0.6&quot;,
    &quot;@progress/kendo-angular-ripple&quot;: &quot;2.0.1&quot;,
    &quot;@progress/kendo-angular-scrollview&quot;: &quot;3.0.1&quot;,
    &quot;@progress/kendo-angular-sortable&quot;: &quot;3.0.2&quot;,
    &quot;@progress/kendo-angular-tooltip&quot;: &quot;2.1.3&quot;,
    &quot;@progress/kendo-angular-treeview&quot;: &quot;4.2.0&quot;,
    &quot;@progress/kendo-angular-upload&quot;: &quot;6.0.0&quot;,
    &quot;@progress/kendo-data-query&quot;: &quot;1.5.4&quot;,
    &quot;@progress/kendo-drawing&quot;: &quot;1.9.2&quot;,
    &quot;@progress/kendo-theme-default&quot;: &quot;2.54.0&quot;,
    &quot;@progress/kendo-theme-material&quot;: &quot;^1.5.0&quot;,
    &quot;@types/clipboard&quot;: &quot;1.5.35&quot;,
    &quot;@types/file-saver&quot;: &quot;1.3.0&quot;,
    &quot;@types/highcharts&quot;: &quot;5.0.11&quot;,
    &quot;@types/lodash&quot;: &quot;^4.14.62&quot;,
    &quot;@types/moment-timezone&quot;: &quot;^0.5.4&quot;,
    &quot;angular-l10n&quot;: &quot;7.2.0&quot;,
    &quot;angular-resizable-element&quot;: &quot;^3.3.3&quot;,
    &quot;angular-router-loader&quot;: &quot;0.7.0&quot;,
    &quot;angular2-busy&quot;: &quot;^2.0.4&quot;,
    &quot;aspnet-prerendering&quot;: &quot;3.0.1&quot;,
    &quot;aspnet-webpack&quot;: &quot;1.0.29&quot;,
    &quot;babel-polyfill&quot;: &quot;^6.23.0&quot;,
    &quot;bootstrap&quot;: &quot;3.3.7&quot;,
    &quot;clipboard&quot;: &quot;^1.6.1&quot;,
    &quot;compression-webpack-plugin&quot;: &quot;1.0.1&quot;,
    &quot;exceljs&quot;: &quot;3.5.0&quot;,
    &quot;file-saver&quot;: &quot;1.3.3&quot;,
    &quot;font-awesome&quot;: &quot;4.7.0&quot;,
    &quot;hammerjs&quot;: &quot;^2.0.8&quot;,
    &quot;highcharts&quot;: &quot;6.0.3&quot;,
    &quot;html-webpack-plugin&quot;: &quot;^2.28.0&quot;,
    &quot;husky&quot;: &quot;^0.14.3&quot;,
    &quot;isomorphic-fetch&quot;: &quot;2.2.1&quot;,
    &quot;lodash&quot;: &quot;^4.17.4&quot;,
    &quot;lscache&quot;: &quot;1.1.0&quot;,
    &quot;moment&quot;: &quot;^2.17.1&quot;,
    &quot;moment-timezone&quot;: &quot;^0.5.14&quot;,
    &quot;ng2-appinsights&quot;: &quot;^1.0.0-beta.1&quot;,
    &quot;ng2-auto-complete&quot;: &quot;^0.12.0&quot;,
    &quot;ng2-dnd&quot;: &quot;^5.0.2&quot;,
    &quot;ngx-bootstrap&quot;: &quot;2.0.0-beta.1&quot;,
    &quot;ngx-tinymce&quot;: &quot;^7.0.0&quot;,
    &quot;ngx-toastr&quot;: &quot;8.8.0&quot;,
    &quot;normalize.css&quot;: &quot;7.0.0&quot;,
    &quot;optimize-js-plugin&quot;: &quot;^0.0.4&quot;,
    &quot;preboot&quot;: &quot;5.1.7&quot;,
    &quot;rxjs&quot;: &quot;6.6.3&quot;,
    &quot;rxjs-compat&quot;: &quot;^6.6.3&quot;,
    &quot;zone.js&quot;: &quot;0.8.29&quot;
  },
</code></pre>
<p>Component HTML</p>
<pre><code>
&lt;div *ngIf=&quot;ttsConfig?.formgroup&quot; #form=&quot;ngForm&quot; [formGroup]=&quot;ttsConfig.formgroup&quot;&gt;
    &lt;!--value:{{ttsConfig.formgroup.controls.counterpartyId.value}}--&gt;
    &lt;div class=&quot;tts-wrapper&quot; &gt;
        &lt;span class=&quot;tts-fieldname&quot;&gt;{{ttsConfig.translate? friendlyFieldName : ttsConfig.friendlyFieldName}}&lt;span *ngIf=&quot;ttsConfig.required&quot; style=&quot;padding-left:3px;&quot;&gt;*&lt;/span&gt;&lt;/span&gt;
        &lt;div *ngIf=&quot;!AuthInfo&quot;&gt;
            &lt;kendo-combobox #autocomplete [id]=&quot;id&quot;
                            [data]=&quot;data&quot;
                            [popupSettings]=&quot;{width: ttsConfig.width, appendTo: ViewContainerRef, animate: false}&quot;
                            [filterable]=&quot;true&quot;
                            [formControlName]=&quot;ttsConfig.formcontrolname&quot;
                            (filterChange)=&quot;callDebouncer($event)&quot;
                            [valueField]=&quot;ttsConfig.apiIdName&quot;
                            [textField]=&quot;ttsConfig.displayTextColoumn&quot;
                            [valuePrimitive]=&quot;true&quot;
                            (open)=&quot;checkMinLength($event)&quot;
                            [placeholder]=&quot;ttsConfig.translate? placeholder : ttsConfig.placeholder&quot;
                            [required]=&quot;ttsConfig.required&quot;
                            class=&quot;{{ttsConfig.cssClass}}&quot;
                            (valueChange)=&quot;onGridSelectionChange($event)&quot;&gt;
                &lt;ng-template kendoAutoCompleteHeaderTemplate&gt;
                    &lt;table width=&quot;{{ttsConfig.width}}&quot;&gt;
                        &lt;tr&gt;
                            &lt;td *ngFor=&quot;let i of ttsConfig.columns&quot; style=&quot;font-weight:bold&quot;&gt;&lt;span *ngIf=&quot;ttsConfig.translate&quot; l10nTranslate&gt;{{i}}&lt;/span&gt;&lt;span *ngIf=&quot;!ttsConfig.translate&quot;&gt;{{i}}&lt;/span&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
                &lt;/ng-template&gt;

                &lt;ng-template kendoAutoCompleteItemTemplate let-dataItem&gt;
                    &lt;table width=&quot;{{ttsConfig.width}}&quot;&gt;
                        &lt;tr&gt;
                            &lt;td *ngFor=&quot;let i of ttsConfig.apiDisplayObjectName&quot;&gt;
                                {{ dataItem[i] }}
                            &lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
                &lt;/ng-template&gt;
            &lt;/kendo-combobox&gt;
           
            &lt;button *ngIf=&quot;ttsConfig.displayIcon === true&quot;  #anchor (click)=&quot;toggle()&quot; class=&quot;k-button k-button-icon&quot; [hidden]=&quot;data.length === 0&quot;&gt;&lt;i  class=&quot;fa fa-info&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;&lt;/button&gt;
            &lt;div class=&quot;custom-error-tts&quot; *ngIf=&quot;ttsConfig.formgroup.controls[ttsConfig.formcontrolname]?.errors &amp;&amp; ttsConfig.formgroup.controls[ttsConfig.formcontrolname].touched === true&quot;&gt;
                &lt;strong l10nTranslate&gt;{{ttsConfig.formgroup.controls[ttsConfig.formcontrolname].errors | errorPipe}}&lt;/strong&gt;
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;div *ngIf=&quot;AuthInfo&quot;&gt;
            &lt;kendo-combobox #autocomplete [id]=&quot;id&quot;
                            [data]=&quot;data&quot;
                            [popupSettings]=&quot;{width: ttsConfig.width, appendTo: ViewContainerRef, animate: false}&quot;
                            [filterable]=&quot;true&quot;
                            [formControlName]=&quot;ttsConfig.formcontrolname&quot;
                            (filterChange)=&quot;callDebouncer($event)&quot;
                            [valueField]=&quot;ttsConfig.apiIdName&quot;
                            [textField]=&quot;ttsConfig.displayTextColoumn&quot;
                            [valuePrimitive]=&quot;true&quot;
                            (open)=&quot;checkMinLength($event)&quot;
                            [placeholder]=&quot;ttsConfig.translate? placeholder : ttsConfig.placeholder&quot;
                            [required]=&quot;ttsConfig.required&quot;
                            class=&quot;{{ttsConfig.cssClass}}&quot;
                            (valueChange)=&quot;onGridSelectionChange($event)&quot; counterpartyAccess [authInfo]=&quot;AuthInfo&quot;&gt;
                &lt;!-- &lt;ng-template kendoAutoCompleteHeaderTemplate&gt;
                    &lt;table width=&quot;{{ttsConfig.width}}&quot;&gt;
                        &lt;tr&gt;
                            &lt;td *ngFor=&quot;let i of ttsConfig.columns&quot; style=&quot;font-weight:bold&quot;&gt;&lt;span *ngIf=&quot;ttsConfig.translate&quot; l10nTranslate&gt;{{i}}&lt;/span&gt;&lt;span *ngIf=&quot;!ttsConfig.translate&quot;&gt;{{i}}&lt;/span&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
                &lt;/ng-template&gt;

                &lt;ng-template kendoAutoCompleteItemTemplate let-dataItem&gt;
                    &lt;table width=&quot;{{ttsConfig.width}}&quot;&gt;
                        &lt;tr&gt;
                            &lt;td *ngFor=&quot;let i of ttsConfig.apiDisplayObjectName&quot;&gt;
                                {{ dataItem[i] }}
                            &lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
                &lt;/ng-template&gt; --&gt;
            &lt;/kendo-combobox&gt;
           
            &lt;button *ngIf=&quot;ttsConfig.displayIcon === true&quot;  #anchor (click)=&quot;toggle()&quot; class=&quot;k-button k-button-icon&quot; [hidden]=&quot;data.length === 0&quot;&gt;&lt;i  class=&quot;fa fa-info&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;&lt;/button&gt;
            &lt;div class=&quot;custom-error-tts&quot; *ngIf=&quot;ttsConfig.formgroup.controls[ttsConfig.formcontrolname]?.errors &amp;&amp; ttsConfig.formgroup.controls[ttsConfig.formcontrolname].touched === true&quot;&gt;
                &lt;strong l10nTranslate&gt;{{ttsConfig.formgroup.controls[ttsConfig.formcontrolname].errors | errorPipe}}&lt;/strong&gt;
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;kendo-popup #popup [anchor]=&quot;anchor&quot; popupClass=&quot;content&quot; *ngIf=&quot;show&quot;&gt;
            &lt;table&gt;
                &lt;tr&gt;
                    &lt;td *ngFor=&quot;let i of ttsConfig.columns&quot; style=&quot;font-weight:bold&quot;&gt;&lt;span *ngIf=&quot;ttsConfig.translate&quot; l10nTranslate&gt;{{i}}&lt;/span&gt;&lt;span *ngIf=&quot;!ttsConfig.translate&quot;&gt;{{i}}&lt;/span&gt;&lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;
            &lt;table *ngIf=&quot;data.length &gt; 0&quot;&gt;
                &lt;tr&gt;
                    &lt;td style=&quot;max-height: 100px; max-width:200px; white-space:pre-wrap;&quot; *ngFor=&quot;let i of ttsConfig.apiDisplayObjectName&quot;&gt;
                        {{ data[0][i] }}
                    &lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;
        &lt;/kendo-popup&gt;
    &lt;/div&gt;
    &lt;span *ngIf=&quot;IsMDM&quot;&gt;*MDM&lt;/span&gt;
&lt;/div&gt; 
</code></pre>
<p>Component.ts file</p>
<pre><code>import { Component, ViewChild, Input, Output, EventEmitter, ElementRef, HostListener, OnInit, OnChanges, OnDestroy, LOCALE_ID, Inject } from '@angular/core';
import { FormGroup, FormControl, Validators, FormBuilder } from '@angular/forms';
import { AutoCompleteComponent } from '@progress/kendo-angular-dropdowns';
import { DropdownService } from '@ldc/core/shared/services';
import { takeUntil, debounceTime, distinctUntilChanged } from 'rxjs/operators';
import { Subject } from 'rxjs';
//import { TranslationService } from 'angular-l10n';
import { LdcLocale, LocaleService, TranslationService } from '@ldc/core/shared/classes/LdcLocale';
import { LocaleSubscriptionService } from '@ldc/core/shared/services';
import { CldrIntlService } from '@progress/kendo-angular-intl';

@Component({
    selector: 'ldc-type-to-search',
    templateUrl: './type-to-search.component.html',
    styleUrls: ['./type-to-search.component.scss']
})
export class TypeToSearchComponent extends LdcLocale implements OnInit, OnChanges, OnDestroy {

    @ViewChild('autocomplete') public autocomplete: AutoCompleteComponent;
    @Input() ttsConfig: TypeToSearchConfig = new TypeToSearchConfig();
    @Input() id: string = undefined;

    @Output() public selectedItemChange: EventEmitter&lt;any&gt; = new EventEmitter();
    @ViewChild('anchor') public anchor: ElementRef;
    @ViewChild('popup', { read: ElementRef }) public popup: ElementRef;
    @Input() IsMDM = false;
    @Input() AuthInfo: any;
    public gridSelection: string[] = [];
    public dataList: any[] = [];
    public data: any[] = [];
    private formSubscribed: boolean = false;
    private ngUnsubscribe = new Subject();
    private debouncer: Subject&lt;any&gt; = new Subject();
    public value: any;
    private toggleText = 'Show';
    private show = false;
    private initalLoadComplete = false;
    private friendlyFieldName: string = '';
    private placeholder: string = '';
    constructor(@Inject(LOCALE_ID) public localeId: string,
        private dropdownService: DropdownService,
        private localeService: LocaleService,
        private localeSubscriptionService: LocaleSubscriptionService,
        private intlService: CldrIntlService,
        private translationService: TranslationService) {
        super(localeService, translationService);
    }

    ngOnInit() {
        this.localeSubscriptionService.currentLocaleId.pipe(takeUntil(this.ngUnsubscribe)).subscribe(localeId =&gt; this.setLocaleId(localeId));
        if (this.ttsConfig.apiByTermTypeNoSearchUrl) {
            this.callApi();
        }
        this.debouncer.pipe(takeUntil(this.ngUnsubscribe), debounceTime(100)).subscribe(event =&gt; {
            this.handleFilter(event);
        });
    }

    ngOnChanges(change) {
        if (change.ttsConfig &amp;&amp; change.ttsConfig.currentValue.formgroup !== null &amp;&amp; this.formSubscribed === false) {
            this.formSubscribed = true;
            if (this.ttsConfig.formgroup.value[this.ttsConfig.formcontrolname] !== null &amp;&amp; change.previousValue === undefined) {
                this.callApi(this.ttsConfig.formgroup.value[this.ttsConfig.formcontrolname]);
            }

            //this was originally subscribed to the entire form and could negatively impact performance
            //we need to only subscribe to the control itself
            this.ttsConfig.formgroup.controls[this.ttsConfig.formcontrolname].valueChanges.pipe(takeUntil(this.ngUnsubscribe)).subscribe((val) =&gt; {
                if (val !== null) {
                    this.callApi(val);
                }
            });

            let formcontrolname = this.ttsConfig.formcontrolname;
            let formgroup = this.ttsConfig.formgroup;
            let formControlValue = formgroup.controls[formcontrolname].value;
            if (this.ttsConfig.useDirectBinding === true &amp;&amp; formControlValue !== undefined &amp;&amp; formControlValue !== null &amp;&amp; formControlValue !== '') {
                this.callApi(formControlValue);
            }
        }
    }

    setLocaleId(localeId: string) {
        this.localeId = localeId;
        this.intlService.localeId = localeId;
        if (this.ttsConfig.translate) {
            this.translationService.init().then((data) =&gt; {
                this.placeholder = this.translationService.translate(this.ttsConfig.placeholder, null, this.localeService.getCurrentLanguage());
                this.friendlyFieldName = this.translationService.translate(this.ttsConfig.friendlyFieldName, null, this.localeService.getCurrentLanguage());
            });
        }
    }

    ngOnDestroy() {
        this.ngUnsubscribe.next();
        this.ngUnsubscribe.complete();
    }

    private callDebouncer(event) {
        this.debouncer.next(event);
    }

    public onGridSelectionChange(val): void {
        if (!val) {
            this.selectedItemChange.emit({ value: null, control: this.ttsConfig.formcontrolname });
            return;
        }
        if (this.ttsConfig.emitPrimitive) {
            if (this.ttsConfig.apiUrl === 'CRS/ViewTTSGinInvoiceCounterparty/') {
                let selectedobj = this.dataList.find(x =&gt; x[this.ttsConfig.apiIdName] == val);
                this.selectedItemChange.emit({ value: selectedobj, control: this.ttsConfig.formcontrolname });
            } else {
                this.selectedItemChange.emit({ value: val, control: this.ttsConfig.formcontrolname });
            }
        } else {
            let selectedobj = this.dataList.find(x =&gt; x[this.ttsConfig.apiIdName] == val);
            this.selectedItemChange.emit({ value: selectedobj, control: this.ttsConfig.formcontrolname });
        }
        this.value = val;
    }

    handleFilter(value) {
        if (value.length &gt;= this.ttsConfig.minLength) {
            this.callApi(value);
        } else {
            this.autocomplete.toggle(false);
        }
    }
    checkMinLength(e) {
        if (this.autocomplete.text.length &gt;= this.ttsConfig.minLength || this.ttsConfig.apiByTermTypeNoSearchUrl) {
        } else {
            this.autocomplete.toggle(false);
        }
    }

    callApi(searchTerm?) {
        if (searchTerm !== undefined &amp;&amp; searchTerm.trim().length &gt; 0) {
            let term = `${this.ttsConfig.apiUrl}${encodeURIComponent(searchTerm)}`;
            this.dropdownService.getData(term, 0).pipe(takeUntil(this.ngUnsubscribe)).subscribe(resp =&gt; {
                this.dataList = resp;
                this.data = this.dataList.slice();
                const fgvalue = this.ttsConfig.formgroup.controls[this.ttsConfig.formcontrolname].value;
                if (this.ttsConfig.emitInitalLoad &amp;&amp; !this.initalLoadComplete &amp;&amp; fgvalue) {
                    this.onGridSelectionChange(fgvalue);
                    this.initalLoadComplete = true;
                }
                if (this.ttsConfig.apiByTermTypeNoSearchUrl) {
                    this.data.sort((a, b) =&gt; a.TermDescription.localeCompare(b.TermDescription));
                }
            });
        } else {
            let term = this.ttsConfig.apiByTermTypeNoSearchUrl ? `${this.ttsConfig.apiByTermTypeNoSearchUrl}` : undefined;
            if (term) {
                this.dropdownService.getData(term, 0).pipe(takeUntil(this.ngUnsubscribe)).subscribe(resp =&gt; {
                    this.dataList = resp;
                    this.data = this.dataList.slice();
                    this.data.sort((a, b) =&gt; a.TermDescription.localeCompare(b.TermDescription));
                });
            }
        }
    }

    @HostListener('keydown', ['$event'])
    public keydown(event: any): void {
        if (event.keyCode === 27) { //escape key
            this.toggle(false);
        }
    }

    @HostListener('document:click', ['$event'])
    public documentClick(event: any): void {
        if (this.ttsConfig.displayIcon &amp;&amp; this.data.length &gt; 0) {
            if (!this.contains(event.target)) {
                this.toggle(false);
            }
        }
    }

    public toggle(show?: boolean): void {
        this.show = show !== undefined ? show : !this.show;
        this.toggleText = this.show ? 'Hide' : 'Show';
    }

    private contains(target: any): boolean {
        if (this.ttsConfig.displayIcon &amp;&amp; this.data.length &gt; 0) {
            return this.anchor.nativeElement.contains(target) ||
                (this.popup ? this.popup.nativeElement.contains(target) : false);
        } else {
            return false;
        }
    }


}

export class TypeToSearchConfig {
    columns: string[];
    required: boolean;
    apiUrl: string;
    apiDisplayObjectName: string[];
    displayTextColoumn: string;
    apiIdName: string;
    formcontrolname: string;
    formgroup: FormGroup;
    placeholder: string;
    friendlyFieldName: string;
    width: number;
    cssClass: string;
    displayIcon: boolean;
    minLength: number;
    apiByTermTypeNoSearchUrl?: string;
    emitPrimitive: boolean;
    emitInitalLoad: boolean;
    useDirectBinding: boolean;
    translate: boolean;
    constructor(
        columns: string[] = [],
        requried: boolean = false,
        apiUrl: string = null,
        apiDisplayObjectName: string[] = null,
        displayTextColoumn: string = null,
        apiIdName: string = null,
        fromcontrolname: string = null,
        formgroup: FormGroup = null,
        placeholder: string = '',
        friendlyFieldName: string = '',
        width: number = 750,
        cssClass: string = 'lc-combobox',
        displayIcon: boolean = true,
        minLength: number = 3,
        apiByTermTypeNoSearchUrl: string = null,
        translate: boolean = false) {
        this.columns = columns;
        this.required = requried;
        this.apiUrl = apiUrl;
        this.displayTextColoumn = displayTextColoumn;
        this.apiDisplayObjectName = apiDisplayObjectName;
        this.apiIdName = apiIdName;
        this.formcontrolname = fromcontrolname;
        this.formgroup = formgroup;
        this.placeholder = placeholder;
        this.friendlyFieldName = friendlyFieldName;
        this.width = width;
        this.cssClass = cssClass;
        this.displayIcon = displayIcon;
        this.minLength = minLength;
        this.apiByTermTypeNoSearchUrl = apiByTermTypeNoSearchUrl;
        this.translate = translate;

        this.emitPrimitive = true;
        this.emitInitalLoad = false;
        this.useDirectBinding = false;
    }
}

``
</code></pre>
",https://stackoverflow.com/questions/64271743/kendo-angular-dropdown-upgrade-causing-error,"['angular', 'kendo-ui', 'telerik', 'kendo-ui-angular2']",637,False,0,1
Fetch_pandas vs Unload as Parquet - Snowflake data unloading using Python connector,"<p>I am new to Snowflake and Python. I am trying to figure out which would faster and more efficient:</p>
<ol>
<li><a href=""https://docs.snowflake.com/en/user-guide/python-connector-pandas.html#reading-data-from-a-snowflake-database-to-a-pandas-dataframe"" rel=""nofollow noreferrer"">Read data from snowflake</a> using fetch_pandas_all() or fetch_pandas_batches() <strong>OR</strong></li>
<li>Unload data from Snowflake into Parquet files and then read them into a dataframe.</li>
</ol>
<p><strong>CONTEXT</strong>
I am working on a data layer regression testing tool, that has to verify and validate datasets produced by different versions of the system.</p>
<p>Typically a simulation run produces around 40-50 million rows, each having 18 columns.</p>
<p>I have very less idea about pandas or python, but I am learning (I used to be a front-end developer).</p>
<p>Any help appreciated.</p>
<p>LATEST UPDATE (09/11/2020)
I used  fetch_pandas_batches() to pull down data into manageable dataframes and then wrote them to the SQLite database. Thanks.</p>
",https://stackoverflow.com/questions/63712847/fetch-pandas-vs-unload-as-parquet-snowflake-data-unloading-using-python-connec,"['pandas', 'snowflake-cloud-data-platform']",499,False,0,1
Statistical test for time series where outcome occurs - python,"<p>I am enquiring about assistance regarding regression testing. I have a continuous time series that fluctuates between positive and negative integers. I also have <em>events</em> occurring throughout this time series at seemingly random time points. Essentially, when an event occurs I grab the respective integer. I then want to test whether this integer influences the event at all. As in, are there more positive/negative integers. </p>

<p>I originally thought logistic regression with the positive/negative number but that would require at least two distinct groups. Whereas, I only have info on events that have occurred. I can't really include that amount of events that don't occur as it's somewhat continuous and random. The amount of times an event doesn't occur is impossible to measure. </p>

<p>So my distinct group is all true in a sense as I don't have any results from something that didn't occur. What I am trying to classify is: </p>

<p><strong>When an outcome occurs, does the positive or negative integer influence this outcome</strong>.</p>
",https://stackoverflow.com/questions/61721366/statistical-test-for-time-series-where-outcome-occurs-python,"['python', 'pandas', 'regression']",194,True,1,3
Mobile emulator/simulator Detox screenshot artifacts differ when run on different hosts,"<p>I'm taking screenshots with Detox locally and committing them to my source repo. In continuous integration (Circle/macOS executor), I'm running the test again and detecting any file differences. Basically a form of visual regression testing. Unexpectedly, the PNG files differ when run on CI. This is occurring for both iOS and Android. Inspecting the resulting PNG file that was run on CI, the RGB values differ randomly by one. For example RGB(23,42,23) vs RGB(23,42,24). The difference could be in any of the color channels. Spot checking the result, it's usually just one channel (but presumably could be more than one).</p>

<p>Some notes:</p>

<ul>
<li>For Android, it looks like the <code>adb screencap</code> command is used by Detox, which looks like it can emit raw or PNG output (Detox is using the latter).</li>
<li>The same emulator (Android) and simulator (iOS) type is being used in the tests</li>
</ul>

<p>So my questions are:</p>

<ul>
<li>Is PNG output deterministic given the same input?</li>
<li>Is <code>adb screencap</code> (and the equivalent on iOS used by Detox) causing this?</li>
</ul>
",https://stackoverflow.com/questions/62177822/mobile-emulator-simulator-detox-screenshot-artifacts-differ-when-run-on-differen,"['android', 'ios', 'circleci', 'libpng', 'detox']",387,True,0,1
How to push modified code in a perforce changelist to another branch?,"<p>Basically, I've got main and UnityVersion_Testing branches.  The team is all using p4v, but it's an uphill battle.  Our project is on an older version of Unity, and I'd like to run the automatic upgrade by running the old project in the new engine and then push to a branch we've got in Perforce specifically for such an occasion.</p>
<p>What I thought I was supposed to do was run the upgrade, those files that are modified are now in a new pending changelist, I shelve those files, switch streams to UnityVersion_Testing, and then I thought I'd be able to unshelve those files there.  No luck.  The shelved files appear to belong to the other workspace.  I then tried to unshelve the files.  I can't, because they're still checked out, and I can't seem to get them into a state where they'll accept being unshelved.</p>
<p>How do I pull latest from main, upgrade the assets in place in the new version of Unity, and then push to our existing UnityVersion_Testing branch so that I'm in a good place to merge those changes back into main when it's passed regression testing?</p>
",https://stackoverflow.com/questions/64583192/how-to-push-modified-code-in-a-perforce-changelist-to-another-branch,"['unity-game-engine', 'perforce', 'p4v']",243,True,1,1
Random task deadlocks/memory corruption in wpf application in virtual machine running .net 4.8,"<p>So I have spent the better part of two days troubleshooting a very weird issue. At no point running my application on the development workstation or a physical workstation did I ever encounter any issues running the application. </p>

<p>The app has reached a point in the development lifecycle were it was time to start doing more targeted regression testing. This included running the application within virtual machines as I wanted to support the application running in virtualized environments.</p>

<p>Well upon testing in virtualized environments I noticed a very weird issue randomly any command I had binded that opened a child window would sometimes not work. The child window will not render and the button would be greyed out due to the canexcute of the command giving false since it thought the command was still running. This issue cannot be reproduced on a physical machine and have tried greatly. </p>

<p>After research I saw a lot about virtual machines and wpf rendering and people stating to force software rendering instead of allowing hardware rendering. This did not work either. </p>

<p>Further research/testing found this didn't have to be a task that rendered a simple child window and it could be any task that would lead to this random issue.</p>
",https://stackoverflow.com/questions/59614559/random-task-deadlocks-memory-corruption-in-wpf-application-in-virtual-machine-ru,"['wpf', 'task', 'task-parallel-library', 'mahapps.metro']",70,False,0,1
Register multiple endpoints of same contract in WCF and Castle windsor,"<p>I'm looking for some help on implementing WCF Castle injection in one of my projects</p>

<p>Basically, we are developing an configuration tool which would synchronize the data between our test and production environments. It would read the data from production environment and will update the data in test environments so that the test and production environments are in sync for regression testing of our applications</p>

<p>So, in my application configuration file, i'm maintaining different endpoints of my service (they have different names but have same contract). I'm registering them as follows</p>

<pre><code>container.Register(Component.For&lt;IService&gt;().ImplementedBy&lt;CustomServiceProxy&gt;().Named(integration));
container.Register(Component.For&lt;IService&gt;().ImplementedBy&lt;CustomServiceProxy&gt;().Named(useracceptance));
</code></pre>

<p>The class ""CustomServiceProxy"" has business logic and does the data comparisons for synchronization.</p>

<p>In the above code, when the components are registering, I'm facing the below exception. I have verified the endpoints mentioned in the configuration file and all the endpoints are provided with a different names so that they don't conflict each other during runtime</p>

<blockquote>
  <p>An endpoint configuration section for contract 'DataSynch.IService' could not be loaded because more than one endpoint configuration for that contract was found. Please indicate the preferred endpoint configuration section by name</p>
</blockquote>

<p>My idea is to register multiple service endpoints with different dependency names and use the registered names as keys to resolve the dependencies during run time using service overrides</p>

<pre><code>container.Register(Component.For&lt;IServiceFactory&lt;IService&gt;&gt;().ImplementedBy&lt;ServiceFactory&gt;().
                        ServiceOverrides(
                            ServiceOverride.ForKey(IntService).Eq(integration),
                            ServiceOverride.ForKey(UatService).Eq(useracceptance)));     
</code></pre>

<p>The same keys mentioned in the service override are being passed to constructor parameters for dependency resolutions                 </p>

<p>Any quick help on this topic would be really helpful</p>
",https://stackoverflow.com/questions/60270438/register-multiple-endpoints-of-same-contract-in-wcf-and-castle-windsor,"['c#', 'wcf', 'dependency-injection', 'castle-windsor', 'castle']",61,False,0,1
React paginated rendering with embla carousel mapped components,"<p>So I created a search page where you get result set displayed and have options to limit results to 10, 25, 50 and it applies pagination automatically if there are more results than displayed on page. It worked perfectly, but then I added new functionality on the result posts to be able to scroll through each posts pictures while in result page, for which I used embla carousel and also vanilla-lazyload. That worked really well by itself with no issues. But when regression testing the paging functionality using result count limit, any scenario where you reduce the limit and it has to remove some objects, the code fails with below error and repeats few times.</p>
<blockquote>
<p>Uncaught TypeError: Cannot read property 'removeAllEvents' of undefined</p>
<p>The above error occurred in the EmblaCarouselReact component:</p>
</blockquote>
<p>It seems the created components are calling some function after the objects are removed already.</p>
<p>Below is my piece of code which lists the posts conditionally.</p>
<pre><code>searchResult = this.state.posts.map((post, index) =&gt; {
                    if((index + 1) &gt;= this.state.pagination.show_from &amp;&amp; (index + 1) &lt;= this.state.pagination.show_to){
                                    return  &lt;div key={post.id} className = 'post-container'&gt;
                                                &lt;div className='post-picture'&gt;
                                                    {!post.object.pictures[0] ? &lt;img src='/images/posts/default-test.jpg' alt=&quot;logo&quot;&gt;&lt;/img&gt;
                                                    :
                                                        &lt;LazyImageProvider&gt;
                                                            &lt;Carousel&gt;
                                                            {post.object.pictures.map((image, i) =&gt; (
                                                                &lt;LazyImage aspectRatio={[10, 6.5]} src={image.pictureSmall} key={i} /&gt;
                                                            ))}
                                                            &lt;/Carousel&gt;
                                                        &lt;/LazyImageProvider&gt;
                                                    }
                                                &lt;/div&gt;
                                            &lt;/div&gt;
                    }
                })
</code></pre>
<p>I never had this problem before, but I am using a complete solution for this carousel from online article and thus don't know the inside outs of how it works in the back end. Hopefully someone knows an easy fix, thanks for your help. I can see that the carousel code is causing this, if you have alternative superiod carousel, I'm all ears.</p>
<p>The code base for the carousel and lazy load is:
<a href=""https://codesandbox.io/s/react-image-slider-d8sl1?file=/src/index.js"" rel=""nofollow noreferrer"">https://codesandbox.io/s/react-image-slider-d8sl1?file=/src/index.js</a></p>
",https://stackoverflow.com/questions/62261358/react-paginated-rendering-with-embla-carousel-mapped-components,"['reactjs', 'carousel', 'lazy-loading']",787,True,0,1
Visual Studio 2019 - MSBuild tools version 12 missing,"<p>I'd like our developers to use one version of Visual Studio for all of our projects (where possible) - to that end, I've asked them to use VS2019 for some projects that were originally created in VS2010 and then migrated to VS2013.</p>

<p>A runtime behavior change occurred when running one of these old webforms applications in VS2019.  I'm not sure why it's different since the dlls being used are the same and the compiled IL is the same for the method in question, but at the moment I don't really care about ""fixing"" it since it would require making code changes and regression testing the entire application; a path I'd like to avoid for the moment.</p>

<p>What I'd like to do is make sure VS2019 builds with the indicated tools so that we retain the old behavior.  The project file is referencing tools version 12 (VS2013 is not installed), but when Visual Studio builds I see the following in the MSBuild output:</p>

<blockquote>
  <p>Project file contains ToolsVersion=""12.0"". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion=""Current"". For more information, please see <a href=""http://go.microsoft.com/fwlink/?LinkId=293424"" rel=""nofollow noreferrer"">http://go.microsoft.com/fwlink/?LinkId=293424</a>.</p>
</blockquote>

<p>I installed MSBuild Tools 2013, but that didn't correct the issue before or after a restart.  I also tried with tools version 15 and got the same error (VS2017 is installed).</p>

<p>MSBuild from the VS2019 dev command prompt worked, but I had to copy the 14.0 webapplication targets to a new folder named ""16.0"".  I'm not sure why there is a 14.0 folder but no 12.0 or 15.0 folder without doing more searching online.</p>

<p>Is this a fool's errand, or am I missing something simple?</p>
",https://stackoverflow.com/questions/62050229/visual-studio-2019-msbuild-tools-version-12-missing,"['visual-studio', 'msbuild']",2773,False,0,1
