Javascript – How can I cut the code if the user says "No" in my confirmation?

I want everything that comes later in my code to run just in case the user confirms it. If I say no, I want it to be cut off.

var avanzar = confirm("Esta seguro que desea avanzar?");
    var hachedos = document.querySelector("h2")

if (avanzar==true) {
  hachedos.innerHTML = "Qué alegría que das con tu visita por este maravilloso sitio!!!"

} else {
  hachedos.innerHTML = "Lamentamos que no quieras continuar tu visita por este maravilloso sitio"
};

This is what I do not want to do if we set "no". But what if you run in the case of "yes"

var nombre = prompt("Ingrese su nombre");

var hacheuno = document.querySelector("h1");

hacheuno.innerHTML = "Bienvenido " + nombre;

var edad = prompt("Indique su edad");

if (edad<18) {

  var containerGen = document.querySelector(".container-general") ;
    containerGen.style.display = "none";

  var containerOc = document.querySelector(".contenido-bloqueado");
    containerOc.style.display = "initial"
} ;

python code returns an eigenvalue of 0, but should not

The code I write is for the Jacobi method of approximating eigenvalues. I still get eigenvalues ​​of 0 for a matrix of arbitrary size, although I do not get eigenvalues ​​of 0 by hand. I think my code puts my matrix A back somewhere on all zeros.

import numpy
from numpy import *
from math import *
from matplotlib import pyplot as plt
powermethodnorm = ()

def check_symmetric(A, rtol=1e-09, atol=1e-20):
    return numpy.allclose(A, A.T, rtol=rtol, atol=atol)

def Eigenvalue_Jacobi_Method(A, tol=1.0e-15):

    def Maximum_Element(A):
        n = len(A)
        Maximum_A = 0.0
        for i in range(n - 1):
            for j in range(i + 1, n):
                if abs(A(i, j)) >= Maximum_A:
                    Maximum_A = abs(A(i, j))
                    k = i
                    l = j
        return Maximum_A, k, l

    def rotate(A, p, k, l):
        n = len(A)
        Difference_A = A(l, l) - A(k, k)
        if abs(A(k, l)) < abs(Difference_A) * 1.0e-36:
            t = a(k, l) / Difference_A
        else:
            q = Difference_A / (2 * A(k, l))
            t = 1 / (abs(q) + sqrt(q ** 2 + 1))
            if q < 0: t = -t
        c = 1 / sqrt(t ** 2 + 1)
        s = t * c
        w = s / (1 + c)
        r = A(k, l)
        A(k, l) = 0
        A(k, k) = A(k, k) - t * r
        A(l, l) = A(l, l) + t * r
        for i in range(k):
            r = A(i, k)
            A(i, k) = r - s * (A(i, l) + w * r)
            A(i, l) = A(i, l) + s * (r - w * A(i, l))
        for i in range(k + 1, l):
            r = A(k, i)
            A(k, i) = r - s * (A(i, l) + w * A(k, i))
            A(i, l) = A(i, l) + s * (r - w * A(i, l))
        for i in range(l + 1, n):
            r = A(k, i)
            A(k, i) = r - s * (A(l, i) + w * r)
            A(l, i) = A(l, i) + s * (r - w * A(l, i))
        for i in range(n):
            r = P(i, k)
            P(i, k) = r - s * (P(i, l) + w * P(i, k))
            P(i, l) = P(i, l) + s * (r - w * P(i, l))

    n = len(A)
    Maximum_Rotations = 5 * (n**2)
    P = identity(n) * 1
    for i in range(Maximum_Rotations):
        Maximum_A, k, l = Maximum_Element(A)
        if Maximum_A < tol: return diagonal(A), P
        rotate(A, P, k, l)
    print('Jacobi method did not converge')

it = int(input("What is the maximum amount of iterations(For Power Method): "))
n = int(input("Enter the matrix size: "))

A = numpy.zeros((n, n))

for i in range(n):
    A(i) = input().split(" ")

MatrixA = numpy.array(A)
print("A= ")
print(A)
for i in range(A.shape(0)):
    row = ("{}*x{}".format(A(i, j), j + 1) for j in range(A.shape(1)))

z, x = Eigenvalue_Jacobi_Method(A, tol=1.0e-15)
print("----Jacobi Method----")

print("Eigenvalues= ", z)

As an example, the 2 by 2 matrix of

(1,2) / (2,3) should lead to eigenvalues ​​of -.23607 and 4.23607

How do I construct a tree with the code of the root tree?

The question is, if we get a binary code, how to create a tree with this code. There was a question like this:

Reconstruct this tree with the code 000101001111 of the pedigree.

and the full answer: reply

The problem is that I could not understand the answer. Could you please guide me or clarify the problem or introduce some refs? (because I could not find one)

Any help is greatly appreciated.

c ++ – Print-based Debugging – Code Review Stack Exchange

#include 

const bool DEBUG = false;

template 
void debug(Args ... args);

template 
void _debug(Args ... args) {
    std::cout << "(" << __FILE__ << ":" << __LINE__ << ") ";
    (std::cout << ... << args) << std::endl;
}

#define debug(args...) if (DEBUG) _debug(args);

Suppose you run ACM or you are in a location without a well-designed development environment. They wrote code and wondered what went wrong.

The goal is to identify the cause of the problem as quickly as possible by placing tracking prints and turning them all off together by preventing code generation for them. So you can submit your code with DEBUG = false and it will not cause any performance issues caused by calls debug(...),

Performance Tuning – Does the code in Mathematica run faster when the same code is written in C or FORTRAN?

I am just curious. My friend has just told me that Mathematica is primarily for symbolic calculations and is not suitable for numerical calculations. He said that's why most people do not use Mathematica for CFD and other numerically intensive code.

I just started Mathematica (I do not know C and Fortran). I assumed that Mathematica should have all the problems C and Fortron could have compared to C and FORTRAN, and since Mathematica has many built-in functions, it should run faster than C and Fortran. Why is not that the case? Is there a case where Mathematica's code is faster than C and Fortran?

Functions – Horizontal divider Between each post … Please edit my code

As below picture …..
Enter image description here

Here is my code

& # 39; # 39 ;, & block1_widget
& # 39; description & # 39; => esc_html __ ("Block Posts Widget, Best for Home Content Top & Home Content Bottom Sidebar.", & # 39; glob & # 39;)
);
parent :: __ construct (& # 39; glob_block_1_widget & # 39 ;, esc_html __ (& # 39; FT Block 1 & # 39 ;, glob & # 39; $ widget_ops);
$ this-> alt_option_name = & # 39; widget_block1 & # 39 ;;
}
/ **
* @param array $ args
* @param array $ instance
* /
public function widget ($ args, $ instance) {
// Get values ​​from widget settings.
$ title = apply_filters (& # 39; widget_title & # 39 ;, empty ($ instance (& 39; title & # 39;))? & # 39 ;: $ instance (& # 39; title & # 39; ), $ instance, $ this-> id_base);
$ block_category = (! empty ($ instance (& # 39; block_category & # 39;)))? $ instance (& # 39; block_category & # 39;): & # 39; & # 39 ;;
$ ignore_sticky = isset ($ instance (& ignore_sticky & # 39;))? $ instance (# ignore_sticky): 1;
$ orderby = (! empty ($ instance (& # 39; orderby & # 39;)))? $ instance ("orderby"): & # 39; date & # 39 ;;
$ order = (! empty ($ instance (& 39; order & # 39;)))? $ instance (& 39;): & # 39; DESC & # 39 ;;
$ number_posts = (! empty ($ instance (& # 39; number_posts & # 39;)))? Absint ($ instance (#number_posts)): 7;
if (! $ number_posts) {
$ number_posts = 7;
}
$ custom_query_args = array (
& # 39; # 39 & post_type; => & # 39; post & # 39 ;,
& # 39; # 39 & posts_per_page; => $ number_posts,
& # 39; # 39 & post_status; => & # 39; publish & # 39 ;,
& # 39; # 39 & ignore_sticky_posts; => $ ignore_sticky,
& # 39; # 39 & category__in; => $ block_category,
& # 39; order & # 39; => $ order,
& # 39; # 39 & orderby; => $ orderby,
);
$ custom_query = new WP_Query (apply_filters (& # 39; widget_block_1_posts_args & # 39 ;, $ custom_query_args));
if ($ custom_query-> have_posts ()) {
$ n = count ($ custom_query-> posts);
$ count = 0;
echo $ args (& # 39; before_widget & # 39;);
$ widget_title = glob_setup_widget_cat_title ($ block_category, $ title);
if ($ widget_title) {
?>

& # 39 ;. $ widget_title (& # 39; title & # 39;). & # 39; & # 39 ;;
} else {
?>
">

have_posts ()) {
$ custom_query-> the_post ();
$ count ++;
if ($ count == 1) {
?>

>

"title =" ">

& # 39;, & # 39; & # 39); ?>

>

"title =" ">

& # 39;, & # 39; & # 39); ?>

& # 39; & # 39 ;,
& # 39; # 39 & block_category; => & # 39 ;,
& # 39; # 39 & ignore_sticky; => 1,
& # 39; # 39 & number_posts; => 7,
& # 39; order & # 39; => & # 39; DESC & # 39 ;,
& # 39; # 39 & orderby; => & # 39; date & # 39;
));
$ instance (title title)) = sanitize_text_field ($ new_instance (& title #));
$ instance (# ignore_sticky) = isset ($ new_instance (# ignore_sticky #)) && $ new_instance (# ignore_sticky #)? 1: 0;
$ instance (& # 39; block_category & # 39;) = isset ($ new_instance (& # 39; block_category & # 39;))? absint ($ new_instance (& # 39; block_category & # 39;)): & # 39; & # 39 ;;
$ instance (& # 39; number_posts & # 39;) = absint ($ new_instance (& # 39; number_posts & # 39;));
$ instance (orderorder #) = sanitize_text_field ($ new_instance (orderorder #));
$ instance (order orderby #) = sanitize_text_field ($ new_instance (orderorderby #));
return $ instance;
}
/ **
* @param array $ instance
* /
Form of public function ($ instance) {
// set the default value.
$ defaults = array (
& # 39; title & # 39; => & # 39 ;,
& # 39; # 39 & block_category; => & # 39 ;,
& # 39; # 39 & ignore_sticky; => 1,
& # 39; # 39 & number_posts; => 7,
& # 39; order & # 39; => & # 39; DESC & # 39 ;,
& # 39; # 39 & orderby; => & # 39; date & # 39;
);
$ instance = wp_parse_args ((array) $ instance, $ defaults);
$ block_category = $ instance (& # 39; block_category & # 39;);
$ list_categories = get_categories ();
$ order = array (& # 39; ASC & # 39 ;, & # 39; DESC & # 39;);
$ orderby = array (& # 39; date & # 39 ;, & # 39; comment_count & # 39 ;, & 39; rand & # 39;);
?>

get_field_id (& # 39; title & # 39;); ?> ">
get_field_id (& # 39; title & # 39;); ?> "name =" get_field_name (& # 39; title & # 39;); ?> "value =" “/>

get_field_id (& # 39; block_category & # 39;); ?> ">
get_field_name ('block_category');?> 'id =' get_field_id ('block_category');?> ">
>

term_id); ?> "term_id); >> name." (". $ category-> count.") ";?>

get_field_id (#number_posts); ?> ">
get_field_id (#number_posts); ?> "name =" get_field_name (# number_posts); ?> "value =" “/>

get_field_id (# ignore_sticky #); ?> "name =" get_field_name (# ignore_sticky #); ?> "type =" checkbox "value =" 1 “/>
get_field_id (# ignore_sticky #); ?> ">

get_field_id (& # 39; order & # 39;); ?> ">
get_field_name (? order?);?> id = "get_field_id (? order?);?>">

">

get_field_id (order orderby #); ?> ">
get_field_name (order orderby #);?> "id =" get_field_id (order orderby #);?> ">

">

ddos – Possibility of illegal content using Web Assembly code or any website program

I recently discovered a website, lifeinspace.org, which is said to lease our computing power to perform scientific calculations, but I suspect that they are mining Bitcoin or illegal content (such as DDoS, malware, botnets, etc .). .) because I could not find lifeinspace.org anywhere in google / research news / articles.

I tested this service and actually received a payment. Of course, I have determined that this is a loss due to power / CPU / internet / bandwidth. However, I wanted to know the legality of the tasks performed by this service in the background.

I found out from the forum that a .wasm code is downloaded when we run the tool – and this lifeinspace.org/main.wasm file is downloaded to the computer.
(Https://money.stackexchange.com/questions/115754/lease-computing-power-to-earn-money-lifeinspace-org)

But I'm not sure how to decode it and the details in this code.

To know if it is illegal to perform calculations (or code execution), I have used several tools: netmon, procmon (Process Monitor), Netlimiter, Kaspersky Free Scanner Online for botnets, etc., but I could not trace it Find.

Any guide to tracking or verifying the legality of this file (main.wasm) would be helpful.

Android, Hichart, how to display the percentage over the pie chart? Please take a look at my code

HIPlotOptions plotOptions = new HIPlotOptions ();

plotOptions.setPie (new HIPie ());

plotOptions.getPie (). setAllowPointSelect (true); // to cut the circle
quard

plotOptions.getPie (). setCursor ("pointer");

plotOptions.getPie (). setDataLabels (new HIDataLabels ());

plotOptions.getPie (). getDataLabels (). setEnabled (true);

plotOptions.getPie (). getDataLabels (). setFormat ("{point.percentage: .1f}
%
");

// Here I was added to display the 5 at the top of the pie chart
plotOptions.getPie (). getDataLabels (). setStyle (new HICSSObject ());

plotOptions.getPie (). getDataLabels (). getStyle (). setColor ("black");

plotOptions.getPie (). setShowInLegend (true);

options.setPlotOptions (plotOptions);enter preformatted text here

[APP][FREE] Passport photo code UK

Download the best Passport Photo Code UK App!

With this new solution, stalls and stores in the UK can give their customers a photo code with their printed passport photos.

When customers apply online, they can use this code to retrieve their digital passport photo taken at a booth or by a photographer.

Passport Photo Code UK includes premium features like removing the background and saving ink and money for the purchase in the app. Purchases will be refunded if they do not work on your device. Save time and money with the Passport Photo Code UK Editor.

A very useful application to have the digital code of my passport photo. Easy to use and very fast service from the team. Get digital code in no time and accept it perfectly. That's definitely worth it.

Get your photo accepted for the renewal of your passport with this amazing Passport photo UK App. : happy :: happy ::