custom post types – WP_Query doesn’t work properly in CPT-UI

I created my own template for a CPT.
A loop with the content of a certain post type is to be shown here.
Except for a couple of “little things”, it actually works.

However, there are a couple of errors that I have noticed that I cannot fix on my own.
1.) If I publish a normal post, it will also be shown in this listing, although a completely different Post_Type is actually being addressed here
2.) The posts_per_page does not work … If I enter “10”, for example, more will definitely be displayed here.

<?php 

$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;



// WP_Query arguments
$args = array (
    'post_type'         => '3d_drucker' ,
    'post_status'       => array( 'publish' ),
    'nopaging'               => false,
    'paged' => $paged, 
    'posts_per_page' => '10',
    'meta_query' => array(
        array(
            'key' => 'typ',
            'value' => 'Extrusion 3D-Drucker'
        ),
    )   
);
query_posts($args);

// The Query

$query = new WP_Query( $args );

// The Loop
if ( $query->have_posts() ) { ?>

Do you need all the code? Then I’ll make it available!
Homepage: https://dein-3d.com/3d_drucker/liste/

routing – How does openvpn’s redirect-gateway option work?

I have a simple openvpn setup with the client running with a redirect-gateway def1 option.

Here’s the resulting routing table (VPN_SERVER_IP is the public IP of the VPN server, local network is 192.168.127.0/24 and VPN LAN is 10.8.0.0/24):

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.8.0.49       128.0.0.0       UG    0      0        0 tun_tcpdec
0.0.0.0         192.168.127.1   0.0.0.0         UG    0      0        0 eth0
10.8.0.0        10.8.0.49       255.255.255.0   UG    0      0        0 tun_tcpdec
10.8.0.49       0.0.0.0         255.255.255.255 UH    0      0        0 tun_tcpdec
VPN_SERVER_IP   192.168.127.1   255.255.255.255 UGH   0      0        0 eth0
128.0.0.0       10.8.0.49       128.0.0.0       UG    0      0        0 tun_tcpdec
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
192.168.127.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0

It works and all the traffic is redirected to the VPN, but I don’t understand how.
Suppose I try to ping Cloudflare’s DNS at 1.1.1.1, shouldn’t the second rule just send the packets through the router (rule 2)?

visas – U.S. expat working for a U.S. employer: Do I need work authorization for the country I reside in?

I am a US citizen living in an EU country (Poland), and I’ve been living here for close to a year residing with a National D type visa. I have been offered a remote job at a US institution, but they are asking if I am authorized to work in Poland. Is this relevant to ask since I am not working with a Polish (or EU) based company? In other words, if I live abroad and want to work remotely for a job back home, do I need work authorization for the country I reside in?

Example Uses of Python Recursion in Professional Development Work

The phrase “real-world” examples is ambiguous so I left it out of the title. I want to know to what extent recursion is part of the daily toolkit of professional Python developers. Obviously this depends on context, but I want to get sense of the territory. I’m not interested in how it is used implicitly by libraries and in other “under the hood” ways. Instead I want to hear things like:

“Today I wrote a program which explicitly used recursion to handle {details of computational task} in order to solve {business goal which my program aims to further}.”

Thanks for any insight you can provide.

dnd 5e – How do the weapon properties Versatile and Finesse work together?

Versatile only changes the damage dice you use, and finesse only changes which ability modifier you can use.

Looking at the definitions of finesse and versatile we have:

Finesse: When Making an Attack with a finesse weapon, you use your choice of your Strength or Dexterity modifier for the Attack and Damage Rolls. You must use the same modifier for both rolls.

Versatile: This weapon can be used with one or two hands. A damage value in parentheses appears with the property—the damage when the weapon is used with two hands to make a melee Attack.

Nothing in the rules explicitly says that a weapon can’t have both properties, and in that case, the rules don’t contradict each other.

In effect, such a weapon would allow you to use it with two hands to change the type of damage dice you roll and also allow you to choose between Dexterity or Strength for your static to-hit and damage modifiers.

There is even an example of this kind of weapon in the 5e SRD: The Sun Blade

This item appears to be a longsword hilt. While grasping the hilt, you can use a bonus action to cause a blade of pure radiance to spring into existence, or make the blade disappear. While the blade exists, this magic longsword has the finesse property (emphasis mine)

Even though the Sun Blade is a rare magic item, it proves that the concept of a versatile, finesse weapon is both possible and intended.

Geting bundle product price by product id this code working without cron but in cron doesn’t work Magento2

This code work without cron, but in cron doesn’t work it’s returning Zero(0)
Also check cron is executing successfully.

$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$product = $objectManager->create('MagentoCatalogModelProduct')->load($product_id);
if ($product->getTypeId() == 'bundle') {
  $regularPrice = $product->getPriceInfo()->getPrice('regular_price')->getMinimalPrice()- 
>getValue();
  $specialPrice = $product->getPriceInfo()->getPrice('final_price')->getMinimalPrice()- 
>getValue();            
}

Here product_id is your product Id.

Why won’t my SanDisk memory card work on my iMac desktop. My operating system is mac OS Catalina. It works on my Mac Book Pro [closed]

Why won’t my SanDisk memory card work on my iMac desktop. My operating system is mac OS Catalina. It works on my Mac Book Pro.

I will do data entry work, PDF to word or excel for $2

I will do data entry work, PDF to word or excel

I am an individual Data Entry freelancer aiming towards providing quality services.
I will be your Virtual Assistant and provide you with any type of Data Entry, Data Mining, Web Research or Copy Paste services!!

I have worked for many websites and freelancing individuals and helped them with Administrative support.

During my tenure as a Data entry operator, I gained a firm grasp of the following:

  • Uploading products on e-commerce site

You can have complete faith in me and trust me with your work. I assure you one time delivery of work with a quality output.

.

java – document.getElementsByName didn’t work on second row. JSP

I have created a table using while loop in jsp. I need to change the background color of a column based on the status, so I use document.getElementsByName to get the value. The problem is, it only work on the column on first row, not the others.
Sorry for the ugly coding and logic, I am practically new in this.

JSP

while(resultSet.next() && resultSet2.next()){
                %>
                </tr>
            </thead>

            <tr>
                <td name="company" style="text-align: center; height:25px"><%=resultSet2.getString("company")%></td>
                <td name="client" style="text-align: center; height:25px"><%=resultSet2.getString("client")%></td>
                <td name="job_no" style="text-align: center; height:25px"><%=resultSet2.getString("job_no")%></td>
                <td name="job_description" style="text-align: center; height:25px"><%=resultSet2.getString("job_description")%></td>
                <td name="TIN_no" style="text-align: center; height:25px"><%=resultSet2.getString("TIN_no")%></td>
                <td name="amount_to_invoice" style="text-align: center; height:25px"><%=resultSet2.getString("amount_to_invoice")%></td>
                <td name="total_amount" style="text-align: center; height:25px"><%=resultSet2.getString("total_amount")%></td>
                <td name="date_received" style="text-align: center; height:25px"><%=resultSet.getString("date_received")%></td>
                <td name="invoice_no" style="text-align: center; height:25px"><%=resultSet.getString("invoice_no")%></td>
                <td name="date_submit" style="text-align: center; height:25px"><%=resultSet.getString("date_submit")%></td>
                <td name="submission" style="text-align: center; height:25px"><%=resultSet.getString("submission")%></td>
                <td name="ses_no_received" style="text-align: center; height:25px"><%=resultSet.getString("ses_no_received")%></td>
                <td name="term_of_payment" style="text-align: center; height:25px"><%=resultSet.getString("term_of_payment")%></td>
                

           <td name="payment_status" style="text-align:center; height:25px"><span name="payment_statuss" style="padding:5px; border-radius: 5px; font-weight: bold; color:white;"><%=resultSet.getString("payment_status")%></span></td>

                <td name="Date_received_payment" style="text-align: center; height:25px"><%=resultSet.getString("date_received_payment")%></td>
                <td name="note" style="text-align: center; height:25px"><%=resultSet.getString("note")%></td>
                <td style="text-align: center">
                    <a href="financeupdate.jsp?invoice_no=<%=resultSet.getString("invoice_no")%>" target="popup" 
                       onclick = "createPopupWin(this.href,'Finance Update', 1000, 560); return false"><i class='fas fa-edit'></i></a>

                    <a href="financedelete.jsp?invoice_no=<%=resultSet.getString("invoice_no")%>" id="btnd" class="btnd btn-danger" 
                       onclick="return confirm('Are you sure you want to delete?')"><i class='fas fa-trash-alt'></i></a>
                </td>
            </tr>

            <%
            i++;
                    }
            connection.close();
            }
            catch (Exception e) {
            }
            %>

Javascript

function f_color(){
            
        if (document.getElementsByName("payment_statuss")(0).innerText.trim() === 'SUBMITTED') {
        document.getElementsByName("payment_statuss")(0).style.background="#10f128";
        }
        else if (document.getElementsByName("payment_statuss")(0).innerText.trim() === 'WARNING') {
        document.getElementsByName("payment_statuss")(0).style.background="#ff8119";
        }
        else if (document.getElementsByName("payment_statuss")(0).innerText.trim() === 'OVERDUE') {
        document.getElementsByName("payment_statuss")(0).style.background="#ff0c0c";
        }
        
    }
    f_color();

I think the problem occur because I been using <%=resultSet.getString("payment_status")%>.

enter image description here

I have 0 experienced in jQuery and PHP. Hope you can help me. Thank you.

javascript – Change a column background color based on value. document.getElementsByName didn’t work on second row

I have created a table using while loop in jsp. I need to change the background color of a column based on the status, so I use document.getElementsByName to get the value. The problem is, it only work on the column on first row, not the others.
Sorry for the ugly coding and logic, I am practically new in this.

JSP

while(resultSet.next() && resultSet2.next()){
                %>
                </tr>
            </thead>

            <tr>
                <td name="company" style="text-align: center; height:25px"><%=resultSet2.getString("company")%></td>
                <td name="client" style="text-align: center; height:25px"><%=resultSet2.getString("client")%></td>
                <td name="job_no" style="text-align: center; height:25px"><%=resultSet2.getString("job_no")%></td>
                <td name="job_description" style="text-align: center; height:25px"><%=resultSet2.getString("job_description")%></td>
                <td name="TIN_no" style="text-align: center; height:25px"><%=resultSet2.getString("TIN_no")%></td>
                <td name="amount_to_invoice" style="text-align: center; height:25px"><%=resultSet2.getString("amount_to_invoice")%></td>
                <td name="total_amount" style="text-align: center; height:25px"><%=resultSet2.getString("total_amount")%></td>
                <td name="date_received" style="text-align: center; height:25px"><%=resultSet.getString("date_received")%></td>
                <td name="invoice_no" style="text-align: center; height:25px"><%=resultSet.getString("invoice_no")%></td>
                <td name="date_submit" style="text-align: center; height:25px"><%=resultSet.getString("date_submit")%></td>
                <td name="submission" style="text-align: center; height:25px"><%=resultSet.getString("submission")%></td>
                <td name="ses_no_received" style="text-align: center; height:25px"><%=resultSet.getString("ses_no_received")%></td>
                <td name="term_of_payment" style="text-align: center; height:25px"><%=resultSet.getString("term_of_payment")%></td>
                

           <td name="payment_status" style="text-align:center; height:25px"><span name="payment_statuss" style="padding:5px; border-radius: 5px; font-weight: bold; color:white;"><%=resultSet.getString("payment_status")%></span></td>

                <td name="Date_received_payment" style="text-align: center; height:25px"><%=resultSet.getString("date_received_payment")%></td>
                <td name="note" style="text-align: center; height:25px"><%=resultSet.getString("note")%></td>
                <td style="text-align: center">
                    <a href="financeupdate.jsp?invoice_no=<%=resultSet.getString("invoice_no")%>" target="popup" 
                       onclick = "createPopupWin(this.href,'Finance Update', 1000, 560); return false"><i class='fas fa-edit'></i></a>

                    <a href="financedelete.jsp?invoice_no=<%=resultSet.getString("invoice_no")%>" id="btnd" class="btnd btn-danger" 
                       onclick="return confirm('Are you sure you want to delete?')"><i class='fas fa-trash-alt'></i></a>
                </td>
            </tr>

            <%
            i++;
                    }
            connection.close();
            }
            catch (Exception e) {
            }
            %>

Javascript

function f_color(){
            
        if (document.getElementsByName("payment_statuss")(0).innerText.trim() === 'SUBMITTED') {
        document.getElementsByName("payment_statuss")(0).style.background="#10f128";
        }
        else if (document.getElementsByName("payment_statuss")(0).innerText.trim() === 'WARNING') {
        document.getElementsByName("payment_statuss")(0).style.background="#ff8119";
        }
        else if (document.getElementsByName("payment_statuss")(0).innerText.trim() === 'OVERDUE') {
        document.getElementsByName("payment_statuss")(0).style.background="#ff0c0c";
        }
        
    }
    f_color();

I think the problem occur because I been using <%=resultSet.getString("payment_status")%>.

enter image description here

Hope you can help me. Thank you.