text:
Q: Oracle: select from view, but where clause value from target table TARGET_TABLE:
id   | col1
------------
1      'mySample1234'
2      'mySample3456'

Current sql of MY_VEIW:
select substr(col1,-4,4) from TARGET_TABLE;

My query:
select * from MY_VEIW where col1 = 'mySample1234';

My result:
Empty

Expected result:
id   | col1
------------
1      '1234'

In other words, I want to select by 'value of TARGET_TABLE', despite of 'filtered value of MY_VIEW'.
How to achieve that?

A: Try using Regexp_replace
select regexp_replace(col1 , '[A-Za-z]')
From TARGET_TABLE

A: I am not sure I understand... Do you have a column named col1 in your base table, then you extract the last four characters, put them in a column also named col1 in the view, and then you want to select from the view?
If so - I understand how '1234' is the last four characters of 'mySample1234'. The full string is in the base table, and '1234' is in the view. How do you expect '1234' = 'mySample1234' to return anything but false? col1 in MY_VIEW is just '1234', not the full original string.
To return rows from MY_VIEW, you must filter with WHERE col1 = '1234' Or, if you were trying to see if the last four characters of col1 in TARGET_TABLE match the last four characters of a longer string, you could use WHERE col1 = SUBSTR('mySample1234', -4) (or any other comparison string in SUBSTR).
ADDED:  If you are trying to match col1 in MY_VIEW with the corresponding col1 in TARGET_TABLE, for example in a join, you can write it like this:
ON  (or WHERE ...)   MY_VIEW.col1 = SUBSTR(TARGET_TABLE.col1, -4)

A: Just use two arguments:
select substr(col1, -4)
from TARGET_TABLE;

However, if this isn't working:
select * from MY_VEIW where col1 = 'mySample1234';

Then the reason is that col1 is in the underlying table not the view.  I think you want:
create view my_view as
    select col1, substr(col1, -4) as last4
    from TARGET_TABLE;

Then you can use:
select *
from MY_VEIW
where col1 = 'mySample1234';

Or:
select *
from MY_VEIW
where last4 = '1234';


text:
Q: Cannot get the column specific timestamp to display on checkbox I have set up a Google sheet for attendance of Employees on which clicking on the checkbox, the current time is recorded.
I cannot get the specific timestamp in the respective columns when the checkbox is ticked.
Clicking on a different checkbox also change the timestamp for previously checked checkboxes.
I have used this formula here : =If(B2 = TRUE,now(),"")
and used filter handle to apply the formula for other rows underneath.
I have used this formula: =If(B2 = TRUE,now(),"")
The sheet can be seen here: https://docs.google.com/spreadsheets/d/1p6jmnHXtCu2m7BdLfC-23A51MrwkJJJpXidpbsDwxfU/edit?usp=sharing
I want to record the current timestamp, for each row.
i.e on clicking of the checkbox the current time should be changed/recorded only for the column in the same row and not for other records.

A: this needs to be done with the script:
function onEdit(e) {
  var s = SpreadsheetApp.getActiveSheet();
  {
    var r = s.getActiveCell();
    if( r.getColumn() == 2 ) {
      var nextCell = r.offset(0, 1);
      var newDate = Utilities.formatDate(new Date(),
      "GMT+1", "dd/MM/yyyy hh:mm:ss");
      nextCell.setValue(newDate);
   }
}

how to add a script to your spreadsheet

*

*go to Tools

*select Script editor

*copy paste the script

*save the project under some name

*click on run icon and authorise it...

*select your account

*click on Advanced

*select Go to * (unsafe)

*click on Allow and return to your sheet (you can close script window/tab)

redpajama_set_name: RedPajamaStackExchange


text:
Q: O que é um autômato celular? Do que se trata o autômato celular? Que tipo de problema isso pode resolver? É algo equivalente às máquinas de Turing?

A:
Do que se trata o autômato celular?

A primeira definição de Automato Celular Surgiu com Von Neumman nos anos 40
 com a intenção de fornecer informações sobre os requisitos lógicos de uma Máquina
 autorreplicadora, e foi usado no construtor universal de Von
 Neumann.
Em uma definição geral, Autômato Celular, matematicamente falando , é um arranjo de maquinas de estados que há alterações entre si baseando-se em condições pré-estabelecidas.

O AC é composto por um conjunto de células com determinados valores, que interagem
  entre si em função de uma coleção finita de condições pré-definidas. Os estados(valores) das células são alterados conforme um conjunto de regras de transição, que
  depende da vizinhança (às vezes da própria célula também), ou seja, das células em
  torno da célula que será atualizada.

Vale Ressalva sobre o trecho coleção finita de condições pré-definidas.

Evolução de um autómato celular numa rede de dimensão
  1 e numa rede de dimensão 2 com simetria hexagonal. A regra de
  interacção é a mesma para os dois autómatos: o estado de cada nó
  no tempo 1 só depende dos estados nos nós vizinhos no tempo 0

Vamos pegar como referência os autômatos unidimensionais, Temos exatamente 256 regras definidas:

Cada célula pode assumir um dos possíveis estados (valores) k do
  conjunto Q, sendo que os estados variam de 0 até k − 1.

Por ser unidimensional, terá apenas dois caminhos(comumente chamado vizinhos), um para direita e um para a esquerda(desconsiderando o próprio ponto k)

A
  quantidade possível de combinações com os dois vizinhos e a própria célula e dois
  estados é 2³ = 8 combinações, sendo que as células terão apenas um dos dois estados
  existentes, ou seja, o número 2 corresponde a quantidade de estados possíveis que a
  célula pode assumir, por exemplo 0 ou 1, e o número 3 corresponde a quantidade de
  vizinhos, isto é, o vizinho da esquerda, a própria célula e o vizinho da direita, o que
  implica em uma faixa de vizinhança igual a r = 1. Com estas 8 possíveis combinações
  pode-se formar um total de 2⁸ = 256 regras locais, ou seja, para cada combinação a célula que será atualizada pode receber 0 ou 1.

Em suma os ACs representam determinados conjuntos  que irá sofrer alteração por regras estabelecidas e isso implica na resposta da segunda pergunta:

** Que tipo de problema pode resolver?**

Por demonstrar os resultados a partir de regras os ACs são utilizados para simular fenômenos, é possível simular a propagação de um incêndio caso estejamos numa seca forte e o vento estiver a 10 nós para oeste, por exemplo, logicamente a parte ao leste do inicio estaria muito menos, ou não haveria nenhum foco de fogo e a parte queimando quando acabasse com as arvores e/ou encontrasse alguma região de muita rocha se findaria o incêndio.

É algo equivalente às máquinas de Turing?

Semelhante, mas não equivalente. Enquanto os Acs trabalhariam com valores pré definidos de conjuntos Finitos, se assemelhando a Fita da máquina, porém para Turing havia um potencial ilimitado de fitas.

é uma máquina capaz
  de calcular todos os processos ou funções que sejamos
  capazes de imaginar

Esta pergunta define bem o significado da Máquina de Turing
O que é Máquina de Turing?
Outras referências :
Autômatos Celulares, máquina de Turing ou a natureza Como máquina de Cálculo


text:
Q: Performance Monitor Processor Time counter blank data I setup a simple data collector with Performance Monitor to collect Processor time(CPU Usage in %) and SQL Statistics: Batch Requests/sec @ 15 second intervals to see if i can get some baselines and report back to our vendor.
I started the counter on July 6th at 2:30PM; It recorded the values fine up to July 7th 12:15AM, then the  Processor time counter stopped recording at that time, but the Batch requests/sec are still getting counted. It recorded a total of 2332 rows without any blanks, then after than the Processor time counter stopped recording. ( There's a small gap between 12:15 and 12:18AM on the 7th for 7 rows for the Batch requests counter, but it continues afterwards down to over 10k rows).
Its setup to write to a csv.
I recreated this perfmon counter more than once; Previously i had other multiple other counters in the data collector(Disk IO, Network IO, avl memory...), and the same issue occurred ( Either the CPU Time would stop recording after a certain time or the Batch requests; All other counters didn't seem to get affected).
I have a separate data collector that only has the Processor Time counter for our multiple application servers, those seem to run fine without any missing values.
Has anyone seen similar issues with performance counters that just stop recording for a specific counter? Should i try increasing the interval to 1minute instead of 15 seconds?


text:
Q: mysql group by day with count multi types of records i have a table with id | type | publishedon
type may be 1,2,3 or 4 (int) value
i want to select posts for every day
now i'm using
SELECT FROM_UNIXTIME( `publishedon` , "%Y-%m-%d" ) AS `day` , count( id ) AS listings,
TYPE FROM posts
WHERE (
FROM_UNIXTIME( publishedon ) >= SUBDATE( NOW( ) , 30 )
)
GROUP BY `day`

the result
day     listings
2013-09-02  17
2013-09-05  105

i want make listings filed more detailed like
day     type_1   type_2   type_3   type_4
2013-09-02  10      4       6        3
2013-09-05  6      4       1        3

A: You simply need to put all your type values:
SELECT
  FROM_UNIXTIME( `publishedon` , "%Y-%m-%d" ) AS `day`,
  count(id) AS listings,
  (SELECT COUNT(id) FROM `posts` WHERE `type`=1 AND FROM_UNIXTIME(`publishedon`, "%Y-%m-%d")=`day`) AS `type_1`,
  (SELECT COUNT(id) FROM `posts` WHERE `type`=2 AND FROM_UNIXTIME(`publishedon`, "%Y-%m-%d")=`day`) AS `type_2`,
  (SELECT COUNT(id) FROM `posts` WHERE `type`=3 AND FROM_UNIXTIME(`publishedon`, "%Y-%m-%d")=`day`) AS `type_3`,
  (SELECT COUNT(id) FROM `posts` WHERE `type`=4 AND FROM_UNIXTIME(`publishedon`, "%Y-%m-%d")=`day`) AS `type_4`
FROM
  `posts`
WHERE
  FROM_UNIXTIME(`publishedon`) >= SUBDATE(NOW(), 30)
GROUP BY
  `day`

but in fact, that will work slow since there are functions in conditions. If it is only a formatting matter, it's better to act like:
SELECT
  FROM_UNIXTIME(`publishedon`, "%Y-%m-%d" ) AS `day`,
  `type`,
  count( id ) AS listings,
FROM
  `posts`
WHERE
-- this should be better evaluated in application
-- since will not produce index using too:
  FROM_UNIXTIME(`publishedon`) >= SUBDATE(NOW(), 30)
GROUP BY
  `day`,
  `type`

and then create desired formatting inside application.


text:
Q: Inapp purchases disappear on android ionic app I'm trying to implement inapp purchases with the plugin cordova-plugin-inapppurchase The products load, but after the products are loaded the products doesn't show.
What's my mistake?
This is my code:

Or Inappp purchases

Or Inappp purchases

JS
var productIds = ["com.domain.example"]; //I have the correct ID

  var spinner = '<ion-spinner icon="dots" class="spinner-stable"></ion-spinner>
';

  $scope.loadProducts = function() {

      console.log("loaded inapp products"); // This logs

    $ionicLoading.show({
      template: spinner + 'Loading...'
    });
    inAppPurchase
      .getProducts(productIds)
      .then(function(products) {
        $ionicLoading.hide();
        $scope.products = products;
      })
      .catch(function(err) {
        $ionicLoading.hide();
        console.log(err);
      });
  };

  $scope.buy = function(productId) {
      console.log("buy clicked");

    $ionicLoading.show({
      template: spinner + 'Acquisto in corso...'
    });
    inAppPurchase
      .buy(productId)
      .then(function(data) {
        console.log(JSON.stringify(data));
        console.log('consuming transactionId: ' + data.transactionId);
        return inAppPurchase.consume(data.type, data.receipt, data.signature);
      })
      .then(function() {
        localStorage.setItem('sold', 'true');
        $ionicLoading.hide();
        if (state == "l2") {
          $state.go("12")
        }
      })
      .catch(function(err) {
        $ionicLoading.hide();
        console.log(err);
      });

  };

  $scope.restore = function() {

    console.log("IT WORKS");

    $ionicLoading.show({
      template: spinner + 'Ripristino degli acquisti in corso...'
    });
    inAppPurchase
      .restorePurchases()
      .then(function(purchases) {
        $ionicLoading.hide();
        console.log(JSON.stringify(purchases));
        localStorage.setItem('sold', 'true');
        $state.go("12")
      })
      .catch(function(err) {
        $ionicLoading.hide();
        console.log(err);
        $ionicPopup.alert({
          title: 'Something went wrong',
          template: 'Check your console log for the error details'
        });
      });
  };

A: You are just loading product that's why its not appearing.
you have to print it to show as below.

{{product}}


text:
Q: Why can't ASP.NET load the assembly? It looks like it's changing the version that's being referenced I am trying to build an ASP.NET project, but Visual Studio keeps giving me the error
(0): Build (web): Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

The System.Web.Extensions.dll assembly is located in my GAC (and I added it to the bin folder just to be sure that it wasn't having trouble finding it).  The interesting thing to note here is that in my web.config I reference the assembly like so:
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

but, while this references Version=3.5.0.0, when the build is attempted, it is evidently looking for Version=1.0.61025.0.
So far, I have tried copying the assembly to the bin folder, referencing that assembly in the bin folder through Add Reference, and checking to make sure that the target framework is .NET 3.5 (which it appears to be).  Can anyone tell me what is going on here?

A: System.Web.Extensions.Design, Version=1.0.61025.0 is an assmebly included
in ASP.NET Ajax Extension component. In order to use it, you have to
install it in your development environment.
If you have not installed it before, please download and install it at
http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en
After installation, please restart Visual Studio and build the solution
again.

A: Check your dll bit version (32 vs 64). I spent half a day on this once.

A: I think that your reference in the bin folder gets lost each time your project tries to build because the bin folder is being recreated during each build.
Try placing the System.Web.Extensions.dll in another folder within your project other than bin.  Perhaps a new folder called binaries and then add a reference to that location.  Also be sure to set that reference to Copy Local.


text:
Q: How to handle different points sizes of different fonts? I'm trying to use EBGaramond font together with TeX Gyre Pagella and Asana-Math as math font. But 12pt EBGaramond font looks somehow smaller than Pagella in text and Asana in math.
Why that's the case is discussed here. But I'm wondering if there's a solution to still use the fonts together?
Minimal working example:
% compile with XeLaTeX or LuaLaTeX
\documentclass[a4paper,12pt]{article}
\usepackage{fontspec}
\setmainfont[%
    ,Extension = .otf
    ,UprightFont = *-Regular
    ,ItalicFont = *-Italic
    ,BoldFont = texgyrepagella-bold
    ,BoldItalicFont = texgyrepagella-bolditalic
]{EBGaramond12}
\usepackage{unicode-math}
\setmathfont{Asana-Math.otf}
\begin{document}
This Garamond Text \textbf{and bold Pagella}

Inline numbers like $12345$ and math $α+Δ$ are too big as well.
\end{document}

For the Garamond Pagella deviation I assume that I can use the "Scale" option in the "fontspec" package.
But the math font is too big. So my question is: can I set the size of the math font seperately?
I'm aware of the option in the unicode-math package:
\setmathfont{Minion Math}[
SizeFeatures = {
{Size = -6.01, Font       = MinionMath-Tiny},
{Size = 6.01-8.41, Font   = MinionMath-Capt},
{Size = 8.41-13.01, Font  = MinionMath-Regular},
{Size = 13.01-19.91, Font = MinionMath-Subh},
{Size = 19.91-, Font      = MinionMath-Disp}
}]

But isn't there a simpler way set the math font on 11pt for example and see if that fits better to the EBGaramond12?
This question is somehow similar but doesn't present a solution at all. Isn't there one?

A: This is going to be one of the ugliest documents I've ever seen. ;-)
Mixing Palatino, a 20th century font, with EB Garamond, that tries to reproduce a 17th century font with completely different features is a typographic sin. Please, don't do it. And don't use boldface with Garamond under any circumstances.
\documentclass[a4paper,12pt]{article}
\usepackage{fontspec}
\setmainfont[
  Extension = .otf,
  UprightFont = *-Regular,
  ItalicFont = *-Italic,
  BoldFont = texgyrepagella-bold,
  BoldFeatures = {Scale=MatchLowercase},
  BoldItalicFont = texgyrepagella-bolditalic,
  BoldItalicFeatures = {Scale=MatchLowercase},
]{EBGaramond12}
\usepackage{unicode-math}
\setmathfont[Scale=MatchLowercase]{Asana-Math.otf}
\begin{document}
This Garamond Text \textbf{and bold Pagella}

Inline numbers like $12345$ and math $α+Δ$ are too big as well.
\end{document}

As you can see from the image, the result is really ugly. Here's a quick comparison of uppercase

but the differences are even more striking with lowercase

There's no way Garamond a Palatino can live together.


text:
Q: How to add multiple joins in the same query for pool.query Nodejs connection? I'm building an Accounting Web Project using Nodejs and Express and I have to connect three tables from my database: parametro, tipoparametro and clasificacion.
My original query allows two tables to connect with the following code:
const parametro = await pool.query('SELECT p.parid, p.parcodigo, p.parclasificacion, tp.tipoparcodigo, p.parvalor, p.pardescripcion, p.parfechacrea FROM parametro p join tipoparametro tp WHERE p.tipoparid = tp.tipoparid ORDER BY p.parid DESC');

However, I need to add table clasificacion, but adding the second join breaks the code. Looks like this:
const parametro = await pool.query('SELECT p.parid, p.parcodigo, p.parclasificacion, c.parletras, tp.tipoparcodigo, p.parvalor, p.pardescripcion, p.parfechacrea FROM parametro p join tipoparametro tp WHERE p.tipoparid = tp.tipoparid join clasificacion c where c.parclasificacion = p.parclasificacion ORDER BY p.parid DESC');

I get the following error:
Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'join clasificacion c where c.parclasificacion = p.parclasificacion ORDER BY p.pa' at line 1

The query works fine in SQL but not inside my router.get await request.
I have searched but found no useful examples for multiple joins inside the same query for pool.query. In the future, I may even require more complex queries for my project. Is the SQL syntax incorrect, or am I missing something in order to add several tables together?


text:
Q: How can you set path of match with MemoryRouter and Jest? (not location or history) please forgive me if there is a duplicate.
I know MemoryRouter has initialEntries and initialIndex, so you can set path and etc for "location" and "history". However "match" is not getting updated... I need to set "match" for my react app and Jest tests.
When I try,
<MemoryRouter initialEntries={['/hello']} initialIndex={0}>
      <Hello store={store} />
</MemoryRouter>

I am getting
match: { path: '/', url: '/', params: {} ... },
location: { path: '/hello', pathname: '/', ... },
history: { ..., location: { path: '/hello', pathname: '/', ... }}

I wonder if there is a way to set match. Thanks in advance.

A: You can wrap your <Hello store={store} /> component with <Route ... /> component like:
import React from 'react';
import { MemoryRouter, Route } from 'react-router-dom';

// later in tests

<MemoryRouter initialEntries={['/home']}>
  <Route component={props => <HomeComponent {...props} />} path="/home" />
</MemoryRouter>

Then you should have access to proper match object by props.


text:
Q: CyberSource SOAP Toolkit Missing? I have an install of Magento 1.8.1.0 and for some reason under Configuration -> Sales -> Payment Methods I'm not seeing "CyberSource (SOAP Toolkit)" as an option.  Authorize.Net is there along with PayPal and others, but not CyberSource.  It's the first time I'm working with CyberSource.
Compilation is disabled:
php -f shell/compiler.php -- state
Compiler Status:          Disabled
Compilation State:        Not Compiled
Collected Files Count:    0
Compiled Scopes Count:    0

PHP SOAP is installed and available. php -i | grep configure shows:
--enable-soap
--with-openssl
--with-libxml-dir

I've seen other screenshots of the Payment Methods screen showing the CyberSource entry, but not on mine.  Is there something else I have to install?
Any help would be greatly appreciated.

A: So the answer is install the extension:
http://www.magentocommerce.com/magento-connect/cybersource-extension.html
Yes it hasn't been updated in two years but it's it.  Now the CyberSource (SOAP API) payment method is appearing.

A: The reason you are not seeing CyberSource (SOAP Toolkit) in your installation is because it is not a native module from Magento. You'll need to contact CyberSource for support.
EDIT: Not a native module in Magento CE and Enterprise, but integrated in Magento Go. For CE and Enterprise, 3rd party extensions are available, some free, some paid.


text:
Q: Quantity for each item select to be posted and written to a mysql database table $disabled in the below code repeatedly gets overwritten for example:

*

*Item 1 = Quantity 3 Check box = True

*Item 2 = Quantity 5 Check box = True

*Item 3 = Quantity 1 Check box = False

The values written to the table will be:

*

*Item 1 = Quantity 1

*Item 2 = Quantity 1

*Item 3 = Quantity 1

For the quantity I reuse an input field with the name Quantity. So in the first instance I setting Quantity = 3 then I set Quantity to 7 and finally to 5.
As the input fields all have the same name (and the Quantity is not an array), the $_POST ['Quantity'] can only hold one value, the last one
I think I have the answer though - I need to use the variable Addbox[] to store which item id you are adding - I could use the same variable to store the quantity as well. This would create consecutive pairs of values Addbox[0] would contain ItemID, Addbox[1] would contain Quantity. and so on or store quantity in an array: Quantity[] - and process as for Addbox[]
Problem is I cannot successfully edit my code to achieve the above.
//-----------------------THIS IS WHERE THE ITEMS ARE DISPLAYED

    if (isset ($_POST['BrowseItem'])){

    if (isset ($_SESSION['Username'])) {

$disabled = "";

}
else {
$disabled = "disabled";
}

?>
</form>
<form id="Searchform" name="Searchform" method="post">

<?php

    echo "

 Item Name	 Item Description	Price	Image	Quantity
";

  //-create  while loop and loop through result set
      while($row=mysql_fetch_array($allresult)){
              $Itemname =$row['Item_Name'];
              $Itemdesc =$row['Item_Description'];
              $ItemID =$row['Item_ID'];
              $Price =$row['Price'];
              $Image =$row['Image'];
      //-display the result of the array in a table

      echo "
  "   .$Itemname . "	";

      echo "" . $Itemdesc . "	";

      echo "" . $Price . "	";

      echo "  	";

     $i = 1;

      if (isset ($_SESSION['Username'])){

      echo " <select name='Quantity' />";

      // while loop to enable user to select the quantity they want
      while ($i<=10) {
      echo "<option value=\"" . $i . "\">" . $i . "</option>";

      $i++;
      }

      echo "</select> 	";

      echo " <input type='checkbox' name='Addbox[]' value='".$row['Item_ID']."'/> 	";
    }
        else {

        echo " <select name='Quantity' />value='"

.$i."'  </select> 	";
        echo " Please log in to add this item to your wishlist	";

        }

      }
      echo "
";

      echo "<input type='Submit' name='Add' id='Add' value='Add selected to Wishlist' action='ReturnResult.php' $disabled/> ";

  }
  }
  ?>

</form>

//---------------------------------------THIS IS THE END OF THE TABLE

This is the for each row loop
if (isset ($_POST['Addbox'])) {
$items = $_POST['Addbox'];

foreach ($items as &$itemid){

    $quantity = $_POST['Quantity'];

    echo $quantity;

if ($itemid > 0){

$sql = "INSERT INTO
        `wishlist` (`User_ID`,
                    `Product_ID`,
                    `Quantity`)
        VALUES ($userid, $itemid, $quantity)";

mysql_query($sql);

}

A: Got there in the end, the select box needed to be as such:
 <select name="quantity[]">

$i = 1;

while ($i <=10) {

       option value=\"" . $i . "\"">" . $i . "</option>";

       $i++

      }

echo "</select>	";

The if (isset()) statement then needed to be:
$count = count ($_POST['Addbox']);

$sql "INSERT INTO `wishlist` (`User_ID`, `Product_ID`, `Quantity`) VALUES ";

for ($i=0; $i < $count; $i++) {

   $item = $_POST['Addbox'][$i];
   $quantity = $_POST['quantity'][$i];

 $sql .= ($userid, $item, $quantity);

  if ($i !== $count-1){

       $sql .= ", ";

   }
  }

   mysql_query($sql);
 }


text:
Q: Multiple DataSources with Multiple Transaction Managers in Spring I have three DataSource's (JDBC) defined in the Junit application context file. Two of them need to be transactionally managed; I do not have to chain any of the methods when using these two data sources (they are entirely independent of each other).
I did not have a problem when I used a single transaction manager for dataSource2, even though dataSource3 was being utilized but not managed in the corresponding methods. Nonetheless, upon needing to also manage methods from various DAO classes that solely use dataSource3, I added the second transaction -- txManager2. The context file contains the following:
<context:component-scan base-package="my.pkg" />

<bean id="dataSource1"
    class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName" value="oracle.jdbc.OracleDriver" />
    <property name="url" value="jdbc:oracle:thin:@host1:1521:dbsid1" />
<property name="username" value="username1" />
<property name="password" value="password1" />
</bean>

<bean id="dataSource2"
    class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName" value="oracle.jdbc.OracleDriver" />
    <property name="url" value="jdbc:oracle:thin:@host2:1521:dbsid2" />
<property name="username" value="username2" />
<property name="password" value="password2" />
</bean>

<bean id="dataSource3"
    class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName" value="oracle.jdbc.OracleDriver" />
    <property name="url" value="jdbc:oracle:thin:@host3:1521:dbsid3" />
<property name="username" value="username3" />
<property name="password" value="password3" />
</bean>

<tx:annotation-driven/>

<bean id="txManager1" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <qualifier value="txManager1"/>
<property name="dataSource2" ref="dataSource2"/>
</bean>

<bean id="txManager2" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <qualifier value="txManager2"/>
<property name="dataSource3" ref="dataSource3"/>
</bean>

Since multiple transaction managers are being defined, I qualified them with their own values. As you can see, dataSource3 is being injected using a setter method:
package my.pkg;

@Component
public class MyDAO {

    private DataSource dataSource3;

    // Read only from datasource
    @Autowired
    @Qualifier("dataSource")
    public void setDataSource(DataSource ds) {
        template = new NamedParameterJdbcTemplate(ds);
    }

    // Performs reads/updates/inserts from datasource2
    @Autowired
    @Qualifier("dataSource2")
    public void setDataSource2(DataSource ds) {
        iTemplate = new NamedParameterJdbcTemplate(ds);
    }

    // Performs reads/updates/inserts from datasource3
    @Autowired
    @Qualifier("dataSource3")
    public void setDataSource3(DataSource ds) {
        dataSource3 = ds;
        uTemplate = new NamedParameterJdbcTemplate(ds);
    }

    @Transactional("txManager1")
    public String insertProcs() { }

    @Transactional("txManager2")
    public String updateProcs() { }
}

However, upon running the Junit unit test, I get the following:
java.lang.IllegalStateException: Failed to load ApplicationContext
    at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:308)
    at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
    at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
    at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:321)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:211)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:289)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'txManager2' defined in class path resource [test-context.xml]:

Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'dataSource3' of bean class

[org.springframework.jdbc.datasource.DataSourceTransactionManager]: Bean property 'dataSource3' is not writable or has an invalid setter method. Does the parameter

type of the setter match the return type of the getter?
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1363)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1085)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
        at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84)
        at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:1)
        at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:280)
        at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:304)
        ... 24 more
    Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'dataSource3' of bean class

    [org.springframework.jdbc.datasource.DataSourceTransactionManager]: Bean property 'dataSource3' is not writable or has an invalid setter method. Does the parameter

    type of the setter match the return type of the getter?
        at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1052)
        at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:921)
        at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:76)
        at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)

Any idea where the source of the problem is?
Update
Based on the answer accepted, the following changes were made to get the intended functionality:
<tx:annotation-driven transaction-manager="txManager1"/>

<bean id="txManager1" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <qualifier value="txManager1"/>
    <property name="dataSource" ref="dataSource2"/>
</bean>

<bean id="txManager2" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <qualifier value="txManager2"/>
    <property name="dataSource" ref="dataSource3"/>
</bean>

@Qualifier("dataSource") should have been corrected (typo on my part):
    // Read only from datasource
    @Autowired
    @Qualifier("dataSource1")
    public void setDataSource1(DataSource ds) {
        template = new NamedParameterJdbcTemplate(ds);
    }

A: There are few problems with your configuration:
<property name="dataSource2" ref="dataSource2"/>
<property name="dataSource3" ref="dataSource3"/>

The bean names are different, but property names are not. You should change this to:
<property name="dataSource" ref="dataSource2"/>
<property name="dataSource" ref="dataSource3"/>

E.g.: in setter properties for txManager1 and txManager2 beans respectively.
Second: @Qualifier("dataSource2") and @Qualifier("dataSource3") are wrong since your are qualifying the TX managers beans, and not the data-source beans.
You can use @Resource("dataSource2") and @Resource("dataSource3") instead, or qualify the data-source beans as well.
Third: @Qualifier("dataSource"). Notice it's not complaint either with a qualifier and a bean's name (note: it's dataSource1)
As a last thing, you have defined tx:annotation-driven. It expects a transaction manager whose bean name is transactionManager. You have failed to give it's bean definition as well, so this will fail either.


text:
Q: Search Javascript not producing correct url I have a search bar script that if certain keywords are typed in it goes to a specific page and if the certain word isn't typed it would use the standard search. The problem is that if i create the falseLocation to zendesks standard {{search}} it always selects that one first instead of searching through the arrays.
Currently the falseLocation is set to https://support.nightowlsp.com/hc/en-us/search?utf8=✓&query=Search which only produces a search for the word "Search"
...
<script type='text/javascript'>
    $(document).ready(function() {
        var productLocatorArray = [];

        productLocatorArray.push(
            [
                [ // 0 AHD7 Series
                    ['https://support.nightowlsp.com/hc/en-us/articles/360009216554-Don-t-See-Your-Series-'],
                    [
                        "AHD7 SERIES", "AHD7SERIES", "AHD7", "AHD7-1682","AHD7-441",
                        "AHD7-841","AHD7 841","AHD7841",
                        "AHD7-841-B","AHD7 841 B","AHD7841B",
                        "AHD7-842",
                        "AHD7-881",
                        "AHD7-882",
                        "AHD7-DVR16-2TB",
                        "AHD7-DVR4-1TB",
                        "AHD7-DVR8-1TB",
                        "AHD7-DVR8-2TB",
                        "B-A720-162-14-1PTZ",
                        "B-A720-162-16",
                        "B-A720-162-8",
                        "B-A720-162-8-1PTZ",
                        "B-A720-162-8-B",
                        "B-A720-41-4",
                        "B-A720-41-4-B",
                        "B-A720-81-4",
                        "B-A720-81-4-B",
                        "B-A720-81-6-1PTZ",
                        "B-A720-81-8",
                        "B-A720-81-8-B",
                        "CAN-AHD7-441",
                        "CAN-AHD7-441-B",
                        "CL-441-720P",
                        "CL-882-720P",
                        "CL-882-720P-B",
                        "DVR-4A720J-5",
                        "B-AZ16-8HD7-2",
                        "B-AZ4-4HD7-1",
                        "B-BBA720-82-8",
                        "BJ-882-720P",
                        "BJ-441-720P", "B-A720-162-12-R", "B A720 162 12 R", "BA72016212R", "AHD7-DVR4-1TB-R", "AHD7 DVR4 1TB R", "AHD7DVR41TBR", "AHD7-441-B-R", "AHD7 441 B R", "AHD7441BR", "CAM-2PK-AHD7", "CAM 2PK AHD7", "CAM2PKAHD7"
                    ]
                ],
                [ // 1 AHD10 Series
                    ['https://support.nightowlsp.com/hc/en-us/articles/115008318647-AHD10-Series'],
                    [
                        "AHD10 SERIES", "AHD10SERIES", "AHD10", "AHD10-441",
                        "B-AHD10-441",
                                            "C-841-A10",
                                            "C 841 A10",
                                            "C841A10",
                                            "DVR-AHD10",
                                            "DVR AHD10",
                                            "DVRAHD10",
                                            "AHD10",
                                            "CL-A10-841",
                                            "CL A10 841",
                                            "CLA10841", "AHD10-841", "AHD10 841", "AHD10841", "AHD201-84-B", "AHD201 84 B", "AHD20184B", "AHD201-84-R", "AHD201 84 R", "AHD20184R", "CAM-2PK-AHD10", "CAM 2PK AHD10", "CAM2PKAHD10"
                                    ]
                ],
                [ // 2 NVR7 Series
                    ['https://support.nightowlsp.com/hc/en-us/articles/360009216554-Don-t-See-Your-Series-'],
                    [
                                            "NVR7",
                                            "NVR7 SERIES",
                        "NVR7P-441",
                        "NVR7P-882"
                    ]
                ],
                                [ // 2 NVR H5 Series
                    ['https://support.nightowlsp.com/hc/en-us/articles/360009216554-Don-t-See-Your-Series-'],
                    [
                                            "NVR H5",
                                            "NVR H5 SERIES",
                                            "H5",
                        "NVR-H5B-323",
                        "NVR-H5B-82"
                    ]
                ],
                [ // 3 NVR10 Series
                    ['https://support.nightowlsp.com/hc/en-us/articles/360009216554-Don-t-See-Your-Series-'],
                    [
                                            "NVR10",
                                            "NVR10 SERIES",
                        "NVR10-441",
                        "NVR10-442",
                        "NVR10-842",
                        "NVR10-843",
                        "NVR10-882",
                        "NVR10-883",
                        "B-BBNVR10-882"
                    ]
                ],
                [ // 4 F Series
                    ['https://support.nightowlsp.com/hc/en-us/articles/360009216554-Don-t-See-Your-Series-'],
                    [
                                            "F SERIES",
                                            "F SERIES 32",
                                            "F6",
                                            "F6 SERIES",
                                            "F9",
                                            "F9 SERIES",
                        "B-F650-45-4",
                        "B-F650-45-4-B",
                        "B-F650-81-8",
                        "B-F650-81-8-B",
                        "B-F900-161-12",
                        "B-F900-161-12-B",
                        "B-F900-161-8",
                        "B-F900-161-8-B",
                        "B-F900-81-4",
                        "B-F900-81-4-B",
                        "B-F900-81-8",
                        "B-F900-81-8-B",
                        "B-F9-3212-12DM-2TB",
                        "B-F9-3212-12DM-2TB-B",
                        "B-F93224-700-2TB",
                        "F6-161-8624N",
                        "F6-41-4624N",
                        "F6-45-4624N",
                        "F6-81-4624N",
                        "F6-81-4624N-B",
                        "F6-81-4624N-BF",
                        "F6-81-8624N",
                        "F6-DVR16",
                        "F6-DVR16-1TB",
                        "F6-DVR16-R",
                        "F6-DVR4",
                        "F6-DVR4-5GB",
                        "F6-DVR4-R",
                        "F6-DVR8",
                        "F6-DVR8-1TB",
                        "F6-DVR8-R",
                        "F9-161-8930",
                        "F9-161-8930-B",
                        "F9-3212-4DM-2TB",
                        "F9-3216-2TB",
                        "F9-3216-2TB-B",
                        "F9-81-4930",
                        "F9-81-4930-B",
                        "F9-81-8930",
                        "F9-81-8930-B",
                        "F9-DVR32",
                        "F9-DVR32-2TB",
                        "CAN-F6-45-2624N",
                        "CAN-F6-45-2624N-B",
                        "CAN-F6-81-4624N",
                        "CAN-F6-81-4624N-B",
                        "B-AZ16-8700-1",
                        "B-AZ4-4700-5",
                        "B-BBF900-81-8"
                    ]
                ],
                [ // 5 X Series
                    ['https://support.nightowlsp.com/hc/en-us/articles/360009216554-Don-t-See-Your-Series-'],
                    [
                                            "X SERIES",
                        "X100-DVR16",
                        "X100-DVR16-1TB",
                        "X100-DVR16-1TB-R",
                        "X100-DVR16-2TB",
                        "X100-DVR4",
                        "X100-DVR4-5GB",
                        "X100-DVR4-R",
                        "X100-DVR8",
                        "X100-DVR8-1TB",
                        "X100-DVR8-5GB",
                        "X100-DVR8-R",
                        "X7-SP-841TB",
                        "X9-1616-2TB",
                        "X9-168-1TB",
                        "X9-168-1TB-R",
                        "X9-168-2TB",
                        "X9-168-2TB-R-PF",
                        "X9-168-4DM-2TB",
                        "X9-168-4DM-2TB-B",
                        "X9-42-500",
                        "X9-44-500",
                        "X9-44-500-R",
                        "X9-84-1TB",
                        "X9-84-1TB-B",
                        "X9-84-500",
                        "X9-88-1TB",
                        "X9-88-2TB",
                        "X9-88-500",
                        "B-X161-8",
                        "B-X162-12",
                        "B-X162-16",
                        "B-X81-4",
                        "B-X81-49-4DM9-BB",
                        "B-X81-49-4DM9-BB-B",
                        "B-X81-4-R",
                        "B-X81-8"
                    ]
                ],
                [ // 6 BJP-BJ Series
                    ['https://support.nightowlsp.com/hc/en-us/articles/360009216554-Don-t-See-Your-Series-'],
                    [
                                            "BJ",
                                            "BJ SERIES",
                                            "BJP",
                                            "BJP SERIES",
                        "BJ-168-724-1TB",
                        "BJ-168-724-1TB-R",
                        "BJ-84-724-5GB",
                        "BJ-84-724-5GB-R",
                        "BJ-881-624A",
                        "BJ-881-624A-B",
                        "BJ-881-624A-R",
                        "BJP-45",
                        "BJP-45-R",
                        "BJPRO-86-1TB",
                        "BJPRO-86-1TB-R"
                    ]
                ],
                [ // 7 WM Series
                    ['https://support.nightowlsp.com/hc/en-us/articles/360009216554-Don-t-See-Your-Series-'],
                    [
                        "WM-41-4624N",
                        "WM-81-8624N",
                        "WM-845-4CM624",
                        "WM-845-4CM624-B",
                        "WM-845-4CM624-R",
                        "WM-845-624",
                        "WM-845-624-R"
                    ]
                ],
                [ // 8 WMC Series
                    ['https://support.nightowlsp.com/hc/en-us/articles/360009216554-Don-t-See-Your-Series-'],
                    [
                        "WMC-165-8624N",
                        "WMC-165-8624N-R",
                        "WMC-85-4511",
                        "WMC-85-4511-R",
                        "WMC-85-8624N"
                    ]
                ],
                [ // 18 HDA Series
                        ['https://support.nightowlsp.com/hc/en-us/articles/115008161648-HDA10-Series'],
                        [
                            "HDA10 SERIES", "HDA10SERIES", "HDA10", "HDA 10",
                                            "C-881-PIR1080",
                                            "C 881 PIR1080",
                                            "C881PIR1080",
                                            "DVR-HDA10PB-81-RS",
                                            "DVR HDA10PB 81 RS",
                                            "DVRHDA10PB81RS",
                                            "DVR-HDA10PB-81",
                                            "DVR HDA10PB 81",
                                            "DVRHDA10PB81",
                                            "WM-8HD10L-4720-1",
                                            "WM 8HD10L 4720 1",
                                            "WM8HD10L47201",
                                            "DVR-HDA10LB-81-RS",
                                            "DVR HDA10LB 81 RS",
                                            "DVRHDA10LB81RS",
                                            "DVR-HDA10LB-81",
                                            "DVR HDA10LB 81",
                                            "DVRHDA10LB81",
                                            "CL-HA10-881P",
                                            "CL HA10 881P",
                                            "CLHA10881P",
                                            "CL-HA10",
                                            "CL HA10",
                                            "CLHA10",
                                            "WM-HD2-861P",
                                            "WMHD2861P", "B-10LHDA-16161-720", "B 10LHDA 16161 720", "B10LHDA16161720", "B-10LHDA-841-1080-R", "B 10LHDA 841 1080 R", "B10LHDA8411080R",
"B-10PH-16121-AHD2", "B 10PH 16121 AHD2", "B10PH16121AHD2", "B-10PH-16121-AHD2-R", "B 1OPH 16121 AHD2 R", "B10PH16121AHD2R", "B-10PH-1681-1080-R", "B 10PH 1681 1080 R", "B10PH16811080R", "B-10PH-1682-PIR", "B 10PH 1682 PIR", "B10PH1682PIR", "B-10PH-841-2DMA", "B 10PH 841 2DMA", "B10PH8412DMA", "B-10PH-841-PIR", "B 10PH 841 PIR", "B10PH841PIR", "B-1OPH-881-PIR", "B 10PH 881 PIR", "B10PH881PIR", "B-10PH-881-PIR-R", "B10PH881PIRR", "B 10PH 881 PIR R", "C-881-PIR1080", "C 881 PIR1080", "C881PIR1080", "CAN-HD201-86P", "CAN HD201 86P", "CANHD20186P", "CL-HA10-881P", "CL HA10 881P", "CLHA10881P", "CL-HA10-881P-R", "CL HA10 881P R", "CLHA10881PR", "DVR-HDA10LB-161-RS", "DVR HDA10LB 161 RS", "DVRHDA10LB161RS", "DVR-HDA10LB-162-RS", "DVR HDA10LB 162 RS", "DVRHDA10LB162RS", "DVR-HDA10PB-81-RS", "DVR HDA10PB 81 RS", "DVRHDA10PB81RS", "HD201-86P-B", "HD201 86P B", "HD20186PB", "HDA10L-7BU-841-R-PF", "HDA10L 7BU 841 R PF", "HDA10L7BU841RPF", "HDA10P-10BU-16122", "HDA10P 10BU 16122", "HDA10P10BU16122", "HDA10P-10BU-841-PIR", "HDA10P 10BU 841 PIR", "HDA10P10BU841PIR", "HDA10P-10BU-1682", "HDA10P 10BU 1682", "HDA10P10BU1682", "HDA10P-10BU-842", "HDA1OP 10BU 842", "HDA10P10BU842", "HDA10P-10BU-882", "HDA10P 10BU 882", "HDA10P10BU882", "HDA10P-882-PIR", "HDA10P 882 PIR", "HDA10P882PIR", "M-HA10-881", "M HA10 881", "MHA10881", "M-HDA10L-10BU-841", "M HDA10L 10BU 841", "MHDA10L10BU841", "M-HDA10L-7BU-881", "M HDA10L 7BU 881", "MHDA10L7BU881", "WM-8HD10L-4720-1", "WM 8HD10L 4720 1", "WM8HD10L47201", "WM-HD2-861P", "WM HD2 861P", "WMHD2861P", "B-10LHDA-881-720-R", "B 1OLHDA 881 720 R", "B10LHDA881720R", "B-10PH-16122-PIR-R", "B 10PH 16122 PIR R", "B10PH16122PIRR", "B-1OPH-882BB-PIR-R", "B 10PH 882BB PIR R", "B10PH882BBPIRR", "B-10LHDA-1681-720-R", "B 10LHDA 1681 720 R", "B10LHDA1681720R", "HDA10L-10BU-841", "HDA10L 10BU 841", "HDA10L10BU841", "CL-HDA882-1080", "CL HDA882 1080", "CLHDA8821080", "HD202-1616-B", "HD202 1616 B", "HD2021616B", "HD201-88P", "HD201 88P", "HD20188P", "WM-16HD10L-8720-1", "WM 16HDL10 8720 1", "WM16H10L87201", "HDA10P-841-BBPIR-R", "HDA10P 841 BBPIR R", "HDA10P841BBPIRR", "DVR-HDA10PB-162-R", "DVR HDA10PB 162 R", "DVRHDA10PB162R", "B-10PH-882BB-PIR-R", "B 10PH 882BB PIR R", "B10PH882BBPIRR", "B-10PH-16101-2DMA", "B 10PH 16101 2DMA", "B10PH161012DMA", "B-10PH16161-PIR", "B 10PH 16161 PIR", "B10PH16161PIR", "B-10PH-861-2DMA", "B 10PH 861 2DMA", "B10PH8612DMA", "HDL20-86-B", "HDL20 86 B", "HDL2086B", "HDA10P-881-BB-R", "HDA10P 881 BB R", "HDA10P881BBR", "B-10PH-16161-PIR", "B 10PH 16161 PIR", "B10PH16161PIR", "B-10LHDA-1681-720", "B 10LHDA 1681 720", "B10LHDA1681720", "B-10LHDA-841-1080", "B 10LHDA 841 1080", "B10LHDA8411080", "HDA10P-10BU-882-BB", "HDA10P 10BU 882 BB", "HDA10P10BU882BB", "CL-HDA841-720", "CL HDA841 720", "CLHDA841720", "B-10PH-881-PIR", "B 10PH 881 PIR", "B10PH881PIR", "DVR-HDA10LB-8-R", "DVR HDA10LB 8 R", "DVRHDA10LB8R", "CAM-2PK-HDA10W-BU", "CAM 2PK HDA10W BU", "CAM2PKHDA10WBU", "CAM-2PK-PIRHDA10W-BU", "CAM 2PK PIRHDA10W BU", "CAM2PKPIRHDA10WBU", "CAM-4PK-HDA10W-BU", "CAM 4PK HDA10W BU", "CAM4PKHDA10WBU", "CAM-HDA10W-BU", "CAM HDA10W BU", "CAMHDA10WBU", "CAM-HDA10W-DMA", "CAM HDA10W DMA", "CAMHDA10WDMA", "CAM-PIRHDA10W-BU", "CAM PIRHDA10W BU", "CAMPIRHDA10WBU", "CAN-CAM-HDA10W-BU", "CAN CAM HDA10W BU", "CANCAMHDA10WBU", "CAN-CAM-HDA10W-DMA", "CAN CAM HDA10W DMA", "CANCAMHDA10WDMA", "WM-CAM-HDA10W-DMA", "WM CAM HDA10W DMA", "WMCAMHDA10WDMA", "CAM-2PK-HDA10B-BU", "CAM 2PK HDA10B BU", "CAM2PKHDA10BBU", "CAM-2PK-PIRHDA10W-BU-R", "CAM 2PK PIRHDA10W BU R", "CAM2PKPIRHDA10WBUR", "CAM-2PK-PIRHDA10W-BU-R-PF", "CAM 2PK PIRHDA10W BU R PF", "CAM2PKPIRHDA10WBURPF", "CAM-HDA10W-DMA-R-PF", "CAM HDA10W DMA R PF", "CAMHDA10WDMARPF"
                    ]
                ],
                [
                    ['https://nightowlsp.zendesk.com/hc/en-us/articles/214204357'],
                    [
                        "CAM-IPPT-HDW"
                    ]
                ],
                [
                    ['https://nightowlsp.zendesk.com/hc/en-us/articles/214207197'],
                    [
                        "CAM-IPPTV2"
                    ]
                ]
            ]);

        $('.search').removeAttr('action');
        $('.search').submit(function(event) {
            event.preventDefault();
            var searchClass = $('.search').attr('class');
                    var skuArray = [];
            var checkCase = '';
            var falseLocation = '';
            switch (searchClass) {
                case 'search remote_viewing':
                    skuArray.push(productLocatorArray[1]);
                    checkCase = 'rv';
                    falseLocation = 'https://support.nightowlsp.com/hc/en-us/articles/360022759554?found=no';
                    break;
                case 'search wireless_guide':
                    skuArray.push(productLocatorArray[2]);
                    checkCase = 'wg';
                    falseLocation = 'https://support.nightowlsp.com/hc/en-us/articles/360022759554?found=no';
                    break;
                case 'search wireless_remote':
                    skuArray.push(productLocatorArray[3]);
                    checkCase = 'wr';
                    falseLocation = 'https://support.nightowlsp.com/hc/en-us/articles/360022759554?found=no';
                    break;
                default:
                    skuArray.push(productLocatorArray[0]);
                    checkCase = 'qg';
                    falseLocation = 'https://support.nightowlsp.com/hc/en-us/search?utf8=✓&query=Search';
            }
            var found = false;
            var howMany = skuArray[0].length;
            var queryVal = $(this).find('#query').val().toUpperCase();
            for (i = 0; i < howMany; i++) {
                if ($.inArray(queryVal, skuArray[0][i][1]) != -1) {
                    location.href = skuArray[0][i][0];
                    found = true;
                    break;
                }
            }
            if (found == false) {
                location.href = falseLocation};
            }
        });
    });

  </script>

...


text:
Q: Sorting data that contains text and numbers in varchar columns I have a varchar column in a MySQL database that stores some text which can contain any character and number.
The schema uses utf8 as the character set and utf8_unicode_ci as the collation. InnoDB is used as the database engine as I need to use transactions.
What I would like to do is to be able to ORDER BY that column in a natural way. For example, here's some sample data:
12234 some random text
my text 23
mytext3
123456abcd
text23
text1
text111
text33

After inserting the test data into a test table, I run a query and ORDER BY the varchar column ASC:
SELECT * FROM `test` WHERE 1 ORDER BY data ASC;

The problem is that the "size" of the numbers aren't taken into account:
12234 some random text
123456abcd
my text 23
mytext3
text1
text111 <-------
text23
text33

I then found this question here which provided an (almost) solution:
SELECT * FROM `test` WHERE 1 ORDER BY data * 1 DESC;

123456abcd             <------ These 2 should
12234 some random text <------ be swapped
my text 23
mytext3
text23
text1
text33
text111

Another downside of the above is that the above could not use any indexes because there is an opreation on each row.
I am also not sure what the effects would be like once we introduce non-latin characters.
Is there a performant way to get MySQL to perform natural language sorting?

A: You asked:
   Is there a performant way to get MySQL to perform natural language sorting?

Short answer: no.
Longer answer:
Presumably you want MySQL to collate your date in a way that handles non-numeric text using the chosen collation and numeric text as if it were binary numbers.
You're going to need to create a surrogate key of some kind for collating, and store it in its own column.  You could do this by transforming each text string like this, and load both the original string and the surrogate key string into the dbms.
Original Text                   Surrogate Key Text
12234 some random text          0000012234 some random text
my text 23                      my text 0000000023
mytext3                         mytext0000000003
123456abcd                      0000123456abcd
text23                          text0000000023
text1                           text0000000001
text111                         text0000000111
text33                          text0000000033
1text123                        0000000001text0000000123
2text124                        0000000002text0000000124

Notice that each chunk of numeric data in your samples is, in this example, stuffed into a ten-digit decimal number.
This is easiest to do in your application when you load the DBMS. You can write a simple string-parsing routine that will do it.  You didn't tell us what application language you're using.
If you're only collating a limited number of records in each query you make, it may also be possible to do it in your application after you retrieve the records.


text:
Q: How to find the Tensorflow node with a given index? I'm trying to convert a TF model created with TF version 1 into TFLite.
The model is given and I have no control over it. It is saved as a saved_model (.pb).
I tried many ways to convert it to TFLite, using almost all the TFLiteConverter.from_xxx functions. All of them give me the same error, so I copy here the simplest code, which uses concrete_functions.
Although the model was built and saved with TF1, I must use TF2 for conversion because the model uses operations of control flow v1, which are not supported in TFLite. The only way out that I found is the conversion to control flow v2.
It is an NMT model, thus it is sequence-to-sequence: variable-length input and output, which makes things more difficult with TFLite.
This is the full code I used for conversion:
import os
import tensorflow as tf
from tensorflow.core.protobuf import meta_graph_pb2

export_dir = os.path.join('export_dir', '0')

if not os.path.exists('export_dir'):
    os.mkdir('export_dir')

tf.compat.v1.enable_control_flow_v2()

def wrap_frozen_graph(graph_def, inputs, outputs):
    def _imports_graph_def():
        tf.compat.v1.import_graph_def(graph_def, name="")
    wrapped_import = tf.compat.v1.wrap_function(_imports_graph_def, [])
    import_graph = wrapped_import.graph
    return wrapped_import.prune(
            inputs, outputs)

graph_def = tf.compat.v1.GraphDef()
loaded = graph_def.ParseFromString(open(os.path.join(export_dir, 'saved_model.pb'),'rb').read())

concrete_func = wrap_frozen_graph(
    graph_def, inputs=['extern_data/placeholders/data/data:0', 'extern_data/placeholders/data/data_dim0_size:0'],
    outputs='output/output_batch_major:0')

converter = tf.lite.TFLiteConverter.from_concrete_functions([concrete_func])
converter.experimental_new_converter = True
converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS,
                                               tf.lite.OpsSet.SELECT_TF_OPS]
converter.allow_custom_ops=True

tflite_model = converter.convert()

And it generates the following error:
2020-10-05 11:53:27.853181: I tensorflow/core/grappler/clusters/single_machine.cc:356] Starting new session
2020-10-05 11:53:27.943922: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:816] Optimization results for grappler item: graph_to_optimize
2020-10-05 11:53:27.943969: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818]   function_optimizer: function_optimizer did nothing. time = 0.007ms.
2020-10-05 11:53:27.943978: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818]   function_optimizer: function_optimizer did nothing. time = 0.001ms.
2020-10-05 11:53:31.350451: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:313] Ignored output_format.
2020-10-05 11:53:31.350505: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:316] Ignored drop_control_dependency.
loc(callsite("output/rec/while/LoopCond"("/my/path/environments/venv-tflite2/lib/python3.6/site-packages/tensorflow/python/eager/lift_to_graph.py":339:0) at callsite("/my/path/environments/venv-tflite2/lib/python3.6/site-packages/tensorflow/python/eager/wrap_function.py":338:0 at callsite("/path/to/tools/ckpt2pb.py":30:0 at
 "/path/to/tools/ckpt2pb.py":40:0)))): error: body function result type tensor<?x4xf32> is incompatible with result type tensor<?x1xf32> at index 21
Traceback (most recent call last):
  File "/my/path/environments/venv-tflite2/lib/python3.6/site-packages/tensorflow/lite/python/convert.py", line 199, in toco_convert_protos
    enable_mlir_converter)
  File "/my/path/environments/venv-tflite2/lib/python3.6/site-packages/tensorflow/lite/python/wrap_toco.py", line 38, in wrapped_toco_convert
    enable_mlir_converter)
Exception: /my/path/environments/venv-tflite2/lib/python3.6/site-packages/tensorflow/python/eager/lift_to_graph.py:339:0: error: body function result type tensor<?x4xf32> is incompatible with result type tensor<?x1xf32> at index 21
/my/path/environments/venv-tflite2/lib/python3.6/site-packages/tensorflow/python/eager/wrap_function.py:338:0: note: called from
/my/path/bin//tflite-toolkit/tools/ckpt2pb.py:30:0: note: called from
/my/path/bin//tflite-toolkit/tools/ckpt2pb.py:40:0: note: called from
/my/path/environments/venv-tflite2/lib/python3.6/site-packages/tensorflow/python/eager/lift_to_graph.py:339:0: note: see current operation: %1:125 = "tf.While"(%outputs_3626, %outputs_3584, %outputs_1688, %outputs_3710, %outputs_3668, %outputs_3794, %outputs_3752, %outputs_3878, %outputs_3836, %outputs_3962, %outputs_3920, %outputs_4046, %outputs_4004, %o
utputs_2310, %outputs_1572, %outputs_2280, %outputs_2362, %outputs_2148, %outputs_2160, %outputs_2248, %outputs_2260, %outputs_2332, %outputs_2338#1, %outputs_2342#1, %outputs_2278, %outputs_2288, %outputs_1748, %outputs_1760, %outputs_1848, %outputs_1860, %outputs_1948, %outputs_1960, %outputs_2048, %outputs_2060, %outputs_1610, %outputs_1690, %outputs_1692, %
outputs_1694, %outputs_1696, %outputs_1722, %outputs_1720, %outputs_1726, %outputs_1724, %outputs_1728, %outputs_1730, %outputs_1732, %outputs_1762, %outputs_1764, %outputs_1766, %outputs_1790, %outputs_1792, %outputs_1794, %outputs_1796, %outputs_1822, %outputs_1820, %outputs_1826, %outputs_1824, %outputs_1828, %outputs_1830, %outputs_1832, %outputs_1862, %out
puts_1864, %outputs_1866, %outputs_1890, %outputs_1892, %outputs_1894, %outputs_1896, %outputs_1922, %outputs_1920, %outputs_1926, %outputs_1924, %outputs_1928, %outputs_1930, %outputs_1932, %outputs_1962, %outputs_1964, %outputs_1966, %outputs_1990, %outputs_1992, %outputs_1994, %outputs_1996, %outputs_2022, %outputs_2020, %outputs_2026, %outputs_2024, %outputs_2028, %outputs_2030, %outputs_2032, %outputs_2062, %outputs_2064, %outputs_2066, %outputs_2090, %outputs_2092, %outputs_2094, %outputs_2096, %outputs_2122, %outputs_2120, %outputs_2126, %outputs_2124, %outputs_2128, %outputs_2130, %outputs_2132, %outputs_2162, %outputs_2164, %outputs_2166, %outputs_2190, %outputs_2192, %outputs_2194, %outputs_2196, %outputs_2222, %outputs_2220, %outputs_2226, %outputs_2224, %outputs_2228, %outputs_2230, %outputs_2232, %outputs_2262, %outputs_2264, %outputs_2266, %outputs_2268, %outputs_2270, %outputs_2334, %outputs_2344, %outputs_2338#0, %outputs_2342#0) {body = @_functionalize_body_10, cond = @_functionalize_cond_10, device = "", is_stateless = false, output_shapes = [], parallel_iterations = 10 : i64} : (tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?xi1>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<22526xf32>, tensor<i32>, tensor<i32>, tensor<?x512xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x1xf32>, tensor<f32>, tensor<f32>, tensor<?xi1>, tensor<?xi32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<i32>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<2048xf32>>>, tensor<!tf.resource<tensor<512x2048xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<2048x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x1536xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<2048xf32>>>, tensor<!tf.resource<tensor<512x2048xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<2048x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x1536xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<2048xf32>>>, tensor<!tf.resource<tensor<512x2048xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<2048x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x1536xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<2048xf32>>>, tensor<!tf.resource<tensor<512x2048xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<2048x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x1536xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<2048xf32>>>, tensor<!tf.resource<tensor<512x2048xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<2048x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x1536xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<2048xf32>>>, tensor<!tf.resource<tensor<512x2048xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<2048x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x1536xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x22526xf32>>>, tensor<!tf.resource<tensor<22526x512xf32>>>, tensor<2x!tf.resource<tensor<?x4xi32>>>, tensor<2x!tf.resource<tensor<?xi32>>>) -> (tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?xi1>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<22526xf32>, tensor<i32>, tensor<i32>, tensor<?x512xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x1xf32>, tensor<f32>, tensor<f32>, tensor<?xi1>, tensor<?xi32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<i32>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<2x!tf.resource>, tensor<2x!tf.resource>)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/path/to/tools/ckpt2pb.py", line 51, in <module>
    tflite_model = converter.convert()
  File "/home/mdigangi/environments/venv-tflite2/lib/python3.6/site-packages/tensorflow/lite/python/lite.py", line 1076, in convert
    return super(TFLiteConverterV2, self).convert()
  File "/my/path/environments/venv-tflite2/lib/python3.6/site-packages/tensorflow/lite/python/lite.py", line 900, in convert
    self).convert(graph_def, input_tensors, output_tensors)
  File "/my/path/environments/venv-tflite2/lib/python3.6/site-packages/tensorflow/lite/python/lite.py", line 633, in convert
    **converter_kwargs)
  File "/my/path/environments/venv-tflite2/lib/python3.6/site-packages/tensorflow/lite/python/convert.py", line 574, in toco_convert_impl
    enable_mlir_converter=enable_mlir_converter)
  File "/my/path/environments/venv-tflite2/lib/python3.6/site-packages/tensorflow/lite/python/convert.py", line 202, in toco_convert_protos
    raise ConverterError(str(e))
tensorflow.lite.python.convert.ConverterError: /my/path/environments/venv-tflite2/lib/python3.6/site-packages/tensorflow/python/eager/lift_to_graph.py:339:0: error: body function result type tensor<?x4xf32> is incompatible with result type tensor<?x1xf32> at index 21
/my/path/environments/venv-tflite2/lib/python3.6/site-packages/tensorflow/python/eager/wrap_function.py:338:0: note: called from
/path/to/tools/ckpt2pb.py:30:0: note: called from
/path/to/tools/ckpt2pb.py:40:0: note: called from
/my/path/environments/venv-tflite2/lib/python3.6/site-packages/tensorflow/python/eager/lift_to_graph.py:339:0: note: see current operation: %1:125 = "tf.While"(%outputs_3626, %outputs_3584, %outputs_1688, %outputs_3710, %outputs_3668, %outputs_3794, %outputs_3752, %outputs_3878, %outputs_3836, %outputs_3962, %outputs_3920, %outputs_4046, %outputs_4004, %outputs_2310, %outputs_1572, %outputs_2280, %outputs_2362, %outputs_2148, %outputs_2160, %outputs_2248, %outputs_2260, %outputs_2332, %outputs_2338#1, %outputs_2342#1, %outputs_2278, %outputs_2288, %outputs_1748, %outputs_1760, %outputs_1848, %outputs_1860, %outputs_1948, %outputs_1960, %outputs_2048, %outputs_2060, %outputs_1610, %outputs_1690, %outputs_1692, %outputs_1694, %outputs_1696, %outputs_1722, %outputs_1720, %outputs_1726, %outputs_1724, %outputs_1728, %outputs_1730, %outputs_1732, %outputs_1762, %outputs_1764, %outputs_1766, %outputs_1790, %outputs_1792, %outputs_1794, %outputs_1796, %outputs_1822, %outputs_1820, %outputs_1826, %outputs_1824, %outputs_1828, %outputs_1830, %outputs_1832, %outputs_1862, %outputs_1864, %outputs_1866, %outputs_1890, %outputs_1892, %outputs_1894, %outputs_1896, %outputs_1922, %outputs_1920, %outputs_1926, %outputs_1924, %outputs_1928, %outputs_1930, %outputs_1932, %outputs_1962, %outputs_1964, %outputs_1966, %outputs_1990, %outputs_1992, %outputs_1994, %outputs_1996, %outputs_2022, %outputs_2020, %outputs_2026, %outputs_2024, %outputs_2028, %outputs_2030, %outputs_2032, %outputs_2062, %outputs_2064, %outputs_2066, %outputs_2090, %outputs_2092, %outputs_2094, %outputs_2096, %outputs_2122, %outputs_2120, %outputs_2126, %outputs_2124, %outputs_2128, %outputs_2130, %outputs_2132, %outputs_2162, %outputs_2164, %outputs_2166, %outputs_2190, %outputs_2192, %outputs_2194, %outputs_2196, %outputs_2222, %outputs_2220, %outputs_2226, %outputs_2224, %outputs_2228, %outputs_2230, %outputs_2232, %outputs_2262, %outputs_2264, %outputs_2266, %outputs_2268, %outputs_2270, %outputs_2334, %outputs_2344, %outputs_2338#0, %outputs_2342#0) {body = @_functionalize_body_10, cond = @_functionalize_cond_10, device = "", is_stateless = false, output_shapes = [], parallel_iterations = 10 : i64} : (tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?xi1>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<22526xf32>, tensor<i32>, tensor<i32>, tensor<?x512xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x1xf32>, tensor<f32>, tensor<f32>, tensor<?xi1>, tensor<?xi32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<i32>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<2048xf32>>>, tensor<!tf.resource<tensor<512x2048xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<2048x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x1536xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<2048xf32>>>, tensor<!tf.resource<tensor<512x2048xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<2048x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x1536xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<2048xf32>>>, tensor<!tf.resource<tensor<512x2048xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<2048x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x1536xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<2048xf32>>>, tensor<!tf.resource<tensor<512x2048xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<2048x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x1536xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<2048xf32>>>, tensor<!tf.resource<tensor<512x2048xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<2048x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x1536xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<2048xf32>>>, tensor<!tf.resource<tensor<512x2048xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<2048x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x1536xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512xf32>>>, tensor<!tf.resource<tensor<512x22526xf32>>>, tensor<!tf.resource<tensor<22526x512xf32>>>, tensor<2x!tf.resource<tensor<?x4xi32>>>, tensor<2x!tf.resource<tensor<?xi32>>>) -> (tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?xi1>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<?x?x8x64xf32>, tensor<22526xf32>, tensor<i32>, tensor<i32>, tensor<?x512xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x1xf32>, tensor<f32>, tensor<f32>, tensor<?xi1>, tensor<?xi32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<?x8x0x64xf32>, tensor<i32>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<!tf.resource>, tensor<2x!tf.resource>, tensor<2x!tf.resource>)

I'm now trying to debug this. As the first error is:
/lift_to_graph.py:339:0: error: body function result type tensor<?x4xf32> is incompatible with result type tensor<?x1xf32> at index 21

my question is: how can I find which node is represented by index 21?
But also, if you have suggestions about what I can do to figure the problem out, they are very welcome.
Final note: It is strange that I get a dimensionality error during conversion, because I can use the same model for translating.


text:
Q: How can I avoid the random restart of the xserver? I'm using a desktop pc with 64bit Ubuntu 12.04 (Kernel 3.2.0-24-generic). Hardware specs are
- Intel Core i7 CPU 860 @ 2,80GHz x 8
- Nvidia GeForce GTS 250
- 750 GB Hard Disk ATA WDC WD7501AALS-00E3A0 (for my /home partition)
- 128 GB Solid-State Disk ATA PLEXTOR PX-128M2S (for all other partitions)
Since I reinstalled the PC with Ubuntu 12.04 the xserver restarts randomly. Most times when I watch a video in the browser (maybe a flash issue?) but sometimes the restart/crash appears when I'm working in an text-editor.
How can I locate the problem? Which information is needed for a useful answer?


text:
Q: How to create a rectangular framework? I want to write down the steps of an Algorithm inside of a rectangular box similar to the one in the attached picture?
Moreover, I wanna put its title the "Algorithm ..." on the top left corner just like the "Gradient method" in the picture.
Thank you in advance for your kind helps!

A: Here a tcolorbox solution :
% https://tex.stackexchange.com/questions/581381/how-to-create-a-rectangular-framework
\documentclass{article}
\usepackage[table,xcdraw]{xcolor}
\usepackage{lipsum}
\usepackage{amssymb}
\usepackage{enumitem}

\usepackage{tcolorbox}
\tcbuselibrary{skins}

\begin{document}
\begin{table}[]
  \renewcommand{\arraystretch}{1.25}
  \centering
  % \caption{}
  \label{tab:my-table}
  \begin{tabular}{|
    >{\columncolor[HTML]{EFEFEF}}p{0.9\textwidth} |}
    \hline
    \textbf{The Gradient Method}\\
    \\
    \textbf{Input:} $\epsilon>0$\\
    \textbf{Initialization:} Pick $x_0 \in \mathbb{R}^{n}$ arbitrarily.\\
    \textbf{General step:} For any $k=0,1,2...$ execute the following steps:
    \begin{enumerate}[label=(\alph*)]
    \item Pick a stepsize $t_k$ by a line search procedure on the function.
      \begin{center}$g(t)=f(x_k-t\triangledown f(x_k))$\end{center}
    \item Set $x_{k+1}=x_k+t_k\triangledown f(x_k)$
    \item If $\parallel \triangledown f(x_{k+1}) \parallel \leq \epsilon$, then STOP and $x_{k+1}$ is the output.
    \end{enumerate}
    \\ \hline
  \end{tabular}
\end{table}

\begin{tcolorbox}[enhanced, title=The Gradient Method,%
  colbacktitle=black!20, coltitle=black, colframe=black, sharp corners,%
  colback=black!10, boxrule=.5pt, titlerule=0pt,%
  ]
  \textbf{Input:} $\epsilon>0$\\
  \textbf{Initialization:} Pick $x_0 \in \mathbb{R}^{n}$ arbitrarily.\\
  \textbf{General step:} For any $k=0,1,2\ldots$ execute the following steps:
  \begin{enumerate}[label= (\alph*)]
  \item Pick a stepsize $t_k$ by a line search procedure on the function.
    \begin{center}$g(t)=f(x_k-t\triangledown f(x_k))$\end{center}
  \item Set $x_{k+1}=x_k+t_k\triangledown f(x_k)$
  \item If $\parallel \triangledown f(x_{k+1}) \parallel \leq \epsilon$, then STOP and $x_{k+1}$ is the output.
  \end{enumerate}
\end{tcolorbox}
\end{document}

A: One possible solution:Just make one table cell:
\documentclass{article}
\usepackage[table,xcdraw]{xcolor}
\usepackage{lipsum}
\usepackage{amssymb}
\usepackage{enumitem}

\begin{document}

    \begin{table}[]
        \renewcommand{\arraystretch}{1.25}
        \centering
        %\caption{}
        \label{tab:my-table}
        \begin{tabular}{|
                >{\columncolor[HTML]{EFEFEF}}p{0.9\textwidth} |}
            \hline
            \textbf{The Gradient Method}\\
            \\
            \textbf{Input:} $\epsilon>0$\\
            \textbf{Initialization:} Pick $x_0 \in \mathbb{R}^{n}$ arbitrarily.\\
            \textbf{General step:} For any $k=0,1,2...$ execute the following steps:
            \begin{enumerate}[label=(\alph*)]
                \item Pick a stepsize $t_k$ by a line search procedure on the function.
                \begin{center}$g(t)=f(x_k-t\triangledown f(x_k))$\end{center}
                \item Set $x_{k+1}=x_k+t_k\triangledown f(x_k)$
                \item If $\parallel \triangledown f(x_{k+1}) \parallel \leq \epsilon$, then STOP and $x_{k+1}$ is the output.
            \end{enumerate}
            \\ \hline
        \end{tabular}
    \end{table}

\end{document}


text:
Q: Не правильно обновляется подписка У меня в приложении две подписки, каждая из них по отдельности работает правильно. Но когда пытаюсь сделать Update/Downgrade, возникают проблемы:

*

*При попытке сменить одну подписку на другую, у меня высвечивается правильное окошко с изменением подписки и показывает что новая подписка куплена успешно, но когда проверяю в Google Play, показывает только ту что я купил первой, спустя время пробую ещё раз, в этот раз не появляется окошко замены, только стандартное окно покупки, без проблем покупается вторая и в Store видно обе.
Может у меня какой-то не правильный подход к обновлению, вроде всё на своих местах иначе, не высвечивалось бы правильно окно с заменой.

*Мой метод setSuccessfulScreen(), в onPurchasesUpdated(), отрабатывает правильно при первой покупке, но при попытке обновить подписку крашится с ошибкой:

Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=com.android.vending.billing.PURCHASES_UPDATED

Думал может дело в Binding заменил на findViewById(), не помогает, без этого метода краша нету.
Мой код с подпиской:
    private fun buySubscription() {
        val skuList = ArrayList<String>()
        skuList.add("")
        skuList.add("")
        val params = SkuDetailsParams.newBuilder()
        params.setSkusList(skuList).setType(BillingClient.SkuType.SUBS)
        billingClient!!.querySkuDetailsAsync(params.build()) { billingResult, skuDetailsList ->
            if (billingResult.responseCode == BillingClient.BillingResponseCode.OK && skuDetailsList != null) {
                when (subsFlag) {
                    MONTH -> {
                        if (!ProviderPreferences.isSubscribed()) {
                            billingClient!!.launchBillingFlow(requireActivity(), BillingFlowParams.newBuilder().setSkuDetails(skuDetailsList[1]!!).build())
                        } else {
                            if (ProviderPreferences.getSubscribedType() == MONTH) {
                                billingClient!!.launchBillingFlow(requireActivity(), BillingFlowParams.newBuilder().setSkuDetails(skuDetailsList[1]!!).build())
                            } else {
                                val updateParams = BillingFlowParams.SubscriptionUpdateParams.newBuilder().setOldSkuPurchaseToken(ProviderPreferences.getPurchaseToken()!!).setReplaceSkusProrationMode(BillingFlowParams.ProrationMode.DEFERRED).build()

                                billingClient!!.launchBillingFlow(requireActivity(), BillingFlowParams.newBuilder().setSkuDetails(skuDetailsList[1]!!).setSubscriptionUpdateParams(updateParams).build())
                            }
                        }
                    }
                    YEAR -> {
                        if (!ProviderPreferences.isSubscribed()) {
                            billingClient!!.launchBillingFlow(requireActivity(), BillingFlowParams.newBuilder().setSkuDetails(skuDetailsList[0]!!).build())
                        } else {
                            if (ProviderPreferences.getSubscribedType() == YEAR) {
                                billingClient!!.launchBillingFlow(requireActivity(), BillingFlowParams.newBuilder().setSkuDetails(skuDetailsList[0]!!).build())
                            } else {
                                val updateParams = BillingFlowParams.SubscriptionUpdateParams.newBuilder().setOldSkuPurchaseToken(ProviderPreferences.getPurchaseToken()!!).setReplaceSkusProrationMode(BillingFlowParams.ProrationMode.DEFERRED).build()

                                billingClient!!.launchBillingFlow(requireActivity(), BillingFlowParams.newBuilder().setSkuDetails(skuDetailsList[0]!!).setSubscriptionUpdateParams(updateParams).build())
                            }
                        }
                    }
                }
            }
        }
    }

    private fun purchases() {
        val acknowledgePurchaseResponseListener = AcknowledgePurchaseResponseListener { billingResult -> }
        billingClient = BillingClient.newBuilder(App.getInstance()).enablePendingPurchases().setListener { billingResult: BillingResult, list: List<Purchase>? ->
            if (billingResult.responseCode == BillingClient.BillingResponseCode.OK) {
                val purchase = list!![0]
                handlePurchases(acknowledgePurchaseResponseListener, purchase)
                ProviderPreferences.saveSubscriptionType(subsFlag)
                ProviderPreferences.savePurchaseToken(list[0].purchaseToken)
                setSuccessfulScreen()
            }
        }.build()
        connectToGooglePlayBilling()
    }

    private fun handlePurchases(acknowledgePurchaseResponseListener: AcknowledgePurchaseResponseListener?, purchase: Purchase) {
        if (purchase.purchaseState == Purchase.PurchaseState.PURCHASED) {
            ProviderPreferences.saveSubscription(true)
            if (!purchase.isAcknowledged) {
                val acknowledgePurchaseParams = AcknowledgePurchaseParams.newBuilder().setPurchaseToken(purchase.purchaseToken).build()
                billingClient!!.acknowledgePurchase(acknowledgePurchaseParams, acknowledgePurchaseResponseListener!!)
            }
        }
    }

    private fun connectToGooglePlayBilling() {
        billingClient!!.startConnection(object : BillingClientStateListener {
            override fun onBillingSetupFinished(billingResult: BillingResult) {
                billingClient!!.queryPurchasesAsync(BillingClient.SkuType.SUBS) { billingResult, list ->
                    if (billingResult.responseCode == BillingClient.BillingResponseCode.OK && list != null) {

                    }
                }
            }

            override fun onBillingServiceDisconnected() {
                connectToGooglePlayBilling()
            }
        })
    }

    private fun setSuccessfulScreen() {
        group!!.visibility = View.GONE
        group2!!.visibility = View.VISIBLE
        subscribeBtn!!.visibility = View.GONE
        lottieAnimation!!.playAnimation()
    }

Использую библиотеку billing v4.
Подскажите пожалуйста в чём может быть причина, может что-то не так с кодом смены подписки, раньше обновление подписки не делал. И в чём может быть причина краша.
Заранее благодарю.


text:
Q: Pageant: Couldn't load this key (unable to open file) After installing:
putty-0.64-installer.exe
every time windows 8.1 is rebooted, this error dialog window pops up:
Couldn't load this key (unable to open file)
How can I prevent Pageant from loading a key on startup?

A: Make sure that your GIT_SSH environment variable is set to plink.exe and not pegeant.exe.

A: I had similar problem with Windows 7. The solution was to rename my id_rsa.ppk to [computer_name].ppk. It seems, that for me at least, Pageant was looking for a file that didn't exist.
If renaming doesn't help, you can use Process Monitor to check what file exactly is Pageant looking for.
With Process Monitor, use filters:

*

*"Process Name - is - pageant.exe"

*"Path - contains - .ppk"

A: I've been getting this error on every startup of Windows 7. I found that it was trying to open an incorrectly named .ppk file which had been hardcoded into the launch shortcut of Pageant in the Startup folder.
To check if this is the problem, go to Start > All Programs > Startup > right-click on Pageant > Properties.
The "Target" field includes the path to the pageant.exe executable, potentially followed by the path to a .ppk. Verify that this .ppk actually exists.


text:
Q: csv file generate and save it in specific folder using php any one can help me enter code here

Here generate CSV file and its download directly when submit form but i want save it in specific folder plz any one can help me ...

 <?php if(isset($_POST['submit']))
{
//collect form data
$name = $_POST['name'];
$address = $_POST['address'];
$mobileno = $_POST['mobileno'];
$email = $_POST['email'];

if(!isset($error)){

  $Content = "Name,Address,Mobile,Email \n";

    //set the data of the CSV
    $Content .= "$name,$address,$mobileno,$email\n";

    //set the file name and create CSV file
    $FileName = $name."-".date("d-m-y-h:i:s").".csv";
    header('Content-Type: application/csv');
    header('Content-Disposition: attachment; filename="' . $FileName . '"');
    echo $Content;
    exit();
  }
 }

 //if their are errors display them
if(isset($error)){
foreach($error as $error){
    echo '
$error
';
   }
 }
?>


text:
Q: Can't find file templates for Source Signing in Xcode 4.2 In my Xcode 4.2 project, I've created an Ad Hoc configuration and want to add the code signing entitlements file to the project, which is usually named Entitlements.plist.
In the past, I create this by selecting a folder in the project tree on the left, then context clicking, selecting "New File...". In the dialog that comes up there's usually a "Code Signing" entry in the iOS tree of the left -- but it's missing now.
The items that are there are as follows:

Cocoa Touch
C and C++
User Interface
Core Data
Resource
Other

I've googled for a solution, and searched on Stackoverflow, but not turned up an answer.
I know that I could create an empty plist manually, and just put in the usual default data which is findable on the web somewhere, but it's bothering me that I can't find the usual thing.

A: Although I can't find out an actual reference saying that the code signing entitlements template isn't there any more by design, I have found a reference stating entitlements are not needed: https://developer.apple.com/legacy/library/technotes/tn2250/_index.html#//apple_ref/doc/uid/DTS40009933-CH1-TROUBLESHOOTING_GUIDE-CODE_SIGNING_ENTITLEMENTS.
So I'm assuming it's by design in newer versions of XCode.

A: Try removing the Code Signing Entitlements configuration from the project and target build settings and try your build again.
For more details refer https://developer.apple.com/legacy/library/technotes/tn2250/_index.html#//apple_ref/doc/uid/DTS40009933-CH1-TROUBLESHOOTING_GUIDE-CODE_SIGNING_ENTITLEMENTS