Magento 1 on Percona DB produces errors

We are trying to migrate our DB to MySQL 5.7 on Percona XtraDB cluster.

In the MySQL log file there are errors preventing some operations to be performed.

The errors visible with the current setting are of 2 types:

2019-06-24T08:00:03.187120Z 99531 [ERROR] WSREP: Percona-XtraDB-Cluster prohibits use of GET_LOCK with pxc_strict_mode = ENFORCING

or

2019-06-24T08:39:21.115870Z 100000 [ERROR] WSREP: Percona-XtraDB-Cluster prohibits use of DML command on a table (log_url) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER

Currently the DB cluster is set with

pxc_strict_mode=ENFORCING

Note, we have tried to set up a different mode and locked for stabilizing the BD using the following mode without success

pxc_strict_mode=PERMISSIVE

But the result is instability at the engine level ending in the whole database being unresponsive and requiring a reboot.

However when setting the mode to PERMISSIVE we have the following errors matching the one above:

2019-06-18T09:30:55.552852Z 753 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of GET_LOCK with pxc_strict_mode = PERMISSIVE

2019-06-18T09:30:55.570212Z 753 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of RELEASE_LOCK with pxc_strict_mode = PERMISSIVE

Or

2019-06-17T15:30:18.766308Z 764 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of DML command on a table (catalog_category_product_index_idx) without an explicit primary key with pxc_strict_mode = PERMISSIVE

2019-06-17T15:30:18.770449Z 764 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of DML command on a table (catalog_category_product_index_enbl_idx) without an explicit primary key with pxc_strict_mode = PERMISSIVE

2019-06-17T15:30:18.795257Z 764 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of DML command on a table (catalog_category_anc_categs_index_idx) without an explicit primary key with pxc_strict_mode = PERMISSIVE

2019-06-17T15:30:18.797970Z 764 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of DML command on a table (catalog_category_anc_categs_index_idx) without an explicit primary key with pxc_strict_mode = PERMISSIVE

Having this information shows that there are missing primary keys on at least these tables:

  • catalog_category_product_index_idx

  • catalog_category_product_index_enbl_idx

  • catalog_category_anc_categs_index_idx

  • … and possibly others

Can we add a primary key on these tables ? or is there a setting that I missed regarding the following configuration with the following environment ?`

Environment is composed of:

o MySQL 5.7

o Percona XtraDB cluster

o Magento 1.9.4.1

MySQL XOR produces incorrect results

Why does the expression conv('9000084e703720f9', 16, 10) ^ conv('801A93A5A18A773F', 16, 10) produces wrong result?

In a step by step explanation:

SELECT conv('9000084e703720f9', 16, 10); 

Result: 10376302674444755193

SELECT conv('801A93A5A18A773F', 16, 10); 

Result: 9230852725838346047

SELECT 10376302674444755193 ^ 9230852725838346047; 

Result: 1160411291139790790

But by this query:

SELECT conv('9000084e703720f9', 16, 10) ^ conv('801A93A5A18A773F', 16, 10)  

Result: 0

I don’t understand why does this return zero?

Yeoman generator produces an old version of SPFx

I have Yeoman generator (@microsoft/generator-sharepoint) version 1.8.2, I can verify this by running: npm list --depth=0 -g .. When I try to run yo @microsoft/sharepoint , I noticed 2 things:

The wizard doesn’t show support for SharePoint 2019, so it only gives me the choice of SharePoint online only, or SharePoint 2016 onwards. The second thing is that the project scaffolded shows this:

    "@microsoft/sp-core-library": "1.5.1",     "@microsoft/sp-webpart-base": "1.5.1",     "@microsoft/sp-lodash-subset": "1.5.1",     "@microsoft/sp-office-ui-fabric-core": "1.5.1" 

What do I need to do to get the latest version of SPFx? (1.8).

How to make an app that makes the flashlight respond to the music that the phone produces?

I want to create an app for android (Music Strobe type app) that makes the flashlight bounce to the beat of the song. When the beat is strong it will use the flash to the max when the beat slightly weaker it will use a slightly weaker flash. Basically, the flash is supposed to “dance” to the beat of the song. Is there any APIs anyone knows that could be useful?

I have tried to make it work with some classes Ive found online but they didnt work.

Can a function that produces a set of edges with a specific “aggregate graph property” multitask?


Background

Let $ G(V,E)$ be a graph.
Let $ S$ be the set of all combinations of $ |V|$ edges.
Let $ A$ & $ B$ be two subsets of $ S$ , where:

  • each subset is a collection of all elements of $ S$ that share a common “aggregate property”
  • the aggregate properties of $ A$ & $ B$ are different
  • $ |A| \gt 0$
  • $ |B| \gt 0$
  • $ |A \cap B| \geq 0$
  • $ A \not\subseteq B$
  • $ B \not\subseteq A$

DEFINITION: Aggregate Property, $ P$ , of $ Q \in S$
Given some $ Q \in S$ , one must examine every element in $ Q$ in order to verify property $ P$ .

  • Example for $ Q \in A$ : [sum of edges in $ Q$ ] $ \leq 40$
  • Example for $ Q \in B$ : [edges in $ Q$ form Hamiltonian Cycle in $ G$ ]

Let $ \alpha$ be any algorithm that returns an element in $ A$ , given $ G$ .
Let $ \beta$ be any algorithm that returns an element in $ B$ , given $ G$ .

Each dot represents an edge in the graph $ G$ :

Reminder, the aggregate properties of A and B are not the same, thus:

Key Idea 1: Any algorithm which starts at Level 1 and ends at Level 2 and produces a set of edges with a unique relationship, A, must be an algorithm for α, and NOT β.

Let $ \gamma$ be any algorithm that returns a set of edges with both properties A and B, and which doesn’t ensure one before the other (does not go to Level 3, as described below).
By definition, $ \gamma$ is an algorithm for $ \alpha$ .
By definition, $ \gamma$ is an algorithm for $ \beta$ .
Thus $ \alpha$ and $ \beta$ can be equal.
Since $ \alpha$ and $ \beta$ can be equal, A and B are no longer distinct, for they can be ensured using the same algorithm, $ \gamma$ .
Thus A and B are actually the same property.

Key Idea 2: If an algorithm, γ, which starts at Level 1 and ends at Level 2, produces a set of edges with 2 relationships, M and N, then M and N must be the same relationship.

In order to ensure 2 distinct properties, $ \gamma$ must go to a 3rd Level:

So now, $ \gamma$ has 2 options:

  • Perform $ \alpha$ , then run $ \beta$ (worst-case = $ |A|$ , must search for output of $ \alpha$ that has $ B$ -Property)
  • Perform $ \beta$ , then run $ \alpha$ (worst-case = $ |B|$ , must search for output of $ \beta$ that has $ A$ -Property)

Question

Given the above background, is the time-complexity of any algorithm $ \gamma$ (one that produces a set of edges in the intersection of $ A$ and $ B$ , so that this produced set will have 2 aggregate properties) upper-bounded by $ |A|$ or $ |B|$ ?

If yes, and we demonstrate an $ A$ and $ B$ with exponential sizes in relation to the input graph, could we use this technique to show that $ \gamma$ MUST take exponential time in the worst-case?


Note Regarding k-SAT

This model does not apply to k-SAT because a solution to k-SAT must have only 1 aggregate property:

  • truth values make a proposition True

Whereas a solution for TSP must have 2 aggregate properties:

  • sum of edges $ \leq L$
  • edges form Hamiltonian Cycle in $ G$

Drawing several BeginArea inside a BeginScrollview (GUILayout) produces an unexpected behaviour

Well, I have a question with a GUILayout.BeginArea within a BeginScrollview.

        if (m_searchedItems?.Length > 0)         {             m_scroll = GlobalGUI.BeginScrollView(f_isEditor, m_scroll, viewSize);              for (int y = 0; y < rows; ++y)             {                 GUILayout.BeginHorizontal();                  for (int x = 0; x < columns; ++x)                 {                     // Show items thumbnails...                      var tTexture = GetThumbnail(item);                      Rect? texRect = null;                      if (tTexture != null) // Check if the texture is available or it's being requested                         texRect = GlobalGUILayout.DrawTexture(tWidth, tHeight, tTexture);                      // The method from above returns an Nullable<Rect> of the texture. (https://i.imgur.com/pizrwji.png)                     if (texRect.HasValue)                     {                         // Show title w/ marquee                         // .... Code ....                          var btnsRect = new Rect(texRect.Value.position + Vector2.up * (tHeight - 26), new Vector2(texRect.Value.width, 21));                          // Show buttons                         GUILayout.BeginArea(btnsRect, "aaaaa"); // "aaaaa" string is for a test                         {                             GUILayout.BeginHorizontal();                              if (GUILayout.Button(m_infoTexture, GUILayout.Width(21)))                                 GetInfo(item);                              if (GUILayout.Button("Install"))                                 DoInstall(item);                              GUILayout.EndHorizontal();                         }                         GUILayout.EndArea();                     }                 }                  GUILayout.EndHorizontal();             }              GlobalGUI.EndScrollView(f_isEditor);         } 

As you can see, I am trying to show a list of items within said BeginScrollview:

...

Of course, each must have two buttons to perform actions (line 30 of the code).

But, as you can see, in the image that I have attached, I have blueed the test string “aaaaa” so you can see that it is very highlighted, which gives me to understand that all the BeginArea are being drawn in the same position.

But what worries me most about this is that the buttons aren’t displayed.

However, if all this is implemented with the GUI class, instead of the GUILayout class this does not happen.

Which could be the problem?

Custom JS produces different results based on user’s permission level in SP 2013

HELP! I understand this question is a bit vague, however, that is because I have never run into this issue before and I have no idea where to start.

Anyone who can share a similar experience and what they did to solve the problem is a Godsend

I have custom JS for an uploader that ingests excel files, parses the data and put that data into SharePoint lists. It uses the following libraries: xlsx.core.min.js, xlsx.full.min.js, and jquery.min.js.

This uploader behaves differently depending upon the permission level of the person attempting to do the upload. IE – you must have full control or be an SCA for it to work as intended. None of the scripts make a reference to other subsites, everything is local. I have never heard of this before and am having trouble finding help online for this topic.

Any takers??

Calculus 1 Courses’s Optimization Homework Problem, Produces Strangely Complex Value.

I am a Calculus 1 student and I have an optimization word-problem that is giving me a lot of trouble.

It has two variables. I have found the value for $ y$ , but when I plugged it into the equation and tried to solve for the $ x$ I couldn’t find it’s value. I used Symbolab to solve it, but it came up with a decimal number that’s extremely complicated when written as a fraction. My professor has given us very complicated problems before, but the complexity of this number is such that I feel like it’s very likely I did something wrong.

I have checked other parts of my work with Symbolab and I am still not sure where I went wrong, but I would really appreciate it if you would take a look and determine if there are any parts that don’t look right to you.


An oil refinery is located on the north bank of a straight river which is $ 2$ km wide. A pipeline is to be constructed from the refinery to storage tanks located on the south bank of the river $ 6$ km east of the refinery. The cost of laying pipe is $ $ 400,000$ per km over land to a point $ P$ on the north bank and $ $ 800,000$ per km under the river to the tanks. To minimize the cost of the pipeline, where should $ P$ be located?

$ P=$ The area where the pipeline enters the river.

$ x=$ The horizontal distance between the oil refinery and the storage tanks.

$ y=$ The euclidean distance between $ P$ and the storage tanks.

The Pythagorean theorem states $ 2^2+(6-x)^2=y^2$ .

The cost of the pipeline is $ C = 400,000x+800,000y$ .


finding y:

$ $ 4+(6-x)^2 = y^2 \to y= \pm \sqrt{4+(6-x)^2}$ $

Differentiating $ C = 400,000x+800,000y$ :

$ $ \frac{d}{dx}\sqrt{4+(6-x)^2}=\frac{1}{2\sqrt{4+(6-x)^2}}\cdot-2(6-x)=\frac{-(6-x)}{\sqrt{4+(6-x)^2}}$ $

$ $ \frac{d}{dx}800,000\sqrt{4+(6-x)^2}=[\frac{-(6-x)}{\sqrt{4+(6-x)^2}}\cdot800,000] = \frac{-800,000(6-x)}{\sqrt{4+(6-x)^2}}$ $

$ $ \frac{d}{dx}400,000x+800,000\sqrt{4+(6-x)^2}=400,000-\frac{800,000(6-x)}{\sqrt{4+(6-x)^2}}$ $

Setting $ 400,000-\frac{800,000(6-x)}{\sqrt{4+(6-x)^2}} = 0$ and solving for $ x$ .

$ $ x=4.84530..$ $

I’m not completely sure how to write the fraction out with math notation here because a single square root seems to cover part of the numerator and all of the denominator, but you can see it if you plug $ 400,000-\frac{800,000(6-x)}{\sqrt{4+(6-x)^2}} = 0$ into Symbolab’s “solve for” calculator.

Running yasm with ld on Termux produces relocations error

section .text global _start ;must be declared for linker (ld)

_start: ;tell linker entry point

mov edx,len ;message length mov ecx,msg ;message to write mov ebx,1 ;file descriptor (stdout) mov eax,4 ;system call number (sys_write) int 0x80 ;call kernel

mov eax,1 ;system call number (sys_exit) int 0x80 ;call kernel

section .data

msg db ‘Hello, world!’,0xa ;our dear string len equ $ – msg

I tried to run the above program using yasm on termux using the following commands.

nasm -f elf hello.asm # this will produce hello.o ELF object file $ ld -s -o hello hello.o # this will produce hello executable

Substitute yasm for nasm.

Also tried:

ld -e _start -o hello hello.o

Error message below:

ld: hello.o: relocations in generic ELF (EM: 3) ld: hello.o: error adding symbols: file in wrong format

Can you let me know what I’m doing wrong.

I’m a newbie to assembly programming and am unfamiliar with the various options in ld.

The link to the tutorial:

http://asm.sourceforge.net/intro/hello.html