“Invalid Protection Option”

In the following error message, the reason given is “Invalid Protection Option”. What does that indicate?

SQL Server detected a logical consistency-based I/O error: invalid protection option

For the purposes of this question, I don’t need to know anything about “how to run DBCC”, or “check for corruption”. I got that. I’m just curious about the “root cause” piece, and what could possibly cause this flavor of the logical consistency-based I/O error.

What should be the default option of a required dropdown list?

Given that there is no logically default animal from the list of animals below, what should be the “Default Value” below, according to best practice?

<label for="animal">Animal (required):</label> <select name="animal">   <option value="">Default Value</option>   <option value="0">Cat</option>   <option value="1">Dog</option>   <option value="2">Horse</option>   <option value="3">Pig</option>   <option value="4">Sheep</option> </select> 

A blank value, <option value=""></option>?

Something visually irritating, <option value="">***CHOOSE ANIMAL***</option>?

Something which blends in but provides instruction, <option value="">Select an Animal</option>?

Something else entirely?

How do I make it so that dropdown option selection is linked to radio button selection HTML?

I am brand new to web development, and I was learning about linking radio buttons when faced with a ‘choice’ on a web-site, so that you cannot select multiple radio buttons that are related to a single question.

I thought “Is it possible to make is so that you have a drop-down menu that is linked to the radio buttons, so that when you select an option from the menu, the radio buttons cannot be selected?”

Here’s what I did:

enter image description here

As you can see, I can select both the “Dogs” radio button and an option from the selection menu “Other”. At the top of the URL, it says that the name “animalSelect” is equal to both DOGS and Lemur.

How do I make it so that it only picks one or the other?

(This is also my first question, so if anybody has any suggestions for asking questions on the site, do let me know. Thank you.)

xargs: invalid option — ‘o’

I was trying to execute this command to fix yet another error (Unable to use a TTY – input is not a terminal or the right kind of file):

kubectl get pods -n foobar | grep baz | awk '{print $  1}' | xargs -J % kubectl exec -it -n foobar % /bin/bash 

Which resulted in the following error:

xargs: invalid option -- 'o' 

I was able to execute the command correctly on my Mac Mojave, but not on Ubuntu 16.04.

According to the xargs website, there should have been a -o option:

–open-tty

-o

Reopen stdin as /dev/tty in the child process before executing the command, thus allowing that command to be associated to the terminal while xargs reads from a different stream, e.g. from a pipe. This is useful if you want xargs to run an interactive application.

grep -lz PATTERN * | xargs -0o vi

But man xargs did not show this option.

The changelog did not mention any change to the flag.

My xargs version on Ubuntu 16.04 LTS:

xargs (GNU findutils) 4.7.0-git Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Eric B. Decker, James Youngman, and Kevin Dalley. 

Issue with edit Option in Action column admin grid

While Creating the admin grid the action column remains empty and the Edit option is not visible. How to resolve this issue.

This is my Ui_Component file (action section)

<actionsColumn name="action"   class="Naiwrita\Boral\Ui\Component\Listing\Column\Action">            <argument name="data" xsi:type="array">                <item name="config" xsi:type="array">                    <item name="resizeEnabled" xsi:type="boolean">true</item>                    <item name="resizeDefaultWidth" xsi:type="string">107</item>                    <item name="indexField" xsi:type="string">id</item>                </item>            </argument>        </actionsColumn> 

This is the action.php file where the edit option is implemented

class Action extends Column {     const ROW_EDIT_URL = 'sample/index/addrow';     protected $  _urlBuilder;     private $  _editUrl;     public function __construct(         ContextInterface $  context,         UiComponentFactory $  uiComponentFactory,         UrlInterface $  urlBuilder,         array $  components = [],         array $  data = [],         $  editUrl = self::ROW_EDIT_URL)      {         $  this->_urlBuilder = $  urlBuilder;         $  this->_editUrl = $  editUrl;         parent::__construct($  context, $  uiComponentFactory, $  components, $  data);     }     public function prepareDataSource(array $  dataSource)     {         if (isset($  dataSource['data']['items'])) {             foreach ($  dataSource['data']['items'] as &$  item) {                 $  name = $  this->getData('name');                 if (isset($  item['id'])) {                    $  item[$  name]['edit'] = [                         'href' => $  this->_urlBuilder->getUrl($  this->_editUrl,  ['id' => $  item['id']]),                         'label' => __('Edit'),                     ];                 }             }         }return $  dataSource;     } } 

Ubuntu boot option not showing on my macbook air unless an unrelated USB is plugged in

I tried to install Ubuntu on a 256g flash drive but it didn’t want to cooperate, so I ended up partitioning out 75g of my mac SSD for Ubuntu. I installed it fine, except when I hold option at boot to select it, I discovered it doesn’t show an option to boot into Ubuntu unless the prior flash drive (which I formatted after failing to install to it) is plugged in for whatever reason.

I saw threads saying that ubuntu can be fiddly in terms of showing up, and I tried installing rEFInd and encountered other errors.

Are there other ways to make Ubuntu visible in the boot menu? And why does a formatted flash drive make it appear?

Load respective custom field as input field when the select option is changed

I have 2 custom Posts Type

  1. Subject Clusters ( is a group of subjects)
  2. Subjects

So when a new cluster is saved, it saves a group of subjects.

Subjects (2nd custom post type) can be added via a multi-select custom field (ACF Post object) on cluster Post type edit screen. Here is the link to an image portraying it.

https://prnt.sc/odr8pj

Now in the frontend, I have created a select option for each cluster. Below that there will be a couple of subject Grade input field according to the cluster object selected.

For example, Math related cluster should populate a 4 subject input fields like the image below.

https://prnt.sc/odrdpu

Once the cluster option changes it would change fields accordingly.

Here is my code to get cluster as an option.

<?php      global $  post;     $  args = array(               'numberposts' => -1,               'post_type'   => 'cluster'             );      $  clusterlist = get_posts( $  args ); ?>      <select class="custom-select" id="inputGroupSelect01">       <option selected>Select Clusters ...</option>       <?php foreach($  clusterlist as $  post) : setup_postdata($  post);?>       <option value="<?php echo $  post->post_name; ?>"><?php the_title(); ?>        </option>      <?php  endforeach; ?>     </select> 

Now how would I get the multiple subjects selected on the cluster post type edit screen as an input field on the homepage?? field name = “subjects”

Html for input field of Math related Cluster

<div class="form-row pb-5" id="math-related"">   <div class="form-group col-md-3">     <input type="number" class="form-control" id="num1" placeholder="Math">   </div>   <div class="form-group col-md-3">     <input type="number" class="form-control" id="num2" placeholder="Science">   </div>   <div class="form-group col-md-3">     <input type="number" class="form-control" id="num3" placeholder="Computer">   </div>   <div class="form-group col-md-3">     <input type="number" class="form-control" id="num4" placeholder="Physics">   </div> </div> 

After that how to change the input fields once the option is changed?

Recoger el indice de option con javascript o similar

os comento mi problema.

Estoy haciendo un ejemplo tonto con jsp y javascript comenzar a aprender, así que aviso que no soy ningún experto y es posible que este cometiendo errores de principiante.

Verán, en el jsp recibo un arraylist con objetos de tipo usuario. Con estos objetos hago un foreach para rellenar un datalist con los atributos de nombre de los objetos usuarios y otro datalist con el atributo apellido.

<form method="POST" action="" />                  <input type="text" id="iNombre" list="ListNombres" name="nombre" placeholder="Selecciona nombre usuario" style="padding:1em; border-radius: 0px;" onchange="seleccionaCampos()" autocomplete="off"/>                 <datalist id="ListNombres">                  <c:set var="contador" value="1"></c:set>                  <c:forEach items="$  {listaUsuarios}" var="usuario">                      <option value="$  {usuario.nombre}" id="oName_$  {contador}"/>                      <c:set var="contador" value="$  {contador+1}"></c:set>                 </c:forEach>                  </datalist>                  <input type="text" id="iApellido" list="ListApellido1" name="apellido" placeholder="Selecciona apellido usuario" style="padding:1em; border-radius: 0px;" autocomplete="off"/>                 <datalist id="ListApellido1">                  <c:set var="contador" value="1"></c:set>                  <c:forEach items="$  {listaUsuarios}" var="usuario">                      <option value="$  {usuario.apellido1}" id="oApellido_$  {contador}"/>                      <c:set var="contador" value="$  {contador+1}"></c:set>                 </c:forEach>                  </datalist>              </form> 

Lo que me gustaría hacer es que al seleccionar un valor en el campo nombre de la lista de nombres se seleccione automáticamente el campo que tendría el mismo indice, es decir, pertenecería al mismo objeto usuario en la lista de apellido. Pero no tengo claro si eso es posible o si tiene muchísima complicación, ya que mi nivel de js es prácticamente nulo. He estado dando palos de ciego en con la función que lo haría y leyendo, pero sigo sin ver la luz ni de refilón.

No se si al seleccionar un option se le coloca el atributo selected y en base a eso puedo recoger el valor que este en ese momento seleccionado. Y después recoger el option en el que coincida coincida el valor seleccionado anteriormente con el value establecido en el option y ya teniendo el elemento, en base al id, sacar el indice con un split. Y asi poder seleccionar el value del datalist de apellidos con id=oApellido+contador y asignar ese valor al input de apellidos?? O si hay alguna manera más sencilla? o si lo que he dicho tiene sentido xDD Tampoco se si al seleccionar elementos por atributos te devuelve siempre un array. En fín… que cualquier indicativo es útil.

Espero haberme explicado más o menos bien, que no suelo hacerlo mucho. Espero no estar diciendo muchas barbaridades y si es así que me sean perdonadas. Prometo lectura constante para que estas sean subsanadas.

Gracias de antemano.