Detecting when a single group of blocks is broken into multiple groups

Let’s say you have an array of blocks (AABB), where each block is touching or intersecting any number of other blocks. Together they make up a larger object, and because they’re all touching, you can consider them to all be on the same “grid”. Each block can have any size or position, but is always axis-aligned.

Now let’s say you delete one of the blocks, somewhere in the middle, such that there is now a gap where blocks are no longer touching.

How would you go about detecting that you now have two clusters of blocks, two “grids”, instead of one?

My first thought is to loop through all blocks, perform AABB collision checks against all other blocks, mark the ones that touch, then recursively cycle through the touched blocks looking for others that touch, until you reach the end and can look for blocks that were not marked. But that sounds extremely inefficient.

This is in plain C, so I’m trying to keep memory use limited to the existing array of block structs.

how do i scan a WordPress website which blocks WPSCAN from scanning the website?

community! I am trying to scan a website which is made in WordPress … I am trying to scan this website with WPSCAN in Kali Linux but here an error is happening …

whenever I start the scan WPSCAN runs for 2-3 min and gets Paused and after some time and error comes “the host seems to be down” but the website is running completely fine!

I think there is a WAF that is blocking the scanner from scanning that website .. but when I did a Port Scanning using NMAP for checking what Services are running in that website I found that no WAF is installed on it .. also I used WAFW00F for a check, which WAF is there but I found nothing!

So how do I search for that thing which is blocking me from scanning that website ? also please tell me what kind of mechanism is that website using?

how can I run strings(1) or dd(1) on only the unused blocks of a partition

Subject says all.

I have a sata disk from which I need to inspect only its unused blocks, i.e. blocks not used by files or dir entries.

I want to run strings(1) on these blocks. Alternatively, I could dump these blocks into a file (with dd or some such), and run strings on that.

The solution isn’t obvious to me at the moment.

multiple book navigation blocks/ Navigation for COLLECTIONS of books

I’m working in a projet that I have to show a COLLECTIONS of books. http://www.mcdesign.com.ar/dctest/ In this website I managed using the books navigation block, for one collection with many books, with css I managed to set a tree view and indication where you are. But only allow one collection of books. The problem is that I have to make as least 23 collections of books. Each collection belong to a Province with educative books of these provinces. There is a way to replicate that book navigation for each collection? Could I make them with block menu with tree view and the same css style? I think the concept of collections of books are missing considering the editorial point of view . I appresiate any help. Thanks.

What is a fee market? Does it mean that blocks should be full, esp. after several halvenings?

As we all know, Bitcoin had experienced an unprecedented long-lasting congestion period in 2017. This seems quite horrible to some people generally, but it seems that such phenomenon was on the contrary considered as a positive sign by developers, for example:

Personally, I’m pulling out the champaign that market behaviour is indeed producing activity levels that can pay for security without inflation, and also producing fee paying backlogs needed to stabilize consensus progress as the subsidy declines.

I’ve heard that is about a strategy called “stable fee market”(might be inaccurate, sorry). So, I’m courious that does that mean the blocks should be kept full in order to keep Bitcoin safe? Does it merely a compensation of declining block subsidy? Is there any deeper reason behind?

Also, I wonder how could Replace-By-Fee take effects?

Multiple Views Exposed form blocks with different fields

Scenario:

View fields:

name gender age especialty 

exposed form block (1) fields:

name especialty 

exposed form block (2) fields: (This is also I want to have but as a separate block)

 name  age  gender 

I am looking for a way in which I can have two different exposed form blocks but with different search fields.

I am using Drupal 8. Any help would be appreciated. Thanks!

Jenkins Pipeline Syntax: Quoting Pains When Using Multiple Quote Blocks

I have kind of a weird setup that I need to run a command as a docker container in a sh block in a Jenkinsfile.

Issue that I’m facing is specifically around the awk command used to trim the output.

Here is the command that WORKS FINE when ran directly on a bash shell:

OPFILENAME=$  (docker run -t \ -e AWS_SECRET_ACCESS_KEY='<omitted>' \ -e AWS_ACCESS_KEY_ID='<omitted>' \ -e AWS_DEFAULT_REGION='us-east-1' \ mydockerimage:0.1 \ bash -c "aws s3 ls my-bucket-name/dir/ | sort | tail -n 1 | awk '{print $  4}' ") && \ echo $  OPFILENAME 

So I need to run this exact same thing on a remote host through a Jenkins pipeline, here is the general syntax:

pipeline {                agent any   environment {   BUILDHOST = 'buildhost.example.com'    SSHCMD = "ssh -o StrictHostKeyChecking=no jenkins@$  {env.BUILDHOST}"  }   stages {   stage('Get filename from s3') {     steps {        sshagent ( ['ssh_config']) {         sh """$  {SSHCMD} '''             OPFILENAME=$  (sudo docker run -t \             -e AWS_SECRET_ACCESS_KEY='<omitted>' \             -e AWS_ACCESS_KEY_ID='<omitted>' \             -e AWS_DEFAULT_REGION='us-east-1' \             mydockerimage:0.1 \             bash -c "aws s3 ls my-bucket-name/dir/ | sort | tail -n 1 | awk '{print $  4}') && \             echo $  OPFILENAME             '''           """        }       }      }     } } 

Here is the error that Jenkins throws:

...bash -c "aws s3 ls my-bucket-name/dir/ | sort | tail -n 1 | awk {print' '}") && echo $  OPFILENAME "                         ' bash: -c: line 1: unexpected EOF while looking for matching `"' bash: -c: line 3: syntax error: unexpected end of file 

Notice how it transformed the awk command as such: awk {print' '}

Trying with various changes: ...| sort | tail -n 1 | awk \'{print $ 4}\'") results in the exact same error.

Tried like this: awk "'{print $ 4}'" and it doesn’t throw an error but in the logs it shows like this: awk "{print' '}" thus the awk trimming desired doesn’t take place. Grr!

So I know there is something wrong with the quoting, and since I am using triple-quotes for multi-line commands it’s dirtying it up even more!

I have referenced this gist, trying to make sense of how to do this: https://gist.github.com/Faheetah/e11bd0315c34ed32e681616e41279ef4 but still running into issue after issue.

Caveats: – Command must run in an sshagent block and on a remote host. Commands cannot be ran in the local Jenkins workspace.

/dev/sda2:clean, xxxxx files xxxxx blocks

On every bootup it’s the same:

/dev/sda2:clean, xxxxx files xxxxx blocks

I have a alienware Aurora-R7, I installed ubuntu 16.04, it was always the same issue. When boot my pc, I find this message. Is it some kind of option Ubuntu uses to ensure filesystem consistency or is there something wrong with my HDD? It takes several minutes and nothing happens. I installed the ubuntu 18.04 and it is always the same problem. Am I missing something?

Thanks,

No. of disk blocks writes required for writing the file

Assume that a file is written using write(fd, buf, K) system calls, where fd is the file descriptor, and K, the number of files to be written to the current file offset which is a multiple of the disk block size D. The total number of disk block writes required to be executed before the system call returns is:

(a) is equal to K/D

(b) is less than K/D

(c) is greater than K/D

(d) None of the above.

In my opinion, the answer should be (c). But the solution manual says it’s (d).

I believe the number of file writes required for writing a file is $ ceil(K/D)$ So, the answer should be (c).

Am I correct? If not, what am I doing wrong?

Thanks in advance!