Filtered triangulated category examples

I am reading Beilison Ginsburg Schechtman’s “Koszul duality”. In the section 1.3, they introduced the notion filtered triangulated categories with only one example, considering an abelian category with filtration and take its corresponding derived category.

I would like to see other examples of filtered triangulated category other than that. Any references or explicit examples are welcome.

How to show filtered data from mysql to Autocompletetextview with dropdown like spinner inside each cardview in android?

Autocompletetextview is getting data from mysql and display that data as a dropdown. In my application in each cardview hv one Autocompletetextview like a spinner. each Autocompletetextview is showing all data inside each cardview. I am filtering the data from mysql and want to show different data to each Autocompletetextview in each cardview . kindly help me.

Code

public class AdapterBar extends RecyclerView.Adapter implements Filterable { Context context; private LayoutInflater inflater; ArrayList mArrayList; View view; //String itemname; String userName; String mlQty; PreferenceHelper preferenceHelper; String ml; String cost; Spinner spinner_ml; BarData menuData; ArrayAdapter dataAdapter; public static ArrayList data = new ArrayList(); public static ArrayList data1=new ArrayList(); // String itemname; public static final int CONNECTION_TIMEOUT = 10000; public static final int READ_TIMEOUT = 15000;

public AdapterBar(Context context, ArrayList<BarData> data) {     this.context = context;     inflater = LayoutInflater.from(context);     this.data = data; }  @NonNull @Override public AdapterBar.MyHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {     view = inflater.inflate(R.layout.bar_list, parent, false);     AdapterBar.MyHolder holder = new MyHolder(view);     preferenceHelper=new PreferenceHelper(context);     userName=preferenceHelper.getUserName();     //new SelectMlPrice(userName,itemname).execute();     //new SelectPrice(userName,itemname).execute();     return holder; }  @Override public void onBindViewHolder(@NonNull final AdapterBar.MyHolder holder, final int position) {     preferenceHelper=new PreferenceHelper(context);     final AdapterBar.MyHolder myHolder = holder;      BarData current = data.get(position);     String itemname=current.getItemname();     Log.d("ITEM111",itemname);     Glide.with(context)             .load(current.getThumbnail())             .apply(new RequestOptions().override(70, 70))             .into(((AdapterBar.MyHolder) holder).dish_img);     myHolder.dish_name.setText(itemname);     myHolder.editText_quantity.setText(current.getQuantity());     data1.clear();     new SelectMlPrice(userName,itemname).execute();     dataAdapter = new ArrayAdapter<BarData>             (context, android.R.layout.simple_list_item_1,data1);     //dataAdapter.notifyDataSetChanged();     //dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);     myHolder.barMldata.setAdapter(dataAdapter);     myHolder.barMldata.setCursorVisible(false);     myHolder.barMldata.setOnItemClickListener(new AdapterView.OnItemClickListener() {          @Override         public void onItemClick(AdapterView<?> parent, View view, int position, long id) {             myHolder.barMldata.showDropDown();             //BarData ml = (BarData) parent.getSelectedItem();             BarData selection =(BarData) parent.getItemAtPosition(position);             myHolder.text_price.setText("Rs: "+selection.getMl_rs());             //delButton.setAlpha(.8f);         }     }); 

}

private class SelectMlPrice extends AsyncTask { //ProgressDialog pdLoading = new ProgressDialog(getActivity()); HttpURLConnection conn; URL url = null; String userName; String itemname;

    public SelectMlPrice(String userName, String itemname)     {         this.userName=userName;         this.itemname=itemname;     }      @Override     protected void onPreExecute() {         super.onPreExecute();      }      @Override     protected String doInBackground(String... params) {         try {             preferenceHelper=new PreferenceHelper(context);             String username=preferenceHelper.getUserName();             Log.d("USERNM",userName);             Log.d("ITEMNM",itemname);             url=new URL("https://www.tekbazaar.in/raxview/PHP_AND/customer/getBarItemMlPrice.php?restaurant_user="+userName+"&item_name="+itemname);          } catch (MalformedURLException e) {             e.printStackTrace();             return "Data Not Found";         }         try {             conn = (HttpURLConnection) url.openConnection();             conn.setReadTimeout(READ_TIMEOUT);             conn.setConnectTimeout(CONNECTION_TIMEOUT);             conn.setRequestMethod("GET");             conn.setDoOutput(true);          } catch (IOException e1) {              e1.printStackTrace();             return "Data Not Found";         }         try {              int response_code = conn.getResponseCode();             if (response_code == HttpURLConnection.HTTP_OK) {                 InputStream input = conn.getInputStream();                 BufferedReader reader = new BufferedReader(new InputStreamReader(input));                 StringBuilder result = new StringBuilder();                 String line;                  while ((line = reader.readLine()) != null) {                     result.append(line);                 }                 return (result.toString());              } else {                  return ("unsuccessful");             }          } catch (IOException e) {             e.printStackTrace();             return e.toString();         } finally {             conn.disconnect();         }       }      @Override     protected void onPostExecute(String result) {         try {              JSONArray jArray = new JSONArray(result);              Log.d("JARRAY", String.valueOf(jArray.length()));             for (int i=0;i<jArray.length();i++){                 JSONObject json_data = jArray.getJSONObject(i);                 BarData menuData = new BarData();                 String ml=json_data.getString("ml");                 String cost=json_data.getString("cost");                 Log.d("ML--->",ml);                 Log.d("COST--->",cost);                 menuData.setMl_qty(ml);                 menuData.setMl_rs(cost);                 data1.add(menuData);             }             //dataAdapter.remove(menuData);         } catch (JSONException e) {             Toast.makeText(context, "Server Down Plz wait!", Toast.LENGTH_LONG).show();         }      }     } 

class MyHolder extends RecyclerView.ViewHolder {

    ImageView dish_img, checkedDish_img;     TextView dish_name, text_price, text_rs;     TextView editText_quantity;     CheckBox checkBox_Select;     Spinner spinner_ml;     Context context;     ImageView buttonInc,buttonDec;     Button selectQty;     AutoCompleteTextView barMldata;      // create constructor to get widget reference     public MyHolder(View itemView) {         super(itemView);         dish_img = (ImageView) itemView.findViewById(R.id.dish_img);         dish_name = (TextView) itemView.findViewById(R.id.dish_name);         text_price = (TextView) itemView.findViewById(R.id.text_price);         //text_rs = (TextView) itemView.findViewById(R.id.text_rs);         spinner_ml = (Spinner) itemView.findViewById(R.id.spinner_ml);         barMldata = itemView.findViewById(R.id.barMldata);         editText_quantity = (TextView) itemView.findViewById(R.id.editText_quantity);         checkBox_Select = (CheckBox) itemView.findViewById(R.id.checkBox_Select);         checkedDish_img = (ImageView) itemView.findViewById(R.id.checkedDish_img);      } } 

}

Filtered lookup displaying html in view

I created a filtered lookup column to pull in values from another list in my site based off a view. The drop down works great but when I see the item in my default view it is no longer plain text. I see the full string in the column…

https://apps22.epmlive.com/sites/aclate/_layouts/15/listform.aspx?PageType=4&ListId=1cb01a98-1425-4f76-929a-27b24875858c&ID=264&RootFolder=*’, RefreshPage); return false;” href=”https://apps22.epmlive.com/sites/aclate/_layouts/15/listform.aspx?PageType=4&ListId=1cb01a98-1425-4f76-929a-27b24875858c&ID=264&RootFolder=*”>Customer Name Here

What I want to see in the view is just “Customer Name Here”. Is that possible?

Custom column in Product Grid not being filtered?

I have created a custom column in Product gird by a module, which shows Parent product’s SKU there. It’s working fine but when I try to filter it Magento gives “Something went wrong with processing the default view and we have restored the filter to its original state.” error. and in exception.log the error is:

[2019-01-03 11:33:08] main.CRITICAL: Invalid attribute name: parentid_col {“exception”:”[object] (Magento\Framework\Exception\LocalizedException(code: 0): Invalid attribute name: parentid_col at /html/vendor/magento/module-eav/Model/Entity/Collection/AbstractCollection.php:1383)”} []

Here’s my code

<?xml version="1.0" encoding="utf-8"?>  <listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd"> <columns name="product_columns"> <column name="parentid_col" class="CustomColumn\Addproductcolumn\Ui\Component\Listing\Column\ParentProductId"> <argument name="data" xsi:type="array">     <item name="config" xsi:type="array">           <item name="label" xsi:type="string" translate="true">Parent id</item>           <item name="filter" xsi:type="string">text</item>           <item name="visible" xsi:type="boolean">true</item>           <item name="sortOrder" xsi:type="number">50</item>           <item name="align" xsi:type="string">left</item>           <item name="dataType" xsi:type="string">text</item>           <item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>     </item> </argument> </column> </columns> </listing> 

app/code/CustomColumn/Addproductcolumn/Ui/Component/Listing/Column/ParentProductId.php

<?php   namespace CustomColumn\Addproductcolumn\Ui\Component\Listing\Column; use Magento\Framework\View\Element\UiComponentFactory; use Magento\Framework\View\Element\UiComponent\ContextInterface; use Magento\Ui\Component\Listing\Columns\Column;  class ParentProductId extends Column {     protected $  configurable;     protected $  bundle;     protected $  _productFactory;       public function __construct(         ContextInterface $  context,         UiComponentFactory $  uiComponentFactory,         \Magento\Catalog\Model\ProductFactory $  productFactory,          \Magento\ConfigurableProduct\Model\Product\Type\Configurable $  configurable,         \Magento\Bundle\Model\Product\Type $  bundle,          array $  components = [],         array $  data = []     ) {         parent::__construct($  context, $  uiComponentFactory, $  components, $  data);         $  this->_configurable = $  configurable;         $  this->_bundle = $  bundle;         $  this->_productFactory = $  productFactory;      }      public function prepareDataSource(array $  dataSource)     {           if (isset($  dataSource['data']['items'])) {             foreach ($  dataSource['data']['items'] as &$  items) {             if($  items['type_id'] == 'simple'){                  $  productId = $  items['entity_id'];                 $  parentProducts = '';                  $  getParent = $  this->_configurable->getParentIdsByChild($  productId);                 $  parentData = $  this->_productFactory->create()->load($  getParent);                 $  getParentSku = $  parentData->getSku();                  if(isset($  getParentSku)){                     $  parentProducts .= $  getParentSku;                     }                  $  getParent = $  this->_bundle->getParentIdsByChild($  productId);                 if(isset($  getParent)){                      foreach ($  getParent as $  p) {                         $  parentData = $  this->_productFactory->create()->load($  p);                         $  getParentSku = $  parentData->getSku();                         $  parentProducts .= $  getParentSku.',';                       }                           $  items['parentid_col'] = $  parentProducts;                 }              }         }     }         return $  dataSource;     }   } 

Views contextually filtered by terms in paragraphs

Forgive me for a lengthy question. I have a field in the content type which refers to a Paragraph type.

The paragraph type intern has a term reference field.

When I edit/ create a content the desired term names are selected and saved (it can be any number of terms). Till here everything is well.

Now, when the content is rendered, I would like to show the latest 5 (or any number) contents from each term which was selected from the paragraph field earlier.

Is there a way to achieve this with the help of views ? My final hope if I don’t find a solution is to programatically fetch the latest contents under each term and display them. Would like to know if a better more elegant way is there with views.

Note – The reason why Paragraph is chosen is due to the flexibility it provides with rearranging the terms etc.

Would be great if any reference or examples are provided if my approach is right. Thanks. Paragraph field screenshot

Could this be a new sieve for prime numbers using 6n + or -1 then filtered by PN and (PN squared) + (PN x 6)

I hope someone will look at this. Start off with the calsulations for all possible prime numbers greater than 3; 6n + or -1 5 7 11 13 17 19 23 25 29 31 35 37 41 43 47 49 53 55 59 61…

Then filter with PN + (PN x 6) or PN x 7 13 19 25 31 37… Include the square For Prime numbers in the sequence of 5 11 17 23 29…

….5…(6)….7……11..(12)..13……17..(18)..19……23..(24)..25……29..(30)..31

..35..(36)..37……41..(42)..43……47..(48)..49……53..(54)..55……59..(60)..61

..65..(66)..67……71..(72)..73……77..(78)..79……83..(84)..85……89..(90)..91

..95..(96)..97….101.(102).103…107.(108).109…113.(114).115…119.(120).121

125.(126).127…131.(132).133…137.(138).139…143.(144).145…149.(150).151

The factors of 30 I realized were 5 and 6. So I wondered what would happen if I went through the same process with the prime number 7. 7 x 6 (42) would be added to each row following 7. Those numbers would determine where the rows of numbers (the multiples of 5’s and 6’s eliminated) would start. …7….9….11….13….17….19….23………….29….31………..37….41….43….47

.49…51…53…………59….61…………67…..71….73………..79….83…………89 .91…93……….97….101..103..107…109…113……….119…121……….127..131 133…….137..139….143………149…151………..157..161…163..167…169..173 It again identified the composite numbers (49, 91, 133) on the list to in the first column below the prime number to eliminate.

For 11, the same process: 11 x 6, then add 66 to 11 and each following row. .11…13…17…19…23…………29…31………..37…41…43…47………….53………….59…61………..67…71…73

.77…79…83………89………………..97..101..103.107..109.113………..119….121……..127…131……..137..139

143…….149..151……….157..161..163.167.. and so on Here’s a video about the process https://www.youtube.com/watch?v=bcZbM7aAfhU&t=416s

How to use Views Excel Export or Views data export to export a filtered table?

A while back I asked a question about how to pass a list of columns to display in a views table and a solution closest to what I wanted to do was a module:

Views Dynamic Fields

I was positively shocked that the description of the project mentioned the second part of what I need to do here. Export that view to an Excel spreadsheet.

This module provides additional advantages when used with the Views Bonus Pack module or the Views Excel Export module to generate an xls file from a view. The xls file will only display the fields you have chosen on the rendered view instance in browser.

I need to let the user choose the columns, then render the view with those columns and expose filters for all chosen columns, apply them, then download the result in an excel file. Unfortunately I was not able to find a description how do I actually do that. Using the xls feed option I don’t get any fields from the view itself (seems like I need to add the fields manually again) which I can’t imagine works with the filters from the view itself. Exporting the file works, but it only shows the default “Title” field (without adding fields to the feed manually).

I had the same problems with Views data export, creating a new data export started with a default “Title” field and I don’t think you’re supposed to add the same filters again.

Let me know if you have any experience with those modules or ever had to export a view to a spreadsheet.

Gmail label still shows after I filtered messages from senders & Gmail Label/Folder

Gmail label still shows when I open the message. Its at the top next to the actual label name I want. I now know how to skip inbox and archive the “inbox label” but not the gmail label.

My second issue is in the Gmail label/folder on the left pane, inside has 1000s of email messages that I already created labels for, such as “VA”, “moving”, “Legal”, etc. And it shows the correct label when scrolling down through the messages. And they don’t show “Gmail” next to the correct label name. So I’m confused by this. Why do they show up in the Gmail tab and not only in the label I created for those messages? If there is a quick fix, shoot I guess any fix for this, your help would be SO SO greatly appreciated. Thank you.

P.S. I hope I just didn’t ask the same question with my two questions. If I did, I’m sorry.