javascript – Table values alignment on checkbox click

I have a table. In the last two columns I have a Checkboxes named PASS and FAIL. When I click the checkbox in the last column(FAIL) I have written my code in such a way that a new column(TOTAL) comes up in between the table columns.So my problem is the values in my table gets displaced in order. What I want is that

When the checkbox click in column name FAIL is done Values in the table should be in respective columns and the column name PASS should disappear in that particular row alone(Give a default value to the new column(TOTAL) which appears)

html

    <th>Name</th>
                <th>Behaviour</th>
                <div *ngIf="isshow">
                    <th>TOTAL</th>
                </div>
                <th>PASS</th>
                <th>FAIL</th>

sharepoint online – open another teaching bubble on click of heading in Teaching bubble

i have created two teaching bubble , now i want that if user click one of the heading of First Teaching bubble it will open another teaching bubble , below are my teaching bubble code.

            import * as React from 'react';
            import { DefaultButton, IButtonProps } from 'office-ui-fabric-react/lib/Button';
            import { ITravelBriefProps } from './ITravelBriefProps';
            import { TeachingBubble } from 'office-ui-fabric-react/lib/TeachingBubble';
            import { useBoolean } from '@uifabric/react-hooks'; 
            import styles from './TravelBrief.module.scss';
            import {
              getTheme,
              mergeStyleSets, 
              FontWeights,
              ContextualMenu,
              Toggle,
              //DefaultButton,
              Modal,
              IDragOptions,
              IconButton,
              IIconProps,ITeachingBubbleProps, shouldWrapFocus
            } from 'office-ui-fabric-react';
            import { readyException } from 'jquery';
            import { TeachingBubbleBasicNext } from './Teaching copy';
            const iconButtonStyles = {
              alignItems: 'normal',
              root: {
                color: '#dd1d21',
                marginLeft: 'auto',
                marginTop: '2px',
                marginRight: '2px',
                
                
              },
              rootHovered: {
                color: '#dd1d21',
              },
            };

            const ArrowIcon: IIconProps = {  iconName: 'OfficeChat' };




            function show()

            {


            }

            const examplePrimaryButtonProps: IButtonProps = {
              
              children: 'Yes',
              onClick: function () {
                window.open("")
            }

            }

            const constheadline :ITeachingBubbleProps={

             headline:""

            }

            export const TeachingBubbleBasicExample: React.FunctionComponent = () =>{
              const (teachingBubbleVisible, { toggle: toggleTeachingBubbleVisible }) = useBoolean(false);
              
             

              const exampleSecondaryButtonProps: IButtonProps = React.useMemo(
                () => ({
                  children: 'Maybe later',
                  onClick: toggleTeachingBubbleVisible
                  
                }),
                (toggleTeachingBubbleVisible),
                   
              );

               return (
                <div>
                  <div> <IconButton
                        styles={iconButtonStyles}
                        iconProps={ArrowIcon}
                        ariaLabel="Close popup modal"
                        onClick={toggleTeachingBubbleVisible}
                        id="targetButton"
                    text={teachingBubbleVisible ? 'Hide TeachingBubble' : 'Show TeachingBubble'}
                      />  <label className={styles.label} onClick={toggleTeachingBubbleVisible} ></label> 
            </div>
            {/*       <DefaultButton
                    id="targetButton"
                    onClick={toggleTeachingBubbleVisible}
                    text={teachingBubbleVisible ? 'Hide TeachingBubble' : 'Show TeachingBubble'}
                  /> */}

                  {teachingBubbleVisible && (
                      
                    <TeachingBubble
                      target="#targetButton"
                      // primaryButtonProps={examplePrimaryButtonProps}
                      // secondaryButtonProps={exampleSecondaryButtonProps}
                      onDismiss={toggleTeachingBubbleVisible}
                      
                    >
                   <ul>
                  <li className={styles.label}>  <a href="#" >get more info</a>. </li>

              </ul>

              

                    </TeachingBubble>

                    

                  )}

                </div>
              );
            };

second teaching bubble which should open on click of get more info

            import * as React from 'react';
            import { DefaultButton, IButtonProps } from 'office-ui-fabric-react/lib/Button';
            import { ITravelBriefProps } from './ITravelBriefProps';
            import { TeachingBubble } from 'office-ui-fabric-react/lib/TeachingBubble';
            import { useBoolean } from '@uifabric/react-hooks';
            import styles from './TravelBrief.module.scss';
            import {
              getTheme,
              mergeStyleSets, 
              FontWeights,
              ContextualMenu,
              Toggle,
              //DefaultButton,
              Modal,
              IDragOptions,
              IconButton,
              IIconProps,ITeachingBubbleProps
            } from 'office-ui-fabric-react';
            import { PropertyPaneSlider } from '@microsoft/sp-property-pane';
            const iconButtonStyles = {
              alignItems: 'normal',
              root: {
                color: '#dd1d21',
                marginLeft: 'auto',
                marginTop: '2px',
                marginRight: '2px',
                
                
              },
              rootHovered: {
                color: '#dd1d21',
              },
            };

            const ArrowIcon: IIconProps = {  iconName: 'OfficeChat' };

            interface ModernProps {
              pdata: number;
              }



            const examplePrimaryButtonProps: IButtonProps = {
              
              children: 'Yes',
              onClick: function () {
                location.href = "" 
            }

            }



            export const TeachingBubbleBasicNext: React.FunctionComponent <{country:any,rating:any}>= (country,rating)=> {
              const (teachingBubbleVisibleNext, { toggle: toggleteachingBubbleVisibleNext }) = useBoolean(false);


              const exampleSecondaryButtonProps: IButtonProps = React.useMemo(
                () => ({
                  children: 'Maybe later',
                  onClick: toggleteachingBubbleVisibleNext,
                  test:""
                  
                }),
                (toggleteachingBubbleVisibleNext),
                   
              );


               return (
                <div className={styles.TeachingbubblePositing}>
                  <div> <IconButton
                        styles={iconButtonStyles}
                        iconProps={ArrowIcon}
                        ariaLabel="Close popup modal"
                        onClick={toggleteachingBubbleVisibleNext}
                        id="targetButtonNext"
                    text={teachingBubbleVisibleNext ? 'Hide TeachingBubble' : 'Show TeachingBubble'}
                      />  <label className={styles.label} onClick={toggleteachingBubbleVisibleNext} ></label> 
            </div>
            {/*       <DefaultButton
                    id="targetButton"
                    onClick={toggleteachingBubbleVisibleNext}
                    text={teachingBubbleVisibleNext ? 'Hide TeachingBubble' : 'Show TeachingBubble'}
                  /> */}

                  {teachingBubbleVisibleNext && (
                      
                    <TeachingBubble
                      target="#targetButtonNext"
                      // primaryButtonProps={examplePrimaryButtonProps}
                      // secondaryButtonProps={exampleSecondaryButtonProps}
                      onDismiss={toggleteachingBubbleVisibleNext}
                      
                    >
                   <ul>
                   <li className={styles.label}>some text goes here </li>
                  
             </ul>


              

                    </TeachingBubble>

                    

                  )}

                </div>
              );
                  
                
                
            };

Earning up to $ 200 per day with mobile, click on the link

https://paidera.com/?r=1671389

c# – Difference between methods – onClick.AddListener and On Click under UI button inspector?

Within my Unity Project in my code, (see below), I have a button called Check which executes when CheckPress() function is called. I read two approaches by which this can be done.

Appraoch 1: Using Check.onClick.AddListener(CheckPress); and then attaching script to Canvas. When I press run and click the Check button, this works.

Approach 2: The other approach I read is that, I can attach my script to Canvas. From there I select the button Check from hierarchy, then under inspector I see On Click(), I click + sign and then drag the Canvas and place it in Object (see the attached image), then under No Function I select the CheckButtonBehaviour Script and select the CheckPress(). When I press run and click the Check button, this also works as intended.

I wanted to know if these two approaches are same or different. If they are different, then in which context either approach should be implemented.

using System.Collections.Generic;
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
using System.IO;
using System.Threading;
using UnityEditor;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System;
using System.Linq;


public class CheckButtonBehaviour : MonoBehaviour
{

public Button Check;
public Button Play;
public Button NextSignal;

public List<string> signals = new List<string> {"Speech1", "Speech2", "Speech3", "Speech4"};
public List<string> shuffledSignals = new List<string>();
public int index = 1;
public int counter = 3;


private static int localPort;
private string IP;  
public int port = 8050;
IPEndPoint remoteEndPoint;
UdpClient client;


void Start()
{
    
    var rndr = new System.Random();
    shuffledSignals = signals.OrderBy(i => rndr.Next()).ToList();

    IP = "127.0.0.1";
    port = 8050;
    remoteEndPoint = new IPEndPoint(IPAddress.Parse(IP), port);
    client = new UdpClient();
    Play.gameObject.SetActive(false);
    NextSignal.gameObject.SetActive(false);

    Check.onClick.AddListener(CheckPress);

}

public void CheckPress()    
{
    

    byte() data0 = Encoding.ASCII.GetBytes("starting"); ///OLD CODE part
    client.Send(data0, data0.Length, remoteEndPoint);
    Debug.Log("<color=blue>Something is sent to MAX</color> : starting");

    Check.gameObject.SetActive(true);
    Check.interactable = false;
    Check.enabled = false;

    Play.gameObject.SetActive(true);
    NextSignal.gameObject.SetActive(true);

   
}

I want to send any file that I right click and select ‘Sendto’ via email using Windows 10

Every time that I right click on any file that I wish to ‘SendTo’ by mail, Windows 10 tells me that there is no associated app with this way of sending a file. I have to either copy the file to the clipboard and open my email app (Which is Windows 10 default email app) then go back to the folder, select the file, attach and then click send. I had this problem years ago when using Win95, XP and again in Windows 7. I’ve tried opening the Default Apps in Win10 but it’s already assigned. IDK

custom taxonomy – Displaying all posts by category and showing content on click

I am building a WordPress site for a composer who has written over 200 pieces of music. Each is a custom post (work), organised by a hierarchical custom taxonomy/category (type – being orchestral, vocal, etc).

I need to build a catalogue page in which all works are displayed in lists by type:

Orchestral Works:

Vocal Works:

etc.

The user can add categories to the list, so I can’t simply write a query for each category. The catalogue page needs to check the list dynamically.

So far so good. This can be achieved – and sorted the way I need – like this:

<?php
    $cat_terms = get_terms(
        array('type'),
            array(
            'hide_empty' => true,
            'orderby' => 'name',
            'order' => 'ASC',
            'number' => 9999 
            )
        );
    if( $cat_terms ) :
    foreach( $cat_terms as $term ) :
    echo '<h5>'. $term->name .'</h5>';
?>

<?php $args = array(
    'post_type' => 'work',
    'posts_per_page' => 9999, // Assuming no-one is this prolific
    'post_status' => 'publish',
    'tax_query' => array(
        array(
            'taxonomy' => 'type',
            'field' => 'slug',
            'terms' => $term->slug,
        ),
    ),
    'ignore_sticky_posts' => true,
    'meta_key' => 'date',
    'orderby' => 'meta_value',
    'order' => 'DESC'
);
    $_works = new WP_Query( $args );
        if( $_works->have_posts() ) :
            echo '<table>';
                while( $_works->have_posts() ) : $_works->the_post(); ?>
                    <tr>
                        <td><?php the_field('date'); ?><td><?php the_title(); ?></td>
                    </tr>
                <?php endwhile;
            echo '</table>';
        endif;
    wp_reset_postdata();
    endforeach;
    endif;
?>

I then need to be able to display the content of the CPT (a small amount of data in a few custom fields) in another div in the same page (and not link out to a single-work.php template as would be more usual). This would be like a tabbed content effect – one posts’ content displayed at a time, chosen from the category-based list on the page.

enter image description here

I could create this second part by loading everything and toggling visibility via jQuery but that would mean loading 200+ posts with the page and making them invisible, which strikes me as a terrible idea.

Is it possible to fetch/load the content of the selected post dynamically on click, so only the posts required are queried beyond the initial list? How would this be handled, and where would I begin with it?

unity – How can I manipulate a layer with click and drag functionality?

This works well on clicking layers but not click and dragging layers.

public class FishClicker : MonoBehaviour {

public LayerMask whatIsFish;

public float clickRadius = 0.1f;

void Update() {

    if (Input.GetMouseButtonDown(0)) {
        var mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
        var hit = Physics2D.OverlapCircle(mousePos, clickRadius, whatIsFish);

        if (hit != null) {
            var fish = hit.GetComponentInParent<Fish>();

            if (fish != null) { fish.DoClickThing(); }
        }
    }
} 

}

for DoClickThing(); this works

public void ControlFishClick()
{
    screenPos = myCam.WorldToScreenPoint(transform.position);
    Vector3 v3 = Input.mousePosition - screenPos;
    angleOffset = (Mathf.Atan2(transform.right.y, transform.right.x) - Mathf.Atan2(v3.y, v3.x)) * Mathf.Rad2Deg;

}

for DoDragThing() i want this to work

public void ControlFishDrag()
{
    stopMovement = true;
    rigid2D.velocity = new Vector2(0, 0);
    Vector3 v3 = Input.mousePosition - screenPos;
    float angle = Mathf.Atan2(v3.y, v3.x) * Mathf.Rad2Deg;
    transform.eulerAngles = new Vector3(0, 0, angle + angleOffset);
    //print(stopMovement);
}

for DoReleaseClick() i want this

public void ControlFishUp()
{
    stopMovement = false;
    SnapToPosition();
}

macos – How do I disable automatic Text/Word selection on click?

When I click or right click on text/a url in Google Chrome, it selects the word.

For example, if I want to copy a URL to clipboard, I have to now open the URL in a new tab, select the URL at the top and copy – instead of just right click -> copy url

When I right click on a link, the current behaviour is that the word under the cursor is selected and I get an option to ‘look up word X’ instead of the desired behaviour, a contextual menu.

I’ve looked far and wide across forums and this StackExchange, to no avail. I cannot Right Click -> Open in New Tab on Mac.
(I’m aware of the CMD+Click to open in a new tab but this is still so awkward compared to the standard menu)

How do I disable this behaviour?

Is this a Catalina issue or just a Mac thing?

macos – Mac OS, mouse right click intermittently stops working

I am using Mac OS X 10.15.4, and intermittently my mouse right click starts behaving like a mouse left click; i.e. no matter how I configure my mouse, I cannot get the right click (secondary button) behaviour. It is an Apple USB non-cordless mouse; the Mac came with a cordless mouse but that died.

It usually comes good after unplugging and replugging the mouse from the USB port, a few times.

It is possibly a hardware issue, but if it is, why does right-clicking do anything at all?

Probably the only “uncommon” way I use my Mac is I leave the emacs editor constantly running; emacs is a huge program and I guess there is a chance it is doing something strange.

Is this a known issue? Or does it sound like a hardware issue?

virtual reality – Collider inside collider in MRTK VR: Move the brain via controller while being able to click the spheres

I faced a similar issue in 3d unity,
Collider inside another collider: Move the brain via mouse while being able the click the spheres

There is a box collider on the brain and individual sphere colliders on the spheres.

One of the suggestions was setting up a layer mask with the mouse, which worked surprisingly well. Now I would like to be able to accomplish the same in MRTK with Windows Mixed Reality Controllers. I need to know how to set up a similar layer mask for the pointers in MRTK so that clicks are only registered on the spheres but the brain can be rotated by click and drag.

enter image description here