Sending a embeds from Script to Discord via Webhook – Components not working

I’m facing an issue and i also tested it via -curl with no other results.
Basically i’m sending a json like this:

  "embeds": [
    {
      "title": "A title",
      "description": "A description",
      "color": 16711680,
      "fields": [
        {
          "name": "first name",
          "value": "value",
          "inline": true
        },
        {
          "name": "second name",
          "value": "value",
          "inline": true
        },
        {
          "name": "third name",
          "value": "value",
          "inline": true
        }
      ],
      "footer": {
        "text": "Powered by xxx",
        "icon_url": "a url"
      }
    }
  ],
  "components": [
    {
      "type": 1,
      "components": [
        {
          "type": 2,
          "label": "Click me!",
          "style": 5,
          "url": "a link"
        }
      ]
    }
  ]
}

It works fine as it should but i’m not able to show the buttons from components in the message nor from App script or -curl

Can anybody help me out?

cursor img converted base64 got issue

I’ve tried to replace the actual cursor for my website blog page, changing with my svg logo to get a space invader for cursor.

svg custom-cursor

But when I refresh my page I can’t see it; there is the page https://chichportichbenjamin.mydurable.com/blog and the added code to the website builder

<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    <style>
        /* Styles CSS */
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f3f3f3; /* Couleur de fond moderne */
            position: relative; /* Ajout pour que le pointeur de souris suive correctement */
        }

        .custom-cursor {
            width: 45px; /* Taille du curseur */
            height: 27px;
            background-image: url('data:image/svg+xml;base64,iVBORw0KGgoAAAANSUhEUgAAAXcAAADhCAYAAAAziPUUAAAAAXNSR0IArs4c6QAAAHhlWElmTU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAIdpAAQAAAABAAAATgAAAAAAAAJYAAAAAQAAAlgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAXegAwAEAAAAAQAAAOEAAAAA4m/NTAAAAAlwSFlzAABcRgAAXEYBFJRDQQAAGnlJREFUeAHtnW2MJMV5x7u6Z1+sPSBBiU0ciLEjJUGR7ThnOcGfkJC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ce4Cw6SUB50buJkfXJhclM3V0yQVPzn0hmWKxahdxXyXBq8cE3LsUUp6JZU7MlHtTHFwtk/74Iu5pJpR4ReCQm58Bg3PMIpTmvjgMHVtc554G6+aBnY6DEgjkIrBz5684OCUjkzIGBVgeXuLc/HXIHaqp4x9xTyGhwCcCF31w1Elxjw1Oy2gHn8QkPzWc+0Iy/TlD3E0Txr7VBK5oR06Ku8lL/1wcuZu97t/qQ3hT5xqb7mEHBDwg8MorP2v90nsu/oprobYD9SNTPssQ+EGZ5njelH0TdttB8KgJuy7b/H9nddcZ01WzzAAAAABJRU5ErkJggg=='); /* Image du curseur */

            background-size: cover;
            cursor: none; /* Désactiver le curseur par défaut */
            pointer-events: none; /* Éviter que le pointeur interfère avec les éléments */
            position: fixed; /* Position fixe pour suivre la souris */
            transition: transform 0.3s ease;
            z-index: 100; /* Assurer que le point reste au-dessus de tous les autres éléments */
        }

        .custom-cursor:hover {
            transform: scale(1.2);
        }

        /* Masquer le texte "Fabriqué avec" et le lien vers Durable */
.body-normal span {
    display: none;
}

/* Masquer les liens vers Durable */
a[href*="durable.co"] {
    display: none;
}

    </style>
</head>
<body>
    <!-- Contenu HTML -->
    <div class="custom-cursor"></div>

    <!-- Script JavaScript pour le pointeur de souris -->
    <script>

var style = document.createElement('style');
style.innerHTML = `
    /* Définition du curseur personnalisé */
    body {
            cursor: url(
        document.addEventListener('mousemove', function(event) {
            const point = document.querySelector('.point');
            point.style.left = event.clientX + 'px';
            point.style.top = event.clientY + 'px';
        });
    </script>
</body>
</html>

How to web scrape in 2024?

Goal: I want to create small website that will show me smallest prices from Amazon and Newegg. So in my website I can search for some product and get results with smallest prices for some particular product from those both websites.

I found a lot of questions on Stackoverflow about web-scraping and crawling. Unfotunately they are all pretty outdated (2014-2020). Even some of suggested libs/frameworks are depriciated.

Question: What kind of libs/tools/frameworks should I use in 2024? Is there JS solution or it’s better use Phyton for this type of needs?

Displaying aspx page with in SweetAlert2 Popup?

I want to display custom aspx page in popup. I’m using Sweetalert2.js and tried to load aspx page with iframe.

Problem is: I have master page and when i try to download page’s unrendered code is loading. It causes an error on when loading popup.

Because code is starting with <% .. on top of the aspx page.

How can i open aspx page to be rendered html (aspx) without an error in Sweetalert2 popup.

I hope it’s possible that i can use Sweetalert2.js as modal popup. I would like to open aspx page in Sweetalert popup page.

For example: I have a login page named login.aspx

When user clicks on the Login button; I want to show login.aspx page with in Sweetalert2.js popup.

list of checkbox not allow to me checked any item if item not equal ALL?

I working on asp.net razor page . i face issue i can’t select any checkbox checked except all .

if all checkbox checked then all checked check box it working correct .

if all checkbox not checked then all checkbox not checked and it working correct .

my issue when select any item not equal All then it will not checked if i select .

so How to solve this issue

my jQuery code as below

$(document).on('change', '.classCheckbox', function () {

     var allCheckbox = $('.classCheckbox[value="0"]');
     var checkboxes = $('.classCheckbox').not(allCheckbox);

    if (allCheckbox.prop('checked')) {
         checkboxes.prop('checked', true);
     } else {
        checkboxes.prop('checked', false);
    }

    var selectedClassIds = [];
    var selectedClassIdsValues = []; // Array to store selected values

        $('.classCheckbox:checked').each(function () {
            selectedClassIds.push($(this).val());
            selectedClassIdsValues.push($(this).next('span').text());
           
      
 
    });
   

   
   
    if (selectedClassIds.length > 0) {
        $.ajax({
            url: '?handler=CheckedAccountClassName',
            type: 'GET',
            traditional: true,
            data: { classIds: selectedClassIds, classIdsValues: selectedClassIdsValues },
            success: function (response) {
                $('#subClassesList').empty();
                $('#subClassesContainer').show();
                
                var subClassesContainer = $('<div data-class-id="' + selectedClassIds + '"></div>');
                $.each(response, function (i, item) {
                    $(subClassesContainer).append('<input type="checkbox" class="subclassCheckbox" name="selectedSubClasses" value="' + item.subClassAccountId + '" /> ' + item.subClassAccountName + '<br />');
                });
                $('#subClassesList').append(subClassesContainer);
            }
        });

Problem importing nouislider in Django project

In my base template i am trying to link to the nouislider library:

{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<!-- existing code in the head -->
<!-- Include noUiSlider CSS -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/15.7.1/nouislider.css" 
    integrity="sha512-MKxcSu/LDtbIYHBNAWUQwfB3iVoG9xeMCm32QV5hZ/9lFaQZJVaXfz9aFa0IZExWzCpm7OWvp9zq9gVip/nLMg==" crossorigin="anonymous" 
referrerpolicy="no-referrer" />
<!-- existing code in the head -->
</head>
<body>
<!-- existing code in body -->

<!-- Include noUiSlider library -->
   
<script src="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/15.7.1/nouislider.min.js" 
   integrity="sha512-UOJe4paV6hYWBnS0c9GnIRH8PLm2nFK22uhfAvsTIqd3uwnWsVri1OPn5fJYdLtGY3wB11LGHJ4yPU1WFJeBYQ==" 
   crossorigin="anonymous" 
   referrerpolicy="no-referrer">
</script>

    <script src="{% static 'javascript/slideshow.js' %}" defer></script>
    <script src="{% static 'javascript/scrollToTop.js' %}" defer></script>
    <script src="{% static 'javascript/productFilter.js' %}" defer></script>
    
</body>

This base template is extended in another template.

Now, the problem is that in my productFilter.js i have all the javascript code i need including the ones for the nouislider, however, while the codes in the productFilter.js are being executed as intened, the nouislider itself does not work on the page. The slider does not even show up. The odd thing is that if i, instead of using the productFilter.js, just put everything in a HTML file like this –

<body>
    <!-- existing code in body -->

<!-- Include noUiSlider library -->
   
<script src="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/15.7.1/nouislider.min.js" 
   integrity="sha512-UOJe4paV6hYWBnS0c9GnIRH8PLm2nFK22uhfAvsTIqd3uwnWsVri1OPn5fJYdLtGY3wB11LGHJ4yPU1WFJeBYQ==" 
   crossorigin="anonymous" 
   referrerpolicy="no-referrer">
</script>

<script>
// contents of the productFilter.js
</script>
</body>

the slider shows and works.

what i dont understand is why it wont work when the javascript codes are in a js file but work when those same js codes are in a html file embedded in a script tag. Everything is linked properly because the other javascript codes in the productFilter.js are working just fine.

What am I missing?

Migrating from meteor 1.8.3 to 2.6

I have an old project and I want to use MongoDB 5 which is supported by Meteor 2.6 and the current software that I’m using is on version 1.8.3.
I understand and see the changelog and migration guide.
I want to understand if,
Can I go directly from 1.8.3 to 2.6 ?
OR
Do I need to do this incrementally from 1.8.3. to 1.9 to 2.0 … 2.6 ?

How to add an arbitrary head tag to HTML while building the Vite project

This question arose when I wanted to add a Google Analytics script tag while building a Vite project. After searching the internet, some posts suggested that Vite uses the public/index.html file as a template for building the dist/index.html file, but this build process overwrites all the changes I make to the public/index.html file. I wonder if there is any built-in configuration that allows Vite to use the existing public/index.html as a template.

Is there a uniswap v2 router for arbitrum (how to trade arbitrum using ethers.js)?

I can not find a uniswap v2 router for any network other than ethereum mainnet.

In the uniswap v2 documentation, I find a uniswap router address, “0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D on the Ethereum mainnet, and the Ropsten, Rinkeby, Görli, and Kovan testnets”. In the deployment contracts section, I find only the factory addresses, no router addresses. I want to use uniswap v2 on the arbitrum network. How can I do this? Sushiswap has an arbitrum router address documented, but uniswap’s solution is not clear.

Cannot get the updated value in MongoDB realm

I have this function on the server said that updates some values for my user:

exports = async function(userId, district){
    var userCollection = context.services.get("mongodb-atlas").db("db").collection("User");

    
    try {
        var result = await userCollection.findOneAndUpdate(
            {"_id": userId},
            { $set: {district: district, adresa: district, userLocation:{ latitude: districtLatitude[district], longitude: districtLongitude[district]}}}
        )
        
        if(result._id==userId)
        {
            return true;
        }
    } catch (error) {
        console.error("Error updating user district:", error);
        return false; 
    }
};

I want to return true after the update is finished, I hope that I have done it in the right way.

For some reason, after I update, I cannot get the new value in the backend, it still get the old one, kotlin:

    coroutineScope.launch {
          val alreadyUpdated = loginViewModel.changeDistrictFunctionWithParameters(selectedCity)
    
          if(alreadyUpdated) {
                districtChoose.value = true
              }


   suspend fun changeDistrictFunctionWithParameters(district: String): Boolean {
       val user = appService.currentUser!!
       return user.functions.call("ChangeDistrictFunctionWithParameters", user.id, district)
        }

    fun getUserDistrict(): String {
            val userId = appService.currentUser?.id
    
            return realm.query<UserInfo>("_id = $0", userId).first().find()!!.district
        }

Sometimes getUserDistrict() returns the updated value, sometimes no. Its probably because of data sync.
Any idea how to be sure that the query return the latest data for my user?

How to use Material Icons Symbols with Angular?

How do we set the fontSet attribute on MatIcon in order to get the Material Symbols to render.

I’m trying to render the expand_content symbol however it is not rendering as shown in the material icons font.

This is the markup for rendering it as a span element:

<span class="material-symbols-outlined">
expand_content
</span>

This is how Angular Renders it:
https://stackblitz.com/edit/stackblitz-starters-lgahav?file=src%2Fmain.ts,src%2Findex.html

This is the markup:

<mat-icon fontSet="material-icons-outlined">expand_content</mat-icon>

Updating Checked State of Checkbox Input From Template (Angular)

Very descript problem here.

I have a very generic ListView component that I have been building. This component has a fair amount of functionality in it that is working (customizable columns, searching, sorting). I’m running into an issue currently as I develop it, specifically with selection of items (records) inside of this ListView component.

I’m going to try to simplify the problem in this post, but in case more is necessary I am going to post the entire component as well:

The Setup

There are three groups of items in the ListView component: records (all items), filtered, and displayedRecords (observable of filtered records or all records, depending on if filtering has been applied).

I wanted to be able to provide records as well as selection state upon initializing of those records upon initialization. The way I achieved this is by using an input called selectionModel which is an Observable<Map<T, boolean>> that can be provided and/or updated after initialization by the parent. The list view itself has an independent selectedRecords: Map<T, boolean> that the parent can override.

This is where my problem gets a little complicated. The parent may want to verify whether or not an item in the ListView can be selected before it actually is. The ListView has an optional input:

@Input() public onRecordSelecting?: (record: T, next: boolean) => Observable<boolean>

Inside of the template, the displayed records are printed in table rows. If the ListView allows multi-select, checkboxes are added to the front of each item.

Here’s a simplified version of the records being rendered in the template:

<tr *ngFor="let record of this.displayedRecords$ | async">
    <td *ngIf="this.isMultiSelect">
        <input
            type="checkbox"
            [checked]="this.isRecordSelected(record)"
            (click)="this.toggleRecordSelected(record, $event)" />
    </td>
    <td> .... RENDER RECORD COLUMNS...  </td>
</tr>

The [checked] state for the input references a method in the template that checks the selectedRecords map for the presence of the record:

public isRecordSelected(record: T): boolean {
    return this.selectedRecords.get(record) as boolean;
}

The (click) event on the input calls the toggleRecordSelected method:

public toggleRecordSelected(record: T, event: Event): void {
    event.stopPropagation();
    event.preventDefault(); // Needed so that the checkbox does not change state automatically
    this.setRecordSelected(record, event.target.checked);
}

The setRecordSelected method is the method that can (potentially) make a call to the onRecordSelecting observable to determine if the record should be selected. A simplified version looks like this:

private async setRecordSelected(record: T, next: boolean): Promise<void> {
    
    // If the record selection is not going to change, return
    if (this.isRecordSelected(record) == next) {
        return;
    }
    
    // If onRecordSelecting is defined, wait on it to determine if the updating the selection state should occur. If it is undefined, allow the ListView to update the selection state.
    let shouldUpdate: boolean = false;
    if (this.onRecordSelecting !== undefined) {
        await this.onRecordSelecting(record, next).subscribe({
            next: (shouldProceed: boolean) => {
                shouldUpdate = shouldProceed;
            }
        });
    } else {
        shouldUpdate = true;
    }
    
    // If the parent (via observable) determined the update should not occur, return
    if (!shouldUpdate) {
        return;
    }

    this.selectedRecords.set(record, next);

}

(I wasn’t originally using Promises or async/await operators, but it was what I ended up with in my first iteration of trying to get this to work).

All of this works. The selectedRecords map is accurately updated with and without the onRecordSelecting: Observable<boolean>.

The Problem

The problem I am trying to account for is that when the toggleRecordSelected(record: T, event: Event): void is raised by the checkbox in the template, I have the following line:

event.preventDefault();

The reason I felt the need to do this is because without it, the checkbox’s checked state will always change. However, with the design of this component, the parent has the ability to intervene so to speak and reject the change. Without the event.preventDefault() line the parent could reject the change but the checkbox in the view will still change.

The problem I’m trying to resolve is syncing the [checked] state of the checkbox with the selection state in the component’s selectionMap. To reiterate, the input has the following…

<input type="checkbox" [checked]="this.isRecordSelected(record)" ... />

…, and the isRecordSelected method checks the selectionMap. This call to the isRecordSelected method only happens when the component is initialized and not after a change has occurred. If I was able to manually tell the input to re-run the isRecordSelected check , I’m confident this would work.

What I Already Tried

I’ve tried several solutions prior to turning for help:

  • I originally had the isRecordSelected(record: T): boolean outside of the ListView component (it was provided as an optional Input parameter by the parent. This seems to be subject to the same problem (in fact, I couldn’t even get the initial selection state of the records using this).

  • I tried detecting changes in the ListView component. I wasn’t able to get the input elements to re-perform the isRecordSelected check.

  • I experimented with having the setRecordSelection method have a signature of setRecordSelected(record: T, next: boolean): Promise<boolean> where the Promise<boolean> return value actually represented if a change was made or not. This would accurately reflect back to the toggleRecordSelected method (which calls the setRecordSelected method), but I was unable to manually update the checked state of the checkbox. I was trying something along the lines of:

public async toggleRecordSelected(record: T, event: Event): Promise<void> {
    event.stopPropagation();
    event.preventDefault();
    const next: boolean = event.target.checked;
    await this.setRecordSelected(record, next).then((changed: boolean) => {
        if (changed) {
            event.target.checked = next;
        }
    });
}

I wasn’t having any success manually updating the checkbox’s [checked] state via the component (despite having an accurate reference to it from the $event that was provided to the function).

I know that’s pretty long winded. I’d appreciate any help or insight. Willing to refactor or reorganize the way I’m achieving certain things if that proves necessary (God knows I’ve done it a lot already).

Why does photoswipe not close correctly?

I threw together a simple web page over the last hours based on the python sigal package. Basically the web page consists of static files compiled from html templates and data stored in markup files.

Works fine, getting used to basic web styling again (I stopped working on web stuff some 6 years ago). However I have one issue: the photoswipe viewer popup does not close again. We not fully. It does close when clicking the close button or pressing ESC or when scrolling, but the layer still stays on top of the page which is why the popup cannot be opened again and in general the page is non responsive to clicks. Except below a full screen hight.

Have a try yourself: Two Circular Edges … If you click on one of the thumbnails the photoswipe viewer opens, you can browser the pics, it closes again optically, but that layer remains after closing.

What is my question? How can I fix that behavior? I am not used to debugging JS any more, so I am at a loss. Maybe someone can put me onto the right track? The browser console does not show any JS errors.