boot – Ubuntu boot problem

I bought a Dell laptop with ubuntu (version 18) installed. After 10-15 days of use, it began to show a startup problem. It can only be started if the charger cable is connected.

I raised this problem, the Dell executive investigated and decided that the problem is due to a damaged operating system. He asked me to change the operating system to Windows or reinstall Ubuntu. If I reinstall Ubuntu again, the problem may be repeated.

Is changing the operating system the only solution? Can I know any feasible solution if it has one and what is the main cause?

Use the undecidability of the detention problem to show that the function also recursively calls at $ 2i $ if $ i $ stops

Leave $ {P_i | i = 1, 2 ,. . $ Be a list of all computable functions.
For example, $ P_i $ It could be him $ i $th program and $ P_i (x) $ would be the output given by that program at the entrance $ x $.

Suppose there is an algorithm to decide whether a given procedure calls itself or not.

Consider the procedure. $ FUNC (x) $:

PROCEDURE FUNC (INTEGER X);
      BEGIN INTEGER 1, J;
      I ← X DIV 2;
      J ← X MOD 2;
      IF J = 0 AND Pi(i) halts THEN FUNC (X + l);
END

How do I use Undecidability to show that $ FUNC (2 ∗ i) $ calls $ FUNC $ recursively yes and only if $ P_i (i) $ it stops?

theme development – Problem getting the URL of the image uploaded to a custom post type

I have a CPT called books and I can go through it this way, but I need to get the URL of the images uploaded to the publication (not in the Gallery). I tried to use WP wp_get_attachment_image_src() as bellow but I don't know why I should pass $attachment_id how it's requeired

 'books',
    'tax_query' => array(
        array(
            'taxonomy' => 'genre',
            'field' => 'slug',
            'terms' => 'romance'
        )
    )
)
);
while ($loop->have_posts()):
    $loop->the_post();
  $image_attributes = wp_get_attachment_image_src('', 'full' );
   if ( $image_attributes ) : ?>
   

Apparently, this does not return any of the images loaded in the CPT URL. Can you tell me what I'm missing and what I'm doing wrong here?

reductions – Show that the problem of the Droid Trader is NP-complete

This question is from Algorithms Design.

A player in the game controls a spaceship and is trying to make money buying and selling droids on different planets. exist $ n $ different types of droids and $ k $ different planets Every planet $ p $ It has the following properties: there are $ s (j, p) geq 0 $ type droids $ j $ available for sale, at a fixed price of $ x (j, p) geq 0 $ each one for $ j = 1, 2, points, n $, and there is a demand for $ d (j, p) geq 0 $ type droids $ j $, at a fixed price of $ y (j, p) geq 0 $ every. (We will assume that a planet does not simultaneously have a
positive supply and a positive demand for a single type of droid; then for
every $ j $at least one of $ s (j, p) $ or $ d (j, p) $ is equal to $ 0 $.)

The player starts on the planet. $ s $ with $ z $ units of money and must finish
in the planet $ t $; there is a directed acyclic graph $ G $ in the set of planets, like
that s-t roads in $ G $ correspond to routes valid by the player. (G is chosen
be acyclic to avoid arbitrarily long games.) For a given s-t path $ P $ in
$ G $, the player can make transactions as follows. Whenever the player
reach a planet $ p $ in the path $ P $, she can buy up $ s (j, p) $ type droids $ j $ for $ x (j, p) $ units of money each (as long as you have enough money in
hand) and / or sell up $ d (j, p) $ type droids $ j $ for $ y (j, p) $ units of money (so I guess you can make multiple purchases / sales on each planet). The final score of the player is the total amount of money he has on hand when he reaches the planet. $ t $.

I am trying to prove that this problem is more difficult than some complete NP problem, but I am quite trapped. Since the planets are organized in a DAG, I think the "hardness" of the problem comes from the fact that you can buy and sell many different types of droids on each planet. Also, this problem is a maximization problem, and I don't know many problems of full NP maximization other than quadratic allocation.

Can I get a clue on how to do this? For example, what problem should X choose to reduce to the Droid Trader problem? Thank you!

siem – Splunk Join the search with time problem

Search case:

Search for union between two sources (IPS and DHCP registration)

IPS log: threat, IP, hostname

DHCP Registration: IP, hostname

Objective: Find the Host IP is activated in IPS. Given that DHCP is providing the same IP to multiple hosts.

index=ips | join IP type=inner (search index=dhcp | fields _time,IP,HOSTNAME) | stats count by Threat,IP,Hostname

Problem: Get only the last value of my DHCP index.
If IP x.x.x.x was used by three hosts during the day: Host A, Host B and Host C.
Host B is the host that was activated in IPS at 12 p.m., but host C is the last host that used the IP at 4 p.m.

Now, when I verify my search at 5 PM, it shows that the IPS threat was activated at 12 PM with Hostname as Host C, which is incorrect.
You need to show Host B.

Is there any way to fix this so that the correct host for the IPS threat is displayed?

Calculation: Can Integration By Parts be used for a problem with more than two functions?

Thank you for contributing a response to Mathematics Stack Exchange!

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

But avoid

  • Ask for help, clarifications or respond to other answers.
  • Make statements based on opinion; Support them with references or personal experience.

Use MathJax to format equations. MathJax reference.

For more information, see our tips on how to write excellent answers.

java – Producer-consumer problem – both end up waiting

New in multithreading. I wrote this program that should be a solution to the producer-consumer problem. The problem is that both a producer and a consumer end up in the waiting state. What seems to be wrong? (And everything else is wrong ^ _ ^) Thanks in advance.

Main Class:

package producer.consumer2;

import java.util.Scanner;

public class Main {

    public static void main(String() args) {
        Buffer bf = new Buffer<>(10);
        Producer prod = new Producer(bf);
        Consumer cons = new Consumer(bf);
        prod.setConsumer(cons);
        cons.setProducer(prod);


        new Thread(prod).start();
        new Thread(cons).start();

        if(quitInput()) {
            prod.terminate();
            cons.terminate();
        }


    }

    private static boolean quitInput() {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        do {
            if(line.toLowerCase().equals("q") || line.toLowerCase().equals("quit")) {
                sc.close();
                return true;
            }
            line = sc.nextLine();
        } while(true);
    }

}

Damping Class:

package producer.consumer2;


import java.util.ArrayList;
public class Buffer {
    private final int MAX_LENGTH;
    private ArrayList values;

    public Buffer(int length){
        MAX_LENGTH = length;
        values = new ArrayList(length);
    }

    public synchronized void add(E e) {
        if(values.size() < MAX_LENGTH) {
            values.add(e);
            System.out.println(values);
        } else {
            throw new RuntimeException("Buffer is full at the moment.");
        }
    }

    public synchronized boolean isEmpty() {
        return values.size() == 0;
    }

    public synchronized boolean isFull() {
        return values.size() >= MAX_LENGTH ? true : false;
    }

    public synchronized E remove(int index) {
        E val = values.remove(index);
        System.out.println(values);
        return val;
    }
}

Consumer Class:

package producer.consumer2;

public class Consumer implements Runnable {

    private final Buffer bf;
    private volatile boolean running = true;
    private Producer prod;

    public Consumer(Buffer bf) {
        this.bf = bf;
    }

    public void setProducer(Producer prod) {
        this.prod = prod;
    }

    @Override
    public void run() {
        int sum = 0;
        int counter = 0;
        while (running) {
            if (bf.isEmpty()) {
                if (prod != null) {
                    synchronized (prod) {
                        prod.notify();
                    }
                }
                myWait(0);
            } else {
                sum += bf.remove(0);
                counter++;
            }
        }
        System.out.println("for first " + counter + " nums an avg = " + ((double) sum / counter));
    }

    private void myWait(long millisecs) {
        System.out.println("consumer is waiting.");
        try {
            synchronized (this) {
                this.wait(millisecs);
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("consumer is NOT waiting.");
    }

    public void terminate() {
        this.running = false;
    }

}

Class of producer:

package producer.consumer2;

public class Producer implements Runnable {

    private final Buffer bf;
    private volatile boolean running = true;
    private Consumer cons;

    public Producer(Buffer bf) {
        this.bf = bf;
    }

    public void setConsumer(Consumer cons) {
        this.cons = cons;
    }

    @Override
    public void run() {
        int counter = 1;
        while (running) {
            if (bf.isFull()) {
                if (cons != null) {
                    synchronized (cons) {
                        cons.notify();
                    }
                }
                myWait(0);
            } else {
                bf.add(counter);
                counter++;
            }
        }
    }

    private void myWait(long millisecs) {
        System.out.println("producer is waiting.");
        try {
            synchronized (this) {
                this.wait(millisecs);
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("producer is NOT waiting.");
    }

    public void terminate() {
        this.running = false;
    }

}

test assistants: What is the problem with the learning algorithms used for automated theorem testers?

I've searched a lot on Google but I haven't found an automated problem solver / problem solver capable of solving problems like a human.

I am interested in a specific type of tester: learning, such as Support Vector Machines.

Support Vector Machines fails for other tasks such as recommendation systems due to data shortages, that is, in datasets where there are very few or even no cases for some higher order interactions (read parper Multi-view machines for more details).

Support vector machines are used for the selection of premises, but I have not found an explanation as to why it does not work so well.

Question: Do the learning algorithms used for theorem testers suffer from data shortages?

Debian 10 sound problem

I am using Debian 10 together with Windows 7. There were no sound problems after a new installation, but after restarting my Windows 7 and restarting Debian 10 there is no sound in the browser. I followed these problems https://wiki.debian.org/Sound but I couldn't solve it. I tried other solutions but I didn't help: PulseAudoControl, alsamixer.

email problem

Hi
I have a server dedicated by 500 users.
Approximately two weeks I had this probem and I cannot send to Yahoo.
Is there any solution?
I read it all … | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1790167&goto=newpost