Invalid Argument foreach

Is this because of WordPress, PHP, or the Theme? (or some combination)

A client of mine has a WordPress site that’s been working just fine for years, but recently started getting the following errors pulling up in it’s sidebars:

Warning: Invalid argument supplied for foreach() in /wp-content/themes/epsilon/page-threecolumn.php on line 29

Been thinking it may have to do with upgrades to both WordPress and PHP. Theme is no longer supported. Here is what the code looks like in that area:

                <div class="col-234">                     <div class="sidebar left-sidebar">                             <?php                             $  leftsidebar = simple_fields_get_post_group_values($  post->ID, "Left Sidebar", false, 2);                             foreach ($  leftsidebar as $  value) {                              ?>                             <aside>                                 <h2> <?php echo $  value[1]; ?></h2>                                 <div>                                 <?php                                     if($  value[2]):                                         if (function_exists('cforms_insert')){                                              echo cforms_insert(do_shortcode($  value[2]));                                          } else {                                              echo do_shortcode($  value[2]);                                          }                                      endif;                                 ?>                                 </div>                             </aside>                             <?php } ?>                     </div>                 </div> 

I did not build the site. And while I am proficient in pure HTML, I know little about PHP. Is this just a syntax issue that can be resolved with some quick fixes? Or do I need to go out and install a completely new theme (which scares the heck out of me)?

Recursive Call Inside Argument List (C++)

So, my professor asked me to implement recursion in different ways to compute $ a^n$ (a and n being integers) and rank them according to their space efficiency. Now, here is one of the methods I came up with:

  int Power (int a, int n)  { if ( n == 0 )   return 1;    if ( n % 2 == 0)   return Power(Power(a, n/2), 2);    else return Power(Power(a, n/2), 2)*a;   } 

The code compiles well, but leads to a segmentation fault. On debugging, I came to the conclusion that recursive call within the argument list is not acceptable. That is, something like

  return Power(Power(a, n/2), 2) 

or

  int m = Power(a, n/2);   return Power(m, 2); 

is not allowed but

  int m = Power(a, n/2);   return m*m; 

is allowed. Why is this the case? Is this true only in C++, or is it a general phenomenon?

Understanding why NIntegrate requires explicit substitution of variables in argument

The problem that leads me here begins with a quantity I have previously defined, let’s call it test, that has many other quantities in its definition. When evaluated, test is an expression that includes two variables, let’s call them k and x. A MWE would be

test = kx; 

I wish to create a function of k that includes a NIntegration of test over x with limits that involve k. An example would be

testint[k_] := NIntegrate[test, {x, k, 2k}]; 

Evaluating this for some k , say k = .1, returns an error:

>>testint[.1]  NIntegrate::inumr: The integrand k x has evaluated to non-numerical values for all sampling points in the region with boundaries {{0.1,0.2}}.  NIntegrate[k x, {x, 0.1, 0.2}] 

However, if I define testint using a temporary variable and perform a replacement in the argument of NIntegrate , then it computes fine:

>>testint[k1_] := NIntegrate[test/.k->k1, {x, k1, 2k1}]; >>testint[.1] 0.0015 

I found this answer, which led me to try the explicit substitution: Replace variable with value prior to evaluating NIntegrate
Another answer addresses the order of NIntegrate with the help of the ?NumericQ pattern check: How do I prevent NIntegrate::inumr errors within other functions?

My question is Why does NIntegrate require this explicit substitution in order to compute?

As a test, I even tried removing NIntegrates HoldAll attribute thinking that would force the evaluation of test before the integration. It did, but not soon enough to help.

>>test = k x; >>ClearAttributes[NIntegrate, HoldAll] >>testint[k_] := NIntegrate[testin, {x, k, 2 k}]; >>testint[.1]//Trace  NIntegrate::inumr: The integrand k x has evaluated to non-numerical values for all sampling points in the region with boundaries {{0.1,0.2}}.  {testint[0.1], NIntegrate[test, {x, 0.1, 2 0.1}], {test, k x}, {{2 0.1, 0.2}, {x, 0.1, 0.2}}, NIntegrate[k x, {x, 0.1, 0.2}], {{x} =., {x =.}, {x =., Null}, {Null}}, {x =., Null}, ... 

Thanks in advance!

An algebro-combinatorial argument that P = NP

I have long been fascinated by this question and recently wrote an article about it. The version of computation described in the article is similar to those pursued in topological quantum computing (but with access to higher topological dimensions).

See here:https://engrxiv.org/8ht2m/

Abstract from article – We present a treatise on a new quantum theoretic algorithm for solving the 3 Satisfiability problem. The presented algorithm is not a standard quantum algorithm in the sense that it is intended solely for true “physical” quantum systems (if it at all can be realized on these systems). Instead, we posit that the 3 Satisfiability problem has an intrinsic complex quantum form that can be programmed in order to build a model of the solution space for satisfiable instances or show that such a model cannot be constructed. This yields surprising results on the ability for classical systems to abstractly simulate general quantum systems. We also present other relevant structures, mathematical and physical, that bear close analogies with the methods and structures presented.

What do you think? Like all P/NP proofs, there may be just one gaping hole we can’t see?

Use a template argument both parsed and unparsed

Suppose I have a simple template Foo

The wikitext   {{{1}}}  renders as  <blockquote>{{{2}}}</blockquote> 

So including {{Foo|<nowiki>'''bold''' and ''italics''</nowiki>|'''bold''' and ''italics''}} in a page renders as

The wikitext

'''bold''' and ''italics'' 

renders as

bold and italics

Is there any way to reduce the duplication required to use template Foo? That is, either modify Foo or call it via another template in such a way that the user only needs to specify the desired wikitext once, instead of two times?

I don’t really care if it would be as

{{DRYFoo|<nowiki>'''bold''' and ''italics''</nowiki>}} 

or

{{FooDRY|'''bold''' and ''italics''}} 

and I’d be satisfied by something that used subst: to expand something else into a normal call to Foo.

The rules for order of evaluation would seem to rule out FooDRY, and I’ve been unable to find a template/parser function that would re-expand wikitext to make DRYFoo work.

Doubt regarding Cantor’s diagonalization argument

I understand the overall argument but have a problem regarding one caveat mentioned in my book.

My book says that some real numbers like 2.000… and 1.999… have different decimal representations but are actually the same real numbers. Suppose we have a bijection $ f: N \rightarrow R$ where $ N$ and $ R$ are the sets of natural and real numbers respectively. Now, suppose $ f(1) = 1.999…$ and no $ x \in N$ exists such that $ f(x) = 2.000…$ . In such a scenario it is possible that the diagonalization argument ends up constructing the real number $ 2.000…$ which is already in our list since $ 1.999…$ and $ 2.000…$ are the same real numbers. To get around this problem, we never select 0 or 9 when constructing our number.

I don’t understand two things. First, why do $ 1.999…$ and $ 2.000…$ represent the same real number? Second, how never selecting 0 or 9 solves the problem this poses?

sqlcmd ‘-U sa’ unexpected argument

Estoy intentando ejecutar un procedimiento almacenado desde la consola de comandos de windows con “sqlcmd”, y me arroja el mensaje mencionado en el titulo.

adjunto el script que intento ejecutar

sqlcmd -S ***.***.***.***\SQLEXPRESS -U sa -P ******** -Q "exec sp_rpt_cencosud_primera_gestion_0005 '20191001','20191015';" -o "C:\Reporte_Primera_Gestion_SAE_20191015.csv" Sqlcmd: '-U sa': Unexpected argument. Enter '-?' for help. 

Booting Kernel Failed: Invalid Argument (Non-VM)

Backstory: I have been trying to install Ubuntu the last few days, but I have been facing problems. First, I had to change the File System of my Ubuntu USB and then after that I am facing this problem.

What happened?: I launched the Ubuntu Installer with my USB and then say an accessibility icon and a keyboard when booting. Right after, I saw a black screen saying “Booting Kernel Failed: Invalid Argument”. I can confirm that my install of the iso is not corrupted with qBitTorrent confirming it. Also my USB is not the problem. I used Rufus’ dd mode to install Ubuntu on the drive to keep it in FAT. Also, I tried using my USB on a Chromebook but just stated a “Graphics Initialization Problem” message. I also tried writing help and enter but it did not boot.

Mounting /cow on root failed: Invalid argument overlay mount failed

I am using an xps 13 9365, which was data wiped from bios by a friend who then gave it to me thinking it was dead. I tried booting with a USB (current LTS distro (18.04 or similar)) boot disk and got into the language selection / setup menu. By using the F6 option I selected noapic. In bios sata is set to raid and legacy the secure boot option is off.

But when I try to install I get kicked into a tiny font window with the following message

(initramfs) mount: Mounting /cow on root failed: Invalid argument overlay mount failed

Any ideas?