Quantcast
Channel: User James Lawruk - Stack Overflow
Browsing latest articles
Browse All 44 View Live

Comment by James Lawruk on How do you POST a FormData object in Angular 2?

For me, the important line missing was: headers.set('Accept', 'application/json');

View Article



Comment by James Lawruk on Unrecognized attribute 'targetFramework' when...

Possible duplicate of Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive

View Article

Comment by James Lawruk on How to minify ionic 3 app for desktop browser use

See stackoverflow.com/questions/33674158/…

View Article

Comment by James Lawruk on Write Byte array to file

Possible duplicate of Can a Byte[] Array be written to a file in C#?

View Article

Comment by James Lawruk on How to write parameterized oracle insert query?

Thanks, Nishanth. Converted from VB to C#.

View Article


Comment by James Lawruk on Where does `ng serve` output files to?

Possible duplicate of Where are files stored when running ng serve?

View Article

Comment by James Lawruk on Angular Service with Subject Observable calling...

For rxjs 6.x, shorten the import line to: import {BehaviorSubject} from 'rxjs';

View Article

Comment by James Lawruk on Web Audio API Memory Leak

A bug in Chrome? bugs.chromium.org/p/chromium/issues/detail?id=717528

View Article


Comment by James Lawruk on Creating a proxy to another web api with Asp.net core

Thanks. Couldn't get the ProxyRoute attribute to work. Got a 404. Probably something I was doing wrong. Had success using the UseProxy() method, so thanks again.

View Article


Comment by James Lawruk on How to change AngularJS data outside the scope?

I also ommitted the .data. i.e. $scope.$$childHead.age = 20;

View Article

Comment by James Lawruk on the project must provide a value for configuration...

See the answer here: stackoverflow.com/a/65221807/88204

View Article

Comment by James Lawruk on No definition found for GetActiveObject from...

Worked for me. But I had to open the application as the Administrator.

View Article

Comment by James Lawruk on ASP.NET Core 6+ how to access Configuration during...

Yep. builder.services.AddSingleton<MyAppSettings>(myAppSettings) Then just inject.

View Article


Comment by James Lawruk on Vite HMR doesn't detect changes to components...

Yep. My import statement in code was all lowercase, but my nested folder name mistakenly had an uppercase letter.

View Article

Comment by James Lawruk on Object reference not set to an instance of an...

The Null reference question this question was linked to as a duplicate is too general. The question is really why could binding to a datagridview generate a null reference exception.

View Article


Answer by James Lawruk for asp.net core app deployed on iis meets 500...

Had the same issue. Here is the guide that helped me. Note, that I did not want to install the "Runtime" on the web server, but rather deploy all the necessary files as a stand alone app. Below are the...

View Article

Answer by James Lawruk for What client tools are available to manage Amazon...

I use CloudBerry FreeWare. Easy to use, just like FTP software. https://www.cloudberrylab.com/explorer/amazon-s3.aspxJeff Atwood mentioned S3Fox Organizer on his CodingHorror...

View Article


Answer by James Lawruk for How do I Scroll parent page to top when child page...

Using JavaScript within the iframe, reference the parent and call the scroll() method. window.parent.scroll(0,0);(Note. This will not work if the iframe Url is a different domain than the parent.)

View Article

Answer by James Lawruk for Potentially wrong and annoying message: “This...

Check to see if your solution has a reference to a project with a .sqlproj extension. If so, removing the reference should eliminate the issue.

View Article

Answer by James Lawruk for Error NU1605 Detected package downgrade

The GraphQL nuGet package I was referencing had a dependency to Newtonsoft.Json(>= 10.0.3). The only solution was the following:Remove the GraphQL nuGet package.Install the latest NewtonSoft.Json...

View Article

Answer by James Lawruk for How to fix NuGet package Razor runtime compilation...

Add <RazorCompileOnBuild>false</RazorCompileOnBuild> to your .csproj file. That should allow you to build the project.You also might need...

View Article


Answer by James Lawruk for Returning anonymous types with Web API

You could use an ExpandoObject. (add using System.Dynamic;)[Route("api/message")][HttpGet]public object Message(){ dynamic expando = new ExpandoObject(); expando.message = "Hello"; expando.message2 =...

View Article


Answer by James Lawruk for Chart.js Types of property 'type' are...

Looks like your TypeScript compiler is complaining because the chart type property is a specific type rather than a string.Option 1:Import ChartType and cast type as ChartType.import { Chart,...

View Article

Answer by James Lawruk for How to exclude web.config when publishing with...

For an legacy ASP.NET Web Application, add <ExcludeFilesFromDeployment>Web.config</ExcludeFilesFromDeployment> to the appropriate .xmlpub profile file found in the...

View Article

Answer by James Lawruk for Command Line Parser Library - Boolean Parameter

Here is a work-around to consider:Change the names of the options so false is always the default. If you want "close window" to be the default, then the name of the option becomes -w "keepWindowOpen".

View Article


Answer by James Lawruk for If NULL Then 0 Else Other Value

If you want to return some "other value", rather than the original value, use NVL2()NVL2(col, 1, 0) -- returns 1 for NOT NULL, 0 for NULL

View Article

Getting Http Status code number (200, 301, 404, etc.) from HttpWebRequest and...

I am trying to get the HTTP status code number from the HttpWebResponse object returned from a HttpWebRequest. I was hoping to get the actual numbers (200, 301,302, 404, etc.) rather than the text...

View Article

Answer by James Lawruk for JavaScript/React Style Guide Indentation

The react source code and sample code in the React tutorial use 2 spaces. Also it seems like many of the Github projects related to React use 2.

View Article

Answer by James Lawruk for How to hide .NET Core compatibility warnings when...

Edit your project (.proj) file and suppress the warning codes at the project...

View Article



Answer by James Lawruk for How to load environment variables from .env file...

Here are three mistakes/gotchas that tripped me up.Ensure the .env files are in the root, not the src directory. The filename .env and/or .env.development will work when running locally.Restart the...

View Article

Answer by James Lawruk for Cannot soft reset git repository in the middle of...

You might have merge conflicts. If you resolve your conflicts, the run git rebase --continue, then the soft reset option should be available.

View Article

Answer by James Lawruk for error NETSDK1032: The RuntimeIdentifier platform...

Similar to pdshuller's answer, I simply removed the <PlatformTarget> node from the project (.csproj) file, which did not match the <RuntimeIdentifier> value in the publish profile (.pubxml)...

View Article

Answer by James Lawruk for ASP.NET Core Publish Exclude Folder (or .json files)

Here are changes to the project (.csproj) file to exclude folders/files from being published. This was tested on a .NET Core 6 project with VS 2022.To remove a directory:<ItemGroup><Content...

View Article


Answer by James Lawruk for vue3 Cannot read property 'insertBefore' of null

In my case, was mistakenly calling app.mount('#app') twice.

View Article

Answer by James Lawruk for vue.runtime.esm-browser.js does not render Vue 3...

If you are using Vite, add the alias 'vue': 'vue/dist/vue.esm-bundler' to vite.config.jsimport { defineConfig } from 'vite'import vue from '@vitejs/plugin-vue'// https://vitejs.dev/config/export...

View Article

Answer by James Lawruk for Need to fetch Oracle RAW in C# string datatype "as...

I did this using Dapper. The Raw value came back as a byte[] array with 16 values. Each value in the array was the decimal value of each byte of the guid. Here is code to convert to string:public class...

View Article


Answer by James Lawruk for A Connection Attempt Failed using the SFTP Client...

Try the code on a different machine that does not have a firewall withFTP restrictions.Download an FTP client (Filezilla, WinScp) to see if you get the sameissue.In my case, the corporate policy was...

View Article


Answer by James Lawruk for ASP.net core MVC catch all route serve static file

In .NET Core 6, add app.MapFallbackToFile("index.html"); in your Program.cs file.Here is example code from the ASP.NET Core with React project template:app.MapControllerRoute( name: "default", pattern:...

View Article

Answer by James Lawruk for How to handle routes by VueJS in ASP.NET core...

I added a call to the MapFallbackToFile() method available in .NET 6 to solve my Vue3 Routing issue. (Using vue-router version 4.) Any route Url not found in my Controllers maps back to the default...

View Article

Answer by James Lawruk for What is the equivalent of `fs.readFileSync` but in...

When using FileReader in the browser, you basically have 3 options. The closest to Node's readFileSync() seems to be the readAsText() method; const file = event.target.files[0]; let reader = new...

View Article

Answer by James Lawruk for How to get the domain name of my site in ASP.NET...

Here is a test request method you can try in a controller. The .NET Core MVC ControllerBase class has the HttpContext property. Please note the Host value returned may not match the Host value in your...

View Article


What does the utmscr or utmcct values mean in reference to the Http cookie...

What does the utmscr and/or utmcct values mean in reference to the Http cookie Server variable? Are they acronyms or short for something?We are getting Elmah errors with the title...

View Article

Chrome Driver Error using Selenium: Unable to Discover Open Pages

I'm getting a Chrome Driver related error when running my Selenium tests. The error message is "Unable to Discover Open Pages." The Selenium tests were all running fine until last evening. The problem...

View Article


Answer by James Lawruk for incorrect syntax near ':' in SQL

The SQL being executed could be meant for an Oracle database. The colon(:) in an Oracle statement indicates a "bind variable".Below is example Dapper query with a parameter. Notice the SQL has...

View Article
Browsing latest articles
Browse All 44 View Live


Latest Images