Month: June 2018
-
Error Adding Card – Assembly Payments
Hi everyone, Just working with Assembly Payments and ran into the following error while following their documentation on Capturing a Credit Card: errors”:{“card_account”:[“Error adding card. If error persists, please contact our support team.”] The error is pretty vague, but it does seem that the credit card info they use in the documentation has expired. I…
-
Tab Key not Working as Expected – Visual Code
Hi everyone, I ran into a bit of a strange issue with visual code today. Tabs suddenly stopped working for creating an indent. Instead, the focus of the cursor changed. It turns out that I’d inadvertently toggled a setting that causes the tab key to move focus instead of indenting. The hotkey in windows is…
-
Including an Externally Hosted Script in ReactJs
Hi everyone, Just a quick example of how to include an externally hosted js file in a reactjs app. In index.html add your script tag as you would in a normal app: https://js.prelive.promisepay.com/PromisePay.js Then in the file you plan to use the library you can add a const and reference it normally: const promisepay =…
-
System.Security.SecurityException Failed to negotiate HTTPS Connection – Fiddler
Hi everyone, I hit the following error when trying to execute a composed request with Fiddler: [Fiddler] The connection to ‘abc.com’ failed. System.Security.SecurityException Failed to negotiate HTTPS connection with server.fiddler.network.https> HTTPS handshake to abc.com (for #32) failed. System.Security.Authentication.AuthenticationException A call to SSPI failed, see inner exception. < The function requested is not supported All that…
-
Error Number:8152,State:10,Class:16 String or binary data would be truncated. The statement has been terminated. – Entity Framework
Hi everyone, I ran into the following error after adding model validation attributes to a database with existing values: Error Number:8152,State:10,Class:16 String or binary data would be truncated. The statement has been terminated. The solution is pretty straightforward if you’re happy to truncate the values. Simply run the query below, swapping Title for your column…
-
Allow Number and String for PropTypes – ReactJS
Hi everyone, A quick post on how to allow a string or number when defining PropTypes: static propTypes = { numberField: PropTypes.number.isRequired, stringField: PropTypes.number.isRequired, mixedField: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired } Thanks to this stackoverflow post for the info: https://stackoverflow.com/a/41808543/522859
-
Multiple Instances of Component Firing Incorrect onChange – ReactJS
Hi everyone, I ran into a bit of an issue today while trying to render multiple instances of a component on a single page. Each component had a file input that was bound with an onChange event. When triggered the onChange function referenced the first component placed on the page no matter which instance was…
-
LINQ to Entities does not recognize the method ‘System.Linq.IQueryable
Hi everyone, I ran into the following error today while attempting to use a raw query with entity framework: LINQ to Entities does not recognize the method ‘System.Linq.IQueryable…method, and this method cannot be translated into a store expression I was using FromQuery, and while I’m not too sure what was causing the issue, switching to…
-
Avoiding Wrapper Divs in ReactJs
Hi everyone, Just a quick post on how you can avoid wrapper divs in ReactJs. It’s particularly useful when populating tables or creating parts of a larger component. Instead of the following: return ( Frogs Turtles ); You can use fragments: import React, { Fragment } from ‘react’ … return ( Frogs Turtles ); The…