text:
Q: Edit image into circle shape and insert into another image in Swift I have image1, I would like to make that image circle shape and then insert it into image2. How to do it using swift? I can't do this with photoshop or other image editing tool, because my image1 will may be different every time.
EDIT: This what I am trying to achieve:

Flower is image1.
EDIT 2: What I have tried and kind of works:
let image2 = UIImage(named: "RedPin")
let newSize = CGSizeMake(image2!.size.width, image2!.size.height)
UIGraphicsBeginImageContext(newSize)

image2!.drawInRect(CGRectMake(0,0,newSize.width,newSize.height))

let imageView: UIImageView = UIImageView(image: image1)
var layer: CALayer = CALayer()
layer = imageView.layer

layer.masksToBounds = true
layer.cornerRadius = CGFloat(65)

UIGraphicsBeginImageContext(imageView.bounds.size)
layer.renderInContext(UIGraphicsGetCurrentContext()!)
let roundedImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()

// decrease top image size
roundedImage.drawInRect(CGRectMake(10,10,45,45), blendMode: .Normal, alpha:1.0)

let createdNewImage = UIGraphicsGetImageFromCurrentImageContext()

Yet image1 is more a square with rounded edges and in general image seems to be low quality. Here is what that function above does:

EDIT 3: Toucan library is great at creating rounded images (let roundedImage = Toucan(image: newImage).maskWithEllipse().image), however final image version still looks blurry. Why's that?

A: I have Set image like this with rounded corner with same code like you.
func UserImageForAnnotation() -> UIImage {

        let userPinImg : UIImage = UIImage(named: "pin_user.png")!
        UIGraphicsBeginImageContextWithOptions(userPinImg.size, false, 0.0);

        userPinImg.drawInRect(CGRect(origin: CGPointZero, size: userPinImg.size))

        let roundRect : CGRect = CGRectMake(2, 2, userPinImg.size.width-4, userPinImg.size.width-4)

        let myUserImgView = UIImageView(frame: roundRect)
        myUserImgView.image = UIImage(named: "pic.png")
        //        myUserImgView.backgroundColor = UIColor.blackColor()
        //        myUserImgView.layer.borderColor = UIColor.whiteColor().CGColor
        //        myUserImgView.layer.borderWidth = 0.5

        let layer: CALayer = myUserImgView.layer

        layer.masksToBounds = true
        layer.cornerRadius = myUserImgView.frame.size.width/2

        UIGraphicsBeginImageContextWithOptions(myUserImgView.bounds.size, myUserImgView.opaque, 0.0)
        layer.renderInContext(UIGraphicsGetCurrentContext()!)
        let roundedImage = UIGraphicsGetImageFromCurrentImageContext()
        UIGraphicsEndImageContext()

        roundedImage.drawInRect(roundRect)

        let resultImg : UIImage = UIGraphicsGetImageFromCurrentImageContext()
        UIGraphicsEndImageContext()

        return resultImg

    }

Which gives me exact result what I want in my pin image.


text:
Q: Python: Equation symbolic solution I was wondering if there was any way I could get the symbolic solution for a variable in an equation using python, as I've been looking around but didn't find exactly what I wanted. What I intend to do is, for example, given:
eq =  x + y + 5
I'd like to get:
x = - 5 - y

A: from sympy import *
x, y = symbols('x, y')
expr = x + y + 5
solve(expr, x)
>>>Out: [-5-y]

redpajama_set_name: RedPajamaStackExchange


text:
Q: docker container runtime application configurations We have a java application. It connects to the oracle database. It has three properties files and the customer changes value of those properties files when we deployed our application to the customer site. We have another python script that allows customer to modify those properties files and start the main app after configuration is done.
Now we want to containerized our java app and want to use swarm mode. the only problem is to find the easy way for customer to edit those properties files before I start the container.
Any ideas docker Gurus ?
Help is very much appreciated.


text:
Q: Using DatePicker Inside a Bootstrap Modal Im trying to assign an input text field a datepicker value however because it's in a modal i am having trouble. It could even be because i dont know what scripts and stylesheets to bring in. Here's the code
// A simple callback implementation.
function pickerCallback(data) {
  if (data.action == google.picker.Action.PICKED) {
    var fileId = data.docs[0].id;
    $('#\\#myModal').modal('show');
 }
}

$(date).ready(function(){
    var date_input=$('input[name="date"]'); //our date input has the name "date"
    var container=$('.bootstrap-iso form').length>0 ? $('.bootstrap-iso form').parent() : "body";
    var options={
      format: 'mm/dd/yyyy',
      container: container,
      todayHighlight: true,
      autoclose: true,
    };
    date_input.datepicker(options);
  })

</script>

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet" />

        <button type="button" class="close" data-dismiss="modal" aria-  label="Close">×

    </button>

Set Metadata

     Department ID: <select id = "drop" style="margin-bottom: 0.25cm;">
    <option value="#001">#001---Law</option>
    <option value="#002">#002---Sales</option>
    <option value="#003">#003---Tech</option>
  </select>

        Date:<input type="text" id = "date" style="margin-left: 60px; margin-bottom: 0.25cm;" placeholder="MM/DD/YYY"/>

    Additional Tag: <input type="text" id="metadata" style="overflow: hidden; padding-right: .5em; margin-bottom: 0.25cm;" onkeydown="if(event.keyCode == 13) document.getElementById('set_tag').click();"/>

    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
    <button type="button" class="btn btn-primary" onclick="setMeta(document.getElementById('drop').value)">Save changes</button>

I just want it so that when the if statement at the top occurs, the modal dialog appears (which it does) but it appears with the datepicker in the textbox. If anyone knows a fix that'd be great.


text:
Q: One or more problems with multiple where clauses in ASP LDAP query I have a script, written in ASP, that will list Active Directory users who aren't disabled. My query looks like this (but here I use a fake DN):
objCom.CommandText ="select givenName,sn,mail,telephonenumber,mobile,description,sAMAccountName,cn,UserAccountControl FROM 'LDAP://OU=Users,DC=example,DC=internal' where UserAccountControl <> 514 OR where UserAccountControl <> 2 AND sAMAccountname ='*' ORDER by cn ASC"

The problem is that when I just have the one where statement it works fine and outputs the list of users but when I have both, the following message is returned
Provider error '80040e14'
One or more errors occurred during processing of command.
/ldap.asp, line 25
No idea what the problem is but I think, since it works with the one WHERE statement, that it is something to do with the query. Can you shed some light on this for me?

A: The SQL syntax for multiple conditions is to use the appropriate boolean operators (AND or OR, generally, though others are possible) to string together the conditions, employing parentheses as needed. Don't repeat the WHERE clause: that would be just as wrong as repeating the SELECT or the FROM.
SELECT givenName, sn, mail, telephonenumber, mobile, description, sAMAccountName, cn, UserAccountControl
FROM 'LDAP://OU=Users,DC=example,DC=internal'
WHERE UserAccountControl <> 514 OR UserAccountControl <> 2 AND sAMAccountname ='*'
ORDER by cn ASC


text:
Q: Изменить значение в input по клику на кнопки +/- и взять значение из div Как изменить значение input по клику на кнопки (+/-) и взять значение из имеющейся таблицы если комплектов кнопок и input на странице может быть несколько?

$(function() {
      var countInputs = document.getElementsByClassName('count-buttons');

      for (var input in countInputs) {
        if (!countInputs.hasOwnProperty(input)) {
          continue;
        }

        var butM = input.getElementsByClassName('btn-minus');
        var butP = input.getElementsByClassName('btn-plus');

        var units = countInput.value.replace(/\d/g, '');

        butP.onclick = function() {
          countInput.value = parseInt(countInput.value) + 1 + units;
        };

        butM.onclick = function() {
          if (parseInt(countInput.value) > 1) {
            countInput.value = parseInt(countInput.value) - 1 + units;
          }
        };

        $(function() {
          document.querySelector('.count-buttons').onmouseover = (function() {
            document.querySelector('.count-buttons__table').style.display = 'table';
          });
          document.querySelector('.count-buttons__table').onmouseout = (function() {
            document.querySelector('.count-buttons__table').style.display = 'none';
          });

          var elems = document.querySelectorAll('.count-buttons__table-td');

          for (var i = elems.length - 1; i >= 0; i--) {
            elems[i].addEventListener('click', myFunc, false);
          }

          function myFunc() {
            document.getElementsByClassName('qty').value = this.innerHTML;
          }
        });

  <button type="button" class="btn ctrl btn-minus">
         −</button>
  <input name="" value="" size="4" title="" class="input-text qty" maxlength="12" />
  <button type="button" class="btn ctrl btn-plus">+</button>

6

12

18

24

30

36

jsfiddle
UPD
Суть в том, что значения для value можно получить двумя способами:

*

*по нажатию кнопки + или - (соответственно, число либо увеличивается на 1 либо уменьшается) пример

*выбрать число из выпадающей таблицы (числа никогда не меняются) пример

A: Можно как-то так решить эту задачу.

var Counter = function(counter) {
  // Сохраняем все, чтобы можно было использовать в методах

  // Счетчик
  this.counter = counter;

  // Ячейки таблицы
  this.cells = counter.querySelectorAll('.table__td');
  this.cells = Array.prototype.slice.call(this.cells);

  // Кнопку «минус»
  this.minus = counter.querySelector('.counter__minus');

  // Кнопку «плюс»
  this.plus = counter.querySelector('.counter__plus');

  // Инпут
  this.field = counter.querySelector('.counter__input');

  // Инициализируем события
  this.events();
}

// Метод отвечающий за вызов слушателей
Counter.prototype.events = function() {
  // Обработчик кнопки «плюс»
  this.plus.addEventListener('click', this.increment.bind(this));

  // Обработчик кнопки «минус»
  this.minus.addEventListener('click', this.decrement.bind(this));

  // Пробегаемся по ячейкам таблицы
  for(var cell in this.cells) {
    // и на каждый навешиваем обработчик
    this.cells[cell].addEventListener('click', this.changeFromTable.bind(this, this.cells[cell]));
  }
}

// Берет значение из ячейки и ставит его в инпут
Counter.prototype.changeFromTable = function(cell) {
  this.field.value = cell.textContent;
}

// Метод увеличивает значение в поле на 1
Counter.prototype.increment = function() {
  this.field.value = parseInt(this.field.value) + 1;
}

// Метод уменьшает значение в поле на 1
Counter.prototype.decrement = function() {
  // Сохраняем новое значение в переменную
  var newValue = parseInt(this.field.value) - 1;

  // Если оно меньше нуля - делаем нулем
  if(newValue < 0) {
    newValue = 0;
  }

  // Меняем значение в инпуте
  this.field.value = newValue;
}

// Собираем список всех счетчиков на странице
var counters = document.querySelectorAll('.counter');

// Превращаем в массив
counters = Array.prototype.slice.call(counters);

// Проблегаемся по счетчикам
counters.forEach(function(counter) {
  // И инициализируем каждый
  new Counter(counter);
});
.table {
  font-size: 0;
  margin-top: 5px;
}
.table__td {
  cursor: pointer;
  font: 14px sans-serif;
  display: inline-block;
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid #ccc;
}

.table__td + .table__td {
  margin-left: 5px;
}

.table__td:hover {
  background-color: #f5f5f5;
}

hr {
  height: 1px;
  margin: 15px 0;
  background-color: #ccc;
  color: #ccc;
  border: none;
}

  <button class="counter__minus">−</button>

  <input class="counter__input" type="text" readonly value="0">
  <button class="counter__plus">+</button>

6

12

18

24

30

36

  <button class="counter__minus">−</button>

  <input class="counter__input" type="text" readonly value="0">
  <button class="counter__plus">+</button>

6

12

18

24

30

36

Если непонятно что происходит, почему я использую this, prototype и new, то прочитайте главы «ООП в прототипном стиле» и «Методы объектов и контекст вызовов».

A: К сожалению, предложенный @dmitryshishkin ответ мне не подошел, т.к. возникала странная ошибка - при клике на кнопки +/- значение увеличивалось/уменьшалось сразу на два числа...
В итоге, мне подошел этот код:
counters = [].slice.call(document.querySelectorAll('.count-buttons'));

    counters.forEach(function(counter) {
        var input = counter.querySelector('.input-text');

        counter.querySelector('.btn-minus').onclick = function () {
            var newValue = +input.value - 1;

            if (newValue >= 1) {
                input.value = newValue;
            }
        };

        counter.querySelector('.btn-plus').onclick = function () {
            input.value = +input.value + 1;
        };

        counter.querySelector('.count-buttons__table').onclick = function (evt) {
            input.value = evt.target.textContent;
            this.style.display = 'none';
        }
    });

A: Задача не совсем ясна.
Если хотите поле ввода с кнопками -/+ и всплывающими вариантами, то вот:

var $d = document,
    cbsTable,
    callerEl;

$d.addEventListener('DOMContentLoaded', () => {
  cbsTable = $d.createElement('table');
  cbsTable.id = 'cbtn-table';
  cbsTable.addEventListener('click', onTableClick);
  $d.body.appendChild(cbsTable);

  let cbs = $d.getElementsByClassName('cbtn-combobox');
  for (let cb of cbs) {
    cb.addEventListener('click', onCbClick);
    cb.addEventListener('input', onCbInput);
    cb.addEventListener('blur', () => setTimeout(() => {
      if (!$d.activeElement.classList.contains('cbtn-combobox'))
        cbsTable.style.visibility = 'hidden';
    }, 150));
    cb.contentEditable = true;
  }
  console.log('Клик по значению вызывает всплывающую таблицу.');
});

function onCbInput(e) {
  let cPos   = getCaretPosCe(this, true),
      newVal = +(this.textContent.match(/\d/g) || [0]).join('');
  this.textContent = Math.min(99999, newVal);
  setCaretPosCe(this, cPos, true);
}

function onCbClick(e) {
  let cs   = getComputedStyle(this),
      btnW = parseInt(cs.getPropertyValue('--btn-width')),
      mX   = e.clientX - this.getBoundingClientRect().left,
      crrVal = parseInt(this.textContent) || 0,
      newVal = null;
  newVal = (mX < btnW) ? --crrVal :
    (mX > this.offsetWidth - btnW) ? ++crrVal : null;
  if (newVal !== null) {
    this.textContent = Math.min(99999, Math.max(0, newVal));
    setCaretPosCe(this, 0, true);
  }
  callerEl = this;
  showPopupTable();
}

function showPopupTable() {
  let tDataStr = callerEl.dataset.table;
  if (!tDataStr)
    return;
  cbsTable.innerHTML = '';
  let row;
  tDataStr.split('|').forEach(rowStr => {
    row = cbsTable.insertRow();
    rowStr.split(',').forEach(cellValue => {
      row.insertCell().textContent = cellValue;
    });
  });
  let bcr = callerEl.getBoundingClientRect();
  cbsTable.style.top = (bcr.bottom + 2) + 'px';
  cbsTable.style.left = bcr.left +
    (callerEl.offsetWidth - cbsTable.offsetWidth)  / 2 + 'px';
  cbsTable.style.visibility = 'visible';
}

function onTableClick(e) {
  let clckd = e.target;
  if (clckd.tagName.toLowerCase() === 'td')
    callerEl.textContent = parseInt(clckd.textContent) || 0;
}

function getCaretPosCe(el, fromEnd = false) {
  let pos = 0,
      sel = window.getSelection();
  if (sel.rangeCount) {
    let rng = sel.getRangeAt(0);
    if (rng.commonAncestorContainer.parentNode === el) {
      pos = !fromEnd ? rng.endOffset :
        el.textContent.length - rng.endOffset;
    }
  }
  return pos;
}

function setCaretPosCe(el, pos, fromEnd = false) {
  let sel = window.getSelection(),
      rng = document.createRange();
  if (fromEnd)
    pos = Math.max(0, el.textContent.length - pos);
  else
    pos = Math.min(pos, el.textContent.length);
  rng.setStart(el.childNodes[0], pos);
  rng.collapse(true);
  sel.removeAllRanges();
  sel.addRange(rng);
}
#container {
  display: flex;
  justify-content: space-around;
  margin: 25vh 10vw;
}

.cbtn-combobox,
#cbtn-table td {
  background-color: #fff;
  font: 16px monospace;
}

.cbtn-combobox {
  --btn-width: 20px;
  width: calc(3ch + var(--btn-width) * 2 + 24px);
  display: inline-flex;
  line-height: 1.8em;
  text-align: center;
  border: 1px solid #ccc;
}

.cbtn-combobox:before,
.cbtn-combobox:after {
  display: inline-block;
  flex: 0 0 var(--btn-width);
  background-color: #eee;
  cursor: pointer;
  visibility: hidden;
}
.cbtn-combobox:before { content: '-'; margin-right: auto; }
.cbtn-combobox:after  { content: '+'; margin-left: auto; }

.cbtn-combobox:focus:before,
.cbtn-combobox:focus:after,
.cbtn-combobox:hover:before,
.cbtn-combobox:hover:after {
  visibility: visible;
}

#cbtn-table {
  position: absolute; z-index: 99;
  border-collapse: collapse;
  background-color: #eee;
  box-shadow: 0 2px 5px 0 #0002;
  visibility: hidden;
}

#cbtn-table td {
  width: calc(3ch + 10px);
  line-height: 1.8em;
  text-align: center;
  border: 1px solid #ccc;
}

42

123

1

Плюс вариант, таблица из кастомных "input'ов":

var $d = document;

$d.addEventListener('DOMContentLoaded', () => {
  let tds = $d.getElementsByClassName('cbtn-table-td');
  for (let td of tds) {
    td.addEventListener('click', onTdClick);
    td.addEventListener('input', onTdInput);
    td.contentEditable = true;
  }
  console.log('Кнопки показываются при наведении на ячейку')
});

function onTdInput(e) {
  let cPos   = getCaretPosCe(this, true),
      newVal = +(this.textContent.match(/\d/g) || [0]).join('');
  this.textContent = Math.min(999, newVal);
  setCaretPosCe(this, cPos, true);
}

function onTdClick(e) {
  let cs   = getComputedStyle(this),
      btnW = parseInt(cs.getPropertyValue('--btn-width')),
      mX   = e.clientX - this.getBoundingClientRect().left,
      crrVal = parseInt(this.textContent) || 0,
      newVal = null;
  newVal = (mX < btnW) ? --crrVal :
    (mX > this.offsetWidth - btnW) ? ++crrVal : null;
  if (newVal !== null) {
    this.textContent = Math.max(0, newVal);
    setCaretPosCe(this, 0, true);
  }
}

function getCaretPosCe(el, fromEnd = false) {
  let pos = 0,
      sel = window.getSelection();
  if (sel.rangeCount) {
    let rng = sel.getRangeAt(0);
    if (rng.commonAncestorContainer.parentNode === el) {
      pos = !fromEnd ? rng.endOffset :
        el.textContent.length - rng.endOffset;
    }
  }
  return pos;
}

function setCaretPosCe(el, pos, fromEnd = false) {
  let sel = window.getSelection(),
      rng = document.createRange();
  if (fromEnd)
    pos = Math.max(0, el.textContent.length - pos);
  else
    pos = Math.min(pos, el.textContent.length);
  rng.setStart(el.childNodes[0], pos);
  rng.collapse(true);
  sel.removeAllRanges();
  sel.addRange(rng);
}
.cbtn-table {
  --btn-width: 20px;
  --td-width: calc(3ch + var(--btn-width) * 2 + 8px);
  font: 16px monospace;
}

.cbtn-table-tr,
.cbtn-table-td {
  margin: 0; padding: 0;
}

.cbtn-table-tr {
  display: flex;
  line-height: 1.8em;
  padding: 0; margin-top: -1px;
  white-space: nowrap;
}
.cbtn-table-td:first-child {
  margin: 0;
}

.cbtn-table-td {
  display: inline-flex;
  min-width: var(--td-width);
  margin-left: -1px;
  text-align: center;
  border: 1px solid #ccc;
}
.cbtn-table-td:first-child {
  margin: 0;
}

.cbtn-table-td:before,
.cbtn-table-td:after {
  display: inline-block;
  flex: 0 0 var(--btn-width);
  cursor: pointer;
  visibility: hidden;
}
.cbtn-table-td:before { content: '-'; margin-right: auto; }
.cbtn-table-td:after  { content: '+'; margin-left: auto; }

.cbtn-table-td:hover:before,
.cbtn-table-td:hover:after {
  visibility: visible;
  background-color: #ddd;
}

6

212

18

24

30

36

Код далеко не кроссбраузерный, это только примеры.


text:
Q: How can I find out the md5sum of boot-repair-disk.ISO? I have downloaded boot-repair-disk.ISO, but it is recommended to check the md5sum. Previous downloads have not worked possibly because the download was corrupted. At present running  Kubuntu 16.04 on Live USB on dual boot with Windows 7, which screwed up booting when I tried upgrade to W10

A: Together with the download you should have had an offer to download the checksum file. In case of that you have a checksum file you would call:
# change according to how the sum file is called and make sure both are in the same directory
md5sum -c boot-repair-disk.ISO.sum

A: Once you burn the iso into an usb, open up the console in usb path.
You will find a file called md5sum.txt
run md5sum -c md5sum.txt and it will check every folder in USB drive, it will display a message for every folder
In this example some folders don-t match
./README.diskdefines: La suma coincide
./pics/blue-lowerright.png: La suma coincide
./pics/blue-upperleft.png: La suma coincide
./pics/logo-50.jpg: La suma coincide
./pics/debian.jpg: La suma coincide
./pics/blue-upperright.png: La suma coincide
./pics/blue-lowerleft.png: La suma coincide
./pics/red-lowerleft.png: La suma coincide
./pics/red-upperright.png: La suma coincide
./pics/red-upperleft.png: La suma coincide
./pics/red-lowerright.png: La suma coincide
./install/README.sbm: La suma coincide
./install/sbm.bin: La suma coincide
./install/mt86plus: La suma coincide
./boot/grub/loopback.cfg: La suma coincide
./boot/grub/grub.cfg: La suma coincide
./EFI/BOOT/bootia32.efi: La suma coincide
./dists/bionic/multiverse/binary-i386/Release: La suma coincide
./dists/bionic/multiverse/binary-i386/Packages.gz: La suma coincide
./dists/bionic/Release.gpg: La suma coincide
./dists/bionic/restricted/binary-i386/Release: La suma coincide
./dists/bionic/restricted/binary-i386/Packages.gz: La suma coincide
./dists/bionic/Release: La suma coincide
./dists/bionic/main/binary-i386/Release: La suma coincide
./dists/bionic/main/binary-i386/Packages.gz: La suma coincide
./dists/bionic/universe/binary-i386/Release: La suma coincide
./dists/bionic/universe/binary-i386/Packages.gz: La suma coincide
./pool/main/m/mouseemu/mouseemu_0.16-0ubuntu10_i386.deb: La suma coincide
./pool/main/m/make-dfsg/make_4.1-9.1ubuntu1_i386.deb: La suma coincide
./pool/main/s/setserial/setserial_2.17-50_i386.deb: La suma coincide
./pool/main/h/hw-detect/archdetect-deb_1.117ubuntu6.18.04.1_i386.deb: La suma coincide
./pool/main/libf/libfile-fcntllock-perl/libfile-fcntllock-perl_0.22-3build2_i386.deb: La suma coincide
./pool/main/libd/libdebian-installer/libdebian-installer4_0.110ubuntu2_i386.deb: La suma coincide
./pool/main/u/ubiquity/ubiquity_18.04.14.15_i386.deb: La suma coincide
./pool/main/u/ubiquity/oem-config_18.04.14.15_all.deb: La suma coincide
./pool/main/u/ubiquity/oem-config-gtk_18.04.14.15_all.deb: La suma coincide
./pool/main/u/ubiquity/ubiquity-frontend-gtk_18.04.14.15_i386.deb: La suma coincide
./pool/main/u/ubiquity/ubiquity-ubuntu-artwork_18.04.14.15_all.deb: La suma coincide
./pool/main/u/user-setup/user-setup_1.63ubuntu5_all.deb: La suma coincide
./pool/main/r/rdate/rdate_1.2-6_i386.deb: La suma coincide
./pool/main/libt/libtimezonemap/libtimezonemap-data_0.4.5_all.deb: La suma coincide
./pool/main/libt/libtimezonemap/libtimezonemap1_0.4.5_i386.deb: La suma coincide
./pool/main/libt/libtimezonemap/gir1.2-timezonemap-1.0_0.4.5_i386.deb: La suma coincide
./pool/main/libx/libxklavier/gir1.2-xkl-1.0_5.4-3_i386.deb: La suma coincide
./pool/main/n/network-manager/gir1.2-nm-1.0_1.10.6-2ubuntu1.4_i386.deb: La suma coincide
./pool/main/n/network-manager-applet/gir1.2-nma-1.0_1.8.10-2ubuntu3_i386.deb: La suma coincide
./pool/main/i/ido/libido3-0.1-0_13.10.0+17.04.20161028-0ubuntu1_i386.deb: La suma coincide
./pool/main/j/json-glib/gir1.2-json-1.0_1.4.2-3ubuntu0.18.04.1_i386.deb: La suma coincide
./pool/main/p/pptp-linux/pptp-linux_1.9.0+ds-2_i386.deb: La suma coincide
./pool/main/p/python-pam/python3-pam_0.4.2-13.2ubuntu4_i386.deb: La suma coincide
./pool/main/p/pyicu/python3-icu_1.9.8-0ubuntu1_i386.deb: La suma coincide
./pool/main/d/dpkg-repack/dpkg-repack_1.43_all.deb: La suma coincide
./pool/main/d/dpkg/libdpkg-perl_1.19.0.5ubuntu2.3_all.deb: La suma coincide
./pool/main/a/apt-clone/apt-clone_0.4.1ubuntu2_all.deb: La suma coincide
./pool/main/c/cryptsetup/cryptsetup_2.0.2-1ubuntu1.1_i386.deb: La suma coincide
./pool/main/c/cryptsetup/cryptsetup-bin_2.0.2-1ubuntu1.1_i386.deb: La suma coincide
./pool/main/c/casper/ubiquity-casper_1.394.3_all.deb: La suma coincide
./pool/main/l/lupin/lupin-support_0.57build1_i386.deb: La suma coincide
./pool/universe/g/grub2/grub2_2.02-2ubuntu8.17_i386.deb: La suma coincide
./pool/universe/c/caspar/caspar_20170830-1_all.deb: La suma coincide
./.disk/cd_type: La suma coincide
./.disk/base_installable: La suma coincide
./.disk/casper-uuid-generic: La suma coincide
./.disk/release_notes_url: La suma coincide
./.disk/info: La suma coincide
./casper/filesystem.squashfs.gpg: La suma coincide
./casper/filesystem.manifest: La suma coincide
./casper/filesystem.size: La suma coincide
./casper/filesystem.squashfs: La suma no coincide
./casper/initrd: La suma coincide
./casper/filesystem.manifest-remove: La suma coincide
./casper/vmlinuz: La suma coincide
./casper/filesystem.manifest-minimal-remove: La suma coincide
./preseed/cli.seed: La suma coincide
./preseed/lubuntu.seed: La suma coincide
md5sum: ATENCIÓN: 1 suma calculada NO coincidió


text:
Q: Why does my navigation bar fade with slideshow? So I have created a rough nav bar at the top of the page, on top (I thought) of the picture slideshow, but for some reason the background color of the navigation bar fades to transparent as the slideshow changes images. How do I stop it from doing this, and set it to a fixed opacity? Thankyou.

body,
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
form,
fieldset,
input,
textarea,
p,
blockquote,
th,
td {
  margin: 0;
  padding: 0;
}
.cb-slideshow,
.cb-slideshow:after {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0px;
  left: 0px;
  z-index: 0;
}
.cb-slideshow:after {
  content: '';
  background: transparent url(../../../images/pattern.png) repeat top left;
}
.cb-slideshow li span {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0px;
  left: 0px;
  color: transparent;
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: none;
  opacity: 0;
  z-index: -10;
  -webkit-backface-visibility: visible;
  -webkit-animation: imageAnimation 30s linear infinite 0s;
  -moz-animation: imageAnimation 30s linear infinite 0s;
  -o-animation: imageAnimation 30s linear infinite 0s;
  -ms-animation: imageAnimation 30s linear infinite 0s;
  animation: imageAnimation 30s linear infinite 0s;
}
.cb-slideshow li div {
  z-index: 3;
  position: absolute;
  bottom: 30px;
  left: 0px;
  width: 100%;
  text-align: center;
  opacity: 0;
  color: #fff;
  -webkit-animation: titleAnimation 30s linear infinite 0s;
  -moz-animation: titleAnimation 30s linear infinite 0s;
  -o-animation: titleAnimation 30s linear infinite 0s;
  -ms-animation: titleAnimation 30s linear infinite 0s;
  animation: titleAnimation 30s linear infinite 0s;
}
.cb-slideshow li div h3 {
  font-family: 'BebasNeueRegular', 'Arial Narrow', Arial, sans-serif;
  font-size: 240px;
  padding: 0;
  line-height: 200px;
  z-index: -7;
}
.cb-slideshow li:nth-child(1) span {
  background-image: url(../images/image%201.jpg);
  z-index: -7;
}
.cb-slideshow li:nth-child(2) span {
  background-image: url(../images/image%202.jpg);
  -webkit-animation-delay: 6s;
  -moz-animation-delay: 6s;
  -o-animation-delay: 6s;
  -ms-animation-delay: 6s;
  animation-delay: 6s;
  z-index: -7;
}
.cb-slideshow li:nth-child(3) span {
  background-image: url(../images/image%203.jpg);
  -webkit-animation-delay: 12s;
  -moz-animation-delay: 12s;
  -o-animation-delay: 12s;
  -ms-animation-delay: 12s;
  animation-delay: 12s;
  z-index: -7;
}
.cb-slideshow li:nth-child(4) span {
  background-image: url(../images/image%204.jpg);
  -webkit-animation-delay: 18s;
  -moz-animation-delay: 18s;
  -o-animation-delay: 18s;
  -ms-animation-delay: 18s;
  animation-delay: 18s;
  z-index: -7;
}
.cb-slideshow li:nth-child(5) span {
  background-image: url(../images/image%205.jpg);
  -webkit-animation-delay: 24s;
  -moz-animation-delay: 24s;
  -o-animation-delay: 24s;
  -ms-animation-delay: 24s;
  animation-delay: 24s;
  z-index: -7;
}
.cb-slideshow li:nth-child(2) div {
  -webkit-animation-delay: 6s;
  -moz-animation-delay: 6s;
  -o-animation-delay: 6s;
  -ms-animation-delay: 6s;
  animation-delay: 6s;
  z-index: -7;
}
.cb-slideshow li:nth-child(3) div {
  -webkit-animation-delay: 12s;
  -moz-animation-delay: 12s;
  -o-animation-delay: 12s;
  -ms-animation-delay: 12s;
  animation-delay: 12s;
  z-index: -7;
}
.cb-slideshow li:nth-child(4) div {
  -webkit-animation-delay: 18s;
  -moz-animation-delay: 18s;
  -o-animation-delay: 18s;
  -ms-animation-delay: 18s;
  animation-delay: 18s;
  z-index: -7;
}
.cb-slideshow li:nth-child(5) div {
  -webkit-animation-delay: 24s;
  -moz-animation-delay: 24s;
  -o-animation-delay: 24s;
  -ms-animation-delay: 24s;
  animation-delay: 24s;
  z-index: -7;
}
/* Animation for the slideshow images */

@-webkit-keyframes imageAnimation {
  0% {
    opacity: 0;
    -webkit-animation-timing-function: ease-in;
  }
  8% {
    opacity: 1;
    -webkit-animation-timing-function: ease-out;
  }
  17% {
    opacity: 1
  }
  25% {
    opacity: 0
  }
  100% {
    opacity: 0
  }
}
@-moz-keyframes imageAnimation {
  0% {
    opacity: 0;
    -moz-animation-timing-function: ease-in;
  }
  8% {
    opacity: 1;
    -moz-animation-timing-function: ease-out;
  }
  17% {
    opacity: 1
  }
  25% {
    opacity: 0
  }
  100% {
    opacity: 0
  }
}
@-o-keyframes imageAnimation {
  0% {
    opacity: 0;
    -o-animation-timing-function: ease-in;
  }
  8% {
    opacity: 1;
    -o-animation-timing-function: ease-out;
  }
  17% {
    opacity: 1
  }
  25% {
    opacity: 0
  }
  100% {
    opacity: 0
  }
}
@-ms-keyframes imageAnimation {
  0% {
    opacity: 0;
    -ms-animation-timing-function: ease-in;
  }
  8% {
    opacity: 1;
    -ms-animation-timing-function: ease-out;
  }
  17% {
    opacity: 1
  }
  25% {
    opacity: 0
  }
  100% {
    opacity: 0
  }
}
@keyframes imageAnimation {
  0% {
    opacity: 0;
    animation-timing-function: ease-in;
  }
  8% {
    opacity: 1;
    animation-timing-function: ease-out;
  }
  17% {
    opacity: 1
  }
  25% {
    opacity: 0
  }
  100% {
    opacity: 0
  }
}
/* Animation for the title */

@-webkit-keyframes titleAnimation {
  0% {
    opacity: 0
  }
  8% {
    opacity: 1
  }
  17% {
    opacity: 1
  }
  19% {
    opacity: 0
  }
  100% {
    opacity: 0
  }
}
@-moz-keyframes titleAnimation {
  0% {
    opacity: 0
  }
  8% {
    opacity: 1
  }
  17% {
    opacity: 1
  }
  19% {
    opacity: 0
  }
  100% {
    opacity: 0
  }
}
@-o-keyframes titleAnimation {
  0% {
    opacity: 0
  }
  8% {
    opacity: 1
  }
  17% {
    opacity: 1
  }
  19% {
    opacity: 0
  }
  100% {
    opacity: 0
  }
}
@-ms-keyframes titleAnimation {
  0% {
    opacity: 0
  }
  8% {
    opacity: 1
  }
  17% {
    opacity: 1
  }
  19% {
    opacity: 0
  }
  100% {
    opacity: 0
  }
}
@keyframes titleAnimation {
  0% {
    opacity: 0
  }
  8% {
    opacity: 1
  }
  17% {
    opacity: 1
  }
  19% {
    opacity: 0
  }
  100% {
    opacity: 0
  }
}
/* Show at least something when animations not supported */

.no-cssanimations .cb-slideshow li span {
  opacity: 1;
}
@media screen and (max-width: 1140px) {
  .cb-slideshow li div h3 {
    font-size: 140px
  }
}
@media screen and (max-width: 600px) {
  .cb-slideshow li div h3 {
    font-size: 80px
  }
}
.logo {
  position: relative;
  width: 120px;
  top: 30px;
  float: left;
  margin-left: 25px;
}
/* CSS Document */

a {
  font-family: Arial;
  text-decoration: none;
  color: white;
  font-size: 15px;
}
ul {
  list-style-type: none;
}
li {
  display: inline;
  padding: 10px;
}
.list {
  position: relative;
  margin-top: 40px;
  float: right;
}
.navbar {
  background-color: black;
  height: 100px;
  width: 100%;
  z-index: 6;
}

HOME

PRODUCTS

BLOG

CONTACT

Image 01

hon·our

Image 02

pas·sion

Image 03

bal·ance

Image 04

re·spec·t

Image 05

cul·ture

Let me know if you also need the JS file.

A: Hi
try to change this and it should work.
HTML

hon·our

CSS
.cb-slideshow li .slides h3 {
  font-family: 'BebasNeueRegular', 'Arial Narrow', Arial, sans-serif;
  font-size: 240px;
  z-index: 0;
  position:absolute;
  top:50%;

}

Fiddle demo here
I hope this helps


text:
Q: Kubernetes logging I recently upgraded my cluster and I am continuously seeing these kinds of errors:
Error from server (NotFound): scalingpolicies.scalingpolicy.kope.io "fluentd-gcp-scaling-policy" not found
E
2018-11-30T19:00:20,400581557+00:00 fluentd-gcp-scaling-policy not found in namespace kube-system, using defaults.
I
Error from server (NotFound): daemonsets.extensions "fluentd-gcp-v3.0.0" not found
E

I think the problem is that my fluentd has a different version, but I am not sure how to change this in the scaling policy

A: Looks like your ScalingPolicy CRD with the name fluentd-gcp-scaling-policy is missing. It would be that something changed in the CRD when you did the upgrade too.
You can check with:
$ kubectl -n kube-system get scalingpolicy

And the CRD:
$ kubectl describe crd scalingpolicies.scalingpolicy.kope.io

It should match something like this. You also might considering applying everything from here


text:
Q: batch copy unique files to new folder The linked question may assist in context of my query: Get filename in batch for loop
I'm just not catching on to the rules of substitution, but I think this is a question with a similar answer...
I'm attempting the same sort of move action using the following batch sequence.  Anyone able to help me correct the syntax?
@echo off

set source=C:\Users\my name\some long path with spaces
set target=C:\Users\my name\a different long path with spaces

for %%F in ("%source%") do if not exist "%target%\%~nF.jpg" copy "%%F" "%target%\%~nF.jpg"

The idea is to copy all files with no extension where destination with matching filename exists with specific extension into the destination with correct extension.  Thanks in advance is anyone is able to assist!

Edit:
Thanks for the references Daniel, but I'm not trying to copy a filename to destination with matching extension.  I'm trying to copy filename to same filename with new extension
Example:
source\filename001
destination\filename001.jpg
 - do nothing
source\filename002
destination\{no match}
 - copy source\filename002 to destination\filename002.jpg

Alex, I'm not sure what to do from there.  I looked at the output when running without echo off, and that's why I'm posting this question.  I don't understand how to modify the substitutions to work correctly.

Output errors from batch:
for %%~F in ("%source%") do if not exist "%target%\%~nF.jpg" copy "%%F" "%target%\%~nF.jpg"

The following usage of the path operator in batch-parameter
      substitution is invalid: %~nF.jpg" copy "%%F" "%target%\%~nF.jpg"

for %%F in ("%source%") do if not exist "%target%\%~nF.jpg" copy "%%~F" "%target%\%~nF.jpg"

The following usage of the path operator in batch-parameter
      substitution is invalid: %~nF.jpg" copy "%%~F" "%target%\%~nF.jpg"

SOLUTION: Thanks for the assist/solution/guidance!
set "source=C:\Users\my name\some long path with spaces"
set "target=C:\Users\my name\a different long path with spaces"

for /F "delims=" %%F in (
  'Dir /B "%source%\*." '
) do if not exist "%target%\%%~nF.jpg" copy "%source%\%%~F" "%target%\%%~nF.jpg"

A: Your problem is that inside batch files the for replaceable parameters (the variable that holds the reference to the element being iterated) needs to be preceded by two percent signs (%%F), includig the cases where you use any modifier (ex. file name = %%~nF).
In command line the replaceable parameter only uses one %, and your code includes some references written for a batch file and some for command line.
for %%F in ("%source%") do
    ^^^ for replaceable parameter in batch file, double %

if not exist "%target%\%~nF.jpg" copy "%%F" "%target%\%~nF.jpg"
                       ^^^^                           ^^^^
                       for replaceable parameters missing a % (usage in command line)

So, to solve it
@echo off

set "source=C:\Users\my name\some long path with spaces"
set "target=C:\Users\my name\a different long path with spaces"

for %%F in ("%source%\*.") do if not exist "%target%\%%~nF.jpg" copy "%%~F" "%target%\%%~nF.jpg"

A: MC ND was a bit faster, but you have to select only files without extension in source so I suggest:
@echo off

set source=C:\Users\my name\some long path with spaces
set target=C:\Users\my name\a different long path with spaces

for /F "delims=" %%F in (
  'Dir /B "%source%\*." '
) do if not exist "%target%\%%~nF.jpg" copy "%%F" "%target%\%%~nF.jpg"


text:
Q: Standard token for encoding parentheses for HTML Ids? I have to encode strings to remove parentheses for Ids for HTML elements.
Parentheses (these ones (,)) aren't valid in HTML Ids, are there standard strings (like those used in URLs) to use?
Is there an existing method that can be used in ASP.NET MVC?
N.B.  System.Web.Mvc.HttpUtility.HtmlEncode(string), does not encode parentheses.

A: As per the HTML specification (and this question about id's) parentheses aren't allowed in the HTML id attribute.  If you need them, you could use string replace, e.g.:
//  ( = 'op--'  Opening Parenthesis
//  ) = 'cp--'  Closing Parenthesis

string id = "collectionName.get_Item(index)";

// encode
string encodedId = id.Replace("(", "op--").Replace(")", "cp--");

// decode
string decodedId = encodedId.Replace("op--", "(").Replace("cp--", ")");

A: I don't think I understand the question, cos it feels like the answer is to substitute [ and ]. Or even %28 and %29 from the Wikipedia link you gave.
Have I got hold of the wrong end of the stick?
EDIT: From what has been said in the comments, it seems that %28 and %29 are not okay as the % character is also invalid, in which case you could select a substitute that won't appear elsewhere.
EG Something like ( becomes ---28--- (or even ---openbracket---) or something else you can guarantee won't appear elsewhere in the ID (which should be possible).

A: If the elements are dynamically created then why not just do a .Replace on the id changing parentheses for, say, underscores?
If the elements are not dynamically created then why do they have parentheses in the ids?!


text:
Q: java.lang.IllegalStateException: Could not find a method sendMessage(View) java code:
package com.example.myfirstapp;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.widget.EditText;

public class MainActivity<View> extends Activity {
    public final static String EXTRA_MESSAGE = "com.example.myfirstapp.MESSAGE";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

    /** Called when the user clicks the Send button */
    public void sendMessage(View view) {
        Intent intent = new Intent(this, DisplayMessageActivity.class);
        EditText editText = (EditText) findViewById(R.id.edit_message);
        String message = editText.getText().toString();
        intent.putExtra(EXTRA_MESSAGE, message);
        startActivity(intent);

    }
}

activity_main.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal">
    <EditText android:id="@+id/edit_message"
        android:layout_weight="1"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:hint="@string/edit_message" />
    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/button_send"
        android:onClick="sendMessage"  />
</LinearLayout>

the error message:
06-18 15:19:12.493: E/AndroidRuntime(799): java.lang.IllegalStateException: Could not find a method sendMessage(View) in the activity class com.example.myfirstapp.MainActivity for onClick handler on view class android.widget.Button

I  really do not know the reason about that,and i check the case about the method name,that's ok.
Who can help me?

A: you have to declare your activity as :
public class MainActivity extends Activity {
}

and also you need to declare your button in your onCreate() method like below:
Button button_send= (Button)findViewById(R.id.your_Button_Id);

update:
Also you have to assign an id for your button in your manifest and refer to it above.

A: Remove <View>. Also move your initialization of Editext to oncreate(). Need not initialize editext evey time on button click.
public class MainActivity extends Activity {
public final static String EXTRA_MESSAGE = "com.example.myfirstapp.MESSAGE";
private EdiText editext;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    editText = (EditText) findViewById(R.id.edit_message);
}
....


text:
Q: difference instantiation of android's button i' m new on android, i want to know what are the differences to declare a button like :
@Override
    protected void onCreate(Bundle savedInstanceState) {
    button = ((Button) findViewById(R.id.button));
    button.setOnClickListener(this);
}

or
@Override
    protected void onCreate(Bundle savedInstanceState) {
    button = new Button(this);
    button.setId(..);
    button = ((Button) findViewById(R.id.button));
    button.setOnClickListener(this);
}

thanks in advance.

A: If you declare the Button in xml then you should provide a layout to the Activity using setContentView(int) and initialize the Button like this
@Override
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.your_layout);//a button with id button should present in this layout
button = (Button) findViewById(R.id.button);
button.setOnClickListener(this);
}

If you want to create a Button programmatically then you should do initialization like this
@Override
protected void onCreate(Bundle savedInstanceState) {
button = new Button(this);
button.setId(1);//some random integer value
setContentView(view);//some view
button.setOnClickListener(this);
}

setContentView(View view) for 2nd case

A: If you use first declaration, you have to define a button from xml. In the second one you are creating a button programmatically. You can also define it's position in the view etc.

A: The difference is that
xml based layout is comparatively fast

xml based code at the end it converted in to java code by the compiler

and if you will use the second approach you have to do allot of things like setting the

width and height, position where it to be shown and by doing that

Your code will be messy

So it its better to use xml based layouts

A: The difference is that the second time you declare the button in the code. Then you add an id to it, presumably a new one.
If you want to run the first code your button has to be declared in the xml layout resource file. This is the fastest way since it is optimized on the android framework to read the layouts from xml (it is actually converted to java, but in an optimized way).
The second code does not require the layout file, although you do not add the button to a layout so the button as it is now is  not usable, as it is not 'on screen'.


text:
Q: Save the contents of a variable in Xcode Debugger Running the debugger in Xcode when you set a breakpoint you get a view a variable and can see all of the fantastically interesting values associated with it.
Is there any way to save/export this data to a file?
I am of course having an issue where something is wrong but there is a ton of variables and I want to just compare one run of the program to the next easily.

A: You can use gdb for this. The following gdb commands are useful:
set log file <filename>
set logging on
... do interesting stuff ...
set logging off

This will log the section "do interesting stuff" to  as a text file.
If you want to get really fancy and have a fixed set of commands/variables you want to dump, you can make a function and stick it in $HOME/.gdbinit. Then get to a breakpoint and just issue dumplog (if using the example below) at the gdb prompt.
# Example that just does some random stuff
define dumplog
    set logging file foo.txt
    b main
    c
    set logging on
    po var1
    po var2
    set logging off
end

Another approach which I just learned is issuing the following from a terminal. It has the benefit of no manual intervention, but I just tried it and you get quite a bit of extra garbage in that file.
defaults write com.apple.Xcode PBXGDBDebuggerLogToFile YES
defaults write com.apple.Xcode PBXGDBDebuggerLogFileName <filename>

A: When you hover over a value, click on the double-headed arrows and you get a pop-up menu with a lot of options:
alt text http://idisk.mac.com/cdespinosa/Public/Print%20Description.png
Print Description will dump the information about the object to the gdb console, from which you can copy and paste it.


text:
Q: how to pass multiple rows with a single column in a stored procedure in SQL how to pass multiple rows using a single column in a stored procedure in SQL (SSMS)?
or
how to pass single column values in a procedure.
CREATE TYPE tblAge_Type as TABLE
(
    ID int,
    Age int
)
--------------------------------------------------------------------------------------
alter PROCEDURE spAddAge (
   @datasource tblAge_Type READONLY)
AS
    update tblAge set Age = (select Age from  @datasource ) where Id = (select ID from @datasource )

GO
------------------------------------------------------------------------------------------
DECLARE @data AS tblAge_Type

INSERT into @data VALUES(1,22) ;
INSERT into @data VALUES(2,55) ;
INSERT into @data VALUES(3,44);

EXEC spAddAge @data

getting this error: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

A: there is no standard way to do this.
The most common ways that this is done is:
1) make a comma delimited string, pass it as a parameter, and in the procedure, split the string into a table. There are many string splitting functions around, preferrably use one that does not use loops. I think the latest version of SQL Server has also a string splitting function.
2) pass a table valued parameter, as is explained here: How to pass a table-value parameter


text:
Q: Trouble appending value in React Native I have some code in React Native as follows, as can be seen I am calling a routine within the "componentDidMount" that is intended to load some previously saved variables from 'storage':
export default class Cast extends Component {
state = {
  admin: false,
  isPublishing: false,
  userComment: "",
  hasPermission: false,
  paused: true,
  _email: false,
  _name: false,
  _pword: false,
  _play_ID: false,
  _streamkey: false,
  _playurl: "",
  _streamurl: "",
  };

getKey = async() => {
  try {
    var value = await AsyncStorage.getItem('email');
    this.setState({ _email: value });
    value = await AsyncStorage.getItem('playkey');
    this.setState({ _play_ID: value });
    const playurl = "https://stream.mux.com/" + value + ".m3u8"
    this.setState({ _playurl: playurl });
    value = await AsyncStorage.getItem('castkey');
    this.setState({ _streamkey: value });
    const streamurl = "rtmp://global-live.mux.com:5222/app/" + value
    this.setState({ _streamurl: streamurl });
  } catch (error) {
    console.log("Error retrieving data" + error);
  }
}

componentDidMount(){
  this.getKey();
}

renderCameraView = () => {

  return (
    <NodeCameraView
      style={styles.nodeCameraView}
      /* eslint-disable */
      ref={vb => {
        this.vb = vb;
      }}
      /* eslint-enable */
      outputUrl = {this.state._streamurl}
      camera={settings.camera}
      audio={settings.audio}
      video={settings.video}
      autopreview
    />
  );
};

renderPlayerView = () => {

const { paused } = this.state;
const source = {
  uri: _playurl  //SEEMS TO ACCEPT THIS VARIABLE WITHOUT CURLY BRACKETS OR 'THIS.STATE.'...NOT SURE WHY...?
};
  return (
    <Video
      source={source} // Can be a URL or a local file.
      /* eslint-disable */
      ref={ref => {
        this.player = ref;
      }} // Store reference
      /* eslint-enable */
      onBuffer={this.onBuffer} // Callback when remote video is buffering
      onError={this.onError} // Callback when video cannot be loaded
      style={styles.nodePlayerView}
      fullscreen={false}
      resizeMode="cover"
      paused={paused}
    />
  );
};

//...

The issue I am having is for some reason it is impossible to append the value of '_streamkey' to a string.  Within the 'renderCamerView' function I am attempting to set the value of 'outputUrl' without success.  This function is called upon a button press.  I have been struggling with this for quite some time.  As can be seen in my code post as currently written I am receiving a "JSX value should be either an expression or a quoted JSX text." error.  However if I try something like:
outputUrl="rtmp://global-live.mux.com:5222/app/" + this.state._streamkey

That throws an "unexpected token" error that seems to indicate the "+" is bad syntax.  Any suggestions on how to solve this are GREATLY appreciated, as mentioned this has been driving me crazy.  Thank you in advance.

A: I think you have to tweak your syntax a bit to do string concatenation in your react component:
outputUrl={"rtmp://global-live.mux.com:5222/app/" + this.state._streamkey}

or use string interpolation:
outputUrl={`rtmp://global-live.mux.com:5222/app/${this.state._streamkey}`}

Does that help?

A: Instead of using _streamkey for concatenating _streamurl we could use value directly. You cannot use the value of _streamkey in the same render cycle in which you set it since setState is asyncronous. If we log this.state._streamkey in getKey right after you have set it, you won't get the newly set value.
You can find this in the official react-native documentation.

setState() enqueues changes to the component state and tells React that this component and its children need to be re-rendered with the updated state. This is the primary method you use to update the user interface in response to event handlers and server responses.

setState() does not always immediately update the component. It may batch or defer the update until later. This makes reading this.state right after calling setState() a potential pitfall.

Try the following.
getKey = async() => {
  try {
    var value = await AsyncStorage.getItem('email');
    this.setState({ _email: value });
    value = await AsyncStorage.getItem('castkey');
    this.setState({ _streamkey: value });
    const streamurl = "rtmp://global-live.mux.com:5222/app/" + value
    this.setState({ _streamurl: streamurl });
  } catch (error) {
    console.log("Error retrieving data" + error);
  }
}

Your access to the state property _streamurl is incorrect and you need to use curly brackets when you pass a component prop. Try the following code.
render() {
    return <NodeCameraView
      style={styles.nodeCameraView}
      /* eslint-disable */
      ref={vb => {
        this.vb = vb;
      }}
      /* eslint-enable */
      outputUrl={this.state._streamurl}
      camera={settings.camera}
      audio={settings.audio}
      video={settings.video}
      autopreview
    />
}


text:
Q: jQuery show not working in IE8 We have a span that we try to show in IE8(contract thing) with jQuery('#processingDiv').show();
We are using jquery-1.3.2.min.js
We declare the span like this:
jQuery("#processingDiv").bind("ajaxSend", function(){
    jQuery(this).show();
 }).bind("ajaxComplete", function(){
     jQuery(this).hide();
 });

This is the HTML for the processingDiv span
 Processing... <img src="<icis2:icisRes/>images/loadingBar.gif" border="0"
        alt="Processing..." />

We don't see the span except when the javascript confirm runs.
if(confirm("Warning! You are processing this filing without appending signature pages to any documents. Continue?")){
    checkDraftTemplateAndSubmitForm(form);
} else {
    jQuery('#processingDiv').hide();
    return false;
}

I tried this after some research with no luck:
jQuery('#processingDiv').css({"visibility":"visible"});

I also tried changing the name to see if there was any naming conflicts.
This is seems bizare, does anyone have any ideas about this?
Thanks,
Tom


text:
Q: Как передать данные с одного экрана на другой используя архитектуру MVVM Swift iOS FirstViewController
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
    guard let detailVC = segue.destination as? SecondViewController else { return }

    if let sheet = detailVC.sheetPresentationController{
        sheet.detents = [.medium()]
        sheet.prefersGrabberVisible = true
        sheet.preferredCornerRadius = 20
    }

    detailVC.viewModel = ???????? (можно скастить sender до SecondViewModelProtocol, но что тогда передать в performSegue в sender ?)

}

получается, что мне надо обратиться к FirstViewModel и взять от туда данные.


text:
Q: Defining transpency in bmp files A game I'm currently researching, has some textures on interface. Those textures in-game are transparent. This game is honestly really old (1999) and those textures are saved as .BMP. Here is a sample texture file:
Sample texture interface file
This game is written in C++.
Here's my question: how is that possible, that a game understands some parts of .BMP, which are definitely black, as a transparent surface? Can you give me an idea, how to define one as well? I'm currently working in canvas (Javascript, BabylonJS), but I need an idea, not code.


text:
Q: 'adobe-flashplugin conflicts with flashplugin-downloader' error while trying to install adobe-flashplugin I'm having some hard time getting straight with my adobe flash plugin.
$ sudo apt-get remove --purge adobe-flashplugin flashplugin* nspluginwrapper
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'flashplugin-installer' for regex 'flashplugin*'
Note, selecting 'flashplugin-downloader' for regex 'flashplugin*'
Note, selecting 'adobe-flashplugin' for regex 'flashplugin*'
Note, selecting 'flashplugin-nonfree-extrasound' for regex 'flashplugin*'
Note, selecting 'flashplugin' for regex 'flashplugin*'
Note, selecting 'flashplugin-nonfree' for regex 'flashplugin*'
Note, selecting 'adobe-flashplugin' instead of 'flashplugin-nonfree'
Package nspluginwrapper is not installed, so not removed
Package flashplugin-installer is not installed, so not removed
Package adobe-flashplugin is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 adobe-flash-properties-gtk : Depends: adobe-flashplugin (= 11.1.102.55-0oneiric1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

$ sudo apt-get install --reinstall adobe-flashplugin
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  adobe-flashplugin
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/6 709 kB of archives.
After this operation, 19,0 MB of additional disk space will be used.
dpkg: regarding .../adobe-flashplugin_11.1.102.55-0oneiric1_amd64.deb containing adobe-flashplugin:
 adobe-flashplugin conflicts with flashplugin-downloader
  flashplugin-downloader:i386 (version 11.1.102.55ubuntu0.11.10.1) is present and installed.
dpkg: error processing /var/cache/apt/archives/adobe-flashplugin_11.1.102.55-0oneiric1_amd64.deb (--unpack):
 conflicting packages - not installing adobe-flashplugin
Errors were encountered while processing:
 /var/cache/apt/archives/adobe-flashplugin_11.1.102.55-0oneiric1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

EDIT: sudo apt-get remove flashplugin-downloader
Reading package lists... Done
Building dependency tree
Reading state information... Done
Virtual packages like 'flashplugin-downloader' can't be removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 adobe-flash-properties-gtk : Depends: adobe-flashplugin (= 11.1.102.55-0oneiric1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

EDIT#2: # apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  adobe-flashplugin
The following NEW packages will be installed:
  adobe-flashplugin
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/6 709 kB of archives.
After this operation, 19,0 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
dpkg: regarding .../adobe-flashplugin_11.1.102.55-0oneiric1_amd64.deb containing adobe-flashplugin:
 adobe-flashplugin conflicts with flashplugin-downloader
  flashplugin-downloader:i386 (version 11.1.102.55ubuntu0.11.10.1) is present and installed.
dpkg: error processing /var/cache/apt/archives/adobe-flashplugin_11.1.102.55-0oneiric1_amd64.deb (--unpack):
 conflicting packages - not installing adobe-flashplugin
Errors were encountered while processing:
 /var/cache/apt/archives/adobe-flashplugin_11.1.102.55-0oneiric1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Output of sudo apt-get update - https://gist.github.com/1716225
...
W: Failed to fetch http://ppa.launchpad.net/sevenmachines/flash/ubuntu/dists/oneiric/main/source/Sources 404 Not Found
...

I'm using ubuntu 11.10
Any thoughts?

A: If figured it out myself.
I run $ apt-config dump|grep Archit
and it gave
APT::Architecture "amd64";
APT::Architectures "";
APT::Architectures:: "amd64";

And I fixed it with running:
$ sudo -s
# echo "foreign-architecture i386" > /etc/dpkg/dpkg.cfg.d/multiarch
# apt-get update

And then updating packages.

A:
adobe-flashplugin conflicts with flashplugin-downloader

Please uninstall flashplugin-downloader:
sudo apt-get remove flashplugin-downloader

I suggest trying the packages flashplugin-installer respective flashplugin64-installer if you have troubles installing flash. However, your second command should succeed after removing flashplugin-downloader


text:
Q: How can I display checkbox or radio button choices in a Choice field vertically? I have a list with SharePoint 2007 with a Choice column that I'd like the choices to be displayed vertically (every 2 or 3) instead of horizontally. Is there some JavaScript/jQuery I can utilize to get this done?

A: SPServices has a method for this:

The SPArrangeChoices rearranges radio buttons or checkboxes in a form from vertical to horizontal display to save page real estate.

The documentation is here: SPServices.SPArrangeChoices


text:
Q: Как вызвать функцию, название которой находится в строке? Сейчас сделано через словарь
Вызываю ее с помощью functions['messages']
functions = {'messages':messages}

async def messages():
    return

Но таким способом нельзя передать аргументы, а мне это нужно. Как такое можно сделать?

A: Все просто - вот так:
functions['messages'](arg1, arg2, ...)


text:
Q: REST Complex Resource Access So I have been coming across stuff over the last few weeks which is making me improve my understanding of REST.
At work we are having issues with some rest api resource access which has some pretty complex access, so I was wondering if someone could help me understand if/what we are doing wrong and what is the right way go about it.
So the issue we're having is that we have an endpoint for getting all orders. e.g. /orders this endpoint has pagination and filters etc, this endpoint will get a list of orders.
We have two main types of users (admin and account).
If you are an admin, you are able to see all the orders, if you are an account user, it gets a bit more tricky because account users can see orders based on a set of permissions.
So by default, an account user can see all orders that they have placed. They will also be able to see any orders that they have for them. (so this distinction here is that orders are placed by a user, but can be for another. e.g. I might order something for another user).
Due to the way the application is designed, users are able to see orders for other branches as well, one example would be a branch reporter that deals with the orders from all branches and collates reports etc.
So an example for all of this would be:
if you are an administrator, you see all orders by default, if you are an account user, and have permissions for branch x and y, you will see all orders for x & y as well as any orders placed by yourself.
Is the domain design faulty here, is that what's stopping me from seeing a feasible solution?
I have been looking about user contexts a bit so that might be a way to split some of the issues a bit. So an example is different users see different resources in different ways. So to not make a one size fits all solution (which this definitely is) you should build 3 apis. If I did that I could definitely separate admin from account. But I dont know what to do with the complexity of accounts.

I have a suspicion that the key to this relates to removing these permissions checked out of the database and move them into permission, but I am not sure how one would handle dynamic permissions.
I am sorry if a lot of this is rant or is this doesn't make sense. Any help would be appreciated even if it's only to put me on the right path.
Like I said, I have been trying to understand how to configure REST while trying to forget about the underlying database, but a problem as bonkers as this stumps me.

A: I think you are mixing 2 important aspects, the first is the style you want your API to follow, the second is the authorisation logic you want to apply.
REST
If you want to build a consistent, clear, and maintainable rest API first you need to understand your domain.
So what is an Order for you, who is going to consume your API, is your code base unique and so has it to be, or can be split reducing complexity, coupling and increasing the isolation?
If you have a single understanding of Order, just leave it as it is.
Authorisation
The authorisation rules are just another example of business logic, and this are often subject to change as the business evolves.
I suggest you to treat the authorisation as you treat any other logic, like when you calculate an order total.
So if you have a service layer, create an Authorisation service where you check what a user is allowed to see.
You can also do it in a filter, so that before returning the list of orders, you apply the security rules and you remove all orders that the user is not supposed to view.
You don't like this approach? Then you need to move the "authorisation filters" down the stack so that the query itself takes it into account.
Based on what you said there are various aspects which you need to account when performing a GetOrderByUserID(x), if you use EF, you can generate the authorisation filters as lambda expression and you can add it to your where clause, making sure you and the necessary joins so that you can take the branch, accounts and so on.
Conclusion
It is down to you how you want your system to implement the security, but unless you recognise the existence of multiple domain objects Order, BranchOrder, DelegatedOrder, AccountOrder and so on, in the request there should be no evidence of the security that will be applied afterwards, the only thing is that the authorisation of the REST request has to carry enough details, likely in the headers, to identify who is requesting the resources.
Also note that even if you break down your domain object (Order) into more specific types of order, you will still need to apply security, and therefore you will still need to create and maintain the security rules.
Your question is a bit broad and with just enough information to give you hints, if you want a more specific answer, you need to update your question to be more specific as well.

A: If you have code level access at "orders" end. Then you can design in this way.

*

*Make the user's id as a mandatory input at the "Orders" end. So whenever any user calls the API, he should make the request with parameters of User ID.

*Once you get the user ID at "orders" end, check the authorization of user such as whether user is admin or not and user has access to which branch.

*Now, Limit the data in response accordingly.

You should make the changes at "Orders" end to authorize, filter the data and sending the response accordingly.


text:
Q: iOS GoogleMaps SDK error: "[__NSCFDictionary objectForKeyedSubscript:]: Unrecognized selector sent" I follow every step in getting started with google maps for ios, I did everything ok but in every example that I try, the emulator start asking if I want turn on the GPS and after that, it throws the error:
2013-03-07 16:05:09.135 Cicerone4all[352:14e03] Google Maps SDK for iOS version: 1.1.0.2080
2013-03-07 16:05:09.750 Cicerone4all[352:10d03] -[__NSCFDictionary objectForKeyedSubscript:]: unrecognized selector sent to instance 0xcac9b40
2013-03-07 16:05:09.755 Cicerone4all[352:10d03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary objectForKeyedSubscript:]: unrecognized selector sent to instance 0xcac9b40'
*** First throw call stack:
(0x24a5022 0x2636d0a 0x24a6cbd 0x240bed0 0x240bcb2 0xc7d21 0x14ea9e 0x14dc05 0x15f0a6 0x15ce9e 0x1606d7 0xe5e64 0x132a43 0x131842 0x7f312f 0x7f3003 0x2479936 0x24793d7 0x23dc790 0x23dbd84 0x23dbc9b 0x2d3a7d8 0x2d3a88a 0x14dea16 0x270d 0x2675)
terminate called throwing an exception(lldb)

AppDelegate:
#import "AppDelegate.h"
#import "ViewController.h"

@implementation AppDelegate

@synthesize window = _window;
@synthesize viewController = _viewController;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    [GMSServices provideAPIKey:@"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"];
    // Override point for customization after application launch.
    self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    return YES;
}

@end

ViewController:
#import "ViewController.h"
#import <GoogleMaps/GoogleMaps.h>
@interface ViewController ()

@end

@implementation ViewController{
    GMSMapView *mapView_;
}

- (void)loadView {
    GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.8683
                                                            longitude:151.2086
                                                                 zoom:6];
    mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
    mapView_.myLocationEnabled = YES;
    self.view = mapView_;

    GMSMarkerOptions *options = [[GMSMarkerOptions alloc] init];
    options.position = CLLocationCoordinate2DMake(-33.8683, 151.2086);
    options.title = @"Sydney";
    options.snippet = @"Australia";
    [mapView_ addMarkerWithOptions:options];
}

@end

Stack trace:
UIKit`UIApplicationMain:
0x14de58b:  pushl  %ebp
0x14de58c:  movl   %esp, %ebp
0x14de58e:  pushl  %ebx
0x14de58f:  pushl  %edi
0x14de590:  pushl  %esi
0x14de591:  subl   $44, %esp
0x14de594:  calll  0x014de599               ; UIApplicationMain + 14
0x14de599:  popl   %eax
0x14de59a:  movl   %eax, -16(%ebp)
0x14de59d:  movl   $1, (%esp)
0x14de5a4:  calll  0x014dbc6e               ; _UIApplicationLinkedOnOrAfter
0x14de5a9:  xorl   %ecx, %ecx
0x14de5ab:  testb  %al, %al
0x14de5ad:  je     0x014de5de               ; UIApplicationMain + 83
0x14de5af:  movl   -16(%ebp), %esi
0x14de5b2:  movl   6976791(%esi), %eax
0x14de5b8:  movl   6929119(%esi), %ecx
0x14de5be:  movl   %ecx, 4(%esp)
0x14de5c2:  movl   %eax, (%esp)
0x14de5c5:  calll  0x0198790a               ; objc_msgSend
0x14de5ca:  movl   6929295(%esi), %ecx
0x14de5d0:  movl   %ecx, 4(%esp)
0x14de5d4:  movl   %eax, (%esp)
0x14de5d7:  calll  0x0198790a               ; objc_msgSend
0x14de5dc:  movl   %eax, %ecx
0x14de5de:  movl   %ecx, -20(%ebp)
0x14de5e1:  movl   8(%ebp), %edi
0x14de5e4:  cmpl   $2, %edi
0x14de5e7:  jl     0x014de659               ; UIApplicationMain + 206
0x14de5e9:  movl   12(%ebp), %ebx
0x14de5ec:  addl   $4, %ebx
0x14de5ef:  decl   %edi
0x14de5f0:  movl   (%ebx), %esi
0x14de5f2:  movl   -16(%ebp), %eax
0x14de5f5:  leal   5455388(%eax), %eax
0x14de5fb:  movl   %eax, 4(%esp)
0x14de5ff:  movl   %esi, (%esp)
0x14de602:  calll  0x01987a3c               ; strcmp
0x14de607:  testl  %eax, %eax
0x14de609:  jne    0x014de617               ; UIApplicationMain + 140
0x14de60b:  movl   -16(%ebp), %eax
0x14de60e:  movb   $1, 7181316(%eax)
0x14de615:  jmp    0x014de653               ; UIApplicationMain + 200
0x14de617:  movl   -16(%ebp), %eax
0x14de61a:  leal   5450169(%eax), %eax
0x14de620:  movl   %eax, 4(%esp)
0x14de624:  movl   %esi, (%esp)
0x14de627:  calll  0x01987a3c               ; strcmp
0x14de62c:  testl  %eax, %eax
0x14de62e:  je     0x014de649               ; UIApplicationMain + 190
0x14de630:  movl   -16(%ebp), %eax
0x14de633:  leal   5450194(%eax), %eax
0x14de639:  movl   %eax, 4(%esp)
0x14de63d:  movl   %esi, (%esp)
0x14de640:  calll  0x01987a3c               ; strcmp
0x14de645:  testl  %eax, %eax
0x14de647:  jne    0x014de653               ; UIApplicationMain + 200
0x14de649:  movl   -16(%ebp), %eax
0x14de64c:  movb   $1, 7181319(%eax)
0x14de653:  addl   $4, %ebx
0x14de656:  decl   %edi
0x14de657:  jne    0x014de5f0               ; UIApplicationMain + 101
0x14de659:  movl   16(%ebp), %ebx
0x14de65c:  calll  0x014e1026               ; UIApplicationInitialize
0x14de661:  movl   -16(%ebp), %edx
0x14de664:  movl   6976747(%edx), %eax
0x14de66a:  movl   6928967(%edx), %ecx
0x14de670:  movl   %edx, %esi
0x14de672:  movl   %ecx, 4(%esp)
0x14de676:  movl   %eax, (%esp)
0x14de679:  calll  0x0198790a               ; objc_msgSend
0x14de67e:  movl   %eax, %edi
0x14de680:  testl  %ebx, %ebx
0x14de682:  jne    0x014de6cc               ; UIApplicationMain + 321
0x14de684:  movl   6976767(%esi), %eax
0x14de68a:  movl   6929687(%esi), %ecx
0x14de690:  movl   %ecx, 4(%esp)
0x14de694:  movl   %eax, (%esp)
0x14de697:  calll  0x0198790a               ; objc_msgSend
0x14de69c:  movl   6929695(%esi), %ecx
0x14de6a2:  movl   %ecx, 4(%esp)
0x14de6a6:  movl   %eax, (%esp)
0x14de6a9:  calll  0x0198790a               ; objc_msgSend
0x14de6ae:  movl   6929699(%esi), %ecx
0x14de6b4:  leal   7032327(%esi), %edx
0x14de6ba:  movl   %edx, 8(%esp)
0x14de6be:  movl   %ecx, 4(%esp)
0x14de6c2:  movl   %eax, (%esp)
0x14de6c5:  calll  0x0198790a               ; objc_msgSend
0x14de6ca:  movl   %eax, %ebx
0x14de6cc:  movl   6929707(%esi), %eax
0x14de6d2:  movl   %eax, 4(%esp)
0x14de6d6:  movl   %ebx, (%esp)
0x14de6d9:  calll  0x0198790a               ; objc_msgSend
0x14de6de:  testl  %eax, %eax
0x14de6e0:  je     0x014de78e               ; UIApplicationMain + 515
0x14de6e6:  movl   %ebx, (%esp)
0x14de6e9:  calll  0x01987214               ; NSClassFromString
0x14de6ee:  movl   %eax, %edi
0x14de6f0:  testl  %edi, %edi
0x14de6f2:  jne    0x014de78e               ; UIApplicationMain + 515
0x14de6f8:  movl   6976639(%esi), %eax
0x14de6fe:  movl   6928919(%esi), %ecx
0x14de704:  movl   %ecx, 4(%esp)
0x14de708:  movl   %eax, (%esp)
0x14de70b:  calll  0x0198790a               ; objc_msgSend
0x14de710:  movl   %eax, -16(%ebp)
0x14de713:  movl   6976643(%esi), %eax
0x14de719:  movl   6928923(%esi), %ecx
0x14de71f:  leal   5450237(%esi), %edx
0x14de725:  movl   %edx, 8(%esp)
0x14de729:  movl   %ecx, 4(%esp)
0x14de72d:  movl   %eax, (%esp)
0x14de730:  calll  0x0198790a               ; objc_msgSend
0x14de735:  movl   %eax, %edi
0x14de737:  movl   6976643(%esi), %eax
0x14de73d:  movl   6928923(%esi), %ecx
0x14de743:  leal   5448982(%esi), %edx
0x14de749:  movl   %edx, 8(%esp)
0x14de74d:  movl   %ecx, 4(%esp)
0x14de751:  movl   %eax, (%esp)
0x14de754:  calll  0x0198790a               ; objc_msgSend
0x14de759:  movl   6930011(%esi), %ecx
0x14de75f:  movl   %ebx, 24(%esp)
0x14de763:  leal   7032343(%esi), %edx
0x14de769:  movl   %edx, 20(%esp)
0x14de76d:  movl   %eax, 12(%esp)
0x14de771:  movl   %edi, 8(%esp)
0x14de775:  movl   %ecx, 4(%esp)
0x14de779:  movl   -16(%ebp), %eax
0x14de77c:  movl   %eax, (%esp)
0x14de77f:  movl   $1732, 16(%esp)
0x14de787:  calll  0x0198790a               ; objc_msgSend
0x14de78c:  xorl   %edi, %edi
0x14de78e:  leal   1159(%esi), %eax
0x14de794:  movl   %eax, (%esp)
0x14de797:  calll  0x019870be               ; GSEventRegisterEventCallBack
0x14de79c:  movl   6928967(%esi), %eax
0x14de7a2:  movl   %eax, 4(%esp)
0x14de7a6:  movl   %edi, (%esp)
0x14de7a9:  calll  0x0198790a               ; objc_msgSend
0x14de7ae:  movl   6929831(%esi), %ecx
0x14de7b4:  movl   %ecx, 4(%esp)
0x14de7b8:  movl   %eax, (%esp)
0x14de7bb:  calll  0x0198790a               ; objc_msgSend
0x14de7c0:  testb  %al, %al
0x14de7c2:  setne  %al
0x14de7c5:  movzbl %al, %eax
0x14de7c8:  movl   %eax, (%esp)
0x14de7cb:  calll  0x01987070               ; GSEventInitialize
0x14de7d0:  movl   6432387(%esi), %eax
0x14de7d6:  movl   (%eax), %eax
0x14de7d8:  movl   %eax, (%esp)
0x14de7db:  calll  0x019870ac               ; GSEventPushRunLoopMode
0x14de7e0:  calll  0x019873b2               ; SBSSpringBoardServerPort
0x14de7e5:  movl   6432211(%esi), %ecx
0x14de7eb:  movl   (%ecx), %ecx
0x14de7ed:  movl   %ecx, 4(%esp)
0x14de7f1:  movl   %eax, (%esp)
0x14de7f4:  calll  0x0198731c               ; SBCheckInTaskPort
0x14de7f9:  movl   6930015(%esi), %eax
0x14de7ff:  movl   %eax, 4(%esp)
0x14de803:  movl   %edi, (%esp)
0x14de806:  calll  0x0198790a               ; objc_msgSend
0x14de80b:  movl   %edi, (%esp)
0x14de80e:  calll  0x014de40d               ; UIApplicationInstantiateSingleton
0x14de813:  movl   6976647(%esi), %eax
0x14de819:  movl   6928943(%esi), %ecx
0x14de81f:  movl   %ecx, 4(%esp)
0x14de823:  movl   %eax, (%esp)
0x14de826:  calll  0x0198790a               ; objc_msgSend
0x14de82b:  movl   6928975(%esi), %ecx
0x14de831:  movl   %esi, %edi
0x14de833:  movl   %ecx, 4(%esp)
0x14de837:  movl   %eax, (%esp)
0x14de83a:  calll  0x0198790a               ; objc_msgSend
0x14de83f:  testb  %al, %al
0x14de841:  je     0x014de85b               ; UIApplicationMain + 720
0x14de843:  movl   6976831(%edi), %eax
0x14de849:  movl   6930019(%edi), %ecx
0x14de84f:  movl   %ecx, 4(%esp)
0x14de853:  movl   %eax, (%esp)
0x14de856:  calll  0x0198790a               ; objc_msgSend
0x14de85b:  movl   20(%ebp), %ebx
0x14de85e:  testl  %ebx, %ebx
0x14de860:  jne    0x014de8b2               ; UIApplicationMain + 807
0x14de862:  movl   6976767(%edi), %eax
0x14de868:  movl   6929687(%edi), %ecx
0x14de86e:  movl   %ecx, 4(%esp)
0x14de872:  movl   %eax, (%esp)
0x14de875:  calll  0x0198790a               ; objc_msgSend
0x14de87a:  movl   6929695(%edi), %ecx
0x14de880:  movl   %ecx, 4(%esp)
0x14de884:  movl   %eax, (%esp)
0x14de887:  calll  0x0198790a               ; objc_msgSend
0x14de88c:  movl   6929699(%edi), %ecx
0x14de892:  leal   7032359(%edi), %edx
0x14de898:  movl   %edx, 8(%esp)
0x14de89c:  movl   %ecx, 4(%esp)
0x14de8a0:  movl   %eax, (%esp)
0x14de8a3:  calll  0x0198790a               ; objc_msgSend
0x14de8a8:  movl   %eax, %ebx
0x14de8aa:  testl  %ebx, %ebx
0x14de8ac:  je     0x014de9e9               ; UIApplicationMain + 1118
0x14de8b2:  movl   %ebx, (%esp)
0x14de8b5:  calll  0x01987214               ; NSClassFromString
0x14de8ba:  testl  %eax, %eax
0x14de8bc:  movl   %eax, -16(%ebp)
0x14de8bf:  jne    0x014de959               ; UIApplicationMain + 974
0x14de8c5:  movl   6976639(%edi), %eax
0x14de8cb:  movl   6928919(%edi), %ecx
0x14de8d1:  movl   %ecx, 4(%esp)
0x14de8d5:  movl   %eax, (%esp)
0x14de8d8:  calll  0x0198790a               ; objc_msgSend
0x14de8dd:  movl   %eax, -24(%ebp)
0x14de8e0:  movl   6976643(%edi), %eax
0x14de8e6:  movl   6928923(%edi), %ecx
0x14de8ec:  leal   5450237(%edi), %edx
0x14de8f2:  movl   %edx, 8(%esp)
0x14de8f6:  movl   %ecx, 4(%esp)
0x14de8fa:  movl   %eax, (%esp)
0x14de8fd:  calll  0x0198790a               ; objc_msgSend
0x14de902:  movl   %eax, %esi
0x14de904:  movl   6976643(%edi), %eax
0x14de90a:  movl   6928923(%edi), %ecx
0x14de910:  leal   5448982(%edi), %edx
0x14de916:  movl   %edx, 8(%esp)
0x14de91a:  movl   %ecx, 4(%esp)
0x14de91e:  movl   %eax, (%esp)
0x14de921:  calll  0x0198790a               ; objc_msgSend
0x14de926:  movl   6930011(%edi), %ecx
0x14de92c:  movl   %ebx, 24(%esp)
0x14de930:  leal   7032375(%edi), %edx
0x14de936:  movl   %edx, 20(%esp)
0x14de93a:  movl   %eax, 12(%esp)
0x14de93e:  movl   %esi, 8(%esp)
0x14de942:  movl   %ecx, 4(%esp)
0x14de946:  movl   -24(%ebp), %eax
0x14de949:  movl   %eax, (%esp)
0x14de94c:  movl   $1765, 16(%esp)
0x14de954:  calll  0x0198790a               ; objc_msgSend
0x14de959:  movl   6976747(%edi), %eax
0x14de95f:  movl   6928967(%edi), %ecx
0x14de965:  movl   %ecx, 4(%esp)
0x14de969:  movl   %eax, (%esp)
0x14de96c:  calll  0x0198790a               ; objc_msgSend
0x14de971:  movl   6930023(%edi), %ecx
0x14de977:  movl   %eax, 8(%esp)
0x14de97b:  movl   %ecx, 4(%esp)
0x14de97f:  movl   -16(%ebp), %esi
0x14de982:  movl   %esi, (%esp)
0x14de985:  calll  0x0198790a               ; objc_msgSend
0x14de98a:  movl   7181311(%edi), %ebx
0x14de990:  testb  %al, %al
0x14de992:  je     0x014de9a7               ; UIApplicationMain + 1052
0x14de994:  movl   6929035(%edi), %eax
0x14de99a:  movl   %ebx, 8(%esp)
0x14de99e:  movl   %eax, 4(%esp)
0x14de9a2:  movl   %ebx, (%esp)
0x14de9a5:  jmp    0x014de9e4               ; UIApplicationMain + 1113
0x14de9a7:  movl   6929119(%edi), %eax
0x14de9ad:  movl   %eax, 4(%esp)
0x14de9b1:  movl   %esi, (%esp)
0x14de9b4:  calll  0x0198790a               ; objc_msgSend
0x14de9b9:  movl   6929295(%edi), %ecx
0x14de9bf:  movl   %ecx, 4(%esp)
0x14de9c3:  movl   %eax, (%esp)
0x14de9c6:  calll  0x0198790a               ; objc_msgSend
0x14de9cb:  movl   6930027(%edi), %ecx
0x14de9d1:  movl   %eax, 8(%esp)
0x14de9d5:  movl   %ecx, 4(%esp)
0x14de9d9:  movl   %ebx, (%esp)
0x14de9dc:  movl   $1, 12(%esp)
0x14de9e4:  calll  0x0198790a               ; objc_msgSend
0x14de9e9:  movl   6928887(%edi), %eax
0x14de9ef:  movl   %eax, 4(%esp)
0x14de9f3:  movl   -20(%ebp), %eax
0x14de9f6:  movl   %eax, (%esp)
0x14de9f9:  calll  0x0198790a               ; objc_msgSend
0x14de9fe:  movl   7181311(%edi), %eax
0x14dea04:  movl   6930031(%edi), %ecx
0x14dea0a:  movl   %ecx, 4(%esp)
0x14dea0e:  movl   %eax, (%esp)
0x14dea11:  calll  0x0198790a               ; objc_msgSend
0x14dea16:  xorl   %eax, %eax            <<<<<<<<<<<<<<<<<<<<<<<<<< Signal SIGABRT
0x14dea18:  addl   $44, %esp
0x14dea1b:  popl   %esi
0x14dea1c:  popl   %edi
0x14dea1d:  popl   %ebx
0x14dea1e:  popl   %ebp
0x14dea1f:  ret

Note: The error is thrown before load View of my ViewController.

A: Did you add the -ObjC flag in step 7 of the instructions?

A: You may want to look into this question: objectForKeyedSubscript: crash on iOS 5.1
By the way, what's the version of Xcode you are using? What's the iOS SDK version you are using?

Developing an application with the Google Maps SDK for iOS requires the following:

*

*Xcode 4.5 or later.

*iOS SDK 6.0 or later.

Applications that use the Google Maps SDK for iOS will work on iOS 5.1 and above.
https://developers.google.com/maps/documentation/ios/intro

A: I had the same expection and it was solved by adding the -ObjC to other linker flags in build settings

A: Other people have mentioned the following section from Google's Documentation

Choose your project, rather than a specific target, and open the Build Settings tab. In the Other Linker Flags section, add -ObjC. If these settings are not visible, change the filter in the Build Settings bar from Basic to All.

However, it wasn't until I added the -ObjC flag into my projects 'Other Linker Flags' section, and NOT the targets 'Other Linker Flags' section, was I able to resolve the unrecognized selector error.


text:
Q: How to provide grub for booting Ubuntu 20.04 from external USB in a dual boot installation alongside Windows 8.1 EFI Mode? My goal to archive is the following: I want to install Ubuntu alongside my already existing Windows system on the same hard drive. I checked Windows (msinfo32) and it's running in UEFI-Mode, Secure Boot disabled. I installed Ubuntu in a encrypted Luks/LVM container on sda6 but I also wanted to put the grub-loader on an external USB drive/stick to boot from.
In the end it should boot Windows normally without the usb stick present and it should automatically boot Ubuntu when this usb stick is connected to my laptop. After installing Ubuntu i got a broken grub prompt on startup. (Minimal Bash-like line editing is supported...)
How to archive this scenario and make it work like describe above?
fdisk -l
Device         Start       End   Sectors   Size Type
/dev/sda1       2048   2050047   2048000  1000M Windows recovery environment
/dev/sda2    2050048   2582527    532480   260M EFI System
/dev/sda3    2582528   2844671    262144   128M Microsoft reserved
/dev/sda4    2844672 305432575 302587904 144.3G Microsoft basic data
/dev/sda5  305432576 306358271    925696   452M Windows recovery environment
/dev/sda6  306358272 939612159 633253888   302G Linux filesystem
/dev/sda7  939612160 976773119  37160960  17.7G Windows recovery environment

The external USB Drive for the grub-bootloader looks like this
Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1  *     2048 60061695 60059648 28.7G ef EFI (FAT-12/16/32)

The contents of the sdc1 partition is as follows:
drwxr-xr-x 4 root root 16384 Sep 30 22:04  EFI/
drwxr-xr-x 2 root root 16384 Sep 30 21:19  grub/
drwxr-xr-x 2 root root 16384 Oct  1 08:47 'System Volume Information'/

The grub folder is empty.
EFI contains this:
drwxr-xr-x 2 root root 16384 Sep 30 22:04 BOOT/
drwxr-xr-x 2 root root 16384 Sep 30 22:04 ubuntu/

EFI/BOOT contains:
-rwxr-xr-x 1 root root 1334816 Sep 30 22:04 BOOTX64.EFI*
-rwxr-xr-x 1 root root 1213032 Sep 30 22:04 fbx64.efi*
-rwxr-xr-x 1 root root 1269496 Sep 30 22:04 mmx64.efi*

EFI/ubuntu contains:
-rwxr-xr-x 1 root root     108 Sep 30 22:04 BOOTX64.CSV*
-rwxr-xr-x 1 root root     201 Sep 30 22:04 grub.cfg*
-rwxr-xr-x 1 root root 1681280 Sep 30 22:04 grubx64.efi*
-rwxr-xr-x 1 root root 1269496 Sep 30 22:04 mmx64.efi*
-rwxr-xr-x 1 root root 1334816 Sep 30 22:04 shimx64.efi*

EFI/ubuntu/grub.cfg contains this
search.fs_uuid d95a5ab4-76bd-4ab2-a05d-41c1dba56758 root lvmid/VmoR2t-OB91-x6E3-csJp-r79R-gAsE-CbYau0/S6fvUX-3vKN-yzeO-L7om-s6Ae-vlO9-eKSUvF
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

ls -al /dev/disk/by-uuid/

lrwxrwxrwx 1 root root  10 Oct  1 09:03 0079-8DF5 -> ../../sdc1
lrwxrwxrwx 1 root root  10 Oct  1 09:03 5266B2F066B2D3C7 -> ../../sda5
lrwxrwxrwx 1 root root  10 Oct  1 09:03 6C98155B981524DC -> ../../sda7
lrwxrwxrwx 1 root root  10 Oct  1 09:03 9E143B29143B0435 -> ../../sda4
lrwxrwxrwx 1 root root  10 Oct  1 09:03 C848147848146808 -> ../../sda1
lrwxrwxrwx 1 root root  10 Oct  1 09:03 EA3B-1E3B -> ../../sda2
lrwxrwxrwx 1 root root  10 Oct  1 09:03 f40a050c-d12c-418c-83cd-8ca5695dee89 -> ../../sda6

A: Booting Ubuntu Encrypted Drive from External Drive.
I installed Ubuntu using the option for Full Disk Encryption.
Similar to: How to Make BIOS/UEFI Flash Drive with Full Disk Encryption

I Flashed https://phillw.net/isos/linux-tools/uefi-n-bios/mkusb_grub-boot-template-for-uefi-n-bios_fat32_4GB_use-in-wins_2020-09-07.img.xz to a 4GB flash drive in Windows using Rufus, in Ubuntu mkusb or Disks will work.

I use the FAT32 partition for data
Then I cut the "encrypted" Ubuntu menuentry from grub.cfg on the encrypted drive, (sdc5), and added it to grub.cfg on the external USB drive (sdd4) as the first menuentry.
I have had success booting this drive in BIOS and in UEFI mode.


text:
Q: How to convert a Python dict to a Class object I am looking for a simple way to directly convert a python dict to a custom object as follows, while not breaking intellisense. The result should not be read-only, it should behave just like a new object.
d = {
    "key1": 1,
    "key2": 2
}

class MyObject(object):
    key1 = None
    key2 = None

# convert to object o

# after conversion
# should be able to access the defined props
# should be highlighted by intellisense
print(o.key1)
# conversion back to dict is plain simple
print(o.__dict__)

A: Your object has no fields, just class attributes. You need to create a __init__ method, some will call it a constructor but it is not actually a constructor as understood by other languages so lets avoid calling it like that.
class MyObject:
    def __init__(self, d=None):
        if d is not None:
            for key, value in d.items():
                setattr(self, key, value)

d = {
    "key1": 1,
    "key2": 2,
}

o = MyObject(d)

Note: the above code will try to set all key-value pairs in the dict to fields in the object. Some valid keys such as "key.1" will not be valid field names (it will actually be set but you will not be able to get it with o.key.1).

A: dict_ = {"User" :{"Name" : "SQWiperYT", "ID" : 10, "Other" : {"ID" : 1}}}
import json

class OurObject:
    def __init__(self, /, **kwargs):
        self.__dict__.update(kwargs)

    def __repr__(self):
        keys = sorted(self.__dict__)
        items = ("{}={!r}".format(k, self.__dict__[k]) for k in keys)
        return "{}({})".format(type(self).__name__, ", ".join(items))

    def __eq__(self, other):
        return self.__dict__ == other.__dict__

x = json.dumps(dict_)
y = json.loads(x, object_hook=lambda d: OurObject(**d))

# See How it Works
y.User
>>> OurObject(ID=10, Name='SQWiperYT', Other=OurObject(ID=1))
y.User.ID
>>> 10
y.User.Name
>>> 'SQWiperYT'
y.User.Other.ID
>>> 1

This is the thing you need actually.

A: You might try using namedtuple


text:
Q: How to disable auth verification email send, from Wordfence? In Wordfence documentation says:
"The filter "wordfence_ls_require_captcha" can be used to disable the CAPTCHA in circumstances of your choice. This may be useful for plugins that contain REST endpoints with authentication that should not require a CAPTCHA. Your filter should return false to bypass the CAPTCHA requirement when necessary, or otherwise true when the CAPTCHA should be required"
If I tried to make an API Call through JWT, I am getting an auth verification link via email and could not proceed to my flow. This API Call already has username:password for auth user. Thus, how could I use this filter
wordfence_ls_require_captcha

in order to disable the auth verification mail like Wordfence suggest in the documentation (email sent in the inbox, with verification link, in order to login - this is what I want to disable)?
*I already have installed a plugin that Disables all APIs Calls, for un-authorized users. So, this verification email is useless for now.

A: Looking at the latest WordFence available version (7.5.5 at the time of writing) seems that the email with subject "Login Verification Required" is sent only under two conditions (AND):

*

*$requireCAPTCHA = true

*$performVerification = true
Since we can make $requireCAPTCHA = false using that filter, this is how you want to deactivate that email:
add_filter( 'wordfence_ls_require_captcha', '__return_false' );


text:
Q: What is the meaning of the word "Principle" in Physics? What is the meaning of the word principle in Physics?
For example in the "action principle". Is it an action law, an action equation, or an unproved assumption? (I have an idea what an action is).
What confuses me is when I find the expression as in: "...an action principle is defined..." when a Lagrangian is constructed for a system.

A: Unfortunately, there is not a standard meaning in physics. Often physicists take the term "principle" with a meaning close to that of "axiom" i.e. as a basic element which applies to any object within the range of applicability of the model/theory. The important difference between mathematicians concept of axiom and physicists concept of principle is that the principles are related to experiments whereas the axioms in math are selected only in basis to formal criteria.
An traditional example of the this meaning of the term "principle" is found in thermodynamics: E.g. first and second principles, although often they are called "laws" of "postulates". Another example is in the common phrase "first-principle computation", which means that you perform a computation in term of basic fundamental properties.

A: That a physical theory/model with an action functional $S[q]= \int \!dt~L $

*

*has an action principle,

*has a variational principle,

*fulfills Hamilton's principle,

*or fulfills the principle of stationary action,

means by definition that the classical$^1$ equations of motion for the theory are precisely the Euler-Lagrange equations.
--
$^1$Here the word classical is used in the sense that Planck's constant $\hbar=0$ is set to zero.

A: My understanding of physics is that It must order human experience into a logically coherent picture.
The "principle of extremal action" is the logical foundation to understand the behaviour of classical objects. It allows us to single out the correct or experimentally observed description of the object under investigation out of a multitude of possibilities.


text:
Q: Is every co-closed form co-exact? Let $M$ be a Riemannian manifold, $E$ a vector bundle over $M$, equipped with a flat connection connection $\nabla$ and a $\nabla$-compatible metric $\eta$.
Denote by $\delta$ the adjoint of the covariant exterior derivative $d^{\nabla}$.
$$\delta: \Omega^k(M,E) \to \Omega^{k-1}(M,E) $$
Let $\sigma \in \Gamma(T^*M \otimes E)$ be a one  $\,E$-valued form, and suppose that $\delta(\sigma)=0$.
Does there exist an  $\,E$-valued form $\alpha \in \Omega^2(M,E)$ such that $\sigma=\delta(\alpha)$?
Comment:
The flatness of $\nabla$ implies $d^{\nabla} \circ d^{\nabla}=0$, hence $\delta^2=0$.  So, the condition $\delta(\sigma)=0$ is necessary for the existence of such an $\alpha$. The question is whether it is sufficient.

If this is not true, is there some other representation theorem?
What about the special case of $E=M \times \mathbb{R}$? (real-valued forms).

A: Pretty much by definition, an $E$-valued $k$-form $\alpha$ which satisfies $\delta \alpha = 0$ will be exact if $[\alpha] = 0$ in the homology $H_{*}(\Omega(M;E), \delta)$ of the chain complex $(\Omega^{*}(M;E), \delta)$. Let us change the grading and define $A^i(M;E) := \Omega^{n-i}(M;E)$ (where $n = \dim M$). Then $d_{\nabla} \colon \Omega^i(M;E) \rightarrow \Omega^{i+1}(M;E)$ is of degree one and satisfies $d_{\nabla} \circ d_{\nabla} = 0$ and $\delta \colon A^i(M;E) \rightarrow A^{i+1}(M;E)$ is also of degree one and satisfies $\delta \circ \delta = 0$. The Hodge star map can be fixed by introducing signs to make it a (co)chain complex map $\star \colon A^{*}(M;E) \rightarrow \Omega^{*}(M;E)$ which is an isomorphism and so
$$ H^{*}(M;E) := H^{*}(\Omega^{*}(M;E), d_{\nabla}) \cong H^{*}(A^{*}(M;E), \delta) = H_{n-*}(\Omega^{*}(M;E), \delta). $$
That is, the cohomology of $E$-valued differential forms (with respect to $d_{\nabla}$) is the same up to grading to the homology of $E$-valued differential forms (with respect to $\delta$). In particular, if $H^{n-1}(M;E) = 0$ then any one-form which satisfies $\delta \alpha = 0$ will be exact.
For concrete examples, take $M$ to be an open subset of $\mathbb{R}^3$ and $E$ to be the trivial vector bundle. If you identify one-forms and two-forms with vector fields on $M$, the equation $\delta X = 0$ is identical (maybe up to a sign) to the equation $\operatorname{div} X = 0$. The equation $\delta Y = X$ is identical to the equation $\operatorname{curl} Y = X$. A necessary and sufficient condition such that for any $X$ which satisfies $\operatorname{div} X = 0$ we can find a "primitive" $Y$ with $\operatorname{curl} Y = X$ is $H^2(M) = 0$.


text:
Q: Do cron jobs overlap? I have a cron Quartz trigger job executed each 30 seconds with this pattern:
0/30 * * * * ?

With this pattern, if my job spends more than 30 seconds to finish the execution, will next process be triggered and overlapped with first one?
Somewhere I've read that you can program a pattern to launch cron triggers n seconds after previous process finished, but can't find exact answer to program my jobs in this way.

A: What you might need here is stateful job implementation. You need to implement StatefulJob interface instead of Job
in the documentation it says
if a job is stateful, and a trigger attempts to 'fire' the job while it is already executing, the trigger will block (wait) until the previous execution completes.
You can find more details about it at this link http://www.quartz-scheduler.org/documentation/quartz-1.x/tutorials/TutorialLesson03

A: StatefulJob could be the Job i need, but according to this and this answers, correct way to face this problem is:
Quartz 2
In version 2.0 of Quartz, StatefulJob is deprecated. It is now recommended to use annotations instead:
@DisallowConcurrentExecution
public class YourJob implements org.quartz.Job {
    void execute(JobExecutionContext context) {/*implementation omitted*/}
}

Explanation:

@DisallowConcurrentExecution: multiple instances of the job will not be allowed to run concurrently (consider a case where a job has code in its execute() method that takes 34 seconds to run, but it is scheduled with a trigger that repeats every 30 seconds).


text:
Q: Passing Parameters to Active Admin Table_for columns I'm trying to set up a table_for in my active admin project which displays information based on methods I pass to it. I'm setting it up so that in the model, there is an array of arrays. The arrays within the array contain first the label, then the method meant to be run in the column. I'm trying to set it up this way:
panel "Acquired Shares" do
  table_for shareholder.acquired_shares_transactions do
    shareholder.acquired_shares_info.each do |section|
      column (section[0]) { |transaction| section[1] }
    end
  end
end

Here is the code of the method which returns the array of arrays:
def acquired_shares_info
    data = [[:label, transaction.event.to_s], [:amount_of_shares, transaction.amount_of_shares],
            [:share_price, transaction.event.share_price],
            [:total_price, (transaction.amount_of_shares * transaction.event.share_price)],
            [:occurred_on, transaction.event.occurred_on],
            [:from_shareholder, transaction.event.from_shareholder],
            [:share_transaction_action, transaction.event.share_transaction_action.name],
            [:share_transaction_type, transaction.event.share_transaction_type.name]]
    return data
end

This is all is meant to create a column for each label and method I specify in the array. However, I am stuck on how to pass the labels and methods from the array into the column for the table. The way that I try here keeps throwing the error "No block given" on the array. Anyone have ideas on how to set this up?
Thank you!

A: Defer evaluation of the method by wrapping it in a proc. Pass the proc as the last parameter instead of specifying a block, Ruby will substitute it for you.
data = [[:label, proc { |transaction| transaction.event.to_s }], ...
...
  column section[0], section[1]
...