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:

  • Work
  • Work

Vocal Works:

  • Work
  • Work


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?

Displaying many ROC-curves

I did a classification using Classify. I sampled 20 times. To calculate the mean accuracy, etc., is easy. But is there also a way to overlay the calculated ROC curves? If one uses Overlay the output is not really pretty

enter image description here

I think it would be nice the overlay the graphs with decreasing opacity, so that one could see the different curves. I tried with Opacity but could not get it to work.

How do you prevent HTML special character coding from displaying on a website?

An article in the Wall Street Journal (wsj.com) displays HTML special character code instead of the actual character, the greater-than sign. Thus, instead of displaying >, the article displays &gt;. This occurs (for me, at least) on Chrome, Firefox, and Safari (all latest versions with cache cleared).

My (limited) understanding is that websites should have the following code in the header:

<meta http-equiv="content-type" content="text/html;charset=utf-8" /> [α] 

The wsj.com site has this code in the header: <meta charset="UTF-8">. Is this the cause of the problem? In other words, if the WSJ site had <meta http-equiv="content-type" content="text/html;charset=utf-8" /> in the header, would we see > instead of &gt;?

The Wall Street Journal article is:

  • Stern, Joanna. "iOS 14 Review: Your iPhone Will Look Completely Different Now, if You Want." Wall Street Journal (16 September 2020).

The article is probably behind a firewall, so here is an image of the sentence as it appears in the article:

sentence in WSJ article displaying HTML special character code



α. Kyrnin, Jennifer. "How to Use Special Characters in HTML." Lifewire (20 February 2020).

My question is how to reset my bios if my laptop is not displaying anything [closed]

I am writing you this letter to tell you the problem about my laptop.

I have a cambio 2 in 1 laptop tablet (RCA).

Model: W1013 DK

The problem I have with my laptop tablet is that I messed with something in my bios and now my device is not displaying anything.

So I plugged my usb chord into the usb port in my device and connected the other end of the usb chord into my phone and my phone was receiving charge.

I looked up on the internet for methods to enter and reset my bios but they didn’t work. I’m not seeing anything displaying on my laptop please help.

             Your customer             Hackeem soleyn 

Woocommerce for Money Transfer Site – displaying target price after conversion

I want to set up a site for a money transfer service using Woocommerce. I created a product and used a plugin to allow the customer set the price (the amount to be sent). I need to display the value of the destination currency after conversion. I wish to set the exchange rate manually.

Any advice?

Is there a better way of displaying ‘Count’ of records beside other columns in a select query?

I have a table with below structure :

Test1(c_num  number ,c_first_name varchar2(50), c_last_name varchar2(50)) 

1)There is a normal index on c_num column.

2)The table has nearly 5 million records.

I have a procedure as you can see below. I want to display the Count(*) along with other columns.I want to know if there are better ways of doing this so that we can have better performance.

create or replace procedure get_members(o_result out sys_refcursor)    is begin  open o_result for   select c_num,          c_first_name,          c_last_name,          (select count(*) from test1) members_cnt -->Is there a better way instead of doing this?   from test1;  end; 

Thanks in advance

Custom Post Type / Taxonomy not displaying archive

I am trying to use the Atreas Theme: https://wordpress.org/themes/antreas/

This is the site I am working on: https://sandbox.paediatricphysiotherapyassociates.com/

All I want is an archive page for my Team Members to display them all in one spot. I tried adding: 'has_archive' => true' to the plugin php files directly “cpost-team.php” but I can’t for the life of me find the url for the archive page for Team Members. Either that or I’m missing something else. This is the direct code for this “Custom Posts” (aka Team Members) plugin:

<?php  //Define team post type add_action( 'init', 'cpo_cpost_team' ); function cpo_cpost_team() {    $  show_ui = false;    if ( defined( 'CPOTHEME_USE_TEAM' ) || cpo_get_option( 'display_team' ) ) {        $  show_ui = true;    }    $  labels = array(        'name'               => __( 'Team Members', 'cpo-companion' ),        'singular_name'      => __( 'Team Member', 'cpo-companion' ),        'add_new'            => __( 'Add Team Member', 'cpo-companion' ),        'add_new_item'       => __( 'Add New Team Member', 'cpo-companion' ),        'edit_item'          => __( 'Edit Team Member', 'cpo-companion' ),        'new_item'           => __( 'New Team Member', 'cpo-companion' ),        'view_item'          => __( 'View Team Member', 'cpo-companion' ),        'search_items'       => __( 'Search Team Members', 'cpo-companion' ),        'not_found'          => __( 'No team members found.', 'cpo-companion' ),        'not_found_in_trash' => __( 'No team members found in the trash.', 'cpo-companion' ),        'parent_item_colon'  => '',    );     $  member_slug = cpo_get_option( 'slug_team_member' );    if ( '' == $  member_slug ) {        $  member_slug = 'cpo_team';    }     $  fields = array(        'labels'              => $  labels,        'public'              => true,        'publicly_queryable'  => true,        'exclude_from_search' => true,        'show_ui'             => $  show_ui,        'query_var'           => true,        'rewrite'             => array( 'slug' => apply_filters( 'cpotheme_slug_team_member', $  member_slug ) ),        'capability_type'     => 'page',        'hierarchical'        => false,        'menu_icon'           => 'dashicons-universal-access',        'menu_position'       => null,        'supports'            => array( 'title', 'editor', 'excerpt', 'thumbnail', 'page-attributes' ),    );     register_post_type( 'cpo_team', $  fields );  }   //Define admin columns in team post type add_filter( 'manage_edit-cpo_team_columns', 'cpo_cpost_team_columns' ); if ( ! function_exists( 'cpo_cpost_team_columns' ) ) {    function cpo_cpost_team_columns( $  columns ) {        $  columns = array(            'cb'             => '<input type="checkbox" />',            'ctct-image'     => __( 'Image', 'cpo-companion' ),            'title'          => __( 'Title', 'cpo-companion' ),            'ctct-team-cats' => __( 'Groups', 'cpo-companion' ),            'date'           => __( 'Date', 'cpo-companion' ),            'author'         => __( 'Author', 'cpo-companion' ),        );        return $  columns;    } }  //Define team category taxonomy add_action( 'init', 'cpo_tax_teamcategory' ); if ( ! function_exists( 'cpo_tax_teamcategory' ) ) {    function cpo_tax_teamcategory() {        $  labels = array(            'name'               => __( 'Member Groups', 'cpo-companion' ),            'singular_name'      => __( 'Member Group', 'cpo-companion' ),            'add_new'            => __( 'New Member Group', 'cpo-companion' ),            'add_new_item'       => __( 'Add Member Group', 'cpo-companion' ),            'edit_item'          => __( 'Edit Member Group', 'cpo-companion' ),            'new_item'           => __( 'New Member Group', 'cpo-companion' ),            'view_item'          => __( 'View Member Group', 'cpo-companion' ),            'search_items'       => __( 'Search Member Groups', 'cpo-companion' ),            'not_found'          => __( 'No member groups were found.', 'cpo-companion' ),            'not_found_in_trash' => __( 'No member groups were found in the trash.', 'cpo-companion' ),            'parent_item_colon'  => '',        );         $  slug = cpo_get_option( 'slug_team_category' );        if ( '' == $  slug ) {            $  slug = 'team-group';        }        $  fields = array(            'labels'            => $  labels,            'public'            => true,            'show_ui'           => true,            'show_in_nav_menus' => true,            'show_tagcloud'     => false,            'rewrite'           => array( 'slug' => apply_filters( 'cpotheme_slug_team_category', $  slug ) ),            'hierarchical'      => true,        );         register_taxonomy( 'cpo_team_category', 'cpo_team', $  fields );    } } 

Also based on the code what should the url outcome be? I assumed it should be on: https://sandbox.paediatricphysiotherapyassociates.com/cpo_team/

Additionally my custom taxonomy for team members (groups) is not displaying posts that fall under the given group: https://sandbox.paediatricphysiotherapyassociates.com/?cpo_team_category=ba enter image description here

Sorry I’m not great with php. Thank you in advance!!

Python displaying images with url and arrow-Keys

I have written a Python console application which searches reddit for images. They should be then displayed. With arrow-keys the user should be able to go to the next or previous image. Moreover, I want to resize every image so it fits into a 800×800 frame.

I have already triend tkinter and opencv. Using tkinter I wasnt able to resize the images (dont know why) and using opencv worked.

So, the Input is an array of image-urls. Can someone recommend a library to me or share some code how to do that? Espacially the thing with the error-keys would be nice.

Accent marks/symbols not displaying correctly in MySQL database

Anytime there’s an accent mark (é or ‘) or symbol (&) in my database it displays as HTML code. The table CHARACTER SET is UTF-8 Unicode and the COLLATION is utf8mb4_general_ci, which should display those characters correctly. Any ideas why this is happening?

(MySQL version 5.7)

Current data

`company`| `firstname`| `lastname` ---------------------------------- A&amp;T  | Patrick    | O&#039;Brien 


`company`| `firstname`| `lastname` ---------------------------------- A&T      | Patrick    | O'Brien 

Thank you in advance!

Cobertura (Coverage Testing Tool) : Problem with executing .jar file and displaying the form?

I want to use cobertura for coverage testing. I followed the following link:

Cobertura Link

That link provides a EC-Cobertura.jar file through download. I think it creates a parameter for passing arguments to cobertura. I am trying to run EC-Cobertura.jar but its giving me error:

:~/cobertura$   ls -l EC-Cobertura.jar -rw-rw-r-- 1 zulfi zulfi 165174 Mar  8 17:53 EC-Cobertura.jar :~/cobertura$   java -jar EC-Cobertura.jar no main manifest attribute,in EC-Cobertura.jar 

Jar file error

:~/cobertura$   chmod a+rx EC-Cobertura.jar   :~/cobertura$    ./EC-Cobertura.jar   no main manifest attribute, in cobertura/EC-Cobertura.jar :~/cobertura$   

I have already downloaded the cobertura and its installed on my ubuntu 18.04.

:~$   whereis cobertura-instrument cobertura-instrument:  /usr/bin/cobertura-instrument  /usr/share/man/man1/cobertura-instrument.1.gz :~$   

And it has the same version as the tar file provides whose link is :

cobertura download link

provided in the link of the associated help button page:

:~$   cobertura-instrument -version   Cobertura 2.1.1 - GNU GPL License  (NO WARRANTY) - See COPYRIGHT file [INFO] Cobertura: Saved information  on 0 classes. [INFO] Cobertura: Saved information on 0 classes. :~$   

But the help file does not say anything about the jar file. I still don’t know how to execute the jar file and how to display the form shown on the link:

plugin link

Somebody please guide me how to display the form? What is the purpose of EC-Cobertura.jar in this connection.