javascript – Memory leak when emitting an event after menu click in Electron app

I’m currently building a desktop application with Electron and React.

Right now I’m adding a menu feature which toggles the dark mode of the app. In my React app, I’m using a hook which toggles the dark mode for me. I want to trigger that React hook right after the user has clicked on the menu item.

This is what I’ve done so far:


buildDefaultTemplate() {
    const templateDefault = (
        label: '&File',
        submenu: (
            label: '&Open',
            accelerator: 'Ctrl+O',
            label: '&Toggle Dark Mode',
            accelerator: 'Ctrl+T',
            click: () => {
              this.mainWindow.webContents.send('toggle-dark-mode', {
                message: 'Toggle successful!',
            label: '&Close',
            accelerator: 'Ctrl+W',
            click: () => {


export default function Dashboard(): ReactElement {
  const { username } = os.userInfo();
  const { toggleColorMode } = useColorMode();

  useEffect(() => {
    ipcRenderer.on('toggle-dark-mode', (_event, _data) => {
  }, (toggleColorMode));

It works fine toggling it. But after repeating the operation a number of times, I get this warning: MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 toggle-dark-mode listeners added to (EventEmitter). Use emitter.setMaxListeners() to increase limit

I’ve seen a similar post but the answer wasn’t satisfying. The suggestion there was to simply stop listening to events, which I think would be difficult in my case.

I’m looking for a way to unsubscribe to the event after the toggle has been successful.

javascript – How do I click the button inside the iframe?

When I am on Twitch site, I have a channel added to the homepage with an iframe. My code is below. How can I click the button inside the iframe added to the homepage? I need your help.

.attr('id', 'sevecen')
.attr('name', 'frame_name')

double click on compound string in terminal command line is not highlighting entire string

on the command line in the default terminal application ( Version 2.11 (440) ) when terminal shows file fullpath of


and I wish to highlight the entire full pathname I double click on any part of that full path … it only highlights the one word I am double clicking on

How to change terminal to highlight entire compound string interspersed with delimiters like the ‘/’ character etc …

normally I use Ubuntu which has below trick to define the word boundary characters in terminal

gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ word-char-exceptions  '@ms "-,.?%&#_+@~·/"'

where b1dcc9dd-5262-4d8d-a863-c897e6d979b9 is just my profile as retrieved using

gsettings get org.gnome.Terminal.ProfilesList default

so I believe I need the mac osx equivalent to above linux gsettings command

mac osx 11.4 Big Sur
mac mini M1 2020
chip Apple M1

windows explorer – Laptop freezes every time I click on taskbar

I deleted some of my %temp% files earlier today in my other laptop, and after logging in again the taskbar is frozen. Every time I try clicking on the taskbar a black screen flashes and screen remains frozen. I tried all possible methods of restarting the explorer.exe, scanned for corrupt files using sfc command and also tried resetting the video driver but nothing seems to help. Please aid me, thanks in advance.

How to solve this error "Multiple entries matched. Please click here to resolve."?

enter image description here
even small help will be helpful.

thanks in advance


javascript – VueJS: TimeOut de um click para o outro

javascript – VueJS: TimeOut de um click para o outro – Stack Overflow em Português

ptcLAB – Pay Per Click Platform

ptcLAB is an laravel Based Script for Pay Per Click business. You can run your own PTC, PPC or PPV website within a minutes without any programming knowledge. Admin able to set unlimited links from admin panel, and when user click or view those they will get paid. Its an online Earning Platform for both Site owner and User. our system is fully dynamic, Easy to use, User Friendly and 100% responsive.



8 – Ajax Callback only works after second click

I created a custom form with a textbox and a button. When the user clicks on that button, an ajax call should take place.

When I click on that button for the first time, a page refresh takes place. Only when I click on the button for the second time, my ajax-function is called.

I don’t know what I’m doing wrong, so I would be greatful for any suggestion.

    $form('group_rrn')('actions') = array(
        '#type' => 'button',
        '#value' => 'Ga verder',
        '#attributes' => array('class' => array('btn', 'btn-primary')),
        '#ajax' => (
            'callback' => '::ajaxRijksregisternummer',
            'event' => 'click',
            'wrapper' => 'aanvraag',
            'progress' => array(
                'type' => 'throbber',
                'message' => 'Even geduld',

This is the CallBack function:

function ajaxRijksregisternummer($form, $form_state) {
    $response = new AjaxResponse();
    $rijksregisternummer = $form_state->getValue('rijksregisternummer');
        $member = '';
        if(ReisdocumentenForm::isMemberApiCall($rijksregisternummer, $member)){
          $_SESSION('formpost') = 'rrn_ok';
          $form('group_form')('email')('#required') = TRUE;
          $response->addCommand(new CssCommand('#controle-rrn', ('display' => 'none')));
          $hasPartner = $member('hasPartner');
          $federatie = $member('federation');
          $partner = '';
          if($hasPartner == 'true'){
            $partner = $member('partnerInfo');                
          $response->addCommand(new InvokeCommand(NULL, 'AjaxCallBackShowAanvraag', ($hasPartner, $partner, $federatie)));              
        } else {
            $markup = '<div data-drupal-messages-fallback="" class="hidden"></div><div data-drupal-messages=""><div role="contentinfo" aria-label="Foutmelding"><div role="alert"><h2 class="visually-hidden">Foutmelding</h2>Dit formulier is enkel voor leden van ons ziekenfonds.</div></div></div>';
            $response->addCommand(new AppendCommand('#edit-foutmeldingen', $markup));
    else {
        $markup = '<div data-drupal-messages-fallback="" class="hidden"></div><div data-drupal-messages=""><div role="contentinfo" aria-label="Foutmelding"><div role="alert"><h2 class="visually-hidden">Foutmelding</h2>Geen correct rijksregisternummer.</div></div></div>';
        $response->addCommand(new AppendCommand('#edit-foutmeldingen', $markup));
    return $response;

Kind regards!

Without select shipping address , click on place order validation not showing Magento 2 checkout page

I have issue on place order without select shipping address or save shipping address ,click on place order validation not showing in page , showing error like below , how to handle this in Magento 2?

¿Como hago para añadir un UserControl como si fuese una lista cada vez que hago click en c# .Net?

Buenos días.
Les comento, estoy buscando ideas para hacer una aplicación para un restaurante y encontre este diseño en youtube :

introducir la descripción de la imagen aquí

Quiero hacer algo muy parecido a lo de la imagen, la parte derecha en donde dice el nombre del plato, la cantidad y el precio son UserControls agregados por defecto, pero la idea es que cada vez que haga click en alguno de los platos, se agregue un UserControl con el nombre y precio de ese plato que seleccione, como si fuese una lista. Es decir que al principio debe estar vacía. ¿Alguna idea de como hacer esto? la verdad no tengo ni idea y agradecería cualquier concejo, lo mas fácil seria hacerlo en un DataGridView pero queda mucho mas presentable como en la imagen.

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive New Proxy Lists Every Day Proxies123