Is it considered as a DOS attack if I add too much data to a page so that it doesn’t respond at all?

I am working on an application. There is a new feature implemented where a user create some IDs and secret keys for that application.

I have observed that there is no rate limit for creating those.

I have sent the request to intruder and created nearly 11000 sets of IDs and secrets.

So whenever any user tries to access that page, it loads continuously and displays a message that page has become unresponsive and as a result it doesn’t let user to access anything in the page.

In my point of view, this is a vulnerability because lack of rate limiting is leading to inaccessibility of the page for all the users in the application.

However, I am confused if it is as considered as a DOS attack or valid rate limiting issue.

Please suggest with valid justification.

When would you use an edge list graph data structure instead of an adjacency list or adjacency matrix?

In what applications would you choose an edge list over an adjacency list or an adjacency matrix?

Sample Question, VisuAlgo: Which best graph DS(es) should you use to store a simple undirected graph with 200 vertices, 19900 edges, and the edges need to be sorted? Suppose your computer only has enough memory to store 40000 entries.

There are three choices: adjacency lists, adjacency matrix, and an edge list.

Edge lists are the correct answer here because sorting by weight is most efficient, but what are some other use cases?


FileStream DB SQL Server – merging DB data

We recently upgraded a server from 2014 to 2017. Since down time was a concern, we migrated some DB’s a couple days before.

Migration complete Sunday afternoon, we’ve now come to find out the Filestream DB was used between restore and cutover. So we have a datagap to mitigate. I restored the old DB to a backup server, and did a basic ‘not in’ to find 12 documents in the old DB.

Finally, the question: how do we get those 12 documents into the current DB? Is it as simple as an insert from old to new?

If it helps, this query is what shows the 12 record gap:

SELECT *  INTO #tmpFileStore FROM OPENQUERY (OldDBSever_LinkedServer, 'SELECT * FROM [FSDB].[dbo].[DocumentFileStore]');  SELECT stream_id   FROM #tmpFileStore   WHERE stream_id not in (Select [stream_id] FROM [dbo].[DocumentFileStore]) GO 

Using/ Extracting data from Interpolating Functions returned from NDEigensystem

I am relatively new to Mathematica and have been trying to use the NDEigensystem command to work with some quantum systems. I am able to get the accurate energy eigenvalues but am having problems with eigenfunctions; more specifically, I am having trouble actually calling values using the interpolating functions.

m2 = 0.5; \[HBar] = 1; w = 0.5; \[ScriptCapitalO]2 = -\[HBar]^2/(2 m2) Laplacian[u[x, y], {x, y}] +    1/2 m2 w^2 (x^2 + y^2) u[x, y]; 
{vals, funs} =    NDEigensystem[{\[ScriptCapitalO]2,      DirichletCondition[u[x, y] == 0, True]},     u[x, y], {x, -10, 10}, {y, -10, 10}, 28,    Method -> {"PDEDiscretization" -> {"FiniteElement", {"MeshOptions" \ -> {"MaxCellMeasure" -> 0.5}}}}]; 

As we can see above, I am using a simple 2d harmonic oscillator as my Hamiltonian, and then using the NDEigensystem command I am generating eigenvalues and eigenfunctions. I am able to get the right eigenvalues for my system as we can see below Energy Eigen Values

However; the eigenfunctions aren’t usable, I am trying to extract the data from the interpolating functions to no avail. From what I understand the syntax is:

\[Psi] = funs[[1]] \[Psi][2,3] 

The above code should print the values of the first eigenfunction as {2,3} but it doesn’t seem to be working. I’m hoping to eventually integrate these functions to calculate expectation values, I would be very grateful for any help or advice.

Save data from a checkbox to a wpdb array

I have several fruit checkboxes but when saving to the wpdb database it only saves the last one that it checks, variable $ check receives vardump string (6) "banana" string (5) "apple"

In the database only appears apple should be banana, apple in that same field an array. Should not only save it the last marked

  foreach( $  checkboxes as $  check ) {     var_dump( $  check);  }   global $  wpdb;   $  wpdb->insert('data',array(        'fruit' => $  check     )); 

I just realized my tax filer does not encrypt my password. Can I anything do for the financial data (eg SSN) that I gave?

Last year due to a complicated tax scenario (for my skills), I used an online tax website recommended by a friend to do my taxes. They were efficient in their job and I wanted to use their services again this year to save time. I had forgotten my password so tried to reset it. Turns out, they stored my password in plain text. Apparently that was to enable their staff to update any information that I provided in case it was incorrect.

I am worried about the financial data that I have already provided to them. I think as a user I have to consider it compromised. But I am a bit optimist so wondering if I can do anything to protect my data.

They don’t seem to be GDPR compliant so I don’t think they will simply delete my data but I definitely am going to request for it.

Bloom filter like data structure supporting iteration

I am wondering whether there exists a data structure similiar to a bloom filter in the sense that it is an approximate finite set representation (allows for false positives, but no false negatives) and supports:

  • constant time complexity union of two sets
  • constant time complexity insertion of an element

but also allows for efficient iteration over the approximate elements in the set, i.e. iterate over all elements that are either actually in the set or false positives with a time complexity that is linear in the number of elements in the set

Analyzing space complexity of passing data to function by reference

I have some difficulties with understanding the space complexity of the following algorithm. I’ve solved this problem subsets on leetcode. I understand why solutions’ space complexity would be O(N * 2^N), where N – the length of the initial vector. In all those cases all the subsets (vectors) are passed by value, so we contain every subset in the recursion stack. But i passed everything by reference. This is my code:

class Solution { public: vector<vector<int>> result; void rec(vector<int>& nums, int &position, vector<int> &currentSubset) {     if (position == nums.size()) {         result.push_back(currentSubset);         return;     }          currentSubset.push_back(nums[position]);     position++;     rec(nums, position, currentSubset);     currentSubset.pop_back();     rec(nums, position, currentSubset);     position--; }  vector<vector<int>> subsets(vector<int>& nums) {     vector <int> currentSubset;     int position = 0;     rec(nums, position, currentSubset);     return result; } }; 

Would the space complexity be O(N)? As far as i know, passing by reference doesn’t allocate new memory, so every possible subset would be contained in the same vector, which was created before the recursion calls.

I would also appreciate, if you told me how to estimate the space complexity, when working with references in general. Those are the only cases, where i hesitate about the correctness of my reasonings.

Thank you.

Create dynamic sql query to select all related data in DB based on entry table and ID

Hope all is well. I am hoping you can help me.

Problem Statement – I’m tasked to create a dynamic SQL statement which will select all related data from a given table where the Identifier is passed. For each table where the relevant data is found i would like the data to be exported onto a separate tab of within excel

If i was doing this manually done this i would perform the following queries and export the data onto each tab;

Select * from  Mason where id = 12345 Select * from  MasonContacts where Companyid= 12345  Select * from  MasonOpportunities  where Comid = 12345  

However given the sheer volume of tables this isn’t viable.

Step 1 : Type in my identifier (in this case my identifier is a field called "Id" in the Table "Mason") The query will always start from this table.

Table Name : Mason Field : Id = "12345"

Step 2 : Search against table "MasonContacts", search against the field "Companyid". Return all columns & records where the field "Companyid = 12345"

Table Name : MasonContacts Field : Companyid

Step 3 : Search against table "Mason Opportunities ", search against the field "Comid". Return all columns & records where the field "Company = 12345"

Table Name : MasonOpportunities Field : Comid

Looking forward to your help