interface – CTA label for mobile reporting page

I’m putting together a simple website that allows users to view football-related reports. Users are able to select from 4 report types (player, team, league, country). Depending on which report type is selected, an additional dropdown is displayed which features specific options. The user can also select a date range (e.g. Last 7 days).

On the desktop site, all these options are visible. However, on mobile, these options are hidden in a slide-out drawer and is revealed when a user clicks a CTA. My question is, in this context, is the word filters a suitable label for this CTA?

I’m slightly hesitant as the report type dropdown doesn’t feel like a filter.

attacks – How does one label malicious traffic in generated workloads?

I have been writing on some code that automatically puts together differently parameterized attacks of common pen testing tools, i.e. sqlmap, nmap, patator etc. These attacks are then launched against two or three targets. I wanted to capture the traffic to generate a malicious workload that I can later use it as a trace. Long story short, my program puts together random attacks, so I never know which kind of attack is executed or when it arrives at my target, when the attack execution is over, etc. Is it somehow possible to correlate the attack traffic that leaves my computer to the traffic that is received by my targets? Can I somehow label these attacks or recognize them by byte patterns that leave my attacking system and arrive at the target systems? I am even not sure if this is the right place to ask this, but if anyone has any idea I would really appreciate some advice.

(If someone knows fitting tags for this kind of question, please let me know.)

python – Different linestyle in same label matplotlib

I am generating following figure with matplotlib.

As you can see its two way graph, from 0 to some value for 1 side, and also same for the other side.
And since both ways have the same labels, with same linestyle, I have only 2 items in legend.

However I would like to change the linestyle for the bottom graph in one item from dashed to line.
So I need something like the following:

IS THIS POSSIBLE WITH MATPLOTLIB?

react – Checkbox, só selecione o primeiro item quando eu clicar no label. não importa qual label eu clico

Estou usando React.js para meu frontend e estou fazendo filtros de categoria, mas para isso usei checkbox para marcar a categoria desejada e a label para mostrar o nome da categoria, como a figura abaixo mostra.

inserir a descrição da imagem aqui

Agora fiz uma alteração e passei a id do input para a label. O que está acontecendo é o seguinte, sempre que clico em qualquer label, ele apenas seleciona um primeiro item a ser mostrado. Não importa em qual label eu clique, ele seleciona apenas a primeira opção.
const (checked, setChecked) = useState(())

const handleToggle = c => () => {
            
            const currentCategoryId = checked.indexOf(c)
            const newCheckedCategoryId = (...checked)
            
            if(currentCategoryId === -1){
                newCheckedCategoryId.push(c)
            } else{
                newCheckedCategoryId.splice(currentCategoryId, 1)
            }
    
    
            setChecked(newCheckedCategoryId);
            setChecked(newCheckedCategoryId);
            handleFilters(newCheckedCategoryId)
        }
    
        return categories.map((c, i) => (
            <li key={i} className="list-group-item d-flex justify-content-between lh-condensed list-unstyled">
                <input 
                    type="checkbox"
                    className="form-check-input"
                    onChange={handleToggle(c._id)}
                    value={checked.indexOf(c._id === -1)}
                    id="checkbox"
                />
                <label htmlFor="checkbox" className="form-check-label">{c.name}</label>
            </li>
            ));

Python: How to label .midi file using MIDO library

I have these .midi files and I want to label them with pitch (in MIDI numbers) per 0.032 second. Example of the label I desired can be found here. In this task, I use Python mido library, the docs can be found here.

From what I know now, I need to iterate all the message available from the file first before processing the .midi. I take 1 example from this file and this is the code + result.

# Code to iterate .midi message
import mido
from mido import MidiFile
from mido import Message
mid_14 = MidiFile('00014 Twinkle, Twinkle, Little Star.mid', clip=True)
for i, track in enumerate(mid_14.tracks):
    print('Track {}: {}'.format(i, track.name))
    print("-"*100)
    for msg in track: #print message in tracks
        print(msg)
    print("="*100)
# Result
Track 0: untitled
----------------------------------------------------------------------------------------------------
<meta message track_name name='untitled' time=0>
<meta message time_signature numerator=4 denominator=4 clocks_per_click=24 notated_32nd_notes_per_beat=8 time=0>
<meta message key_signature key='C' time=0>
<meta message set_tempo tempo=500000 time=0>
<meta message sequencer_specific data=(5, 15, 28, 50, 48, 48, 49, 46, 49, 49, 46, 48, 57) time=0>
<meta message sequencer_specific data=(5, 15, 18, 0, 0, 127, 127, 0) time=0>
<meta message end_of_track time=0>
====================================================================================================
Track 1: MAJOR_TRACK
----------------------------------------------------------------------------------------------------
<meta message track_name name='MAJOR_TRACK' time=0>
program_change channel=0 program=0 time=0
<meta message sequencer_specific data=(5, 15, 9, 64, 72) time=0>
<meta message sequencer_specific data=(5, 15, 6, 71, 101, 110, 101, 114, 97, 108, 32, 77, 73, 68, 73) time=0>
note_on channel=0 note=60 velocity=110 time=0
note_on channel=0 note=60 velocity=0 time=480
note_on channel=0 note=60 velocity=110 time=0
note_on channel=0 note=60 velocity=0 time=480
note_on channel=0 note=67 velocity=110 time=0
note_on channel=0 note=67 velocity=0 time=480
note_on channel=0 note=67 velocity=110 time=0
note_on channel=0 note=67 velocity=0 time=480
note_on channel=0 note=69 velocity=110 time=0
note_on channel=0 note=69 velocity=0 time=480
note_on channel=0 note=69 velocity=110 time=0
note_on channel=0 note=69 velocity=0 time=480
note_on channel=0 note=67 velocity=110 time=0
note_on channel=0 note=67 velocity=0 time=960
note_on channel=0 note=65 velocity=110 time=0
note_on channel=0 note=65 velocity=0 time=480
note_on channel=0 note=65 velocity=110 time=0
note_on channel=0 note=65 velocity=0 time=480
note_on channel=0 note=64 velocity=110 time=0
note_on channel=0 note=64 velocity=0 time=480
note_on channel=0 note=64 velocity=110 time=0
note_on channel=0 note=64 velocity=0 time=480
note_on channel=0 note=62 velocity=110 time=0
note_on channel=0 note=62 velocity=0 time=480
note_on channel=0 note=62 velocity=110 time=0
note_on channel=0 note=62 velocity=0 time=480
note_on channel=0 note=60 velocity=110 time=0
note_on channel=0 note=60 velocity=0 time=960
note_on channel=0 note=67 velocity=110 time=0
note_on channel=0 note=67 velocity=0 time=480
note_on channel=0 note=67 velocity=110 time=0
note_on channel=0 note=67 velocity=0 time=480
note_on channel=0 note=65 velocity=110 time=0
note_on channel=0 note=65 velocity=0 time=480
note_on channel=0 note=65 velocity=110 time=0
note_on channel=0 note=65 velocity=0 time=480
note_on channel=0 note=64 velocity=110 time=0
note_on channel=0 note=64 velocity=0 time=480
note_on channel=0 note=64 velocity=110 time=0
note_on channel=0 note=64 velocity=0 time=480
note_on channel=0 note=62 velocity=110 time=0
note_on channel=0 note=62 velocity=0 time=960
note_on channel=0 note=67 velocity=110 time=0
note_on channel=0 note=67 velocity=0 time=480
note_on channel=0 note=67 velocity=110 time=0
note_on channel=0 note=67 velocity=0 time=480
note_on channel=0 note=65 velocity=110 time=0
note_on channel=0 note=65 velocity=0 time=480
note_on channel=0 note=65 velocity=110 time=0
note_on channel=0 note=65 velocity=0 time=480
note_on channel=0 note=64 velocity=110 time=0
note_on channel=0 note=64 velocity=0 time=480
note_on channel=0 note=64 velocity=110 time=0
note_on channel=0 note=64 velocity=0 time=480
note_on channel=0 note=62 velocity=110 time=0
note_on channel=0 note=62 velocity=0 time=960
note_on channel=0 note=60 velocity=110 time=0
note_on channel=0 note=60 velocity=0 time=480
note_on channel=0 note=60 velocity=110 time=0
note_on channel=0 note=60 velocity=0 time=480
note_on channel=0 note=67 velocity=110 time=0
note_on channel=0 note=67 velocity=0 time=480
note_on channel=0 note=67 velocity=110 time=0
note_on channel=0 note=67 velocity=0 time=480
note_on channel=0 note=69 velocity=110 time=0
note_on channel=0 note=69 velocity=0 time=480
note_on channel=0 note=69 velocity=110 time=0
note_on channel=0 note=69 velocity=0 time=480
note_on channel=0 note=67 velocity=110 time=0
note_on channel=0 note=67 velocity=0 time=960
note_on channel=0 note=65 velocity=110 time=0
note_on channel=0 note=65 velocity=0 time=480
note_on channel=0 note=65 velocity=110 time=0
note_on channel=0 note=65 velocity=0 time=480
note_on channel=0 note=64 velocity=110 time=0
note_on channel=0 note=64 velocity=0 time=480
note_on channel=0 note=64 velocity=110 time=0
note_on channel=0 note=64 velocity=0 time=480
note_on channel=0 note=62 velocity=110 time=0
note_on channel=0 note=62 velocity=0 time=480
note_on channel=0 note=62 velocity=110 time=0
note_on channel=0 note=62 velocity=0 time=480
note_on channel=0 note=60 velocity=110 time=0
note_on channel=0 note=60 velocity=0 time=960
<meta message end_of_track time=0>
====================================================================================================

My question is: How can I divide them in 0.032 second chunk with the information (tempo, velocity) available? Should I gather more information from the file before I start labelling them?

Button label changes in the modal Confirm method

I have a requirement to change the Confirm popup button labels OK and Cancel to “Proceed” and “Return to Page”. Can someone show me how to do it; i can process when the user clicks on OK=true and Cancel=false; but I want to change the labels OK and Cancel to “Proceed” and “Return to Page”.
Thanks,
Leira

Save 50% on Reseller Plan| Free Migration, Support 24×7, White Label.

You must be aware that cPanel has recently raised pricing, the SECOND time, within year and your hosting provider must have raised fees for the renewals or with new purchase. If its true then its right time for switch, we at raisinghost have cheaper Linux reseller hosting rates and our pricing is extremely competitive, our support is amazing, and we simply want you to do well with our quality services.

So if you are looking at starting your web hosting venture without the hassle of system administration then we are here just for that, we are committed to handle all support requests and server administration tasks for clients right after getting requests from them.

Features offered with our best Linux reseller :

~ Max HDD – SSD Space
~ Max cPanel Accounts
~ Unlimited Addon Domains
~ Free Migration Service
~ Free SSL Certificates
~ Single Click Auto Installer
~ 30 Days money back guarantee
~ Instant Activation

You can try our below plans can be suitable for your needs :

*Economy-HR – $2.5/Month

~ 10 cPanel Accounts
~ 22GB Web Space
~ 220GB Bandwidth
~ FREE Data Migration
~ 99.99% uptime
~ Guaranteed Money Back

*Value-HR – $5/Month

~ 20 cPanel Accounts
~ 44GB Web Space
~ 440GB Bandwidth
~ FREE Data Migration
~ 99.99% uptime
~ Guaranteed Money Back

*Deluxe-HR – $8/Month

~ 30 cPanel Accounts
~ 65GB Web Space
~ 650GB Bandwidth
~ FREE Data Migration
~ 99.99% uptime
~ Guaranteed Money Back

*Ultimate-HR – $12/Month

~ 60 cPanel Accounts
~ 150GB Web Space
~ Unlimited Bandwidth
~ FREE Data Migration
~ 99.99% uptime
~ Guaranteed Money Back

https://www.raisinghost.com/cheap-linux-…osting.php

Thank you.

mobile – How to correctly align label to clarify information?

On the image below, that is NOT a button but juste a bubble to display information on a day planner, I’m trying to find the best way to align the labels 7h30mn today and 30h this week.

Currently, I aligned both labels to the right. Don’t you think the durations are not well aligned and so not enough visible ? I actually do and I’ve already tried to left align labels.

Can anyone help me to enhance the user experience by improving my two labels design ?

enter image description here

javascript – Get link title attribute and send it google analytics as custom label via google tag manager

I am trying to get all the hyperlink’s title attributes and send them to Google analytics as a custom label via Google tag manager. The client has 200+ hyperlinks to PDF documents and needs to track the downloads of these files.

This piece of code dynamically applies the title attribute to each link by extracting it from the filename of the PDF file:

jQuery( function () {
    function download_links() {
        jQuery( 'a' ).each( function () {
            var text = jQuery( this ).text();
            var title = jQuery( this ).attr( 'title' );
            if ( '-1' !== text.toLowerCase().indexOf( 'download' ) && 'undefined' === typeof title ) {
                var href = jQuery( this ).attr( 'href' );
                if ( href ) {
                    var filename = href.split( '/' ).pop();
                    jQuery( this ).attr( 'title', filename );
                }                   
            }
        } );
    }

    download_links();
    jQuery( window ).bind( 'grid:items:added', function () {
        download_links();
    } );
    

The second piece of code is where I am stuck as it needs to send the title as the event label, but doesn’t work. I don’t know why that is?

    jQuery( 'a' ).on( 'click', function () {
        if ( jQuery( this ).hasAttribute( 'title' ); ) {
            var title = jQuery( this ).attr( 'title' );
            gtag('event', 'my event', {
                'event_category' : 'download',
                'event_label' : title
            }); 
        }
    } );
    
} );

All of the above code is in the functions.php file in a doc ready function that runs the script in the page footer.

In Gmail auto remove label when email is opened

Good day,

I would like to create a “unread email” label to filter what has been unread vs read. I am successful in creating the filter; however the unread label sticks with the message indefinitely. Is there anyway to remove the “unread email” label once the email has been opened? This way, only unread email gets attention then automatically disappears once its been read.

Thanks in advance