Stephen

1

votes
1

answer
65

views

ASP.NET Core DI with Simple Injector sharing DbContext

I'm setting up an ASP.NET Core project and following a CQRS pattern basing my work on the Tripod project. I've followed the Simple Injector integration guide but a little puzzled on one point... I want to keep make use of the UseInMemoryDatabase option for testing and can only find examples of that...
Stephen York
0

votes
2

answer
23

views

how to convert value into Indian rupees format?

i am getting value from the array and i need to convert that value into indian rupee format? {{user.members}}    /    ₹ {{user.total | currency:'₹':0}} Expected I need value as 1,95,445.76, Actual Output 195,445.76
stephen
0

votes
1

answer
15

views

Merge multiple rows in one column on an index value

After using str.extractall(), I have a multi-level dataframe that looks like this: id match Names 1 0 Rob Corddry 1 Craig Robinson 2 Clark Duke ... 1 23 Kisha Sierra 2 0 Anne Hathaway 1 Julie Andrews ... I want a series or dictionary that looks like this with all...
Stephen
1

votes
2

answer
1.1k

views

MySQL Left Join bigger than the “left” table alone?

Am I understanding what Left Join is supposed to do? I have a query. Call it Query A. It returns 19 records. I have another query, Query B. It returns 1,400 records. I insert Query B into Query A as a left join, so Query A becomes: SELECT * FROM tableA LEFT JOIN () ON tableA.id = tableB.id Now, a L...
Stephen R
0

votes
0

answer
20

views

Component variables undefined inside subscribe function

I'm making an API call inside of an ngOnInit in my component. The API returns an array of type Player. Each Player object has a property Position. I'm mapping the result of the API call in switchMap of rxjs, to a component variables called players. In the .subscribe I'm attempting to loop through t...
Stephen McGowan
1

votes
1

answer
237

views

WSUS SQL Query - Sort by ArrivalDate

I was given a SQL script to run by our Global IT group to generate the monthly WSUS reports they want. However, it returns everything in WSUS, not just the past months information. I am looking for assistance with modifying the script I was given to filter out all of the previous dates. This report...
Stephen Parker
1

votes
0

answer
41

views

Symfony 3: links work in dev, fail in test

I've developed a web application using Symfony framework, and it's working correctly on my dev pc: Debian 8.x Apache 2.4 PHP 7.0 Symfony 3.3 Mariadb 10 Now I've followed the same steps to install it on a test server: install composer, Symfony, etc. The test server has the same software as listed abo...
stephen_789
1

votes
0

answer
226

views

Adding hashes to filenames in Angular 2 apps for Production, not Dev with web pack

I’m trying to add a hash to my app.js filenames for production builds only and am having trouble configuring webpack to do this AND still leave incremental builds with the webpack-dev-server functional. For development, hashes break the incremental builder and the webpack-dev-server, so it's crit...
Stephen R. Smith
1

votes
1

answer
423

views

Upgrading Python 3 on Windows broke all my downloaded modules

I'm using Windows 7 and am up to date on patches. I was using Python 3.5.2 and wanted to upgrade to 3.6, so I went to the Python site, downloaded 3.6.4.exe for Windows, and ran it. The Python seems to work fine and is 3.6.4, but trying to import any of the packages I was using (pandas, numpy, tens...
Stephen
1

votes
0

answer
17

views

Old code conversion of php encryption from php 5.1 to 5.4

I want to re-use some code in an old system, but the oldest php version that I can install is php 5.4, due to I need phpmyadmin, and it cannot be found in CentOS 5.11, so I need to convert the code to php 5.4 format, I have the following code: function encrypted($secret1){ RETURN mcrypt_cbc(MCRYPT_R...
Stephen Lau
1

votes
1

answer
487

views

Unable to run set-password in Elasticsearch 6.x (keystore password was incorrect)

I'm setting up a 6.1.2 windows cluster and have a gold license. This is the first machine in the cluster so I have generated a CA cert with a password and placed it in the ES_HOME config directory. relevant keys from the elasticsearch.yml file: xpack.ssl.keystore.path: elastic-stack-test-ca.p12 xpac...
Stephen Patten
1

votes
1

answer
67

views

Write to Firefox Console from a page (no JavaScript)

Back when FireBug worked, you could write messages to Console using HTTP headers beginning with something like 'X-Wf-1-1-1'. This allowed a scripting language such as PHP or ASP to output debug info. Now that Firebug is defunct, can this still be done in some way? Specifically, I'm trying to use Co...
Stephen R
1

votes
0

answer
353

views

how to Use Materialize js with vue-cli

I'm using vue-cli, i have installed materialize using 'npm install materialize-css' then i required that in my main.js file require('materialize-css/dist/css/materialize.css'); require('materialize-css/dist/js/materialize.js'); it doesn't loads my js file. how to include materialize.js in vue-cli. c...
Jones Stephen
1

votes
0

answer
113

views

Cloud function making multiple database reads in typescript

I'm trying to create a Cloud Function in Typescript which listens for a node change and then gets all the 'bookings', taking the customer value and getting all the corresponding tokens in the 'notifications' node which I will use to send the notifications. Below is what I have so far. It is a total...
stephen reilly
1

votes
0

answer
46

views

How to use Aggregate with callback in mongoose model using express js

I tried to get count of the sub array values. so, i planned to use aggregate function in mongoose. when I tried the below code, i'm getting empty array I want to get the count of hitshistory as hits. it tried so many tips, but i couldn't get a solution. values in mongodb > db.posts.find().pretty();...
Jones Stephen
1

votes
0

answer
45

views

Excel allows adding rows manually, but not from VBA

This has been asked already, but none of the answers available helps me. I am trying to add a row to a small worksheet. I am allowed to add the row with Alt-I, R manually, but if I try to do it from a macro, I get this: I have tried, without effect, the following suggestions I have found on the Inte...
Stephen
1

votes
1

answer
25

views

SQL Recursive concatenation of a file and path name

I just can't wrap my head around this... I have 3 related tables in SQL Server: FileIds Id FileName FolderIds Id ParentId FolderName FileInfo Id FolderId FileId FileAuthorId FileClientId Sample data: FileIds 1, Gartner 2, Parker 3, Stepp FolderIds 1, null, Georgia 2, 1, Atlanta 3, 2, Terminus 4, 3,...
Stephen Lee Parker
1

votes
1

answer
540

views

Google Analytics and Sharepoint Online

I would like to know how and where to add this code to SharePoint and start tracking usage via Google Analytics. I've seen conflicting information about adding to the master page and . When I reupload to Master Pages and Page Layouts the changes are not shown. Can anyone help please? window.dataLa...
Stephen
1

votes
1

answer
165

views

Xubuntu setting preferred application from command line

I'm managing a few hundred computers with Xubuntu installed. I want to switch the default file manager from Thunar to Nemo (both of which are installed). This is easy to do by launching exo-preferred-applications and using the dialog box. However, I'd like to automate this. I've done some research...
Stephen Foster
1

votes
0

answer
35

views

In MVVM - should ViewModels contain view state (such as selected index of a list)

We're having a bit of a debate at my office as to whether or not a ViewModel should contain any state pertaining to a specific view implementation. An example would be a drop down list in a view having a selected item pointer or index. Would it be against best practice to have that property as part...
Stephen Foster
1

votes
0

answer
76

views

Theano/PyMC3 Dot Product Error (Potential DGEMM failure)

I am attempting to use theano with pymc3 to make a model as shown from scipy import stats N = 100 height = stats.norm.rvs(size=N, loc=10, scale=2) leg_prop = stats.uniform.rvs(size=N, loc=0.4, scale=0.5) leg_left = leg_prop * height + stats.norm.rvs(size=N, loc=0, scale=0.02) leg_right = leg_prop *...
Stephen Notley
1

votes
0

answer
84

views

Removing spatial interpolation or compression in GIFs created with imageio or PIL

I am trying to create GIFs using imageio. This is fairly straightforward; however, the quality of the images is poor. They appear to be interpolated. See the figures below. I am creating the GIF using the code shown below. I've tried tracing the the how the image is produced inside the source code a...
Stephen Hartzell
1

votes
1

answer
494

views

Stripe Connect IOS Integration

Stripe has provided no documentation for integration Stripe Connect for an IOS app. The Stripe Connect implementation does not allow for URL Schemes for the redirect url hence I'm not sure how one would open the url WITHIN THE APP and redirect to the app while getting the redirect url with authoriza...
Stephen Thomas
1

votes
1

answer
38

views

why is java binary in two locations in the JDK?

On Windows I noticed that the java binary is in two different locations (I have the JDK installed): C:\Program Files\Java\jdk1.8.0_121\bin\java.exe C:\Program Files\Java\jdk1.8.0_121\jre\bin\java.exe Similarly on a Unix box that I have access to, there are two copies, one in jre/bin and one just in...
Stephen
1

votes
2

answer
1.3k

views

angular access variable inside a function

I'm new to angular. I couldn't figure how to access a variable inside a function(). this is my code mergeImages() { var imgurl; var canvas: HTMLCanvasElement = this.canvas.nativeElement; var context = canvas.getContext('2d'); let img1 = new Image(); let img2 = new Image(); img1.onload = function()...
Stephen Reynolds
1

votes
1

answer
421

views

XML parsing: line 1, character 2923, semicolon expected in SQL server

Declare @InputData nvarchar(max) set @InputData ='5B 71-00-01 DISSA 001,03/26/2018 15:50:08,03/26/2018 16:50:08,41871;5B 71-00-01 DISSA 002,03/26/2018 16:50:08,03/26/2018 17:50:08,41872;5B 71-00-01 DISSA 003,03/26/2018 17:50:08,03/26/2018 18:50:08,41873;5B 71-00-01 DISSA 004,03/26/2018 18:50:08,03/2...
Daniel Stephen
1

votes
1

answer
50

views

Javascript execution order incorrect

I've an issue where the JavaScript is executing before the rendering of the html. I'm working through a code example from the book Beginning JavaScript. Here's the code: Chapter 1, Example 2 Paragraph 1 // script block 1 alert('First Script Block'); Paragraph 2 // script block 2 document.bgCol...
Stephen
1

votes
0

answer
31

views

How to set a legend which is prodcted in lineplot as the rowlabe of table

I have a series, and use ax.plot creat a line plot.Then I use ax.table add a table below the line plot. import pandas as pd import numpy as np import matplotlib.pyplot as plt data = [4.6, 4.8, 4.7, 5.2, 5.3, 5.4, 5.5] index = ['3m','6m', '1year', '2year', '3year', '5year', '10year'] s = pd.Series(d...
Stephen Zhou
1

votes
1

answer
73

views

Accessing nested documents within nested documents

I'm having a problem that is really bugging me. I don't even want to use this solution I don't think but I want to know if there is one. I was creating a comment section with mongodb and mongoose and keeping the comments attached to the resource like this: const MovieSchema = new mongoose.Schema({ m...
Stephen Agwu
1

votes
1

answer
29

views

Converting Apache RewriteRule to Nginx Rewrite

I’m completely new to Nginx, and I’ve wrote this Apache code which I used to put into a .htaccess file, and I’m stumped on converting it to Nginx. I know which .conf file to put it in, but ave no clue how to write this syntax. Please advise. RewriteRule ^([a-zA-Z0-9]+)$ profile.php?profile_us...
Stephen Becker
1

votes
0

answer
281

views

Angularjs cookie not working in chrome

Update: When I posted this question, I had been executing the code directly from my desktop. I just put my cookie sample into some angular code running in my localhost server, and I can now successfully create and read cookies from all browsers: Chrome, IE, and Firefox. Are there rules that Chrome f...
Stephen
1

votes
1

answer
116

views

rspec and friendly_id mismatches

I'm having trouble passing these tests: # user_controller_spec.rb describe 'GET #edit' do user = FactoryBot.create(:user) it 'returns http success' do get :edit, params: {id: user.hash_id} expect(response).to have_http_status(:success) end it 'renders :edit' do get :edit, params: {id: user.hash_id}...
Stephen
1

votes
1

answer
46

views

input text box no cursor in popover safari

Unable to type text/place cursor in popover in angular application for safari, IE and Chrome work. Inside popup for safari chrome popup text box
Stephen Gadd
1

votes
2

answer
899

views

Working with XML in Excel

I have a number of existing XML files with the schema and format defined within.I want to be able to copy this to Excel to make the data within the file editable. So I want to take a XML completed file today and populate with different values for the existing fields within tomorrow. I have copied th...
Stephen
1

votes
0

answer
45

views

Sharepoint Framework Property Pane - building a dynamic property

I'm attempting to build a dynamic property in the Property Pane of a React based Sharepoint Online Web Part. In order to achieve this I wish to iterate through an array of data in the PP, to create multiple drop down fields. Currently I can only create drop down fields through individual variables,...
Stephen K
1

votes
3

answer
632

views

AWS CodeDeploy Access Denied error

I'm having issues with AWS Code Deploy, it seems to have issues accessing S3, below are the error messages: 2018-04-20 16:52:35 INFO [codedeploy-agent(2983)]: [Aws::CodeDeployCommand::Client 200 0.023779 0 retries] put_host_command_complete(command_status:'Failed',diagnostics:{format:'JSON',payload...
Stephen
0

votes
0

answer
25

views

Custom input to force Pattern.compile throw PatternSyntaxException

I have one line of java code below, input can be any string My question is, is it even possible to make this line throw PatternSyntaxException? tried several inputs, but none of these can fail this line. Pattern.compile('[' + Pattern.quote(input) + ']+')
Stephen Chen
1

votes
1

answer
210

views

Dynamic BizTalk Port

I am attempting to define the attributes of a dynamic WCF-WebHttp Send Port at run time. I want to hit the end point with a specific token: The code in my message assignment shape has ballooned into this: The end point is a GET method on Traxo's REST API. https://api.traxo.com/v2/me Token = '1234TOK...
Stephen
1

votes
0

answer
366

views

asp.net-core-signalr can't stay connected for more than a minute or so

Just upgraded our app service from .net 4.6 to .net core. Part of that migration was to upgrade to the new .net core version of SignalR. Everything was working fine while running locally, but when it was published to an azure app service, the connection doesn't stay connected for more than a minute...
Stephen
1

votes
1

answer
48

views

How to synchronise Drupal 8 fields with external data sources?

I have fields in entities (specifically content types and taxonomies) that I would like to populate and synchronise with external data sources. Am I right in thinking that this can be implemented using hooks and/or events? I need to be able to read data from the external source into a field and, if...
Stephen Winnall

View additional