## if $B$ is a boolean algebra and $a\neq b$ in $B$ there exist an ultrafilter containing $a$ but not $b$.

Suppose $$a$$ and $$b$$ are distinct elements in a boolean algebra $$B$$. I am trying to show there is an ultrafilter on $$B$$ containing $$a$$ but not $$b$$. Does this follow from the fact (is this a fact?) that $$a = \wedge \{F:F \text{ is an ultrafilter on B and } a\in F\}$$?

## How can I translate the ‘enabled’ Boolean of menu items?

I’m trying to translate the ‘enabled’ field of a menu item in Drupal 8. So far I have written this code in mymodule.module file:

function mymodule_entity_base_field_info_alter(&$fields, \Drupal\Core\Entity\EntityTypeInterface$  entity_type) {   if ($entity_type->id() == 'menu_link_content' && !empty($  fields['enabled'])) {     $fields['enabled']->setTranslatable(TRUE); } return$  fields; }  

This works fine and I am able to set the enabled field differently for different languages. eg: for the same menu item, I can check the ‘enabled’ field for English, but uncheck the ‘enabled’ field for French.

But it does not work as expected. It hides the menu item for all languages. Should I use hook_preprocess() or hook_preprocess_menu() or some other hook for the menu item to show/hide based on ‘enabled’ field in different languages? Can someone give me some hints on this?

## Partitioning a boolean circuit for automatic parallelization

tl;dr: I have a problem where I have a Boolean circuit and need to implement it with very specific single-thread primitives, such that SIMD computation is significantly cheaper after a threshold. I’m trying to optimize the implementation.

Going into detail, the input is a combinatorial Boolean circuit (so no loops, state, etc.). I’m implementing it in software with a rather unusual set of primitives, such that:

• logic gates must be computed one at a time, as the “engine” is single-threaded
• NOT gates are free
• AND, OR, XOR have a cost of 1 (eg. 1 second)
• N identical gates can be evaluated at the same time for a cost of 10 plus some tiny proportional term (eg. a batch of 20 distinct AND gates can be evaluated in 10 seconds, 50 distinct XOR gates in ~10 seconds, etc.)

The objective is to implement the circuit with the given primitives while minimizing the cost.

### What I tried

This problem looks vaguely related to the bin packing problem, but the differences – constraints on the order of the items and different cost for each “bin” depending on the number of items – make me think it’s not particularly applicable.

I was suggested to use integer linear programming, which sounds like the best fit so far, but I’m not sure how to represent the problem. Specifically, I’d use binary variables to represent whether the implementation gate/batch M is used in place of the circuit gate N, but then I don’t know how to express the objectives to be maximized/minimized.

## Boolean Functions Implemented by Multiplexers

Electrical engineers often use multiplexers to implement Boolean functions. What is the correct technical term for this model of computation? Is it Decision Tree model or is there another name?

## Prime Implicants in Boolean Function

A Boolean function $$F(X_1, X_2, X_3, X_4, X_5, X_6)$$ of six variables is defined as $$F = 1$$, when three or more input variables are at logic 1. otherwise 0. How many essential prime implicants does F have?

How to visualize this problem. A Six Variable k-map is very difficult to manage. Any hints?

## How to select all checkbox in mvc through javascript. Changing also a Boolean in the model

   $("#chkSelectAllClienteArquivo").bind("change", function () {$  (".chkSelectClienteArquivo").prop("checked", $(this).prop("checked")); debugger; })$  (".chkSelectClienteArquivo").bind("change", function () {         var numChecked = 0;         var numchk = $('.chkSelectClienteArquivo:checkbox').length; //debugger; var id =$  (this).attr("data-id");         var index = $(this).attr("data-index"); var trClienteArquivo =$  (("#trclientearquivo_" + id));         debugger;          trClienteArquivo.find("input[type=hidden][id*='clientes_" + index + "__selecionado']").val($(this).prop("checked"));$  ('.chkSelectClienteArquivo:checkbox:checked').each(function (i) {             if ($(this).prop("checked")) { numChecked++; } }); if (numChecked == 0) {$  ("#chkSelectAllClienteArquivo").prop('indeterminate', false);             $("#chkSelectAllClienteArquivo").prop("checked", false); } else if ((numChecked > 0) && (numChecked < numchk)) {$  ("#chkSelectAllClienteArquivo").prop('indeterminate', true);         }         else if (numChecked == numchk) {             $("#chkSelectAllClienteArquivo").prop('indeterminate', false);$  ("#chkSelectAllClienteArquivo").prop('checked', true);         }     })
<table id="tableclientesarquivos" class="table">     <thead style="vertical-align:top; text-align:center;">         <tr>             <th>Incluir no Projeto<br /> <input type="checkbox" id="chkSelectAllClienteArquivo" /></th>             <th>Grupo Econômico</th>             <th>CNPJ</th>             <th>Nome</th>             <th>Inscrição Estadual</th>         </tr>     </thead>     <tbody id="tablebodyclientesarquivos">          @foreach (var cliente in Model)         {             trId = string.Format("trclientearquivo_{0}", cliente.Cnpj);              <tr id="@trId">                 @Html.Hidden(string.Format("clientes[{0}][Cnpj]", index), cliente.Cnpj)                 @Html.Hidden(string.Format("clientes[{0}][Nome]", index), cliente.Nome)                 @Html.Hidden(string.Format("clientes[{0}][InscricaoEstadual]", index), cliente.InscricaoEstadual)                 @Html.Hidden(string.Format("clientes[{0}][selecionado]", index), cliente.selecionado)                 @Html.Hidden(string.Format("clientes[{0}][CodigoUF]", index), cliente.CodigoUF)                 @Html.Hidden(string.Format("clientes[{0}][CodMunicipio]", index), cliente.CodMunicipio)                  <td>                     <input type="checkbox" id="chkSelect_@cliente.Cnpj" class="chkSelectClienteArquivo" data-id="@cliente.Cnpj" data-index="@index" />                 </td>                 <td>                     @if (cliente.grupoeconomico != null)                     {                         @cliente.grupoeconomico.greNome                                             @Html.Hidden(string.Format("clientes[{0}][grupoeconomico.greCodigo]", index), cliente.grupoeconomico.greCodigo)                         @Html.Hidden(string.Format("clientes[{0}][grupoeconomico.greNome]", index), cliente.grupoeconomico.greNome)                     }                     else                     {                         <button type="button" id="button_@cliente.Cnpj" data-id="@cliente.Cnpj" onclick='OnGrupoEconomicoClick(this)'>Cadastrar</button>                                                @Html.Hidden(string.Format("clientes[{0}][grupoeconomico.greCodigo]", index), null)                         @Html.Hidden(string.Format("clientes[{0}][grupoeconomico.greNome]", index), "")                     }                 </td>              </tr>              index++;         }      </tbody> </table>

I want it when I click on: chkSelectAllClientFile change the client.selected model = true

## How to display a block if a Boolean on/off checkbox is checked?

I will eventually install Panels to accomplish this. But I can’t at this time. I want to allow an editor to display a right sidebar menu on any page when they want by checking a Single on/off checkbox . I added a CCK field to the Page type – Boolean -Single on/off checkbox. I am using Drupal 7.43 on Centos 7 and php 5.4

There is a php block invoke inside another php that checks if a cck field is not null. The first php is looking at the Boolean field ‘field_hide_sidebar_menu’ to see if it is null or not checked. If it is null it will display the block. This is not working. I have used ‘if!empty’ before to check if an image field is null and it works. Now I want it to check if the Boolean is checked or not checked so do I need to write this in a different way to check if the Boolean value is on or off – equal to 1 or equal to 0. Here is my code:

<?php if (!empty($entity['field_hide_sidebar_menu'])): ?> <div id="myclass"> <h2>Menu</h2> <?php$  block = module_invoke('views', 'block_view', 'menu_sidebar-block_1'); print render(\$  block['content']);?></div><?php  endif; ?> 

## What is the minimun type of logical system that allows to determine if formalized sentence is well-wormed formula or not boolean type?

This question has two parts. On the other hand I’d like to get a clarification what kind of theoretical and logical framework is required to implement a system that has propositional and predicate functionality, but also can determine, if formal sentence is not boolean type at all. Related to that what is needed to determine teoretical wise if given sentence is well formed at all? Hope, this makes sense.

## Boolean expression for sum bit of full adder

The Boolean expression I find on the internet for the sum bit of a full adder is A xor B xor Cin. Does’t this expression exclude the A=1,B=1,Cin=1 situation? When that happens, the sum bit is also 1, isn’t it?

Thank you very much.

## Fatal error: Call to a member function setData() on boolean in /app/code/core/Mage/Eav/Model/Config.php on line 651

Combined a Magento 1.9.0. database with a Magento 1.9.4.1. basic installation and get this error:

Fatal error: Call to a member function setData() on boolean in /app/code/core/Mage/Eav/Model/Config.php on line 651

Any ideas ?