Plotting a graph of a square root function does not show the expected graph

Use RealAbs instead of Abs since Abs is a Complex function.
And the Sqrt is also a Complex function, sometimes we use Surd instead of Sqrt or Power

if we assume x is a real numbers,we can use ComplexExpand to observe the expression of Abs(Sqrt(x - 1) + 5)

Abs(Sqrt(x - 1) + 5) // ComplexExpand

(*  Sqrt((5 + ((-1 + x)^2)^(1/4) Cos(1/2 Arg(-1 + x)))^2 + 
 Sqrt((-1 + x)^2) Sin(1/2 Arg(-1 + x))^2) *)

So we had to use another way.

Plot(RealAbs(Surd(x-1,2)+5),{x,-5,5},AxesOrigin -> {0, 0})

wp query – Create a page template for “top rated posts” but show full content and not just a list

Sorry upfront if I’m not explaining this clearly. I’m using WP-PostRatings and it has this function:

<?php if (function_exists('get_most_rated')): ?>
    <ul>
        <?php get_most_rated(); ?>
    </ul>
<?php endif; ?>

Throwing that code in a template page shows a linked list of the top posts by user ratings but it’s not showing the full content of each post which is what I want. I believe I need to tap into the loop or create a custom query for this function?

For example, I made a custom page template to show a list of all my posts but doing this with a plugin’s function is where I get lost. How do I wrap the following page template in with this get_most_rated(); function so it uses the WP-PostRatings function and displays the top rated post as full content?

<?php
  // set up or arguments for our custom query
  $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
  $query_args = array(
    'post_type' => 'post',
    'post_status'=>'publish',
    'posts_per_page' => 11,
    'paged' => $paged
  );
  // create a new instance of WP_Query
  $the_query = new WP_Query( $query_args );
?>

<?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); // run the loop ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('group post-standard'); ?>>
    <div class="post-inner">
        <div class="post-thumbnail">
            <a href="<?php the_permalink(); ?>">
                <?php if ( has_post_thumbnail() ): ?>
                    <?php hu_the_post_thumbnail('beatpost-thumb'); ?>
                <?php elseif ( hu_is_checked('placeholder') ): ?>
                    <img src="<?php echo get_template_directory_uri(); ?>/assets/front/img/thumb-standard.png" alt="<?php the_title(); ?>" />
                <?php endif; ?>
                <?php if ( has_post_format('video') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-play"></i></span>'; ?>
                <?php if ( has_post_format('audio') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-volume-up"></i></span>'; ?>
                <?php if ( is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-star"></i></span>'; ?>
            </a>
            <?php if ( comments_open() && ( hu_is_checked( 'comment-count' ) ) ): ?>
                <a class="post-comments" href="<?php comments_link(); ?>"><span><i class="fa fa-comments-o"></i><?php comments_number( '0', '1', '%' ); ?></span></a>
            <?php endif; ?>
        </div><!--/.post-thumbnail-->
        
        <div class="post-content">
        
            <h2 class="post-title entry-title">
                <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
            </h2><!--/.post-title-->
            
            <div class="beat-share"><span class="beat-social-button-fb"><a href="javascript:void(0);" onclick="PopupCenter('https://www.facebook.com/sharer.php?u=<?php the_permalink();?>&amp;t=<?php the_title(); ?>', 'myPop1',531,545);"><i class="fa fa-facebook"></i></a></span> <span class="beat-social-button-twit"><a href="javascript:void(0);" onclick="PopupCenter('https://twitter.com/share?text=<?php the_title();?>&gt;&gt; Buy and Download Hundreds of Rap Beats&amp;via=RockItPro&amp;hashtags=buyrapbeats&amp;url=<?php the_permalink();?>', 'myPop1',539,253);"><i class="fa fa-twitter"></i></a></span></div>
            
            <div class="entry excerpt"><?php the_content(); ?></div>
            
            <div class="post-meta group">
                <p class="post-byline" style="display:none;"><span class="vcard author"><span class="fn"><a href="https://www.rockitpro.com/author/Sho-Down/" title="Posts by Sho-Down" rel="author">Sho-Down</a></span></span></p><p class="post-category"><?php the_category(', '); ?></p><p class="post-date date updated published"><i class="fa fa-angle-double-right"></i><?php the_time('m/d/Y'); ?><span class="anglemobile"><i class="fa fa-angle-double-right"></i></span></p><p class="cat-posts"><a href="<?php comments_link(); ?>"><span><i class="fa fa-comments-o"></i> <?php comments_number( '0', '1', '%' ); ?><span class="comment-text"> Comments</span></span></a></p>
            </div><!--/.post-meta-->
        </div><!--/.post-content-->
    </div><!--/.post-inner-->
</article><!--/.post-->

<?php endwhile; ?>

<div id="navigation">
<?php $big = 999999999; // need an unlikely integer
echo paginate_links( array(
    'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
    'format' => '?paged=%#%',
    'current' => max( 1, get_query_var('paged') ),
    'mid_size' => 2,
    'end_size' => 1,
    'total' => $the_query->max_num_pages
) ); ?>
</div>

<?php else: ?>
  <article>
    <h1>Sorry...</h1>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
  </article>
<?php endif; ?>

    </div><!--/.hu-pad-->
</section><!--/.content-->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

How to show Btc and etc crypto price in my website

I have crypto web
But I dont like to use plugin or any complex sources …

Is possible to show BTC and other cryptocurrency price & charts in my wp site ?

By simple code … (No tradingveiw , coinchego & ….)

Thank you 🙏

❕NEWS – A leaked document show EU rules regarding crypto | Proxies123.com

As reported by Coindesk, the bill, called “Markets in Crypto-Assets” contains a set of rules for crypto regulation for all country member of the European Union. The leaked document shows that The European commission will treat crypto as any other financial assets. This will bring legality certainty in the region. The EU will issue the bill later this month.

Double validation – but only show second validation after 1st one is complete in Javascript

 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">

<div class="container mt-4">

    
    <hr>

    <h3>Form:</h3>
    <form id="form" class="mt-4 mb-4" action="/reports_send/21-TEMP-01a" method="POST">

        <div style="border: 1px solid black; padding: 40px; border-radius: 25px;">
            <div class="container mt-4">
                <div id="errors" class="mt-4"></div>
            </div>

            <h4>Select Room</h4>
            <div id="RoomSelect">
                <select id="RoomMenu" class="form-control mb-4"> 
                    {{!-- Drying Room 1 --}}
                    <option value="dry-1">Drying Room 1</option>
                    {{!-- Drying Room 2 --}}
                    <option value="dry-2">Drying Room 2</option>
                    {{!-- Dry Store--}}
                    <option value="dry-3">Dry Store</option>
                </select>
            </div>
            
            <div id="RoomInputs">

                {{!-- Drying Room 1 --}}
                <div class="form-group" id="dry-1">
                    {{!-- Title --}}
                    <h4>Drying Room 1</h4>

                    {{!-- All temperatures --}}
                    <div class="temperatures">
                     
                        <label>Temperature °C - <strong>Actual</strong></label>
                        <input type="number" class="form-control" name="actual-temp-1">

                      
                        <label>Temperature °C - <strong>Minimum</strong></label>
                        <input type="number" class="form-control" name="min-temp-1">

                    
                        <label>Temperature °C - <strong>Maximum</strong></label>
                        <input type="number" class="form-control" name="max-temp-1">
                    </div>
                    <br>
                    <br>
                    {{!-- All humidity --}}
                    <div class="humidity">
                         
                        <label>Relative Humidity - <strong>Actual</strong></label>
                        <input type="number" class="form-control" name="actual-humid-1">
                        
                        <label>Relative Humidity - <strong>Minimum</strong></label>
                        <input type="number" class="form-control" name="min-humid-1">
                         
                        <label>Relative Humidity - <strong>Maximum</strong></label>
                        <input type="number" class="form-control" name="max-humid-1">
                    </div>
                </div>


                {{!-- Drying Room 2 --}}
                <div class="form-group" id="dry-2">
                    {{!-- Title --}}
                    <h4>Drying Room 2</h4>

                    {{!-- All temperatures --}}
                    <div class="temperatures">
                       
                        <label>Temperature °C - <strong>Actual</strong></label>
                        <input type="number" class="form-control" name="actual-temp-2">

                       
                        <label>Temperature °C - <strong>Minimum</strong></label>
                        <input type="number" class="form-control" name="min-temp-2">

                       
                        <label>Temperature °C - <strong>Maximum</strong></label>
                        <input type="number" class="form-control" name="max-temp-2">
                    </div>
                    <br>
                    <br>
                    {{!-- All humidity --}}
                    <div class="humidity">
                         
                        <label>Relative Humidity - <strong>Actual</strong></label>
                        <input type="number" class="form-control" name="actual-humid-2">
                        
                        <label>Relative Humidity - <strong>Minimum</strong></label>
                        <input type="number" class="form-control" name="min-humid-2">
                         
                        <label>Relative Humidity - <strong>Maximum</strong></label>
                        <input type="number" class="form-control" name="max-humid-2">
                    </div>
                </div>

                {{!-- Dry Store --}}
                <div class="form-group" id="dry-3">
                    {{!-- Title --}}
                    <h4>Dry Store</h4>

                    {{!-- All temperatures --}}
                    <div class="temperatures">
                        
                        <label>Temperature °C - <strong>Actual</strong></label>
                        <input type="number" class="form-control" name="actual-temp-3">

                        
                        <label>Temperature °C - <strong>Minimum</strong></label>
                        <input type="number" class="form-control" name="min-temp-3">

                        
                        <label>Temperature °C - <strong>Maximum</strong></label>
                        <input type="number" class="form-control" name="max-temp-3">
                    </div>
                    <br>
                    <br>
                    {{!-- All humidity --}}
                    <div class="humidity">
                         
                        <label>Relative Humidity - <strong>Actual</strong></label>
                        <input type="number" class="form-control" name="actual-humid-3">
                         
                        <label>Relative Humidity - <strong>Minimum</strong></label>
                        <input type="number" class="form-control" name="min-humid-3">
                         
                        <label>Relative Humidity - <strong>Maximum</strong></label>
                        <input type="number" class="form-control" name="max-humid-3">
                    </div>
                </div>

                <button id="submit-btn" class="btn btn-primary">Submit</button>
            </div>
            
        </div>
    </form>

</div>


{{!-- Errors --}}

<div id="myModal" class="modal" tabindex="-1" role="dialog">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">Targets not met</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <p>Some temperatures or humidity values have not met their targets</p>
        <p>- Re-check or continue submitting current data.</p>
      </div>
      <div class="modal-footer">
        <button id="submit-email" type="button" class="btn btn-primary">Submit</button>
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>

<script>

// Store DOM Strings
var DOMStrings = {
    room_options: '#RoomMenu'
};

// On selected option, show specific div element
showActiveElement = () => {
    

    for(const option of document.querySelector(DOMStrings.room_options).options) {
        document.querySelector(`#${option.value}`).style.display = "none";
    }

    if(document.querySelector(DOMStrings.room_options).value === 'dry-1') {
        document.querySelector('#dry-1').style.display = "block";
    } else if (document.querySelector(DOMStrings.room_options).value === 'dry-2') {
        document.querySelector('#dry-2').style.display = "block";
    } else if (document.querySelector(DOMStrings.room_options).value === 'dry-3') {
        document.querySelector('#dry-3').style.display = "block";
    }

}



// Show selected div element from options
document.querySelector(DOMStrings.room_options).addEventListener('change', () => {
    showActiveElement();
});


// Validate data
document.getElementById("form").addEventListener("submit", (e) => {
        
    const inputs = document.querySelectorAll('#form input');
    
    let bool = true;
    for (var i = 0; i < inputs.length; i++) {
        
        if(inputs(i).value === "") {
            bool = false;
            e.preventDefault();
            inputs(i).style.borderColor = 'red';
            inputs(i).placeholder = "Required";
        } else {
            inputs(i).style.borderColor = '#fff';
        }
    }

    if(bool == true) {
        for (var i = 0; i < inputs.length; i++) {
            if(inputs(i).name.startsWith("actual-temp")) {
                validateActualTemp(inputs(i).value, inputs(i), e);
            }
        }
    }
    
    // Event listener activated after user submits the form
    inputs.forEach(function(item){
        item.addEventListener("input", (event) => {
            if(item.value === "") {
                e.preventDefault();
                item.style.borderColor = 'red';
                item.placeholder = "Required";
            } else {
                item.style.borderColor = '#fff';
            }
        });
    });
    
});


function validateActualTemp(value, item, e) {
    if(value === '10') {
        e.preventDefault();
        item.style.backgroundColor = 'red';
        $("#myModal").modal();
    }
}

document.getElementById('submit-email').addEventListener('click', () => {
    const form = document.getElementById('form');
    form.submit();
});


// On load
window.onload = () => {
    showActiveElement();
}


</script>

Why does Ahrefs show a different domain authority score than Moz?

Why does Ahrefs show a different domain authority score than Moz?
 

query – Oracle 11g, show running queries

I’ve a web application which submits some queries to Oracle 11g … Couldn’t do this in the web application itself.

Did you write the application?

  • If so, you should have written code in there to give yourself the opportunity to see/record the SQL before it goes to the database.
  • If not, then ask the supplier of the web application how to obtain this.

I want to know what are these queries

Why?
Do you think one of these queries is causing problems?

discrete mathematics – Without using Abduction, show that ¬φ ⊢ (¬ψ → φ) → ψ.

Thanks for contributing an answer to Mathematics Stack Exchange!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.

To learn more, see our tips on writing great answers.

powerpc – Hp pavilion dv6 wont show charging light

Please can someone help me figure out what could be the problem here. Someone brought HP Pavilion that won’t power on to me weeks ago. So when I took it to the lab I plug in a known working charger press the power button and it power on and everything working fine. But immediately I remove the charger And try to connect it back the led light keeps blinking very faint and the laptop won’t turn on. If I leave it for some times like an hour or so and connect the charger it will come on again but won’t come one after I remove the charger and try to connect back. I have try it with only battery and sometimes it will power on and later not power on. I have change the RTC battery yet still the same problem. enter image description here Any help will be appreciated. Thanks