## Can someone in Cyber Security or IT help answer this basic question on the change of today’s malware? [closed]

1.) Before the most common types of malware were usually trojan horses and various other types of viruses derived from one’s own e-mail on a desktop. Given the timespan since those days, the game has changed. Today ways of breaching a user’s data have changed drastically. What are the most prevalent methods that an average person should be aware of today?

## I need help with my Logic (Resize an image)

Hey Guys!!

I'm trying to put some PHP code to resize an image.

Basically users upload an image. And that image gets placed on a PDF document but I need to limit how big (Pixels) that image is. If it's height is too large it will push the contents on to the 2nd page. Which I don't want.

Currently, I have this code which works to some extent but what I want is if the width of the picture is more than 80 that's totally ok as it doesn't push the page down.:

But then again I wanna…

I need help with my Logic (Resize an image)

## Need help designing ER Diagram

I am not a database engineer, I am just getting started with designing data models.

A User registers to my application. My application has Funds that are predefined with an InvestmentStrategy. A user deposits cash into their account Bankroll. A user invests from their Bankroll into a Fund or multiple. A fund buys into Investments. A User selects Picks to guide the InvestmentStrategy. The InvestmentStrategy uses historical Pick evidence by User to determine which Investments to make. Investments have Results, which pay Users based on performance. A User can leave a Fund. A User can withdraw from their Bankroll. A InvestmentStrategy can also pay percentage of profit to User.  This leads to a wide array of circular relationships. I am having a hard time drawing an ER diagram describing the entities and relationships above. Does anyone have examples or suggestions for how to create their model? Thanks!

## I need C++ help, please!

I have a simple problem in my textbook that I just couldn’t understand. Since classes were cancelled, we didn’t really get a chance to discuss it and I don’t see any examples similar to it in the chapter.

Suppose that the input is 6 -2 4 9 -5 8. What is the output of the following code? int num, count, temp = 1; cin >> num; for (count = 1; count <= 4; count++) { temp = temp + temp * (num + count); cin >> num; } cout << “temp = ” << temp << endl;

–> I came up with temp=30 as my answer since I used the first 4 num integers (6, -2, 4, and 9) because count could only be less than or equal to 4, hence it running 4 times. But when I emailed my prof asking about it, he said we needed to use 5 integers. I get there are two cin statements, but I figured the first was the initial one for the for loop and the second one was to execute the remaining three. So where exactly does the other integer go into?

## Help choosing a feat for level 4 Swashbuckler

Ok so it seems like a simple question but I’m very new to dnd.

I’m playing as a High Elf Swashbuckler and his stats are:

Str: 4 (-3) Dex: 20 (+5) Con: 10 (0) Int: 13 (+1) Wis: 15 (+2) Char: 16 (+3)

Since my character already has 20 dex, should I choose a feat instead of adding to my stats? I’m thinking of the dual wielding feat but many seem to think its useless?

Would love to hear some thoughts!

## Need help understanding some Big O exercises

I’ve still got a very rudimentary understanding of Big O. Can someone help me understand these (basic) questions? I’m still getting wrong answers for each example I’ve tried.

for (i  ← 1 to n)          i ¬ i*2         Sequence of constant statements 
T(n) =(3n+5)*log n2 
for j ←  1 to n          if A[j] < A[min] then              Sequence of constant statements 

Any help greatly appreciated, thanks

## Need help with an interesting variant of the travelling salesman problem

I’m working on an assignment in my CS class and the gist of the problem is as follows.

A salesman has a map of some apartments (over 300 blocks). I am given the (x,y) coordinates of each block as well as the “money” he will earn by visiting each block. I need to find the shortest route for the salesman to take such that he will earn x amount of money. He does not have to visit all the blocks. At the end of the day he will have to return to the origin (0,0).

I used a greedy algorithm by finding the shortest possible path he can take at each step. E.g from the origin I find the block with the lowest euclidean distance from the origin. Lets say this block is (2,2). I then find the block with the lowest euclidean distance from (2,2) until I have x amount of money. Using this greedy algorithm I then performed a 2-opt local search to improve my solution further.

The problem lies here though: when I perform a 3-opt local search using the implementation from wikipedia (https://en.wikipedia.org/wiki/3-opt), I get a much worse result than either the greedy or the 2-opt. Is there something wrong with the wiki code and if not, what did I do wrong? Thanks.

## Help with finding a flaw in argument simulating large Turing machines with smaller ones

I have an argument which, if it goes through, just about proves that either:

• Programming languages are more powerful than Turing machines
• The busy beaver function ($$BB()$$) on Turing machines is computable

Now, I understand that it’s vastly more likely that my argument has some flaw that I can’t find. But it’s more interesting to me how I’m wrong, rather than whether I’m wrong.

# Argument

Throughout, I use $$\mathbb{S}(x)$$ to mean either the number of states that Turing machine $$x$$ has or the number of states required by a Turing machine to write $$x$$ to the tape.

Construct a Turing machine $$M_1$$ as which takes as arguments (on the tape) $$n, k$$, simulates all Turing machines with $$n$$ states until $$k$$ of them halt, and then halts itself. This is easy to write in a programming language, as demonstrated by the following Python snippet:

def M1(n, k):     all_machines = generate_turing_machines(n)     is_halted = [0] * len(generate_turing_machines)     while sum(is_halted) < k:         for (i, machine) in enumerate(all_machines):             machine.step()             if machine.is_halted():                 is_halted[i] = 1 

Now, let $$\mathbb{S}(M_1) = m_1$$ be the number of states required by $$M_1$$. Fix $$n$$ much greater than $$m_1$$. Let $$k_1$$ be the largest number such that $$M_1(n, k_1)$$ halts and $$k_0$$ be the smallest number such that when $$M_1(n, k_0)$$ halts, $$k_1$$ simulated Turing machines have halted (as all equivalent machines will halt on the same step). Choose $$k$$ with $$k_0\leq k\leq k_1$$. This means that $$M_1(n,k)$$ halts in about $$BB(n)$$ steps.

Construct $$M_2$$ which is the same as $$M_1$$ except the first thing it does is write $$n$$ and $$k$$ to the tape. Let $$\mathbb{S}(M_2)=m_2$$. Then $$m_1+\mathbb{S}(n)+\mathbb{S}(k)+C=m_2$$ for some small $$C$$ (which is probably constant and likely $$0$$).

Now, $$\mathbb{S}(n)$$ is at most $$O(log(n))$$. $$k$$ is about $$n^n$$, so $$\mathbb{S}(k)$$ is at most $$O(n)$$. That puts $$m_2$$ just slightly larger than $$n$$. But here we have a problem: if $$k$$ is even slightly easier to write to the tape, then $$m_2$$ would be slightly smaller than $$n$$. That would mean $$BB(m_2)>BB(n)$$ and $$m_2, a clear contradiction.

In my mind, these are the possible resolutions:

• $$M_1$$ is impossible to create as a Turing machine, meaning that Python is more powerful than Turing machines are.
• There is some transfinite extension to Turing machines which is not much more powerful than Turing machines in general, and $$M_1$$ can be written in this extension. In other words, $$M_1$$ is the limit of a set of machines $$M_{1,N}$$, each of which can handle any $$n. This would probably entail the busy beaver function being computable.
• There is a large set of numbers which cannot be written by a Turing machine in much fewer than $$log(k)=n$$ states (we need $$\mathbb{S}(k)). It seems impossible to me that no candidate for $$(n, k)$$ could be sufficiently compressed.

Where is the error in this logic?

## url redirect / Microsoft complains- Help out please anyone THanks

Is it possible to make my cpanel host a redirect ?, I received message from microsoft that my hosting is used my redirect and i discovered my email has been hacked today.