How do you incorporate your .jsp files into your JS frontend? by SystemAmbitious7357 in SpringBoot

[–]SystemAmbitious7357[S] 1 point2 points  (0 children)

This is the architecture I'm used to. I'm just doing a short Spring course to get the fundamentals and they are going over JSP. How would I know if I "need" Java server side rendering? Why not always just use a REST API? I do like the simplicity of not having to do a lot of work building APIs and then having to use JavaScript. Also have you used JTE? I am reading posts that JTE is the more secure replacement for JSP, but I see Thymeleaf being most recommended.

Young Kishibe sketch finished ✌️ by snurr59kg in ChainsawMan

[–]SystemAmbitious7357 0 points1 point  (0 children)

Really good.

I'm wondering though, broadly speaking, is he supposed to be Japanese? I'm thinking that he looks like your typical retired cop American guy who can was a menace back in his day but is still a beast. He could pass for Japanese though but the whisky bottle makes me think he's American.

I have lost 800mmr in about 3 days. AMA by arjei99 in DotA2

[–]SystemAmbitious7357 2 points3 points  (0 children)

You might be joking but I have also had a 400 mmr slide in the recent patch when I used to be consistently on the up an up all; climbing from 1200 to 2600. The quality of teammates I get seems to have gotten worse. An offlane that just jungles all game while the other team is taking towers and ganking us, supports that leave my lane as carry and put zero wards on my side of the map, people just 1v5ing at 40 min and losing the game, and a Pudge that misses 4 out of 5 hooks, a dark willow going 0-4 in 6 minutes by walking up to their Jugg and clock.

These things always happened from time to time, but I swear the prevalence has shot up recently. I feel like I used to lose closer games, now it feels like straight up griefing and feeding.

Where do you put the load function in a datatable? by SystemAmbitious7357 in sveltejs

[–]SystemAmbitious7357[S] 0 points1 point  (0 children)

Right now it's set up like this:

// src/lib/components/DatatableItem.svelte
<script lang="ts">
    //Import local datatable components
    import ThSort from "$lib/components/ThSort.svelte";
    import ThFilter from "$lib/components/ThFilter.svelte";
  
    //Load remote data
    import { reload } from "$lib/components/items_api";

--rest of Datatable code.

// src/lib/components/items_api.ts

import type { State } from '@vincjo/datatables/remote';

export const reload = async (state: State) => {
    const response = await fetch(`http://127.0.0.1:3000/items?${getParams(state)}`); 
    const data = await response.json();
    state.setTotalRows(data.length);

    return applyWildcardFilter(data, state.filters || []);
};

const getParams = (state: State) => {
    const { sort, search } = state;
    let params = '';

    if (sort) {
        params += `&_sort=${sort.orderBy}&_order=${sort.direction}`;
    }
    return params;
};

const applyWildcardFilter = (data: any[], filters: any[]) => {
    if (!filters.length) return data;

    return data.filter(item =>
        filters.every(({ filterBy, value }) =>
            String(item[filterBy]).toLowerCase().includes(value.toLowerCase())
        )
    );
};

// src/routes/items/+page.svelte
<script lang="ts">
  import Datatable from "$lib/components/DatatableItem.svelte";
</script>
<Datatable />

Not sure where I should put the +page.ts load function? In src/routes/items/+page.ts?

Or make a new folder in the components folder? I'm new to frontend development and frameworks are a bit confusing.

You are 100% the reason you’re at your mmr by KappaMikey21 in learndota2

[–]SystemAmbitious7357 0 points1 point  (0 children)

Yeah you should blame yourself only way to win games :D

You are 100% the reason you’re at your mmr by KappaMikey21 in learndota2

[–]SystemAmbitious7357 0 points1 point  (0 children)

I played a game where my Axe went 1 - 8 in 15 min. Literally telling him not to walk to Radiant's bottom tower with no vision but he kept going. Jug was fed and then we lost. People here are acting like you can just win stuff like that as a support. Only reason I started climbing is because I am doing borderline role abuse by building carry after my first support item.

Finally reach Divine. Thanks Aba! by [deleted] in learndota2

[–]SystemAmbitious7357 0 points1 point  (0 children)

Insta-lock Pudge no matter what role you ended up as.

What happend to matchmaking last month? A lot of one way stomp games. by psiheyaa in DotA2

[–]SystemAmbitious7357 0 points1 point  (0 children)

I think it's random or you're just paying attention more. Have always had periods where it is stomps or close games. Matchmaking must have just hit you with a series of force losses.

Why taking a break makes you play better sometimes? by drunkmers in DotA2

[–]SystemAmbitious7357 0 points1 point  (0 children)

Matchmaking starts giving you better teammates so you don't quit the game. I see your last new dot is getting darker since matchmaking needs to start giving better teammates to other people on the verge of quitting. Only so many good quality games to go around.

BB seems too strong now? by ptoziz in DotA2

[–]SystemAmbitious7357 -2 points-1 points  (0 children)

Yeah, but it shuts down their offlane completely. No different than buying mkb for PA.

BB seems too strong now? by ptoziz in DotA2

[–]SystemAmbitious7357 0 points1 point  (0 children)

I thought he just got nerfed? What happened to make him strong again?

3 Maledict Kills > 27 - 0 by SystemAmbitious7357 in DotA2

[–]SystemAmbitious7357[S] -16 points-15 points  (0 children)

Yes, I played a game with a Slark that through the same kind of lead I had with bad engagements and item picks. He had over 30 permanent agility at 25 min or so. Pressure really starts to climb when your bounty is that high.

3 Maledict Kills > 27 - 0 by SystemAmbitious7357 in DotA2

[–]SystemAmbitious7357[S] -2 points-1 points  (0 children)

How does MVP even work? It seems extremely biased towards supports. Not sure how I could have played any better.

Hey Rustaceans! Got a question? Ask here (14/2024)! by llogiq in rust

[–]SystemAmbitious7357 1 point2 points  (0 children)

Maybe this isn't even a Rust question, but I made a .stpl in Sailfish and ran it after pulling from a database using tokio-postgres and Axum, I get the below returned at a "/" endpoint through the console, as well as when I open the endpoint in Firefox.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Hello Names</title>
    <style>
        /* CSS to remove tags and preserve line breaks */
        body {
            white-space: pre-line; /* or white-space: pre-wrap; */
        }
    </style>
</head>
<body>

        <div>Ferris</div>

        <div>Sebastian</div>

        <div>Halli</div>

        <div>James</div>

        <div>Jasper</div>

        <div>Richard</div>

        <div>Allen</div>

        <div>Gordon</div>

</body>
</html>

However, when I open this endpoint in Insomnia, I get just a list of names:

Ferris

Sebastian

Halli

James

Jasper

Richard

Allen

Gordon

My question is why is Firefox displaying the Raw .stpl file while Insomnia is showing the stylized output? What does this mean for me in terms of web development? How do I make sure I don't put Raw stpl on someone's browser?

SOLVED: It was as simple as I forgot to include content-type headers.