▲ 3 r/SQLServer+1 crossposts

Issue connecting my blazor app to remote sql server database hosted my Monsterasp.net

Hello everyone. I have completed the multi-step form challenge from Frontend Mentor and attempted to deploy the finished web app using monsterasp.net through visual studio code. I followed all the instructions from a YouTube video to a tee but when I try to actually submit data to the database I get this error:

\Error: Microsoft.Data.SqlClient.SqlException (0x80131904): The target principal name is incorrect. Cannot generate SSPI context.``

I did some further research into it but everything seemingly leads to a dead end for my specific use case. Here is microsoft's documentation on the specific error:

https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/connect/cannot-generate-sspi-context-error

Note: When I built and deployed the app for the first time the connection string was incorrect. I fixed it and published the app again through visual studion. I am not sure whether that is causing some lingering problems.

u/Mob_Pilled — 5 days ago

Visual Studio suddenely not pushing my changes to my Github repositories

I use Visual Studio 2026 and it was working fine literally up till now. I pushed one project (a Blazor one) to Github using the VS Git push and pull controls (I know how to use the Git CLI, I just prefer using the GUI controls because they are faster). After that however it won't push any changes of ANY of my projects.

I know this is a VS problem specifically because I am signed in to VS Code using my Github account too and it still works perfectly.

reddit.com
u/Mob_Pilled — 10 days ago
▲ 5 r/Notion

Images not showing

I don't know whether anyone else has this problem but for some reason all my images in my notes are refusing to load. What should I do?

reddit.com
u/Mob_Pilled — 14 days ago

Most efficient way to compare typed string to stored version in real-time?

This is an edited duplicate post from r/webdev because this subreddit does not allow reposting but I want to get opinions from JS experts.

My problem is that I am trying to compare a string that is currently being typed into a contenteditable div to the the same string data in the placeholder span (which itself was taken from a JSON file). I came up with a JS event listener that I thought would be met with few hiccups.

// text wall typing event listener
textWall.addEventListener("keydown", ()=>{
    let textWallValue = textWall.innerHTML;



textWallValue = replaceNbsps( textWall.innerHTML);


    if (textWallValue.slice(textWallValue.length - 6)== " ") {
        
            placeHolder.childNodes.forEach((node) =>{
                node.style.color="";
            })
          } else {
    for (let i =0; i<placeHolder.childNodes.length;i++) {
        if (textWallValue[0]== undefined) {


    } else {
         
         console.log(textWallValue);
          if (textWallValue[i] == placeHolder.childNodes[i].innerHTML) {
            placeHolder.childNodes[i].style.color = "green";
            placeHolder.childNodes[i].style.textDecoration = "";
          } else if ((textWallValue[i] !== placeHolder.childNodes[i].innerHTML) && (textWallValue[i] !== undefined)) {
            placeHolder.childNodes[i].style.color = "red";
            placeHolder.childNodes[i].style.textDecoration = "underline";
          } 
    }
    }
}
    
    
})

The issue comes with all the unexpected behavior from the browser, like adding "  when a space gets added to the contenteditable div (which it then removes and replaces with a normal white space after the next character is typed. If the spacebar is pressed two or more times however,   just stays there). This messes with the flow of the comparison hapenning in the event listener.

In addtion to this, it also adds a bunch of divs + <br> elements if the user presses enter in the box, and a single br if the user presses backspace to the end of the contenteditable div. There has to be a more efficient way of comparing strings in real time than this but I haven't been able to find out how? I have already tried a bunch of hacky work arounds as is already evident in my code but none seem to account for everything.

reddit.com
u/Mob_Pilled — 1 month ago
▲ 9 r/webdev

Most efficient way to compare typed string to stored version in real-time?

First I would like to thank everyone with their help here. This is very much a follow-up post to that one. I expected to be met with more hostility but everyone was so kind and helpful.

My problem now is that I am trying to compare a string that is currently being typed into a contenteditable div to the the same string data in the placeholder span (which itself was taken from a JSON file). I came up with a JS event listener that I thought would be met with few hiccups.

// text wall typing event listener
textWall.addEventListener("keydown", ()=&gt;{
    let textWallValue = textWall.innerHTML;



textWallValue = replaceNbsps( textWall.innerHTML);


    if (textWallValue.slice(textWallValue.length - 6)== "&amp;nbsp;") {
        
            placeHolder.childNodes.forEach((node) =&gt;{
                node.style.color="";
            })
          } else {
    for (let i =0; i&lt;placeHolder.childNodes.length;i++) {
        if (textWallValue[0]== undefined) {


    } else {
         
         console.log(textWallValue);
          if (textWallValue[i] == placeHolder.childNodes[i].innerHTML) {
            placeHolder.childNodes[i].style.color = "green";
            placeHolder.childNodes[i].style.textDecoration = "";
          } else if ((textWallValue[i] !== placeHolder.childNodes[i].innerHTML) &amp;&amp; (textWallValue[i] !== undefined)) {
            placeHolder.childNodes[i].style.color = "red";
            placeHolder.childNodes[i].style.textDecoration = "underline";
          } 
    }
    }
}
    
    
})

The issue comes with all the unexpected behavior from the browser, like adding "&amp;nbsp; when a space gets added to the contenteditable div (which it then removes and replaces with a normal white space after the next character is typed. If the spacebar is pressed two or more times however, &amp;nbsp; just stays there). This messes with the flow of the comparison hapenning in the event listener as you can see below

https://preview.redd.it/bzx1vm75iumh1.png?width=1366&format=png&auto=webp&s=aab387ab0629f85e5494563ccd9201e22c6cffde

In addtion to this it also adds a bunch of divs + <br> elements if the user presses enter in box, and a single br if the user presses backspace to the end of the contenteditable div. There has to be a more efficient way of comparing strings in real time than this but I haven't been able to find out how? I have already tried a bunch of hacky work arounds as is already evident in my code but none seem to account for everything.

reddit.com
u/Mob_Pilled — 1 month ago
▲ 16 r/css+1 crossposts

How to text as the background of the textarea element

Hi everyone! I am working on a project from frontend mentor. It is a speed typing test and one of the requirements is that the user should be able to see errors and correctly typed text in real-time, something like this:

https://preview.redd.it/yltj5771wnmh1.jpg?width=375&format=pjpg&auto=webp&s=2f36ae063afd4f68f9d9628d43f2a7a16fef4a48

Problem is, when I try to achieve this on mobile it will not show some of the passage after a certain point, no matter how much text you type into the textarea field:

https://preview.redd.it/robhiu8dwnmh1.png?width=345&format=png&auto=webp&s=8abce43406493367120b7e5f0472298a18db214a

Here is the html for the section of interest:

&lt;div class="wrapper"&gt;
  &lt;textarea class="text-wall"&gt;&lt;/textarea&gt;
  &lt;span class="placeholder"&gt;&lt;/span&gt;
&lt;/div&gt;

Here is the CSS:

.text-wall {
    font-size: var(--step-2);
    display: block;
    width: 100%;
    height: 400px;
    background-color: transparent;
    resize: none;
    border: none;
    outline: none;
    color: #fff;
}

.wrapper {
    position: relative;
    overflow: hidden;
}


.placeholder {
    position: absolute;
    filter: blur(3px);
    top: 0px;
    font-size: var(--step-2);
    z-index: -2; 
}

Note: For the passage in the placeholder span element, I wrapped every character in a span element using javascript. As far as I know, this is the ony way I can style every character on an individual basis depending on if the text typed into textarea matches the passage or not:

let placeHolderText = "";
let stringArr = "";
const textWall = document.querySelector(".text-wall");
const placeHolder = document.querySelector(".placeholder")
stringArr = jsonData.hard[8].text. split('');
stringArr.forEach((character)=&gt;{
    placeHolderText+= `&lt;span&gt;${character}&lt;/span&gt;`;
});
placeHolder.innerHTML = placeHolderText;
reddit.com
u/Mob_Pilled — 2 months ago

code not interacting with the browser page

Hello this is my first post on here. So basically, I want the user to be able to enter a password and username, click the submit button, and if the basic auth is correct, be redirected to a page in which all the data from an api is fetched and loaded into the html. Problem is the script does not interact with the html but still retrieves the data in a json (as confirmed by ouputing it into the console). However, if I don't call the function in as part of the button onclick method everything works as expected. The data from the api is dynamically added to the html but now I obviously can't use a login page.

Here is me calling the fetch function as a as part of the event of a button click

button.addEventListener("click", () =&gt; {
    let username = 'username';
    let password = 'password;
    let auth = btoa(`${username}:${password}`);
fetchData(auth);
    });

Here is me calling the fetch function on it s own. No button clicking required (this works but now I can't add a login page)

  let username = 'username';
    let password = 'password;
    let auth = btoa(`${username}:${password}`);
fetchData(auth);

Here is the fetch function itself

async function fetchData (auth) {
    try {
        const response = await fetch('https://exampleapi.com', {
    headers: {
        'Content-Type': 'application/json',
        'Accept': 'application/json',
        'Authorization': `Basic ${auth}`
    }
})


    if (response.ok) {

        // loads the home page and puts data from the api in the html
    }
    throw response;
    } catch (error) {
        
    }
    
};
reddit.com
u/Mob_Pilled — 3 months ago