Magento 2 product collection getSelect Order by Case unException Unknown column ‘name’ in ‘order clause’

I need to use ORDER BY CASE name which is product name

Query:

SELECT `e`.*, `cat_index`.`position` AS `cat_index_position`,  `stock_status_index`.`stock_status` AS `is_salable`  FROM `catalog_product_entity` AS `e` INNER JOIN `catalog_category_product_index` AS `cat_index`  ON cat_index.product_id=e.entity_id AND cat_index.store_id=1  AND cat_index.category_id='3' LEFT JOIN `cataloginventory_stock_status` AS `stock_status_index`  ON e.entity_id = stock_status_index.product_id AND stock_status_index.website_id = 0 AND stock_status_index.stock_id = 1  ORDER BY CASE WHEN `name` LIKE '%banana%' THEN 1  WHEN `name` LIKE '%apple%' THEN 2  ELSE 3 END 

... $ collection->addCategoryFilter($ category) $ collection->getSelect()->order(new \Zend_Db_Expr("CASE WHENnameLIKE '%banana%' THEN 1 WHENnameLIKE '%apple%' THEN 2 ELSE 3 END")); ...

Exception #1 (PDOException): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'name' in 'order clause'

If do setOrder instead of order then it Works but it just order alphabetically like so:

$ collection->addCategoryFilter($ category)->setOrder('name', 'ASC');

I need Expression what is going wrong?

A ripple animation to make the user aware of a new or unknown feature

There’s a UI technique I’ve previously seen on apps where a new feature or otherwise a feature unknown to the user has some kind of round ripple animation the size of a fingertip on it to indicate to the user that they can or should tap or touch it. After the user has tapped/touched and seen what the feature is offering, the ripple animation no longer appears on that element.

What is it called? I need to implement such an approach now but I have no clue at all what its name is — which isn’t helping my Google searches. Kindly provide enlightenment.

Recovering a 6 drive RAID 5 array using two disks – unknown filesystem type ‘linux_raid_member’ with mdadm

Hello askubuntu forums,

I’m trying to recover data from a 6 drive NAS set up. I’ve tried using mdadm to examine, configure, and mount some drives from this array, but nothing is working. I’ve got two of the drives plugged into an USB drive mount.

I can see what partition has data using fdisk. Anytime I’ve tried to mount anything though it will either tell me “Unknown filesystem type ‘linux_raid_member'” or tell me that the drive is already active. Been trying to do this all day and I’m hoping someone here can help me out. Thanks in advance.

root@jake-ThinkPad-W541:/home/test# mdadm --query /dev/sdc8 /dev/sdc8: is not an md array /dev/sdc8: device 1 in 6 device undetected raid5 /dev/md/8.  Use mdadm --examine for more detail. root@jake-ThinkPad-W541:/home/test# mdadm --examine /dev/sdc8 /dev/sdc8:           Magic : a92b4efc         Version : 1.0     Feature Map : 0x0      Array UUID : 647bf344:1fa055b2:250192e1:f58cf57e            Name : vg:8   Creation Time : Wed Apr  1 22:54:11 2015      Raid Level : raid5    Raid Devices : 6   Avail Dev Size : 9749841648 (4649.09 GiB 4991.92 GB)      Array Size : 24374602240 (23245.43 GiB 24959.59 GB)   Used Dev Size : 9749840896 (4649.09 GiB 4991.92 GB)    Super Offset : 9749841904 sectors    Unused Space : before=0 sectors, after=1008 sectors           State : clean     Device UUID : 1f16d5b6:b82ce930:c52f61f7:df644373      Update Time : Tue Jun  4 00:52:09 2019        Checksum : c6070a4 - correct          Events : 201           Layout : left-symmetric      Chunk Size : 512K     Device Role : Active device 1    Array State : AAAAAA ('A' == active, '.' == missing, 'R' == replacing) 
  • John

“grub rescue unknown filesystem/device” error is only passed through by pressing multiple ESC in HP

I have installed Ubuntu 16.04 alongside Windows 10. Whenever I restart/start my PC (Elitebook 8560w Workstation HP) the grub selection menu does not come directly, I have to keep pressing ESC, then by pressing F9 I can select the hard-disk that I want to boot from (SSD or harddisk). After that the normal grub menu shows up. Otherwise, I will encounter the common ” unknown file system” error and stuck in. I have tried many solutions stated here: How to fix "error: unknown filesystem. grub rescue> including writing commands to rescue terminal and Boot Repair application in Ubuntu. However, non of them could work!. Moreover, writing lsto grub rescue shows only (hd0) and ls (hd0)shows again unknown filesystem error. So I am not able to move forward with this terminal solution. Is there any possible case/solution for my situation? Disks and partitions shown in Windows10

64.77 GB partition is used for Ubuntu

Finding the value of x in shapes, and finding the size of each unknown angle with algebra and variables [on hold]

CHAPTER 7 – SHAPES 1. Find the value of x. a) (3x −10)° (2x−5)° (x−5)° b) c) (x + 45)° (2x+40)° (2x+10)° (3 x )° 2. Find the size of each unknown angle. 3. Determine the value of x and find the size of each of the angles represented by an algebraic expression. 4. Determine the measure of each unknown angle.

Unknown automatically generated email in sent folder

I just noticed a strange email in my sent folder that I did not send. Here is the header information:

To: 5f3d36eb61801dda4063@cloudmailin.net From: ********@gmail.com Date: Mon, 10 Jun 2019 06:54:17 -0700 Message-ID: <CAHMUou-d6rW138ucKhKVoLWqzn2ZZ12Q0-wK+FR6SCXDr89YmQ@mail.gmail.com> Subject: bW9KRGdIeTlyMFd2UjZQQVYrQUd0TVJ5N2IrbDlqVXh2NlF6ZUFvaDlaanpRQWwzVmZtVFlwQVo5cXUybmRFbC0ta0VvVDdmakJzVzQzL3lQM2lYL0tBQT09--19cd1b1aa0f32659eece53630df822281b44c804 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline This message was automatically generated by Gmail.

There was no content in the email, just the jumble of characters in the subject. The email address this was sent to is reported a few times on the internet as possible phishing, but it’s not clear to me why Gmail would automatically generate an email on my behalf to this address. The “From” field was indeed my actual email address.

I have already changed my password as a precaution, but am curious is this anything to further worry about?

Unknown symbol in module but what symbol?

I compile a driver following the documentations. But when I try loading them via

insmod onebox_wlan_nongpl.ko 

, I receive an error message:

insmod: Error: could not insert module onebox_wlan_nongpl.ko: Unknown symbol in module

I know this is due to wrong order of loading .ko files but it does not tell me which module does it depend on. I would like to know what symbol is unknown to file the module that I should load first.

Unknown entity type: Namespace\Module\Model\Name requested

I am trying to understand this exception: Unknown entity type: Namespace\Module\Model\Name requested

I have a module and I am loading it like this in my controller:

$  model = $  this->_objectManager->create(\Namespace\Module\Model\Name::class); $  model->load($  id); 

and in my resource model: class Namespace\Module\Model\ResourceModel\Name, I have this:

/**  * Load an object  *  * @param AbstractModel $  object  * @param mixed $  value  * @param string $  field field to load by (defaults to model id)  * @return $  this  * @SuppressWarnings(PHPMD.UnusedFormalParameter)  */ public function load(AbstractModel $  object, $  value, $  field = null) {     $  this->getEntityManager()->load($  object, $  value);     return $  this; } 

Then in my di.xml, I have got this:

<type name="Magento\Framework\Model\Entity\RepositoryFactory">     <arguments>         <argument name="entities" xsi:type="array">             <item name="Namespace\Module\Api\Data\NameInterface" xsi:type="string">Namespace\Module\Model\ResourceModel\Name</item>         </argument>     </arguments> </type> <type name="Magento\Framework\EntityManager\MetadataPool">     <arguments>         <argument name="metadata" xsi:type="array">             <item name="Namespace\Module\Api\Data\NameInterface" xsi:type="array">                 <item name="entityTableName" xsi:type="string">my_table</item>                 <item name="identifierField" xsi:type="string">my_id</item>             </item>         </argument>     </arguments> </type>   <type name="Magento\Framework\EntityManager\Operation\AttributePool">     <arguments>         <argument name="extensionActions" xsi:type="array">             <item name="myName" xsi:type="array">                 <item name="Namespace\Module\Api\Data\NameInterface" xsi:type="array">                     <item name="read" xsi:type="string">Namespace\Module\Model\ResourceModel\ReadHandler</item>                     <item name="create" xsi:type="string">Namespace\Module\Model\ResourceModel\SaveHandler</item>                     <item name="update" xsi:type="string">Namespace\Module\Model\ResourceModel\SaveHandler</item>                 </item>             </item>         </argument>     </arguments> </type> 

Why is that throwing the exception?

How do I understand this MetadataPool?

CYK algorithm – how to handle unknown terminals given in a sentence to parse?

There is a given treebank which we derive the Probabilistic context free grammar. I wonder how do one handles with a given sentence which includes terminals that don’t exist in the derived rules? Is there a kind of smoothing for this case? Considering we use CYK to get the parse tree of the given sentence.