Create a class student with public member variables

Create a class Student with public member variables: Student name, student number, contact number, ID number. The following specifications are required:

 Add init() method of the class that initializes string member variables to empty strings and numeric values to 0.

 Add the method populate() to the class. The method is used to assign values to the member variables of the class.

 Add the method display() to the class. The method is used to display the member variables of the class.

 Create an instance StudentObj of the class Student in a main program.

 The main program should prompt the user to enter values for five students. The attributes should be assigned to the instance of Student using its populate() method, and must be displayed using the display() method of the instance of Student.

How to lock IIS server files through a shell?

After uploading a shell to a .net site (.aspx extensions) and get it to work, is there any way to execute a command through that shell to increase the security of that site/server so that no one else can upload any other shell?

In other words, let’s say I have access to a shell. I can execute shell commands or windows commandline commands through it. How do I increase the security of that site/server through that shell?

Best practices for managing content change requests?

Hi all!

I'm trying to improve our content change request process. We have 1,000+ pieces of content and a small writing staff. We're having challenges keeping up with demand. Essentially, we've created a tool that allows users to request changes to an article, a ticket is created, and then routed to our writing team.

We receive a change request when:

  • there's a product update
  • if a user, either an internal CS agent or customer, leaves feedback
  • an image becomes outdated
  • a…

Best practices for managing content change requests?

Scrapebox Link Extractor problem socket error 10038


.png   problem-socket-error-scrapebox-vps-10038.png (Size: 34.58 KB / Downloads: 1)
Hello,

I have 3 VPS with windows server 2012 from the same provider. I have one scrapebox on each.
It’s been month I’m using it. It was working great until 3 weeks ago.

Before I was doing link extractor with 500 threads no problem.
Now, when I do a link extractor I have a socket error 10038 on almost all urls. (see image).

It’s working only if I use 1 thread with 5 seconds delay (or more).

I have checked the windows parameters, there is no firewall and no virus software installed or enabled.

Is it possible that it’s the VPS provider that is limiting the connexion ?

Does someone had the same error previously ?Anyone

Thanks a lot

Why in BFPRT (median of medians) algorithm the partition of the array by $7$ blocks would work but with the $3$ fail?

I am working with the median-median algorithm or BFPRT algorithm and I seek to understand why would the partition of the array by $ 7$ blocks would work but with the $ 3$ fail?

If we divide into blocks of $ 7$ then we will get: Solving it by substitution I think the following manner: It is a recursive tree. In the worst case it takes $ T(10n/14)$ time. So in the worst case it goes down to the bottom by $ (10/14)^kn=1$ steps; $ k=log_{14/10}n$ . At each level of recursive tree the total cost is $ \le cn$ for some constant $ c$ . So by the simplified assumptions using substitution $ k < n$ $ T(n)\le dn \log(n)$

$ T(n) \le T(n / 7) + T(10n / 14) + O(n) \le d\frac{n}{7}lg(n/7)+d\frac{10n}{14}lg(10n/14)+cn \le d(\frac{n}{7}lgn – \frac{n}{7}lg7) + d(\frac{10n}{14}lgn – \frac{10n}{14}lg10/14) + cn = d\frac{12n}{14}lgn – d\frac{n}{7}lg7 – d\frac{10n}{14}lg\frac{10}{14} + cn=d\frac{12n}{14}lgn – d\frac{n}{7}lg7 – d\frac{10n}{14}lg10 – d\frac{10n}{14}lg14 + cn \le d\frac{12n}{14}lgn + cn$

So, $ T(n) = O(nlgn)$

The same way for blocks of size $ 3$ .

$ T(n) \le T(n / 3) + T(2n / 3) + O(n)$ we get $ T(n) = O(nlgn)$

Now, how to show that $ T(n)$ for 7 is also $ O(n)$ and for 3 it can not be $ O(n)$ . Also, in general how can I guess that the $ T(n)$ is also $ O(n)$ because here in both cases my thoughts are they both $ O(nlogn)$ ?

What data structure or algorithms to solve this problem

You have a unsorted array of process groups in a way (Name of process, Total threads the process wants to run), for example –

process_group = [(A, 40),(B,10), (C,20),(D,30),(E,100),(F,60)]  

The system can run only 150 maximum threads, no limit on number of processes. Calculate the maximum number of threads which can be run to accommodate all process in system and utilize maximum thread limit.

The answer in this particular case is 30. How I approached, we have six groups, so the average of maximum allowed thread is 150/6 =25, so it can run maximum 25 threads if system has to accommodate all processes, but this is not efficient as we have less than 25 threads in few processes and system will be under utilized. To optimize it sort the array and subtract the average from each element and calculate new average and keep traversing until we hit a value larger than available average. So For this case, (B,10), (C,20), (D,30) will run on full, rest all will be able to run only maximum of 30 threads, making the total 150.

I looked on Hackerrank and Leetcode but couldn’t find anything similar, not sure which DS/Algo this problem relates to or a variation of something.

Concatenate multiple integer arrays such that number of inversions in resulting array is minimal

Given N arrays of variable length.

Find a way to concatenate the arrays in such a way that the number of inversions is minimum

An inversion for an array Arr can be defined as,

a pair of indices (i,j) such that,

i != j  i < j  Arr[i]>Arr[j] 

I tried to concatenate the arrays on the basis of sum, such that the one with minimal sum goes first and one with maximal sum goes last.

It didn’t work out though.

Example:-

[14, 18, 18, 20, 16, 6, 11] SUM:- 103  [2, 4, 11, 40, 20, 14, 19] SUM:- 110  [14, 18, 18, 20, 16, 6, 11, 2, 4, 11, 40, 20, 14, 19] Inversions:- 42  [2, 4, 11, 40, 20, 14, 19, 14, 18, 18, 20, 16, 6, 11] Inversions:- 40 

Get Hash from PKIsignature

I have a PKIsignature and a certificate attached to same file, How can I:

  1. extract public key from certificate chain
  2. use public key to get hash file from PKIsignature

DBNmqrbZ+cC9Y07ISjzSqROnic5Az8qEwXb04aRGTn57xf8uzOfuovoo+Lfoen1myezz06kLWsaR pL0HsJBFwj/qSHWKuLiQ5kOEeVGMlMlFjQ8bsss8uLHZWXnk7c56I9QI/B+pjGCAo2bowzYtWBEg 0Yib8TNAX26KuhNg3e8P76Jn0A3YeTd6zM4mtNo1LCa0KyQjs5fC18Tw4sjii49hXDd76aOdCyvf 4XW66EWlUECEP1C7MlpZIGOu8X9rQ9nR/vwm9LL+hlkWjblBfGMazQp9o8OVXszkdxxGkW7EKpGO Gk1cAf2AYz0jIGpVvB39wGvV8K+RlKp9Mdnidw==

<certificatechain> <prodcert> -----BEGIN CERTIFICATE----- MIIETzCCAzegAwIBAgIBATANBgkqhkiG9w0BAQUFADB3MQswCQYDVQQGEwJTRTEUMBIGA1UEChML RXJpY3Nzb24gQUIxFzAVBgNVBAsTDkxpY2Vuc2UgQ2VudGVyMTkwNwYDVQQDEzBQcm9kQ0EgZm9y IFNpZ25pbmcgbGljZW5zZSBmaWxlcyBDQVggMTA2IDAwODQvMzAwIhgPMjAxMDA4MTgwMDAwMDBa GA8yMDM3MDEyOTAwMDAwMFoweTELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0VyaWNzc29uIEFCMRcw FQYDVQQLEw5MaWNlbnNlIENlbn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